From 3c65b8f1b21762f7d299d38cce23e8d7ca4b905d Mon Sep 17 00:00:00 2001 From: Zhongcheng Lao Date: Sun, 13 Oct 2024 08:09:14 -0700 Subject: [PATCH] Use WMI instead of PowerShell for OS operations --- go.mod | 6 +- go.sum | 6 + pkg/cim/disk.go | 60 + pkg/cim/iscsi.go | 271 + pkg/cim/volume.go | 241 + pkg/cim/wmi.go | 324 + pkg/os/disk/api.go | 267 +- pkg/os/iscsi/api.go | 233 +- pkg/os/smb/api.go | 53 +- pkg/os/system/api.go | 98 +- pkg/os/volume/api.go | 307 +- vendor/github.com/Microsoft/wmi/LICENSE | 21 + .../github.com/Microsoft/wmi/go/wmi/Class.go | 16 + .../Microsoft/wmi/go/wmi/Credentials.go | 13 + .../Microsoft/wmi/go/wmi/Instance.go | 24 + .../Microsoft/wmi/go/wmi/InstanceManager.go | 17 + .../Microsoft/wmi/go/wmi/MethodDeclaration.go | 7 + .../Microsoft/wmi/go/wmi/MethodParameter.go | 66 + .../Microsoft/wmi/go/wmi/MethodResult.go | 7 + .../Microsoft/wmi/go/wmi/Property.go | 91 + .../Microsoft/wmi/go/wmi/Qualifier.go | 6 + .../github.com/Microsoft/wmi/go/wmi/Query.go | 51 + .../Microsoft/wmi/go/wmi/Session.go | 26 + .../wmi/pkg/base/credential/credential.go | 14 + .../Microsoft/wmi/pkg/base/host/host.go | 31 + .../wmi/pkg/base/instance/instancemanager.go | 168 + .../Microsoft/wmi/pkg/base/query/query.go | 127 + .../Microsoft/wmi/pkg/base/session/session.go | 95 + .../Microsoft/wmi/pkg/errors/errors.go | 105 + .../Microsoft/wmi/pkg/wmiinstance/WmiClass.go | 304 + .../wmi/pkg/wmiinstance/WmiEventSink.go | 248 + .../wmi/pkg/wmiinstance/WmiHelper.go | 198 + .../wmi/pkg/wmiinstance/WmiInstance.go | 522 ++ .../Microsoft/wmi/pkg/wmiinstance/WmiJob.go | 220 + .../wmi/pkg/wmiinstance/WmiMethod.go | 143 + .../wmi/pkg/wmiinstance/WmiMethodParam.go | 45 + .../wmi/pkg/wmiinstance/WmiProperty.go | 84 + .../wmi/pkg/wmiinstance/WmiQualifier.go | 19 + .../wmi/pkg/wmiinstance/WmiSession.go | 307 + .../wmi/pkg/wmiinstance/WmiSessionManager.go | 108 + .../pkg/wmiinstance/WmiSynchronousEvents.go | 50 + .../wmi/server2019/root/cimv2/ACE.go | 260 + .../root/cimv2/AbsoluteTimerInstruction.go | 80 + .../server2019/root/cimv2/AggregateEvent.go | 110 + .../wmi/server2019/root/cimv2/CIM_Action.go | 334 + .../root/cimv2/CIM_ActionSequence.go | 111 + .../server2019/root/cimv2/CIM_ActsAsSpare.go | 141 + .../root/cimv2/CIM_AdjacentSlots.go | 171 + .../root/cimv2/CIM_AggregatePExtent.go | 48 + .../root/cimv2/CIM_AggregatePSExtent.go | 48 + .../cimv2/CIM_AggregateRedundancyComponent.go | 48 + .../server2019/root/cimv2/CIM_AlarmDevice.go | 155 + .../root/cimv2/CIM_AllocatedResource.go | 48 + .../root/cimv2/CIM_ApplicationSystem.go | 48 + .../CIM_ApplicationSystemSoftwareFeature.go | 48 + .../root/cimv2/CIM_AssociatedAlarm.go | 48 + .../root/cimv2/CIM_AssociatedBattery.go | 48 + .../root/cimv2/CIM_AssociatedCooling.go | 48 + .../root/cimv2/CIM_AssociatedMemory.go | 48 + .../cimv2/CIM_AssociatedProcessorMemory.go | 80 + .../root/cimv2/CIM_AssociatedSensor.go | 48 + .../CIM_AssociatedSupplyCurrentSensor.go | 80 + .../CIM_AssociatedSupplyVoltageSensor.go | 80 + .../server2019/root/cimv2/CIM_BIOSElement.go | 80 + .../server2019/root/cimv2/CIM_BIOSFeature.go | 112 + .../root/cimv2/CIM_BIOSFeatureBIOSElements.go | 48 + .../root/cimv2/CIM_BIOSLoadedInNV.go | 110 + .../wmi/server2019/root/cimv2/CIM_BasedOn.go | 110 + .../wmi/server2019/root/cimv2/CIM_Battery.go | 410 ++ .../server2019/root/cimv2/CIM_BinarySensor.go | 170 + .../server2019/root/cimv2/CIM_BootOSFromFS.go | 48 + .../wmi/server2019/root/cimv2/CIM_BootSAP.go | 48 + .../server2019/root/cimv2/CIM_BootService.go | 48 + .../root/cimv2/CIM_BootServiceAccessBySAP.go | 48 + .../server2019/root/cimv2/CIM_CDROMDrive.go | 48 + .../server2019/root/cimv2/CIM_CacheMemory.go | 290 + .../wmi/server2019/root/cimv2/CIM_Card.go | 200 + .../server2019/root/cimv2/CIM_CardInSlot.go | 48 + .../server2019/root/cimv2/CIM_CardOnCard.go | 80 + .../wmi/server2019/root/cimv2/CIM_Chassis.go | 202 + .../root/cimv2/CIM_ChassisInRack.go | 80 + .../wmi/server2019/root/cimv2/CIM_Check.go | 334 + .../wmi/server2019/root/cimv2/CIM_Chip.go | 80 + .../root/cimv2/CIM_ClassCreation.go | 48 + .../root/cimv2/CIM_ClassDeletion.go | 48 + .../root/cimv2/CIM_ClassIndication.go | 80 + .../root/cimv2/CIM_ClassModification.go | 80 + .../cimv2/CIM_ClusterServiceAccessBySAP.go | 48 + .../root/cimv2/CIM_ClusteringSAP.go | 48 + .../root/cimv2/CIM_ClusteringService.go | 78 + .../root/cimv2/CIM_CollectedCollections.go | 111 + .../root/cimv2/CIM_CollectedMSEs.go | 111 + .../root/cimv2/CIM_CollectionOfMSEs.go | 141 + .../root/cimv2/CIM_CollectionOfSensors.go | 48 + .../root/cimv2/CIM_CollectionSetting.go | 111 + .../root/cimv2/CIM_CompatibleProduct.go | 141 + .../server2019/root/cimv2/CIM_Component.go | 111 + .../root/cimv2/CIM_ComputerSystem.go | 48 + .../root/cimv2/CIM_ComputerSystemDMA.go | 48 + .../root/cimv2/CIM_ComputerSystemIRQ.go | 48 + .../root/cimv2/CIM_ComputerSystemMappedIO.go | 48 + .../root/cimv2/CIM_ComputerSystemPackage.go | 48 + .../root/cimv2/CIM_ComputerSystemResource.go | 48 + .../root/cimv2/CIM_Configuration.go | 141 + .../server2019/root/cimv2/CIM_ConnectedTo.go | 48 + .../root/cimv2/CIM_ConnectorOnPackage.go | 48 + .../server2019/root/cimv2/CIM_Container.go | 80 + .../server2019/root/cimv2/CIM_ControlledBy.go | 140 + .../server2019/root/cimv2/CIM_Controller.go | 140 + .../root/cimv2/CIM_CoolingDevice.go | 80 + .../root/cimv2/CIM_CopyFileAction.go | 140 + .../root/cimv2/CIM_CreateDirectoryAction.go | 48 + .../root/cimv2/CIM_CurrentSensor.go | 48 + .../wmi/server2019/root/cimv2/CIM_DMA.go | 441 ++ .../wmi/server2019/root/cimv2/CIM_DataFile.go | 110 + .../server2019/root/cimv2/CIM_Dependency.go | 111 + .../root/cimv2/CIM_DependencyContext.go | 111 + .../root/cimv2/CIM_DesktopMonitor.go | 170 + .../root/cimv2/CIM_DeviceAccessedByFile.go | 48 + .../root/cimv2/CIM_DeviceConnection.go | 110 + .../root/cimv2/CIM_DeviceErrorCounts.go | 335 + .../server2019/root/cimv2/CIM_DeviceFile.go | 48 + .../root/cimv2/CIM_DeviceSAPImplementation.go | 48 + .../cimv2/CIM_DeviceServiceImplementation.go | 48 + .../root/cimv2/CIM_DeviceSoftware.go | 110 + .../server2019/root/cimv2/CIM_Directory.go | 48 + .../root/cimv2/CIM_DirectoryAction.go | 80 + .../root/cimv2/CIM_DirectoryContainsFile.go | 48 + .../root/cimv2/CIM_DirectorySpecification.go | 110 + .../cimv2/CIM_DirectorySpecificationFile.go | 111 + .../root/cimv2/CIM_DiscreteSensor.go | 142 + .../server2019/root/cimv2/CIM_DiskDrive.go | 48 + .../root/cimv2/CIM_DiskPartition.go | 110 + .../root/cimv2/CIM_DiskSpaceCheck.go | 80 + .../root/cimv2/CIM_DisketteDrive.go | 48 + .../wmi/server2019/root/cimv2/CIM_Display.go | 48 + .../wmi/server2019/root/cimv2/CIM_Docked.go | 48 + .../root/cimv2/CIM_ElementCapacity.go | 111 + .../root/cimv2/CIM_ElementConfiguration.go | 111 + .../root/cimv2/CIM_ElementSetting.go | 111 + .../root/cimv2/CIM_ElementsLinked.go | 48 + .../wmi/server2019/root/cimv2/CIM_Error.go | 552 ++ .../root/cimv2/CIM_ErrorCountersForDevice.go | 48 + .../root/cimv2/CIM_ExecuteProgram.go | 110 + .../wmi/server2019/root/cimv2/CIM_Export.go | 141 + .../root/cimv2/CIM_ExtraCapacityGroup.go | 80 + .../wmi/server2019/root/cimv2/CIM_FRU.go | 261 + .../root/cimv2/CIM_FRUIncludesProduct.go | 111 + .../root/cimv2/CIM_FRUPhysicalElements.go | 111 + .../wmi/server2019/root/cimv2/CIM_Fan.go | 125 + .../server2019/root/cimv2/CIM_FileAction.go | 48 + .../root/cimv2/CIM_FileSpecification.go | 230 + .../server2019/root/cimv2/CIM_FileStorage.go | 48 + .../server2019/root/cimv2/CIM_FileSystem.go | 471 ++ .../server2019/root/cimv2/CIM_FlatPanel.go | 230 + .../root/cimv2/CIM_FromDirectoryAction.go | 111 + .../cimv2/CIM_FromDirectorySpecification.go | 111 + .../wmi/server2019/root/cimv2/CIM_HeatPipe.go | 48 + .../root/cimv2/CIM_HostedAccessPoint.go | 48 + .../root/cimv2/CIM_HostedBootSAP.go | 48 + .../root/cimv2/CIM_HostedBootService.go | 48 + .../root/cimv2/CIM_HostedFileSystem.go | 48 + .../root/cimv2/CIM_HostedJobDestination.go | 48 + .../root/cimv2/CIM_HostedService.go | 48 + .../wmi/server2019/root/cimv2/CIM_IRQ.go | 290 + .../server2019/root/cimv2/CIM_Indication.go | 315 + .../root/cimv2/CIM_InfraredController.go | 48 + .../server2019/root/cimv2/CIM_InstCreation.go | 48 + .../server2019/root/cimv2/CIM_InstDeletion.go | 48 + .../root/cimv2/CIM_InstIndication.go | 142 + .../root/cimv2/CIM_InstModification.go | 80 + .../server2019/root/cimv2/CIM_InstalledOS.go | 80 + .../cimv2/CIM_InstalledSoftwareElement.go | 111 + .../wmi/server2019/root/cimv2/CIM_Job.go | 290 + .../root/cimv2/CIM_JobDestination.go | 140 + .../root/cimv2/CIM_JobDestinationJobs.go | 48 + .../wmi/server2019/root/cimv2/CIM_Keyboard.go | 140 + .../root/cimv2/CIM_LinkHasConnector.go | 48 + .../root/cimv2/CIM_LocalFileSystem.go | 48 + .../wmi/server2019/root/cimv2/CIM_Location.go | 141 + .../root/cimv2/CIM_LogicalDevice.go | 501 ++ .../server2019/root/cimv2/CIM_LogicalDisk.go | 110 + .../cimv2/CIM_LogicalDiskBasedOnPartition.go | 48 + .../cimv2/CIM_LogicalDiskBasedOnVolumeSet.go | 48 + .../root/cimv2/CIM_LogicalElement.go | 48 + .../server2019/root/cimv2/CIM_LogicalFile.go | 1068 +++ .../root/cimv2/CIM_LogicalIdentity.go | 111 + .../root/cimv2/CIM_MagnetoOpticalDrive.go | 48 + .../root/cimv2/CIM_ManagedSystemElement.go | 201 + .../root/cimv2/CIM_ManagementController.go | 48 + .../root/cimv2/CIM_MediaAccessDevice.go | 352 + .../server2019/root/cimv2/CIM_MediaPresent.go | 48 + .../wmi/server2019/root/cimv2/CIM_Memory.go | 472 ++ .../root/cimv2/CIM_MemoryCapacity.go | 140 + .../server2019/root/cimv2/CIM_MemoryCheck.go | 80 + .../root/cimv2/CIM_MemoryMappedIO.go | 200 + .../server2019/root/cimv2/CIM_MemoryOnCard.go | 48 + .../root/cimv2/CIM_MemoryWithMedia.go | 48 + .../root/cimv2/CIM_ModifySettingAction.go | 200 + .../root/cimv2/CIM_MonitorResolution.go | 230 + .../root/cimv2/CIM_MonitorSetting.go | 48 + .../wmi/server2019/root/cimv2/CIM_Mount.go | 48 + .../root/cimv2/CIM_MultiStateSensor.go | 48 + .../wmi/server2019/root/cimv2/CIM_NFS.go | 470 ++ .../root/cimv2/CIM_NetworkAdapter.go | 201 + .../root/cimv2/CIM_NonVolatileStorage.go | 80 + .../root/cimv2/CIM_NumericSensor.go | 530 ++ .../server2019/root/cimv2/CIM_OSProcess.go | 48 + .../root/cimv2/CIM_OSVersionCheck.go | 110 + .../root/cimv2/CIM_OperatingSystem.go | 736 ++ .../CIM_OperatingSystemSoftwareFeature.go | 48 + .../root/cimv2/CIM_PCIController.go | 48 + .../root/cimv2/CIM_PCMCIAController.go | 80 + .../root/cimv2/CIM_PCVideoController.go | 140 + .../cimv2/CIM_PExtentRedundancyComponent.go | 48 + .../root/cimv2/CIM_PSExtentBasedOnPExtent.go | 48 + .../server2019/root/cimv2/CIM_PackageAlarm.go | 48 + .../root/cimv2/CIM_PackageCooling.go | 48 + .../root/cimv2/CIM_PackageInChassis.go | 48 + .../root/cimv2/CIM_PackageInSlot.go | 48 + .../root/cimv2/CIM_PackageTempSensor.go | 48 + .../root/cimv2/CIM_PackagedComponent.go | 48 + .../root/cimv2/CIM_ParallelController.go | 142 + .../root/cimv2/CIM_ParticipatesInSet.go | 111 + .../root/cimv2/CIM_PhysicalCapacity.go | 141 + .../root/cimv2/CIM_PhysicalComponent.go | 140 + .../root/cimv2/CIM_PhysicalConnector.go | 111 + .../root/cimv2/CIM_PhysicalElement.go | 350 + .../root/cimv2/CIM_PhysicalElementLocation.go | 111 + .../root/cimv2/CIM_PhysicalExtent.go | 140 + .../root/cimv2/CIM_PhysicalFrame.go | 292 + .../server2019/root/cimv2/CIM_PhysicalLink.go | 170 + .../root/cimv2/CIM_PhysicalMedia.go | 200 + .../root/cimv2/CIM_PhysicalMemory.go | 290 + .../root/cimv2/CIM_PhysicalPackage.go | 275 + .../root/cimv2/CIM_PointingDevice.go | 170 + .../server2019/root/cimv2/CIM_PotsModem.go | 562 ++ .../server2019/root/cimv2/CIM_PowerSupply.go | 410 ++ .../wmi/server2019/root/cimv2/CIM_Printer.go | 1022 +++ .../wmi/server2019/root/cimv2/CIM_Process.go | 440 ++ .../root/cimv2/CIM_ProcessExecutable.go | 170 + .../root/cimv2/CIM_ProcessThread.go | 48 + .../server2019/root/cimv2/CIM_Processor.go | 380 ++ .../wmi/server2019/root/cimv2/CIM_Product.go | 261 + .../server2019/root/cimv2/CIM_ProductFRU.go | 111 + .../root/cimv2/CIM_ProductParentChild.go | 111 + .../root/cimv2/CIM_ProductPhysicalElements.go | 111 + .../cimv2/CIM_ProductProductDependency.go | 141 + .../root/cimv2/CIM_ProductSoftwareFeatures.go | 111 + .../root/cimv2/CIM_ProductSupport.go | 111 + .../root/cimv2/CIM_ProtectedSpaceExtent.go | 80 + .../wmi/server2019/root/cimv2/CIM_Rack.go | 110 + .../wmi/server2019/root/cimv2/CIM_Realizes.go | 48 + .../cimv2/CIM_RealizesAggregatePExtent.go | 48 + .../root/cimv2/CIM_RealizesDiskPartition.go | 80 + .../root/cimv2/CIM_RealizesPExtent.go | 80 + .../server2019/root/cimv2/CIM_RebootAction.go | 48 + .../root/cimv2/CIM_RedundancyComponent.go | 48 + .../root/cimv2/CIM_RedundancyGroup.go | 110 + .../root/cimv2/CIM_Refrigeration.go | 48 + .../root/cimv2/CIM_RelatedStatistics.go | 111 + .../root/cimv2/CIM_RemoteFileSystem.go | 48 + .../root/cimv2/CIM_RemoveDirectoryAction.go | 80 + .../root/cimv2/CIM_RemoveFileAction.go | 80 + .../root/cimv2/CIM_ReplacementSet.go | 111 + .../root/cimv2/CIM_ResidesOnExtent.go | 48 + .../server2019/root/cimv2/CIM_RunningOS.go | 48 + .../root/cimv2/CIM_SAPSAPDependency.go | 48 + .../root/cimv2/CIM_SCSIController.go | 170 + .../root/cimv2/CIM_SCSIInterface.go | 110 + .../wmi/server2019/root/cimv2/CIM_Scanner.go | 48 + .../wmi/server2019/root/cimv2/CIM_Sensor.go | 48 + .../root/cimv2/CIM_SerialController.go | 142 + .../root/cimv2/CIM_SerialInterface.go | 140 + .../wmi/server2019/root/cimv2/CIM_Service.go | 226 + .../root/cimv2/CIM_ServiceAccessBySAP.go | 48 + .../root/cimv2/CIM_ServiceAccessPoint.go | 170 + .../root/cimv2/CIM_ServiceSAPDependency.go | 48 + .../cimv2/CIM_ServiceServiceDependency.go | 80 + .../wmi/server2019/root/cimv2/CIM_Setting.go | 141 + .../server2019/root/cimv2/CIM_SettingCheck.go | 200 + .../root/cimv2/CIM_SettingContext.go | 111 + .../wmi/server2019/root/cimv2/CIM_Slot.go | 352 + .../server2019/root/cimv2/CIM_SlotInSlot.go | 48 + .../root/cimv2/CIM_SoftwareElement.go | 380 ++ .../root/cimv2/CIM_SoftwareElementActions.go | 111 + .../root/cimv2/CIM_SoftwareElementChecks.go | 141 + .../cimv2/CIM_SoftwareElementVersionCheck.go | 200 + .../root/cimv2/CIM_SoftwareFeature.go | 170 + .../CIM_SoftwareFeatureSAPImplementation.go | 48 + ...IM_SoftwareFeatureServiceImplementation.go | 48 + .../CIM_SoftwareFeatureSoftwareElements.go | 48 + .../server2019/root/cimv2/CIM_SpareGroup.go | 48 + .../root/cimv2/CIM_StatisticalInformation.go | 141 + .../server2019/root/cimv2/CIM_Statistics.go | 111 + .../root/cimv2/CIM_StorageDefect.go | 111 + .../server2019/root/cimv2/CIM_StorageError.go | 231 + .../root/cimv2/CIM_StorageExtent.go | 200 + .../root/cimv2/CIM_StorageRedundancyGroup.go | 80 + .../root/cimv2/CIM_StorageVolume.go | 48 + .../root/cimv2/CIM_SupportAccess.go | 201 + .../root/cimv2/CIM_SwapSpaceCheck.go | 80 + .../wmi/server2019/root/cimv2/CIM_System.go | 201 + .../root/cimv2/CIM_SystemComponent.go | 48 + .../server2019/root/cimv2/CIM_SystemDevice.go | 48 + .../root/cimv2/CIM_SystemResource.go | 48 + .../server2019/root/cimv2/CIM_Tachometer.go | 48 + .../server2019/root/cimv2/CIM_TapeDrive.go | 140 + .../root/cimv2/CIM_TemperatureSensor.go | 48 + .../wmi/server2019/root/cimv2/CIM_Thread.go | 410 ++ .../root/cimv2/CIM_ToDirectoryAction.go | 111 + .../cimv2/CIM_ToDirectorySpecification.go | 111 + .../root/cimv2/CIM_USBController.go | 80 + .../root/cimv2/CIM_USBControllerHasHub.go | 48 + .../server2019/root/cimv2/CIM_USBDevice.go | 286 + .../wmi/server2019/root/cimv2/CIM_USBHub.go | 110 + .../cimv2/CIM_UninterruptiblePowerSupply.go | 170 + .../root/cimv2/CIM_UnitaryComputerSystem.go | 249 + .../server2019/root/cimv2/CIM_UserDevice.go | 80 + .../cimv2/CIM_VersionCompatibilityCheck.go | 140 + .../root/cimv2/CIM_VideoBIOSElement.go | 80 + .../root/cimv2/CIM_VideoBIOSFeature.go | 112 + .../CIM_VideoBIOSFeatureVideoBIOSElements.go | 48 + .../root/cimv2/CIM_VideoController.go | 532 ++ .../cimv2/CIM_VideoControllerResolution.go | 260 + .../server2019/root/cimv2/CIM_VideoSetting.go | 48 + .../root/cimv2/CIM_VolatileStorage.go | 110 + .../root/cimv2/CIM_VoltageSensor.go | 48 + .../server2019/root/cimv2/CIM_VolumeSet.go | 110 + .../server2019/root/cimv2/CIM_WORMDrive.go | 48 + .../root/cimv2/ClassCreationEvent.go | 48 + .../root/cimv2/ClassDeletionEvent.go | 48 + .../root/cimv2/ClassModificationEvent.go | 80 + .../root/cimv2/ClassOperationEvent.go | 80 + .../root/cimv2/ClassProviderRegistration.go | 263 + .../root/cimv2/ConsumerFailureEvent.go | 140 + .../root/cimv2/Error_CIMStatusCode.go | 75 + .../root/cimv2/Error_ErrorSourceFormat.go | 23 + .../server2019/root/cimv2/Error_ErrorType.go | 39 + .../root/cimv2/Error_PerceivedSeverity.go | 33 + .../root/cimv2/Error_ProbableCause.go | 279 + .../wmi/server2019/root/cimv2/Event.go | 111 + .../server2019/root/cimv2/EventConsumer.go | 141 + .../EventConsumerProviderRegistration.go | 81 + .../root/cimv2/EventDroppedEvent.go | 110 + .../wmi/server2019/root/cimv2/EventFilter.go | 231 + .../server2019/root/cimv2/EventGenerator.go | 48 + .../root/cimv2/EventProviderRegistration.go | 81 + .../root/cimv2/EventQueueOverflowEvent.go | 80 + .../server2019/root/cimv2/ExtendedStatus.go | 170 + .../server2019/root/cimv2/ExtrinsicEvent.go | 48 + .../root/cimv2/FilterToConsumerBinding.go | 261 + .../FolderRedirectionHealth_HealthStatus.go | 21 + .../FolderRedirectionHealth_LastSyncStatus.go | 23 + .../FolderRedirection_RedirectionType.go | 19 + .../root/cimv2/IndicationRelated.go | 48 + .../cimv2/Indication_PerceivedSeverity.go | 33 + .../root/cimv2/InstanceCreationEvent.go | 48 + .../root/cimv2/InstanceDeletionEvent.go | 48 + .../root/cimv2/InstanceModificationEvent.go | 80 + .../root/cimv2/InstanceOperationEvent.go | 80 + .../cimv2/InstanceProviderRegistration.go | 48 + .../root/cimv2/IntervalTimerInstruction.go | 80 + .../root/cimv2/MSFT_ExtendedStatus.go | 80 + .../root/cimv2/MSFT_NCProvAccessCheck.go | 141 + .../root/cimv2/MSFT_NCProvCancelQuery.go | 80 + .../root/cimv2/MSFT_NCProvClientConnected.go | 80 + .../server2019/root/cimv2/MSFT_NCProvEvent.go | 140 + .../root/cimv2/MSFT_NCProvNewQuery.go | 140 + .../root/cimv2/MSFT_NetBadAccount.go | 48 + .../root/cimv2/MSFT_NetBadServiceState.go | 110 + .../cimv2/MSFT_NetBootSystemDriversFailed.go | 80 + .../cimv2/MSFT_NetCallToFunctionFailed.go | 110 + .../cimv2/MSFT_NetCallToFunctionFailedII.go | 140 + .../cimv2/MSFT_NetCircularDependencyAuto.go | 48 + .../cimv2/MSFT_NetCircularDependencyDemand.go | 80 + .../root/cimv2/MSFT_NetConnectionTimeout.go | 110 + .../root/cimv2/MSFT_NetDependOnLaterGroup.go | 80 + .../cimv2/MSFT_NetDependOnLaterService.go | 80 + .../root/cimv2/MSFT_NetFirstLogonFailed.go | 80 + .../root/cimv2/MSFT_NetFirstLogonFailedII.go | 140 + .../root/cimv2/MSFT_NetReadfileTimeout.go | 80 + .../cimv2/MSFT_NetRevertedToLastKnownGood.go | 48 + .../MSFT_NetServiceConfigBackoutFailed.go | 110 + .../cimv2/MSFT_NetServiceControlSuccess.go | 140 + .../root/cimv2/MSFT_NetServiceCrash.go | 200 + .../cimv2/MSFT_NetServiceCrashNoAction.go | 110 + .../MSFT_NetServiceDifferentPIDConnected.go | 140 + .../root/cimv2/MSFT_NetServiceExitFailed.go | 110 + .../MSFT_NetServiceExitFailedSpecific.go | 110 + .../MSFT_NetServiceLogonTypeNotGranted.go | 140 + .../cimv2/MSFT_NetServiceNotInteractive.go | 80 + .../cimv2/MSFT_NetServiceRecoveryFailed.go | 170 + .../cimv2/MSFT_NetServiceShutdownFailed.go | 80 + .../root/cimv2/MSFT_NetServiceSlowStartup.go | 110 + .../root/cimv2/MSFT_NetServiceStartFailed.go | 110 + .../cimv2/MSFT_NetServiceStartFailedGroup.go | 110 + .../cimv2/MSFT_NetServiceStartFailedII.go | 140 + .../cimv2/MSFT_NetServiceStartFailedNone.go | 110 + .../root/cimv2/MSFT_NetServiceStartHung.go | 80 + .../cimv2/MSFT_NetServiceStartTypeChanged.go | 170 + .../cimv2/MSFT_NetServiceStatusSuccess.go | 110 + .../MSFT_NetServiceStopControlSuccess.go | 230 + .../root/cimv2/MSFT_NetSevereServiceFailed.go | 80 + .../root/cimv2/MSFT_NetTakeOwnership.go | 80 + .../root/cimv2/MSFT_NetTransactInvalid.go | 48 + .../root/cimv2/MSFT_NetTransactTimeout.go | 110 + .../root/cimv2/MSFT_PlatformIdentifier.go | 67 + .../server2019/root/cimv2/MSFT_SCMEvent.go | 48 + .../root/cimv2/MSFT_SCMEventLogEvent.go | 48 + .../root/cimv2/MSFT_WMI_GenericNonCOMEvent.go | 172 + .../cimv2/MSFT_WmiCancelNotificationSink.go | 170 + .../cimv2/MSFT_WmiConsumerProviderEvent.go | 80 + .../cimv2/MSFT_WmiConsumerProviderLoaded.go | 48 + .../MSFT_WmiConsumerProviderSinkLoaded.go | 80 + .../MSFT_WmiConsumerProviderSinkUnloaded.go | 80 + .../cimv2/MSFT_WmiConsumerProviderUnloaded.go | 48 + .../server2019/root/cimv2/MSFT_WmiError.go | 170 + .../server2019/root/cimv2/MSFT_WmiEssEvent.go | 48 + .../root/cimv2/MSFT_WmiFilterActivated.go | 48 + .../root/cimv2/MSFT_WmiFilterDeactivated.go | 48 + .../root/cimv2/MSFT_WmiFilterEvent.go | 170 + .../root/cimv2/MSFT_WmiProviderEvent.go | 110 + .../cimv2/MSFT_WmiRegisterNotificationSink.go | 170 + .../root/cimv2/MSFT_WmiSelfEvent.go | 48 + .../root/cimv2/MSFT_WmiThreadPoolEvent.go | 80 + .../cimv2/MSFT_WmiThreadPoolThreadCreated.go | 48 + .../cimv2/MSFT_WmiThreadPoolThreadDeleted.go | 48 + .../root/cimv2/MethodInvocationEvent.go | 140 + .../root/cimv2/MethodProviderRegistration.go | 48 + .../server2019/root/cimv2/Msft_Providers.go | 1073 +++ .../Msft_WmiProvider_AccessCheck_Post.go | 171 + .../cimv2/Msft_WmiProvider_AccessCheck_Pre.go | 141 + .../Msft_WmiProvider_CancelQuery_Post.go | 110 + .../cimv2/Msft_WmiProvider_CancelQuery_Pre.go | 80 + ...WmiProvider_ComServerLoadOperationEvent.go | 230 + ...ider_ComServerLoadOperationFailureEvent.go | 260 + .../root/cimv2/Msft_WmiProvider_Counters.go | 771 +++ ...Provider_CreateClassEnumAsyncEvent_Post.go | 200 + ...iProvider_CreateClassEnumAsyncEvent_Pre.go | 110 + ...vider_CreateInstanceEnumAsyncEvent_Post.go | 200 + ...ovider_CreateInstanceEnumAsyncEvent_Pre.go | 110 + ..._WmiProvider_DeleteClassAsyncEvent_Post.go | 200 + ...t_WmiProvider_DeleteClassAsyncEvent_Pre.go | 110 + ...iProvider_DeleteInstanceAsyncEvent_Post.go | 200 + ...miProvider_DeleteInstanceAsyncEvent_Pre.go | 110 + ...t_WmiProvider_ExecMethodAsyncEvent_Post.go | 260 + ...ft_WmiProvider_ExecMethodAsyncEvent_Pre.go | 170 + ...ft_WmiProvider_ExecQueryAsyncEvent_Post.go | 230 + ...sft_WmiProvider_ExecQueryAsyncEvent_Pre.go | 140 + ...ft_WmiProvider_GetObjectAsyncEvent_Post.go | 200 + ...sft_WmiProvider_GetObjectAsyncEvent_Pre.go | 110 + ...miProvider_InitializationOperationEvent.go | 48 + ...der_InitializationOperationFailureEvent.go | 80 + .../Msft_WmiProvider_LoadOperationEvent.go | 290 + ...t_WmiProvider_LoadOperationFailureEvent.go | 320 + .../cimv2/Msft_WmiProvider_NewQuery_Post.go | 170 + .../cimv2/Msft_WmiProvider_NewQuery_Pre.go | 140 + .../cimv2/Msft_WmiProvider_OperationEvent.go | 260 + .../Msft_WmiProvider_OperationEvent_Post.go | 48 + .../Msft_WmiProvider_OperationEvent_Pre.go | 48 + .../Msft_WmiProvider_ProvideEvents_Post.go | 110 + .../Msft_WmiProvider_ProvideEvents_Pre.go | 80 + ...sft_WmiProvider_PutClassAsyncEvent_Post.go | 200 + ...Msft_WmiProvider_PutClassAsyncEvent_Pre.go | 110 + ..._WmiProvider_PutInstanceAsyncEvent_Post.go | 200 + ...t_WmiProvider_PutInstanceAsyncEvent_Pre.go | 110 + .../Msft_WmiProvider_UnLoadOperationEvent.go | 48 + .../root/cimv2/NTEventlogProviderConfig.go | 81 + .../wmi/server2019/root/cimv2/NTLMUser9X.go | 200 + .../wmi/server2019/root/cimv2/Namespace.go | 80 + .../root/cimv2/NamespaceCreationEvent.go | 48 + .../root/cimv2/NamespaceDeletionEvent.go | 48 + .../root/cimv2/NamespaceModificationEvent.go | 80 + .../root/cimv2/NamespaceOperationEvent.go | 80 + .../wmi/server2019/root/cimv2/NotifyStatus.go | 81 + .../root/cimv2/ObjectProviderRegistration.go | 291 + ...ectProviderRegistration_InteractionType.go | 21 + .../wmi/server2019/root/cimv2/PARAMETERS.go | 49 + .../root/cimv2/PrinterConfiguration_Color.go | 19 + .../cimv2/PrinterConfiguration_DitherType.go | 25 + .../cimv2/PrinterConfiguration_ICMIntent.go | 21 + .../cimv2/PrinterConfiguration_ICMMethod.go | 23 + .../cimv2/PrinterConfiguration_MediaType.go | 21 + .../cimv2/PrinterConfiguration_Orientation.go | 19 + .../PrinterConfiguration_PrintQuality.go | 23 + .../cimv2/PrinterConfiguration_TTOption.go | 21 + .../root/cimv2/PrinterDriver_Version.go | 23 + .../Printer_ExtendedDetectedErrorState.go | 47 + .../cimv2/Printer_ExtendedPrinterStatus.go | 51 + .../root/cimv2/Printer_PrinterState.go | 65 + .../cimv2/PropertyProviderRegistration.go | 110 + .../wmi/server2019/root/cimv2/Provider.go | 80 + .../root/cimv2/ProviderRegistration.go | 80 + .../server2019/root/cimv2/QOSFailureEvent.go | 110 + .../server2019/root/cimv2/RegistryEvent.go | 48 + .../root/cimv2/RegistryKeyChangeEvent.go | 110 + .../root/cimv2/RegistryTreeChangeEvent.go | 110 + .../root/cimv2/RegistryValueChangeEvent.go | 140 + ...BackgroundUploadParams_SchedulingMethod.go | 19 + ...nfiguration_HealthStatusForTempProfiles.go | 21 + .../cimv2/ScriptingStandardConsumerSetting.go | 110 + .../root/cimv2/SecurityDescriptor.go | 232 + .../root/cimv2/SecurityRelatedClass.go | 49 + .../root/cimv2/SoftwareLicensingProduct.go | 2134 ++++++ .../root/cimv2/SoftwareLicensingService.go | 1576 +++++ ...SoftwareLicensingTokenActivationLicense.go | 274 + .../wmi/server2019/root/cimv2/StdRegProv.go | 463 ++ .../wmi/server2019/root/cimv2/SystemClass.go | 49 + .../wmi/server2019/root/cimv2/SystemEvent.go | 48 + .../server2019/root/cimv2/SystemSecurity.go | 154 + .../root/cimv2/TCPIPPrinterPort_Protocol.go | 19 + .../wmi/server2019/root/cimv2/TimerEvent.go | 110 + .../server2019/root/cimv2/TimerInstruction.go | 110 + .../server2019/root/cimv2/TimerNextFiring.go | 110 + .../wmi/server2019/root/cimv2/Trustee.go | 231 + .../root/cimv2/UserProfile_HealthStatus.go | 23 + ...ConfigurationControls_FolderRedirection.go | 19 + ...StateConfigurationControls_OfflineFiles.go | 19 + ...onfigurationControls_RoamingUserProfile.go | 19 + .../server2019/root/cimv2/Win32Provider.go | 740 ++ .../cimv2/Win32Provider_ImpersonationLevel.go | 17 + .../Win32Provider_InitializationReentrancy.go | 21 + .../root/cimv2/Win32_1394Controller.go | 80 + .../root/cimv2/Win32_1394ControllerDevice.go | 48 + .../wmi/server2019/root/cimv2/Win32_ACE.go | 48 + .../server2019/root/cimv2/Win32_Account.go | 170 + .../server2019/root/cimv2/Win32_AccountSID.go | 111 + .../root/cimv2/Win32_ActionCheck.go | 111 + .../root/cimv2/Win32_ActiveRoute.go | 48 + .../root/cimv2/Win32_AllocatedResource.go | 48 + .../cimv2/Win32_ApplicationCommandLine.go | 48 + .../root/cimv2/Win32_ApplicationService.go | 48 + .../cimv2/Win32_AssociatedProcessorMemory.go | 48 + .../root/cimv2/Win32_AutochkSetting.go | 80 + .../wmi/server2019/root/cimv2/Win32_BIOS.go | 473 ++ .../server2019/root/cimv2/Win32_BaseBoard.go | 111 + .../root/cimv2/Win32_BaseService.go | 564 ++ .../server2019/root/cimv2/Win32_Battery.go | 110 + .../wmi/server2019/root/cimv2/Win32_Binary.go | 140 + .../root/cimv2/Win32_BindImageAction.go | 110 + .../root/cimv2/Win32_BootConfiguration.go | 230 + .../wmi/server2019/root/cimv2/Win32_Bus.go | 110 + .../server2019/root/cimv2/Win32_CDROMDrive.go | 650 ++ .../Win32_CIMLogicalDeviceCIMDataFile.go | 110 + .../root/cimv2/Win32_COMApplication.go | 48 + .../root/cimv2/Win32_COMApplicationClasses.go | 48 + .../cimv2/Win32_COMApplicationSettings.go | 48 + .../server2019/root/cimv2/Win32_COMClass.go | 48 + .../server2019/root/cimv2/Win32_COMSetting.go | 48 + .../root/cimv2/Win32_CacheMemory.go | 262 + .../server2019/root/cimv2/Win32_CheckCheck.go | 111 + .../root/cimv2/Win32_ClassInfoAction.go | 350 + .../Win32_ClassicCOMApplicationClasses.go | 48 + .../root/cimv2/Win32_ClassicCOMClass.go | 80 + .../cimv2/Win32_ClassicCOMClassSetting.go | 740 ++ .../cimv2/Win32_ClassicCOMClassSettings.go | 48 + .../cimv2/Win32_ClientApplicationSetting.go | 111 + .../root/cimv2/Win32_ClusterShare.go | 80 + .../server2019/root/cimv2/Win32_CodecFile.go | 80 + .../root/cimv2/Win32_CollectionStatistics.go | 111 + .../root/cimv2/Win32_ComClassAutoEmulator.go | 111 + .../root/cimv2/Win32_ComClassEmulator.go | 111 + .../root/cimv2/Win32_CommandLineAccess.go | 80 + .../root/cimv2/Win32_ComponentCategory.go | 80 + .../root/cimv2/Win32_ComputerShutdownEvent.go | 80 + .../root/cimv2/Win32_ComputerSystem.go | 1556 +++++ .../root/cimv2/Win32_ComputerSystemEvent.go | 80 + .../cimv2/Win32_ComputerSystemProcessor.go | 48 + .../root/cimv2/Win32_ComputerSystemProduct.go | 80 + .../server2019/root/cimv2/Win32_Condition.go | 140 + .../root/cimv2/Win32_ConnectionShare.go | 48 + .../root/cimv2/Win32_ControllerHasHub.go | 48 + .../root/cimv2/Win32_CreateFolderAction.go | 48 + .../root/cimv2/Win32_CurrentProbe.go | 48 + .../root/cimv2/Win32_CurrentTime.go | 351 + .../root/cimv2/Win32_DCOMApplication.go | 80 + ...n32_DCOMApplicationAccessAllowedSetting.go | 111 + ...n32_DCOMApplicationLaunchAllowedSetting.go | 111 + .../cimv2/Win32_DCOMApplicationSetting.go | 410 ++ .../server2019/root/cimv2/Win32_DMAChannel.go | 80 + .../root/cimv2/Win32_DefragAnalysis.go | 861 +++ .../root/cimv2/Win32_DependentService.go | 48 + .../server2019/root/cimv2/Win32_Desktop.go | 590 ++ .../root/cimv2/Win32_DesktopMonitor.go | 170 + .../server2019/root/cimv2/Win32_DeviceBus.go | 48 + .../root/cimv2/Win32_DeviceChangeEvent.go | 80 + .../root/cimv2/Win32_DeviceMemoryAddress.go | 80 + .../root/cimv2/Win32_DeviceSettings.go | 48 + .../server2019/root/cimv2/Win32_DfsNode.go | 161 + .../root/cimv2/Win32_DfsNodeTarget.go | 48 + .../server2019/root/cimv2/Win32_DfsTarget.go | 170 + .../server2019/root/cimv2/Win32_Directory.go | 48 + .../cimv2/Win32_DirectorySpecification.go | 110 + .../server2019/root/cimv2/Win32_DiskDrive.go | 710 ++ .../cimv2/Win32_DiskDrivePhysicalMedia.go | 48 + .../cimv2/Win32_DiskDriveToDiskPartition.go | 48 + .../root/cimv2/Win32_DiskPartition.go | 290 + .../server2019/root/cimv2/Win32_DiskQuota.go | 231 + .../root/cimv2/Win32_DisplayConfiguration.go | 410 ++ .../Win32_DisplayControllerConfiguration.go | 380 ++ .../root/cimv2/Win32_DriverForDevice.go | 48 + .../root/cimv2/Win32_DuplicateFileAction.go | 80 + .../root/cimv2/Win32_Environment.go | 140 + .../cimv2/Win32_EnvironmentSpecification.go | 110 + .../root/cimv2/Win32_ExtensionInfoAction.go | 290 + .../wmi/server2019/root/cimv2/Win32_Fan.go | 48 + .../root/cimv2/Win32_FileSpecification.go | 170 + .../root/cimv2/Win32_FolderRedirection.go | 291 + .../cimv2/Win32_FolderRedirectionHealth.go | 261 + ...32_FolderRedirectionHealthConfiguration.go | 111 + ...in32_FolderRedirectionUserConfiguration.go | 501 ++ .../root/cimv2/Win32_FontInfoAction.go | 110 + .../wmi/server2019/root/cimv2/Win32_Group.go | 63 + .../root/cimv2/Win32_GroupInDomain.go | 48 + .../server2019/root/cimv2/Win32_GroupUser.go | 48 + .../server2019/root/cimv2/Win32_HeatPipe.go | 48 + .../root/cimv2/Win32_IDEController.go | 80 + .../root/cimv2/Win32_IDEControllerDevice.go | 48 + .../cimv2/Win32_IP4PersistedRouteTable.go | 170 + .../root/cimv2/Win32_IP4RouteTable.go | 440 ++ .../root/cimv2/Win32_IP4RouteTableEvent.go | 48 + .../root/cimv2/Win32_IRQResource.go | 110 + .../root/cimv2/Win32_ImplementedCategory.go | 111 + .../root/cimv2/Win32_InfraredDevice.go | 80 + .../root/cimv2/Win32_IniFileSpecification.go | 200 + .../cimv2/Win32_InstalledProgramFramework.go | 231 + .../cimv2/Win32_InstalledSoftwareElement.go | 48 + .../root/cimv2/Win32_InstalledStoreProgram.go | 231 + .../root/cimv2/Win32_InstalledWin32Program.go | 261 + .../root/cimv2/Win32_JobObjectStatus.go | 110 + .../server2019/root/cimv2/Win32_Keyboard.go | 48 + .../wmi/server2019/root/cimv2/Win32_LUID.go | 111 + .../root/cimv2/Win32_LUIDandAttributes.go | 111 + .../root/cimv2/Win32_LaunchCondition.go | 80 + .../root/cimv2/Win32_LoadOrderGroup.go | 110 + ...Win32_LoadOrderGroupServiceDependencies.go | 48 + .../Win32_LoadOrderGroupServiceMembers.go | 48 + .../server2019/root/cimv2/Win32_LocalTime.go | 48 + .../root/cimv2/Win32_LoggedOnUser.go | 48 + .../root/cimv2/Win32_LogicalDisk.go | 525 ++ .../cimv2/Win32_LogicalDiskRootDirectory.go | 48 + .../cimv2/Win32_LogicalDiskToPartition.go | 48 + .../root/cimv2/Win32_LogicalFileAccess.go | 48 + .../root/cimv2/Win32_LogicalFileAuditing.go | 48 + .../root/cimv2/Win32_LogicalFileGroup.go | 48 + .../root/cimv2/Win32_LogicalFileOwner.go | 48 + .../cimv2/Win32_LogicalFileSecuritySetting.go | 110 + .../root/cimv2/Win32_LogicalProgramGroup.go | 110 + .../Win32_LogicalProgramGroupDirectory.go | 48 + .../cimv2/Win32_LogicalProgramGroupItem.go | 48 + .../Win32_LogicalProgramGroupItemDataFile.go | 48 + .../root/cimv2/Win32_LogicalShareAccess.go | 48 + .../root/cimv2/Win32_LogicalShareAuditing.go | 48 + .../Win32_LogicalShareSecuritySetting.go | 80 + .../root/cimv2/Win32_LogonSession.go | 140 + .../cimv2/Win32_LogonSessionMappedDisk.go | 48 + .../root/cimv2/Win32_MIMEInfoAction.go | 140 + .../root/cimv2/Win32_MSIResource.go | 48 + .../Win32_ManagedSystemElementResource.go | 49 + .../root/cimv2/Win32_MappedLogicalDisk.go | 410 ++ .../root/cimv2/Win32_MemoryArray.go | 80 + .../root/cimv2/Win32_MemoryArrayLocation.go | 48 + .../root/cimv2/Win32_MemoryDevice.go | 80 + .../root/cimv2/Win32_MemoryDeviceArray.go | 48 + .../root/cimv2/Win32_MemoryDeviceLocation.go | 48 + .../root/cimv2/Win32_MethodParameterClass.go | 49 + .../root/cimv2/Win32_ModuleLoadTrace.go | 260 + .../root/cimv2/Win32_ModuleTrace.go | 48 + .../root/cimv2/Win32_MotherboardDevice.go | 140 + .../server2019/root/cimv2/Win32_MountPoint.go | 111 + .../root/cimv2/Win32_MoveFileAction.go | 230 + .../server2019/root/cimv2/Win32_NTDomain.go | 560 ++ .../root/cimv2/Win32_NTEventlogFile.go | 261 + .../server2019/root/cimv2/Win32_NTLogEvent.go | 533 ++ .../root/cimv2/Win32_NTLogEventComputer.go | 111 + .../root/cimv2/Win32_NTLogEventLog.go | 111 + .../root/cimv2/Win32_NTLogEventUser.go | 111 + .../root/cimv2/Win32_NamedJobObject.go | 80 + .../cimv2/Win32_NamedJobObjectActgInfo.go | 530 ++ .../root/cimv2/Win32_NamedJobObjectLimit.go | 48 + .../cimv2/Win32_NamedJobObjectLimitSetting.go | 380 ++ .../root/cimv2/Win32_NamedJobObjectProcess.go | 48 + .../cimv2/Win32_NamedJobObjectSecLimit.go | 48 + .../Win32_NamedJobObjectSecLimitSetting.go | 170 + .../cimv2/Win32_NamedJobObjectStatistics.go | 48 + .../root/cimv2/Win32_NetworkAdapter.go | 556 ++ .../Win32_NetworkAdapterConfiguration.go | 2430 +++++++ .../root/cimv2/Win32_NetworkAdapterSetting.go | 48 + .../root/cimv2/Win32_NetworkClient.go | 80 + .../root/cimv2/Win32_NetworkConnection.go | 410 ++ .../root/cimv2/Win32_NetworkLoginProfile.go | 920 +++ .../root/cimv2/Win32_NetworkProtocol.go | 590 ++ .../root/cimv2/Win32_ODBCAttribute.go | 140 + .../cimv2/Win32_ODBCDataSourceAttribute.go | 48 + .../Win32_ODBCDataSourceSpecification.go | 140 + .../root/cimv2/Win32_ODBCDriverAttribute.go | 48 + .../cimv2/Win32_ODBCDriverSoftwareElement.go | 48 + .../cimv2/Win32_ODBCDriverSpecification.go | 140 + .../root/cimv2/Win32_ODBCSourceAttribute.go | 140 + .../Win32_ODBCTranslatorSpecification.go | 140 + .../cimv2/Win32_OSRecoveryConfiguration.go | 410 ++ .../Win32_OfflineFilesAssociatedItems.go | 111 + .../cimv2/Win32_OfflineFilesBackgroundSync.go | 231 + .../root/cimv2/Win32_OfflineFilesCache.go | 342 + .../cimv2/Win32_OfflineFilesChangeInfo.go | 231 + .../cimv2/Win32_OfflineFilesConnectionInfo.go | 111 + .../root/cimv2/Win32_OfflineFilesDirtyInfo.go | 111 + .../cimv2/Win32_OfflineFilesDiskSpaceLimit.go | 111 + .../cimv2/Win32_OfflineFilesFileSysInfo.go | 591 ++ .../root/cimv2/Win32_OfflineFilesHealth.go | 201 + .../root/cimv2/Win32_OfflineFilesItem.go | 411 ++ .../Win32_OfflineFilesMachineConfiguration.go | 503 ++ .../root/cimv2/Win32_OfflineFilesPinInfo.go | 201 + .../cimv2/Win32_OfflineFilesSuspendInfo.go | 111 + .../Win32_OfflineFilesUserConfiguration.go | 172 + .../root/cimv2/Win32_OnBoardDevice.go | 110 + .../root/cimv2/Win32_OperatingSystem.go | 1214 ++++ .../Win32_OperatingSystemAutochkSetting.go | 48 + .../root/cimv2/Win32_OperatingSystemQFE.go | 48 + .../root/cimv2/Win32_OptionalFeature.go | 80 + .../root/cimv2/Win32_PCMCIAController.go | 48 + .../root/cimv2/Win32_PNPAllocatedResource.go | 48 + .../server2019/root/cimv2/Win32_POTSModem.go | 1373 ++++ .../root/cimv2/Win32_POTSModemToSerialPort.go | 48 + .../server2019/root/cimv2/Win32_PageFile.go | 140 + .../cimv2/Win32_PageFileElementSetting.go | 48 + .../root/cimv2/Win32_PageFileSetting.go | 140 + .../root/cimv2/Win32_PageFileUsage.go | 170 + .../root/cimv2/Win32_ParallelPort.go | 80 + .../wmi/server2019/root/cimv2/Win32_Patch.go | 200 + .../server2019/root/cimv2/Win32_PatchFile.go | 48 + .../root/cimv2/Win32_PatchPackage.go | 110 + .../wmi/server2019/root/cimv2/Win32_Perf.go | 230 + .../root/cimv2/Win32_PerfFormattedData.go | 48 + ...tedData_AFDCounters_MicrosoftWinsockBSP.go | 170 + ...anager_AuthorizationManagerApplications.go | 110 + ...lancerStats_HyperVDynamicMemoryBalancer.go | 170 + ...ata_BalancerStats_HyperVDynamicMemoryVM.go | 380 ++ ...tPerfProvider_ClusterStorageCacheStores.go | 1520 +++++ ...erfProvider_ClusterStorageDiskScheduler.go | 1140 ++++ ...tPerfProvider_ClusterStorageHybridDisks.go | 1910 ++++++ ...PerfProvider_ClusterStorageHybridDisks2.go | 279 + ...ider_ClusterStorageHybridDisksIOProfile.go | 1970 ++++++ ...lusportPerfProvider_ClusterDiskCounters.go | 1550 +++++ ...ata_ClussvcPerfProvider_ClusterAPICalls.go | 320 + ...a_ClussvcPerfProvider_ClusterAPIHandles.go | 590 ++ ...vcPerfProvider_ClusterCheckpointManager.go | 290 + ...ata_ClussvcPerfProvider_ClusterDatabase.go | 110 + ...ider_ClusterGlobalUpdateManagerMessages.go | 380 ++ ...ider_ClusterGoodEnoughMulticastMessages.go | 110 + ...der_ClusterGoodEnoughMulticastMessages2.go | 80 + ...ClusterMulticastRequestResponseMessages.go | 140 + ...ssvcPerfProvider_ClusterNetworkMessages.go | 290 + ...erfProvider_ClusterNetworkReconnections.go | 260 + ...fProvider_ClusterResourceControlManager.go | 140 + ...ta_ClussvcPerfProvider_ClusterResources.go | 290 + ...unters_AppVClientStreamedDataPercentage.go | 80 + ...fFormattedData_Counters_BluetoothDevice.go | 230 + ...rfFormattedData_Counters_BluetoothRadio.go | 710 ++ ..._PerfFormattedData_Counters_DNS64Global.go | 230 + ...n32_PerfFormattedData_Counters_EventLog.go | 174 + ...tedData_Counters_EventTracingforWindows.go | 230 + ..._Counters_EventTracingforWindowsSession.go | 200 + ...tedData_Counters_FileSystemDiskActivity.go | 110 + ...ata_Counters_GenericIKEv1AuthIPandIKEv2.go | 440 ++ ..._PerfFormattedData_Counters_HTTPService.go | 230 + ...dData_Counters_HTTPServiceRequestQueues.go | 230 + ...attedData_Counters_HTTPServiceUrlGroups.go | 320 + ...s_HyperVDynamicMemoryIntegrationService.go | 80 + ...edData_Counters_HyperVVirtualMachineBus.go | 140 + ...a_Counters_HyperVVirtualMachineBusPipes.go | 170 + ...rs_HyperVVirtualMachineBusProviderPipes.go | 170 + ...ata_Counters_HyperVVirtualStorageDevice.go | 680 ++ ...erfFormattedData_Counters_IPHTTPSGlobal.go | 350 + ...rfFormattedData_Counters_IPHTTPSSession.go | 260 + ...fFormattedData_Counters_IPsecAuthIPIPv4.go | 920 +++ ...fFormattedData_Counters_IPsecAuthIPIPv6.go | 920 +++ ...FormattedData_Counters_IPsecConnections.go | 230 + ...rmattedData_Counters_IPsecDoSProtection.go | 1130 +++ ..._PerfFormattedData_Counters_IPsecDriver.go | 980 +++ ...rfFormattedData_Counters_IPsecIKEv1IPv4.go | 590 ++ ...rfFormattedData_Counters_IPsecIKEv1IPv6.go | 590 ++ ...rfFormattedData_Counters_IPsecIKEv2IPv4.go | 590 ++ ...rfFormattedData_Counters_IPsecIKEv2IPv6.go | 590 ++ ...Win32_PerfFormattedData_Counters_KPSSVC.go | 170 + ...n32_PerfFormattedData_Counters_Netlogon.go | 230 + ...FormattedData_Counters_NetworkQoSPolicy.go | 230 + ...32_PerfFormattedData_Counters_PacerFlow.go | 650 ++ ...32_PerfFormattedData_Counters_PacerPipe.go | 560 ++ ...Data_Counters_PacketDirectECUtilization.go | 380 ++ ...tedData_Counters_PacketDirectQueueDepth.go | 110 + ...ta_Counters_PacketDirectReceiveCounters.go | 230 + ...ata_Counters_PacketDirectReceiveFilters.go | 170 + ...a_Counters_PacketDirectTransmitCounters.go | 170 + ...nters_PerProcessorNetworkActivityCycles.go | 440 ++ ...erProcessorNetworkInterfaceCardActivity.go | 680 ++ ...rs_PhysicalNetworkInterfaceCardActivity.go | 170 + ...rmattedData_Counters_PowerShellWorkflow.go | 920 +++ ...attedData_Counters_ProcessorInformation.go | 890 +++ ...PerfFormattedData_Counters_RDMAActivity.go | 350 + .../Win32_PerfFormattedData_Counters_ReFS.go | 1190 ++++ ...FormattedData_Counters_RemoteFXGraphics.go | 320 + ...fFormattedData_Counters_RemoteFXNetwork.go | 740 ++ ...fFormattedData_Counters_SMBClientShares.go | 770 +++ ...mattedData_Counters_SMBDirectConnection.go | 500 ++ ...32_PerfFormattedData_Counters_SMBServer.go | 230 + ...ormattedData_Counters_SMBServerSessions.go | 1130 +++ ...fFormattedData_Counters_SMBServerShares.go | 1400 ++++ ...a_Counters_SecurityPerProcessStatistics.go | 90 + ...a_Counters_SecuritySystemWideStatistics.go | 468 ++ ...attedData_Counters_StorageQoSFilterFlow.go | 350 + ...tedData_Counters_StorageQoSFilterVolume.go | 590 ++ ...FormattedData_Counters_StorageSpacesDrt.go | 530 ++ ...ormattedData_Counters_StorageSpacesTier.go | 530 ++ ...dData_Counters_StorageSpacesVirtualDisk.go | 1670 +++++ ...edData_Counters_StorageSpacesWriteCache.go | 920 +++ ...fFormattedData_Counters_Synchronization.go | 1310 ++++ ...mattedData_Counters_SynchronizationNuma.go | 1310 ++++ ...PerfFormattedData_Counters_TeredoClient.go | 380 ++ ..._PerfFormattedData_Counters_TeredoRelay.go | 710 ++ ...PerfFormattedData_Counters_TeredoServer.go | 470 ++ ...tedData_Counters_ThermalZoneInformation.go | 170 + ...ers_VFPPortAverageInboundNetworkTraffic.go | 860 +++ ...rs_VFPPortAverageOutboundNetworkTraffic.go | 860 +++ ...FPPortTotalInboundDroppedNetworkPackets.go | 740 ++ ...nters_VFPPortTotalInboundNetworkTraffic.go | 860 +++ ...PPortTotalOutboundDroppedNetworkPackets.go | 740 ++ ...ters_VFPPortTotalOutboundNetworkTraffic.go | 860 +++ ...VFPQoSQueueAverageInboundNetworkTraffic.go | 410 ++ ...FPQoSQueueAverageOutboundNetworkTraffic.go | 410 ++ ...s_VFPQoSQueueTotalInboundNetworkTraffic.go | 110 + ..._VFPQoSQueueTotalOutboundNetworkTraffic.go | 110 + .../Win32_PerfFormattedData_Counters_WFP.go | 80 + ..._PerfFormattedData_Counters_WFPClassify.go | 3170 +++++++++ ...rmattedData_Counters_WFPReauthorization.go | 830 +++ .../Win32_PerfFormattedData_Counters_WFPv4.go | 440 ++ .../Win32_PerfFormattedData_Counters_WFPv6.go | 440 ++ ...attedData_Counters_WSManQuotaStatistics.go | 260 + ...FormattedData_Counters_XHCICommonBuffer.go | 170 + ...fFormattedData_Counters_XHCIInterrupter.go | 200 + ...FormattedData_Counters_XHCITransferRing.go | 260 + ...ilterPerfProvider_ClusterCSVCoordinator.go | 410 ++ ...ttedData_CsvFsPerfProvider_ClusterCSVFS.go | 890 +++ ...svFsPerfProvider_ClusterCSVFSBlockCache.go | 680 ++ ..._CsvFsPerfProvider_ClusterCSVFSDirectIO.go | 770 +++ ...FsPerfProvider_ClusterCSVFSRedirectedIO.go | 620 ++ ..._CsvFsPerfProvider_ClusterCSVFileSystem.go | 1790 +++++ ...PerfProvider_ClusterCSVBlockRedirection.go | 290 + ...olumePerfProvider_ClusterCSVVolumeCache.go | 680 ++ ...umePerfProvider_ClusterCSVVolumeManager.go | 590 ++ ...erfFormattedData_DdmCounterProvider_RAS.go | 200 + .../Win32_PerfFormattedData_ESENT_Database.go | 1700 +++++ ...rfFormattedData_ESENT_DatabaseDatabases.go | 260 + ...rfFormattedData_ESENT_DatabaseInstances.go | 1610 +++++ ...ormattedData_ESENT_DatabaseTableClasses.go | 290 + ...PerfProvider_HyperVLegacyNetworkAdapter.go | 230 + ...GPUPerformanceCounters_GPUAdapterMemory.go | 140 + ...edData_GPUPerformanceCounters_GPUEngine.go | 110 + ...rformanceCounters_GPULocalAdapterMemory.go | 80 + ...rmanceCounters_GPUNonLocalAdapterMemory.go | 80 + ...GPUPerformanceCounters_GPUProcessMemory.go | 200 + ...Provider_HyperVVMSaveSnapshotandRestore.go | 230 + ...fFormattedData_HvStats_HyperVHypervisor.go | 290 + ...vStats_HyperVHypervisorLogicalProcessor.go | 860 +++ ...dData_HvStats_HyperVHypervisorPartition.go | 890 +++ ...a_HvStats_HyperVHypervisorRootPartition.go | 890 +++ ...ts_HyperVHypervisorRootVirtualProcessor.go | 4520 ++++++++++++ ...vStats_HyperVHypervisorVirtualProcessor.go | 4520 ++++++++++++ ...Data_HyperVReplicaStats_HyperVReplicaVM.go | 320 + ..._HyperVStorageStats_HyperVConfiguration.go | 1010 +++ ...ider_HyperVVirtualIDEControllerEmulated.go | 170 + ...mattedData_LSM_UserInputDelayperProcess.go | 80 + ...mattedData_LSM_UserInputDelayperSession.go | 80 + ...ta_LmPerfProvider_HyperVVMLiveMigration.go | 1040 +++ ...ta_LocalSessionManager_TerminalServices.go | 140 + ...edData_Lsa_SecurityPerProcessStatistics.go | 110 + ...edData_Lsa_SecuritySystemWideStatistics.go | 650 ++ ...tedData_MSDTCBridge4000_MSDTCBridge4000.go | 320 + ...MSDTC_DistributedTransactionCoordinator.go | 440 ++ ...FXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go | 230 + ...sc_RemoteFXSynth3DVSCVMTransportChannel.go | 410 ++ ...ftWindowsW32TimePerf_WindowsTimeService.go | 260 + ...DeviceProvider_MellanoxWinOFBusCounters.go | 1520 +++++ ...vider_MellanoxAdapterDiagnosticCounters.go | 1130 +++ ...4EthProvider_MellanoxAdapterQoSCounters.go | 950 +++ ...4EthProvider_MellanoxAdapterRssCounters.go | 890 +++ ...Provider_MellanoxAdapterTrafficCounters.go | 650 ++ ...der_MellanoxIBAdapterDiagnosticCounters.go | 740 ++ ...ovider_MellanoxIBAdapterTrafficCounters.go | 650 ++ ...ider_HyperVVMWorkerProcessMemoryManager.go | 69 + ...PerfFormattedData_NETCLRData_NETCLRData.go | 230 + ...TCLRNetworking4000_NETCLRNetworking4000.go | 380 ++ ...dData_NETCLRNetworking_NETCLRNetworking.go | 200 + ...viderforOracle_NETDataProviderforOracle.go | 470 ++ ...orSqlServer_NETDataProviderforSqlServer.go | 470 ++ ...attedData_NETFramework_NETCLRExceptions.go | 200 + ...ormattedData_NETFramework_NETCLRInterop.go | 200 + ...erfFormattedData_NETFramework_NETCLRJit.go | 230 + ...ormattedData_NETFramework_NETCLRLoading.go | 530 ++ ...Data_NETFramework_NETCLRLocksAndThreads.go | 350 + ...FormattedData_NETFramework_NETCLRMemory.go | 740 ++ ...rmattedData_NETFramework_NETCLRRemoting.go | 260 + ...rmattedData_NETFramework_NETCLRSecurity.go | 200 + ...dData_NETMemoryCache40_NETMemoryCache40.go | 230 + ...etFtPerfProvider_ClusterNetFtHeartbeats.go | 110 + ...erfProvider_ClusterNetftMiniportAdapter.go | 174 + ...rovider_ClusterNetftRouteMonitorAdapter.go | 258 + ...tPerfProvider_ClusterNetftTunnelAdapter.go | 174 + ...FtPerfProvider_ClusterNetftWskInterface.go | 174 + ..._HyperVVirtualNetworkAdapterDropReasons.go | 2390 +++++++ ...vspNicStats_HyperVVirtualNetworkAdapter.go | 1460 ++++ ...SSStats_HyperVVirtualNetworkAdapterVRSS.go | 530 ++ ...a_NvspPortStats_HyperVVirtualSwitchPort.go | 680 ++ ...hProcStats_HyperVVirtualSwitchProcessor.go | 170 + ...ata_NvspSwitchStats_HyperVVirtualSwitch.go | 1250 ++++ ...ttedData_OfflineFiles_ClientSideCaching.go | 440 ++ ...FormattedData_OfflineFiles_OfflineFiles.go | 170 + ..._PerfFormattedData_PerfDisk_LogicalDisk.go | 740 ++ ...PerfFormattedData_PerfDisk_PhysicalDisk.go | 680 ++ ...Win32_PerfFormattedData_PerfNet_Browser.go | 650 ++ ...32_PerfFormattedData_PerfNet_Redirector.go | 1160 ++++ .../Win32_PerfFormattedData_PerfNet_Server.go | 1280 ++++ ...fFormattedData_PerfNet_ServerWorkQueues.go | 560 ++ .../Win32_PerfFormattedData_PerfOS_Cache.go | 920 +++ .../Win32_PerfFormattedData_PerfOS_Memory.go | 1130 +++ ...PerfFormattedData_PerfOS_NUMANodeMemory.go | 110 + .../Win32_PerfFormattedData_PerfOS_Objects.go | 230 + ...n32_PerfFormattedData_PerfOS_PagingFile.go | 110 + ...in32_PerfFormattedData_PerfOS_Processor.go | 500 ++ .../Win32_PerfFormattedData_PerfOS_System.go | 560 ++ ...32_PerfFormattedData_PerfProc_JobObject.go | 440 ++ ...FormattedData_PerfProc_JobObjectDetails.go | 860 +++ ...in32_PerfFormattedData_PerfProc_Process.go | 890 +++ ...Win32_PerfFormattedData_PerfProc_Thread.go | 410 ++ ...attedData_PowerMeterCounter_EnergyMeter.go | 140 + ...mattedData_PowerMeterCounter_PowerMeter.go | 110 + ..._PerfFormattedData_RemoteAccess_RASPort.go | 560 ++ ...PerfFormattedData_RemoteAccess_RASTotal.go | 590 ++ ...topConnectionBrokerRedirectorCounterset.go | 170 + ...ata_RemotePerfProvider_HyperVVMRemoting.go | 110 + ...tedData_ResumeKeyFilter_ResumeKeyFilter.go | 290 + ...rmattedData_SMSvcHost4000_SMSvcHost4000.go | 470 ++ ...rviceModel4000_ServiceModelEndpoint4000.go | 590 ++ ...viceModel4000_ServiceModelOperation4000.go | 470 ++ ...erviceModel4000_ServiceModelService4000.go | 1100 +++ ...32_PerfFormattedData_Spooler_PrintQueue.go | 440 ++ ...a_SvhdxFltPerfProvider_HyperVSharedVHDX.go | 770 +++ ...oPerfProvider_RemoteFXRootGPUManagement.go | 140 + ...PIPCounters_TCPIPPerformanceDiagnostics.go | 860 +++ ...nters_TCPIPPerformanceDiagnosticsPerCPU.go | 80 + .../Win32_PerfFormattedData_Tcpip_ICMP.go | 860 +++ .../Win32_PerfFormattedData_Tcpip_ICMPv6.go | 1040 +++ .../Win32_PerfFormattedData_Tcpip_IPv4.go | 560 ++ .../Win32_PerfFormattedData_Tcpip_IPv6.go | 560 ++ ...2_PerfFormattedData_Tcpip_NBTConnection.go | 140 + ..._PerfFormattedData_Tcpip_NetworkAdapter.go | 710 ++ ...erfFormattedData_Tcpip_NetworkInterface.go | 710 ++ .../Win32_PerfFormattedData_Tcpip_TCPv4.go | 320 + .../Win32_PerfFormattedData_Tcpip_TCPv6.go | 320 + .../Win32_PerfFormattedData_Tcpip_UDPv4.go | 200 + .../Win32_PerfFormattedData_Tcpip_UDPv6.go | 200 + ...ata_TermService_TerminalServicesSession.go | 500 ++ ...erfProvider_HyperVVMVirtualDevicePipeIO.go | 200 + ...dData_VSmbPerfProvider_HyperVVirtualSMB.go | 590 ++ ...dData_VidPerfProvider_HyperVVMVidDriver.go | 69 + ...ata_VidPerfProvider_HyperVVMVidNumaNode.go | 110 + ...ta_VidPerfProvider_HyperVVMVidPartition.go | 140 + ...Stats_HyperVVirtualMachineHealthSummary.go | 110 + ...PerfFormattedData_WinNatCounters_WinNAT.go | 470 ++ ...FormattedData_WinNatCounters_WinNATICMP.go | 230 + ...attedData_WinNatCounters_WinNATInstance.go | 170 + ...fFormattedData_WinNatCounters_WinNATTCP.go | 230 + ...fFormattedData_WinNatCounters_WinNATUDP.go | 230 + ...sMediaPlayer_WindowsMediaPlayerMetadata.go | 560 ++ ...flowFoundation4000_WFSystemWorkflow4000.go | 680 ++ ...dData_WnvCounters_NetworkVirtualization.go | 650 ++ ...VpProvider_HyperVWorkerVirtualProcessor.go | 110 + ...ServiceHost4000_WorkflowServiceHost4000.go | 680 ++ ...n32_PerfFormattedData_tapisrv_Telephony.go | 320 + .../Win32_PerfFormattedData_usbhub_USB.go | 560 ++ .../root/cimv2/Win32_PerfRawData.go | 48 + ...RawData_AFDCounters_MicrosoftWinsockBSP.go | 170 + ...anager_AuthorizationManagerApplications.go | 110 + ...lancerStats_HyperVDynamicMemoryBalancer.go | 170 + ...ata_BalancerStats_HyperVDynamicMemoryVM.go | 380 ++ ...tPerfProvider_ClusterStorageCacheStores.go | 1670 +++++ ...erfProvider_ClusterStorageDiskScheduler.go | 1392 ++++ ...tPerfProvider_ClusterStorageHybridDisks.go | 1970 ++++++ ...PerfProvider_ClusterStorageHybridDisks2.go | 300 + ...ider_ClusterStorageHybridDisksIOProfile.go | 1970 ++++++ ...lusportPerfProvider_ClusterDiskCounters.go | 1730 +++++ ...ata_ClussvcPerfProvider_ClusterAPICalls.go | 320 + ...a_ClussvcPerfProvider_ClusterAPIHandles.go | 590 ++ ...vcPerfProvider_ClusterCheckpointManager.go | 290 + ...ata_ClussvcPerfProvider_ClusterDatabase.go | 110 + ...ider_ClusterGlobalUpdateManagerMessages.go | 500 ++ ...ider_ClusterGoodEnoughMulticastMessages.go | 110 + ...der_ClusterGoodEnoughMulticastMessages2.go | 80 + ...ClusterMulticastRequestResponseMessages.go | 140 + ...ssvcPerfProvider_ClusterNetworkMessages.go | 290 + ...erfProvider_ClusterNetworkReconnections.go | 260 + ...fProvider_ClusterResourceControlManager.go | 140 + ...ta_ClussvcPerfProvider_ClusterResources.go | 290 + ...unters_AppVClientStreamedDataPercentage.go | 80 + ...32_PerfRawData_Counters_BluetoothDevice.go | 230 + ...n32_PerfRawData_Counters_BluetoothRadio.go | 710 ++ .../Win32_PerfRawData_Counters_DNS64Global.go | 230 + .../Win32_PerfRawData_Counters_EventLog.go | 174 + ...RawData_Counters_EventTracingforWindows.go | 230 + ..._Counters_EventTracingforWindowsSession.go | 200 + ...RawData_Counters_FileSystemDiskActivity.go | 110 + ...ata_Counters_GenericIKEv1AuthIPandIKEv2.go | 440 ++ .../Win32_PerfRawData_Counters_HTTPService.go | 230 + ...wData_Counters_HTTPServiceRequestQueues.go | 230 + ...rfRawData_Counters_HTTPServiceUrlGroups.go | 320 + ...s_HyperVDynamicMemoryIntegrationService.go | 80 + ...awData_Counters_HyperVVirtualMachineBus.go | 140 + ...a_Counters_HyperVVirtualMachineBusPipes.go | 170 + ...rs_HyperVVirtualMachineBusProviderPipes.go | 170 + ...ata_Counters_HyperVVirtualStorageDevice.go | 740 ++ ...in32_PerfRawData_Counters_IPHTTPSGlobal.go | 350 + ...n32_PerfRawData_Counters_IPHTTPSSession.go | 260 + ...32_PerfRawData_Counters_IPsecAuthIPIPv4.go | 920 +++ ...32_PerfRawData_Counters_IPsecAuthIPIPv6.go | 920 +++ ...2_PerfRawData_Counters_IPsecConnections.go | 230 + ...PerfRawData_Counters_IPsecDoSProtection.go | 1130 +++ .../Win32_PerfRawData_Counters_IPsecDriver.go | 980 +++ ...n32_PerfRawData_Counters_IPsecIKEv1IPv4.go | 590 ++ ...n32_PerfRawData_Counters_IPsecIKEv1IPv6.go | 590 ++ ...n32_PerfRawData_Counters_IPsecIKEv2IPv4.go | 590 ++ ...n32_PerfRawData_Counters_IPsecIKEv2IPv6.go | 590 ++ .../Win32_PerfRawData_Counters_KPSSVC.go | 170 + .../Win32_PerfRawData_Counters_Netlogon.go | 290 + ...2_PerfRawData_Counters_NetworkQoSPolicy.go | 230 + .../Win32_PerfRawData_Counters_PacerFlow.go | 650 ++ .../Win32_PerfRawData_Counters_PacerPipe.go | 560 ++ ...Data_Counters_PacketDirectECUtilization.go | 500 ++ ...RawData_Counters_PacketDirectQueueDepth.go | 110 + ...ta_Counters_PacketDirectReceiveCounters.go | 230 + ...ata_Counters_PacketDirectReceiveFilters.go | 170 + ...a_Counters_PacketDirectTransmitCounters.go | 170 + ...nters_PerProcessorNetworkActivityCycles.go | 440 ++ ...erProcessorNetworkInterfaceCardActivity.go | 680 ++ ...rs_PhysicalNetworkInterfaceCardActivity.go | 200 + ...PerfRawData_Counters_PowerShellWorkflow.go | 920 +++ ...rfRawData_Counters_ProcessorInformation.go | 1010 +++ ...Win32_PerfRawData_Counters_RDMAActivity.go | 350 + .../cimv2/Win32_PerfRawData_Counters_ReFS.go | 1550 +++++ ...2_PerfRawData_Counters_RemoteFXGraphics.go | 320 + ...32_PerfRawData_Counters_RemoteFXNetwork.go | 830 +++ ...32_PerfRawData_Counters_SMBClientShares.go | 950 +++ ...erfRawData_Counters_SMBDirectConnection.go | 500 ++ .../Win32_PerfRawData_Counters_SMBServer.go | 230 + ..._PerfRawData_Counters_SMBServerSessions.go | 1400 ++++ ...32_PerfRawData_Counters_SMBServerShares.go | 1670 +++++ ...a_Counters_SecurityPerProcessStatistics.go | 90 + ...a_Counters_SecuritySystemWideStatistics.go | 468 ++ ...rfRawData_Counters_StorageQoSFilterFlow.go | 350 + ...RawData_Counters_StorageQoSFilterVolume.go | 590 ++ ...2_PerfRawData_Counters_StorageSpacesDrt.go | 530 ++ ..._PerfRawData_Counters_StorageSpacesTier.go | 710 ++ ...wData_Counters_StorageSpacesVirtualDisk.go | 1670 +++++ ...awData_Counters_StorageSpacesWriteCache.go | 1280 ++++ ...32_PerfRawData_Counters_Synchronization.go | 1310 ++++ ...erfRawData_Counters_SynchronizationNuma.go | 1310 ++++ ...Win32_PerfRawData_Counters_TeredoClient.go | 380 ++ .../Win32_PerfRawData_Counters_TeredoRelay.go | 710 ++ ...Win32_PerfRawData_Counters_TeredoServer.go | 470 ++ ...RawData_Counters_ThermalZoneInformation.go | 170 + ...ers_VFPPortAverageInboundNetworkTraffic.go | 860 +++ ...rs_VFPPortAverageOutboundNetworkTraffic.go | 860 +++ ...FPPortTotalInboundDroppedNetworkPackets.go | 740 ++ ...nters_VFPPortTotalInboundNetworkTraffic.go | 860 +++ ...PPortTotalOutboundDroppedNetworkPackets.go | 740 ++ ...ters_VFPPortTotalOutboundNetworkTraffic.go | 860 +++ ...VFPQoSQueueAverageInboundNetworkTraffic.go | 410 ++ ...FPQoSQueueAverageOutboundNetworkTraffic.go | 410 ++ ...s_VFPQoSQueueTotalInboundNetworkTraffic.go | 110 + ..._VFPQoSQueueTotalOutboundNetworkTraffic.go | 110 + .../cimv2/Win32_PerfRawData_Counters_WFP.go | 80 + .../Win32_PerfRawData_Counters_WFPClassify.go | 3170 +++++++++ ...PerfRawData_Counters_WFPReauthorization.go | 830 +++ .../cimv2/Win32_PerfRawData_Counters_WFPv4.go | 440 ++ .../cimv2/Win32_PerfRawData_Counters_WFPv6.go | 440 ++ ...rfRawData_Counters_WSManQuotaStatistics.go | 260 + ...2_PerfRawData_Counters_XHCICommonBuffer.go | 170 + ...32_PerfRawData_Counters_XHCIInterrupter.go | 230 + ...2_PerfRawData_Counters_XHCITransferRing.go | 260 + ...ilterPerfProvider_ClusterCSVCoordinator.go | 410 ++ ...fRawData_CsvFsPerfProvider_ClusterCSVFS.go | 1010 +++ ...svFsPerfProvider_ClusterCSVFSBlockCache.go | 710 ++ ..._CsvFsPerfProvider_ClusterCSVFSDirectIO.go | 890 +++ ...FsPerfProvider_ClusterCSVFSRedirectedIO.go | 770 +++ ..._CsvFsPerfProvider_ClusterCSVFileSystem.go | 1970 ++++++ ...PerfProvider_ClusterCSVBlockRedirection.go | 290 + ...olumePerfProvider_ClusterCSVVolumeCache.go | 710 ++ ...umePerfProvider_ClusterCSVVolumeManager.go | 590 ++ ...in32_PerfRawData_DdmCounterProvider_RAS.go | 200 + .../cimv2/Win32_PerfRawData_ESENT_Database.go | 2150 ++++++ ...n32_PerfRawData_ESENT_DatabaseDatabases.go | 350 + ...n32_PerfRawData_ESENT_DatabaseInstances.go | 2060 ++++++ ..._PerfRawData_ESENT_DatabaseTableClasses.go | 380 ++ ...PerfProvider_HyperVLegacyNetworkAdapter.go | 230 + ...GPUPerformanceCounters_GPUAdapterMemory.go | 140 + ...awData_GPUPerformanceCounters_GPUEngine.go | 110 + ...rformanceCounters_GPULocalAdapterMemory.go | 80 + ...rmanceCounters_GPUNonLocalAdapterMemory.go | 80 + ...GPUPerformanceCounters_GPUProcessMemory.go | 200 + ...Provider_HyperVVMSaveSnapshotandRestore.go | 230 + ...32_PerfRawData_HvStats_HyperVHypervisor.go | 290 + ...vStats_HyperVHypervisorLogicalProcessor.go | 1070 +++ ...wData_HvStats_HyperVHypervisorPartition.go | 920 +++ ...a_HvStats_HyperVHypervisorRootPartition.go | 920 +++ ...ts_HyperVHypervisorRootVirtualProcessor.go | 6080 +++++++++++++++++ ...vStats_HyperVHypervisorVirtualProcessor.go | 6080 +++++++++++++++++ ...Data_HyperVReplicaStats_HyperVReplicaVM.go | 320 + ..._HyperVStorageStats_HyperVConfiguration.go | 1010 +++ ...ider_HyperVVirtualIDEControllerEmulated.go | 170 + ...erfRawData_LSM_UserInputDelayperProcess.go | 110 + ...erfRawData_LSM_UserInputDelayperSession.go | 110 + ...ta_LmPerfProvider_HyperVVMLiveMigration.go | 1040 +++ ...ta_LocalSessionManager_TerminalServices.go | 140 + ...awData_Lsa_SecurityPerProcessStatistics.go | 110 + ...awData_Lsa_SecuritySystemWideStatistics.go | 650 ++ ...RawData_MSDTCBridge4000_MSDTCBridge4000.go | 380 ++ ...MSDTC_DistributedTransactionCoordinator.go | 440 ++ ...FXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go | 230 + ...sc_RemoteFXSynth3DVSCVMTransportChannel.go | 410 ++ ...ftWindowsW32TimePerf_WindowsTimeService.go | 260 + ...DeviceProvider_MellanoxWinOFBusCounters.go | 1520 +++++ ...vider_MellanoxAdapterDiagnosticCounters.go | 1130 +++ ...4EthProvider_MellanoxAdapterQoSCounters.go | 950 +++ ...4EthProvider_MellanoxAdapterRssCounters.go | 890 +++ ...Provider_MellanoxAdapterTrafficCounters.go | 650 ++ ...der_MellanoxIBAdapterDiagnosticCounters.go | 740 ++ ...ovider_MellanoxIBAdapterTrafficCounters.go | 650 ++ ...ider_HyperVVMWorkerProcessMemoryManager.go | 69 + ...Win32_PerfRawData_NETCLRData_NETCLRData.go | 230 + ...TCLRNetworking4000_NETCLRNetworking4000.go | 440 ++ ...wData_NETCLRNetworking_NETCLRNetworking.go | 200 + ...viderforOracle_NETDataProviderforOracle.go | 470 ++ ...orSqlServer_NETDataProviderforSqlServer.go | 470 ++ ...rfRawData_NETFramework_NETCLRExceptions.go | 200 + ..._PerfRawData_NETFramework_NETCLRInterop.go | 200 + ...in32_PerfRawData_NETFramework_NETCLRJit.go | 260 + ..._PerfRawData_NETFramework_NETCLRLoading.go | 530 ++ ...Data_NETFramework_NETCLRLocksAndThreads.go | 350 + ...2_PerfRawData_NETFramework_NETCLRMemory.go | 770 +++ ...PerfRawData_NETFramework_NETCLRRemoting.go | 260 + ...PerfRawData_NETFramework_NETCLRSecurity.go | 230 + ...wData_NETMemoryCache40_NETMemoryCache40.go | 260 + ...etFtPerfProvider_ClusterNetFtHeartbeats.go | 110 + ...erfProvider_ClusterNetftMiniportAdapter.go | 174 + ...rovider_ClusterNetftRouteMonitorAdapter.go | 258 + ...tPerfProvider_ClusterNetftTunnelAdapter.go | 174 + ...FtPerfProvider_ClusterNetftWskInterface.go | 174 + ..._HyperVVirtualNetworkAdapterDropReasons.go | 2390 +++++++ ...vspNicStats_HyperVVirtualNetworkAdapter.go | 1460 ++++ ...SSStats_HyperVVirtualNetworkAdapterVRSS.go | 530 ++ ...a_NvspPortStats_HyperVVirtualSwitchPort.go | 680 ++ ...hProcStats_HyperVVirtualSwitchProcessor.go | 170 + ...ata_NvspSwitchStats_HyperVVirtualSwitch.go | 1250 ++++ ...fRawData_OfflineFiles_ClientSideCaching.go | 440 ++ ...2_PerfRawData_OfflineFiles_OfflineFiles.go | 230 + .../Win32_PerfRawData_PerfDisk_LogicalDisk.go | 1070 +++ ...Win32_PerfRawData_PerfDisk_PhysicalDisk.go | 980 +++ .../Win32_PerfRawData_PerfNet_Browser.go | 650 ++ .../Win32_PerfRawData_PerfNet_Redirector.go | 1160 ++++ .../cimv2/Win32_PerfRawData_PerfNet_Server.go | 1280 ++++ ...32_PerfRawData_PerfNet_ServerWorkQueues.go | 560 ++ .../cimv2/Win32_PerfRawData_PerfOS_Cache.go | 1070 +++ .../cimv2/Win32_PerfRawData_PerfOS_Memory.go | 1160 ++++ ...Win32_PerfRawData_PerfOS_NUMANodeMemory.go | 110 + .../cimv2/Win32_PerfRawData_PerfOS_Objects.go | 230 + .../Win32_PerfRawData_PerfOS_PagingFile.go | 170 + .../Win32_PerfRawData_PerfOS_Processor.go | 500 ++ .../cimv2/Win32_PerfRawData_PerfOS_System.go | 590 ++ .../Win32_PerfRawData_PerfProc_JobObject.go | 440 ++ ...2_PerfRawData_PerfProc_JobObjectDetails.go | 860 +++ .../Win32_PerfRawData_PerfProc_Process.go | 890 +++ .../Win32_PerfRawData_PerfProc_Thread.go | 410 ++ ...rfRawData_PowerMeterCounter_EnergyMeter.go | 170 + ...erfRawData_PowerMeterCounter_PowerMeter.go | 110 + .../Win32_PerfRawData_RemoteAccess_RASPort.go | 560 ++ ...Win32_PerfRawData_RemoteAccess_RASTotal.go | 590 ++ ...topConnectionBrokerRedirectorCounterset.go | 170 + ...ata_RemotePerfProvider_HyperVVMRemoting.go | 110 + ...RawData_ResumeKeyFilter_ResumeKeyFilter.go | 290 + ...PerfRawData_SMSvcHost4000_SMSvcHost4000.go | 470 ++ ...rviceModel4000_ServiceModelEndpoint4000.go | 620 ++ ...viceModel4000_ServiceModelOperation4000.go | 500 ++ ...erviceModel4000_ServiceModelService4000.go | 1220 ++++ .../Win32_PerfRawData_Spooler_PrintQueue.go | 440 ++ ...a_SvhdxFltPerfProvider_HyperVSharedVHDX.go | 1040 +++ ...oPerfProvider_RemoteFXRootGPUManagement.go | 170 + ...PIPCounters_TCPIPPerformanceDiagnostics.go | 860 +++ ...nters_TCPIPPerformanceDiagnosticsPerCPU.go | 80 + .../cimv2/Win32_PerfRawData_Tcpip_ICMP.go | 860 +++ .../cimv2/Win32_PerfRawData_Tcpip_ICMPv6.go | 1040 +++ .../cimv2/Win32_PerfRawData_Tcpip_IPv4.go | 560 ++ .../cimv2/Win32_PerfRawData_Tcpip_IPv6.go | 560 ++ .../Win32_PerfRawData_Tcpip_NBTConnection.go | 140 + .../Win32_PerfRawData_Tcpip_NetworkAdapter.go | 710 ++ ...in32_PerfRawData_Tcpip_NetworkInterface.go | 710 ++ .../cimv2/Win32_PerfRawData_Tcpip_TCPv4.go | 320 + .../cimv2/Win32_PerfRawData_Tcpip_TCPv6.go | 320 + .../cimv2/Win32_PerfRawData_Tcpip_UDPv4.go | 200 + .../cimv2/Win32_PerfRawData_Tcpip_UDPv6.go | 200 + ...ata_TermService_TerminalServicesSession.go | 500 ++ ...erfProvider_HyperVVMVirtualDevicePipeIO.go | 200 + ...wData_VSmbPerfProvider_HyperVVirtualSMB.go | 620 ++ ...wData_VidPerfProvider_HyperVVMVidDriver.go | 69 + ...ata_VidPerfProvider_HyperVVMVidNumaNode.go | 110 + ...ta_VidPerfProvider_HyperVVMVidPartition.go | 140 + ...Stats_HyperVVirtualMachineHealthSummary.go | 110 + ...Win32_PerfRawData_WinNatCounters_WinNAT.go | 470 ++ ...2_PerfRawData_WinNatCounters_WinNATICMP.go | 230 + ...rfRawData_WinNatCounters_WinNATInstance.go | 170 + ...32_PerfRawData_WinNatCounters_WinNATTCP.go | 230 + ...32_PerfRawData_WinNatCounters_WinNATUDP.go | 230 + ...sMediaPlayer_WindowsMediaPlayerMetadata.go | 710 ++ ...flowFoundation4000_WFSystemWorkflow4000.go | 680 ++ ...wData_WnvCounters_NetworkVirtualization.go | 650 ++ ...VpProvider_HyperVWorkerVirtualProcessor.go | 110 + ...ServiceHost4000_WorkflowServiceHost4000.go | 740 ++ .../Win32_PerfRawData_tapisrv_Telephony.go | 320 + .../cimv2/Win32_PerfRawData_usbhub_USB.go | 620 ++ .../root/cimv2/Win32_PhysicalMedia.go | 48 + .../root/cimv2/Win32_PhysicalMemory.go | 320 + .../root/cimv2/Win32_PhysicalMemoryArray.go | 230 + .../cimv2/Win32_PhysicalMemoryLocation.go | 48 + .../server2019/root/cimv2/Win32_PingStatus.go | 776 +++ .../server2019/root/cimv2/Win32_PnPDevice.go | 111 + .../root/cimv2/Win32_PnPDeviceProperty.go | 171 + .../cimv2/Win32_PnPDevicePropertyBinary.go | 81 + .../cimv2/Win32_PnPDevicePropertyBoolean.go | 80 + .../Win32_PnPDevicePropertyBooleanArray.go | 81 + .../cimv2/Win32_PnPDevicePropertyDateTime.go | 80 + .../cimv2/Win32_PnPDevicePropertyReal32.go | 80 + .../Win32_PnPDevicePropertyReal32Array.go | 81 + .../cimv2/Win32_PnPDevicePropertyReal64.go | 80 + .../Win32_PnPDevicePropertyReal64Array.go | 81 + ...n32_PnPDevicePropertySecurityDescriptor.go | 80 + ...nPDevicePropertySecurityDescriptorArray.go | 81 + .../cimv2/Win32_PnPDevicePropertySint16.go | 80 + .../Win32_PnPDevicePropertySint16Array.go | 81 + .../cimv2/Win32_PnPDevicePropertySint32.go | 80 + .../Win32_PnPDevicePropertySint32Array.go | 81 + .../cimv2/Win32_PnPDevicePropertySint64.go | 80 + .../cimv2/Win32_PnPDevicePropertySint8.go | 80 + .../Win32_PnPDevicePropertySint8Array.go | 81 + .../cimv2/Win32_PnPDevicePropertyString.go | 80 + .../Win32_PnPDevicePropertyStringArray.go | 81 + .../cimv2/Win32_PnPDevicePropertyUint16.go | 80 + .../Win32_PnPDevicePropertyUint16Array.go | 81 + .../cimv2/Win32_PnPDevicePropertyUint32.go | 80 + .../Win32_PnPDevicePropertyUint32Array.go | 81 + .../cimv2/Win32_PnPDevicePropertyUint64.go | 80 + .../cimv2/Win32_PnPDevicePropertyUint8.go | 80 + .../server2019/root/cimv2/Win32_PnPEntity.go | 310 + .../root/cimv2/Win32_PnPSignedDriver.go | 590 ++ .../cimv2/Win32_PnPSignedDriverCIMDataFile.go | 48 + .../root/cimv2/Win32_PointingDevice.go | 320 + .../root/cimv2/Win32_PortConnector.go | 140 + .../root/cimv2/Win32_PortResource.go | 80 + .../root/cimv2/Win32_PortableBattery.go | 200 + .../root/cimv2/Win32_PowerManagementEvent.go | 110 + .../server2019/root/cimv2/Win32_PrintJob.go | 567 ++ .../server2019/root/cimv2/Win32_Printer.go | 1289 ++++ .../root/cimv2/Win32_PrinterConfiguration.go | 969 +++ .../root/cimv2/Win32_PrinterController.go | 48 + .../root/cimv2/Win32_PrinterDriver.go | 430 ++ .../root/cimv2/Win32_PrinterDriverDll.go | 48 + .../root/cimv2/Win32_PrinterSetting.go | 48 + .../root/cimv2/Win32_PrinterShare.go | 48 + .../root/cimv2/Win32_PrivilegesStatus.go | 112 + .../server2019/root/cimv2/Win32_Process.go | 972 +++ .../root/cimv2/Win32_ProcessStartTrace.go | 48 + .../root/cimv2/Win32_ProcessStartup.go | 471 ++ .../root/cimv2/Win32_ProcessStopTrace.go | 80 + .../root/cimv2/Win32_ProcessTrace.go | 201 + .../server2019/root/cimv2/Win32_Processor.go | 860 +++ .../server2019/root/cimv2/Win32_Product.go | 771 +++ .../root/cimv2/Win32_ProductCheck.go | 111 + .../root/cimv2/Win32_ProductResource.go | 111 + .../cimv2/Win32_ProductSoftwareFeatures.go | 48 + .../root/cimv2/Win32_ProgIDSpecification.go | 110 + .../root/cimv2/Win32_ProgramGroupContents.go | 48 + .../root/cimv2/Win32_ProgramGroupOrItem.go | 48 + .../server2019/root/cimv2/Win32_Property.go | 140 + .../root/cimv2/Win32_ProtocolBinding.go | 141 + .../cimv2/Win32_PublishComponentAction.go | 140 + .../root/cimv2/Win32_QuickFixEngineering.go | 230 + .../root/cimv2/Win32_QuotaSetting.go | 230 + .../root/cimv2/Win32_Refrigeration.go | 48 + .../server2019/root/cimv2/Win32_Registry.go | 140 + .../root/cimv2/Win32_RegistryAction.go | 200 + .../root/cimv2/Win32_Reliability.go | 49 + .../root/cimv2/Win32_ReliabilityRecords.go | 366 + .../Win32_ReliabilityStabilityMetrics.go | 215 + .../root/cimv2/Win32_RemoveFileAction.go | 170 + .../root/cimv2/Win32_RemoveIniAction.go | 170 + .../root/cimv2/Win32_ReserveCost.go | 170 + ...32_RoamingProfileBackgroundUploadParams.go | 141 + ...in32_RoamingProfileMachineConfiguration.go | 591 ++ .../Win32_RoamingProfileSlowLinkParams.go | 111 + .../Win32_RoamingProfileUserConfiguration.go | 143 + .../Win32_RoamingUserHealthConfiguration.go | 201 + .../root/cimv2/Win32_SCSIController.go | 200 + .../root/cimv2/Win32_SCSIControllerDevice.go | 48 + .../wmi/server2019/root/cimv2/Win32_SID.go | 202 + .../root/cimv2/Win32_SIDandAttributes.go | 111 + .../root/cimv2/Win32_SMBIOSMemory.go | 472 ++ .../root/cimv2/Win32_ScheduledJob.go | 271 + .../root/cimv2/Win32_SecurityDescriptor.go | 48 + .../cimv2/Win32_SecurityDescriptorHelper.go | 157 + .../root/cimv2/Win32_SecuritySetting.go | 110 + .../root/cimv2/Win32_SecuritySettingAccess.go | 261 + .../cimv2/Win32_SecuritySettingAuditing.go | 261 + .../root/cimv2/Win32_SecuritySettingGroup.go | 111 + .../Win32_SecuritySettingOfLogicalFile.go | 48 + .../Win32_SecuritySettingOfLogicalShare.go | 48 + .../cimv2/Win32_SecuritySettingOfObject.go | 48 + .../root/cimv2/Win32_SecuritySettingOwner.go | 111 + .../root/cimv2/Win32_SelfRegModuleAction.go | 110 + .../server2019/root/cimv2/Win32_SerialPort.go | 710 ++ .../cimv2/Win32_SerialPortConfiguration.go | 830 +++ .../root/cimv2/Win32_SerialPortSetting.go | 48 + .../root/cimv2/Win32_ServerConnection.go | 260 + .../root/cimv2/Win32_ServerFeature.go | 141 + .../root/cimv2/Win32_ServerSession.go | 290 + .../server2019/root/cimv2/Win32_Service.go | 200 + .../root/cimv2/Win32_ServiceControl.go | 230 + .../root/cimv2/Win32_ServiceSpecification.go | 320 + .../Win32_ServiceSpecificationService.go | 111 + .../server2019/root/cimv2/Win32_Session.go | 80 + .../root/cimv2/Win32_SessionConnection.go | 48 + .../root/cimv2/Win32_SessionProcess.go | 48 + .../root/cimv2/Win32_SessionResource.go | 48 + .../root/cimv2/Win32_SettingCheck.go | 111 + .../server2019/root/cimv2/Win32_ShadowBy.go | 48 + .../root/cimv2/Win32_ShadowContext.go | 440 ++ .../server2019/root/cimv2/Win32_ShadowCopy.go | 775 +++ .../cimv2/Win32_ShadowDiffVolumeSupport.go | 48 + .../server2019/root/cimv2/Win32_ShadowFor.go | 48 + .../server2019/root/cimv2/Win32_ShadowOn.go | 48 + .../root/cimv2/Win32_ShadowProvider.go | 200 + .../root/cimv2/Win32_ShadowStorage.go | 220 + .../root/cimv2/Win32_ShadowVolumeSupport.go | 48 + .../wmi/server2019/root/cimv2/Win32_Share.go | 272 + .../root/cimv2/Win32_ShareToDirectory.go | 111 + .../root/cimv2/Win32_ShortcutAction.go | 260 + .../root/cimv2/Win32_ShortcutFile.go | 80 + .../root/cimv2/Win32_ShortcutSAP.go | 111 + .../root/cimv2/Win32_SoftwareElement.go | 140 + .../root/cimv2/Win32_SoftwareElementAction.go | 48 + .../root/cimv2/Win32_SoftwareElementCheck.go | 48 + .../cimv2/Win32_SoftwareElementCondition.go | 80 + .../cimv2/Win32_SoftwareElementResource.go | 110 + .../root/cimv2/Win32_SoftwareFeature.go | 200 + .../root/cimv2/Win32_SoftwareFeatureAction.go | 111 + .../root/cimv2/Win32_SoftwareFeatureCheck.go | 111 + .../root/cimv2/Win32_SoftwareFeatureParent.go | 48 + .../Win32_SoftwareFeatureSoftwareElements.go | 48 + .../root/cimv2/Win32_SoundDevice.go | 170 + .../root/cimv2/Win32_StartupCommand.go | 200 + .../root/cimv2/Win32_SubDirectory.go | 48 + .../server2019/root/cimv2/Win32_SubSession.go | 48 + .../root/cimv2/Win32_SystemAccount.go | 48 + .../server2019/root/cimv2/Win32_SystemBIOS.go | 48 + .../cimv2/Win32_SystemBootConfiguration.go | 48 + .../Win32_SystemConfigurationChangeEvent.go | 48 + .../root/cimv2/Win32_SystemDesktop.go | 48 + .../root/cimv2/Win32_SystemDevices.go | 48 + .../root/cimv2/Win32_SystemDriver.go | 48 + .../root/cimv2/Win32_SystemDriverPNPEntity.go | 48 + .../root/cimv2/Win32_SystemEnclosure.go | 110 + .../root/cimv2/Win32_SystemLoadOrderGroups.go | 48 + .../root/cimv2/Win32_SystemMemoryResource.go | 48 + .../cimv2/Win32_SystemNetworkConnections.go | 48 + .../root/cimv2/Win32_SystemOperatingSystem.go | 48 + .../root/cimv2/Win32_SystemPartitions.go | 48 + .../root/cimv2/Win32_SystemProcesses.go | 48 + .../root/cimv2/Win32_SystemProgramGroups.go | 48 + .../root/cimv2/Win32_SystemResources.go | 48 + .../root/cimv2/Win32_SystemServices.go | 48 + .../root/cimv2/Win32_SystemSetting.go | 48 + .../server2019/root/cimv2/Win32_SystemSlot.go | 290 + .../root/cimv2/Win32_SystemSystemDriver.go | 48 + .../root/cimv2/Win32_SystemTimeZone.go | 48 + .../root/cimv2/Win32_SystemTrace.go | 48 + .../root/cimv2/Win32_SystemUsers.go | 48 + .../root/cimv2/Win32_TCPIPPrinterPort.go | 290 + .../server2019/root/cimv2/Win32_TapeDrive.go | 290 + .../root/cimv2/Win32_TemperatureProbe.go | 48 + .../root/cimv2/Win32_TerminalService.go | 110 + .../wmi/server2019/root/cimv2/Win32_Thread.go | 200 + .../root/cimv2/Win32_ThreadStartTrace.go | 260 + .../root/cimv2/Win32_ThreadStopTrace.go | 48 + .../root/cimv2/Win32_ThreadTrace.go | 110 + .../server2019/root/cimv2/Win32_TimeZone.go | 680 ++ .../root/cimv2/Win32_TokenGroups.go | 112 + .../root/cimv2/Win32_TokenPrivileges.go | 112 + .../server2019/root/cimv2/Win32_Trustee.go | 48 + .../root/cimv2/Win32_TypeLibraryAction.go | 140 + .../root/cimv2/Win32_USBController.go | 48 + .../root/cimv2/Win32_USBControllerDevice.go | 48 + .../wmi/server2019/root/cimv2/Win32_USBHub.go | 48 + .../server2019/root/cimv2/Win32_UTCTime.go | 48 + .../root/cimv2/Win32_UserAccount.go | 275 + .../root/cimv2/Win32_UserDesktop.go | 48 + .../root/cimv2/Win32_UserInDomain.go | 48 + .../root/cimv2/Win32_UserProfile.go | 938 +++ .../Win32_UserStateConfigurationControls.go | 141 + .../root/cimv2/Win32_VideoConfiguration.go | 860 +++ .../root/cimv2/Win32_VideoController.go | 590 ++ .../root/cimv2/Win32_VideoSettings.go | 48 + .../root/cimv2/Win32_VoltageProbe.go | 48 + .../wmi/server2019/root/cimv2/Win32_Volume.go | 810 +++ .../root/cimv2/Win32_VolumeChangeEvent.go | 80 + .../root/cimv2/Win32_VolumeQuota.go | 48 + .../root/cimv2/Win32_VolumeQuotaSetting.go | 48 + .../root/cimv2/Win32_VolumeUserQuota.go | 231 + .../root/cimv2/Win32_WMIElementSetting.go | 48 + .../server2019/root/cimv2/Win32_WMISetting.go | 771 +++ .../wmi/server2019/root/cimv2/Win32_WinSAT.go | 291 + .../cimv2/WinSAT_WinSATAssessmentState.go | 25 + .../server2019/root/cimv2/thisNAMESPACE.go | 81 + .../root/microsoft/windows/storage/ACE.go | 260 + .../storage/AbsoluteTimerInstruction.go | 80 + .../windows/storage/AggregateEvent.go | 110 + .../windows/storage/CIM_ClassCreation.go | 48 + .../windows/storage/CIM_ClassDeletion.go | 48 + .../windows/storage/CIM_ClassIndication.go | 80 + .../windows/storage/CIM_ClassModification.go | 80 + .../microsoft/windows/storage/CIM_Error.go | 503 ++ .../windows/storage/CIM_Indication.go | 315 + .../windows/storage/CIM_InstCreation.go | 48 + .../windows/storage/CIM_InstDeletion.go | 48 + .../windows/storage/CIM_InstIndication.go | 142 + .../windows/storage/CIM_InstModification.go | 80 + .../windows/storage/ClassCreationEvent.go | 48 + .../windows/storage/ClassDeletionEvent.go | 48 + .../windows/storage/ClassModificationEvent.go | 80 + .../windows/storage/ClassOperationEvent.go | 80 + .../storage/ClassProviderRegistration.go | 263 + .../windows/storage/ConsumerFailureEvent.go | 140 + .../root/microsoft/windows/storage/Event.go | 111 + .../windows/storage/EventConsumer.go | 141 + .../EventConsumerProviderRegistration.go | 81 + .../windows/storage/EventDroppedEvent.go | 110 + .../microsoft/windows/storage/EventFilter.go | 231 + .../windows/storage/EventGenerator.go | 48 + .../storage/EventProviderRegistration.go | 81 + .../storage/EventQueueOverflowEvent.go | 80 + .../windows/storage/ExtendedStatus.go | 170 + .../windows/storage/ExtrinsicEvent.go | 48 + .../storage/FilterToConsumerBinding.go | 261 + .../windows/storage/IndicationRelated.go | 48 + .../storage/Indication_PerceivedSeverity.go | 33 + .../windows/storage/InstanceCreationEvent.go | 48 + .../windows/storage/InstanceDeletionEvent.go | 48 + .../storage/InstanceModificationEvent.go | 80 + .../windows/storage/InstanceOperationEvent.go | 80 + .../storage/InstanceProviderRegistration.go | 48 + .../storage/IntervalTimerInstruction.go | 80 + .../windows/storage/MSFT_DedupProperties.go | 291 + .../microsoft/windows/storage/MSFT_Disk.go | 1252 ++++ .../windows/storage/MSFT_DiskImage.go | 356 + .../windows/storage/MSFT_DiskImageToVolume.go | 111 + .../windows/storage/MSFT_DiskToPartition.go | 111 + .../MSFT_DiskToStorageReliabilityCounter.go | 111 + .../windows/storage/MSFT_ExtendedStatus.go | 48 + .../windows/storage/MSFT_FileIntegrity.go | 201 + .../windows/storage/MSFT_FileServer.go | 398 ++ .../storage/MSFT_FileServerToFileShare.go | 111 + .../storage/MSFT_FileServerToVolume.go | 111 + .../windows/storage/MSFT_FileShare.go | 502 ++ .../MSFT_FileShareAccessControlEntry.go | 141 + .../windows/storage/MSFT_FileStorageTier.go | 353 + .../windows/storage/MSFT_HealthAction.go | 441 ++ .../windows/storage/MSFT_HealthActionEvent.go | 320 + .../windows/storage/MSFT_HealthRecord.go | 111 + .../storage/MSFT_HealthRecordReal64.go | 80 + .../storage/MSFT_HealthRecordUInt64.go | 80 + .../windows/storage/MSFT_InitiatorId.go | 187 + .../storage/MSFT_InitiatorIdToVirtualDisk.go | 111 + .../windows/storage/MSFT_InitiatorPort.go | 372 + .../MSFT_InitiatorPortToiSCSIConnection.go | 111 + .../MSFT_InitiatorPortToiSCSISession.go | 111 + .../MSFT_InitiatorPortToiSCSITarget.go | 111 + .../windows/storage/MSFT_MaskingSet.go | 351 + .../storage/MSFT_MaskingSetToInitiatorId.go | 111 + .../storage/MSFT_MaskingSetToTargetPort.go | 111 + .../storage/MSFT_MaskingSetToVirtualDisk.go | 111 + .../MSFT_OffloadDataTransferSetting.go | 170 + .../windows/storage/MSFT_Partition.go | 850 +++ .../storage/MSFT_PartitionToReplicaPeer.go | 110 + .../windows/storage/MSFT_PartitionToVolume.go | 111 + .../windows/storage/MSFT_PhysicalDisk.go | 985 +++ ...PhysicalDiskToStorageReliabilityCounter.go | 111 + .../windows/storage/MSFT_PhysicalExtent.go | 413 ++ .../windows/storage/MSFT_ReplicaPeer.go | 290 + .../storage/MSFT_ReplicationCapabilities.go | 590 ++ .../windows/storage/MSFT_ReplicationGroup.go | 341 + .../MSFT_ReplicationGroupToPartition.go | 111 + .../MSFT_ReplicationGroupToReplicaPeer.go | 170 + .../MSFT_ReplicationGroupToVirtualDisk.go | 111 + .../storage/MSFT_ReplicationSettings.go | 232 + .../windows/storage/MSFT_ResiliencySetting.go | 648 ++ .../MSFT_SBLTargetCacheConfiguration.go | 752 ++ .../windows/storage/MSFT_SBLTargetDisk.go | 471 ++ .../windows/storage/MSFT_SoftError.go | 48 + .../storage/MSFT_SoftError_EmptyCache.go | 48 + .../MSFT_SoftError_NotAuthenticated.go | 48 + .../storage/MSFT_SoftError_NotInCache.go | 48 + .../storage/MSFT_SoftError_RelativePath.go | 48 + .../windows/storage/MSFT_StorageAlertEvent.go | 80 + .../storage/MSFT_StorageArrivalEvent.go | 48 + .../windows/storage/MSFT_StorageChassis.go | 48 + .../storage/MSFT_StorageDepartureEvent.go | 48 + .../storage/MSFT_StorageDiagnoseResult.go | 352 + .../windows/storage/MSFT_StorageEnclosure.go | 520 ++ .../MSFT_StorageEnclosureToPhysicalDisk.go | 111 + .../windows/storage/MSFT_StorageEvent.go | 321 + .../storage/MSFT_StorageExtendedStatus.go | 48 + .../storage/MSFT_StorageFaultDomain.go | 322 + ..._StorageFaultDomainToStorageFaultDomain.go | 111 + .../windows/storage/MSFT_StorageFaultEvent.go | 381 ++ .../windows/storage/MSFT_StorageHealth.go | 176 + .../storage/MSFT_StorageHealthReport.go | 142 + .../storage/MSFT_StorageHealthSetting.go | 111 + .../MSFT_StorageHealthStatusChangeEvent.go | 170 + .../windows/storage/MSFT_StorageJob.go | 747 ++ .../storage/MSFT_StorageJobOutParams.go | 49 + .../MSFT_StorageJobToAffectedStorageObject.go | 111 + .../storage/MSFT_StorageModificationEvent.go | 48 + .../windows/storage/MSFT_StorageNode.go | 322 + .../windows/storage/MSFT_StorageNodeToDisk.go | 292 + .../storage/MSFT_StorageNodeToPhysicalDisk.go | 354 + .../MSFT_StorageNodeToStorageEnclosure.go | 418 ++ .../storage/MSFT_StorageNodeToStoragePool.go | 111 + .../storage/MSFT_StorageNodeToVirtualDisk.go | 111 + .../storage/MSFT_StorageNodeToVolume.go | 111 + .../windows/storage/MSFT_StorageObject.go | 231 + .../windows/storage/MSFT_StoragePool.go | 1415 ++++ .../storage/MSFT_StoragePoolToPhysicalDisk.go | 111 + .../MSFT_StoragePoolToResiliencySetting.go | 111 + .../storage/MSFT_StoragePoolToStorageTier.go | 111 + .../storage/MSFT_StoragePoolToVirtualDisk.go | 111 + .../storage/MSFT_StoragePoolToVolume.go | 111 + .../windows/storage/MSFT_StorageProvider.go | 472 ++ .../MSFT_StorageProviderToStorageSubSystem.go | 111 + .../windows/storage/MSFT_StorageQoSFlow.go | 651 ++ .../windows/storage/MSFT_StorageQoSPolicy.go | 325 + .../storage/MSFT_StorageQoSPolicyStore.go | 143 + .../MSFT_StorageQoSPolicyToChildPolicy.go | 111 + .../storage/MSFT_StorageQoSPolicyToFlow.go | 111 + .../windows/storage/MSFT_StorageQoSVolume.go | 381 ++ .../windows/storage/MSFT_StorageRack.go | 48 + .../storage/MSFT_StorageReliabilityCounter.go | 633 ++ .../windows/storage/MSFT_StorageScaleUnit.go | 74 + .../windows/storage/MSFT_StorageSetting.go | 156 + .../windows/storage/MSFT_StorageSite.go | 48 + .../windows/storage/MSFT_StorageSubSystem.go | 2530 +++++++ .../storage/MSFT_StorageSubSystemToDisk.go | 111 + .../MSFT_StorageSubSystemToFileServer.go | 111 + .../MSFT_StorageSubSystemToFileShare.go | 111 + .../MSFT_StorageSubSystemToInitiatorId.go | 111 + .../MSFT_StorageSubSystemToMaskingSet.go | 111 + ...geSubSystemToOffloadDataTransferSetting.go | 111 + .../MSFT_StorageSubSystemToPartition.go | 111 + .../MSFT_StorageSubSystemToPhysicalDisk.go | 111 + .../MSFT_StorageSubSystemToReplicaPeer.go | 111 + ...orageSubSystemToReplicationCapabilities.go | 111 + ...MSFT_StorageSubSystemToReplicationGroup.go | 111 + ...MSFT_StorageSubSystemToStorageEnclosure.go | 111 + ...FT_StorageSubSystemToStorageFaultDomain.go | 111 + .../MSFT_StorageSubSystemToStorageHealth.go | 111 + .../MSFT_StorageSubSystemToStorageNode.go | 111 + .../MSFT_StorageSubSystemToStoragePool.go | 111 + .../MSFT_StorageSubSystemToTargetPort.go | 111 + .../MSFT_StorageSubSystemToTargetPortal.go | 111 + .../MSFT_StorageSubSystemToVirtualDisk.go | 111 + .../storage/MSFT_StorageSubSystemToVolume.go | 111 + .../windows/storage/MSFT_StorageTier.go | 826 +++ .../windows/storage/MSFT_Synchronized.go | 471 ++ .../windows/storage/MSFT_TargetPort.go | 593 ++ .../storage/MSFT_TargetPortToTargetPortal.go | 111 + .../storage/MSFT_TargetPortToVirtualDisk.go | 111 + .../windows/storage/MSFT_TargetPortal.go | 170 + .../windows/storage/MSFT_VirtualDisk.go | 1692 +++++ .../windows/storage/MSFT_VirtualDiskToDisk.go | 111 + .../storage/MSFT_VirtualDiskToPhysicalDisk.go | 111 + .../storage/MSFT_VirtualDiskToReplicaPeer.go | 110 + .../MSFT_VirtualDiskToStorageFaultDomain.go | 111 + .../storage/MSFT_VirtualDiskToStorageTier.go | 111 + .../storage/MSFT_VirtualDiskToVirtualDisk.go | 110 + .../microsoft/windows/storage/MSFT_Volume.go | 744 ++ .../windows/storage/MSFT_VolumeToFileShare.go | 111 + .../storage/MSFT_Volume_Repair_AsyncOutput.go | 80 + .../windows/storage/MSFT_WmiError.go | 170 + .../windows/storage/MSFT_iSCSIConnection.go | 201 + .../storage/MSFT_iSCSIConnectionToDisk.go | 111 + ...MSFT_iSCSIConnectionToiSCSITargetPortal.go | 111 + .../windows/storage/MSFT_iSCSISession.go | 518 ++ .../storage/MSFT_iSCSISessionToDisk.go | 111 + .../MSFT_iSCSISessionToiSCSIConnection.go | 111 + .../MSFT_iSCSISessionToiSCSITargetPortal.go | 111 + .../windows/storage/MSFT_iSCSITarget.go | 181 + .../windows/storage/MSFT_iSCSITargetPortal.go | 307 + .../MSFT_iSCSITargetToiSCSIConnection.go | 111 + .../storage/MSFT_iSCSITargetToiSCSISession.go | 111 + .../MSFT_iSCSITargetToiSCSITargetPortal.go | 111 + .../windows/storage/MethodInvocationEvent.go | 140 + .../storage/MethodProviderRegistration.go | 48 + .../microsoft/windows/storage/NTLMUser9X.go | 200 + .../microsoft/windows/storage/Namespace.go | 80 + .../windows/storage/NamespaceCreationEvent.go | 48 + .../windows/storage/NamespaceDeletionEvent.go | 48 + .../storage/NamespaceModificationEvent.go | 80 + .../storage/NamespaceOperationEvent.go | 80 + .../microsoft/windows/storage/NotifyStatus.go | 81 + .../storage/ObjectProviderRegistration.go | 291 + ...ectProviderRegistration_InteractionType.go | 21 + .../microsoft/windows/storage/PARAMETERS.go | 49 + .../windows/storage/PS_StorageCmdlets.go | 551 ++ .../storage/PropertyProviderRegistration.go | 110 + .../microsoft/windows/storage/Provider.go | 80 + .../windows/storage/ProviderRegistration.go | 80 + .../windows/storage/QOSFailureEvent.go | 110 + .../windows/storage/SecurityDescriptor.go | 232 + .../windows/storage/SecurityRelatedClass.go | 49 + .../microsoft/windows/storage/SystemClass.go | 49 + .../microsoft/windows/storage/SystemEvent.go | 48 + .../windows/storage/SystemSecurity.go | 154 + .../microsoft/windows/storage/TimerEvent.go | 110 + .../windows/storage/TimerInstruction.go | 110 + .../windows/storage/TimerNextFiring.go | 110 + .../root/microsoft/windows/storage/Trustee.go | 231 + .../windows/storage/Win32Provider.go | 740 ++ .../Win32Provider_ImpersonationLevel.go | 17 + .../Win32Provider_InitializationReentrancy.go | 21 + .../windows/storage/thisNAMESPACE.go | 81 + vendor/github.com/go-ole/go-ole/.travis.yml | 8 + vendor/github.com/go-ole/go-ole/ChangeLog.md | 49 + vendor/github.com/go-ole/go-ole/LICENSE | 21 + vendor/github.com/go-ole/go-ole/README.md | 46 + vendor/github.com/go-ole/go-ole/SECURITY.md | 13 + vendor/github.com/go-ole/go-ole/appveyor.yml | 68 + vendor/github.com/go-ole/go-ole/com.go | 386 ++ vendor/github.com/go-ole/go-ole/com_func.go | 174 + vendor/github.com/go-ole/go-ole/connect.go | 192 + vendor/github.com/go-ole/go-ole/constants.go | 153 + vendor/github.com/go-ole/go-ole/error.go | 51 + vendor/github.com/go-ole/go-ole/error_func.go | 8 + .../github.com/go-ole/go-ole/error_windows.go | 24 + vendor/github.com/go-ole/go-ole/guid.go | 284 + .../go-ole/go-ole/iconnectionpoint.go | 20 + .../go-ole/go-ole/iconnectionpoint_func.go | 21 + .../go-ole/go-ole/iconnectionpoint_windows.go | 43 + .../go-ole/iconnectionpointcontainer.go | 17 + .../go-ole/iconnectionpointcontainer_func.go | 11 + .../iconnectionpointcontainer_windows.go | 25 + vendor/github.com/go-ole/go-ole/idispatch.go | 94 + .../go-ole/go-ole/idispatch_func.go | 19 + .../go-ole/go-ole/idispatch_windows.go | 203 + .../github.com/go-ole/go-ole/ienumvariant.go | 19 + .../go-ole/go-ole/ienumvariant_func.go | 19 + .../go-ole/go-ole/ienumvariant_windows.go | 63 + .../github.com/go-ole/go-ole/iinspectable.go | 18 + .../go-ole/go-ole/iinspectable_func.go | 15 + .../go-ole/go-ole/iinspectable_windows.go | 72 + .../go-ole/go-ole/iprovideclassinfo.go | 21 + .../go-ole/go-ole/iprovideclassinfo_func.go | 7 + .../go-ole/iprovideclassinfo_windows.go | 21 + vendor/github.com/go-ole/go-ole/itypeinfo.go | 34 + .../go-ole/go-ole/itypeinfo_func.go | 7 + .../go-ole/go-ole/itypeinfo_windows.go | 21 + vendor/github.com/go-ole/go-ole/iunknown.go | 57 + .../github.com/go-ole/go-ole/iunknown_func.go | 19 + .../go-ole/go-ole/iunknown_windows.go | 58 + vendor/github.com/go-ole/go-ole/ole.go | 190 + .../go-ole/go-ole/oleutil/connection.go | 100 + .../go-ole/go-ole/oleutil/connection_func.go | 10 + .../go-ole/oleutil/connection_windows.go | 58 + .../go-ole/go-ole/oleutil/go-get.go | 6 + .../go-ole/go-ole/oleutil/oleutil.go | 127 + vendor/github.com/go-ole/go-ole/safearray.go | 27 + .../go-ole/go-ole/safearray_func.go | 211 + .../go-ole/go-ole/safearray_windows.go | 337 + .../go-ole/go-ole/safearrayconversion.go | 140 + .../go-ole/go-ole/safearrayslices.go | 33 + vendor/github.com/go-ole/go-ole/utility.go | 101 + vendor/github.com/go-ole/go-ole/variables.go | 15 + vendor/github.com/go-ole/go-ole/variant.go | 105 + .../github.com/go-ole/go-ole/variant_386.go | 11 + .../github.com/go-ole/go-ole/variant_amd64.go | 12 + .../github.com/go-ole/go-ole/variant_arm.go | 11 + .../github.com/go-ole/go-ole/variant_arm64.go | 13 + .../go-ole/go-ole/variant_date_386.go | 22 + .../go-ole/go-ole/variant_date_amd64.go | 20 + .../go-ole/go-ole/variant_date_arm.go | 22 + .../go-ole/go-ole/variant_date_arm64.go | 23 + .../go-ole/go-ole/variant_ppc64le.go | 12 + .../github.com/go-ole/go-ole/variant_s390x.go | 12 + vendor/github.com/go-ole/go-ole/vt_string.go | 58 + vendor/github.com/go-ole/go-ole/winrt.go | 99 + vendor/github.com/go-ole/go-ole/winrt_doc.go | 36 + vendor/modules.txt | 16 + 1711 files changed, 477714 insertions(+), 385 deletions(-) create mode 100644 pkg/cim/disk.go create mode 100644 pkg/cim/iscsi.go create mode 100644 pkg/cim/volume.go create mode 100644 pkg/cim/wmi.go create mode 100644 vendor/github.com/Microsoft/wmi/LICENSE create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Class.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Credentials.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Instance.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/InstanceManager.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/MethodDeclaration.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/MethodParameter.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/MethodResult.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Property.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Qualifier.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Query.go create mode 100644 vendor/github.com/Microsoft/wmi/go/wmi/Session.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/base/credential/credential.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/base/host/host.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/base/instance/instancemanager.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/base/query/query.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/base/session/session.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/errors/errors.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiClass.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiEventSink.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiHelper.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiInstance.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiJob.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethod.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethodParam.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiProperty.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiQualifier.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSession.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSessionManager.go create mode 100644 vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSynchronousEvents.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ACE.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AbsoluteTimerInstruction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AggregateEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Action.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActionSequence.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActsAsSpare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AdjacentSlots.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePSExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregateRedundancyComponent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AlarmDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AllocatedResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystemSoftwareFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedAlarm.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedBattery.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedCooling.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedProcessorMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyCurrentSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyVoltageSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeatureBIOSElements.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSLoadedInNV.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BasedOn.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Battery.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BinarySensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootOSFromFS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootSAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootServiceAccessBySAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CDROMDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CacheMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Card.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardInSlot.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardOnCard.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chassis.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ChassisInRack.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Check.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chip.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassCreation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassDeletion.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassIndication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassModification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusterServiceAccessBySAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringSAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedCollections.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedMSEs.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfMSEs.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfSensors.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CompatibleProduct.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Component.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemDMA.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemIRQ.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemMappedIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemPackage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Configuration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectedTo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectorOnPackage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Container.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ControlledBy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Controller.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CoolingDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CopyFileAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CreateDirectoryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CurrentSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DMA.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DataFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Dependency.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DependencyContext.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DesktopMonitor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceAccessedByFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceErrorCounts.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSAPImplementation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceServiceImplementation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSoftware.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Directory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryContainsFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecificationFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiscreteSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskSpaceCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DisketteDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Display.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Docked.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementCapacity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementsLinked.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Error.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ErrorCountersForDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExecuteProgram.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Export.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExtraCapacityGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRU.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUIncludesProduct.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUPhysicalElements.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Fan.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileStorage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FlatPanel.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectoryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectorySpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HeatPipe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedAccessPoint.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootSAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedFileSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedJobDestination.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_IRQ.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Indication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InfraredController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstCreation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstDeletion.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstIndication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstModification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledOS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledSoftwareElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Job.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestination.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestinationJobs.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Keyboard.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LinkHasConnector.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LocalFileSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Location.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnVolumeSet.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalIdentity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MagnetoOpticalDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagedSystemElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagementController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaAccessDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaPresent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Memory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCapacity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryMappedIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryOnCard.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryWithMedia.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ModifySettingAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorResolution.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Mount.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MultiStateSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NFS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NonVolatileStorage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NumericSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSProcess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSVersionCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystemSoftwareFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCIController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCMCIAController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCVideoController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PExtentRedundancyComponent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PSExtentBasedOnPExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageAlarm.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageCooling.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInChassis.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInSlot.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageTempSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackagedComponent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParallelController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParticipatesInSet.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalCapacity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalComponent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalConnector.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElementLocation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalFrame.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalLink.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMedia.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalPackage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PointingDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PotsModem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PowerSupply.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Printer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Process.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessExecutable.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessThread.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Processor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Product.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductFRU.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductParentChild.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductPhysicalElements.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductProductDependency.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSoftwareFeatures.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSupport.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProtectedSpaceExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Rack.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Realizes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesAggregatePExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesDiskPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesPExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RebootAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyComponent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Refrigeration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RelatedStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoteFileSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveDirectoryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveFileAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ReplacementSet.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ResidesOnExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RunningOS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SAPSAPDependency.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIInterface.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Scanner.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Sensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialInterface.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Service.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessBySAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessPoint.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceSAPDependency.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceServiceDependency.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Setting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingContext.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Slot.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SlotInSlot.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementActions.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementChecks.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementVersionCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSAPImplementation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureServiceImplementation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSoftwareElements.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SpareGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StatisticalInformation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Statistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageDefect.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageError.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageRedundancyGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SupportAccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SwapSpaceCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_System.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemComponent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Tachometer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TapeDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TemperatureSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Thread.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectoryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectorySpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBControllerHasHub.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBHub.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UninterruptiblePowerSupply.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UnitaryComputerSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UserDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VersionCompatibilityCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeatureVideoBIOSElements.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoControllerResolution.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolatileStorage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VoltageSensor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolumeSet.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_WORMDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassCreationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassDeletionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ConsumerFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_CIMStatusCode.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorSourceFormat.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorType.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_PerceivedSeverity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ProbableCause.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Event.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumerProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventDroppedEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventFilter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventGenerator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventQueueOverflowEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtendedStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtrinsicEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FilterToConsumerBinding.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_HealthStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_LastSyncStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirection_RedirectionType.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IndicationRelated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Indication_PerceivedSeverity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceCreationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceDeletionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IntervalTimerInstruction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_ExtendedStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvAccessCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvCancelQuery.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvClientConnected.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvNewQuery.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadAccount.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadServiceState.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBootSystemDriversFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailedII.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyAuto.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyDemand.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetConnectionTimeout.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailedII.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetReadfileTimeout.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetRevertedToLastKnownGood.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceConfigBackoutFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceControlSuccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrash.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrashNoAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceDifferentPIDConnected.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailedSpecific.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceLogonTypeNotGranted.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceNotInteractive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceRecoveryFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceShutdownFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceSlowStartup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedII.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedNone.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartHung.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartTypeChanged.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStatusSuccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStopControlSuccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetSevereServiceFailed.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTakeOwnership.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactInvalid.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactTimeout.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_PlatformIdentifier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEventLogEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WMI_GenericNonCOMEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiCancelNotificationSink.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderLoaded.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkLoaded.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkUnloaded.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderUnloaded.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiError.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiEssEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterActivated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterDeactivated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiProviderEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiRegisterNotificationSink.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiSelfEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadCreated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadDeleted.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodInvocationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_Providers.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_Counters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Post.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Pre.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_UnLoadOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTEventlogProviderConfig.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTLMUser9X.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Namespace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceCreationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceDeletionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NotifyStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration_InteractionType.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PARAMETERS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Color.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_DitherType.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMIntent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMMethod.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_MediaType.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Orientation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_PrintQuality.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_TTOption.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterDriver_Version.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedDetectedErrorState.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedPrinterStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_PrinterState.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PropertyProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Provider.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/QOSFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryKeyChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryTreeChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryValueChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingProfileBackgroundUploadParams_SchedulingMethod.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingUserHealthConfiguration_HealthStatusForTempProfiles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ScriptingStandardConsumerSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityDescriptor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityRelatedClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingProduct.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingTokenActivationLicense.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/StdRegProv.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemSecurity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TCPIPPrinterPort_Protocol.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerInstruction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerNextFiring.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Trustee.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserProfile_HealthStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_FolderRedirection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_OfflineFiles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_RoamingUserProfile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_ImpersonationLevel.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_InitializationReentrancy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394Controller.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394ControllerDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ACE.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Account.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AccountSID.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActionCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActiveRoute.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AllocatedResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationCommandLine.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AssociatedProcessorMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AutochkSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BIOS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseBoard.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Battery.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Binary.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BindImageAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BootConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Bus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CDROMDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CIMLogicalDeviceCIMDataFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationClasses.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationSettings.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CacheMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CheckCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassInfoAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMApplicationClasses.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSettings.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClientApplicationSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClusterShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CodecFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CollectionStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassAutoEmulator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassEmulator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CommandLineAccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComponentCategory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerShutdownEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProduct.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Condition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ConnectionShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ControllerHasHub.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CreateFolderAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentProbe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentTime.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationAccessAllowedSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationLaunchAllowedSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DMAChannel.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DefragAnalysis.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DependentService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Desktop.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DesktopMonitor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceBus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceMemoryAddress.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceSettings.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNode.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNodeTarget.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsTarget.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Directory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DirectorySpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrivePhysicalMedia.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDriveToDiskPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskQuota.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayControllerConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DriverForDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DuplicateFileAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Environment.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_EnvironmentSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ExtensionInfoAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Fan.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FileSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealth.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealthConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionUserConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FontInfoAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Group.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupInDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupUser.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_HeatPipe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEControllerDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4PersistedRouteTable.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTable.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTableEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IRQResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ImplementedCategory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InfraredDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IniFileSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledProgramFramework.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledSoftwareElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledStoreProgram.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledWin32Program.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_JobObjectStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Keyboard.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUID.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUIDandAttributes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LaunchCondition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceDependencies.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceMembers.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LocalTime.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoggedOnUser.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskRootDirectory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskToPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAuditing.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileOwner.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileSecuritySetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupDirectory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItemDataFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAuditing.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareSecuritySetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSessionMappedDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MIMEInfoAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MSIResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ManagedSystemElementResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MappedLogicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArray.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArrayLocation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceArray.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceLocation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MethodParameterClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleLoadTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MotherboardDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MountPoint.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MoveFileAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTEventlogFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventComputer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventLog.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventUser.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObject.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectActgInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimit.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimitSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectProcess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimit.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimitSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkClient.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkLoginProfile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkProtocol.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCAttribute.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceAttribute.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverAttribute.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSoftwareElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCSourceAttribute.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCTranslatorSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OSRecoveryConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesAssociatedItems.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesBackgroundSync.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesChangeInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesConnectionInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDirtyInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDiskSpaceLimit.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesFileSysInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesHealth.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesItem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesMachineConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesPinInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesSuspendInfo.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesUserConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OnBoardDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemAutochkSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemQFE.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OptionalFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PCMCIAController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PNPAllocatedResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModemToSerialPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileElementSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileUsage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ParallelPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Patch.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchPackage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Perf.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothRadio.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_DNS64Global.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventLog.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindows.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindowsSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_FileSystemDiskActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSGlobal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecConnections.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDoSProtection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_KPSSVC.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Netlogon.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_NetworkQoSPolicy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerFlow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerPipe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectECUtilization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectQueueDepth.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PowerShellWorkflow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ProcessorInformation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RDMAActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ReFS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXGraphics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXNetwork.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBClientShares.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBDirectConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerSessions.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerShares.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterFlow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesDrt.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesTier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesWriteCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Synchronization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SynchronizationNuma.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoClient.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoRelay.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ThermalZoneInformation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPClassify.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPReauthorization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WSManQuotaStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCICommonBuffer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCIInterrupter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCITransferRing.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_DdmCounterProvider_RAS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_Database.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseDatabases.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseInstances.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseTableClasses.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperProcess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LocalSessionManager_TerminalServices.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRData_NETCLRData.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRExceptions.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRInterop.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRJit.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLoading.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRRemoting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRSecurity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_ClientSideCaching.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_OfflineFiles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_LogicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_PhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Browser.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Redirector.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Server.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_ServerWorkQueues.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Cache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Memory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_NUMANodeMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Objects.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_PagingFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Processor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_System.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObject.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObjectDetails.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Process.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Thread.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_PowerMeter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASTotal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Spooler_PrintQueue.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NBTConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkInterface.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TermService_TerminalServicesSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNAT.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATICMP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATInstance.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATTCP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATUDP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WnvCounters_NetworkVirtualization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_tapisrv_Telephony.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_usbhub_USB.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResources.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothRadio.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_DNS64Global.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventLog.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindows.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindowsSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_FileSystemDiskActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceRequestQueues.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceUrlGroups.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualStorageDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSGlobal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecConnections.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDoSProtection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_KPSSVC.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Netlogon.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_NetworkQoSPolicy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerFlow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerPipe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectECUtilization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectQueueDepth.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveFilters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectTransmitCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PowerShellWorkflow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ProcessorInformation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RDMAActivity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ReFS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXGraphics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXNetwork.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBClientShares.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBDirectConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerSessions.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerShares.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecurityPerProcessStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecuritySystemWideStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterFlow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesDrt.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesTier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesWriteCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Synchronization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SynchronizationNuma.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoClient.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoRelay.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ThermalZoneInformation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPClassify.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPReauthorization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WSManQuotaStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCICommonBuffer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCIInterrupter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCITransferRing.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_DdmCounterProvider_RAS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_Database.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseDatabases.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseInstances.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseTableClasses.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUEngine.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperProcess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LocalSessionManager_TerminalServices.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecurityPerProcessStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecuritySystemWideStatistics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRData_NETCLRData.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRExceptions.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRInterop.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRJit.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLoading.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRRemoting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRSecurity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_ClientSideCaching.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_OfflineFiles.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_LogicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_PhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Browser.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Redirector.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Server.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_ServerWorkQueues.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Cache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Memory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_NUMANodeMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Objects.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_PagingFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Processor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_System.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObject.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObjectDetails.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Process.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Thread.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_EnergyMeter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_PowerMeter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASTotal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelService4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Spooler_PrintQueue.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NBTConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkAdapter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkInterface.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv4.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv6.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TermService_TerminalServicesSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNAT.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATICMP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATInstance.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATTCP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATUDP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WnvCounters_NetworkVirtualization.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_tapisrv_Telephony.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_usbhub_USB.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMedia.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryArray.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryLocation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PingStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDeviceProperty.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBinary.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBoolean.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBooleanArray.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyDateTime.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptorArray.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint64.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyString.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyStringArray.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32Array.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint64.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint8.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPEntity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriverCIMDataFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PointingDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortConnector.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortableBattery.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PowerManagementEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrintJob.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Printer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriverDll.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrivilegesStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Process.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStopTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Processor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Product.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductSoftwareFeatures.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgIDSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupContents.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupOrItem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Property.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProtocolBinding.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PublishComponentAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuickFixEngineering.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuotaSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Refrigeration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Registry.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RegistryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Reliability.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityRecords.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityStabilityMetrics.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveFileAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveIniAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReserveCost.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileBackgroundUploadParams.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileMachineConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileSlowLinkParams.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileUserConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingUserHealthConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIControllerDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SID.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SIDandAttributes.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SMBIOSMemory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ScheduledJob.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptorHelper.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAccess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAuditing.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfObject.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOwner.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SelfRegModuleAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Service.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceControl.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecificationService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Session.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionProcess.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SettingCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowBy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowContext.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowCopy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowDiffVolumeSupport.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowFor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowOn.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowProvider.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowStorage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowVolumeSupport.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Share.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShareToDirectory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutFile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutSAP.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElement.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCondition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeature.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureCheck.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureParent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureSoftwareElements.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoundDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_StartupCommand.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubDirectory.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubSession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemAccount.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBIOS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBootConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemConfigurationChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDesktop.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDevices.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriverPNPEntity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemEnclosure.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemLoadOrderGroups.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemMemoryResource.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemNetworkConnections.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemOperatingSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemPartitions.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProcesses.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProgramGroups.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemResources.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemServices.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSlot.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSystemDriver.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTimeZone.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemUsers.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TCPIPPrinterPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TapeDrive.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TemperatureProbe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TerminalService.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Thread.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStartTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStopTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadTrace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TimeZone.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenGroups.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenPrivileges.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Trustee.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TypeLibraryAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBControllerDevice.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBHub.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UTCTime.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserAccount.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserDesktop.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserInDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserProfile.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserStateConfigurationControls.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoController.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoSettings.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VoltageProbe.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Volume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuota.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuotaSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeUserQuota.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMIElementSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMISetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WinSAT.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/WinSAT_WinSATAssessmentState.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/cimv2/thisNAMESPACE.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ACE.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AbsoluteTimerInstruction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AggregateEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassCreation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassDeletion.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassIndication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassModification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Error.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Indication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstCreation.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstDeletion.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstIndication.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstModification.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassCreationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassDeletionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ConsumerFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Event.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumerProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventDroppedEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventFilter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventGenerator.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventQueueOverflowEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtendedStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtrinsicEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/FilterToConsumerBinding.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IndicationRelated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Indication_PerceivedSeverity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceCreationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceDeletionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IntervalTimerInstruction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DedupProperties.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Disk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImage.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImageToVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToStorageReliabilityCounter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ExtendedStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileIntegrity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToFileShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShareAccessControlEntry.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileStorageTier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthAction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthActionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecord.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordReal64.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordUInt64.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorId.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorIdToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSIConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSISession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSITarget.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSet.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToInitiatorId.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToTargetPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_OffloadDataTransferSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Partition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToReplicaPeer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDiskToStorageReliabilityCounter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalExtent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicaPeer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationCapabilities.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToReplicaPeer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationSettings.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ResiliencySetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetCacheConfiguration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_EmptyCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotAuthenticated.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotInCache.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_RelativePath.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageAlertEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageArrivalEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageChassis.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDepartureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDiagnoseResult.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosure.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosureToPhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageExtendedStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomainToStorageFaultDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealth.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthReport.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthStatusChangeEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJob.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobOutParams.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobToAffectedStorageObject.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNode.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToPhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStorageEnclosure.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStoragePool.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageObject.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePool.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToPhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToResiliencySetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToStorageTier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProvider.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProviderToStorageSubSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSFlow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyStore.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToChildPolicy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToFlow.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageRack.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageReliabilityCounter.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageScaleUnit.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSite.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystem.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileServer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToInitiatorId.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToMaskingSet.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToOffloadDataTransferSetting.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPartition.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicaPeer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationCapabilities.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationGroup.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageEnclosure.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageFaultDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageHealth.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageNode.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStoragePool.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVolume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageTier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Synchronized.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPort.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToTargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToPhysicalDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToReplicaPeer.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageFaultDomain.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageTier.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToVirtualDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VolumeToFileShare.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume_Repair_AsyncOutput.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_WmiError.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToiSCSITargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToDisk.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSIConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSITargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITarget.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSIConnection.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSISession.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSITargetPortal.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodInvocationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NTLMUser9X.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Namespace.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceCreationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceDeletionEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceModificationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceOperationEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NotifyStatus.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration_InteractionType.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PARAMETERS.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PS_StorageCmdlets.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PropertyProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Provider.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ProviderRegistration.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/QOSFailureEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityDescriptor.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityRelatedClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemClass.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemSecurity.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerEvent.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerInstruction.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerNextFiring.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Trustee.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_ImpersonationLevel.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_InitializationReentrancy.go create mode 100644 vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/thisNAMESPACE.go create mode 100644 vendor/github.com/go-ole/go-ole/.travis.yml create mode 100644 vendor/github.com/go-ole/go-ole/ChangeLog.md create mode 100644 vendor/github.com/go-ole/go-ole/LICENSE create mode 100644 vendor/github.com/go-ole/go-ole/README.md create mode 100644 vendor/github.com/go-ole/go-ole/SECURITY.md create mode 100644 vendor/github.com/go-ole/go-ole/appveyor.yml create mode 100644 vendor/github.com/go-ole/go-ole/com.go create mode 100644 vendor/github.com/go-ole/go-ole/com_func.go create mode 100644 vendor/github.com/go-ole/go-ole/connect.go create mode 100644 vendor/github.com/go-ole/go-ole/constants.go create mode 100644 vendor/github.com/go-ole/go-ole/error.go create mode 100644 vendor/github.com/go-ole/go-ole/error_func.go create mode 100644 vendor/github.com/go-ole/go-ole/error_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/guid.go create mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint.go create mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go create mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go create mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go create mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/idispatch.go create mode 100644 vendor/github.com/go-ole/go-ole/idispatch_func.go create mode 100644 vendor/github.com/go-ole/go-ole/idispatch_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant.go create mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant_func.go create mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/iinspectable.go create mode 100644 vendor/github.com/go-ole/go-ole/iinspectable_func.go create mode 100644 vendor/github.com/go-ole/go-ole/iinspectable_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo.go create mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go create mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo.go create mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo_func.go create mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/iunknown.go create mode 100644 vendor/github.com/go-ole/go-ole/iunknown_func.go create mode 100644 vendor/github.com/go-ole/go-ole/iunknown_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/ole.go create mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection.go create mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection_func.go create mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/oleutil/go-get.go create mode 100644 vendor/github.com/go-ole/go-ole/oleutil/oleutil.go create mode 100644 vendor/github.com/go-ole/go-ole/safearray.go create mode 100644 vendor/github.com/go-ole/go-ole/safearray_func.go create mode 100644 vendor/github.com/go-ole/go-ole/safearray_windows.go create mode 100644 vendor/github.com/go-ole/go-ole/safearrayconversion.go create mode 100644 vendor/github.com/go-ole/go-ole/safearrayslices.go create mode 100644 vendor/github.com/go-ole/go-ole/utility.go create mode 100644 vendor/github.com/go-ole/go-ole/variables.go create mode 100644 vendor/github.com/go-ole/go-ole/variant.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_386.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_amd64.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_arm.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_arm64.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_date_386.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_date_amd64.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_date_arm.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_date_arm64.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_ppc64le.go create mode 100644 vendor/github.com/go-ole/go-ole/variant_s390x.go create mode 100644 vendor/github.com/go-ole/go-ole/vt_string.go create mode 100644 vendor/github.com/go-ole/go-ole/winrt.go create mode 100644 vendor/github.com/go-ole/go-ole/winrt_doc.go diff --git a/go.mod b/go.mod index b7b37f23..c5e1e828 100644 --- a/go.mod +++ b/go.mod @@ -1,12 +1,16 @@ module github.com/kubernetes-csi/csi-proxy -go 1.20 +go 1.22 + +toolchain go1.23.2 require ( github.com/Microsoft/go-winio v0.6.1 + github.com/go-ole/go-ole v1.3.0 github.com/google/go-cmp v0.6.0 github.com/iancoleman/strcase v0.3.0 github.com/kubernetes-csi/csi-proxy/client v0.0.0-00010101000000-000000000000 + github.com/microsoft/wmi v0.23.0 github.com/pkg/errors v0.9.1 github.com/sergi/go-diff v1.3.1 github.com/spf13/pflag v1.0.5 diff --git a/go.sum b/go.sum index 778f8c09..61312254 100644 --- a/go.sum +++ b/go.sum @@ -16,6 +16,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -50,6 +52,8 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/mauriciopoppe/gengo v0.0.0-20210525224835-9c78f58f3486 h1:+l047vEi0SyAzdVToIaAcfoY5DwwGW+OyqTdH/P3TTg= github.com/mauriciopoppe/gengo v0.0.0-20210525224835-9c78f58f3486/go.mod h1:xXv3T4UXTLta31wMhVezwVkc26OLei4hMbLeBJbPmxc= +github.com/microsoft/wmi v0.23.0 h1:EbgjakKBOfb4QaTJNiGkfKrb2RWv7wpyicI2g3DHWkw= +github.com/microsoft/wmi v0.23.0/go.mod h1:PNc5VFG7cpB7VOb3ILZNuWMWsqFfYLPyzpoiFkA6fAQ= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -85,10 +89,12 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/pkg/cim/disk.go b/pkg/cim/disk.go new file mode 100644 index 00000000..57f7673e --- /dev/null +++ b/pkg/cim/disk.go @@ -0,0 +1,60 @@ +package cim + +import ( + "fmt" + "strconv" + + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/server2019/root/microsoft/windows/storage" +) + +const ( + // PartitionStyleUnknown indicates an unknown partition table format + PartitionStyleUnknown = 0 + // PartitionStyleGPT indicates the disk uses GUID Partition Table (GPT) format + PartitionStyleGPT = 2 + + // GPTPartitionTypeBasicData is the GUID for basic data partitions in GPT + // Used for general purpose storage partitions + GPTPartitionTypeBasicData = "{ebd0a0a2-b9e5-4433-87c0-68b6b72699c7}" + // GPTPartitionTypeMicrosoftReserved is the GUID for Microsoft Reserved Partition (MSR) + // Reserved by Windows for system use + GPTPartitionTypeMicrosoftReserved = "{e3c9e316-0b5c-4db8-817d-f92df00215ae}" +) + +// QueryDiskByNumber retrieves disk information for a specific disk identified by its number. +func QueryDiskByNumber(diskNumber uint32, selectorList []string) (*storage.MSFT_Disk, error) { + diskQuery := query.NewWmiQueryWithSelectList("MSFT_Disk", selectorList, "Number", strconv.Itoa(int(diskNumber))) + instances, err := QueryInstances(WMINamespaceStorage, diskQuery) + if err != nil { + return nil, err + } + + disk, err := storage.NewMSFT_DiskEx1(instances[0]) + if err != nil { + return nil, fmt.Errorf("failed to query disk %d. error: %v", diskNumber, err) + } + + return disk, nil +} + +// ListDisks retrieves information about all available disks. +func ListDisks(selectorList []string) ([]*storage.MSFT_Disk, error) { + diskQuery := query.NewWmiQueryWithSelectList("MSFT_Disk", selectorList) + instances, err := QueryInstances(WMINamespaceStorage, diskQuery) + if IgnoreNotFound(err) != nil { + return nil, err + } + + var disks []*storage.MSFT_Disk + for _, instance := range instances { + disk, err := storage.NewMSFT_DiskEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query disk %v. error: %v", instance, err) + } + + disks = append(disks, disk) + } + + return disks, nil +} diff --git a/pkg/cim/iscsi.go b/pkg/cim/iscsi.go new file mode 100644 index 00000000..40472ca6 --- /dev/null +++ b/pkg/cim/iscsi.go @@ -0,0 +1,271 @@ +package cim + +import ( + "fmt" + "strconv" + + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "github.com/microsoft/wmi/server2019/root/microsoft/windows/storage" +) + +// ListISCSITargetPortals retrieves a list of iSCSI target portals. +func ListISCSITargetPortals(selectorList []string) ([]*storage.MSFT_iSCSITargetPortal, error) { + q := query.NewWmiQueryWithSelectList("MSFT_IscsiTargetPortal", selectorList) + instances, err := QueryInstances(WMINamespaceStorage, q) + if IgnoreNotFound(err) != nil { + return nil, err + } + + var targetPortals []*storage.MSFT_iSCSITargetPortal + for _, instance := range instances { + portal, err := storage.NewMSFT_iSCSITargetPortalEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query iSCSI target portal %v. error: %v", instance, err) + } + + targetPortals = append(targetPortals, portal) + } + + return targetPortals, nil +} + +// QueryISCSITargetPortal retrieves information about a specific iSCSI target portal +// identified by its network address and port number. +func QueryISCSITargetPortal(address string, port uint32, selectorList []string) (*storage.MSFT_iSCSITargetPortal, error) { + portalQuery := query.NewWmiQueryWithSelectList( + "MSFT_iSCSITargetPortal", selectorList, + "TargetPortalAddress", address, + "TargetPortalPortNumber", strconv.Itoa(int(port))) + instances, err := QueryInstances(WMINamespaceStorage, portalQuery) + if err != nil { + return nil, err + } + + targetPortal, err := storage.NewMSFT_iSCSITargetPortalEx1(instances[0]) + if err != nil { + return nil, fmt.Errorf("failed to query iSCSI target portal at (%s:%d). error: %v", address, port, err) + } + + return targetPortal, nil +} + +// NewISCSITargetPortal creates a new iSCSI target portal. +func NewISCSITargetPortal(targetPortalAddress string, + targetPortalPortNumber uint32, + initiatorInstanceName *string, + initiatorPortalAddress *string, + isHeaderDigest *bool, + isDataDigest *bool) (*storage.MSFT_iSCSITargetPortal, error) { + params := map[string]interface{}{ + "TargetPortalAddress": targetPortalAddress, + "TargetPortalPortNumber": targetPortalPortNumber, + } + if initiatorInstanceName != nil { + params["InitiatorInstanceName"] = *initiatorInstanceName + } + if initiatorPortalAddress != nil { + params["InitiatorPortalAddress"] = *initiatorPortalAddress + } + if isHeaderDigest != nil { + params["IsHeaderDigest"] = *isHeaderDigest + } + if isDataDigest != nil { + params["IsDataDigest"] = *isDataDigest + } + result, _, err := InvokeCimMethod(WMINamespaceStorage, "MSFT_iSCSITargetPortal", "New", params) + if err != nil { + return nil, fmt.Errorf("failed to create iSCSI target portal with %v. result: %d, error: %v", params, result, err) + } + + return QueryISCSITargetPortal(targetPortalAddress, targetPortalPortNumber, nil) +} + +var ( + // Indexes iSCSI targets by their Object ID specified in node address + mappingISCSITargetIndexer = mappingObjectRefIndexer("iSCSITarget", "MSFT_iSCSITarget", "NodeAddress") + // Indexes iSCSI target portals by their Object ID specified in portal address + mappingISCSITargetPortalIndexer = mappingObjectRefIndexer("iSCSITargetPortal", "MSFT_iSCSITargetPortal", "TargetPortalAddress") + // Indexes iSCSI connections by their Object ID specified in connection identifier + mappingISCSIConnectionIndexer = mappingObjectRefIndexer("iSCSIConnection", "MSFT_iSCSIConnection", "ConnectionIdentifier") + // Indexes iSCSI sessions by their Object ID specified in session identifier + mappingISCSISessionIndexer = mappingObjectRefIndexer("iSCSISession", "MSFT_iSCSISession", "SessionIdentifier") + + // Indexes iSCSI targets by their node address + iscsiTargetIndexer = stringPropertyIndexer("NodeAddress") + // Indexes iSCSI targets by their target portal address + iscsiTargetPortalIndexer = stringPropertyIndexer("TargetPortalAddress") + // Indexes iSCSI connections by their connection identifier + iscsiConnectionIndexer = stringPropertyIndexer("ConnectionIdentifier") + // Indexes iSCSI sessions by their session identifier + iscsiSessionIndexer = stringPropertyIndexer("SessionIdentifier") +) + +// ListISCSITargetToISCSITargetPortalMapping builds a mapping between iSCSI target and iSCSI target portal with iSCSI target as the key. +func ListISCSITargetToISCSITargetPortalMapping() (map[string]string, error) { + return ListWMIInstanceMappings(WMINamespaceStorage, "MSFT_iSCSITargetToiSCSITargetPortal", nil, mappingISCSITargetIndexer, mappingISCSITargetPortalIndexer) +} + +// ListISCSIConnectionToISCSITargetMapping builds a mapping between iSCSI connection and iSCSI target with iSCSI connection as the key. +func ListISCSIConnectionToISCSITargetMapping() (map[string]string, error) { + return ListWMIInstanceMappings(WMINamespaceStorage, "MSFT_iSCSITargetToiSCSIConnection", nil, mappingISCSIConnectionIndexer, mappingISCSITargetIndexer) +} + +// ListISCSISessionToISCSITargetMapping builds a mapping between iSCSI session and iSCSI target with iSCSI session as the key. +func ListISCSISessionToISCSITargetMapping() (map[string]string, error) { + return ListWMIInstanceMappings(WMINamespaceStorage, "MSFT_iSCSITargetToiSCSISession", nil, mappingISCSISessionIndexer, mappingISCSITargetIndexer) +} + +// ListDiskToISCSIConnectionMapping builds a mapping between disk and iSCSI connection with disk Object ID as the key. +func ListDiskToISCSIConnectionMapping() (map[string]string, error) { + return ListWMIInstanceMappings(WMINamespaceStorage, "MSFT_iSCSIConnectionToDisk", nil, mappingObjectRefIndexer("Disk", "MSFT_Disk", "ObjectId"), mappingISCSIConnectionIndexer) +} + +// ListISCSITargetsByTargetPortalWithFilters retrieves all iSCSI targets from the specified iSCSI target portal and conditions by query filters. +func ListISCSITargetsByTargetPortalWithFilters(targetSelectorList []string, portals []*storage.MSFT_iSCSITargetPortal, filters ...*query.WmiQueryFilter) ([]*storage.MSFT_iSCSITarget, error) { + targetQuery := query.NewWmiQueryWithSelectList("MSFT_iSCSITarget", targetSelectorList) + targetQuery.Filters = append(targetQuery.Filters, filters...) + instances, err := QueryInstances(WMINamespaceStorage, targetQuery) + if err != nil { + return nil, err + } + + var portalInstances []*cim.WmiInstance + for _, portal := range portals { + portalInstances = append(portalInstances, portal.WmiInstance) + } + + targetToTargetPortalMapping, err := ListISCSITargetToISCSITargetPortalMapping() + if err != nil { + return nil, err + } + + targetInstances, err := FindInstancesByMapping(instances, iscsiTargetIndexer, portalInstances, iscsiTargetPortalIndexer, targetToTargetPortalMapping) + if err != nil { + return nil, err + } + + var targets []*storage.MSFT_iSCSITarget + for _, instance := range targetInstances { + target, err := storage.NewMSFT_iSCSITargetEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query iSCSI target %v. %v", instance, err) + } + + targets = append(targets, target) + } + + return targets, nil +} + +// QueryISCSITarget retrieves the iSCSI target from the specified portal address, portal and node address. +func QueryISCSITarget(address string, port uint32, nodeAddress string, selectorList []string) (*storage.MSFT_iSCSITarget, error) { + portal, err := QueryISCSITargetPortal(address, port, nil) + if err != nil { + return nil, err + } + + targets, err := ListISCSITargetsByTargetPortalWithFilters(selectorList, []*storage.MSFT_iSCSITargetPortal{portal}, + query.NewWmiQueryFilter("NodeAddress", nodeAddress, query.Equals)) + if err != nil { + return nil, err + } + + return targets[0], nil +} + +// QueryISCSISessionByTarget retrieves the iSCSI session from the specified iSCSI target. +func QueryISCSISessionByTarget(target *storage.MSFT_iSCSITarget, selectorList []string) (*storage.MSFT_iSCSISession, error) { + sessionQuery := query.NewWmiQueryWithSelectList("MSFT_iSCSISession", selectorList) + sessionInstances, err := QueryInstances(WMINamespaceStorage, sessionQuery) + if err != nil { + return nil, err + } + + targetToTargetSessionMapping, err := ListISCSISessionToISCSITargetMapping() + if err != nil { + return nil, err + } + + filtered, err := FindInstancesByMapping(sessionInstances, iscsiSessionIndexer, []*cim.WmiInstance{target.WmiInstance}, iscsiTargetIndexer, targetToTargetSessionMapping) + if err != nil { + return nil, err + } + + session, err := storage.NewMSFT_iSCSISessionEx1(filtered[0]) + return session, err +} + +// ListDisksByTarget lists all the disks on the specified iSCSI target. +func ListDisksByTarget(target *storage.MSFT_iSCSITarget, selectorList []string) ([]*storage.MSFT_Disk, error) { + // list connections to the given iSCSI target + connectionQuery := query.NewWmiQueryWithSelectList("MSFT_iSCSIConnection", selectorList) + connectionInstances, err := QueryInstances(WMINamespaceStorage, connectionQuery) + if err != nil { + return nil, err + } + + connectionToTargetMapping, err := ListISCSIConnectionToISCSITargetMapping() + if err != nil { + return nil, err + } + + connectionsToTarget, err := FindInstancesByMapping(connectionInstances, iscsiConnectionIndexer, []*cim.WmiInstance{target.WmiInstance}, iscsiTargetIndexer, connectionToTargetMapping) + if err != nil { + return nil, err + } + + disks, err := ListDisks(selectorList) + if err != nil { + return nil, err + } + + var diskInstances []*cim.WmiInstance + for _, disk := range disks { + diskInstances = append(diskInstances, disk.WmiInstance) + } + + diskToConnectionMapping, err := ListDiskToISCSIConnectionMapping() + if err != nil { + return nil, err + } + + filtered, err := FindInstancesByMapping(diskInstances, objectIDPropertyIndexer, connectionsToTarget, iscsiConnectionIndexer, diskToConnectionMapping) + if err != nil { + return nil, err + } + + var filteredDisks []*storage.MSFT_Disk + for _, instance := range filtered { + disk, err := storage.NewMSFT_DiskEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query disk %v. error: %v", disk, err) + } + + filteredDisks = append(filteredDisks, disk) + } + return filteredDisks, err +} + +// ConnectISCSITarget establishes a connection to an iSCSI target with optional CHAP authentication credential. +func ConnectISCSITarget(portalAddress string, portalPortNumber uint32, nodeAddress string, authType string, chapUsername *string, chapSecret *string) (int, map[string]interface{}, error) { + inParams := map[string]interface{}{ + "NodeAddress": nodeAddress, + "TargetPortalAddress": portalAddress, + "TargetPortalPortNumber": int(portalPortNumber), + "AuthenticationType": authType, + } + // InitiatorPortalAddress + // IsDataDigest + // IsHeaderDigest + // ReportToPnP + if chapUsername != nil { + inParams["ChapUsername"] = *chapUsername + } + if chapSecret != nil { + inParams["ChapSecret"] = *chapSecret + } + + result, outParams, err := InvokeCimMethod(WMINamespaceStorage, "MSFT_iSCSITarget", "Connect", inParams) + return result, outParams, err +} diff --git a/pkg/cim/volume.go b/pkg/cim/volume.go new file mode 100644 index 00000000..d58a0494 --- /dev/null +++ b/pkg/cim/volume.go @@ -0,0 +1,241 @@ +package cim + +import ( + "fmt" + "strconv" + + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "github.com/microsoft/wmi/server2019/root/microsoft/windows/storage" +) + +// QueryVolumeByUniqueID retrieves a specific volume by its unique identifier, +// returning the first volume that matches the given volume ID. +func QueryVolumeByUniqueID(volumeID string, selectorList []string) (*storage.MSFT_Volume, error) { + var selectors []string + selectors = append(selectors, selectorList...) + selectors = append(selectors, "UniqueId") + volumeQuery := query.NewWmiQueryWithSelectList("MSFT_Volume", selectors) + instances, err := QueryInstances(WMINamespaceStorage, volumeQuery) + if err != nil { + return nil, err + } + + for _, instance := range instances { + volume, err := storage.NewMSFT_VolumeEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query volume (%s). error: %w", volumeID, err) + } + + uniqueID, err := volume.GetPropertyUniqueId() + if err != nil { + return nil, fmt.Errorf("failed to query volume unique ID (%s). error: %w", volumeID, err) + } + + if uniqueID == volumeID { + return volume, nil + } + } + + return nil, errors.NotFound +} + +// ListVolumes retrieves all available volumes on the system. +func ListVolumes(selectorList []string) ([]*storage.MSFT_Volume, error) { + diskQuery := query.NewWmiQueryWithSelectList("MSFT_Volume", selectorList) + instances, err := QueryInstances(WMINamespaceStorage, diskQuery) + if IgnoreNotFound(err) != nil { + return nil, err + } + + var volumes []*storage.MSFT_Volume + for _, instance := range instances { + volume, err := storage.NewMSFT_VolumeEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query volume %v. error: %v", instance, err) + } + + volumes = append(volumes, volume) + } + + return volumes, nil +} + +// ListPartitionsOnDisk retrieves all partitions or a partition with the specified number on a disk. +func ListPartitionsOnDisk(diskNumber, partitionNumber uint32, selectorList []string) ([]*storage.MSFT_Partition, error) { + filters := []*query.WmiQueryFilter{ + query.NewWmiQueryFilter("DiskNumber", strconv.Itoa(int(diskNumber)), query.Equals), + } + if partitionNumber > 0 { + filters = append(filters, query.NewWmiQueryFilter("PartitionNumber", strconv.Itoa(int(partitionNumber)), query.Equals)) + } + return ListPartitionsWithFilters(selectorList, filters...) +} + +// ListPartitionsWithFilters retrieves all partitions matching with the conditions specified by query filters. +func ListPartitionsWithFilters(selectorList []string, filters ...*query.WmiQueryFilter) ([]*storage.MSFT_Partition, error) { + partitionQuery := query.NewWmiQueryWithSelectList("MSFT_Partition", selectorList) + partitionQuery.Filters = append(partitionQuery.Filters, filters...) + instances, err := QueryInstances(WMINamespaceStorage, partitionQuery) + if IgnoreNotFound(err) != nil { + return nil, err + } + + var partitions []*storage.MSFT_Partition + for _, instance := range instances { + part, err := storage.NewMSFT_PartitionEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query partition %v. error: %v", instance, err) + } + + partitions = append(partitions, part) + } + + return partitions, nil +} + +// ListPartitionToVolumeMappings builds a mapping between partition and volume with partition Object ID as the key. +func ListPartitionToVolumeMappings() (map[string]string, error) { + return ListWMIInstanceMappings(WMINamespaceStorage, "MSFT_PartitionToVolume", nil, + mappingObjectRefIndexer("Partition", "MSFT_Partition", "ObjectId"), + mappingObjectRefIndexer("Volume", "MSFT_Volume", "ObjectId"), + ) +} + +// ListVolumeToPartitionMappings builds a mapping between volume and partition with volume Object ID as the key. +func ListVolumeToPartitionMappings() (map[string]string, error) { + return ListWMIInstanceMappings(WMINamespaceStorage, "MSFT_PartitionToVolume", nil, + mappingObjectRefIndexer("Volume", "MSFT_Volume", "ObjectId"), + mappingObjectRefIndexer("Partition", "MSFT_Partition", "ObjectId"), + ) +} + +// FindPartitionsByVolume finds all partitions associated with the given volumes +// using partition-to-volume mapping. +func FindPartitionsByVolume(partitions []*storage.MSFT_Partition, volumes []*storage.MSFT_Volume) ([]*storage.MSFT_Partition, error) { + var partitionInstances []*cim.WmiInstance + for _, part := range partitions { + partitionInstances = append(partitionInstances, part.WmiInstance) + } + + var volumeInstances []*cim.WmiInstance + for _, volume := range volumes { + volumeInstances = append(volumeInstances, volume.WmiInstance) + } + + partitionToVolumeMappings, err := ListPartitionToVolumeMappings() + if err != nil { + return nil, err + } + + filtered, err := FindInstancesByObjectIDMapping(partitionInstances, volumeInstances, partitionToVolumeMappings) + if err != nil { + return nil, err + } + + var result []*storage.MSFT_Partition + for _, instance := range filtered { + part, err := storage.NewMSFT_PartitionEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query partition %v. error: %v", instance, err) + } + + result = append(result, part) + } + + return result, nil +} + +// FindVolumesByPartition finds all volumes associated with the given partitions +// using volume-to-partition mapping. +func FindVolumesByPartition(volumes []*storage.MSFT_Volume, partitions []*storage.MSFT_Partition) ([]*storage.MSFT_Volume, error) { + var volumeInstances []*cim.WmiInstance + for _, volume := range volumes { + volumeInstances = append(volumeInstances, volume.WmiInstance) + } + + var partitionInstances []*cim.WmiInstance + for _, part := range partitions { + partitionInstances = append(partitionInstances, part.WmiInstance) + } + + volumeToPartitionMappings, err := ListVolumeToPartitionMappings() + if err != nil { + return nil, err + } + + filtered, err := FindInstancesByObjectIDMapping(volumeInstances, partitionInstances, volumeToPartitionMappings) + if err != nil { + return nil, err + } + + var result []*storage.MSFT_Volume + for _, instance := range filtered { + volume, err := storage.NewMSFT_VolumeEx1(instance) + if err != nil { + return nil, fmt.Errorf("failed to query volume %v. error: %v", instance, err) + } + + result = append(result, volume) + } + + return result, nil +} + +// GetPartitionByVolumeUniqueID retrieves a specific partition from a volume identified by its unique ID. +func GetPartitionByVolumeUniqueID(volumeID string, partitionSelectorList []string) (*storage.MSFT_Partition, error) { + volume, err := QueryVolumeByUniqueID(volumeID, []string{"ObjectId"}) + if err != nil { + return nil, err + } + + partitions, err := ListPartitionsWithFilters(partitionSelectorList) + if err != nil { + return nil, err + } + + result, err := FindPartitionsByVolume(partitions, []*storage.MSFT_Volume{volume}) + if err != nil { + return nil, err + } + + return result[0], nil +} + +// GetVolumeByDriveLetter retrieves a volume associated with a specific drive letter. +func GetVolumeByDriveLetter(driveLetter string, partitionSelectorList []string) (*storage.MSFT_Volume, error) { + var selectorsForPart []string + selectorsForPart = append(selectorsForPart, partitionSelectorList...) + selectorsForPart = append(selectorsForPart, "ObjectId") + partitions, err := ListPartitionsWithFilters(selectorsForPart, query.NewWmiQueryFilter("DriveLetter", driveLetter, query.Equals)) + if err != nil { + return nil, err + } + + volumes, err := ListVolumes(partitionSelectorList) + if err != nil { + return nil, err + } + + result, err := FindVolumesByPartition(volumes, partitions) + if err != nil { + return nil, err + } + + if len(result) == 0 { + return nil, errors.NotFound + } + + return result[0], nil +} + +// GetPartitionDiskNumber retrieves the disk number associated with a given partition. +func GetPartitionDiskNumber(part *storage.MSFT_Partition) (uint32, error) { + diskNumber, err := part.GetProperty("DiskNumber") + if err != nil { + return 0, err + } + + return uint32(diskNumber.(int32)), nil +} diff --git a/pkg/cim/wmi.go b/pkg/cim/wmi.go new file mode 100644 index 00000000..d99aef95 --- /dev/null +++ b/pkg/cim/wmi.go @@ -0,0 +1,324 @@ +package cim + +import ( + "fmt" + "log" + "strings" + + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +const ( + WMINamespaceRoot = "Root\\CimV2" + WMINamespaceStorage = "Root\\Microsoft\\Windows\\Storage" + WMINamespaceSmb = "Root\\Microsoft\\Windows\\Smb" +) + +type InstanceHandler func(instance *cim.WmiInstance) (bool, error) + +// An InstanceIndexer provides index key to a WMI Instance in a map +type InstanceIndexer func(instance *cim.WmiInstance) (string, error) + +// NewWMISession creates a new local WMI session for the given namespace, defaulting +// to root namespace if none specified. +func NewWMISession(namespace string) (*cim.WmiSession, error) { + if namespace == "" { + namespace = WMINamespaceRoot + } + + sessionManager := cim.NewWmiSessionManager() + defer sessionManager.Dispose() + + session, err := sessionManager.GetLocalSession(namespace) + if err != nil { + return nil, fmt.Errorf("failed to get local WMI session for namespace %s. error: %w", namespace, err) + } + + connected, err := session.Connect() + if !connected || err != nil { + return nil, fmt.Errorf("failed to connect to WMI. error: %w", err) + } + + return session, nil +} + +// QueryFromWMI executes a WMI query in the specified namespace and processes each result +// through the provided handler function. Stops processing if handler returns false or encounters an error. +func QueryFromWMI(namespace string, query *query.WmiQuery, handler InstanceHandler) error { + session, err := NewWMISession(namespace) + if err != nil { + return err + } + + defer session.Close() + + instances, err := session.QueryInstances(query.String()) + if err != nil { + return fmt.Errorf("failed to query WMI class %s. error: %w", query.ClassName, err) + } + + if len(instances) == 0 { + return errors.NotFound + } + + var cont bool + for _, instance := range instances { + cont, err = handler(instance) + if err != nil { + err = fmt.Errorf("failed to query WMI class %s instance (%s). error: %w", query.ClassName, instance.String(), err) + } + if !cont { + break + } + } + + return err +} + +// QueryInstances retrieves all WMI instances matching the given query in the specified namespace. +func QueryInstances(namespace string, query *query.WmiQuery) ([]*cim.WmiInstance, error) { + var instances []*cim.WmiInstance + err := QueryFromWMI(namespace, query, func(instance *cim.WmiInstance) (bool, error) { + instances = append(instances, instance) + return true, nil + }) + return instances, err +} + +// TODO: fix the panic in microsoft/wmi library and remove this workaround +func executeNoParamClassMethodParam(classInst *cim.WmiInstance, method *cim.WmiMethod, outParam cim.WmiMethodParamCollection) (result *cim.WmiMethodResult, err error) { + log.Printf("[WMI] - Executing Method [%s]\n", method.Name) + + iDispatchInstance := classInst.GetIDispatch() + if iDispatchInstance == nil { + return nil, errors.Wrapf(errors.InvalidInput, "InvalidInstance") + } + rawResult, err := iDispatchInstance.GetProperty("Methods_") + if err != nil { + return nil, err + } + defer rawResult.Clear() + // Retrive the method + rawMethod, err := rawResult.ToIDispatch().CallMethod("Item", method.Name) + if err != nil { + return nil, err + } + defer rawMethod.Clear() + + result = &cim.WmiMethodResult{ + OutMethodParams: map[string]*cim.WmiMethodParam{}, + } + outparams, err := classInst.GetIDispatch().CallMethod("ExecMethod_", method.Name) + if err != nil { + return + } + defer outparams.Clear() + returnRaw, err := outparams.ToIDispatch().GetProperty("ReturnValue") + if err != nil { + return + } + defer returnRaw.Clear() + result.ReturnValue = returnRaw.Value().(int32) + log.Printf("[WMI] - Return [%d] ", result.ReturnValue) + + for _, outp := range outParam { + returnRawIn, err1 := outparams.ToIDispatch().GetProperty(outp.Name) + if err1 != nil { + err = err1 + return + } + defer returnRawIn.Clear() + + value, err1 := cim.GetVariantValue(returnRawIn) + if err1 != nil { + err = err1 + return + } + // log.Printf("OutParam [%s]=> [%+v]\n", outp.Name, value) + + result.OutMethodParams[outp.Name] = cim.NewWmiMethodParam(outp.Name, value) + } + return +} + +// InvokeCimMethod calls a static method on a specific WMI class with given input parameters, +// returning the method's return value, output parameters, and any error encountered. +func InvokeCimMethod(namespace, class, methodName string, inputParameters map[string]interface{}) (int, map[string]interface{}, error) { + session, err := NewWMISession(namespace) + if err != nil { + return -1, nil, err + } + + defer session.Close() + + rawResult, err := session.Session.CallMethod("Get", class) + if err != nil { + return -1, nil, err + } + + classInst, err := cim.CreateWmiInstance(rawResult, session) + if err != nil { + return -1, nil, err + } + + method, err := cim.NewWmiMethod(methodName, classInst) + if err != nil { + return -1, nil, err + } + + var inParam cim.WmiMethodParamCollection + for k, v := range inputParameters { + inParam = append(inParam, &cim.WmiMethodParam{ + Name: k, + Value: v, + }) + } + + var outParam cim.WmiMethodParamCollection + var result *cim.WmiMethodResult + if len(inParam) > 0 { + result, err = method.Execute(inParam, outParam) + } else { + result, err = executeNoParamClassMethodParam(classInst, method, outParam) + } + if err != nil { + return -1, nil, err + } + + outputParameters := make(map[string]interface{}) + for _, v := range result.OutMethodParams { + outputParameters[v.Name] = v.Value + } + + return int(result.ReturnValue), outputParameters, nil +} + +// IgnoreNotFound returns nil if the error is nil or a "not found" error, +// otherwise returns the original error. +func IgnoreNotFound(err error) error { + if err == nil || errors.IsNotFound(err) { + return nil + } + return err +} + +// parseObjectRef extracts the object ID from a WMI object reference string. +// The result string is in this format +// {1}\\WIN-8E2EVAQ9QSB\ROOT/Microsoft/Windows/Storage/Providers_v2\WSP_Partition.ObjectId="{b65bb3cd-da86-11ee-854b-806e6f6e6963}:PR:{00000000-0000-0000-0000-100000000000}\\?\scsi#disk&ven_vmware&prod_virtual_disk#4&2c28f6c4&0&000000#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}" +// from an escape string +func parseObjectRef(input, objectClass, refName string) (string, error) { + tokens := strings.Split(input, fmt.Sprintf("%s.%s=", objectClass, refName)) + if len(tokens) < 2 { + return "", fmt.Errorf("invalid object ID value: %s", input) + } + + objectID := tokens[1] + objectID = strings.ReplaceAll(objectID, "\\\"", "\"") + objectID = strings.ReplaceAll(objectID, "\\\\", "\\") + objectID = objectID[1 : len(objectID)-1] + return objectID, nil +} + +// ListWMIInstanceMappings queries WMI instances and creates a map using custom indexing functions +// to extract keys and values from each instance. +func ListWMIInstanceMappings(namespace, mappingClassName string, selectorList []string, keyIndexer InstanceIndexer, valueIndexer InstanceIndexer) (map[string]string, error) { + q := query.NewWmiQueryWithSelectList(mappingClassName, selectorList) + mappingInstances, err := QueryInstances(namespace, q) + if err != nil { + return nil, err + } + + result := make(map[string]string) + for _, mapping := range mappingInstances { + key, err := keyIndexer(mapping) + if err != nil { + return nil, err + } + + value, err := valueIndexer(mapping) + if err != nil { + return nil, err + } + + result[key] = value + } + + return result, nil +} + +// FindInstancesByMapping filters instances based on a mapping relationship, +// matching instances through custom indexing and mapping functions. +func FindInstancesByMapping(instanceToFind []*cim.WmiInstance, instanceToFindIndex InstanceIndexer, associatedInstances []*cim.WmiInstance, associatedInstanceIndexer InstanceIndexer, instanceMappings map[string]string) ([]*cim.WmiInstance, error) { + associatedInstanceObjectIDMapping := map[string]*cim.WmiInstance{} + for _, inst := range associatedInstances { + key, err := associatedInstanceIndexer(inst) + if err != nil { + return nil, err + } + + associatedInstanceObjectIDMapping[key] = inst + } + + var filtered []*cim.WmiInstance + for _, inst := range instanceToFind { + key, err := instanceToFindIndex(inst) + if err != nil { + return nil, err + } + + valueObjectID, ok := instanceMappings[key] + if !ok { + continue + } + + _, ok = associatedInstanceObjectIDMapping[strings.ToUpper(valueObjectID)] + if !ok { + continue + } + filtered = append(filtered, inst) + } + + if len(filtered) == 0 { + return nil, errors.NotFound + } + + return filtered, nil +} + +// mappingObjectRefIndexer indexes an WMI object by the Object ID reference from a specified property. +func mappingObjectRefIndexer(propertyName, className, refName string) InstanceIndexer { + return func(instance *cim.WmiInstance) (string, error) { + valueVal, err := instance.GetProperty(propertyName) + if err != nil { + return "", err + } + + refValue, err := parseObjectRef(valueVal.(string), className, refName) + return strings.ToUpper(refValue), err + } +} + +// stringPropertyIndexer indexes a WMI object from a string property. +func stringPropertyIndexer(propertyName string) InstanceIndexer { + return func(instance *cim.WmiInstance) (string, error) { + valueVal, err := instance.GetProperty(propertyName) + if err != nil { + return "", err + } + + return strings.ToUpper(valueVal.(string)), err + } +} + +var ( + // objectIDPropertyIndexer indexes a WMI object from its ObjectId property. + objectIDPropertyIndexer = stringPropertyIndexer("ObjectId") +) + +// FindInstancesByObjectIDMapping filters instances based on ObjectId mapping +// between two sets of WMI instances. +func FindInstancesByObjectIDMapping(instanceToFind []*cim.WmiInstance, associatedInstances []*cim.WmiInstance, instanceMappings map[string]string) ([]*cim.WmiInstance, error) { + return FindInstancesByMapping(instanceToFind, objectIDPropertyIndexer, associatedInstances, objectIDPropertyIndexer, instanceMappings) +} diff --git a/pkg/os/disk/api.go b/pkg/os/disk/api.go index 566f597d..f364ed07 100644 --- a/pkg/os/disk/api.go +++ b/pkg/os/disk/api.go @@ -2,16 +2,15 @@ package disk import ( "encoding/hex" - "encoding/json" "fmt" - "regexp" "strconv" "strings" "syscall" "unsafe" + "github.com/kubernetes-csi/csi-proxy/pkg/cim" shared "github.com/kubernetes-csi/csi-proxy/pkg/shared/disk" - "github.com/kubernetes-csi/csi-proxy/pkg/utils" + "github.com/microsoft/wmi/pkg/base/query" "k8s.io/klog/v2" ) @@ -66,31 +65,27 @@ func New() DiskAPI { // ListDiskLocations - constructs a map with the disk number as the key and the DiskLocation structure // as the value. The DiskLocation struct has various fields like the Adapter, Bus, Target and LUNID. -func (DiskAPI) ListDiskLocations() (map[uint32]shared.DiskLocation, error) { - // sample response - // [{ - // "number": 0, - // "location": "PCI Slot 3 : Adapter 0 : Port 0 : Target 1 : LUN 0" - // }, ...] - cmd := fmt.Sprintf("ConvertTo-Json @(Get-Disk | select Number, Location)") - out, err := utils.RunPowershellCmd(cmd) +func (imp DiskAPI) ListDiskLocations() (map[uint32]shared.DiskLocation, error) { + // "location": "PCI Slot 3 : Adapter 0 : Port 0 : Target 1 : LUN 0" + disks, err := cim.ListDisks([]string{"Number", "Location"}) if err != nil { - return nil, fmt.Errorf("failed to list disk location. cmd: %q, output: %q, err %v", cmd, string(out), err) - } - - var getDisk []map[string]interface{} - err = json.Unmarshal(out, &getDisk) - if err != nil { - return nil, err + return nil, fmt.Errorf("could not query disk locations") } m := make(map[uint32]shared.DiskLocation) - for _, v := range getDisk { - str := v["Location"].(string) - num := v["Number"].(float64) + for _, disk := range disks { + num, err := disk.GetProperty("Number") + if err != nil { + return m, fmt.Errorf("failed to query disk number: %v, %w", disk, err) + } + + location, err := disk.GetPropertyLocation() + if err != nil { + return m, fmt.Errorf("failed to query disk location: %v, %w", disk, err) + } found := false - s := strings.Split(str, ":") + s := strings.Split(location, ":") if len(s) >= 5 { var d shared.DiskLocation for _, item := range s { @@ -112,64 +107,112 @@ func (DiskAPI) ListDiskLocations() (map[uint32]shared.DiskLocation, error) { } if found { - m[uint32(num)] = d + m[uint32(num.(int32))] = d } } } + return m, nil } -func (DiskAPI) Rescan() error { - cmd := "Update-HostStorageCache" - out, err := utils.RunPowershellCmd(cmd) +func (imp DiskAPI) Rescan() error { + result, _, err := cim.InvokeCimMethod(cim.WMINamespaceStorage, "MSFT_StorageSetting", "UpdateHostStorageCache", nil) if err != nil { - return fmt.Errorf("error updating host storage cache output: %q, err: %v", string(out), err) + return fmt.Errorf("error updating host storage cache output. result: %d, err: %v", result, err) } return nil } -func (DiskAPI) IsDiskInitialized(diskNumber uint32) (bool, error) { - cmd := fmt.Sprintf("Get-Disk -Number %d | Where partitionstyle -eq 'raw'", diskNumber) - out, err := utils.RunPowershellCmd(cmd) +func (imp DiskAPI) IsDiskInitialized(diskNumber uint32) (bool, error) { + var partitionStyle int32 + disk, err := cim.QueryDiskByNumber(diskNumber, []string{"PartitionStyle"}) if err != nil { - return false, fmt.Errorf("error checking initialized status of disk %d: %v, %v", diskNumber, out, err) + return false, fmt.Errorf("error checking initialized status of disk %d. %v", diskNumber, err) } - if len(out) == 0 { - // disks with raw initialization not detected - return true, nil + + retValue, err := disk.GetProperty("PartitionStyle") + if err != nil { + return false, fmt.Errorf("failed to query partition style of disk %d: %w", diskNumber, err) } - return false, nil + + partitionStyle = retValue.(int32) + return partitionStyle != cim.PartitionStyleUnknown, nil } -func (DiskAPI) InitializeDisk(diskNumber uint32) error { - cmd := fmt.Sprintf("Initialize-Disk -Number %d -PartitionStyle GPT", diskNumber) - out, err := utils.RunPowershellCmd(cmd) +func (imp DiskAPI) InitializeDisk(diskNumber uint32) error { + disk, err := cim.QueryDiskByNumber(diskNumber, nil) if err != nil { - return fmt.Errorf("error initializing disk %d: %v, %v", diskNumber, string(out), err) + return fmt.Errorf("failed to initializing disk %d. error: %w", diskNumber, err) + } + + result, err := disk.InvokeMethodWithReturn("Initialize", int32(cim.PartitionStyleGPT)) + if result != 0 || err != nil { + return fmt.Errorf("failed to initializing disk %d: result %d, error: %w", diskNumber, result, err) } + return nil } -func (DiskAPI) BasicPartitionsExist(diskNumber uint32) (bool, error) { - cmd := fmt.Sprintf("Get-Partition | Where DiskNumber -eq %d | Where Type -ne Reserved", diskNumber) - out, err := utils.RunPowershellCmd(cmd) +func (imp DiskAPI) BasicPartitionsExist(diskNumber uint32) (bool, error) { + partitions, err := cim.ListPartitionsWithFilters(nil, + query.NewWmiQueryFilter("DiskNumber", strconv.Itoa(int(diskNumber)), query.Equals), + query.NewWmiQueryFilter("GptType", cim.GPTPartitionTypeMicrosoftReserved, query.NotEquals)) + if cim.IgnoreNotFound(err) != nil { + return false, fmt.Errorf("error checking presence of partitions on disk %d:, %v", diskNumber, err) + } + + return len(partitions) > 0, nil +} + +func (imp DiskAPI) CreateBasicPartition(diskNumber uint32) error { + disk, err := cim.QueryDiskByNumber(diskNumber, nil) if err != nil { - return false, fmt.Errorf("error checking presence of partitions on disk %d: %v, %v", diskNumber, out, err) + return err } - if len(out) > 0 { - // disk has partitions in it - return true, nil + + result, err := disk.InvokeMethodWithReturn( + "CreatePartition", + nil, // Size + true, // UseMaximumSize + nil, // Offset + nil, // Alignment + nil, // DriveLetter + false, // AssignDriveLetter + nil, // MbrType, + cim.GPTPartitionTypeBasicData, // GPT Type + false, // IsHidden + false, // IsActive, + ) + // 42002 is returned by driver letter failed to assign after partition + if (result != 0 && result != 42002) || err != nil { + return fmt.Errorf("error creating partition on disk %d. result: %d, err: %v", diskNumber, result, err) } - return false, nil -} -func (DiskAPI) CreateBasicPartition(diskNumber uint32) error { - cmd := fmt.Sprintf("New-Partition -DiskNumber %d -UseMaximumSize", diskNumber) - out, err := utils.RunPowershellCmd(cmd) + var status string + result, err = disk.InvokeMethodWithReturn("Refresh", &status) + if result != 0 || err != nil { + return fmt.Errorf("error rescan disk (%d). result %d, error: %v", diskNumber, result, err) + } + + partitions, err := cim.ListPartitionsWithFilters(nil, + query.NewWmiQueryFilter("DiskNumber", strconv.Itoa(int(diskNumber)), query.Equals), + query.NewWmiQueryFilter("GptType", cim.GPTPartitionTypeMicrosoftReserved, query.NotEquals)) if err != nil { - return fmt.Errorf("error creating partition on disk %d: %v, %v", diskNumber, out, err) + return fmt.Errorf("error query basic partition on disk %d:, %v", diskNumber, err) } - return nil + + if len(partitions) == 0 { + return fmt.Errorf("failed to create basic partition on disk %d:, %v", diskNumber, err) + } + + partition := partitions[0] + result, err = partition.InvokeMethodWithReturn("Online", status) + if result != 0 || err != nil { + return fmt.Errorf("error bring partition %v on disk %d online. result: %d, status %s, err: %v", partition, diskNumber, result, status, err) + } + + err = partition.Refresh() + return err } func (imp DiskAPI) GetDiskNumberByName(page83ID string) (uint32, error) { @@ -177,7 +220,7 @@ func (imp DiskAPI) GetDiskNumberByName(page83ID string) (uint32, error) { return diskNumber, err } -func (DiskAPI) GetDiskNumber(disk syscall.Handle) (uint32, error) { +func (imp DiskAPI) GetDiskNumber(disk syscall.Handle) (uint32, error) { var bytes uint32 devNum := StorageDeviceNumber{} buflen := uint32(unsafe.Sizeof(devNum.DeviceType)) + uint32(unsafe.Sizeof(devNum.DeviceNumber)) + uint32(unsafe.Sizeof(devNum.PartitionNumber)) @@ -187,7 +230,7 @@ func (DiskAPI) GetDiskNumber(disk syscall.Handle) (uint32, error) { return devNum.DeviceNumber, err } -func (DiskAPI) GetDiskPage83ID(disk syscall.Handle) (string, error) { +func (imp DiskAPI) GetDiskPage83ID(disk syscall.Handle) (string, error) { query := StoragePropertyQuery{} bufferSize := uint32(4 * 1024) @@ -230,21 +273,18 @@ func (DiskAPI) GetDiskPage83ID(disk syscall.Handle) (string, error) { } func (imp DiskAPI) GetDiskNumberWithID(page83ID string) (uint32, error) { - cmd := "ConvertTo-Json @(Get-Disk | Select Path)" - out, err := utils.RunPowershellCmd(cmd) - if err != nil { - return 0, fmt.Errorf("Could not query disk paths") - } - - outString := string(out) - disks := []Disk{} - err = json.Unmarshal([]byte(outString), &disks) + disks, err := cim.ListDisks([]string{"Path", "SerialNumber"}) if err != nil { return 0, err } - for i := range disks { - diskNumber, diskPage83ID, err := imp.GetDiskNumberAndPage83ID(disks[i].Path) + for _, disk := range disks { + path, err := disk.GetPropertyPath() + if err != nil { + return 0, fmt.Errorf("failed to query disk path: %v, %w", disk, err) + } + + diskNumber, diskPage83ID, err := imp.GetDiskNumberAndPage83ID(path) if err != nil { return 0, err } @@ -254,7 +294,7 @@ func (imp DiskAPI) GetDiskNumberWithID(page83ID string) (uint32, error) { } } - return 0, fmt.Errorf("Could not find disk with Page83 ID %s", page83ID) + return 0, fmt.Errorf("could not find disk with Page83 ID %s", page83ID) } func (imp DiskAPI) GetDiskNumberAndPage83ID(path string) (uint32, string, error) { @@ -280,89 +320,90 @@ func (imp DiskAPI) GetDiskNumberAndPage83ID(path string) (uint32, string, error) // ListDiskIDs - constructs a map with the disk number as the key and the DiskID structure // as the value. The DiskID struct has a field for the page83 ID. func (imp DiskAPI) ListDiskIDs() (map[uint32]shared.DiskIDs, error) { - // sample response - // [ - // { - // "Path": "\\\\?\\scsi#disk\u0026ven_google\u0026prod_persistentdisk#4\u002621cb0360\u00260\u0026000100#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}", - // "SerialNumber": " " - // }, - // { - // "Path": "\\\\?\\scsi#disk\u0026ven_msft\u0026prod_virtual_disk#2\u00261f4adffe\u00260\u0026000001#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}", - // "SerialNumber": null - // }, ] - cmd := "ConvertTo-Json @(Get-Disk | Select Path, SerialNumber)" - out, err := utils.RunPowershellCmd(cmd) - if err != nil { - return nil, fmt.Errorf("Could not query disk paths") - } - - outString := string(out) - disks := []Disk{} - err = json.Unmarshal([]byte(outString), &disks) + disks, err := cim.ListDisks([]string{"Path", "SerialNumber"}) if err != nil { return nil, err } m := make(map[uint32]shared.DiskIDs) + for _, disk := range disks { + path, err := disk.GetPropertyPath() + if err != nil { + return m, fmt.Errorf("failed to query disk path: %v, %w", disk, err) + } + + sn, err := disk.GetPropertySerialNumber() + if err != nil { + return m, fmt.Errorf("failed to query disk serial number: %v, %w", disk, err) + } - for i := range disks { - diskNumber, page83, err := imp.GetDiskNumberAndPage83ID(disks[i].Path) + diskNumber, page83, err := imp.GetDiskNumberAndPage83ID(path) if err != nil { - return nil, err + return m, err } m[diskNumber] = shared.DiskIDs{ Page83: page83, - SerialNumber: disks[i].SerialNumber, + SerialNumber: sn, } } - return m, nil } func (imp DiskAPI) GetDiskStats(diskNumber uint32) (int64, error) { - cmd := fmt.Sprintf("(Get-Disk -Number %d).Size", diskNumber) - out, err := utils.RunPowershellCmd(cmd) - if err != nil || len(out) == 0 { - return -1, fmt.Errorf("error getting size of disk. cmd: %s, output: %s, error: %v", cmd, string(out), err) - } - - reg, err := regexp.Compile("[^0-9]+") + // TODO: change to uint64 as it does not make sense to use int64 for size + var size int64 + disk, err := cim.QueryDiskByNumber(diskNumber, []string{"Size"}) if err != nil { - return -1, fmt.Errorf("error compiling regex. err: %v", err) + return -1, err } - diskSizeOutput := reg.ReplaceAllString(string(out), "") - - diskSize, err := strconv.ParseInt(diskSizeOutput, 10, 64) + sz, err := disk.GetProperty("Size") if err != nil { - return -1, fmt.Errorf("error parsing size of disk. cmd: %s, output: %s, error: %v", cmd, diskSizeOutput, err) + return -1, fmt.Errorf("failed to query size of disk %d. %v", diskNumber, err) } - return diskSize, nil + size, err = strconv.ParseInt(sz.(string), 10, 64) + return size, err } func (imp DiskAPI) SetDiskState(diskNumber uint32, isOnline bool) error { - cmd := fmt.Sprintf("(Get-Disk -Number %d) | Set-Disk -IsOffline $%t", diskNumber, !isOnline) - out, err := utils.RunPowershellCmd(cmd) + disk, err := cim.QueryDiskByNumber(diskNumber, []string{"IsOffline"}) + if err != nil { + return err + } + + offline, err := disk.GetPropertyIsOffline() if err != nil { - return fmt.Errorf("error setting disk attach state. cmd: %s, output: %s, error: %v", cmd, string(out), err) + return fmt.Errorf("error setting disk %d attach state. error: %v", diskNumber, err) + } + + if isOnline == !offline { + return nil + } + + method := "Offline" + if isOnline { + method = "Online" + } + + result, err := disk.InvokeMethodWithReturn(method) + if result != 0 || err != nil { + return fmt.Errorf("setting disk %d attach state %s: result %d, error: %w", diskNumber, method, result, err) } return nil } func (imp DiskAPI) GetDiskState(diskNumber uint32) (bool, error) { - cmd := fmt.Sprintf("(Get-Disk -Number %d) | Select-Object -ExpandProperty IsOffline", diskNumber) - out, err := utils.RunPowershellCmd(cmd) + disk, err := cim.QueryDiskByNumber(diskNumber, []string{"IsOffline"}) if err != nil { - return false, fmt.Errorf("error getting disk state. cmd: %s, output: %s, error: %v", cmd, string(out), err) + return false, err } - sout := strings.TrimSpace(string(out)) - isOffline, err := strconv.ParseBool(sout) + isOffline, err := disk.GetPropertyIsOffline() if err != nil { - return false, fmt.Errorf("error parsing disk state. output: %s, error: %v", sout, err) + return false, fmt.Errorf("error parsing disk %d state. error: %v", diskNumber, err) } return !isOffline, nil diff --git a/pkg/os/iscsi/api.go b/pkg/os/iscsi/api.go index 559ed3b5..861a0bbb 100644 --- a/pkg/os/iscsi/api.go +++ b/pkg/os/iscsi/api.go @@ -1,10 +1,13 @@ package iscsi import ( - "encoding/json" "fmt" + "strconv" + "strings" - "github.com/kubernetes-csi/csi-proxy/pkg/utils" + "github.com/kubernetes-csi/csi-proxy/pkg/cim" + "github.com/microsoft/wmi/server2019/root/microsoft/windows/storage" + "k8s.io/klog/v2" ) // Implements the iSCSI OS API calls. All code here should be very simple @@ -18,70 +21,104 @@ func New() APIImplementor { return APIImplementor{} } +func parseTargetPortal(instance *storage.MSFT_iSCSITargetPortal) (string, uint32, error) { + portalAddress, err := instance.GetPropertyTargetPortalAddress() + if err != nil { + return "", 0, fmt.Errorf("failed parsing target portal address %v. err: %w", instance, err) + } + + portalPort, err := instance.GetProperty("TargetPortalPortNumber") + if err != nil { + return "", 0, fmt.Errorf("failed parsing target portal port number %v. err: %w", instance, err) + } + + return portalAddress, uint32(portalPort.(int32)), nil +} + func (APIImplementor) AddTargetPortal(portal *TargetPortal) error { - cmdLine := fmt.Sprintf( - `New-IscsiTargetPortal -TargetPortalAddress ${Env:iscsi_tp_address} ` + - `-TargetPortalPortNumber ${Env:iscsi_tp_port}`) - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_tp_address=%s", portal.Address), - fmt.Sprintf("iscsi_tp_port=%d", portal.Port)) + existing, err := cim.QueryISCSITargetPortal(portal.Address, portal.Port, nil) + if cim.IgnoreNotFound(err) != nil { + return err + } + + if existing != nil { + klog.V(2).Infof("target portal at (%s:%d) already exists", portal.Address, portal.Port) + return nil + } + + _, err = cim.NewISCSITargetPortal(portal.Address, portal.Port, nil, nil, nil, nil) if err != nil { - return fmt.Errorf("error adding target portal. cmd %s, output: %s, err: %v", cmdLine, string(out), err) + return fmt.Errorf("error adding target portal at (%s:%d). err: %v", portal.Address, portal.Port, err) } return nil } func (APIImplementor) DiscoverTargetPortal(portal *TargetPortal) ([]string, error) { - // ConvertTo-Json is not part of the pipeline because powershell converts an - // array with one element to a single element - cmdLine := fmt.Sprintf( - `ConvertTo-Json -InputObject @(Get-IscsiTargetPortal -TargetPortalAddress ` + - `${Env:iscsi_tp_address} -TargetPortalPortNumber ${Env:iscsi_tp_port} | ` + - `Get-IscsiTarget | Select-Object -ExpandProperty NodeAddress)`) - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_tp_address=%s", portal.Address), - fmt.Sprintf("iscsi_tp_port=%d", portal.Port)) + instance, err := cim.QueryISCSITargetPortal(portal.Address, portal.Port, nil) if err != nil { - return nil, fmt.Errorf("error discovering target portal. cmd: %s, output: %s, err: %w", cmdLine, string(out), err) + return nil, err } - var iqns []string - err = json.Unmarshal(out, &iqns) + targets, err := cim.ListISCSITargetsByTargetPortalWithFilters(nil, []*storage.MSFT_iSCSITargetPortal{instance}) if err != nil { - return nil, fmt.Errorf("failed parsing iqn list. cmd: %s output: %s, err: %w", cmdLine, string(out), err) + return nil, err + } + + var iqns []string + for _, target := range targets { + iqn, err := target.GetProperty("NodeAddress") + if err != nil { + return nil, fmt.Errorf("failed parsing node address of target %v to target portal at (%s:%d). err: %w", target, portal.Address, portal.Port, err) + } + + iqns = append(iqns, iqn.(string)) } return iqns, nil } func (APIImplementor) ListTargetPortals() ([]TargetPortal, error) { - cmdLine := fmt.Sprintf( - `ConvertTo-Json -InputObject @(Get-IscsiTargetPortal | ` + - `Select-Object TargetPortalAddress, TargetPortalPortNumber)`) - - out, err := utils.RunPowershellCmd(cmdLine) + instances, err := cim.ListISCSITargetPortals([]string{"TargetPortalAddress", "TargetPortalPortNumber"}) if err != nil { - return nil, fmt.Errorf("error listing target portals. cmd %s, output: %s, err: %w", cmdLine, string(out), err) + return nil, err } var portals []TargetPortal - err = json.Unmarshal(out, &portals) - if err != nil { - return nil, fmt.Errorf("failed parsing target portal list. cmd: %s output: %s, err: %w", cmdLine, string(out), err) + for _, instance := range instances { + address, port, err := parseTargetPortal(instance) + if err != nil { + return nil, fmt.Errorf("failed parsing target portal %v. err: %w", instance, err) + } + + portals = append(portals, TargetPortal{ + Address: address, + Port: port, + }) } return portals, nil } func (APIImplementor) RemoveTargetPortal(portal *TargetPortal) error { - cmdLine := fmt.Sprintf( - `Get-IscsiTargetPortal -TargetPortalAddress ${Env:iscsi_tp_address} ` + - `-TargetPortalPortNumber ${Env:iscsi_tp_port} | Remove-IscsiTargetPortal ` + - `-Confirm:$false`) + instance, err := cim.QueryISCSITargetPortal(portal.Address, portal.Port, nil) + if err != nil { + return err + } - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_tp_address=%s", portal.Address), - fmt.Sprintf("iscsi_tp_port=%d", portal.Port)) + address, port, err := parseTargetPortal(instance) if err != nil { - return fmt.Errorf("error removing target portal. cmd %s, output: %s, err: %w", cmdLine, string(out), err) + return fmt.Errorf("failed to parse target portal %v. error: %v", instance, err) + } + + result, err := instance.InvokeMethodWithReturn("Remove", + nil, + nil, + int(port), + address, + ) + if result != 0 || err != nil { + return fmt.Errorf("error removing target portal at (%s:%d). result: %d, err: %w", address, port, result, err) } return nil @@ -89,48 +126,73 @@ func (APIImplementor) RemoveTargetPortal(portal *TargetPortal) error { func (APIImplementor) ConnectTarget(portal *TargetPortal, iqn string, authType string, chapUser string, chapSecret string) error { - // Not using InputObject as Connect-IscsiTarget's InputObject does not work. - // This is due to being a static WMI method together with a bug in the - // powershell version of the API. - cmdLine := fmt.Sprintf( - `Connect-IscsiTarget -TargetPortalAddress ${Env:iscsi_tp_address}` + - ` -TargetPortalPortNumber ${Env:iscsi_tp_port} -NodeAddress ${Env:iscsi_target_iqn}` + - ` -AuthenticationType ${Env:iscsi_auth_type}`) + target, err := cim.QueryISCSITarget(portal.Address, portal.Port, iqn, nil) + if err != nil { + return err + } - if chapUser != "" { - cmdLine += ` -ChapUsername ${Env:iscsi_chap_user}` + connected, err := target.GetPropertyIsConnected() + if err != nil { + return err } - if chapSecret != "" { - cmdLine += ` -ChapSecret ${Env:iscsi_chap_secret}` + if connected { + klog.V(2).Infof("target %s from target portal at (%s:%d) is connected.", iqn, portal.Address, portal.Port) + return nil } - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_tp_address=%s", portal.Address), - fmt.Sprintf("iscsi_tp_port=%d", portal.Port), - fmt.Sprintf("iscsi_target_iqn=%s", iqn), - fmt.Sprintf("iscsi_auth_type=%s", authType), - fmt.Sprintf("iscsi_chap_user=%s", chapUser), - fmt.Sprintf("iscsi_chap_secret=%s", chapSecret)) + targetAuthType := strings.ToUpper(strings.ReplaceAll(authType, "_", "")) + + result, _, err := cim.ConnectISCSITarget(portal.Address, portal.Port, iqn, targetAuthType, &chapUser, &chapSecret) if err != nil { - return fmt.Errorf("error connecting to target portal. cmd %s, output: %s, err: %w", cmdLine, string(out), err) + return fmt.Errorf("error connecting to target portal. result: %d, err: %w", result, err) } return nil } func (APIImplementor) DisconnectTarget(portal *TargetPortal, iqn string) error { - // Using InputObject instead of pipe to verify input is not empty - cmdLine := fmt.Sprintf( - `Disconnect-IscsiTarget -InputObject (Get-IscsiTargetPortal ` + - `-TargetPortalAddress ${Env:iscsi_tp_address} -TargetPortalPortNumber ${Env:iscsi_tp_port} ` + - ` | Get-IscsiTarget | Where-Object { $_.NodeAddress -eq ${Env:iscsi_target_iqn} }) ` + - `-Confirm:$false`) + target, err := cim.QueryISCSITarget(portal.Address, portal.Port, iqn, nil) + if err != nil { + return err + } + + connected, err := target.GetPropertyIsConnected() + if err != nil { + return fmt.Errorf("error query connected of target %s from target portal at (%s:%d). err: %w", iqn, portal.Address, portal.Port, err) + } + + if !connected { + klog.V(2).Infof("target %s from target portal at (%s:%d) is not connected.", iqn, portal.Address, portal.Port) + return nil + } - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_tp_address=%s", portal.Address), - fmt.Sprintf("iscsi_tp_port=%d", portal.Port), - fmt.Sprintf("iscsi_target_iqn=%s", iqn)) + // get session + session, err := cim.QueryISCSISessionByTarget(target, nil) if err != nil { - return fmt.Errorf("error disconnecting from target portal. cmd %s, output: %s, err: %w", cmdLine, string(out), err) + return fmt.Errorf("error query session of target %s from target portal at (%s:%d). err: %w", iqn, portal.Address, portal.Port, err) + } + + sessionIdentifier, err := session.GetPropertySessionIdentifier() + if err != nil { + return fmt.Errorf("error query session identifier of target %s from target portal at (%s:%d). err: %w", iqn, portal.Address, portal.Port, err) + } + + persistent, err := session.GetPropertyIsPersistent() + if err != nil { + return fmt.Errorf("error query session persistency of target %s from target portal at (%s:%d). err: %w", iqn, portal.Address, portal.Port, err) + } + + if persistent { + result, err := session.InvokeMethodWithReturn("Unregister") + if err != nil { + return fmt.Errorf("error unregister session on target %s from target portal at (%s:%d). result: %d, err: %w", iqn, portal.Address, portal.Port, result, err) + } + } + + result, err := target.InvokeMethodWithReturn("Disconnect", sessionIdentifier) + if err != nil { + return fmt.Errorf("error disconnecting target %s from target portal at (%s:%d). result: %d, err: %w", iqn, portal.Address, portal.Port, result, err) } return nil @@ -139,36 +201,43 @@ func (APIImplementor) DisconnectTarget(portal *TargetPortal, iqn string) error { func (APIImplementor) GetTargetDisks(portal *TargetPortal, iqn string) ([]string, error) { // Converting DiskNumber to string for compatibility with disk api group // Not using pipeline in order to validate that items are non-empty - cmdLine := fmt.Sprintf( - `$ErrorActionPreference = "Stop"; ` + - `$tp = Get-IscsiTargetPortal -TargetPortalAddress ${Env:iscsi_tp_address} -TargetPortalPortNumber ${Env:iscsi_tp_port}; ` + - `$t = $tp | Get-IscsiTarget | Where-Object { $_.NodeAddress -eq ${Env:iscsi_target_iqn} }; ` + - `$c = Get-IscsiConnection -IscsiTarget $t; ` + - `$ids = $c | Get-Disk | Select -ExpandProperty Number | Out-String -Stream; ` + - `ConvertTo-Json -InputObject @($ids)`) + target, err := cim.QueryISCSITarget(portal.Address, portal.Port, iqn, nil) + if err != nil { + return nil, err + } - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_tp_address=%s", portal.Address), - fmt.Sprintf("iscsi_tp_port=%d", portal.Port), - fmt.Sprintf("iscsi_target_iqn=%s", iqn)) + connected, err := target.GetPropertyIsConnected() if err != nil { - return nil, fmt.Errorf("error getting target disks. cmd %s, output: %s, err: %w", cmdLine, string(out), err) + return nil, fmt.Errorf("error query connected of target %s from target portal at (%s:%d). err: %w", iqn, portal.Address, portal.Port, err) } - var ids []string - err = json.Unmarshal(out, &ids) + if !connected { + klog.V(2).Infof("target %s from target portal at (%s:%d) is not connected.", iqn, portal.Address, portal.Port) + return nil, nil + } + + disks, err := cim.ListDisksByTarget(target, []string{}) + if err != nil { - return nil, fmt.Errorf("error parsing iqn target disks. cmd: %s output: %s, err: %w", cmdLine, string(out), err) + return nil, fmt.Errorf("error getting target disks on target %s from target portal at (%s:%d). err: %w", iqn, portal.Address, portal.Port, err) } + var ids []string + for _, disk := range disks { + number, err := disk.GetProperty("Number") + if err != nil { + return nil, fmt.Errorf("error getting number of disk %v on target %s from target portal at (%s:%d). err: %w", disk, iqn, portal.Address, portal.Port, err) + } + + ids = append(ids, strconv.Itoa(int(number.(int32)))) + } return ids, nil } func (APIImplementor) SetMutualChapSecret(mutualChapSecret string) error { - cmdLine := `Set-IscsiChapSecret -ChapSecret ${Env:iscsi_mutual_chap_secret}` - out, err := utils.RunPowershellCmd(cmdLine, fmt.Sprintf("iscsi_mutual_chap_secret=%s", mutualChapSecret)) + result, _, err := cim.InvokeCimMethod(cim.WMINamespaceStorage, "MSFT_iSCSISession", "SetCHAPSecret", map[string]interface{}{"ChapSecret": mutualChapSecret}) if err != nil { - return fmt.Errorf("error setting mutual chap secret. cmd %s,"+ - " output: %s, err: %v", cmdLine, string(out), err) + return fmt.Errorf("error setting mutual chap secret. result: %d, err: %v", result, err) } return nil diff --git a/pkg/os/smb/api.go b/pkg/os/smb/api.go index 910eb7e0..fc0c8085 100644 --- a/pkg/os/smb/api.go +++ b/pkg/os/smb/api.go @@ -4,7 +4,9 @@ import ( "fmt" "strings" + "github.com/kubernetes-csi/csi-proxy/pkg/cim" "github.com/kubernetes-csi/csi-proxy/pkg/utils" + "github.com/microsoft/wmi/pkg/base/query" ) type API interface { @@ -26,18 +28,18 @@ func New(requirePrivacy bool) *SmbAPI { } } +func remotePathForQuery(remotePath string) string { + return strings.ReplaceAll(remotePath, "\\", "\\\\") +} + func (*SmbAPI) IsSmbMapped(remotePath string) (bool, error) { - cmdLine := `$(Get-SmbGlobalMapping -RemotePath $Env:smbremotepath -ErrorAction Stop).Status ` - cmdEnv := fmt.Sprintf("smbremotepath=%s", remotePath) - out, err := utils.RunPowershellCmd(cmdLine, cmdEnv) - if err != nil { - return false, fmt.Errorf("error checking smb mapping. cmd %s, output: %s, err: %v", remotePath, string(out), err) + smbQuery := query.NewWmiQuery("MSFT_SmbGlobalMapping", "RemotePath", remotePathForQuery(remotePath)) + instances, err := cim.QueryInstances(cim.WMINamespaceSmb, smbQuery) + if cim.IgnoreNotFound(err) != nil { + return false, err } - if len(out) == 0 || !strings.EqualFold(strings.TrimSpace(string(out)), "OK") { - return false, nil - } - return true, nil + return len(instances) > 0, nil } // NewSmbLink - creates a directory symbolic link to the remote share. @@ -48,7 +50,6 @@ func (*SmbAPI) IsSmbMapped(remotePath string) (bool, error) { // alpha to merge the paths. // TODO (for beta release): Merge the link paths - os.Symlink and Powershell link path. func (*SmbAPI) NewSmbLink(remotePath, localPath string) error { - if !strings.HasSuffix(remotePath, "\\") { // Golang has issues resolving paths mapped to file shares if they do not end in a trailing \ // so add one if needed. @@ -67,23 +68,31 @@ func (*SmbAPI) NewSmbLink(remotePath, localPath string) error { func (api *SmbAPI) NewSmbGlobalMapping(remotePath, username, password string) error { // use PowerShell Environment Variables to store user input string to prevent command line injection // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-5.1 - cmdLine := fmt.Sprintf(`$PWord = ConvertTo-SecureString -String $Env:smbpassword -AsPlainText -Force`+ - `;$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Env:smbuser, $PWord`+ - `;New-SmbGlobalMapping -RemotePath $Env:smbremotepath -Credential $Credential -RequirePrivacy $%t`, api.RequirePrivacy) - - if output, err := utils.RunPowershellCmd(cmdLine, - fmt.Sprintf("smbuser=%s", username), - fmt.Sprintf("smbpassword=%s", password), - fmt.Sprintf("smbremotepath=%s", remotePath)); err != nil { - return fmt.Errorf("NewSmbGlobalMapping failed. output: %q, err: %v", string(output), err) + params := map[string]interface{}{ + "RemotePath": remotePath, + "RequirePrivacy": api.RequirePrivacy, + } + if username != "" { + params["Credential"] = fmt.Sprintf("%s:%s", username, password) + } + result, _, err := cim.InvokeCimMethod(cim.WMINamespaceSmb, "MSFT_SmbGlobalMapping", "Create", params) + if err != nil { + return fmt.Errorf("NewSmbGlobalMapping failed. result: %d, err: %v", result, err) } return nil } func (*SmbAPI) RemoveSmbGlobalMapping(remotePath string) error { - cmd := `Remove-SmbGlobalMapping -RemotePath $Env:smbremotepath -Force` - if output, err := utils.RunPowershellCmd(cmd, fmt.Sprintf("smbremotepath=%s", remotePath)); err != nil { - return fmt.Errorf("UnmountSmbShare failed. output: %q, err: %v", string(output), err) + smbQuery := query.NewWmiQuery("MSFT_SmbGlobalMapping", "RemotePath", remotePathForQuery(remotePath)) + instances, err := cim.QueryInstances(cim.WMINamespaceSmb, smbQuery) + if err != nil { + return err + } + + _, err = instances[0].InvokeMethod("Remove", true) + if err != nil { + return fmt.Errorf("error remove smb mapping '%s'. err: %v", remotePath, err) } + return nil } diff --git a/pkg/os/system/api.go b/pkg/os/system/api.go index 2a2740b9..36d1574d 100644 --- a/pkg/os/system/api.go +++ b/pkg/os/system/api.go @@ -1,12 +1,13 @@ package system import ( - "encoding/json" "fmt" - "os/exec" - "strings" + "github.com/kubernetes-csi/csi-proxy/pkg/cim" + "github.com/kubernetes-csi/csi-proxy/pkg/server/system/impl" "github.com/kubernetes-csi/csi-proxy/pkg/utils" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/server2019/root/cimv2" ) // Implements the System OS API calls. All code here should be very simple @@ -25,6 +26,35 @@ type ServiceInfo struct { Status uint32 `json:"Status"` } +var ( + startModeMappings = map[string]uint32{ + "Boot": impl.START_TYPE_BOOT, + "System": impl.START_TYPE_SYSTEM, + "Auto": impl.START_TYPE_AUTOMATIC, + "Manual": impl.START_TYPE_MANUAL, + "Disabled": impl.START_TYPE_DISABLED, + } + + statusMappings = map[string]uint32{ + "Unknown": impl.SERVICE_STATUS_UNKNOWN, + "Stopped": impl.SERVICE_STATUS_STOPPED, + "Start Pending": impl.SERVICE_STATUS_START_PENDING, + "Stop Pending": impl.SERVICE_STATUS_STOP_PENDING, + "Running": impl.SERVICE_STATUS_RUNNING, + "Continue Pending": impl.SERVICE_STATUS_CONTINUE_PENDING, + "Pause Pending": impl.SERVICE_STATUS_PAUSE_PENDING, + "Paused": impl.SERVICE_STATUS_PAUSED, + } +) + +func serviceStartModeToStartType(startMode string) uint32 { + return startModeMappings[startMode] +} + +func serviceState(status string) uint32 { + return statusMappings[status] +} + type APIImplementor struct{} func New() APIImplementor { @@ -32,45 +62,61 @@ func New() APIImplementor { } func (APIImplementor) GetBIOSSerialNumber() (string, error) { - // Taken from Kubernetes vSphere cloud provider - // https://github.com/kubernetes/kubernetes/blob/103e926604de6f79161b78af3e792d0ed282bc06/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util_windows.go#L28 - result, err := exec.Command("wmic", "bios", "get", "serialnumber").Output() + biosQuery := query.NewWmiQueryWithSelectList("CIM_BIOSElement", []string{"SerialNumber"}) + instances, err := cim.QueryInstances("", biosQuery) if err != nil { return "", err } - lines := strings.FieldsFunc(string(result), func(r rune) bool { - switch r { - case '\n', '\r': - return true - default: - return false - } - }) - if len(lines) != 2 { - return "", fmt.Errorf("received unexpected value retrieving host uuid: %q", string(result)) + + bios, err := cimv2.NewCIM_BIOSElementEx1(instances[0]) + if err != nil { + return "", fmt.Errorf("failed to get BIOS element: %w", err) + } + + sn, err := bios.GetPropertySerialNumber() + if err != nil { + return "", fmt.Errorf("failed to get BIOS serial number property: %w", err) } - return lines[1], nil + + return sn, nil } func (APIImplementor) GetService(name string) (*ServiceInfo, error) { - script := `Get-Service -Name $env:ServiceName | Select-Object DisplayName, Status, StartType | ` + - `ConvertTo-JSON` - cmdEnv := fmt.Sprintf("ServiceName=%s", name) - out, err := utils.RunPowershellCmd(script, cmdEnv) + serviceQuery := query.NewWmiQueryWithSelectList("Win32_Service", []string{"DisplayName", "State", "StartMode"}, "Name", name) + instances, err := cim.QueryInstances("", serviceQuery) if err != nil { - return nil, fmt.Errorf("error querying service name=%s. cmd: %s, output: %s, error: %v", name, script, string(out), err) + return nil, err } - var serviceInfo ServiceInfo - err = json.Unmarshal(out, &serviceInfo) + service, err := cimv2.NewWin32_ServiceEx1(instances[0]) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to get service %s: %w", name, err) + } + + displayName, err := service.GetPropertyDisplayName() + if err != nil { + return nil, fmt.Errorf("failed to get displayName property of service %s: %w", name, err) + } + + state, err := service.GetPropertyState() + if err != nil { + return nil, fmt.Errorf("failed to get state property of service %s: %w", name, err) + } + + startMode, err := service.GetPropertyStartMode() + if err != nil { + return nil, fmt.Errorf("failed to get startMode property of service %s: %w", name, err) } - return &serviceInfo, nil + return &ServiceInfo{ + DisplayName: displayName, + StartType: serviceStartModeToStartType(startMode), + Status: serviceState(state), + }, nil } func (APIImplementor) StartService(name string) error { + // Note: both StartService and StopService are not implemented by WMI script := `Start-Service -Name $env:ServiceName` cmdEnv := fmt.Sprintf("ServiceName=%s", name) out, err := utils.RunPowershellCmd(script, cmdEnv) diff --git a/pkg/os/volume/api.go b/pkg/os/volume/api.go index 70e8b5cb..994e8a77 100644 --- a/pkg/os/volume/api.go +++ b/pkg/os/volume/api.go @@ -1,7 +1,6 @@ package volume import ( - "encoding/json" "fmt" "os" "path/filepath" @@ -9,7 +8,11 @@ import ( "strconv" "strings" + "github.com/go-ole/go-ole" + "github.com/kubernetes-csi/csi-proxy/pkg/cim" "github.com/kubernetes-csi/csi-proxy/pkg/utils" + "github.com/microsoft/wmi/pkg/errors" + "golang.org/x/sys/windows" "k8s.io/klog/v2" ) @@ -35,7 +38,7 @@ type API interface { GetVolumeIDFromTargetPath(targetPath string) (string, error) // WriteVolumeCache writes the volume `volumeID`'s cache to disk. WriteVolumeCache(volumeID string) error - // GetVolumeIDFromTargetPath returns the volume id of a given target path. + // GetClosestVolumeIDFromTargetPath returns the volume id of a given target path. GetClosestVolumeIDFromTargetPath(targetPath string) (string, error) } @@ -54,6 +57,8 @@ var ( // PS C:\disks> (Get-Disk -Number 1 | Get-Partition | Get-Volume).UniqueId // \\?\Volume{452e318a-5cde-421e-9831-b9853c521012}\ VolumeRegexp = regexp.MustCompile(`Volume\{[\w-]*\}`) + // VolumePrefix is the prefix of Windows Volume Unique ID + VolumePrefix = "\\\\?\\Volume{" ) // New - Construct a new Volume API Implementation. @@ -61,49 +66,56 @@ func New() VolumeAPI { return VolumeAPI{} } -func getVolumeSize(volumeID string) (int64, error) { - cmd := `(Get-Volume -UniqueId "$Env:volumeID" | Get-partition).Size` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) - - if err != nil || len(out) == 0 { - return -1, fmt.Errorf("error getting size of the partition from mount. cmd %s, output: %s, error: %v", cmd, string(out), err) +// ListVolumesOnDisk - returns back list of volumes(volumeIDs) in a disk and a partition. +func (VolumeAPI) ListVolumesOnDisk(diskNumber uint32, partitionNumber uint32) (volumeIDs []string, err error) { + partitions, err := cim.ListPartitionsOnDisk(diskNumber, partitionNumber, []string{"ObjectId"}) + if err != nil { + return nil, errors.Wrapf(err, "failed to list partition on disk %d", diskNumber) } - outString := strings.TrimSpace(string(out)) - volumeSize, err := strconv.ParseInt(outString, 10, 64) + volumes, err := cim.ListVolumes([]string{"ObjectId", "UniqueId"}) if err != nil { - return -1, fmt.Errorf("error parsing size of volume %s received %v trimmed to %v err %v", volumeID, out, outString, err) + return nil, errors.Wrapf(err, "failed to list volumes") } - return volumeSize, nil -} - -// ListVolumesOnDisk - returns back list of volumes(volumeIDs) in a disk and a partition. -func (VolumeAPI) ListVolumesOnDisk(diskNumber uint32, partitionNumber uint32) (volumeIDs []string, err error) { - var cmd string - if partitionNumber == 0 { - // 0 means that the partitionNumber wasn't set so we list all the partitions - cmd = fmt.Sprintf("(Get-Disk -Number %d | Get-Partition | Get-Volume).UniqueId", diskNumber) - } else { - cmd = fmt.Sprintf("(Get-Disk -Number %d | Get-Partition -PartitionNumber %d | Get-Volume).UniqueId", diskNumber, partitionNumber) + filtered, err := cim.FindVolumesByPartition(volumes, partitions) + if cim.IgnoreNotFound(err) != nil { + return nil, errors.Wrapf(err, "failed to list volumes on disk %d", diskNumber) } - out, err := utils.RunPowershellCmd(cmd) - if err != nil { - return []string{}, fmt.Errorf("error list volumes on disk. cmd: %s, output: %s, error: %v", cmd, string(out), err) + + for _, volume := range filtered { + uniqueID, err := volume.GetPropertyUniqueId() + if err != nil { + return nil, errors.Wrapf(err, "failed to list volumes") + } + volumeIDs = append(volumeIDs, uniqueID) } - volumeIds := strings.Split(strings.TrimSpace(string(out)), "\r\n") - return volumeIds, nil + return volumeIDs, nil } // FormatVolume - Formats a volume with the NTFS format. func (VolumeAPI) FormatVolume(volumeID string) (err error) { - cmd := `Get-Volume -UniqueId "$Env:volumeID" | Format-Volume -FileSystem ntfs -Confirm:$false` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) + volume, err := cim.QueryVolumeByUniqueID(volumeID, nil) if err != nil { - return fmt.Errorf("error formatting volume. cmd: %s, output: %s, error: %v", cmd, string(out), err) + return fmt.Errorf("error formatting volume (%s). error: %v", volumeID, err) + } + + result, err := volume.InvokeMethodWithReturn( + "Format", + "NTFS", // Format, + "", // FileSystemLabel, + nil, // AllocationUnitSize, + false, // Full, + true, // Force + nil, // Compress, + nil, // ShortFileNameSupport, + nil, // SetIntegrityStreams, + nil, // UseLargeFRS, + nil, // DisableHeatGathering, + ) + if result != 0 || err != nil { + return fmt.Errorf("error formatting volume (%s). result: %d, error: %v", volumeID, result, err) } // TODO: Do we need to handle anything for len(out) == 0 return nil @@ -116,30 +128,33 @@ func (VolumeAPI) WriteVolumeCache(volumeID string) (err error) { // IsVolumeFormatted - Check if the volume is formatted with the pre specified filesystem(typically ntfs). func (VolumeAPI) IsVolumeFormatted(volumeID string) (bool, error) { - cmd := `(Get-Volume -UniqueId "$Env:volumeID" -ErrorAction Stop).FileSystemType` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) + volume, err := cim.QueryVolumeByUniqueID(volumeID, []string{"FileSystemType"}) if err != nil { - return false, fmt.Errorf("error checking if volume is formatted. cmd: %s, output: %s, error: %v", cmd, string(out), err) + return false, fmt.Errorf("error checking if volume (%s) is formatted. error: %v", volumeID, err) } - stringOut := strings.TrimSpace(string(out)) - if len(stringOut) == 0 || strings.EqualFold(stringOut, "Unknown") { - return false, nil + + fsType, err := volume.GetProperty("FileSystemType") + if err != nil { + return false, fmt.Errorf("failed to query volume file system type (%s): %w", volumeID, err) } - return true, nil + + const FileSystemUnknown = 0 + return fsType.(int32) != FileSystemUnknown, nil } // MountVolume - mounts a volume to a path. This is done using the Add-PartitionAccessPath for presenting the volume via a path. func (VolumeAPI) MountVolume(volumeID, path string) error { - cmd := `Get-Volume -UniqueId "$Env:volumeID" | Get-Partition | Add-PartitionAccessPath -AccessPath $Env:mountpath` - cmdEnv := []string{} - cmdEnv = append(cmdEnv, fmt.Sprintf("volumeID=%s", volumeID)) - cmdEnv = append(cmdEnv, fmt.Sprintf("mountpath=%s", path)) - out, err := utils.RunPowershellCmd(cmd, cmdEnv...) - + part, err := cim.GetPartitionByVolumeUniqueID(volumeID, nil) if err != nil { - return fmt.Errorf("error mount volume to path. cmd: %s, output: %s, error: %v", cmd, string(out), err) + return err + } + + var status string + result, err := part.InvokeMethodWithReturn("AddAccessPath", path, nil, &status) + if result != 0 || err != nil { + return fmt.Errorf("error mount volume (%s) to path %s. result %d, status %s, error: %v", volumeID, path, result, status, err) } + return nil } @@ -149,92 +164,112 @@ func (VolumeAPI) UnmountVolume(volumeID, path string) error { return err } - cmd := `Get-Volume -UniqueId "$Env:volumeID" | Get-Partition | Remove-PartitionAccessPath -AccessPath $Env:mountpath` - cmdEnv := []string{} - cmdEnv = append(cmdEnv, fmt.Sprintf("volumeID=%s", volumeID)) - cmdEnv = append(cmdEnv, fmt.Sprintf("mountpath=%s", path)) - out, err := utils.RunPowershellCmd(cmd, cmdEnv...) - + part, err := cim.GetPartitionByVolumeUniqueID(volumeID, nil) if err != nil { - return fmt.Errorf("error getting driver letter to mount volume. cmd: %s, output: %s,error: %v", cmd, string(out), err) + return err + } + + result, err := part.InvokeMethodWithReturn("RemoveAccessPath", path) + if result != 0 || err != nil { + return fmt.Errorf("error umount volume (%s) from path %s. result %d, error: %v", volumeID, path, result, err) } return nil } // ResizeVolume - resizes a volume with the given size, if size == 0 then max supported size is used func (VolumeAPI) ResizeVolume(volumeID string, size int64) error { - // If size is 0 then we will resize to the maximum size possible, otherwise just resize to size - var cmd string - var out []byte var err error var finalSize int64 - var outString string - if size == 0 { - cmd = `Get-Volume -UniqueId "$Env:volumeID" | Get-partition | Get-PartitionSupportedSize | Select SizeMax | ConvertTo-Json` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) + part, err := cim.GetPartitionByVolumeUniqueID(volumeID, nil) + if err != nil { + return err + } - if err != nil || len(out) == 0 { - return fmt.Errorf("error getting sizemin,sizemax from mount. cmd: %s, output: %s, error: %v", cmd, string(out), err) + // If size is 0 then we will resize to the maximum size possible, otherwise just resize to size + if size == 0 { + var sizeMin, sizeMax ole.VARIANT + var status string + result, err := part.InvokeMethodWithReturn("GetSupportedSize", &sizeMin, &sizeMax, &status) + if result != 0 || err != nil { + return fmt.Errorf("error getting sizemin, sizemax from volume (%s). result: %d, error: %v", volumeID, result, err) } - var getVolumeSizing map[string]int64 - outString = string(out) - err = json.Unmarshal([]byte(outString), &getVolumeSizing) + finalSizeStr := sizeMax.ToString() + finalSize, err = strconv.ParseInt(finalSizeStr, 10, 64) if err != nil { - return fmt.Errorf("out %v outstring %v err %v", out, outString, err) + return fmt.Errorf("error parsing the sizeMax of volume (%s) with error (%v)", volumeID, err) } - - sizeMax := getVolumeSizing["SizeMax"] - - finalSize = sizeMax } else { finalSize = size } - currentSize, err := getVolumeSize(volumeID) + currentSizeVal, err := part.GetProperty("Size") if err != nil { return fmt.Errorf("error getting the current size of volume (%s) with error (%v)", volumeID, err) } + currentSize, err := strconv.ParseInt(currentSizeVal.(string), 10, 64) + if err != nil { + return fmt.Errorf("error parsing the current size of volume (%s) with error (%v)", volumeID, err) + } + //if the partition's size is already the size we want this is a noop, just return if currentSize >= finalSize { - klog.V(2).Infof("Attempted to resize volume %s to a lower size, from currentBytes=%d wantedBytes=%d", volumeID, currentSize, finalSize) + klog.V(2).Infof("Attempted to resize volume (%s) to a lower size, from currentBytes=%d wantedBytes=%d", volumeID, currentSize, finalSize) return nil } - cmd = fmt.Sprintf(`Get-Volume -UniqueId "$Env:volumeID" | Get-Partition | Resize-Partition -Size %d`, finalSize) - cmdEnv := []string{} - cmdEnv = append(cmdEnv, fmt.Sprintf("volumeID=%s", volumeID)) - out, err = utils.RunPowershellCmd(cmd, cmdEnv...) + var status string + result, err := part.InvokeMethodWithReturn("Resize", strconv.Itoa(int(finalSize)), &status) + + if result != 0 || err != nil { + return fmt.Errorf("error resizing volume (%s). size:%v, finalSize %v, error: %v", volumeID, size, finalSize, err) + } + + diskNumber, err := cim.GetPartitionDiskNumber(part) + if err != nil { + return fmt.Errorf("error parsing disk number of volume (%s). error: %v", volumeID, err) + } + + disk, err := cim.QueryDiskByNumber(diskNumber, nil) if err != nil { - return fmt.Errorf("error resizing volume. cmd: %s, output: %s size:%v, finalSize %v, error: %v", cmd, string(out), size, finalSize, err) + return fmt.Errorf("error parsing disk number of volume (%s). error: %v", volumeID, err) } + + result, err = disk.InvokeMethodWithReturn("Refresh", &status) + if result != 0 || err != nil { + return fmt.Errorf("error rescan disk (%d). result %d, error: %v", diskNumber, result, err) + } + return nil } // GetVolumeStats - retrieves the volume stats for a given volume func (VolumeAPI) GetVolumeStats(volumeID string) (int64, int64, error) { - // get the size and sizeRemaining for the volume - cmd := `(Get-Volume -UniqueId "$Env:volumeID" | Select SizeRemaining,Size) | ConvertTo-Json` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) + volume, err := cim.QueryVolumeByUniqueID(volumeID, []string{"UniqueId", "SizeRemaining", "Size"}) + if err != nil && !errors.IsNotFound(err) { + return -1, -1, fmt.Errorf("error getting capacity and used size of volume (%s). error: %v", volumeID, err) + } + volumeSizeVal, err := volume.GetProperty("Size") if err != nil { - return -1, -1, fmt.Errorf("error getting capacity and used size of volume. cmd: %s, output: %s, error: %v", cmd, string(out), err) + return -1, -1, fmt.Errorf("failed to query volume size (%s): %w", volumeID, err) } - var getVolume map[string]int64 - outString := string(out) - err = json.Unmarshal([]byte(outString), &getVolume) + volumeSize, err := strconv.ParseInt(volumeSizeVal.(string), 10, 64) if err != nil { - return -1, -1, fmt.Errorf("out %v outstring %v err %v", out, outString, err) + return -1, -1, fmt.Errorf("failed to parse volume size (%s): %w", volumeID, err) } - var volumeSizeRemaining int64 - var volumeSize int64 - volumeSize = getVolume["Size"] - volumeSizeRemaining = getVolume["SizeRemaining"] + volumeSizeRemainingVal, err := volume.GetProperty("SizeRemaining") + if err != nil { + return -1, -1, fmt.Errorf("failed to query volume remaining size (%s): %w", volumeID, err) + } + + volumeSizeRemaining, err := strconv.ParseInt(volumeSizeRemainingVal.(string), 10, 64) + if err != nil { + return -1, -1, fmt.Errorf("failed to parse volume remaining size (%s): %w", volumeID, err) + } volumeUsedSize := volumeSize - volumeSizeRemaining return volumeSize, volumeUsedSize, nil @@ -243,59 +278,44 @@ func (VolumeAPI) GetVolumeStats(volumeID string) (int64, int64, error) { // GetDiskNumberFromVolumeID - gets the disk number where the volume is. func (VolumeAPI) GetDiskNumberFromVolumeID(volumeID string) (uint32, error) { // get the size and sizeRemaining for the volume - cmd := `(Get-Volume -UniqueId "$Env:volumeID" | Get-Partition).DiskNumber` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) - - if err != nil || len(out) == 0 { - return 0, fmt.Errorf("error getting disk number. cmd: %s, output: %s, error: %v", cmd, string(out), err) - } - - reg, err := regexp.Compile("[^0-9]+") + part, err := cim.GetPartitionByVolumeUniqueID(volumeID, []string{"DiskNumber"}) if err != nil { - return 0, fmt.Errorf("error compiling regex. err: %v", err) + return 0, err } - diskNumberOutput := reg.ReplaceAllString(string(out), "") - - diskNumber, err := strconv.ParseUint(diskNumberOutput, 10, 32) + diskNumber, err := part.GetProperty("DiskNumber") if err != nil { - return 0, fmt.Errorf("error parsing disk number. cmd: %s, output: %s, error: %v", cmd, diskNumberOutput, err) + return 0, fmt.Errorf("error query disk number of volume (%s). error: %v", volumeID, err) } - return uint32(diskNumber), nil + return uint32(diskNumber.(int32)), nil } // GetVolumeIDFromTargetPath - gets the volume ID given a mount point, the function is recursive until it find a volume or errors out func (VolumeAPI) GetVolumeIDFromTargetPath(mount string) (string, error) { - volumeString, err := getTarget(mount, 0) + utf16FullMountPath, _ := windows.UTF16PtrFromString(mount) + outPathBuffer := make([]uint16, windows.MAX_LONG_PATH) + size := len(outPathBuffer) + err := windows.GetVolumePathName(utf16FullMountPath, &outPathBuffer[0], uint32(size)) if err != nil { - return "", fmt.Errorf("error getting the volume for the mount %s, internal error %v", mount, err) + return "", err } - return volumeString, nil -} - -func getTarget(mount string, retry int) (string, error) { - cmd := `(Get-Item -Path $Env:mountpath).Target` - cmdEnv := fmt.Sprintf("mountpath=%s", mount) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) - if err != nil || len(out) == 0 { - return "", fmt.Errorf("error getting volume from mount. cmd: %s, output: %s, error: %v", cmd, string(out), err) - } - if retry >= 256 { - return "", fmt.Errorf("maximum recursion reached, cmd: %s, output: %s, :retry %d", cmd, string(out), retry) + targetPath := windows.UTF16PtrToString(&outPathBuffer[0]) + targetPath = "\\\\?\\" + targetPath + if !strings.HasSuffix(targetPath, "\\") { + targetPath += "\\" } - - volumeString := strings.TrimSpace(string(out)) - klog.V(8).Infof("retry: %d, volumeString: %s", retry, volumeString) - - if !strings.HasPrefix(volumeString, "Volume") { - return getTarget(volumeString, retry+1) + utf16TargetPath, _ := windows.UTF16PtrFromString(targetPath) + outPathBuffer = make([]uint16, windows.MAX_LONG_PATH) + size = len(outPathBuffer) + err = windows.GetVolumeNameForVolumeMountPoint(utf16TargetPath, &outPathBuffer[0], uint32(size)) + if err != nil { + return "", err } - return ensureVolumePrefix(volumeString), nil + return windows.UTF16PtrToString(&outPathBuffer[0]), nil } // GetClosestVolumeIDFromTargetPath returns the volume id of a given target path. @@ -390,26 +410,31 @@ func dereferenceSymlink(path string) (string, error) { // getVolumeForDriveLetter gets a volume from a drive letter (e.g. C:/). func getVolumeForDriveLetter(path string) (string, error) { if len(path) != 1 { - return "", fmt.Errorf("The path=%s is not a valid DriverLetter", path) + return "", fmt.Errorf("the path %s is not a valid drive letter", path) } - cmd := `(Get-Partition -DriveLetter $Env:drivepath | Get-Volume).UniqueId` - cmdEnv := fmt.Sprintf("drivepath=%s", path) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) + volume, err := cim.GetVolumeByDriveLetter(path, []string{"UniqueId"}) if err != nil { - return "", err + return "", nil } - output := strings.TrimSpace(string(out)) - klog.V(8).Infof("Stdout: %s", output) - return output, nil + + uniqueID, err := volume.GetPropertyUniqueId() + if err != nil { + return "", fmt.Errorf("error query unique ID of volume (%v). error: %v", volume, err) + } + + return uniqueID, nil } func writeCache(volumeID string) error { - cmd := `Get-Volume -UniqueId "$Env:volumeID" | Write-Volumecache` - cmdEnv := fmt.Sprintf("volumeID=%s", volumeID) - out, err := utils.RunPowershellCmd(cmd, cmdEnv) - if err != nil { - return fmt.Errorf("error writing volume cache. cmd: %s, output: %s, error: %v", cmd, string(out), err) + volume, err := cim.QueryVolumeByUniqueID(volumeID, []string{}) + if err != nil && !errors.IsNotFound(err) { + return fmt.Errorf("error writing volume (%s) cache. error: %v", volumeID, err) + } + + result, err := volume.Flush() + if result != 0 || err != nil { + return fmt.Errorf("error writing volume (%s) cache. result: %d, error: %v", volumeID, result, err) } return nil } diff --git a/vendor/github.com/Microsoft/wmi/LICENSE b/vendor/github.com/Microsoft/wmi/LICENSE new file mode 100644 index 00000000..21071075 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Class.go b/vendor/github.com/Microsoft/wmi/go/wmi/Class.go new file mode 100644 index 00000000..e19f0332 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Class.go @@ -0,0 +1,16 @@ +package wmi + +// Class +type Class interface { + ClassName() string + SuperClassName() string + ServerName() string + Namespace() string + SuperClass() *Class + Properties() []string + Qualifiers() []string + Methods() []string + MethodParameters(string) []string + InvokeMethod(string, []string, string) (error, string) + Dispose() +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Credentials.go b/vendor/github.com/Microsoft/wmi/go/wmi/Credentials.go new file mode 100644 index 00000000..1a775288 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Credentials.go @@ -0,0 +1,13 @@ +package wmi + +// Credentials +type Credentials struct { + UserName string + Password string + Domain string +} + +// GetSecureString +func (cred Credentials) GetSecureString() (string, error) { + panic("not implemented") +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Instance.go b/vendor/github.com/Microsoft/wmi/go/wmi/Instance.go new file mode 100644 index 00000000..7392038d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Instance.go @@ -0,0 +1,24 @@ +package wmi + +// Instance represents an interface for the wmi instance +type Instance interface { + GetInstance() (*Instance, error) + GetProperty(name string) (string, error) + SetProperty(name, value string) (string, error) + ResetProperty(name string) (string, error) + Class() *Class + EmbeddedInstance() (string, error) + InstanceManager() *InstanceManager + Equals(*Instance) bool + Refresh() error + Commit() error + Modify() error + Delete() error + InstancePath() (string, error) + InvokeMethod(namespaceName string, methodName string, methodParameters *[]MethodParameter) (MethodResult, error) + GetRelated(resultClassName string) (*[]Instance, error) + GetRelatedEx(resultClassName, associatedClassName, resultRole, sourceRole string) (*[]Instance, error) + GetAssociated(resultClassName, associatedClassName, resultRole, sourceRole string) (*[]Instance, error) + EnumerateReferencingInstances(associatedClassName, sourceRole string) (*[]Instance, error) + Dispose() +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/InstanceManager.go b/vendor/github.com/Microsoft/wmi/go/wmi/InstanceManager.go new file mode 100644 index 00000000..9e2d4580 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/InstanceManager.go @@ -0,0 +1,17 @@ +package wmi + +// InstanceManager interface +type InstanceManager interface { + ServerName() string + Namespace() string + Credentials() *Credentials + EnumerateInstances(className string) (*[]Instance, error) + QueryInstances(query string) (*[]Instance, error) + QueryInstancesEx(query Query) (*[]Instance, error) + + CreateInstance(className string, propertyValues map[string]string) (*Instance, error) + GetInstance(className string, propertyValues map[string]string) (*Instance, error) + GetClass(className string) (*Class, error) + EnumerateClasses() (*[]Class, error) + GetInstancesFromPaths(pathArray []string) (*[]Instance, error) +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/MethodDeclaration.go b/vendor/github.com/Microsoft/wmi/go/wmi/MethodDeclaration.go new file mode 100644 index 00000000..16b08444 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/MethodDeclaration.go @@ -0,0 +1,7 @@ +package wmi + +type MethodDeclaration struct { + Name string + Parameters *[]MethodParameter + Qualifiers *[]Qualifier +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/MethodParameter.go b/vendor/github.com/Microsoft/wmi/go/wmi/MethodParameter.go new file mode 100644 index 00000000..897f50f6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/MethodParameter.go @@ -0,0 +1,66 @@ +package wmi + +import ( + "errors" + "reflect" +) + +// MethodParameter +type MethodParameter struct { + Name string + Value interface{} + Type WmiType +} + +// MethodParameterCollection +type MethodParameterCollection []MethodParameter + +// GetValue +func (c MethodParameterCollection) GetValue(paramName string, value interface{}) error { + mval, err := c.Get(paramName) + if err != nil { + return errors.New("Not Found") + } + value = mval.Value + return nil +} + +// GetValueArray +func (c MethodParameterCollection) GetValueArray(paramName string, value interface{}) error { + mval, err := c.Get(paramName) + if err != nil { + return errors.New("Not Found") + } + if mval.Value != nil { + v := reflect.ValueOf(mval.Value) + + tmpValue := make([]interface{}, v.Len()) + for i := 0; i < v.Len(); i++ { + tmpValue[i] = v.Index(i).Interface() + value = tmpValue + } + } else { + value = make([]interface{}, 0) + } + return nil +} + +// Contains +func (c MethodParameterCollection) Contains(paramName string) bool { + for _, a := range c { + if a.Name == paramName { + return true + } + } + return false +} + +// Contains +func (c MethodParameterCollection) Get(paramName string) (val *MethodParameter, err error) { + for _, a := range c { + if a.Name == paramName { + return &a, nil + } + } + return nil, errors.New("Not Found") +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/MethodResult.go b/vendor/github.com/Microsoft/wmi/go/wmi/MethodResult.go new file mode 100644 index 00000000..654cc006 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/MethodResult.go @@ -0,0 +1,7 @@ +package wmi + +// MethodResult +type MethodResult struct { + ReturnValue *MethodParameter + OutParameters *MethodParameterCollection +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Property.go b/vendor/github.com/Microsoft/wmi/go/wmi/Property.go new file mode 100644 index 00000000..1047d08a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Property.go @@ -0,0 +1,91 @@ +package wmi + +type PropertyFlags int + +const ( + // None + None PropertyFlags = 0 + // Class + WClass PropertyFlags = 1 + // Method + Method PropertyFlags = 2 + // Property + WProperty PropertyFlags = 4 + // Parameter + Parameter PropertyFlags = 8 + // Association + Association PropertyFlags = 16 + // Indication + Indication PropertyFlags = 32 + // Reference + Reference PropertyFlags = 64 + // Any + Any PropertyFlags = 127 + // EnableOverride + EnableOverride PropertyFlags = 128 + // DisableOverride + DisableOverride PropertyFlags = 256 + // Restricted + Restricted PropertyFlags = 512 + // ToSubClass + ToSubclass PropertyFlags = 1024 + // Translatable + Translatable PropertyFlags = 2048 + // Key + Key PropertyFlags = 4096 + // In + In PropertyFlags = 8192 + // Out + Out PropertyFlags = 16384 + // Required + Required PropertyFlags = 32768 + // Static + Static PropertyFlags = 65536 + // Abstract + Abstract PropertyFlags = 131072 + // Terminal + Terminal PropertyFlags = 262144 + // Expensive + Expensive PropertyFlags = 524288 + // Stream + Stream PropertyFlags = 1048576 + // ReadOnly + ReadOnly PropertyFlags = 2097152 + // NotModified + NotModified PropertyFlags = 33554432 + // NullValue + NullValue PropertyFlags = 536870912 + // Borrow + Borrow PropertyFlags = 1073741824 + // Adopt + //Adopt PropertyFlags = 2147483648; +) + +type WmiType int + +const ( + WbemCimtypeSint8 WmiType = 16 + WbemCimtypeUint8 WmiType = 17 + WbemCimtypeSint16 WmiType = 2 + WbemCimtypeUint16 WmiType = 18 + WbemCimtypeSint32 WmiType = 3 + WbemCimtypeUint32 WmiType = 19 + WbemCimtypeSint64 WmiType = 20 + WbemCimtypeUint64 WmiType = 21 + WbemCimtypeReal32 WmiType = 4 + WbemCimtypeReal64 WmiType = 5 + WbemCimtypeBoolean WmiType = 11 + WbemCimtypeString WmiType = 8 + WbemCimtypeDatetime WmiType = 101 + WbemCimtypeReference WmiType = 102 + WbemCimtypeChar16 WmiType = 103 + WbemCimtypeObject WmiType = 13 +) + +// Property +type Property interface { + Name() string + Value() string + Type() WmiType + Flags() PropertyFlags +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Qualifier.go b/vendor/github.com/Microsoft/wmi/go/wmi/Qualifier.go new file mode 100644 index 00000000..1b8215c4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Qualifier.go @@ -0,0 +1,6 @@ +package wmi + +type Qualifier interface { + Name() string + Value() string +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Query.go b/vendor/github.com/Microsoft/wmi/go/wmi/Query.go new file mode 100644 index 00000000..03d38ba5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Query.go @@ -0,0 +1,51 @@ +package wmi + +import "fmt" + +type WhereOperation int + +const ( + Equals WhereOperation = 0 + LessThan WhereOperation = 1 + GreaterThan WhereOperation = 2 + LessThanEquals WhereOperation = 3 + GreaterThenEquals WhereOperation = 4 + NotEqual WhereOperation = 5 + Like WhereOperation = 6 +) + +type QueryFilter struct { + Name string + Value string + Operation WhereOperation +} + +// GetFilter +func (q QueryFilter) GetFilter() string { + operator := "=" + switch q.Operation { + case Equals: + operator = "=" + case LessThan: + operator = "<" + case GreaterThan: + operator = ">" + case LessThanEquals: + operator = "<=" + case GreaterThenEquals: + operator = ">=" + case NotEqual: + operator = "!=" + case Like: + operator = "LIKE" + return fmt.Sprintf(" %s %s '%%%s%%'", q.Name, q.Value, operator) + default: + } + return fmt.Sprintf(" %s%s'%s'", q.Name, q.Value, operator) +} + +// Query +type Query interface { + ClassName() string + QueryString() string +} diff --git a/vendor/github.com/Microsoft/wmi/go/wmi/Session.go b/vendor/github.com/Microsoft/wmi/go/wmi/Session.go new file mode 100644 index 00000000..7f489c60 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/go/wmi/Session.go @@ -0,0 +1,26 @@ +package wmi + +type SessionStatus int + +const ( + Created SessionStatus = 0 + Connected SessionStatus = 1 + Disconnected SessionStatus = 2 + Disposed SessionStatus = 3 +) + +// Session +type Session interface { + Connect() (bool, error) + Dispose() + TestConnection() bool + GetProperty(name string) string + SetProperty(name, value string) string + ResetProperty(name string) string + GetClass(namespaceName, className string) (*Class, error) + GetInstance(namespaceName string, instance *Instance) (*Instance, error) + EnumerateClasses(namespaceName, className string) (*[]Class, error) + EnumerateInstances(namespaceName, className string) (*[]Instance, error) + QueryInstances(namespaceName, queryDislect, queryExpression string) (*[]Instance, error) + EnumerateReferencingInstances(namespaceName string, sourceInstance Instance, associationClassName, sourceRole string) (*[]Instance, error) +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/base/credential/credential.go b/vendor/github.com/Microsoft/wmi/pkg/base/credential/credential.go new file mode 100644 index 00000000..150a297a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/base/credential/credential.go @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package credential + +type WmiCredential struct { + UserName string + Password string + Domain string +} + +// NewWmiCredential +func NewWmiCredential(username, password, domain string) *WmiCredential { + return &WmiCredential{UserName: username, Password: password, Domain: domain} +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/base/host/host.go b/vendor/github.com/Microsoft/wmi/pkg/base/host/host.go new file mode 100644 index 00000000..71944e48 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/base/host/host.go @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package host + +import ( + "github.com/microsoft/wmi/pkg/base/credential" +) + +type WmiHost struct { + HostName string + credential *credential.WmiCredential +} + +func NewWmiLocalHost() *WmiHost { + return NewWmiHost("localhost") +} + +// NewWmiHost +func NewWmiHost(hostname string) *WmiHost { + return NewWmiHostWithCredential(hostname, "", "", "") +} + +// NewWmiHostWithCredential +func NewWmiHostWithCredential(hostname, username, password, domain string) *WmiHost { + return &WmiHost{HostName: hostname, credential: credential.NewWmiCredential(username, password, domain)} +} + +// GetCredential +func (host *WmiHost) GetCredential() *credential.WmiCredential { + return host.credential +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/base/instance/instancemanager.go b/vendor/github.com/Microsoft/wmi/pkg/base/instance/instancemanager.go new file mode 100644 index 00000000..688f92db --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/base/instance/instancemanager.go @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +package instance + +import ( + "log" + "strings" + "sync" + + "github.com/microsoft/wmi/pkg/base/credential" + "github.com/microsoft/wmi/pkg/base/host" + "github.com/microsoft/wmi/pkg/base/query" + wmisession "github.com/microsoft/wmi/pkg/base/session" + "github.com/microsoft/wmi/pkg/errors" + wmi "github.com/microsoft/wmi/pkg/wmiinstance" +) + +var ( + instanceManagerMap map[string]*WmiInstanceManager + mutex sync.Mutex +) + +type WmiInstanceManager struct { + Host *host.WmiHost + session *wmi.WmiSession + Namespace string +} + +func init() { + instanceManagerMap = map[string]*WmiInstanceManager{} +} + +func newWmiInstanceManager(hostname, namespaceName, userName, password, domainName string) (*WmiInstanceManager, error) { + im := &WmiInstanceManager{ + Host: host.NewWmiHostWithCredential(hostname, userName, password, domainName), + Namespace: namespaceName, + } + + wsession, err := wmisession.GetHostSession(namespaceName, im.Host) + if err != nil { + return nil, err + } + im.session = wsession + + return im, nil + +} + +func GetWmiInstanceManagerFromWHost(whost *host.WmiHost, namespaceName string) (*WmiInstanceManager, error) { + return GetWmiInstanceManagerFromCred(whost.HostName, namespaceName, whost.GetCredential()) +} +func GetWmiInstanceManagerFromCred(hostname, namespaceName string, cred *credential.WmiCredential) (*WmiInstanceManager, error) { + return GetWmiInstanceManager(hostname, namespaceName, cred.UserName, cred.Password, cred.Domain) +} +func GetWmiInstanceManager(hostname, namespaceName, userName, password, domainName string) (*WmiInstanceManager, error) { + mapId := strings.Join([]string{hostname, namespaceName, domainName}, "_") + if val, ok := instanceManagerMap[mapId]; ok { + return val, nil + } + + mutex.Lock() + defer mutex.Unlock() + var err error + instanceManagerMap[mapId], err = newWmiInstanceManager(hostname, namespaceName, userName, password, domainName) + if err != nil { + return nil, err + } + return instanceManagerMap[mapId], nil + +} + +func (im *WmiInstanceManager) CreateInstance(className string) (*wmi.WmiInstance, error) { + cls, err := im.session.GetClass(className) + if err != nil { + return nil, err + } + return cls.MakeInstance() +} + +func (im *WmiInstanceManager) GetInstance(instancePath string) (*wmi.WmiInstance, error) { + return im.session.GetInstance(instancePath) +} + +func (im *WmiInstanceManager) QueryInstances(queryString string) ([]*wmi.WmiInstance, error) { + return im.session.QueryInstances(queryString) +} + +func (im *WmiInstanceManager) QueryInstanceEx(queryString string) (*wmi.WmiInstance, error) { + instances, err := im.QueryInstances(queryString) + if err != nil { + return nil, err + } + if len(instances) == 0 { + return nil, errors.Wrapf(errors.NotFound, "Query [%s] failed with no instance", queryString) + } + + log.Printf("[WMI] QueryInstanceEx [%s]=>[%d]instances\n", queryString, len(instances)) + + // LEAK - return a clone and close the collection + return instances[0], nil +} + +func (im *WmiInstanceManager) QueryInstance(inquery *query.WmiQuery) (*wmi.WmiInstance, error) { + return im.QueryInstanceEx(inquery.String()) +} + +func GetWmiInstanceByName(whost *host.WmiHost, namespaceName, className, instanceName string) (*wmi.WmiInstance, error) { + return GetWmiInstanceEx(whost, namespaceName, query.NewWmiQuery(className, "Name", instanceName)) +} + +func GetWmiInstanceEx2(hostName string, cred credential.WmiCredential, namespaceName string, inquery *query.WmiQuery) (*wmi.WmiInstance, error) { + return GetWmiInstance(hostName, namespaceName, cred.UserName, cred.Password, cred.Domain, inquery) +} + +func GetWmiInstanceEx(whost *host.WmiHost, namespaceName string, inquery *query.WmiQuery) (*wmi.WmiInstance, error) { + cred := whost.GetCredential() + return GetWmiInstance(whost.HostName, namespaceName, cred.UserName, cred.Password, cred.Domain, inquery) +} + +func GetWmiInstance(hostname, namespaceName, userName, password, domainName string, inquery *query.WmiQuery) (*wmi.WmiInstance, error) { + im, err := GetWmiInstanceManager(hostname, namespaceName, userName, password, domainName) + if err != nil { + return nil, err + } + return im.QueryInstance(inquery) +} + +func CreateWmiInstance(host *host.WmiHost, namespaceName, class string) (*wmi.WmiInstance, error) { + im, err := GetWmiInstanceManagerFromWHost(host, namespaceName) + if err != nil { + return nil, err + } + return im.CreateInstance(class) +} +func GetWmiInstancesFromHost(host *host.WmiHost, namespaceName string, inquery *query.WmiQuery) (wmi.WmiInstanceCollection, error) { + im, err := GetWmiInstanceManagerFromWHost(host, namespaceName) + if err != nil { + return nil, err + } + instances, err := im.QueryInstances(inquery.String()) + if err != nil { + return nil, err + } + winstances := wmi.WmiInstanceCollection{} + winstances = append(winstances, instances...) + return winstances, nil +} +func GetWmiInstanceFromPath(host *host.WmiHost, namespaceName, instancePath string) (*wmi.WmiInstance, error) { + log.Printf("[WMI] Get Instance from path [%s]\n", instancePath) + im, err := GetWmiInstanceManagerFromWHost(host, namespaceName) + if err != nil { + return nil, err + } + return im.GetInstance(instancePath) +} + +func GetWmiJob(host *host.WmiHost, namespaceName, instancePath string) (*wmi.WmiJob, error) { + im, err := GetWmiInstanceManagerFromWHost(host, namespaceName) + if err != nil { + return nil, err + } + instance, err := im.GetInstance(instancePath) + if err != nil { + return nil, err + } + return wmi.NewWmiJob(instance) +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/base/query/query.go b/vendor/github.com/Microsoft/wmi/pkg/base/query/query.go new file mode 100644 index 00000000..e7293c24 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/base/query/query.go @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package query + +import ( + "fmt" + "log" + "strings" +) + +// https://docs.microsoft.com/en-us/windows/win32/wmisdk/wql-sql-for-wmi + +type CompareOperator string + +const ( + Equals CompareOperator = "=" + LessThan CompareOperator = "<" + GreaterThan CompareOperator = ">" + LessThanEquals CompareOperator = "<=" + GreaterThanEquals CompareOperator = ">=" + NotEquals CompareOperator = "<>" + Like CompareOperator = "LIKE" + Isa CompareOperator = "ISA" +) + +type WmiQueryFilter struct { + Name string + Value string + Operator CompareOperator +} + +type WmiQuery struct { + ClassName string + Filters []*WmiQueryFilter + SelectList []string +} + +func NewWmiQuery(className string, filters ...string) (wquery *WmiQuery) { + wquery = &WmiQuery{ClassName: className, Filters: []*WmiQueryFilter{}} + if len(filters) == 0 { + return + } + + wquery.BuildQueryFilter(filters) + return +} + +func NewWmiQueryWithSelectList(className string, selectList []string, filters ...string) (wquery *WmiQuery) { + wquery = &WmiQuery{ClassName: className, SelectList: selectList, Filters: []*WmiQueryFilter{}} + if len(filters) == 0 { + return + } + + wquery.BuildQueryFilter(filters) + return +} + +func (q *WmiQuery) BuildQueryFilter(filters []string) { + if len(filters)%2 == 1 { + log.Fatalf("Even number of strings is required to build key=value set of filters: [%+v]\n", filters) + } + + for i := 0; i < len(filters); i = i + 2 { + qfilter := NewWmiQueryFilter(filters[i], filters[i+1], Equals) + q.Filters = append(q.Filters, qfilter) + } + + return +} + +// NewWmiQueryFilter +func NewWmiQueryFilter(name, value string, oper CompareOperator) *WmiQueryFilter { + return &WmiQueryFilter{Name: name, Value: value, Operator: oper} +} + +func (q *WmiQueryFilter) String() string { + if q.Operator == Like { + return fmt.Sprintf("%s %s '%%%s%%'", q.Name, q.Operator, q.Value) + } else { + return fmt.Sprintf("%s %s '%s'", q.Name, q.Operator, q.Value) + } +} +func (q *WmiQuery) AddFilterWithComparer(propertyName, value string, oper CompareOperator) { + q.Filters = append(q.Filters, NewWmiQueryFilter(propertyName, value, oper)) + return +} +func (q *WmiQuery) AddFilter(propertyName, value string) { + q.Filters = append(q.Filters, NewWmiQueryFilter(propertyName, value, Equals)) + return +} + +// HasFilter +func (q *WmiQuery) HasFilter() bool { + return len(q.Filters) > 0 +} + +// String +func (q *WmiQuery) String() (queryString string) { + paramStr := "*" + if len(q.SelectList) > 0 { + paramStr = strings.Join(q.SelectList, ",") + } + queryString = fmt.Sprintf("SELECT %s FROM %s", paramStr, q.ClassName) + + if len(q.Filters) == 0 { + return + } + + queryString = fmt.Sprintf("%s WHERE ", queryString) + + for _, val := range q.Filters[:len(q.Filters)-1] { + queryString = queryString + fmt.Sprintf(" %s AND", val.String()) + } + + queryString = queryString + fmt.Sprintf(" %s ", q.Filters[len(q.Filters)-1].String()) + return +} + +type WmiQueryFilterCollection []*WmiQueryFilter + +func (c *WmiQueryFilterCollection) String() string { + queryString := "" + for _, query := range *c { + queryString = fmt.Sprintf("%s AND %s", queryString, query.String()) + } + return queryString +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/base/session/session.go b/vendor/github.com/Microsoft/wmi/pkg/base/session/session.go new file mode 100644 index 00000000..8838df77 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/base/session/session.go @@ -0,0 +1,95 @@ +//go:build windows +// +build windows + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +package session + +import ( + "github.com/pkg/errors" + "os" + "strings" + + "github.com/microsoft/wmi/pkg/base/credential" + "github.com/microsoft/wmi/pkg/base/host" + wmi "github.com/microsoft/wmi/pkg/wmiinstance" +) + +var ( + sessionManager *wmi.WmiSessionManager + sessionsMap map[string]*wmi.WmiSession + localHostName string +) + +func init() { + localHostName, _ = os.Hostname() + sessionsMap = make(map[string]*wmi.WmiSession) + sessionManager = wmi.NewWmiSessionManager() +} + +// StopWMI +func StopWMI() { + for key := range sessionsMap { + if sessionsMap[key] != nil { + sessionsMap[key].Dispose() + } + sessionsMap[key] = nil + } + + if sessionManager != nil { + sessionManager.Dispose() + sessionManager = nil + } +} + +// GetHostSession +func GetHostSession(namespaceName string, whost *host.WmiHost) (*wmi.WmiSession, error) { + cred := whost.GetCredential() + return GetSession(namespaceName, whost.HostName, cred.Domain, cred.UserName, cred.Password) +} + +func GetHostSessionWithCredentials(namespaceName string, whost *host.WmiHost, cred *credential.WmiCredential) (*wmi.WmiSession, error) { + return GetSession(namespaceName, whost.HostName, cred.Domain, cred.UserName, cred.Password) +} + +// GetSession +func GetSession(namespaceName string, serverName string, domain string, userName string, password string) (*wmi.WmiSession, error) { + sessionsMapId := strings.Join([]string{namespaceName, serverName, domain}, "_") + if sessionsMap[sessionsMapId] == nil { + var err error + sessionsMap[sessionsMapId], err = createSession(namespaceName, serverName, domain, userName, password) + if err != nil { + return nil, err + } + } + + return sessionsMap[sessionsMapId], nil +} + +// //////////// Private functions //////////////////////////// +func createSession(sessionName string, serverName string, domain string, username string, password string) (*wmi.WmiSession, error) { + // TODO: ideally, we should also compare the domain here. + // that said, this is low priority as cross-domain WMI calls are rare + if strings.EqualFold(localHostName, serverName) { + // Optimization for local clusters: connecting to the local cluster through remote WMI results in a much longer + // response than connecting directly. When providing the cluster name, the cluster has to go through a + // long sequence of connection/authentication. Not providing the name allows the cluster to skip that + // expensive sequence. + serverName = "" + domain = "" + } + + session, err := sessionManager.GetSession(sessionName, serverName, domain, username, password) + if err != nil { + return nil, errors.Wrapf(err, "Failed getting the WMI session for "+sessionName) + } + + connected, err := session.Connect() + + if !connected || err != nil { + return nil, errors.Wrapf(err, "Failed connecting to the WMI session for "+sessionName) + } + + return session, nil +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/errors/errors.go b/vendor/github.com/Microsoft/wmi/pkg/errors/errors.go new file mode 100644 index 00000000..ffad9b5d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/errors/errors.go @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +package errors + +import ( + "errors" + "fmt" + "strings" + + perrors "github.com/pkg/errors" +) + +const ( + wmiError = "WMI Error 0x" +) + +var ( + NotFound error = errors.New("Not Found") + Timedout error = errors.New("Timedout") + InvalidInput error = errors.New("Invalid Input") + InvalidType error = errors.New("Invalid Type") + NotSupported error = errors.New("Not Supported") + AlreadyExists error = errors.New("Already Exists") + InvalidFilter error = errors.New("Invalid Filter") + Failed error = errors.New("Failed") + NotImplemented error = errors.New("Not Implemented") + Unknown error = errors.New("Unknown Reason") +) + +func Wrap(cause error, message string) error { + return perrors.Wrap(cause, message) +} + +func Wrapf(err error, format string, args ...interface{}) error { + return perrors.Wrapf(err, format, args...) +} + +func IsNotFound(err error) bool { + return checkError(err, NotFound) +} +func IsAlreadyExists(err error) bool { + return checkError(err, AlreadyExists) +} +func IsTimedout(err error) bool { + return checkError(err, Timedout) +} +func IsInvalidInput(err error) bool { + return checkError(err, InvalidInput) +} +func IsInvalidType(err error) bool { + return checkError(err, InvalidType) +} +func IsNotSupported(err error) bool { + return checkError(err, NotSupported) +} +func IsInvalidFilter(err error) bool { + return checkError(err, InvalidFilter) +} +func IsFailed(err error) bool { + return checkError(err, Failed) +} +func IsNotImplemented(err error) bool { + return checkError(err, NotImplemented) +} +func IsUnknown(err error) bool { + return checkError(err, Unknown) +} +func IsWMIError(err error) bool { + if err == nil { + return false + } + if strings.HasPrefix(err.Error(), wmiError) { + return true + } + cerr := perrors.Cause(err) + if strings.HasPrefix(cerr.Error(), wmiError) { + return true + } + + return false +} + +func checkError(wrappedError, err error) bool { + if wrappedError == nil { + return false + } + if wrappedError == err { + return true + } + cerr := perrors.Cause(wrappedError) + if cerr != nil && cerr == err { + return true + } + + return false + +} + +func New(errString string) error { + return errors.New(errString) +} + +func NewWMIError(errorCode uint16) error { + return fmt.Errorf(wmiError+"%08x", errorCode) +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiClass.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiClass.go new file mode 100644 index 00000000..eb086094 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiClass.go @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implement a wrapper of the SWbemObject class (from an instance perspective). +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemobject + +package cim + +import ( + "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" +) + +type WmiClass struct { + session *WmiSession + class *ole.IDispatch + classVar *ole.VARIANT +} + +func CreateWmiClass(classVar *ole.VARIANT, session *WmiSession) (*WmiClass, error) { + return &WmiClass{ + classVar: classVar, + class: classVar.ToIDispatch(), + session: session, + }, nil +} + +// Makes a new instance of the class +func (c *WmiClass) MakeInstance() (*WmiInstance, error) { + rawResult, err := oleutil.CallMethod(c.class, "SpawnInstance_") + if err != nil { + return nil, err + } + + return CreateWmiInstance(rawResult, c.session) +} + +func (c *WmiClass) mustGetSystemProperty(name string) *WmiProperty { + wmiProperty, err := c.GetSystemProperty(name) + if err != nil { + panic("Couldn't retreive a system property. GetSystemProperty failed") + } + + return wmiProperty +} + +func (c *WmiClass) GetSystemProperty(name string) (*WmiProperty, error) { + // Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemobjectex-systemproperties- + rawResult, err := oleutil.GetProperty(c.class, "SystemProperties_") + if err != nil { + return nil, err + } + + // SWbemObjectEx.SystemProperties_ returns + // an SWbemPropertySet object that contains the collection + // of sytem properties for the c class + sWbemObjectExAsIDispatch := rawResult.ToIDispatch() + defer rawResult.Clear() + + // Get the system property + sWbemProperty, err := oleutil.CallMethod(sWbemObjectExAsIDispatch, "Item", name) + if err != nil { + return nil, err + } + + return CreateWmiProperty(sWbemProperty, c.session) +} + +// ClassName +func (c *WmiClass) GetClassName() string { + class := c.mustGetSystemProperty("__CLASS") + defer class.Close() + + return class.Value().(string) +} + +// SetClassName +func (c *WmiClass) SetClassName(name string) error { + rawResult, err := oleutil.GetProperty(c.class, "Path_") + if err != nil { + return err + } + + pathIDispatch := rawResult.ToIDispatch() + defer rawResult.Clear() + + classRawResult, err := oleutil.PutProperty(pathIDispatch, "Class", name) + if err != nil { + return err + } + defer classRawResult.Clear() + + return nil +} + +// SuperClassName +func (c *WmiClass) GetSuperClassName() string { + superclass := c.mustGetSystemProperty("__SUPERCLASS") + defer superclass.Close() + + return superclass.Value().(string) +} + +// ServerName +func (c *WmiClass) GetServerName() string { + server := c.mustGetSystemProperty("__SERVER") + defer server.Close() + + return server.Value().(string) +} + +// Namespace +func (c *WmiClass) GetNamespace() string { + namespace := c.mustGetSystemProperty("__NAMESPACE") + defer namespace.Close() + + return namespace.Value().(string) +} + +// SuperClass +func (c *WmiClass) GetSuperClass() *WmiClass { + class, err := c.session.GetClass(c.GetSuperClassName()) + if err != nil { + panic("The class for this instance doesn't exist") + } + + return class +} + +// Derivation +func (c *WmiClass) GetDerivation() []string { + valueNameProperty, err := oleutil.GetProperty(c.class, "Derivation_") + if err != nil { + panic("GetDerivation() failed to get the Derivation_ name property") + } + defer valueNameProperty.Clear() + + derivations, err := GetVariantValues(valueNameProperty) + if len(derivations) < 1 { + panic("GetDerivation() failed to get the Derivation_ values") + } + + values := []string{} + for _, derivation := range derivations { + values = append(values, derivation.(string)) + } + + return values +} + +// Properties +func (c *WmiClass) GetPropertiesNames() []string { + values := c.getValueList("Properties_") + + valueNames := []string{} + for _, value := range values { + valueNames = append(valueNames, value.Name()) + } + CloseAllProperties(values) + + return valueNames +} + +// Qualifiers +func (c *WmiClass) GetQualifiersNames() []string { + values := c.getValueList("Qualifiers_") + + valueNames := []string{} + for _, value := range values { + valueNames = append(valueNames, value.Name()) + } + CloseAllProperties(values) + + return valueNames +} + +// Methods +func (c *WmiClass) GetMethodsNames() []string { + values := c.getValueList("Methods_") + + valueNames := []string{} + for _, value := range values { + valueNames = append(valueNames, value.Name()) + } + CloseAllProperties(values) + + return valueNames +} + +// GetProperty gets the property of the instance specified by name and returns in value +func (c *WmiClass) GetProperty(name string) (interface{}, error) { + rawResult, err := oleutil.GetProperty(c.class, name) + if err != nil { + return nil, err + } + + defer rawResult.Clear() + + if rawResult.VT == 0x1 { + return nil, err + } + + return GetVariantValue(rawResult) +} + +// SetProperty sets a value of property representation by name with value +func (c *WmiClass) SetProperty(name string, value interface{}) error { + rawResult, err := oleutil.PutProperty(c.class, name, value) + if err != nil { + return err + } + + defer rawResult.Clear() + return nil +} + +// Commit +func (c *WmiClass) Commit() error { + rawResult, err := oleutil.CallMethod(c.class, "Put_") + if err != nil { + return err + } + defer rawResult.Clear() + return nil + +} + +// Modify +func (c *WmiClass) Modify() error { + return c.Commit() +} + +func (c *WmiClass) getValueList(valuePropertyName string) []*WmiProperty { + valuesProperty, err := oleutil.GetProperty(c.class, valuePropertyName) + if err != nil { + panic("getValueList failed getting valuePropertyName") + } + defer valuesProperty.Clear() + + result := valuesProperty.ToIDispatch() + // Doc: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/dispid-constants + enum_property, err := result.GetProperty("_NewEnum") + if err != nil { + panic("getValueList() failed getting _NewEnum") + } + defer enum_property.Clear() + + // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-ienumvariant + enum, err := enum_property.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) + if err != nil { + panic("getValueList() failed getting IID_IEnumVariant") + } + if enum == nil { + return []*WmiProperty{} + } + defer enum.Release() + + properties := []*WmiProperty{} + for valueVariant, length, err := enum.Next(1); length > 0; valueVariant, length, err = enum.Next(1) { + if err != nil { + panic("getValueList() failed to browse the value list") + } + + property, err := CreateWmiProperty(&valueVariant, c.session) + if err != nil { + panic("getValueList() failed to create the WMI property") + } + + properties = append(properties, property) + } + + return properties +} + +// MethodParameters +func (c *WmiClass) MethodParameters(methodName string) []string { + panic("not implemented") + // TODO. Relevant docs: + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemmethodset + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemmethod +} + +// Invoke static method on a wmi class +func (c *WmiClass) InvokeMethod(methodName string, params ...interface{}) ([]interface{}, error) { + rawResult, err := oleutil.CallMethod(c.class, methodName, params...) + if err != nil { + return nil, err + } + defer rawResult.Clear() + values, err := GetVariantValues(rawResult) + return values, err +} + +// CloseAllClasses +func CloseAllClasses(classes []*WmiClass) { + for _, class := range classes { + class.Close() + } +} + +// Dispose +func (c *WmiClass) Close() error { + return c.classVar.Clear() +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiEventSink.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiEventSink.go new file mode 100644 index 00000000..2d6c83e3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiEventSink.go @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class wraps a typicaly SWbemSink object. Its implementation is based on the +// SWbemSink documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/receiving-asynchronous-event-notifications +// as well as the winsock example: https://github.com/go-ole/go-ole/blob/master/_example/winsock/winsock.go + +// Note: Please consider the security implications of makig asynchronous calls. +// Documentation: +// https://docs.microsoft.com/en-us/windows/win32/wmisdk/making-an-asynchronous-call-with-vbscript +// https://docs.microsoft.com/en-us/windows/win32/wmisdk/setting-security-on-an-asynchronous-call + +package cim + +import ( + "reflect" + "syscall" + "unsafe" + + ole "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" +) + +var IID_ISWbemObjectPath = &ole.GUID{0x5791BC27, 0xCE9C, 0x11d1, [8]byte{0x97, 0xBF, 0x00, 0x00, 0xF8, 0x1E, 0x84, 0x9C}} +var IID_ISWbemSinkEvents = &ole.GUID{0x75718CA0, 0xF029, 0x11d1, [8]byte{0xA1, 0xAC, 0x00, 0xC0, 0x4F, 0xB6, 0xC2, 0x23}} + +const ( + eventSinkObjectName = "WbemScripting.SWbemSink" + iSWbemSinkEventsGuid = "{75718CA0-F029-11D1-A1AC-00C04FB6C223}" +) + +type WmiEventSink struct { + lpVtbl *WmiEventSinkVtbl + ref int32 + instance *ole.IDispatch + unknown *ole.IUnknown + closed bool + session *WmiSession + onObjectReady func(interface{}, []*WmiInstance) + onCompleted func(interface{}, []*WmiInstance) + onProgress func(interface{}, []*WmiInstance) + onObjectPut func(interface{}, []*WmiInstance) + callbackContext interface{} +} + +type WmiEventSinkVtbl struct { + pQueryInterface uintptr + pAddRef uintptr + pRelease uintptr + pGetTypeInfoCount uintptr + pGetTypeInfo uintptr + pGetIDsOfNames uintptr + pInvoke uintptr +} + +// DISPPARAMS are the arguments that passed to methods or property. +type DISPPARAMS struct { + rgvarg uintptr + rgdispidNamedArgs uintptr + cArgs uint32 + cNamedArgs uint32 +} + +func CreateWmiEventSink(session *WmiSession, callbackContext interface{}, onObjectReady func(interface{}, []*WmiInstance), onCompleted func(interface{}, []*WmiInstance), onProgress func(interface{}, []*WmiInstance), onObjectPut func(interface{}, []*WmiInstance)) (*WmiEventSink, error) { + eventSinkObject, err := oleutil.CreateObject(eventSinkObjectName) + if err != nil { + return nil, err + } + + eventSinkInstance, err := eventSinkObject.QueryInterface(ole.IID_IDispatch) + if err != nil { + return nil, err + } + + wmiEventSink := &WmiEventSink{} + wmiEventSink.lpVtbl = &WmiEventSinkVtbl{} + wmiEventSink.lpVtbl.pQueryInterface = syscall.NewCallback(queryInterface) + wmiEventSink.lpVtbl.pAddRef = syscall.NewCallback(addRef) + wmiEventSink.lpVtbl.pRelease = syscall.NewCallback(release) + wmiEventSink.lpVtbl.pGetTypeInfoCount = syscall.NewCallback(getTypeInfoCount) + wmiEventSink.lpVtbl.pGetTypeInfo = syscall.NewCallback(getTypeInfo) + wmiEventSink.lpVtbl.pGetIDsOfNames = syscall.NewCallback(getIDsOfNames) + wmiEventSink.lpVtbl.pInvoke = syscall.NewCallback(invoke) + wmiEventSink.onObjectReady = onObjectReady + wmiEventSink.onCompleted = onCompleted + wmiEventSink.onProgress = onProgress + wmiEventSink.onObjectPut = onObjectPut + wmiEventSink.callbackContext = callbackContext + wmiEventSink.instance = eventSinkInstance + wmiEventSink.unknown = eventSinkObject + wmiEventSink.session = session + + return wmiEventSink, nil +} + +func (c *WmiEventSink) Connect() (cookie uint32, err error) { + cookie = 0 + err = nil + + connectionPointContainer, err := c.instance.QueryInterface(ole.IID_IConnectionPointContainer) + if err != nil { + return + } + defer connectionPointContainer.Release() + + container := (*ole.IConnectionPointContainer)(unsafe.Pointer(connectionPointContainer)) + + var point *ole.IConnectionPoint + err = container.FindConnectionPoint(IID_ISWbemSinkEvents, &point) + if err != nil { + return + } + + return point.Advise((*ole.IUnknown)(unsafe.Pointer(c))) +} + +func (c *WmiEventSink) GetAndDispatchMessages() { + for c.ref != 0 { + var m ole.Msg + ole.GetMessage(&m, 0, 0, 0) + ole.DispatchMessage(&m) + } +} + +func (c *WmiEventSink) IsReadyToClose() bool { + return (c.ref == 0) +} + +func (c *WmiEventSink) PeekAndDispatchMessages() bool { + var m ole.Msg + msgAvailable, err := PeekMessage(&m, 0, 0, 0, PM_REMOVE) + if err != nil { + return false + } + + if msgAvailable { + ole.DispatchMessage(&m) + } + + return msgAvailable +} + +func (c *WmiEventSink) IsClosed() bool { + return c.closed +} +func (c *WmiEventSink) Close() { + if c.instance != nil { + c.instance.Release() + c.instance = nil + } + if c.unknown != nil { + c.unknown.Release() + c.unknown = nil + } + c.closed = true +} + +/////////////////////////////// Private methods and callbacks ///////////////////////////////////////////////////// + +func queryInterface(this *ole.IUnknown, iid *ole.GUID, punk **ole.IUnknown) uintptr { + s, _ := ole.StringFromCLSID(iid) + + *punk = nil + if ole.IsEqualGUID(iid, ole.IID_IUnknown) || + ole.IsEqualGUID(iid, ole.IID_IDispatch) { + addRef(this) + *punk = this + return ole.S_OK + } + if s == iSWbemSinkEventsGuid { + addRef(this) + *punk = this + return ole.S_OK + } + + return ole.E_NOINTERFACE +} + +func addRef(this *ole.IUnknown) uintptr { + pthis := (*WmiEventSink)(unsafe.Pointer(this)) + pthis.ref++ + return uintptr(pthis.ref) +} + +func release(this *ole.IUnknown) uintptr { + pthis := (*WmiEventSink)(unsafe.Pointer(this)) + pthis.ref-- + return uintptr(pthis.ref) +} + +func getIDsOfNames(this *ole.IUnknown, iid *ole.GUID, wnames **uint16, namelen int, lcid int, pdisp *int32) uintptr { + var pdispSlice []int32 + sliceHeader := (*reflect.SliceHeader)((unsafe.Pointer(&pdispSlice))) + sliceHeader.Cap = namelen + sliceHeader.Len = namelen + sliceHeader.Data = uintptr(unsafe.Pointer(pdisp)) + + var pwnamesSlice []*uint16 + sliceHeader2 := (*reflect.SliceHeader)((unsafe.Pointer(&pwnamesSlice))) + sliceHeader2.Cap = namelen + sliceHeader2.Len = namelen + sliceHeader2.Data = uintptr(unsafe.Pointer(wnames)) + + for n := 0; n < namelen; n++ { + pdispSlice[n] = int32(n) + } + return uintptr(ole.S_OK) +} + +func getTypeInfoCount(pcount *int) uintptr { + if pcount != nil { + *pcount = 0 + } + return uintptr(ole.S_OK) +} + +func getTypeInfo(ptypeif *uintptr) uintptr { + return uintptr(ole.E_NOTIMPL) +} + +func invoke(this *ole.IDispatch, dispid int, riid *ole.GUID, lcid int, flags int16, rawdispparams *DISPPARAMS, result *ole.VARIANT, pexcepinfo *ole.EXCEPINFO, nerr *uint) uintptr { + pthis := (*WmiEventSink)(unsafe.Pointer(this)) + if pthis.IsClosed() { + return ole.S_OK + } + + dispparams := GetDispParamsFromRaw(rawdispparams) + wmiEventInstances, err := GetVariantArrayAsWmiInstances(dispparams.rgvarg, pthis.session) + if err != nil { + return ole.S_OK + } + switch dispid { + case 1: + pthis.onObjectReady(pthis.callbackContext, wmiEventInstances) + return ole.S_OK + case 2: + pthis.onCompleted(pthis.callbackContext, wmiEventInstances) + return ole.S_OK + case 3: + pthis.onProgress(pthis.callbackContext, wmiEventInstances) + return ole.S_OK + case 4: + pthis.onObjectPut(pthis.callbackContext, wmiEventInstances) + return ole.S_OK + default: + } + return ole.E_NOTIMPL +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiHelper.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiHelper.go new file mode 100644 index 00000000..322fe915 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiHelper.go @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +package cim + +import ( + "reflect" + "syscall" + "unsafe" + + "github.com/go-ole/go-ole" + "golang.org/x/sys/windows" + "strings" +) + +// Additional calls +var ( + modole32 = windows.NewLazySystemDLL("ole32.dll") + moduser32 = windows.NewLazySystemDLL("user32.dll") + + procCoInitializeSecurity = modole32.NewProc("CoInitializeSecurity") + procPeekMessageW = moduser32.NewProc("PeekMessageW") +) + +type RemoveMessageFlags uint32 + +const ( + PM_NOREMOVE RemoveMessageFlags = 0 + PM_REMOVE RemoveMessageFlags = 1 + PM_NOYIELD RemoveMessageFlags = 2 +) + +type RpcAuthenticationLevel uint32 + +const ( + RPC_C_AUTHN_LEVEL_DEFAULT RpcAuthenticationLevel = 0 + RPC_C_AUTHN_LEVEL_NONE RpcAuthenticationLevel = 1 + RPC_C_AUTHN_LEVEL_CONNECT RpcAuthenticationLevel = 2 + RPC_C_AUTHN_LEVEL_CALL RpcAuthenticationLevel = 3 + RPC_C_AUTHN_LEVEL_PKT RpcAuthenticationLevel = 4 + RPC_C_AUTHN_LEVEL_PKT_INTEGRITY RpcAuthenticationLevel = 5 + RPC_C_AUTHN_LEVEL_PKT_PRIVACY RpcAuthenticationLevel = 6 +) + +type RpcImpersonationLevel uint32 + +const ( + RPC_C_IMP_LEVEL_DEFAULT RpcImpersonationLevel = 0 + RPC_C_IMP_LEVEL_ANONYMOUS RpcImpersonationLevel = 1 + RPC_C_IMP_LEVEL_IDENTIFY RpcImpersonationLevel = 2 + RPC_C_IMP_LEVEL_IMPERSONATE RpcImpersonationLevel = 3 + RPC_C_IMP_LEVEL_DELEGATE RpcImpersonationLevel = 4 +) + +type tagEOLE_AUTHENTICATION_CAPABILITIES uint32 + +const ( + EOAC_NONE tagEOLE_AUTHENTICATION_CAPABILITIES = 0 + EOAC_MUTUAL_AUTH tagEOLE_AUTHENTICATION_CAPABILITIES = 0x1 + EOAC_STATIC_CLOAKING tagEOLE_AUTHENTICATION_CAPABILITIES = 0x20 + EOAC_DYNAMIC_CLOAKING tagEOLE_AUTHENTICATION_CAPABILITIES = 0x40 + EOAC_ANY_AUTHORITY tagEOLE_AUTHENTICATION_CAPABILITIES = 0x80 + EOAC_MAKE_FULLSIC tagEOLE_AUTHENTICATION_CAPABILITIES = 0x100 + EOAC_DEFAULT tagEOLE_AUTHENTICATION_CAPABILITIES = 0x800 + EOAC_SECURE_REFS tagEOLE_AUTHENTICATION_CAPABILITIES = 0x2 + EOAC_ACCESS_CONTROL tagEOLE_AUTHENTICATION_CAPABILITIES = 0x4 + EOAC_APPID tagEOLE_AUTHENTICATION_CAPABILITIES = 0x8 + EOAC_DYNAMIC tagEOLE_AUTHENTICATION_CAPABILITIES = 0x10 + EOAC_REQUIRE_FULLSIC tagEOLE_AUTHENTICATION_CAPABILITIES = 0x200 + EOAC_AUTO_IMPERSONATE tagEOLE_AUTHENTICATION_CAPABILITIES = 0x400 + EOAC_NO_CUSTOM_MARSHAL tagEOLE_AUTHENTICATION_CAPABILITIES = 0x2000 + EOAC_DISABLE_AAA tagEOLE_AUTHENTICATION_CAPABILITIES = 0x1000 +) + +const ( + RPC_E_TOO_LATE uint32 = 0x80010119 +) + +func GetVariantValue(rawValue *ole.VARIANT) (interface{}, error) { + array := rawValue.ToArray() + if array == nil { + return rawValue.Value(), nil + } + return array.ToValueArray(), nil +} + +func GetVariantValues(rawValue *ole.VARIANT) ([]interface{}, error) { + + var values []interface{} + array := rawValue.ToArray() + + if array == nil { + // Not an array + values = append(values, rawValue.Value()) + } else { + values = array.ToValueArray() + } + + return values, nil +} + +type DispParams struct { + rgvarg []ole.VARIANT + rgdispidNamedArgs []int32 +} + +func GetDispParamsFromRaw(dispparams *DISPPARAMS) *DispParams { + + // convert the DISPPARAMS to a slice header + params := DispParams{} + + var slice1 []ole.VARIANT + sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&slice1)) + sliceHeader.Data = dispparams.rgvarg + sliceHeader.Len = int(dispparams.cArgs) + sliceHeader.Cap = int(dispparams.cArgs) + params.rgvarg = make([]ole.VARIANT, dispparams.cArgs) + copy(params.rgvarg, slice1) + + var slice2 []int32 + sliceHeader = (*reflect.SliceHeader)(unsafe.Pointer(&slice2)) + sliceHeader.Data = dispparams.rgdispidNamedArgs + sliceHeader.Len = int(dispparams.cNamedArgs) + sliceHeader.Cap = int(dispparams.cNamedArgs) + params.rgdispidNamedArgs = make([]int32, dispparams.cNamedArgs) + copy(params.rgdispidNamedArgs, slice2) + + return ¶ms +} + +func GetVariantArrayAsWmiInstances(rawValues []ole.VARIANT, session *WmiSession) (WmiInstanceCollection, error) { + wcol := WmiInstanceCollection{} + for _, rawValue := range rawValues { + // skip wrong types and empty objects + if rawValue.VT != ole.VT_DISPATCH || rawValue.Val == 0 { + continue + } + + instance, err := CreateWmiInstance(&rawValue, session) + if err != nil { + return nil, err + } + wcol = append(wcol, instance) + } + + return wcol, nil +} + +func GetVariantArrayValues(rawValues []ole.VARIANT) ([]interface{}, error) { + var values []interface{} + + for _, rawValue := range rawValues { + array := rawValue.ToArray() + + if array == nil { + // Not an array + values = append(values, rawValue.Value()) + } else { + values = append(values, array.ToValueArray()) + } + } + + return values, nil +} + +func EscapeQueryValue(rawString string) string { + // Double the backslash character as per required by the "WHERE" WMI clause + // Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/where-clause + // Interestingly, double quotes don't seem to need escaping. + return strings.ReplaceAll(strings.ReplaceAll(rawString, "\\", "\\\\"), "'", "\\'") +} + +func FindStringInSlice(stringList []string, value string) (int, bool) { + for i, item := range stringList { + if item == value { + return i, true + } + } + return -1, false +} + +// PeekMessage in message queue from runtime. +// +// This function appears to block. PeekMessage does not block. +func PeekMessage(msg *ole.Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32, RemoveMsg RemoveMessageFlags) (ret bool, err error) { + r0, _, err := syscall.Syscall6(procPeekMessageW.Addr(), 5, uintptr(unsafe.Pointer(msg)), uintptr(hwnd), uintptr(MsgFilterMin), uintptr(MsgFilterMax), uintptr(RemoveMsg), 0) + ret = bool(r0 > 0) + return +} + +func CoInitializeSecurity(authLevel RpcAuthenticationLevel, impLevel RpcImpersonationLevel) (err error) { + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/setting-the-default-process-security-level-using-c- + hr, _, _ := syscall.Syscall9(procCoInitializeSecurity.Addr(), 9, uintptr(0), ^uintptr(0), uintptr(0), uintptr(0), uintptr(authLevel), uintptr(impLevel), uintptr(0), uintptr(EOAC_NONE), uintptr(0)) + if hr != 0 { + err = ole.NewError(hr) + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiInstance.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiInstance.go new file mode 100644 index 00000000..9e80c585 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiInstance.go @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implement a wrapper of the SWbemObject class (from an instance perspective). +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemobject + +package cim + +import ( + "fmt" + "log" + + "github.com/microsoft/wmi/pkg/base/host" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + + "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" +) + +type UserAction uint32 + +const ( + None UserAction = 0 + Async UserAction = 1 + Wait UserAction = 2 + Cancel UserAction = 3 + Default UserAction = 4 +) + +// WmiInstance is a representation of a WMI instance +type WmiInstance struct { + class *WmiClass + session *WmiSession + instance *ole.IDispatch + instanceVar *ole.VARIANT +} + +// WmiInstanceCollection is a slice of WmiInstance +type WmiInstanceCollection []*WmiInstance + +func (wmic *WmiInstanceCollection) EmbeddedXMLInstances() (xmls []string, err error) { + for _, inst := range *wmic { + xml, err1 := inst.EmbeddedXMLInstance() + if err1 != nil { + err = err1 + return + } + xmls = append(xmls, xml) + } + return +} + +// Close all instances in a collection +func (wmic *WmiInstanceCollection) Close() { + for _, i := range *wmic { + i.Close() + } +} + +func CreateWmiInstance(instanceVar *ole.VARIANT, session *WmiSession) (*WmiInstance, error) { + return &WmiInstance{ + instanceVar: instanceVar, + instance: instanceVar.ToIDispatch(), + session: session, + }, nil +} + +// GetInstance returns the latest Instance +func (c *WmiInstance) GetInstance() (*WmiInstance, error) { + return c.session.GetInstance(c.InstancePath()) +} +func (c *WmiInstance) GetSession() *WmiSession { + return c.session +} +func (c *WmiInstance) GetWmiHost() *host.WmiHost { + return c.session.WMIHost +} + +func (c *WmiInstance) GetIDispatch() *ole.IDispatch { + return c.instance +} +func (c *WmiInstance) GetRawInstance() *ole.VARIANT { + return c.instanceVar +} + +func (c *WmiInstance) GetSystemProperty(name string) (*WmiProperty, error) { + // Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemobjectex-systemproperties- + rawResult, err := oleutil.GetProperty(c.instance, "SystemProperties_") + if err != nil { + return nil, err + } + + // SWbemObjectEx.SystemProperties_ returns + // an SWbemPropertySet object that contains the collection + // of sytem properties for the c class + sWbemObjectExAsIDispatch := rawResult.ToIDispatch() + defer rawResult.Clear() + + // Get the system property + sWbemProperty, err := oleutil.CallMethod(sWbemObjectExAsIDispatch, "Item", name) + if err != nil { + return nil, err + } + + property, err := CreateWmiProperty(sWbemProperty, c.session) + if err != nil { + return nil, err + } + + return property, nil +} + +// GetProperty gets the property of the instance specified by name and returns in value +func (c *WmiInstance) GetProperty(name string) (interface{}, error) { + rawResult, err := oleutil.GetProperty(c.instance, name) + if err != nil { + return nil, err + } + + defer rawResult.Clear() + + if rawResult.VT == 0x1 { + return nil, err + } + + return GetVariantValue(rawResult) +} + +// SetProperty sets a value of property representation by name with value +func (c *WmiInstance) SetProperty(name string, value interface{}) error { + rawResult, err := oleutil.PutProperty(c.instance, name, value) + if err != nil { + log.Printf("[WMI] SetProperty Name[%s] Value[%+v] Err[%+v]\n", name, value, err) + return err + } + + defer rawResult.Clear() + return nil +} + +// ResetProperty resets a property +func (c *WmiInstance) ResetProperty(name string) error { + return c.SetProperty(name, nil) +} + +// GetClassName +func (c *WmiInstance) GetClassName() string { + className, err := c.GetSystemProperty("__CLASS") + if err != nil { + panic("The class doesn't have a __CLASS member " + err.Error()) + } + if className == nil { + panic("The __CLASS member doesn't contain one element, while it was expected to be") + } + defer className.Close() + + return className.Value().(string) +} + +// Class +func (c *WmiInstance) GetClass() *WmiClass { + class, err := c.session.GetClass(c.GetClassName()) + if err != nil { + panic("The class for this instance doesn't exist" + err.Error()) + } + + return class +} + +// EmbeddedXMLInstance +func (c *WmiInstance) EmbeddedXMLInstance() (string, error) { + rawResult, err := oleutil.CallMethod(c.instance, "GetText_", 1) + if err != nil { + return "", err + } + defer rawResult.Clear() + return rawResult.ToString(), err +} + +func (c *WmiInstance) String() string { + return c.InstancePath() +} + +// EmbeddedInstance +func (c *WmiInstance) EmbeddedInstance() (string, error) { + rawResult, err := oleutil.CallMethod(c.instance, "GetObjectText_") + if err != nil { + return "", err + } + defer rawResult.Clear() + return rawResult.ToString(), err +} + +// Equals +func (c *WmiInstance) Equals(instance *WmiInstance) bool { + rawResult, err := oleutil.CallMethod(c.instance, "CompareTo_", instance.instance) + if err != nil { + return false + } + defer rawResult.Clear() + value, err := GetVariantValue(rawResult) + if err != nil { + return false + } + + return value.(bool) +} + +// Clone +func (c *WmiInstance) Clone() (*WmiInstance, error) { + rawResult, err := oleutil.CallMethod(c.instance, "Clone_") + winstance, err := CreateWmiInstance(rawResult, c.session) + return winstance, err +} + +// Refresh +func (c *WmiInstance) Refresh() error { + rawResult, err := oleutil.CallMethod(c.instance, "Refresh_") + if err != nil { + return err + } + defer rawResult.Clear() + return nil +} + +// Commit +func (c *WmiInstance) Commit() error { + rawResult, err := oleutil.CallMethod(c.instance, "Put_") + if err != nil { + return err + } + defer rawResult.Clear() + return nil + +} + +// Modify +func (c *WmiInstance) Modify() error { + return c.Commit() +} + +// Delete +func (c *WmiInstance) Delete() error { + rawResult, err := oleutil.CallMethod(c.instance, "Delete_") + if err != nil { + return err + } + defer rawResult.Clear() + return nil +} + +// InstancePath +func (c *WmiInstance) InstancePath() string { + path, err := c.GetSystemProperty("__PATH") + if err != nil { + panic("The instance doesn't have a path " + err.Error()) + } + defer path.Close() + + return path.Value().(string) +} + +// RelativePath +func (c *WmiInstance) RelativePath() string { + path, err := c.GetSystemProperty("__RELPATH") + if err != nil { + panic("The instance doesn't have a path" + err.Error()) + } + defer path.Close() + + return path.Value().(string) +} + +// InvokeMethod +func (c *WmiInstance) InvokeMethod(methodName string, params ...interface{}) ([]interface{}, error) { + rawResult, err := oleutil.CallMethod(c.instance, methodName, params...) + if err != nil { + return nil, err + } + defer rawResult.Clear() + values, err := GetVariantValues(rawResult) + return values, err +} + +func (c *WmiInstance) GetWmiMethod(methodName string) (*WmiMethod, error) { + return NewWmiMethod(methodName, c) +} + +// InvokeMethodAsync +func (c *WmiInstance) InvokeMethodAsync(methodName string, action UserAction, percentComplete, timeoutSeconds uint32, params ...interface{}) ([]interface{}, error) { + rawResult, err := oleutil.CallMethod(c.instance, methodName, params...) + if err != nil { + return nil, err + } + defer rawResult.Clear() + return GetVariantValues(rawResult) +} + +// InvokeMethodWithReturn invokes a method with return +func (c *WmiInstance) InvokeMethodWithReturn(methodName string, params ...interface{}) (int32, error) { + results, err := c.InvokeMethod(methodName, params...) + if err != nil { + return 0, err + } + + return results[0].(int32), nil +} + +// GetAllRelatedWithQuery returns all related instances matching the query +func (c *WmiInstance) GetAllRelatedWithQuery(q *query.WmiQuery) (WmiInstanceCollection, error) { + winstances, err := c.GetAllRelated(q.ClassName) + if err != nil { + return nil, err + } + + if !q.HasFilter() { + return winstances, nil + } + + defer winstances.Close() + // For now, only Equals is implemented + filter := q.Filters[0] + filteredCollection := WmiInstanceCollection{} + for _, inst := range winstances { + propVal, err := inst.GetProperty(filter.Name) + if err != nil { + continue + } + propString := fmt.Sprintf("%v", propVal) + if propString == filter.Value { + clins, err := inst.Clone() + if err != nil { + return nil, err + } + filteredCollection = append(filteredCollection, clins) + continue + } + } + return filteredCollection, nil +} + +// GetAllRelated +func (c *WmiInstance) GetAllRelated(resultClassName string) (WmiInstanceCollection, error) { + return c.GetAssociated("", resultClassName, "", "") +} + +// GetRelated +func (c *WmiInstance) GetRelated(resultClassName string) (*WmiInstance, error) { + result, err := c.GetAllRelated(resultClassName) + if err != nil { + return nil, err + } + + if len(result) == 0 { + return nil, errors.Wrapf(errors.NotFound, "No Related Items were received for [%s]", resultClassName) + } + return result[0], nil +} + +// GetRelatedEx +func (c *WmiInstance) GetRelatedEx(associatedClassName, resultClassName, resultRole, sourceRole string) (WmiInstanceCollection, error) { + return c.GetAssociated(associatedClassName, resultClassName, resultRole, sourceRole) +} + +// GetFirstRelatedEx +func (c *WmiInstance) GetFirstRelatedEx(associatedClassName, resultClassName, resultRole, sourceRole string) (*WmiInstance, error) { + col, err := c.GetAssociated(associatedClassName, resultClassName, resultRole, sourceRole) + if err != nil { + return nil, err + } + defer col.Close() + + if len(col) == 0 { + return nil, errors.Wrapf(errors.NotFound, "No Related Items were received for [%s]", resultClassName) + } + + return col[0].Clone() +} + +func (c *WmiInstance) GetAssociatedEx(associatedClassName string) (WmiInstanceCollection, error) { + return c.GetAssociated(associatedClassName, "", "", "") +} + +// GetAssociated +func (c *WmiInstance) GetAssociated(associatedClassName, resultClassName, resultRole, sourceRole string) (WmiInstanceCollection, error) { + // Documentation here: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemobject-associators- + rawResult, err := oleutil.CallMethod(c.instance, "Associators_", + associatedClassName, + resultClassName, + resultRole, + sourceRole, + ) + if err != nil { + return nil, err + } + + result := rawResult.ToIDispatch() + defer rawResult.Clear() + + // Doc: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/dispid-constants + enum_property, err := result.GetProperty("_NewEnum") + if err != nil { + return nil, err + } + defer enum_property.Clear() + + // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-ienumvariant + enum, err := enum_property.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) + if err != nil { + return nil, err + } + if enum == nil { + return nil, fmt.Errorf("Enum is nil") + } + + defer enum.Release() + + wmiInstances := WmiInstanceCollection{} + for tmp, length, err := enum.Next(1); length > 0; tmp, length, err = enum.Next(1) { + //defer func() { + // if err != nil { + // wmiInstances.Close() + // } + //}() + if err != nil { + return nil, err + } + + wmiInstance, err := CreateWmiInstance(&tmp, c.session) + if err != nil { + // tmp.Clear() + return nil, err + } + + wmiInstances = append(wmiInstances, wmiInstance) + } + + //if len(wmiInstances) == 0 { + // return nil, errors.Wrapf(errors.NotFound, "GetAssociated [%s] [%s]", associatedClassName, resultClassName) + //} + + return wmiInstances, nil +} + +// GetReferences +func (c *WmiInstance) GetReferences(associatedClassName string) (WmiInstanceCollection, error) { + return c.EnumerateReferencingInstances(associatedClassName, "") +} + +// EnumerateReferencingInstances +func (c *WmiInstance) EnumerateReferencingInstances(resultClassName, sourceRole string) (WmiInstanceCollection, error) { + //Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemobject-references- + rawResult, err := oleutil.CallMethod(c.instance, "References_", resultClassName, sourceRole) + if err != nil { + return nil, err + } + + result := rawResult.ToIDispatch() + defer rawResult.Clear() + + // Doc: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/dispid-constants + enum_property, err := result.GetProperty("_NewEnum") + if err != nil { + return nil, err + } + defer enum_property.Clear() + + // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-ienumvariant + enum, err := enum_property.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) + if err != nil { + return nil, err + } + if enum == nil { + return nil, fmt.Errorf("Enum is nil") + } + + defer enum.Release() + + wmiInstances := WmiInstanceCollection{} + for tmp, length, err := enum.Next(1); length > 0; tmp, length, err = enum.Next(1) { + //defer func() { + // if err != nil { + // wmiInstances.Close() + // } + //}() + + if err != nil { + return nil, err + } + + wmiInstance, err := CreateWmiInstance(&tmp, c.session) + if err != nil { + //tmp.Clear() + return nil, err + } + + wmiInstances = append(wmiInstances, wmiInstance) + } + + return wmiInstances, nil +} + +// CloseAllInstances +func CloseAllInstances(instances []*WmiInstance) { + for _, instance := range instances { + instance.Close() + } +} + +// Close +func (c *WmiInstance) Close() (err error) { + if c.instanceVar != nil { + // https://docs.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-variantclear + // VariantClear would release the reference if its VT_DISPATCH. + // In our case, WmiInstance holds only VT_DISPATCH + c.instanceVar.Clear() + c.instanceVar = nil + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiJob.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiJob.go new file mode 100644 index 00000000..941e6a5e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiJob.go @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implements the swbemproperty class +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemmethod + +package cim + +import ( + "fmt" + "time" + + "github.com/microsoft/wmi/pkg/errors" +) + +// JobState +type JobState int + +const ( + // New enum + JobState_Unknown JobState = 0 + // New enum + JobState_New JobState = 2 + // Starting enum + JobState_Starting JobState = 3 + // Running enum + JobState_Running JobState = 4 + // Suspended enum + JobState_Suspended JobState = 5 + // Shutting_Down enum + JobState_Shutting_Down JobState = 6 + // Completed enum + JobState_Completed JobState = 7 + // Terminated enum + JobState_Terminated JobState = 8 + // Killed enum + JobState_Killed JobState = 9 + // Exception enum + JobState_Exception JobState = 10 + // Service enum + JobState_Service JobState = 11 + // Query_Pending enum + JobState_Query_Pending JobState = 12 + // DMTF_Reserved enum + JobState_DMTF_Reserved JobState = 13 + // Vendor_Reserved enum + JobState_Vendor_Reserved JobState = 14 +) + +type WmiJob struct { + *WmiInstance +} + +func NewWmiJob(instance *WmiInstance) (*WmiJob, error) { + return &WmiJob{instance}, nil +} + +func (job *WmiJob) String() string { + jtype, err := job.JobType() + if err != nil { + return "" + } + return fmt.Sprintf("Type[%s] State[%s]", jtype, job.GetJobState()) +} + +// GetJobType gets the value of JobType for the instance +func (job *WmiJob) JobType() (value int32, err error) { + retValue, err := job.GetProperty("JobType") + if err != nil { + return + } + value, ok := retValue.(int32) + if !ok { + // TODO: Set an error + } + return +} + +// WaitForPercentComplete waits for the percentComplete or timeout +func (job *WmiJob) WaitForPercentComplete(percentComplete uint16, timeoutSeconds int16) error { + start := time.Now() + + // Run the loop, only if the job is actually running + for !job.IsComplete() { + pComplete, err := job.PercentComplete() + if err != nil { + return err + } + // Break if have achieved the target + if pComplete >= percentComplete { + break + } + time.Sleep(100 * time.Millisecond) + + // Infinite Loop + if timeoutSeconds < 0 { + continue + } + + // If we have waited enough time, return with a timeout error + if time.Since(start) > (time.Duration(timeoutSeconds) * time.Second) { + state := job.GetJobState() + exception := job.GetException() + return errors.Wrapf(errors.Timedout, "WaitForPercentComplete timeout. Current state: [%v], Exception: [%v]", state, exception) + } + } + + return job.GetException() +} + +// WaitForAction waits for the task based on the action type, percent complete and timeoutSeconds +func (job *WmiJob) WaitForAction(action UserAction, percentComplete uint16, timeoutSeconds int16) error { + switch action { + case Wait: + return job.WaitForPercentComplete(percentComplete, timeoutSeconds) + case Cancel: + return job.WaitForPercentComplete(percentComplete, timeoutSeconds) + case None: + fallthrough + case Default: + fallthrough + case Async: + break + } + return nil +} + +// PercentComplete +func (job *WmiJob) PercentComplete() (uint16, error) { + err := job.Refresh() + if err != nil { + return 0, err + } + retValue, err := job.GetProperty("PercentComplete") + if err != nil { + return 0, err + } + return uint16(retValue.(int32)), nil +} + +func (job *WmiJob) GetJobState() (js JobState) { + state, err := job.GetProperty("JobState") + if err != nil { + return + } + js = JobState(state.(int32)) + return +} + +func (job *WmiJob) IsComplete() bool { + err := job.Refresh() + if err != nil { + + } + state := job.GetJobState() + switch state { + case JobState_New: + fallthrough + case JobState_Starting: + fallthrough + case JobState_Running: + fallthrough + case JobState_Suspended: + fallthrough + case JobState_Shutting_Down: + return false + case JobState_Completed: + fallthrough + case JobState_Terminated: + fallthrough + case JobState_Killed: + fallthrough + case JobState_Exception: + return true + } + return false +} + +func (job *WmiJob) GetException() error { + job.Refresh() + state := job.GetJobState() + switch state { + case JobState_Terminated: + fallthrough + case JobState_Killed: + fallthrough + case JobState_Exception: + errorCodeVal, _ := job.GetProperty("ErrorCode") + errorCode := uint16(errorCodeVal.(int32)) + errorDescriptionVal, _ := job.GetProperty("ErrorDescription") + errorDescription, _ := errorDescriptionVal.(string) + errorSummaryDescriptionVal, _ := job.GetProperty("ErrorSummaryDescription") + errorSummaryDescription, _ := errorSummaryDescriptionVal.(string) + return errors.Wrapf(errors.NewWMIError(errorCode), + "ErrorCode[%d] ErrorDescription[%s] ErrorSummaryDescription [%s]", + errorCode, errorDescription, errorSummaryDescription) + } + return nil +} + +func (job *WmiJob) WaitForJobCompletion(result int32, timeoutSeconds int16) error { + if result == 0 { + return nil + } else if result == 4096 { + return job.WaitForAction(Wait, 100, timeoutSeconds) + } else { + return errors.Wrapf(errors.Failed, "Unable to Wait for Job on Result[%d] ", result) + } + +} + +type WmiJobCollection []*WmiJob + +func (c *WmiJobCollection) Close() error { + var err error + for _, p := range *c { + err = p.Close() + } + return err +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethod.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethod.go new file mode 100644 index 00000000..b1be6e8a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethod.go @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implements the swbemproperty class +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemmethod + +package cim + +import ( + "log" + + "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" + "github.com/microsoft/wmi/pkg/errors" +) + +type WmiMethod struct { + Name string + // Reference + session *WmiSession + // Reference + classInstance *WmiInstance +} + +type WmiMethodResult struct { + ReturnValue int32 + OutMethodParams map[string]*WmiMethodParam +} + +// NewWmiMethod +func NewWmiMethod(methodName string, instance *WmiInstance) (*WmiMethod, error) { + return &WmiMethod{ + Name: methodName, + classInstance: instance, + session: instance.GetSession(), + }, nil +} + +func (c *WmiMethod) addInParam(inparamVariant *ole.VARIANT, paramName string, paramValue interface{}) error { + rawProperties, err := inparamVariant.ToIDispatch().GetProperty("Properties_") + if err != nil { + return err + } + defer rawProperties.Clear() + rawProperty, err := rawProperties.ToIDispatch().CallMethod("Item", paramName) + if err != nil { + return err + } + defer rawProperty.Clear() + + p, err := rawProperty.ToIDispatch().PutProperty("Value", paramValue) + if err != nil { + return err + } + defer p.Clear() + return nil +} + +func (c *WmiMethod) Execute(inParam, outParam WmiMethodParamCollection) (result *WmiMethodResult, err error) { + log.Printf("[WMI] - Executing Method [%s]\n", c.Name) + + iDispatchInstance := c.classInstance.GetIDispatch() + if iDispatchInstance == nil { + return nil, errors.Wrapf(errors.InvalidInput, "InvalidInstance") + } + rawResult, err := iDispatchInstance.GetProperty("Methods_") + if err != nil { + return nil, err + } + defer rawResult.Clear() + // Retrive the method + rawMethod, err := rawResult.ToIDispatch().CallMethod("Item", c.Name) + if err != nil { + return nil, err + } + defer rawMethod.Clear() + + inparamsRaw, err := rawMethod.ToIDispatch().GetProperty("InParameters") + if err != nil { + return nil, err + } + defer inparamsRaw.Clear() + + inparams, err := oleutil.CallMethod(inparamsRaw.ToIDispatch(), "SpawnInstance_") + if err != nil { + return nil, err + } + defer inparams.Clear() + + for _, inp := range inParam { + // log.Printf("InParam [%s]=>[%+v]\n", inp.Name, inp.Value) + c.addInParam(inparams, inp.Name, inp.Value) + } + + result = &WmiMethodResult{ + OutMethodParams: map[string]*WmiMethodParam{}, + } + outparams, err := c.classInstance.GetIDispatch().CallMethod("ExecMethod_", c.Name, inparams) + if err != nil { + return + } + defer outparams.Clear() + returnRaw, err := outparams.ToIDispatch().GetProperty("ReturnValue") + if err != nil { + return + } + defer returnRaw.Clear() + result.ReturnValue = returnRaw.Value().(int32) + log.Printf("[WMI] - Return [%d] ", result.ReturnValue) + + for _, outp := range outParam { + returnRawIn, err1 := outparams.ToIDispatch().GetProperty(outp.Name) + if err1 != nil { + err = err1 + return + } + defer returnRawIn.Clear() + + value, err1 := GetVariantValue(returnRawIn) + if err1 != nil { + err = err1 + return + } + // log.Printf("OutParam [%s]=> [%+v]\n", outp.Name, value) + + result.OutMethodParams[outp.Name] = NewWmiMethodParam(outp.Name, value) + } + return +} + +func (c *WmiMethod) Close() error { + return nil +} + +type WmiMethodCollection []*WmiMethod + +func (c *WmiMethodCollection) Close() error { + var err error + for _, p := range *c { + err = p.Close() + } + return err +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethodParam.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethodParam.go new file mode 100644 index 00000000..b6a5b91f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiMethodParam.go @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implements the swbemproperty class +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemproperty + +package cim + +import ( +// "github.com/go-ole/go-ole" +) + +type WmiMethodParam struct { + Name string + Value interface{} + //session *WmiSession + //property *ole.IDispatch + //propertyVar *ole.VARIANT +} + +// func NewWmiMethodParam(name string, val interface{}, propertyVariant *ole.VARIANT, session *WmiSession) (*WmiMethodParam, error) { +func NewWmiMethodParam(name string, val interface{}) *WmiMethodParam { + return &WmiMethodParam{ + Name: name, + //propertyVar: propertyVariant, + //property: propertyVariant.ToIDispatch(), + //session: session, + Value: val, + } +} + +// Dispose +func (c *WmiMethodParam) Close() error { + return nil //c.propertyVar.Clear() +} + +type WmiMethodParamCollection []*WmiMethodParam + +func (c *WmiMethodParamCollection) Close() error { + var err error + for _, p := range *c { + err = p.Close() + } + return err +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiProperty.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiProperty.go new file mode 100644 index 00000000..09dff790 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiProperty.go @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implements the swbemproperty class +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemproperty + +package cim + +import ( + "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" + + "github.com/microsoft/wmi/go/wmi" +) + +type WmiProperty struct { + session *WmiSession + property *ole.IDispatch + propertyVar *ole.VARIANT +} + +func CreateWmiProperty(propertyVariant *ole.VARIANT, session *WmiSession) (*WmiProperty, error) { + return &WmiProperty{ + propertyVar: propertyVariant, + property: propertyVariant.ToIDispatch(), + session: session, + }, nil +} + +// Name +func (c *WmiProperty) Name() string { + name, err := oleutil.GetProperty(c.property, "Name") + if err != nil { + panic("Error retrieving the property Name") + } + + value, err := GetVariantValue(name) + if err != nil { + panic("Error retrieving the property Name") + } + + return value.(string) +} + +// Value +func (c *WmiProperty) Value() interface{} { + rawSystemProperty, err := oleutil.GetProperty(c.property, "Value") + if err != nil { + panic("Error retrieving the property value") + } + + value, err := GetVariantValue(rawSystemProperty) + if err != nil { + panic("Error retrieving the property value") + } + + return value +} + +// Type +func (c *WmiProperty) Type() wmi.WmiType { + rawSystemProperty, err := oleutil.GetProperty(c.property, "CIMType") + if err != nil { + panic("Error retrieving the property type") + } + + value, err := GetVariantValue(rawSystemProperty) + if err != nil { + panic("Error retrieving the property type") + } + + return wmi.WmiType(value.(int)) +} + +func CloseAllProperties(properties []*WmiProperty) { + for _, property := range properties { + property.Close() + } +} + +// Dispose +func (c *WmiProperty) Close() error { + return c.propertyVar.Clear() +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiQualifier.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiQualifier.go new file mode 100644 index 00000000..242bfee1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiQualifier.go @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +package cim + +type WmiQualifier struct { +} + +// Name +func (c WmiQualifier) Name() string { + panic("not implemented") + +} + +// Value +func (c WmiQualifier) Value() string { + panic("not implemented") + +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSession.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSession.go new file mode 100644 index 00000000..35498e01 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSession.go @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class implements the SWbemServices object +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemservices + +package cim + +import ( + "fmt" + "log" + "runtime/debug" + "strings" + + ole "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" + "github.com/microsoft/wmi/go/wmi" + "github.com/microsoft/wmi/pkg/base/host" +) + +// WmiSession struct to hold the current session information +type WmiSession struct { + ServerName string + Namespace string + Username string + Password string + Domain string + WMIHost *host.WmiHost + Status wmi.SessionStatus + RawSession *ole.VARIANT + Session *ole.IDispatch + CimwmiService *ole.IDispatch +} + +// CreateSessionEx creates a session based on credentials +func CreateSessionEx(CimwmiService *ole.IDispatch, serverName, wmiNamespace string, credentials wmi.Credentials) (*WmiSession, error) { + return CreateSession(CimwmiService, wmiNamespace, serverName, credentials.Domain, credentials.UserName, credentials.Password) +} + +// CreateSession creates a new session with the server and namespace +func CreateSession(CimwmiService *ole.IDispatch, wmiNamespace, serverName, domain, userName, password string) (*WmiSession, error) { + return &WmiSession{ + CimwmiService: CimwmiService, + ServerName: serverName, + Namespace: wmiNamespace, + Username: userName, + Password: password, + Domain: domain, + Status: wmi.Created, + WMIHost: host.NewWmiHostWithCredential(serverName, userName, password, domain), + }, nil +} + +type WbemAuthenticationLevelEnum uint32 + +const ( + wbemAuthenticationLevelDefault WbemAuthenticationLevelEnum = 0 + wbemAuthenticationLevelNone WbemAuthenticationLevelEnum = 1 + wbemAuthenticationLevelConnect WbemAuthenticationLevelEnum = 2 + wbemAuthenticationLevelCall WbemAuthenticationLevelEnum = 3 + wbemAuthenticationLevelPkt WbemAuthenticationLevelEnum = 4 + wbemAuthenticationLevelPktIntegrity WbemAuthenticationLevelEnum = 5 + wbemAuthenticationLevelPktPrivacy WbemAuthenticationLevelEnum = 6 +) + +type WbemImpersonationLevel uint32 + +const ( + wbemImpersonationLevelAnonymous WbemImpersonationLevel = 1 + wbemImpersonationLevelIdentify WbemImpersonationLevel = 2 + wbemImpersonationLevelImpersonate WbemImpersonationLevel = 3 + wbemImpersonationLevelDelegate WbemImpersonationLevel = 4 +) + +// Connect the wmi session +func (c *WmiSession) Connect() (bool, error) { + var err error + // Node that we are connected through SWbemLocator, which uses the scripting language syntax for ConnectServer + // This means the first parameter of the call is the name of the server, and the second parameter is the name of the namespace + // (as opposed to C++ where these two are exposed as one parameter) + // See here for an example illustrating the scripting syntax: https://docs.microsoft.com/en-us/windows/win32/wmisdk/connecting-to-wmi-with-vbscript + c.RawSession, err = oleutil.CallMethod( + c.CimwmiService, "ConnectServer", strings.Join([]string{c.ServerName, c.Domain}, "."), c.Namespace, c.Username, c.Password, "MS_409") + if err != nil { + return false, err + } + c.Session = c.RawSession.ToIDispatch() + c.Status = wmi.Connected + + if c.Session == nil { + panic("Returned session is null") + } + + // Set the authentication level to packet privacy and impersonation to impersonate + // Relevant documentations: + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/setting-security-on-an-asynchronous-call + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/setting-the-default-process-security-level-using-vbscript + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemsecurity + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/maintaining-wmi-security + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/securing-scripting-clients + // https://docs.microsoft.com/en-us/windows/win32/wmisdk/providing-events-securely + rawSecurityObject, err := oleutil.GetProperty(c.Session, "Security_") + if err != nil { + debug.PrintStack() + return false, err + } + securityObject := rawSecurityObject.ToIDispatch() + defer rawSecurityObject.Clear() + + rawImpersonationLevel, err := oleutil.PutProperty(securityObject, "ImpersonationLevel", uint32(wbemImpersonationLevelImpersonate)) + if err != nil { + debug.PrintStack() + return false, err + } + defer rawImpersonationLevel.Clear() + + rawAuthenticationLevel, err := oleutil.PutProperty(securityObject, "AuthenticationLevel", uint32(wbemAuthenticationLevelPktPrivacy)) + if err != nil { + debug.PrintStack() + return false, err + } + defer rawAuthenticationLevel.Clear() + + return true, nil +} + +// Close the wmi session +func (c *WmiSession) Close() { + c.RawSession.Clear() + c.Status = wmi.Disconnected +} + +// Dispose the wmi session +func (c *WmiSession) Dispose() { + if c.Status != wmi.Disposed { + c.Close() + c.Status = wmi.Disposed + } +} + +// TestConnection +func (c *WmiSession) TestConnection() bool { + panic("not implemented") +} + +// Tells WMI to create a new class for us +func (c *WmiSession) CreateNewClass() (*WmiClass, error) { + rawResult, err := c.Session.CallMethod("Get") + if err != nil { + return nil, err + } + + return CreateWmiClass(rawResult, c) +} + +func (c *WmiSession) GetClass(classDefinition string) (*WmiClass, error) { + rawResult, err := c.Session.CallMethod("Get", classDefinition) + if err != nil { + return nil, err + } + + return CreateWmiClass(rawResult, c) +} + +// EnumerateClasses +func (c *WmiSession) EnumerateClasses(className string) ([]*WmiClass, error) { + return c.QueryClasses("SELECT * FROM meta_class") +} + +// QueryClasses +func (c *WmiSession) QueryClasses(queryString string) ([]*WmiClass, error) { + enum, err := c.PerformRawQuery(queryString) + if err != nil { + return nil, err + } + defer enum.Release() + + wmiClasses := []*WmiClass{} + for tmp, length, err := enum.Next(1); length > 0; tmp, length, err = enum.Next(1) { + if err != nil { + return nil, err + } + + wmiClass, err := CreateWmiClass(&tmp, c) + if err != nil { + return nil, err + } + + wmiClasses = append(wmiClasses, wmiClass) + } + + return wmiClasses, nil +} + +// GetInstance +func (c *WmiSession) GetInstance(path string) (*WmiInstance, error) { + rawResult, err := c.Session.CallMethod("Get", path) + if err != nil { + return nil, err + } + + return CreateWmiInstance(rawResult, c) +} + +// EnumerateInstances +func (c *WmiSession) EnumerateInstances(className string) ([]*WmiInstance, error) { + return c.QueryInstances("SELECT * FROM " + className) +} + +// QueryInstances +func (c *WmiSession) QueryInstances(queryExpression string) ([]*WmiInstance, error) { + enum, err := c.PerformRawQuery(queryExpression) + if err != nil { + return nil, err + } + defer enum.Release() + + wmiInstances := []*WmiInstance{} + for tmp, length, err := enum.Next(1); length > 0; tmp, length, err = enum.Next(1) { + if err != nil { + return nil, err + } + + wmiInstance, err := CreateWmiInstance(&tmp, c) + if err != nil { + return nil, err + } + + wmiInstances = append(wmiInstances, wmiInstance) + } + + log.Printf("[WMI] QueryInstances [%s]=> [%d]\n", queryExpression, len(wmiInstances)) + return wmiInstances, nil +} + +// QueryInstancesEx +func (c *WmiSession) QueryInstancesEx(query wmi.Query) (*[]wmi.Instance, error) { + panic("not implemented") +} + +// EnumerateReferencingInstances +func (c *WmiSession) EnumerateReferencingInstances(namespaceName string, sourceInstance WmiInstance, associationClassName, sourceRole string) (*[]WmiInstance, error) { + panic("not implemented") +} + +func (c *WmiSession) PerformRawQuery(queryExpression string) (*ole.IEnumVARIANT, error) { + rawResult, err := c.Session.CallMethod("ExecQuery", queryExpression) + if err != nil { + return nil, err + } + + result := rawResult.ToIDispatch() + defer rawResult.Clear() + + // Doc: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/dispid-constants + enum_property, err := result.GetProperty("_NewEnum") + if err != nil { + return nil, err + } + defer enum_property.Clear() + + // https://docs.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-ienumvariant + enum, err := enum_property.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) + if err != nil { + return nil, err + } + if enum == nil { + return nil, fmt.Errorf("Enum is nil") + } + + return enum, err +} + +// Credentials +func (c *WmiSession) Credentials() *wmi.Credentials { + credentials := wmi.Credentials{ + UserName: c.Username, + Password: c.Password, + Domain: c.Domain, + } + + return &credentials +} + +// Asynchronous approach to handling events +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/receiving-synchronous-and-semisynchronous-event-notifications +// Security considerations with Asynchronous calls: https://docs.microsoft.com/en-us/windows/win32/wmisdk/making-an-asynchronous-call-with-vbscript +func (c *WmiSession) ExecNotificationQueryAsync(eventSink *WmiEventSink, query string) (interface{}, error) { + rawResult, err := oleutil.CallMethod(c.Session, "ExecNotificationQueryAsync", eventSink.instance, query) + if err != nil { + return nil, err + } + defer rawResult.Clear() + + return GetVariantValue(rawResult) +} + +// Synchronous approach to handling events +// Documentation: https://docs.microsoft.com/en-us/windows/win32/wmisdk/receiving-synchronous-and-semisynchronous-event-notifications +func (c *WmiSession) ExecNotificationQuery(query string) (*WmiSynchronousEventsList, error) { + rawResult, err := oleutil.CallMethod(c.Session, "ExecNotificationQuery", query) + if err != nil { + return nil, err + } + + return CreateWmiSynchronousEventsList(rawResult, c), nil +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSessionManager.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSessionManager.go new file mode 100644 index 00000000..927f7454 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSessionManager.go @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +package cim + +import ( + "errors" + "fmt" + + ole "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" +) + +const S_FALSE = 0x00000001 + +var IID_ISWbemLocator = &ole.GUID{0x76a6415b, 0xcb41, 0x11d1, [8]byte{0x8b, 0x02, 0x00, 0x60, 0x08, 0x06, 0xd9, 0xb6}} + +// Reference https://github.com/StackExchange/wmi +// Reference https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver + +type WmiSessionManager struct { + unknown *ole.IUnknown + wmi *ole.IDispatch + sessions map[string]*WmiSession +} + +func NewWmiSessionManager() *WmiSessionManager { + wsm := &WmiSessionManager{} + + err := wsm.init() + if err != nil { + panic("couldn't initialize the WmiSessionManager") + } + + return wsm +} + +func (c *WmiSessionManager) init() error { + err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) + if err != nil { + oleCode := err.(*ole.OleError).Code() + if oleCode != ole.S_OK && oleCode != S_FALSE { + return err + } + } + + // Initialize COM security for the whole process + err = CoInitializeSecurity(RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_IMP_LEVEL_IMPERSONATE) + if err != nil { + oleCode := err.(*ole.OleError).Code() + + // Note: RPC_E_TOO_LATE means we have already initialized security. + if oleCode != ole.S_OK && oleCode != S_FALSE && oleCode != uintptr(RPC_E_TOO_LATE) { + panic(fmt.Sprintf("Couldn't initialize COM/DCOM security. Error: [%v]", err)) + } + } + + c.unknown, err = oleutil.CreateObject("WbemScripting.SWbemLocator") + if err != nil { + c.Dispose() + return err + } + if c.unknown == nil { + c.Dispose() + return errors.New("CreateObject failed") + } + + c.wmi, err = c.unknown.QueryInterface(IID_ISWbemLocator) + if err != nil { + c.Dispose() + return err + } + + return nil +} + +// Dispose clears the WmiSessionManager +func (c *WmiSessionManager) Dispose() { + c.Close() +} + +// Close +func (c *WmiSessionManager) Close() error { + // clear the Sessions + + if c.wmi != nil { + c.wmi.Release() + } + // clear ole object + if c.unknown != nil { + c.unknown.Release() + } + + // clear com + ole.CoUninitialize() + + return nil +} + +// GetSession +func (c *WmiSessionManager) GetSession(wmiNamespace, serverName, domain, userName, password string) (*WmiSession, error) { + return CreateSession(c.wmi, wmiNamespace, serverName, domain, userName, password) +} + +// GetLocalSession +func (c *WmiSessionManager) GetLocalSession(wmiNamespace string) (*WmiSession, error) { + return CreateSession(c.wmi, wmiNamespace, "", "", "", "") +} diff --git a/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSynchronousEvents.go b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSynchronousEvents.go new file mode 100644 index 00000000..4017f2aa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/pkg/wmiinstance/WmiSynchronousEvents.go @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +// This class wraps a typicaly SWbemEventSource object as returned by SWbemServices.ExecNotificationQuery. Its implementation is based on the +// Documentations: +// https://docs.microsoft.com/en-us/windows/win32/wmisdk/receiving-synchronous-and-semisynchronous-event-notifications +// https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemservices-execnotificationquery +// https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemeventsource + +package cim + +import ( + ole "github.com/go-ole/go-ole" + "github.com/go-ole/go-ole/oleutil" +) + +const ( + wbemTimeoutInfinite int32 = -1 +) + +type WmiSynchronousEventsList struct { + session *WmiSession + instance *ole.IDispatch + instanceVar *ole.VARIANT +} + +func CreateWmiSynchronousEventsList(instanceVar *ole.VARIANT, session *WmiSession) *WmiSynchronousEventsList { + return &WmiSynchronousEventsList{ + session: session, + instance: instanceVar.ToIDispatch(), + instanceVar: instanceVar, + } +} + +func (c *WmiSynchronousEventsList) Close() { + c.instanceVar.Clear() +} + +func (c *WmiSynchronousEventsList) WaitForNextEventUntil(timeout int32) (*WmiInstance, error) { + eventInstance, err := oleutil.CallMethod(c.instance, "NextEvent", timeout) + if err != nil { + return nil, err + } + + return CreateWmiInstance(eventInstance, c.session) +} + +func (c *WmiSynchronousEventsList) WaitForNextEvent() (*WmiInstance, error) { + return c.WaitForNextEventUntil(wbemTimeoutInfinite) +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ACE.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ACE.go new file mode 100644 index 00000000..82a211b3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ACE.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ACE struct +type __ACE struct { + *__SecurityRelatedClass + + // + AccessMask uint32 + + // + AceFlags uint32 + + // + AceType uint32 + + // + GuidInheritedObjectType string + + // + GuidObjectType string + + // + TIME_CREATED uint64 + + // + Trustee __Trustee +} + +func New__ACEEx1(instance *cim.WmiInstance) (newInstance *__ACE, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__ACE{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__ACEEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ACE, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ACE{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetAccessMask sets the value of AccessMask for the instance +func (instance *__ACE) SetPropertyAccessMask(value uint32) (err error) { + return instance.SetProperty("AccessMask", (value)) +} + +// GetAccessMask gets the value of AccessMask for the instance +func (instance *__ACE) GetPropertyAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAceFlags sets the value of AceFlags for the instance +func (instance *__ACE) SetPropertyAceFlags(value uint32) (err error) { + return instance.SetProperty("AceFlags", (value)) +} + +// GetAceFlags gets the value of AceFlags for the instance +func (instance *__ACE) GetPropertyAceFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("AceFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAceType sets the value of AceType for the instance +func (instance *__ACE) SetPropertyAceType(value uint32) (err error) { + return instance.SetProperty("AceType", (value)) +} + +// GetAceType gets the value of AceType for the instance +func (instance *__ACE) GetPropertyAceType() (value uint32, err error) { + retValue, err := instance.GetProperty("AceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGuidInheritedObjectType sets the value of GuidInheritedObjectType for the instance +func (instance *__ACE) SetPropertyGuidInheritedObjectType(value string) (err error) { + return instance.SetProperty("GuidInheritedObjectType", (value)) +} + +// GetGuidInheritedObjectType gets the value of GuidInheritedObjectType for the instance +func (instance *__ACE) GetPropertyGuidInheritedObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidInheritedObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetGuidObjectType sets the value of GuidObjectType for the instance +func (instance *__ACE) SetPropertyGuidObjectType(value string) (err error) { + return instance.SetProperty("GuidObjectType", (value)) +} + +// GetGuidObjectType gets the value of GuidObjectType for the instance +func (instance *__ACE) GetPropertyGuidObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__ACE) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__ACE) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrustee sets the value of Trustee for the instance +func (instance *__ACE) SetPropertyTrustee(value __Trustee) (err error) { + return instance.SetProperty("Trustee", (value)) +} + +// GetTrustee gets the value of Trustee for the instance +func (instance *__ACE) GetPropertyTrustee() (value __Trustee, err error) { + retValue, err := instance.GetProperty("Trustee") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Trustee) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Trustee is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Trustee(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AbsoluteTimerInstruction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AbsoluteTimerInstruction.go new file mode 100644 index 00000000..8f801a2f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AbsoluteTimerInstruction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __AbsoluteTimerInstruction struct +type __AbsoluteTimerInstruction struct { + *__TimerInstruction + + // + EventDateTime string +} + +func New__AbsoluteTimerInstructionEx1(instance *cim.WmiInstance) (newInstance *__AbsoluteTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx1(instance) + + if err != nil { + return + } + newInstance = &__AbsoluteTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +func New__AbsoluteTimerInstructionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__AbsoluteTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__AbsoluteTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +// SetEventDateTime sets the value of EventDateTime for the instance +func (instance *__AbsoluteTimerInstruction) SetPropertyEventDateTime(value string) (err error) { + return instance.SetProperty("EventDateTime", (value)) +} + +// GetEventDateTime gets the value of EventDateTime for the instance +func (instance *__AbsoluteTimerInstruction) GetPropertyEventDateTime() (value string, err error) { + retValue, err := instance.GetProperty("EventDateTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AggregateEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AggregateEvent.go new file mode 100644 index 00000000..4730fc1a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/AggregateEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __AggregateEvent struct +type __AggregateEvent struct { + *__IndicationRelated + + // + NumberOfEvents uint32 + + // + Representative interface{} +} + +func New__AggregateEventEx1(instance *cim.WmiInstance) (newInstance *__AggregateEvent, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__AggregateEvent{ + __IndicationRelated: tmp, + } + return +} + +func New__AggregateEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__AggregateEvent, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__AggregateEvent{ + __IndicationRelated: tmp, + } + return +} + +// SetNumberOfEvents sets the value of NumberOfEvents for the instance +func (instance *__AggregateEvent) SetPropertyNumberOfEvents(value uint32) (err error) { + return instance.SetProperty("NumberOfEvents", (value)) +} + +// GetNumberOfEvents gets the value of NumberOfEvents for the instance +func (instance *__AggregateEvent) GetPropertyNumberOfEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRepresentative sets the value of Representative for the instance +func (instance *__AggregateEvent) SetPropertyRepresentative(value interface{}) (err error) { + return instance.SetProperty("Representative", (value)) +} + +// GetRepresentative gets the value of Representative for the instance +func (instance *__AggregateEvent) GetPropertyRepresentative() (value interface{}, err error) { + retValue, err := instance.GetProperty("Representative") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Action.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Action.go new file mode 100644 index 00000000..0141901a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Action.go @@ -0,0 +1,334 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Action struct +type CIM_Action struct { + *cim.WmiInstance + + // + ActionID string + + // + Caption string + + // + Description string + + // + Direction uint16 + + // + Name string + + // + SoftwareElementID string + + // + SoftwareElementState uint16 + + // + TargetOperatingSystem uint16 + + // + Version string +} + +func NewCIM_ActionEx1(instance *cim.WmiInstance) (newInstance *CIM_Action, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Action{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Action, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Action{ + WmiInstance: tmp, + } + return +} + +// SetActionID sets the value of ActionID for the instance +func (instance *CIM_Action) SetPropertyActionID(value string) (err error) { + return instance.SetProperty("ActionID", (value)) +} + +// GetActionID gets the value of ActionID for the instance +func (instance *CIM_Action) GetPropertyActionID() (value string, err error) { + retValue, err := instance.GetProperty("ActionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_Action) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_Action) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_Action) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_Action) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDirection sets the value of Direction for the instance +func (instance *CIM_Action) SetPropertyDirection(value uint16) (err error) { + return instance.SetProperty("Direction", (value)) +} + +// GetDirection gets the value of Direction for the instance +func (instance *CIM_Action) GetPropertyDirection() (value uint16, err error) { + retValue, err := instance.GetProperty("Direction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_Action) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_Action) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementID sets the value of SoftwareElementID for the instance +func (instance *CIM_Action) SetPropertySoftwareElementID(value string) (err error) { + return instance.SetProperty("SoftwareElementID", (value)) +} + +// GetSoftwareElementID gets the value of SoftwareElementID for the instance +func (instance *CIM_Action) GetPropertySoftwareElementID() (value string, err error) { + retValue, err := instance.GetProperty("SoftwareElementID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementState sets the value of SoftwareElementState for the instance +func (instance *CIM_Action) SetPropertySoftwareElementState(value uint16) (err error) { + return instance.SetProperty("SoftwareElementState", (value)) +} + +// GetSoftwareElementState gets the value of SoftwareElementState for the instance +func (instance *CIM_Action) GetPropertySoftwareElementState() (value uint16, err error) { + retValue, err := instance.GetProperty("SoftwareElementState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTargetOperatingSystem sets the value of TargetOperatingSystem for the instance +func (instance *CIM_Action) SetPropertyTargetOperatingSystem(value uint16) (err error) { + return instance.SetProperty("TargetOperatingSystem", (value)) +} + +// GetTargetOperatingSystem gets the value of TargetOperatingSystem for the instance +func (instance *CIM_Action) GetPropertyTargetOperatingSystem() (value uint16, err error) { + retValue, err := instance.GetProperty("TargetOperatingSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_Action) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_Action) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *CIM_Action) Invoke() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Invoke") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActionSequence.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActionSequence.go new file mode 100644 index 00000000..8b44d4c0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActionSequence.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ActionSequence struct +type CIM_ActionSequence struct { + *cim.WmiInstance + + // + Next CIM_Action + + // + Prior CIM_Action +} + +func NewCIM_ActionSequenceEx1(instance *cim.WmiInstance) (newInstance *CIM_ActionSequence, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ActionSequence{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ActionSequenceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ActionSequence, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ActionSequence{ + WmiInstance: tmp, + } + return +} + +// SetNext sets the value of Next for the instance +func (instance *CIM_ActionSequence) SetPropertyNext(value CIM_Action) (err error) { + return instance.SetProperty("Next", (value)) +} + +// GetNext gets the value of Next for the instance +func (instance *CIM_ActionSequence) GetPropertyNext() (value CIM_Action, err error) { + retValue, err := instance.GetProperty("Next") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Action) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Action is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Action(valuetmp) + + return +} + +// SetPrior sets the value of Prior for the instance +func (instance *CIM_ActionSequence) SetPropertyPrior(value CIM_Action) (err error) { + return instance.SetProperty("Prior", (value)) +} + +// GetPrior gets the value of Prior for the instance +func (instance *CIM_ActionSequence) GetPropertyPrior() (value CIM_Action, err error) { + retValue, err := instance.GetProperty("Prior") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Action) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Action is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Action(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActsAsSpare.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActsAsSpare.go new file mode 100644 index 00000000..3957b3f1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ActsAsSpare.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ActsAsSpare struct +type CIM_ActsAsSpare struct { + *cim.WmiInstance + + // + Group CIM_SpareGroup + + // + HotStandby bool + + // + Spare CIM_ManagedSystemElement +} + +func NewCIM_ActsAsSpareEx1(instance *cim.WmiInstance) (newInstance *CIM_ActsAsSpare, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ActsAsSpare{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ActsAsSpareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ActsAsSpare, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ActsAsSpare{ + WmiInstance: tmp, + } + return +} + +// SetGroup sets the value of Group for the instance +func (instance *CIM_ActsAsSpare) SetPropertyGroup(value CIM_SpareGroup) (err error) { + return instance.SetProperty("Group", (value)) +} + +// GetGroup gets the value of Group for the instance +func (instance *CIM_ActsAsSpare) GetPropertyGroup() (value CIM_SpareGroup, err error) { + retValue, err := instance.GetProperty("Group") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_SpareGroup) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_SpareGroup is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_SpareGroup(valuetmp) + + return +} + +// SetHotStandby sets the value of HotStandby for the instance +func (instance *CIM_ActsAsSpare) SetPropertyHotStandby(value bool) (err error) { + return instance.SetProperty("HotStandby", (value)) +} + +// GetHotStandby gets the value of HotStandby for the instance +func (instance *CIM_ActsAsSpare) GetPropertyHotStandby() (value bool, err error) { + retValue, err := instance.GetProperty("HotStandby") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSpare sets the value of Spare for the instance +func (instance *CIM_ActsAsSpare) SetPropertySpare(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Spare", (value)) +} + +// GetSpare gets the value of Spare for the instance +func (instance *CIM_ActsAsSpare) GetPropertySpare() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Spare") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AdjacentSlots.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AdjacentSlots.go new file mode 100644 index 00000000..a2f1fd99 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AdjacentSlots.go @@ -0,0 +1,171 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_AdjacentSlots struct +type CIM_AdjacentSlots struct { + *cim.WmiInstance + + // + DistanceBetweenSlots float32 + + // + SharedSlots bool + + // + SlotA CIM_Slot + + // + SlotB CIM_Slot +} + +func NewCIM_AdjacentSlotsEx1(instance *cim.WmiInstance) (newInstance *CIM_AdjacentSlots, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_AdjacentSlots{ + WmiInstance: tmp, + } + return +} + +func NewCIM_AdjacentSlotsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AdjacentSlots, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AdjacentSlots{ + WmiInstance: tmp, + } + return +} + +// SetDistanceBetweenSlots sets the value of DistanceBetweenSlots for the instance +func (instance *CIM_AdjacentSlots) SetPropertyDistanceBetweenSlots(value float32) (err error) { + return instance.SetProperty("DistanceBetweenSlots", (value)) +} + +// GetDistanceBetweenSlots gets the value of DistanceBetweenSlots for the instance +func (instance *CIM_AdjacentSlots) GetPropertyDistanceBetweenSlots() (value float32, err error) { + retValue, err := instance.GetProperty("DistanceBetweenSlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetSharedSlots sets the value of SharedSlots for the instance +func (instance *CIM_AdjacentSlots) SetPropertySharedSlots(value bool) (err error) { + return instance.SetProperty("SharedSlots", (value)) +} + +// GetSharedSlots gets the value of SharedSlots for the instance +func (instance *CIM_AdjacentSlots) GetPropertySharedSlots() (value bool, err error) { + retValue, err := instance.GetProperty("SharedSlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlotA sets the value of SlotA for the instance +func (instance *CIM_AdjacentSlots) SetPropertySlotA(value CIM_Slot) (err error) { + return instance.SetProperty("SlotA", (value)) +} + +// GetSlotA gets the value of SlotA for the instance +func (instance *CIM_AdjacentSlots) GetPropertySlotA() (value CIM_Slot, err error) { + retValue, err := instance.GetProperty("SlotA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Slot) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Slot is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Slot(valuetmp) + + return +} + +// SetSlotB sets the value of SlotB for the instance +func (instance *CIM_AdjacentSlots) SetPropertySlotB(value CIM_Slot) (err error) { + return instance.SetProperty("SlotB", (value)) +} + +// GetSlotB gets the value of SlotB for the instance +func (instance *CIM_AdjacentSlots) GetPropertySlotB() (value CIM_Slot, err error) { + retValue, err := instance.GetProperty("SlotB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Slot) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Slot is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Slot(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePExtent.go new file mode 100644 index 00000000..53272a40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePExtent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AggregatePExtent struct +type CIM_AggregatePExtent struct { + *CIM_StorageExtent +} + +func NewCIM_AggregatePExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_AggregatePExtent, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AggregatePExtent{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_AggregatePExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AggregatePExtent, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AggregatePExtent{ + CIM_StorageExtent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePSExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePSExtent.go new file mode 100644 index 00000000..19e109eb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregatePSExtent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AggregatePSExtent struct +type CIM_AggregatePSExtent struct { + *CIM_StorageExtent +} + +func NewCIM_AggregatePSExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_AggregatePSExtent, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AggregatePSExtent{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_AggregatePSExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AggregatePSExtent, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AggregatePSExtent{ + CIM_StorageExtent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregateRedundancyComponent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregateRedundancyComponent.go new file mode 100644 index 00000000..524551d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AggregateRedundancyComponent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AggregateRedundancyComponent struct +type CIM_AggregateRedundancyComponent struct { + *CIM_RedundancyComponent +} + +func NewCIM_AggregateRedundancyComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_AggregateRedundancyComponent, err error) { + tmp, err := NewCIM_RedundancyComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AggregateRedundancyComponent{ + CIM_RedundancyComponent: tmp, + } + return +} + +func NewCIM_AggregateRedundancyComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AggregateRedundancyComponent, err error) { + tmp, err := NewCIM_RedundancyComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AggregateRedundancyComponent{ + CIM_RedundancyComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AlarmDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AlarmDevice.go new file mode 100644 index 00000000..3c638c7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AlarmDevice.go @@ -0,0 +1,155 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_AlarmDevice struct +type CIM_AlarmDevice struct { + *CIM_LogicalDevice + + // + AudibleAlarm bool + + // + Urgency uint16 + + // + VisibleAlarm bool +} + +func NewCIM_AlarmDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_AlarmDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AlarmDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_AlarmDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AlarmDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AlarmDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetAudibleAlarm sets the value of AudibleAlarm for the instance +func (instance *CIM_AlarmDevice) SetPropertyAudibleAlarm(value bool) (err error) { + return instance.SetProperty("AudibleAlarm", (value)) +} + +// GetAudibleAlarm gets the value of AudibleAlarm for the instance +func (instance *CIM_AlarmDevice) GetPropertyAudibleAlarm() (value bool, err error) { + retValue, err := instance.GetProperty("AudibleAlarm") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetUrgency sets the value of Urgency for the instance +func (instance *CIM_AlarmDevice) SetPropertyUrgency(value uint16) (err error) { + return instance.SetProperty("Urgency", (value)) +} + +// GetUrgency gets the value of Urgency for the instance +func (instance *CIM_AlarmDevice) GetPropertyUrgency() (value uint16, err error) { + retValue, err := instance.GetProperty("Urgency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVisibleAlarm sets the value of VisibleAlarm for the instance +func (instance *CIM_AlarmDevice) SetPropertyVisibleAlarm(value bool) (err error) { + return instance.SetProperty("VisibleAlarm", (value)) +} + +// GetVisibleAlarm gets the value of VisibleAlarm for the instance +func (instance *CIM_AlarmDevice) GetPropertyVisibleAlarm() (value bool, err error) { + retValue, err := instance.GetProperty("VisibleAlarm") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// + +// +func (instance *CIM_AlarmDevice) SetUrgency( /* IN */ RequestedUrgency uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetUrgency", RequestedUrgency) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AllocatedResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AllocatedResource.go new file mode 100644 index 00000000..308e532d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AllocatedResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AllocatedResource struct +type CIM_AllocatedResource struct { + *CIM_Dependency +} + +func NewCIM_AllocatedResourceEx1(instance *cim.WmiInstance) (newInstance *CIM_AllocatedResource, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AllocatedResource{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_AllocatedResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AllocatedResource, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AllocatedResource{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystem.go new file mode 100644 index 00000000..3db55c22 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ApplicationSystem struct +type CIM_ApplicationSystem struct { + *CIM_System +} + +func NewCIM_ApplicationSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_ApplicationSystem, err error) { + tmp, err := NewCIM_SystemEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ApplicationSystem{ + CIM_System: tmp, + } + return +} + +func NewCIM_ApplicationSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ApplicationSystem, err error) { + tmp, err := NewCIM_SystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ApplicationSystem{ + CIM_System: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystemSoftwareFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystemSoftwareFeature.go new file mode 100644 index 00000000..0eae1842 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ApplicationSystemSoftwareFeature.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ApplicationSystemSoftwareFeature struct +type CIM_ApplicationSystemSoftwareFeature struct { + *CIM_SystemComponent +} + +func NewCIM_ApplicationSystemSoftwareFeatureEx1(instance *cim.WmiInstance) (newInstance *CIM_ApplicationSystemSoftwareFeature, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ApplicationSystemSoftwareFeature{ + CIM_SystemComponent: tmp, + } + return +} + +func NewCIM_ApplicationSystemSoftwareFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ApplicationSystemSoftwareFeature, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ApplicationSystemSoftwareFeature{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedAlarm.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedAlarm.go new file mode 100644 index 00000000..975cf975 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedAlarm.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AssociatedAlarm struct +type CIM_AssociatedAlarm struct { + *CIM_Dependency +} + +func NewCIM_AssociatedAlarmEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedAlarm, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedAlarm{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_AssociatedAlarmEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedAlarm, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedAlarm{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedBattery.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedBattery.go new file mode 100644 index 00000000..17747ffd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedBattery.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AssociatedBattery struct +type CIM_AssociatedBattery struct { + *CIM_Dependency +} + +func NewCIM_AssociatedBatteryEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedBattery, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedBattery{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_AssociatedBatteryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedBattery, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedBattery{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedCooling.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedCooling.go new file mode 100644 index 00000000..12d76785 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedCooling.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AssociatedCooling struct +type CIM_AssociatedCooling struct { + *CIM_Dependency +} + +func NewCIM_AssociatedCoolingEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedCooling, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedCooling{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_AssociatedCoolingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedCooling, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedCooling{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedMemory.go new file mode 100644 index 00000000..8b9bb41e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedMemory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AssociatedMemory struct +type CIM_AssociatedMemory struct { + *CIM_Dependency +} + +func NewCIM_AssociatedMemoryEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedMemory, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedMemory{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_AssociatedMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedMemory, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedMemory{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedProcessorMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedProcessorMemory.go new file mode 100644 index 00000000..3a3b3c60 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedProcessorMemory.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_AssociatedProcessorMemory struct +type CIM_AssociatedProcessorMemory struct { + *CIM_AssociatedMemory + + // + BusSpeed uint32 +} + +func NewCIM_AssociatedProcessorMemoryEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedProcessorMemory, err error) { + tmp, err := NewCIM_AssociatedMemoryEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedProcessorMemory{ + CIM_AssociatedMemory: tmp, + } + return +} + +func NewCIM_AssociatedProcessorMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedProcessorMemory, err error) { + tmp, err := NewCIM_AssociatedMemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedProcessorMemory{ + CIM_AssociatedMemory: tmp, + } + return +} + +// SetBusSpeed sets the value of BusSpeed for the instance +func (instance *CIM_AssociatedProcessorMemory) SetPropertyBusSpeed(value uint32) (err error) { + return instance.SetProperty("BusSpeed", (value)) +} + +// GetBusSpeed gets the value of BusSpeed for the instance +func (instance *CIM_AssociatedProcessorMemory) GetPropertyBusSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("BusSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSensor.go new file mode 100644 index 00000000..13f9f379 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_AssociatedSensor struct +type CIM_AssociatedSensor struct { + *CIM_Dependency +} + +func NewCIM_AssociatedSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedSensor, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedSensor{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_AssociatedSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedSensor, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedSensor{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyCurrentSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyCurrentSensor.go new file mode 100644 index 00000000..6fd11986 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyCurrentSensor.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_AssociatedSupplyCurrentSensor struct +type CIM_AssociatedSupplyCurrentSensor struct { + *CIM_AssociatedSensor + + // + MonitoringRange uint16 +} + +func NewCIM_AssociatedSupplyCurrentSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedSupplyCurrentSensor, err error) { + tmp, err := NewCIM_AssociatedSensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedSupplyCurrentSensor{ + CIM_AssociatedSensor: tmp, + } + return +} + +func NewCIM_AssociatedSupplyCurrentSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedSupplyCurrentSensor, err error) { + tmp, err := NewCIM_AssociatedSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedSupplyCurrentSensor{ + CIM_AssociatedSensor: tmp, + } + return +} + +// SetMonitoringRange sets the value of MonitoringRange for the instance +func (instance *CIM_AssociatedSupplyCurrentSensor) SetPropertyMonitoringRange(value uint16) (err error) { + return instance.SetProperty("MonitoringRange", (value)) +} + +// GetMonitoringRange gets the value of MonitoringRange for the instance +func (instance *CIM_AssociatedSupplyCurrentSensor) GetPropertyMonitoringRange() (value uint16, err error) { + retValue, err := instance.GetProperty("MonitoringRange") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyVoltageSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyVoltageSensor.go new file mode 100644 index 00000000..eec9b042 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_AssociatedSupplyVoltageSensor.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_AssociatedSupplyVoltageSensor struct +type CIM_AssociatedSupplyVoltageSensor struct { + *CIM_AssociatedSensor + + // + MonitoringRange uint16 +} + +func NewCIM_AssociatedSupplyVoltageSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_AssociatedSupplyVoltageSensor, err error) { + tmp, err := NewCIM_AssociatedSensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_AssociatedSupplyVoltageSensor{ + CIM_AssociatedSensor: tmp, + } + return +} + +func NewCIM_AssociatedSupplyVoltageSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_AssociatedSupplyVoltageSensor, err error) { + tmp, err := NewCIM_AssociatedSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_AssociatedSupplyVoltageSensor{ + CIM_AssociatedSensor: tmp, + } + return +} + +// SetMonitoringRange sets the value of MonitoringRange for the instance +func (instance *CIM_AssociatedSupplyVoltageSensor) SetPropertyMonitoringRange(value uint16) (err error) { + return instance.SetProperty("MonitoringRange", (value)) +} + +// GetMonitoringRange gets the value of MonitoringRange for the instance +func (instance *CIM_AssociatedSupplyVoltageSensor) GetPropertyMonitoringRange() (value uint16, err error) { + retValue, err := instance.GetProperty("MonitoringRange") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSElement.go new file mode 100644 index 00000000..470ba93d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSElement.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_BIOSElement struct +type CIM_BIOSElement struct { + *CIM_SoftwareElement + + // + PrimaryBIOS bool +} + +func NewCIM_BIOSElementEx1(instance *cim.WmiInstance) (newInstance *CIM_BIOSElement, err error) { + tmp, err := NewCIM_SoftwareElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BIOSElement{ + CIM_SoftwareElement: tmp, + } + return +} + +func NewCIM_BIOSElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BIOSElement, err error) { + tmp, err := NewCIM_SoftwareElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BIOSElement{ + CIM_SoftwareElement: tmp, + } + return +} + +// SetPrimaryBIOS sets the value of PrimaryBIOS for the instance +func (instance *CIM_BIOSElement) SetPropertyPrimaryBIOS(value bool) (err error) { + return instance.SetProperty("PrimaryBIOS", (value)) +} + +// GetPrimaryBIOS gets the value of PrimaryBIOS for the instance +func (instance *CIM_BIOSElement) GetPropertyPrimaryBIOS() (value bool, err error) { + retValue, err := instance.GetProperty("PrimaryBIOS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeature.go new file mode 100644 index 00000000..934d31ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeature.go @@ -0,0 +1,112 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_BIOSFeature struct +type CIM_BIOSFeature struct { + *CIM_SoftwareFeature + + // + CharacteristicDescriptions []string + + // + Characteristics []uint16 +} + +func NewCIM_BIOSFeatureEx1(instance *cim.WmiInstance) (newInstance *CIM_BIOSFeature, err error) { + tmp, err := NewCIM_SoftwareFeatureEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BIOSFeature{ + CIM_SoftwareFeature: tmp, + } + return +} + +func NewCIM_BIOSFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BIOSFeature, err error) { + tmp, err := NewCIM_SoftwareFeatureEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BIOSFeature{ + CIM_SoftwareFeature: tmp, + } + return +} + +// SetCharacteristicDescriptions sets the value of CharacteristicDescriptions for the instance +func (instance *CIM_BIOSFeature) SetPropertyCharacteristicDescriptions(value []string) (err error) { + return instance.SetProperty("CharacteristicDescriptions", (value)) +} + +// GetCharacteristicDescriptions gets the value of CharacteristicDescriptions for the instance +func (instance *CIM_BIOSFeature) GetPropertyCharacteristicDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CharacteristicDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCharacteristics sets the value of Characteristics for the instance +func (instance *CIM_BIOSFeature) SetPropertyCharacteristics(value []uint16) (err error) { + return instance.SetProperty("Characteristics", (value)) +} + +// GetCharacteristics gets the value of Characteristics for the instance +func (instance *CIM_BIOSFeature) GetPropertyCharacteristics() (value []uint16, err error) { + retValue, err := instance.GetProperty("Characteristics") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeatureBIOSElements.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeatureBIOSElements.go new file mode 100644 index 00000000..e9fe225d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSFeatureBIOSElements.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_BIOSFeatureBIOSElements struct +type CIM_BIOSFeatureBIOSElements struct { + *CIM_SoftwareFeatureSoftwareElements +} + +func NewCIM_BIOSFeatureBIOSElementsEx1(instance *cim.WmiInstance) (newInstance *CIM_BIOSFeatureBIOSElements, err error) { + tmp, err := NewCIM_SoftwareFeatureSoftwareElementsEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BIOSFeatureBIOSElements{ + CIM_SoftwareFeatureSoftwareElements: tmp, + } + return +} + +func NewCIM_BIOSFeatureBIOSElementsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BIOSFeatureBIOSElements, err error) { + tmp, err := NewCIM_SoftwareFeatureSoftwareElementsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BIOSFeatureBIOSElements{ + CIM_SoftwareFeatureSoftwareElements: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSLoadedInNV.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSLoadedInNV.go new file mode 100644 index 00000000..4e0ad52b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BIOSLoadedInNV.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_BIOSLoadedInNV struct +type CIM_BIOSLoadedInNV struct { + *CIM_Dependency + + // + EndingAddress uint64 + + // + StartingAddress uint64 +} + +func NewCIM_BIOSLoadedInNVEx1(instance *cim.WmiInstance) (newInstance *CIM_BIOSLoadedInNV, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BIOSLoadedInNV{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_BIOSLoadedInNVEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BIOSLoadedInNV, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BIOSLoadedInNV{ + CIM_Dependency: tmp, + } + return +} + +// SetEndingAddress sets the value of EndingAddress for the instance +func (instance *CIM_BIOSLoadedInNV) SetPropertyEndingAddress(value uint64) (err error) { + return instance.SetProperty("EndingAddress", (value)) +} + +// GetEndingAddress gets the value of EndingAddress for the instance +func (instance *CIM_BIOSLoadedInNV) GetPropertyEndingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("EndingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_BIOSLoadedInNV) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_BIOSLoadedInNV) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BasedOn.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BasedOn.go new file mode 100644 index 00000000..3c6ee8a5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BasedOn.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_BasedOn struct +type CIM_BasedOn struct { + *CIM_Dependency + + // + EndingAddress uint64 + + // + StartingAddress uint64 +} + +func NewCIM_BasedOnEx1(instance *cim.WmiInstance) (newInstance *CIM_BasedOn, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BasedOn{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_BasedOnEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BasedOn, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BasedOn{ + CIM_Dependency: tmp, + } + return +} + +// SetEndingAddress sets the value of EndingAddress for the instance +func (instance *CIM_BasedOn) SetPropertyEndingAddress(value uint64) (err error) { + return instance.SetProperty("EndingAddress", (value)) +} + +// GetEndingAddress gets the value of EndingAddress for the instance +func (instance *CIM_BasedOn) GetPropertyEndingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("EndingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_BasedOn) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_BasedOn) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Battery.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Battery.go new file mode 100644 index 00000000..bc381af5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Battery.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Battery struct +type CIM_Battery struct { + *CIM_LogicalDevice + + // + BatteryStatus uint16 + + // + Chemistry uint16 + + // + DesignCapacity uint32 + + // + DesignVoltage uint64 + + // + EstimatedChargeRemaining uint16 + + // + EstimatedRunTime uint32 + + // + ExpectedLife uint32 + + // + FullChargeCapacity uint32 + + // + MaxRechargeTime uint32 + + // + SmartBatteryVersion string + + // + TimeOnBattery uint32 + + // + TimeToFullCharge uint32 +} + +func NewCIM_BatteryEx1(instance *cim.WmiInstance) (newInstance *CIM_Battery, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Battery{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_BatteryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Battery, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Battery{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetBatteryStatus sets the value of BatteryStatus for the instance +func (instance *CIM_Battery) SetPropertyBatteryStatus(value uint16) (err error) { + return instance.SetProperty("BatteryStatus", (value)) +} + +// GetBatteryStatus gets the value of BatteryStatus for the instance +func (instance *CIM_Battery) GetPropertyBatteryStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("BatteryStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetChemistry sets the value of Chemistry for the instance +func (instance *CIM_Battery) SetPropertyChemistry(value uint16) (err error) { + return instance.SetProperty("Chemistry", (value)) +} + +// GetChemistry gets the value of Chemistry for the instance +func (instance *CIM_Battery) GetPropertyChemistry() (value uint16, err error) { + retValue, err := instance.GetProperty("Chemistry") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDesignCapacity sets the value of DesignCapacity for the instance +func (instance *CIM_Battery) SetPropertyDesignCapacity(value uint32) (err error) { + return instance.SetProperty("DesignCapacity", (value)) +} + +// GetDesignCapacity gets the value of DesignCapacity for the instance +func (instance *CIM_Battery) GetPropertyDesignCapacity() (value uint32, err error) { + retValue, err := instance.GetProperty("DesignCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDesignVoltage sets the value of DesignVoltage for the instance +func (instance *CIM_Battery) SetPropertyDesignVoltage(value uint64) (err error) { + return instance.SetProperty("DesignVoltage", (value)) +} + +// GetDesignVoltage gets the value of DesignVoltage for the instance +func (instance *CIM_Battery) GetPropertyDesignVoltage() (value uint64, err error) { + retValue, err := instance.GetProperty("DesignVoltage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEstimatedChargeRemaining sets the value of EstimatedChargeRemaining for the instance +func (instance *CIM_Battery) SetPropertyEstimatedChargeRemaining(value uint16) (err error) { + return instance.SetProperty("EstimatedChargeRemaining", (value)) +} + +// GetEstimatedChargeRemaining gets the value of EstimatedChargeRemaining for the instance +func (instance *CIM_Battery) GetPropertyEstimatedChargeRemaining() (value uint16, err error) { + retValue, err := instance.GetProperty("EstimatedChargeRemaining") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEstimatedRunTime sets the value of EstimatedRunTime for the instance +func (instance *CIM_Battery) SetPropertyEstimatedRunTime(value uint32) (err error) { + return instance.SetProperty("EstimatedRunTime", (value)) +} + +// GetEstimatedRunTime gets the value of EstimatedRunTime for the instance +func (instance *CIM_Battery) GetPropertyEstimatedRunTime() (value uint32, err error) { + retValue, err := instance.GetProperty("EstimatedRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExpectedLife sets the value of ExpectedLife for the instance +func (instance *CIM_Battery) SetPropertyExpectedLife(value uint32) (err error) { + return instance.SetProperty("ExpectedLife", (value)) +} + +// GetExpectedLife gets the value of ExpectedLife for the instance +func (instance *CIM_Battery) GetPropertyExpectedLife() (value uint32, err error) { + retValue, err := instance.GetProperty("ExpectedLife") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFullChargeCapacity sets the value of FullChargeCapacity for the instance +func (instance *CIM_Battery) SetPropertyFullChargeCapacity(value uint32) (err error) { + return instance.SetProperty("FullChargeCapacity", (value)) +} + +// GetFullChargeCapacity gets the value of FullChargeCapacity for the instance +func (instance *CIM_Battery) GetPropertyFullChargeCapacity() (value uint32, err error) { + retValue, err := instance.GetProperty("FullChargeCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxRechargeTime sets the value of MaxRechargeTime for the instance +func (instance *CIM_Battery) SetPropertyMaxRechargeTime(value uint32) (err error) { + return instance.SetProperty("MaxRechargeTime", (value)) +} + +// GetMaxRechargeTime gets the value of MaxRechargeTime for the instance +func (instance *CIM_Battery) GetPropertyMaxRechargeTime() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxRechargeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSmartBatteryVersion sets the value of SmartBatteryVersion for the instance +func (instance *CIM_Battery) SetPropertySmartBatteryVersion(value string) (err error) { + return instance.SetProperty("SmartBatteryVersion", (value)) +} + +// GetSmartBatteryVersion gets the value of SmartBatteryVersion for the instance +func (instance *CIM_Battery) GetPropertySmartBatteryVersion() (value string, err error) { + retValue, err := instance.GetProperty("SmartBatteryVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeOnBattery sets the value of TimeOnBattery for the instance +func (instance *CIM_Battery) SetPropertyTimeOnBattery(value uint32) (err error) { + return instance.SetProperty("TimeOnBattery", (value)) +} + +// GetTimeOnBattery gets the value of TimeOnBattery for the instance +func (instance *CIM_Battery) GetPropertyTimeOnBattery() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeOnBattery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeToFullCharge sets the value of TimeToFullCharge for the instance +func (instance *CIM_Battery) SetPropertyTimeToFullCharge(value uint32) (err error) { + return instance.SetProperty("TimeToFullCharge", (value)) +} + +// GetTimeToFullCharge gets the value of TimeToFullCharge for the instance +func (instance *CIM_Battery) GetPropertyTimeToFullCharge() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeToFullCharge") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BinarySensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BinarySensor.go new file mode 100644 index 00000000..4dd48956 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BinarySensor.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_BinarySensor struct +type CIM_BinarySensor struct { + *CIM_Sensor + + // + CurrentReading bool + + // + ExpectedReading bool + + // + InterpretationOfFalse string + + // + InterpretationOfTrue string +} + +func NewCIM_BinarySensorEx1(instance *cim.WmiInstance) (newInstance *CIM_BinarySensor, err error) { + tmp, err := NewCIM_SensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BinarySensor{ + CIM_Sensor: tmp, + } + return +} + +func NewCIM_BinarySensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BinarySensor, err error) { + tmp, err := NewCIM_SensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BinarySensor{ + CIM_Sensor: tmp, + } + return +} + +// SetCurrentReading sets the value of CurrentReading for the instance +func (instance *CIM_BinarySensor) SetPropertyCurrentReading(value bool) (err error) { + return instance.SetProperty("CurrentReading", (value)) +} + +// GetCurrentReading gets the value of CurrentReading for the instance +func (instance *CIM_BinarySensor) GetPropertyCurrentReading() (value bool, err error) { + retValue, err := instance.GetProperty("CurrentReading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExpectedReading sets the value of ExpectedReading for the instance +func (instance *CIM_BinarySensor) SetPropertyExpectedReading(value bool) (err error) { + return instance.SetProperty("ExpectedReading", (value)) +} + +// GetExpectedReading gets the value of ExpectedReading for the instance +func (instance *CIM_BinarySensor) GetPropertyExpectedReading() (value bool, err error) { + retValue, err := instance.GetProperty("ExpectedReading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInterpretationOfFalse sets the value of InterpretationOfFalse for the instance +func (instance *CIM_BinarySensor) SetPropertyInterpretationOfFalse(value string) (err error) { + return instance.SetProperty("InterpretationOfFalse", (value)) +} + +// GetInterpretationOfFalse gets the value of InterpretationOfFalse for the instance +func (instance *CIM_BinarySensor) GetPropertyInterpretationOfFalse() (value string, err error) { + retValue, err := instance.GetProperty("InterpretationOfFalse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInterpretationOfTrue sets the value of InterpretationOfTrue for the instance +func (instance *CIM_BinarySensor) SetPropertyInterpretationOfTrue(value string) (err error) { + return instance.SetProperty("InterpretationOfTrue", (value)) +} + +// GetInterpretationOfTrue gets the value of InterpretationOfTrue for the instance +func (instance *CIM_BinarySensor) GetPropertyInterpretationOfTrue() (value string, err error) { + retValue, err := instance.GetProperty("InterpretationOfTrue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootOSFromFS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootOSFromFS.go new file mode 100644 index 00000000..ed59f83a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootOSFromFS.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_BootOSFromFS struct +type CIM_BootOSFromFS struct { + *CIM_Dependency +} + +func NewCIM_BootOSFromFSEx1(instance *cim.WmiInstance) (newInstance *CIM_BootOSFromFS, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BootOSFromFS{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_BootOSFromFSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BootOSFromFS, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BootOSFromFS{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootSAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootSAP.go new file mode 100644 index 00000000..29a478d9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootSAP.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_BootSAP struct +type CIM_BootSAP struct { + *CIM_ServiceAccessPoint +} + +func NewCIM_BootSAPEx1(instance *cim.WmiInstance) (newInstance *CIM_BootSAP, err error) { + tmp, err := NewCIM_ServiceAccessPointEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BootSAP{ + CIM_ServiceAccessPoint: tmp, + } + return +} + +func NewCIM_BootSAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BootSAP, err error) { + tmp, err := NewCIM_ServiceAccessPointEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BootSAP{ + CIM_ServiceAccessPoint: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootService.go new file mode 100644 index 00000000..61ba0247 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootService.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_BootService struct +type CIM_BootService struct { + *CIM_Service +} + +func NewCIM_BootServiceEx1(instance *cim.WmiInstance) (newInstance *CIM_BootService, err error) { + tmp, err := NewCIM_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BootService{ + CIM_Service: tmp, + } + return +} + +func NewCIM_BootServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BootService, err error) { + tmp, err := NewCIM_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BootService{ + CIM_Service: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootServiceAccessBySAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootServiceAccessBySAP.go new file mode 100644 index 00000000..4779c681 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_BootServiceAccessBySAP.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_BootServiceAccessBySAP struct +type CIM_BootServiceAccessBySAP struct { + *CIM_ServiceAccessBySAP +} + +func NewCIM_BootServiceAccessBySAPEx1(instance *cim.WmiInstance) (newInstance *CIM_BootServiceAccessBySAP, err error) { + tmp, err := NewCIM_ServiceAccessBySAPEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_BootServiceAccessBySAP{ + CIM_ServiceAccessBySAP: tmp, + } + return +} + +func NewCIM_BootServiceAccessBySAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_BootServiceAccessBySAP, err error) { + tmp, err := NewCIM_ServiceAccessBySAPEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_BootServiceAccessBySAP{ + CIM_ServiceAccessBySAP: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CDROMDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CDROMDrive.go new file mode 100644 index 00000000..f253ff2e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CDROMDrive.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_CDROMDrive struct +type CIM_CDROMDrive struct { + *CIM_MediaAccessDevice +} + +func NewCIM_CDROMDriveEx1(instance *cim.WmiInstance) (newInstance *CIM_CDROMDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CDROMDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +func NewCIM_CDROMDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CDROMDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CDROMDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CacheMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CacheMemory.go new file mode 100644 index 00000000..beb94bfe --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CacheMemory.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CacheMemory struct +type CIM_CacheMemory struct { + *CIM_Memory + + // + Associativity uint16 + + // + CacheType uint16 + + // + FlushTimer uint32 + + // + Level uint16 + + // + LineSize uint32 + + // + ReadPolicy uint16 + + // + ReplacementPolicy uint16 + + // + WritePolicy uint16 +} + +func NewCIM_CacheMemoryEx1(instance *cim.WmiInstance) (newInstance *CIM_CacheMemory, err error) { + tmp, err := NewCIM_MemoryEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CacheMemory{ + CIM_Memory: tmp, + } + return +} + +func NewCIM_CacheMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CacheMemory, err error) { + tmp, err := NewCIM_MemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CacheMemory{ + CIM_Memory: tmp, + } + return +} + +// SetAssociativity sets the value of Associativity for the instance +func (instance *CIM_CacheMemory) SetPropertyAssociativity(value uint16) (err error) { + return instance.SetProperty("Associativity", (value)) +} + +// GetAssociativity gets the value of Associativity for the instance +func (instance *CIM_CacheMemory) GetPropertyAssociativity() (value uint16, err error) { + retValue, err := instance.GetProperty("Associativity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCacheType sets the value of CacheType for the instance +func (instance *CIM_CacheMemory) SetPropertyCacheType(value uint16) (err error) { + return instance.SetProperty("CacheType", (value)) +} + +// GetCacheType gets the value of CacheType for the instance +func (instance *CIM_CacheMemory) GetPropertyCacheType() (value uint16, err error) { + retValue, err := instance.GetProperty("CacheType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFlushTimer sets the value of FlushTimer for the instance +func (instance *CIM_CacheMemory) SetPropertyFlushTimer(value uint32) (err error) { + return instance.SetProperty("FlushTimer", (value)) +} + +// GetFlushTimer gets the value of FlushTimer for the instance +func (instance *CIM_CacheMemory) GetPropertyFlushTimer() (value uint32, err error) { + retValue, err := instance.GetProperty("FlushTimer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLevel sets the value of Level for the instance +func (instance *CIM_CacheMemory) SetPropertyLevel(value uint16) (err error) { + return instance.SetProperty("Level", (value)) +} + +// GetLevel gets the value of Level for the instance +func (instance *CIM_CacheMemory) GetPropertyLevel() (value uint16, err error) { + retValue, err := instance.GetProperty("Level") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLineSize sets the value of LineSize for the instance +func (instance *CIM_CacheMemory) SetPropertyLineSize(value uint32) (err error) { + return instance.SetProperty("LineSize", (value)) +} + +// GetLineSize gets the value of LineSize for the instance +func (instance *CIM_CacheMemory) GetPropertyLineSize() (value uint32, err error) { + retValue, err := instance.GetProperty("LineSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPolicy sets the value of ReadPolicy for the instance +func (instance *CIM_CacheMemory) SetPropertyReadPolicy(value uint16) (err error) { + return instance.SetProperty("ReadPolicy", (value)) +} + +// GetReadPolicy gets the value of ReadPolicy for the instance +func (instance *CIM_CacheMemory) GetPropertyReadPolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("ReadPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReplacementPolicy sets the value of ReplacementPolicy for the instance +func (instance *CIM_CacheMemory) SetPropertyReplacementPolicy(value uint16) (err error) { + return instance.SetProperty("ReplacementPolicy", (value)) +} + +// GetReplacementPolicy gets the value of ReplacementPolicy for the instance +func (instance *CIM_CacheMemory) GetPropertyReplacementPolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplacementPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWritePolicy sets the value of WritePolicy for the instance +func (instance *CIM_CacheMemory) SetPropertyWritePolicy(value uint16) (err error) { + return instance.SetProperty("WritePolicy", (value)) +} + +// GetWritePolicy gets the value of WritePolicy for the instance +func (instance *CIM_CacheMemory) GetPropertyWritePolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("WritePolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Card.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Card.go new file mode 100644 index 00000000..aca91049 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Card.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Card struct +type CIM_Card struct { + *CIM_PhysicalPackage + + // + HostingBoard bool + + // + RequirementsDescription string + + // + RequiresDaughterBoard bool + + // + SlotLayout string + + // + SpecialRequirements bool +} + +func NewCIM_CardEx1(instance *cim.WmiInstance) (newInstance *CIM_Card, err error) { + tmp, err := NewCIM_PhysicalPackageEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Card{ + CIM_PhysicalPackage: tmp, + } + return +} + +func NewCIM_CardEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Card, err error) { + tmp, err := NewCIM_PhysicalPackageEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Card{ + CIM_PhysicalPackage: tmp, + } + return +} + +// SetHostingBoard sets the value of HostingBoard for the instance +func (instance *CIM_Card) SetPropertyHostingBoard(value bool) (err error) { + return instance.SetProperty("HostingBoard", (value)) +} + +// GetHostingBoard gets the value of HostingBoard for the instance +func (instance *CIM_Card) GetPropertyHostingBoard() (value bool, err error) { + retValue, err := instance.GetProperty("HostingBoard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRequirementsDescription sets the value of RequirementsDescription for the instance +func (instance *CIM_Card) SetPropertyRequirementsDescription(value string) (err error) { + return instance.SetProperty("RequirementsDescription", (value)) +} + +// GetRequirementsDescription gets the value of RequirementsDescription for the instance +func (instance *CIM_Card) GetPropertyRequirementsDescription() (value string, err error) { + retValue, err := instance.GetProperty("RequirementsDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRequiresDaughterBoard sets the value of RequiresDaughterBoard for the instance +func (instance *CIM_Card) SetPropertyRequiresDaughterBoard(value bool) (err error) { + return instance.SetProperty("RequiresDaughterBoard", (value)) +} + +// GetRequiresDaughterBoard gets the value of RequiresDaughterBoard for the instance +func (instance *CIM_Card) GetPropertyRequiresDaughterBoard() (value bool, err error) { + retValue, err := instance.GetProperty("RequiresDaughterBoard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlotLayout sets the value of SlotLayout for the instance +func (instance *CIM_Card) SetPropertySlotLayout(value string) (err error) { + return instance.SetProperty("SlotLayout", (value)) +} + +// GetSlotLayout gets the value of SlotLayout for the instance +func (instance *CIM_Card) GetPropertySlotLayout() (value string, err error) { + retValue, err := instance.GetProperty("SlotLayout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpecialRequirements sets the value of SpecialRequirements for the instance +func (instance *CIM_Card) SetPropertySpecialRequirements(value bool) (err error) { + return instance.SetProperty("SpecialRequirements", (value)) +} + +// GetSpecialRequirements gets the value of SpecialRequirements for the instance +func (instance *CIM_Card) GetPropertySpecialRequirements() (value bool, err error) { + retValue, err := instance.GetProperty("SpecialRequirements") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardInSlot.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardInSlot.go new file mode 100644 index 00000000..568be60b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardInSlot.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_CardInSlot struct +type CIM_CardInSlot struct { + *CIM_PackageInSlot +} + +func NewCIM_CardInSlotEx1(instance *cim.WmiInstance) (newInstance *CIM_CardInSlot, err error) { + tmp, err := NewCIM_PackageInSlotEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CardInSlot{ + CIM_PackageInSlot: tmp, + } + return +} + +func NewCIM_CardInSlotEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CardInSlot, err error) { + tmp, err := NewCIM_PackageInSlotEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CardInSlot{ + CIM_PackageInSlot: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardOnCard.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardOnCard.go new file mode 100644 index 00000000..e75249d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CardOnCard.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CardOnCard struct +type CIM_CardOnCard struct { + *CIM_Container + + // + MountOrSlotDescription string +} + +func NewCIM_CardOnCardEx1(instance *cim.WmiInstance) (newInstance *CIM_CardOnCard, err error) { + tmp, err := NewCIM_ContainerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CardOnCard{ + CIM_Container: tmp, + } + return +} + +func NewCIM_CardOnCardEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CardOnCard, err error) { + tmp, err := NewCIM_ContainerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CardOnCard{ + CIM_Container: tmp, + } + return +} + +// SetMountOrSlotDescription sets the value of MountOrSlotDescription for the instance +func (instance *CIM_CardOnCard) SetPropertyMountOrSlotDescription(value string) (err error) { + return instance.SetProperty("MountOrSlotDescription", (value)) +} + +// GetMountOrSlotDescription gets the value of MountOrSlotDescription for the instance +func (instance *CIM_CardOnCard) GetPropertyMountOrSlotDescription() (value string, err error) { + retValue, err := instance.GetProperty("MountOrSlotDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chassis.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chassis.go new file mode 100644 index 00000000..468f3022 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chassis.go @@ -0,0 +1,202 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Chassis struct +type CIM_Chassis struct { + *CIM_PhysicalFrame + + // + ChassisTypes []uint16 + + // + CurrentRequiredOrProduced int16 + + // + HeatGeneration uint16 + + // + NumberOfPowerCords uint16 + + // + TypeDescriptions []string +} + +func NewCIM_ChassisEx1(instance *cim.WmiInstance) (newInstance *CIM_Chassis, err error) { + tmp, err := NewCIM_PhysicalFrameEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Chassis{ + CIM_PhysicalFrame: tmp, + } + return +} + +func NewCIM_ChassisEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Chassis, err error) { + tmp, err := NewCIM_PhysicalFrameEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Chassis{ + CIM_PhysicalFrame: tmp, + } + return +} + +// SetChassisTypes sets the value of ChassisTypes for the instance +func (instance *CIM_Chassis) SetPropertyChassisTypes(value []uint16) (err error) { + return instance.SetProperty("ChassisTypes", (value)) +} + +// GetChassisTypes gets the value of ChassisTypes for the instance +func (instance *CIM_Chassis) GetPropertyChassisTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("ChassisTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCurrentRequiredOrProduced sets the value of CurrentRequiredOrProduced for the instance +func (instance *CIM_Chassis) SetPropertyCurrentRequiredOrProduced(value int16) (err error) { + return instance.SetProperty("CurrentRequiredOrProduced", (value)) +} + +// GetCurrentRequiredOrProduced gets the value of CurrentRequiredOrProduced for the instance +func (instance *CIM_Chassis) GetPropertyCurrentRequiredOrProduced() (value int16, err error) { + retValue, err := instance.GetProperty("CurrentRequiredOrProduced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetHeatGeneration sets the value of HeatGeneration for the instance +func (instance *CIM_Chassis) SetPropertyHeatGeneration(value uint16) (err error) { + return instance.SetProperty("HeatGeneration", (value)) +} + +// GetHeatGeneration gets the value of HeatGeneration for the instance +func (instance *CIM_Chassis) GetPropertyHeatGeneration() (value uint16, err error) { + retValue, err := instance.GetProperty("HeatGeneration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfPowerCords sets the value of NumberOfPowerCords for the instance +func (instance *CIM_Chassis) SetPropertyNumberOfPowerCords(value uint16) (err error) { + return instance.SetProperty("NumberOfPowerCords", (value)) +} + +// GetNumberOfPowerCords gets the value of NumberOfPowerCords for the instance +func (instance *CIM_Chassis) GetPropertyNumberOfPowerCords() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfPowerCords") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTypeDescriptions sets the value of TypeDescriptions for the instance +func (instance *CIM_Chassis) SetPropertyTypeDescriptions(value []string) (err error) { + return instance.SetProperty("TypeDescriptions", (value)) +} + +// GetTypeDescriptions gets the value of TypeDescriptions for the instance +func (instance *CIM_Chassis) GetPropertyTypeDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("TypeDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ChassisInRack.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ChassisInRack.go new file mode 100644 index 00000000..ce96e562 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ChassisInRack.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ChassisInRack struct +type CIM_ChassisInRack struct { + *CIM_Container + + // + BottomU uint16 +} + +func NewCIM_ChassisInRackEx1(instance *cim.WmiInstance) (newInstance *CIM_ChassisInRack, err error) { + tmp, err := NewCIM_ContainerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ChassisInRack{ + CIM_Container: tmp, + } + return +} + +func NewCIM_ChassisInRackEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ChassisInRack, err error) { + tmp, err := NewCIM_ContainerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ChassisInRack{ + CIM_Container: tmp, + } + return +} + +// SetBottomU sets the value of BottomU for the instance +func (instance *CIM_ChassisInRack) SetPropertyBottomU(value uint16) (err error) { + return instance.SetProperty("BottomU", (value)) +} + +// GetBottomU gets the value of BottomU for the instance +func (instance *CIM_ChassisInRack) GetPropertyBottomU() (value uint16, err error) { + retValue, err := instance.GetProperty("BottomU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Check.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Check.go new file mode 100644 index 00000000..8fa016f1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Check.go @@ -0,0 +1,334 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Check struct +type CIM_Check struct { + *cim.WmiInstance + + // + Caption string + + // + CheckID string + + // + CheckMode bool + + // + Description string + + // + Name string + + // + SoftwareElementID string + + // + SoftwareElementState uint16 + + // + TargetOperatingSystem uint16 + + // + Version string +} + +func NewCIM_CheckEx1(instance *cim.WmiInstance) (newInstance *CIM_Check, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Check{ + WmiInstance: tmp, + } + return +} + +func NewCIM_CheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Check, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Check{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_Check) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_Check) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCheckID sets the value of CheckID for the instance +func (instance *CIM_Check) SetPropertyCheckID(value string) (err error) { + return instance.SetProperty("CheckID", (value)) +} + +// GetCheckID gets the value of CheckID for the instance +func (instance *CIM_Check) GetPropertyCheckID() (value string, err error) { + retValue, err := instance.GetProperty("CheckID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCheckMode sets the value of CheckMode for the instance +func (instance *CIM_Check) SetPropertyCheckMode(value bool) (err error) { + return instance.SetProperty("CheckMode", (value)) +} + +// GetCheckMode gets the value of CheckMode for the instance +func (instance *CIM_Check) GetPropertyCheckMode() (value bool, err error) { + retValue, err := instance.GetProperty("CheckMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_Check) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_Check) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_Check) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_Check) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementID sets the value of SoftwareElementID for the instance +func (instance *CIM_Check) SetPropertySoftwareElementID(value string) (err error) { + return instance.SetProperty("SoftwareElementID", (value)) +} + +// GetSoftwareElementID gets the value of SoftwareElementID for the instance +func (instance *CIM_Check) GetPropertySoftwareElementID() (value string, err error) { + retValue, err := instance.GetProperty("SoftwareElementID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementState sets the value of SoftwareElementState for the instance +func (instance *CIM_Check) SetPropertySoftwareElementState(value uint16) (err error) { + return instance.SetProperty("SoftwareElementState", (value)) +} + +// GetSoftwareElementState gets the value of SoftwareElementState for the instance +func (instance *CIM_Check) GetPropertySoftwareElementState() (value uint16, err error) { + retValue, err := instance.GetProperty("SoftwareElementState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTargetOperatingSystem sets the value of TargetOperatingSystem for the instance +func (instance *CIM_Check) SetPropertyTargetOperatingSystem(value uint16) (err error) { + return instance.SetProperty("TargetOperatingSystem", (value)) +} + +// GetTargetOperatingSystem gets the value of TargetOperatingSystem for the instance +func (instance *CIM_Check) GetPropertyTargetOperatingSystem() (value uint16, err error) { + retValue, err := instance.GetProperty("TargetOperatingSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_Check) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_Check) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *CIM_Check) Invoke() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Invoke") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chip.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chip.go new file mode 100644 index 00000000..ccd8bc78 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Chip.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Chip struct +type CIM_Chip struct { + *CIM_PhysicalComponent + + // + FormFactor uint16 +} + +func NewCIM_ChipEx1(instance *cim.WmiInstance) (newInstance *CIM_Chip, err error) { + tmp, err := NewCIM_PhysicalComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Chip{ + CIM_PhysicalComponent: tmp, + } + return +} + +func NewCIM_ChipEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Chip, err error) { + tmp, err := NewCIM_PhysicalComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Chip{ + CIM_PhysicalComponent: tmp, + } + return +} + +// SetFormFactor sets the value of FormFactor for the instance +func (instance *CIM_Chip) SetPropertyFormFactor(value uint16) (err error) { + return instance.SetProperty("FormFactor", (value)) +} + +// GetFormFactor gets the value of FormFactor for the instance +func (instance *CIM_Chip) GetPropertyFormFactor() (value uint16, err error) { + retValue, err := instance.GetProperty("FormFactor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassCreation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassCreation.go new file mode 100644 index 00000000..1a7da14b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassCreation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClassCreation struct +type CIM_ClassCreation struct { + *CIM_ClassIndication +} + +func NewCIM_ClassCreationEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassCreation, err error) { + tmp, err := NewCIM_ClassIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassCreation{ + CIM_ClassIndication: tmp, + } + return +} + +func NewCIM_ClassCreationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassCreation, err error) { + tmp, err := NewCIM_ClassIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassCreation{ + CIM_ClassIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassDeletion.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassDeletion.go new file mode 100644 index 00000000..c6186f8f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassDeletion.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClassDeletion struct +type CIM_ClassDeletion struct { + *CIM_ClassIndication +} + +func NewCIM_ClassDeletionEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassDeletion, err error) { + tmp, err := NewCIM_ClassIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassDeletion{ + CIM_ClassIndication: tmp, + } + return +} + +func NewCIM_ClassDeletionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassDeletion, err error) { + tmp, err := NewCIM_ClassIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassDeletion{ + CIM_ClassIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassIndication.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassIndication.go new file mode 100644 index 00000000..65eaa76e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassIndication.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ClassIndication struct +type CIM_ClassIndication struct { + *CIM_Indication + + // The current definition of the class that is created, changed or deleted in the schema. In the case of a CIM_ClassDeletion Indication, the definition for the class just prior to deletion should be placed in this property. + ClassDefinition interface{} +} + +func NewCIM_ClassIndicationEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassIndication, err error) { + tmp, err := NewCIM_IndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassIndication{ + CIM_Indication: tmp, + } + return +} + +func NewCIM_ClassIndicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassIndication, err error) { + tmp, err := NewCIM_IndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassIndication{ + CIM_Indication: tmp, + } + return +} + +// SetClassDefinition sets the value of ClassDefinition for the instance +func (instance *CIM_ClassIndication) SetPropertyClassDefinition(value interface{}) (err error) { + return instance.SetProperty("ClassDefinition", (value)) +} + +// GetClassDefinition gets the value of ClassDefinition for the instance +func (instance *CIM_ClassIndication) GetPropertyClassDefinition() (value interface{}, err error) { + retValue, err := instance.GetProperty("ClassDefinition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassModification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassModification.go new file mode 100644 index 00000000..97a66b3b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClassModification.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ClassModification struct +type CIM_ClassModification struct { + *CIM_ClassIndication + + // A copy of the 'previous' class definition whose change generated the Indication. PreviousClassDefinition contains an 'older' copy of the class' information, as compared to what is found in the ClassDefinition property (inherited from ClassIndication). + PreviousClassDefinition interface{} +} + +func NewCIM_ClassModificationEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassModification, err error) { + tmp, err := NewCIM_ClassIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassModification{ + CIM_ClassIndication: tmp, + } + return +} + +func NewCIM_ClassModificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassModification, err error) { + tmp, err := NewCIM_ClassIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassModification{ + CIM_ClassIndication: tmp, + } + return +} + +// SetPreviousClassDefinition sets the value of PreviousClassDefinition for the instance +func (instance *CIM_ClassModification) SetPropertyPreviousClassDefinition(value interface{}) (err error) { + return instance.SetProperty("PreviousClassDefinition", (value)) +} + +// GetPreviousClassDefinition gets the value of PreviousClassDefinition for the instance +func (instance *CIM_ClassModification) GetPropertyPreviousClassDefinition() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousClassDefinition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusterServiceAccessBySAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusterServiceAccessBySAP.go new file mode 100644 index 00000000..e748f5d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusterServiceAccessBySAP.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClusterServiceAccessBySAP struct +type CIM_ClusterServiceAccessBySAP struct { + *CIM_ServiceAccessBySAP +} + +func NewCIM_ClusterServiceAccessBySAPEx1(instance *cim.WmiInstance) (newInstance *CIM_ClusterServiceAccessBySAP, err error) { + tmp, err := NewCIM_ServiceAccessBySAPEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClusterServiceAccessBySAP{ + CIM_ServiceAccessBySAP: tmp, + } + return +} + +func NewCIM_ClusterServiceAccessBySAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClusterServiceAccessBySAP, err error) { + tmp, err := NewCIM_ServiceAccessBySAPEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClusterServiceAccessBySAP{ + CIM_ServiceAccessBySAP: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringSAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringSAP.go new file mode 100644 index 00000000..918bc55a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringSAP.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClusteringSAP struct +type CIM_ClusteringSAP struct { + *CIM_ServiceAccessPoint +} + +func NewCIM_ClusteringSAPEx1(instance *cim.WmiInstance) (newInstance *CIM_ClusteringSAP, err error) { + tmp, err := NewCIM_ServiceAccessPointEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClusteringSAP{ + CIM_ServiceAccessPoint: tmp, + } + return +} + +func NewCIM_ClusteringSAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClusteringSAP, err error) { + tmp, err := NewCIM_ServiceAccessPointEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClusteringSAP{ + CIM_ServiceAccessPoint: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringService.go new file mode 100644 index 00000000..35bc7781 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ClusteringService.go @@ -0,0 +1,78 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClusteringService struct +type CIM_ClusteringService struct { + *CIM_Service +} + +func NewCIM_ClusteringServiceEx1(instance *cim.WmiInstance) (newInstance *CIM_ClusteringService, err error) { + tmp, err := NewCIM_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClusteringService{ + CIM_Service: tmp, + } + return +} + +func NewCIM_ClusteringServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClusteringService, err error) { + tmp, err := NewCIM_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClusteringService{ + CIM_Service: tmp, + } + return +} + +// + +// + +// +func (instance *CIM_ClusteringService) AddNode( /* IN */ CS CIM_ComputerSystem) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AddNode", CS) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *CIM_ClusteringService) EvictNode( /* IN */ CS CIM_ComputerSystem) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EvictNode", CS) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedCollections.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedCollections.go new file mode 100644 index 00000000..618da1d6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedCollections.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CollectedCollections struct +type CIM_CollectedCollections struct { + *cim.WmiInstance + + // + Collection CIM_CollectionOfMSEs + + // + CollectionInCollection CIM_CollectionOfMSEs +} + +func NewCIM_CollectedCollectionsEx1(instance *cim.WmiInstance) (newInstance *CIM_CollectedCollections, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_CollectedCollections{ + WmiInstance: tmp, + } + return +} + +func NewCIM_CollectedCollectionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CollectedCollections, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CollectedCollections{ + WmiInstance: tmp, + } + return +} + +// SetCollection sets the value of Collection for the instance +func (instance *CIM_CollectedCollections) SetPropertyCollection(value CIM_CollectionOfMSEs) (err error) { + return instance.SetProperty("Collection", (value)) +} + +// GetCollection gets the value of Collection for the instance +func (instance *CIM_CollectedCollections) GetPropertyCollection() (value CIM_CollectionOfMSEs, err error) { + retValue, err := instance.GetProperty("Collection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CollectionOfMSEs) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CollectionOfMSEs is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CollectionOfMSEs(valuetmp) + + return +} + +// SetCollectionInCollection sets the value of CollectionInCollection for the instance +func (instance *CIM_CollectedCollections) SetPropertyCollectionInCollection(value CIM_CollectionOfMSEs) (err error) { + return instance.SetProperty("CollectionInCollection", (value)) +} + +// GetCollectionInCollection gets the value of CollectionInCollection for the instance +func (instance *CIM_CollectedCollections) GetPropertyCollectionInCollection() (value CIM_CollectionOfMSEs, err error) { + retValue, err := instance.GetProperty("CollectionInCollection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CollectionOfMSEs) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CollectionOfMSEs is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CollectionOfMSEs(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedMSEs.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedMSEs.go new file mode 100644 index 00000000..13e9813b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectedMSEs.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CollectedMSEs struct +type CIM_CollectedMSEs struct { + *cim.WmiInstance + + // + Collection CIM_CollectionOfMSEs + + // + Member CIM_ManagedSystemElement +} + +func NewCIM_CollectedMSEsEx1(instance *cim.WmiInstance) (newInstance *CIM_CollectedMSEs, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_CollectedMSEs{ + WmiInstance: tmp, + } + return +} + +func NewCIM_CollectedMSEsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CollectedMSEs, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CollectedMSEs{ + WmiInstance: tmp, + } + return +} + +// SetCollection sets the value of Collection for the instance +func (instance *CIM_CollectedMSEs) SetPropertyCollection(value CIM_CollectionOfMSEs) (err error) { + return instance.SetProperty("Collection", (value)) +} + +// GetCollection gets the value of Collection for the instance +func (instance *CIM_CollectedMSEs) GetPropertyCollection() (value CIM_CollectionOfMSEs, err error) { + retValue, err := instance.GetProperty("Collection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CollectionOfMSEs) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CollectionOfMSEs is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CollectionOfMSEs(valuetmp) + + return +} + +// SetMember sets the value of Member for the instance +func (instance *CIM_CollectedMSEs) SetPropertyMember(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Member", (value)) +} + +// GetMember gets the value of Member for the instance +func (instance *CIM_CollectedMSEs) GetPropertyMember() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Member") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfMSEs.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfMSEs.go new file mode 100644 index 00000000..c2bef697 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfMSEs.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CollectionOfMSEs struct +type CIM_CollectionOfMSEs struct { + *cim.WmiInstance + + // + Caption string + + // + CollectionID string + + // + Description string +} + +func NewCIM_CollectionOfMSEsEx1(instance *cim.WmiInstance) (newInstance *CIM_CollectionOfMSEs, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_CollectionOfMSEs{ + WmiInstance: tmp, + } + return +} + +func NewCIM_CollectionOfMSEsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CollectionOfMSEs, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CollectionOfMSEs{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_CollectionOfMSEs) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_CollectionOfMSEs) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCollectionID sets the value of CollectionID for the instance +func (instance *CIM_CollectionOfMSEs) SetPropertyCollectionID(value string) (err error) { + return instance.SetProperty("CollectionID", (value)) +} + +// GetCollectionID gets the value of CollectionID for the instance +func (instance *CIM_CollectionOfMSEs) GetPropertyCollectionID() (value string, err error) { + retValue, err := instance.GetProperty("CollectionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_CollectionOfMSEs) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_CollectionOfMSEs) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfSensors.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfSensors.go new file mode 100644 index 00000000..0f8566cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionOfSensors.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_CollectionOfSensors struct +type CIM_CollectionOfSensors struct { + *CIM_Component +} + +func NewCIM_CollectionOfSensorsEx1(instance *cim.WmiInstance) (newInstance *CIM_CollectionOfSensors, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CollectionOfSensors{ + CIM_Component: tmp, + } + return +} + +func NewCIM_CollectionOfSensorsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CollectionOfSensors, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CollectionOfSensors{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionSetting.go new file mode 100644 index 00000000..72900279 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CollectionSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CollectionSetting struct +type CIM_CollectionSetting struct { + *cim.WmiInstance + + // + Collection CIM_CollectionOfMSEs + + // + Setting CIM_Setting +} + +func NewCIM_CollectionSettingEx1(instance *cim.WmiInstance) (newInstance *CIM_CollectionSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_CollectionSetting{ + WmiInstance: tmp, + } + return +} + +func NewCIM_CollectionSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CollectionSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CollectionSetting{ + WmiInstance: tmp, + } + return +} + +// SetCollection sets the value of Collection for the instance +func (instance *CIM_CollectionSetting) SetPropertyCollection(value CIM_CollectionOfMSEs) (err error) { + return instance.SetProperty("Collection", (value)) +} + +// GetCollection gets the value of Collection for the instance +func (instance *CIM_CollectionSetting) GetPropertyCollection() (value CIM_CollectionOfMSEs, err error) { + retValue, err := instance.GetProperty("Collection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CollectionOfMSEs) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CollectionOfMSEs is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CollectionOfMSEs(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *CIM_CollectionSetting) SetPropertySetting(value CIM_Setting) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *CIM_CollectionSetting) GetPropertySetting() (value CIM_Setting, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Setting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Setting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Setting(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CompatibleProduct.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CompatibleProduct.go new file mode 100644 index 00000000..69b43fa7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CompatibleProduct.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CompatibleProduct struct +type CIM_CompatibleProduct struct { + *cim.WmiInstance + + // + CompatibilityDescription string + + // + CompatibleProduct CIM_Product + + // + Product CIM_Product +} + +func NewCIM_CompatibleProductEx1(instance *cim.WmiInstance) (newInstance *CIM_CompatibleProduct, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_CompatibleProduct{ + WmiInstance: tmp, + } + return +} + +func NewCIM_CompatibleProductEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CompatibleProduct, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CompatibleProduct{ + WmiInstance: tmp, + } + return +} + +// SetCompatibilityDescription sets the value of CompatibilityDescription for the instance +func (instance *CIM_CompatibleProduct) SetPropertyCompatibilityDescription(value string) (err error) { + return instance.SetProperty("CompatibilityDescription", (value)) +} + +// GetCompatibilityDescription gets the value of CompatibilityDescription for the instance +func (instance *CIM_CompatibleProduct) GetPropertyCompatibilityDescription() (value string, err error) { + retValue, err := instance.GetProperty("CompatibilityDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCompatibleProduct sets the value of CompatibleProduct for the instance +func (instance *CIM_CompatibleProduct) SetPropertyCompatibleProduct(value CIM_Product) (err error) { + return instance.SetProperty("CompatibleProduct", (value)) +} + +// GetCompatibleProduct gets the value of CompatibleProduct for the instance +func (instance *CIM_CompatibleProduct) GetPropertyCompatibleProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("CompatibleProduct") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} + +// SetProduct sets the value of Product for the instance +func (instance *CIM_CompatibleProduct) SetPropertyProduct(value CIM_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *CIM_CompatibleProduct) GetPropertyProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Component.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Component.go new file mode 100644 index 00000000..2794ad1b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Component.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Component struct +type CIM_Component struct { + *cim.WmiInstance + + // + GroupComponent CIM_ManagedSystemElement + + // + PartComponent CIM_ManagedSystemElement +} + +func NewCIM_ComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_Component, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Component{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Component, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Component{ + WmiInstance: tmp, + } + return +} + +// SetGroupComponent sets the value of GroupComponent for the instance +func (instance *CIM_Component) SetPropertyGroupComponent(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("GroupComponent", (value)) +} + +// GetGroupComponent gets the value of GroupComponent for the instance +func (instance *CIM_Component) GetPropertyGroupComponent() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("GroupComponent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} + +// SetPartComponent sets the value of PartComponent for the instance +func (instance *CIM_Component) SetPropertyPartComponent(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("PartComponent", (value)) +} + +// GetPartComponent gets the value of PartComponent for the instance +func (instance *CIM_Component) GetPropertyPartComponent() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("PartComponent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystem.go new file mode 100644 index 00000000..a7b1ac7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ComputerSystem struct +type CIM_ComputerSystem struct { + *CIM_System +} + +func NewCIM_ComputerSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_ComputerSystem, err error) { + tmp, err := NewCIM_SystemEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystem{ + CIM_System: tmp, + } + return +} + +func NewCIM_ComputerSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ComputerSystem, err error) { + tmp, err := NewCIM_SystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystem{ + CIM_System: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemDMA.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemDMA.go new file mode 100644 index 00000000..9aee0c4d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemDMA.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ComputerSystemDMA struct +type CIM_ComputerSystemDMA struct { + *CIM_ComputerSystemResource +} + +func NewCIM_ComputerSystemDMAEx1(instance *cim.WmiInstance) (newInstance *CIM_ComputerSystemDMA, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemDMA{ + CIM_ComputerSystemResource: tmp, + } + return +} + +func NewCIM_ComputerSystemDMAEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ComputerSystemDMA, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemDMA{ + CIM_ComputerSystemResource: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemIRQ.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemIRQ.go new file mode 100644 index 00000000..2daed631 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemIRQ.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ComputerSystemIRQ struct +type CIM_ComputerSystemIRQ struct { + *CIM_ComputerSystemResource +} + +func NewCIM_ComputerSystemIRQEx1(instance *cim.WmiInstance) (newInstance *CIM_ComputerSystemIRQ, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemIRQ{ + CIM_ComputerSystemResource: tmp, + } + return +} + +func NewCIM_ComputerSystemIRQEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ComputerSystemIRQ, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemIRQ{ + CIM_ComputerSystemResource: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemMappedIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemMappedIO.go new file mode 100644 index 00000000..445bdfa3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemMappedIO.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ComputerSystemMappedIO struct +type CIM_ComputerSystemMappedIO struct { + *CIM_ComputerSystemResource +} + +func NewCIM_ComputerSystemMappedIOEx1(instance *cim.WmiInstance) (newInstance *CIM_ComputerSystemMappedIO, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemMappedIO{ + CIM_ComputerSystemResource: tmp, + } + return +} + +func NewCIM_ComputerSystemMappedIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ComputerSystemMappedIO, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemMappedIO{ + CIM_ComputerSystemResource: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemPackage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemPackage.go new file mode 100644 index 00000000..5c35d9af --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemPackage.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ComputerSystemPackage struct +type CIM_ComputerSystemPackage struct { + *CIM_Dependency +} + +func NewCIM_ComputerSystemPackageEx1(instance *cim.WmiInstance) (newInstance *CIM_ComputerSystemPackage, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemPackage{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ComputerSystemPackageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ComputerSystemPackage, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemPackage{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemResource.go new file mode 100644 index 00000000..e21e2abb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ComputerSystemResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ComputerSystemResource struct +type CIM_ComputerSystemResource struct { + *CIM_SystemComponent +} + +func NewCIM_ComputerSystemResourceEx1(instance *cim.WmiInstance) (newInstance *CIM_ComputerSystemResource, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemResource{ + CIM_SystemComponent: tmp, + } + return +} + +func NewCIM_ComputerSystemResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ComputerSystemResource, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ComputerSystemResource{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Configuration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Configuration.go new file mode 100644 index 00000000..d8f3f984 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Configuration.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Configuration struct +type CIM_Configuration struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + Name string +} + +func NewCIM_ConfigurationEx1(instance *cim.WmiInstance) (newInstance *CIM_Configuration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Configuration{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Configuration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Configuration{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_Configuration) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_Configuration) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_Configuration) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_Configuration) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_Configuration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_Configuration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectedTo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectedTo.go new file mode 100644 index 00000000..d10449b2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectedTo.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ConnectedTo struct +type CIM_ConnectedTo struct { + *CIM_Dependency +} + +func NewCIM_ConnectedToEx1(instance *cim.WmiInstance) (newInstance *CIM_ConnectedTo, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ConnectedTo{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ConnectedToEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ConnectedTo, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ConnectedTo{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectorOnPackage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectorOnPackage.go new file mode 100644 index 00000000..1a48e3fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ConnectorOnPackage.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ConnectorOnPackage struct +type CIM_ConnectorOnPackage struct { + *CIM_Container +} + +func NewCIM_ConnectorOnPackageEx1(instance *cim.WmiInstance) (newInstance *CIM_ConnectorOnPackage, err error) { + tmp, err := NewCIM_ContainerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ConnectorOnPackage{ + CIM_Container: tmp, + } + return +} + +func NewCIM_ConnectorOnPackageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ConnectorOnPackage, err error) { + tmp, err := NewCIM_ContainerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ConnectorOnPackage{ + CIM_Container: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Container.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Container.go new file mode 100644 index 00000000..0277057d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Container.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Container struct +type CIM_Container struct { + *CIM_Component + + // + LocationWithinContainer string +} + +func NewCIM_ContainerEx1(instance *cim.WmiInstance) (newInstance *CIM_Container, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Container{ + CIM_Component: tmp, + } + return +} + +func NewCIM_ContainerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Container, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Container{ + CIM_Component: tmp, + } + return +} + +// SetLocationWithinContainer sets the value of LocationWithinContainer for the instance +func (instance *CIM_Container) SetPropertyLocationWithinContainer(value string) (err error) { + return instance.SetProperty("LocationWithinContainer", (value)) +} + +// GetLocationWithinContainer gets the value of LocationWithinContainer for the instance +func (instance *CIM_Container) GetPropertyLocationWithinContainer() (value string, err error) { + retValue, err := instance.GetProperty("LocationWithinContainer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ControlledBy.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ControlledBy.go new file mode 100644 index 00000000..25435347 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ControlledBy.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ControlledBy struct +type CIM_ControlledBy struct { + *CIM_DeviceConnection + + // + AccessState uint16 + + // + NumberOfHardResets uint32 + + // + NumberOfSoftResets uint32 +} + +func NewCIM_ControlledByEx1(instance *cim.WmiInstance) (newInstance *CIM_ControlledBy, err error) { + tmp, err := NewCIM_DeviceConnectionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ControlledBy{ + CIM_DeviceConnection: tmp, + } + return +} + +func NewCIM_ControlledByEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ControlledBy, err error) { + tmp, err := NewCIM_DeviceConnectionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ControlledBy{ + CIM_DeviceConnection: tmp, + } + return +} + +// SetAccessState sets the value of AccessState for the instance +func (instance *CIM_ControlledBy) SetPropertyAccessState(value uint16) (err error) { + return instance.SetProperty("AccessState", (value)) +} + +// GetAccessState gets the value of AccessState for the instance +func (instance *CIM_ControlledBy) GetPropertyAccessState() (value uint16, err error) { + retValue, err := instance.GetProperty("AccessState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfHardResets sets the value of NumberOfHardResets for the instance +func (instance *CIM_ControlledBy) SetPropertyNumberOfHardResets(value uint32) (err error) { + return instance.SetProperty("NumberOfHardResets", (value)) +} + +// GetNumberOfHardResets gets the value of NumberOfHardResets for the instance +func (instance *CIM_ControlledBy) GetPropertyNumberOfHardResets() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfHardResets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSoftResets sets the value of NumberOfSoftResets for the instance +func (instance *CIM_ControlledBy) SetPropertyNumberOfSoftResets(value uint32) (err error) { + return instance.SetProperty("NumberOfSoftResets", (value)) +} + +// GetNumberOfSoftResets gets the value of NumberOfSoftResets for the instance +func (instance *CIM_ControlledBy) GetPropertyNumberOfSoftResets() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSoftResets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Controller.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Controller.go new file mode 100644 index 00000000..fce75c2b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Controller.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Controller struct +type CIM_Controller struct { + *CIM_LogicalDevice + + // + MaxNumberControlled uint32 + + // + ProtocolSupported uint16 + + // + TimeOfLastReset string +} + +func NewCIM_ControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_Controller, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Controller{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_ControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Controller, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Controller{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetMaxNumberControlled sets the value of MaxNumberControlled for the instance +func (instance *CIM_Controller) SetPropertyMaxNumberControlled(value uint32) (err error) { + return instance.SetProperty("MaxNumberControlled", (value)) +} + +// GetMaxNumberControlled gets the value of MaxNumberControlled for the instance +func (instance *CIM_Controller) GetPropertyMaxNumberControlled() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxNumberControlled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocolSupported sets the value of ProtocolSupported for the instance +func (instance *CIM_Controller) SetPropertyProtocolSupported(value uint16) (err error) { + return instance.SetProperty("ProtocolSupported", (value)) +} + +// GetProtocolSupported gets the value of ProtocolSupported for the instance +func (instance *CIM_Controller) GetPropertyProtocolSupported() (value uint16, err error) { + retValue, err := instance.GetProperty("ProtocolSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTimeOfLastReset sets the value of TimeOfLastReset for the instance +func (instance *CIM_Controller) SetPropertyTimeOfLastReset(value string) (err error) { + return instance.SetProperty("TimeOfLastReset", (value)) +} + +// GetTimeOfLastReset gets the value of TimeOfLastReset for the instance +func (instance *CIM_Controller) GetPropertyTimeOfLastReset() (value string, err error) { + retValue, err := instance.GetProperty("TimeOfLastReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CoolingDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CoolingDevice.go new file mode 100644 index 00000000..f0d2f85d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CoolingDevice.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CoolingDevice struct +type CIM_CoolingDevice struct { + *CIM_LogicalDevice + + // + ActiveCooling bool +} + +func NewCIM_CoolingDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_CoolingDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CoolingDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_CoolingDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CoolingDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CoolingDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetActiveCooling sets the value of ActiveCooling for the instance +func (instance *CIM_CoolingDevice) SetPropertyActiveCooling(value bool) (err error) { + return instance.SetProperty("ActiveCooling", (value)) +} + +// GetActiveCooling gets the value of ActiveCooling for the instance +func (instance *CIM_CoolingDevice) GetPropertyActiveCooling() (value bool, err error) { + retValue, err := instance.GetProperty("ActiveCooling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CopyFileAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CopyFileAction.go new file mode 100644 index 00000000..6734be43 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CopyFileAction.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_CopyFileAction struct +type CIM_CopyFileAction struct { + *CIM_FileAction + + // + DeleteAfterCopy bool + + // + Destination string + + // + Source string +} + +func NewCIM_CopyFileActionEx1(instance *cim.WmiInstance) (newInstance *CIM_CopyFileAction, err error) { + tmp, err := NewCIM_FileActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CopyFileAction{ + CIM_FileAction: tmp, + } + return +} + +func NewCIM_CopyFileActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CopyFileAction, err error) { + tmp, err := NewCIM_FileActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CopyFileAction{ + CIM_FileAction: tmp, + } + return +} + +// SetDeleteAfterCopy sets the value of DeleteAfterCopy for the instance +func (instance *CIM_CopyFileAction) SetPropertyDeleteAfterCopy(value bool) (err error) { + return instance.SetProperty("DeleteAfterCopy", (value)) +} + +// GetDeleteAfterCopy gets the value of DeleteAfterCopy for the instance +func (instance *CIM_CopyFileAction) GetPropertyDeleteAfterCopy() (value bool, err error) { + retValue, err := instance.GetProperty("DeleteAfterCopy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDestination sets the value of Destination for the instance +func (instance *CIM_CopyFileAction) SetPropertyDestination(value string) (err error) { + return instance.SetProperty("Destination", (value)) +} + +// GetDestination gets the value of Destination for the instance +func (instance *CIM_CopyFileAction) GetPropertyDestination() (value string, err error) { + retValue, err := instance.GetProperty("Destination") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSource sets the value of Source for the instance +func (instance *CIM_CopyFileAction) SetPropertySource(value string) (err error) { + return instance.SetProperty("Source", (value)) +} + +// GetSource gets the value of Source for the instance +func (instance *CIM_CopyFileAction) GetPropertySource() (value string, err error) { + retValue, err := instance.GetProperty("Source") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CreateDirectoryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CreateDirectoryAction.go new file mode 100644 index 00000000..6fb4d44a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CreateDirectoryAction.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_CreateDirectoryAction struct +type CIM_CreateDirectoryAction struct { + *CIM_DirectoryAction +} + +func NewCIM_CreateDirectoryActionEx1(instance *cim.WmiInstance) (newInstance *CIM_CreateDirectoryAction, err error) { + tmp, err := NewCIM_DirectoryActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CreateDirectoryAction{ + CIM_DirectoryAction: tmp, + } + return +} + +func NewCIM_CreateDirectoryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CreateDirectoryAction, err error) { + tmp, err := NewCIM_DirectoryActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CreateDirectoryAction{ + CIM_DirectoryAction: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CurrentSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CurrentSensor.go new file mode 100644 index 00000000..f4bff7da --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_CurrentSensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_CurrentSensor struct +type CIM_CurrentSensor struct { + *CIM_NumericSensor +} + +func NewCIM_CurrentSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_CurrentSensor, err error) { + tmp, err := NewCIM_NumericSensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_CurrentSensor{ + CIM_NumericSensor: tmp, + } + return +} + +func NewCIM_CurrentSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_CurrentSensor, err error) { + tmp, err := NewCIM_NumericSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_CurrentSensor{ + CIM_NumericSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DMA.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DMA.go new file mode 100644 index 00000000..60d3907e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DMA.go @@ -0,0 +1,441 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DMA struct +type CIM_DMA struct { + *CIM_SystemResource + + // + AddressSize uint16 + + // + Availability uint16 + + // + BurstMode bool + + // + ByteMode uint16 + + // + ChannelTiming uint16 + + // + CreationClassName string + + // + CSCreationClassName string + + // + CSName string + + // + DMAChannel uint32 + + // + MaxTransferSize uint32 + + // + TransferWidths []uint16 + + // + TypeCTiming uint16 + + // + WordMode uint16 +} + +func NewCIM_DMAEx1(instance *cim.WmiInstance) (newInstance *CIM_DMA, err error) { + tmp, err := NewCIM_SystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DMA{ + CIM_SystemResource: tmp, + } + return +} + +func NewCIM_DMAEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DMA, err error) { + tmp, err := NewCIM_SystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DMA{ + CIM_SystemResource: tmp, + } + return +} + +// SetAddressSize sets the value of AddressSize for the instance +func (instance *CIM_DMA) SetPropertyAddressSize(value uint16) (err error) { + return instance.SetProperty("AddressSize", (value)) +} + +// GetAddressSize gets the value of AddressSize for the instance +func (instance *CIM_DMA) GetPropertyAddressSize() (value uint16, err error) { + retValue, err := instance.GetProperty("AddressSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAvailability sets the value of Availability for the instance +func (instance *CIM_DMA) SetPropertyAvailability(value uint16) (err error) { + return instance.SetProperty("Availability", (value)) +} + +// GetAvailability gets the value of Availability for the instance +func (instance *CIM_DMA) GetPropertyAvailability() (value uint16, err error) { + retValue, err := instance.GetProperty("Availability") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetBurstMode sets the value of BurstMode for the instance +func (instance *CIM_DMA) SetPropertyBurstMode(value bool) (err error) { + return instance.SetProperty("BurstMode", (value)) +} + +// GetBurstMode gets the value of BurstMode for the instance +func (instance *CIM_DMA) GetPropertyBurstMode() (value bool, err error) { + retValue, err := instance.GetProperty("BurstMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetByteMode sets the value of ByteMode for the instance +func (instance *CIM_DMA) SetPropertyByteMode(value uint16) (err error) { + return instance.SetProperty("ByteMode", (value)) +} + +// GetByteMode gets the value of ByteMode for the instance +func (instance *CIM_DMA) GetPropertyByteMode() (value uint16, err error) { + retValue, err := instance.GetProperty("ByteMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetChannelTiming sets the value of ChannelTiming for the instance +func (instance *CIM_DMA) SetPropertyChannelTiming(value uint16) (err error) { + return instance.SetProperty("ChannelTiming", (value)) +} + +// GetChannelTiming gets the value of ChannelTiming for the instance +func (instance *CIM_DMA) GetPropertyChannelTiming() (value uint16, err error) { + retValue, err := instance.GetProperty("ChannelTiming") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_DMA) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_DMA) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_DMA) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_DMA) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_DMA) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_DMA) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDMAChannel sets the value of DMAChannel for the instance +func (instance *CIM_DMA) SetPropertyDMAChannel(value uint32) (err error) { + return instance.SetProperty("DMAChannel", (value)) +} + +// GetDMAChannel gets the value of DMAChannel for the instance +func (instance *CIM_DMA) GetPropertyDMAChannel() (value uint32, err error) { + retValue, err := instance.GetProperty("DMAChannel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxTransferSize sets the value of MaxTransferSize for the instance +func (instance *CIM_DMA) SetPropertyMaxTransferSize(value uint32) (err error) { + return instance.SetProperty("MaxTransferSize", (value)) +} + +// GetMaxTransferSize gets the value of MaxTransferSize for the instance +func (instance *CIM_DMA) GetPropertyMaxTransferSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxTransferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransferWidths sets the value of TransferWidths for the instance +func (instance *CIM_DMA) SetPropertyTransferWidths(value []uint16) (err error) { + return instance.SetProperty("TransferWidths", (value)) +} + +// GetTransferWidths gets the value of TransferWidths for the instance +func (instance *CIM_DMA) GetPropertyTransferWidths() (value []uint16, err error) { + retValue, err := instance.GetProperty("TransferWidths") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetTypeCTiming sets the value of TypeCTiming for the instance +func (instance *CIM_DMA) SetPropertyTypeCTiming(value uint16) (err error) { + return instance.SetProperty("TypeCTiming", (value)) +} + +// GetTypeCTiming gets the value of TypeCTiming for the instance +func (instance *CIM_DMA) GetPropertyTypeCTiming() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeCTiming") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWordMode sets the value of WordMode for the instance +func (instance *CIM_DMA) SetPropertyWordMode(value uint16) (err error) { + return instance.SetProperty("WordMode", (value)) +} + +// GetWordMode gets the value of WordMode for the instance +func (instance *CIM_DMA) GetPropertyWordMode() (value uint16, err error) { + retValue, err := instance.GetProperty("WordMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DataFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DataFile.go new file mode 100644 index 00000000..ef7108bb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DataFile.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DataFile struct +type CIM_DataFile struct { + *CIM_LogicalFile + + // + Manufacturer string + + // + Version string +} + +func NewCIM_DataFileEx1(instance *cim.WmiInstance) (newInstance *CIM_DataFile, err error) { + tmp, err := NewCIM_LogicalFileEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DataFile{ + CIM_LogicalFile: tmp, + } + return +} + +func NewCIM_DataFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DataFile, err error) { + tmp, err := NewCIM_LogicalFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DataFile{ + CIM_LogicalFile: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *CIM_DataFile) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *CIM_DataFile) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_DataFile) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_DataFile) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Dependency.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Dependency.go new file mode 100644 index 00000000..78beaf26 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Dependency.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Dependency struct +type CIM_Dependency struct { + *cim.WmiInstance + + // + Antecedent CIM_ManagedSystemElement + + // + Dependent CIM_ManagedSystemElement +} + +func NewCIM_DependencyEx1(instance *cim.WmiInstance) (newInstance *CIM_Dependency, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Dependency{ + WmiInstance: tmp, + } + return +} + +func NewCIM_DependencyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Dependency, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Dependency{ + WmiInstance: tmp, + } + return +} + +// SetAntecedent sets the value of Antecedent for the instance +func (instance *CIM_Dependency) SetPropertyAntecedent(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Antecedent", (value)) +} + +// GetAntecedent gets the value of Antecedent for the instance +func (instance *CIM_Dependency) GetPropertyAntecedent() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Antecedent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} + +// SetDependent sets the value of Dependent for the instance +func (instance *CIM_Dependency) SetPropertyDependent(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Dependent", (value)) +} + +// GetDependent gets the value of Dependent for the instance +func (instance *CIM_Dependency) GetPropertyDependent() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Dependent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DependencyContext.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DependencyContext.go new file mode 100644 index 00000000..4f6ed1e5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DependencyContext.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DependencyContext struct +type CIM_DependencyContext struct { + *cim.WmiInstance + + // + Context CIM_Configuration + + // + Dependency CIM_Dependency +} + +func NewCIM_DependencyContextEx1(instance *cim.WmiInstance) (newInstance *CIM_DependencyContext, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_DependencyContext{ + WmiInstance: tmp, + } + return +} + +func NewCIM_DependencyContextEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DependencyContext, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DependencyContext{ + WmiInstance: tmp, + } + return +} + +// SetContext sets the value of Context for the instance +func (instance *CIM_DependencyContext) SetPropertyContext(value CIM_Configuration) (err error) { + return instance.SetProperty("Context", (value)) +} + +// GetContext gets the value of Context for the instance +func (instance *CIM_DependencyContext) GetPropertyContext() (value CIM_Configuration, err error) { + retValue, err := instance.GetProperty("Context") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Configuration) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Configuration is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Configuration(valuetmp) + + return +} + +// SetDependency sets the value of Dependency for the instance +func (instance *CIM_DependencyContext) SetPropertyDependency(value CIM_Dependency) (err error) { + return instance.SetProperty("Dependency", (value)) +} + +// GetDependency gets the value of Dependency for the instance +func (instance *CIM_DependencyContext) GetPropertyDependency() (value CIM_Dependency, err error) { + retValue, err := instance.GetProperty("Dependency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Dependency) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Dependency is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Dependency(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DesktopMonitor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DesktopMonitor.go new file mode 100644 index 00000000..f5a618a3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DesktopMonitor.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DesktopMonitor struct +type CIM_DesktopMonitor struct { + *CIM_Display + + // + Bandwidth uint32 + + // + DisplayType uint16 + + // + ScreenHeight uint32 + + // + ScreenWidth uint32 +} + +func NewCIM_DesktopMonitorEx1(instance *cim.WmiInstance) (newInstance *CIM_DesktopMonitor, err error) { + tmp, err := NewCIM_DisplayEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DesktopMonitor{ + CIM_Display: tmp, + } + return +} + +func NewCIM_DesktopMonitorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DesktopMonitor, err error) { + tmp, err := NewCIM_DisplayEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DesktopMonitor{ + CIM_Display: tmp, + } + return +} + +// SetBandwidth sets the value of Bandwidth for the instance +func (instance *CIM_DesktopMonitor) SetPropertyBandwidth(value uint32) (err error) { + return instance.SetProperty("Bandwidth", (value)) +} + +// GetBandwidth gets the value of Bandwidth for the instance +func (instance *CIM_DesktopMonitor) GetPropertyBandwidth() (value uint32, err error) { + retValue, err := instance.GetProperty("Bandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDisplayType sets the value of DisplayType for the instance +func (instance *CIM_DesktopMonitor) SetPropertyDisplayType(value uint16) (err error) { + return instance.SetProperty("DisplayType", (value)) +} + +// GetDisplayType gets the value of DisplayType for the instance +func (instance *CIM_DesktopMonitor) GetPropertyDisplayType() (value uint16, err error) { + retValue, err := instance.GetProperty("DisplayType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetScreenHeight sets the value of ScreenHeight for the instance +func (instance *CIM_DesktopMonitor) SetPropertyScreenHeight(value uint32) (err error) { + return instance.SetProperty("ScreenHeight", (value)) +} + +// GetScreenHeight gets the value of ScreenHeight for the instance +func (instance *CIM_DesktopMonitor) GetPropertyScreenHeight() (value uint32, err error) { + retValue, err := instance.GetProperty("ScreenHeight") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScreenWidth sets the value of ScreenWidth for the instance +func (instance *CIM_DesktopMonitor) SetPropertyScreenWidth(value uint32) (err error) { + return instance.SetProperty("ScreenWidth", (value)) +} + +// GetScreenWidth gets the value of ScreenWidth for the instance +func (instance *CIM_DesktopMonitor) GetPropertyScreenWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("ScreenWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceAccessedByFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceAccessedByFile.go new file mode 100644 index 00000000..692cd418 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceAccessedByFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DeviceAccessedByFile struct +type CIM_DeviceAccessedByFile struct { + *CIM_Dependency +} + +func NewCIM_DeviceAccessedByFileEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceAccessedByFile, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceAccessedByFile{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_DeviceAccessedByFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceAccessedByFile, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceAccessedByFile{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceConnection.go new file mode 100644 index 00000000..030a9607 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceConnection.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DeviceConnection struct +type CIM_DeviceConnection struct { + *CIM_Dependency + + // + NegotiatedDataWidth uint32 + + // + NegotiatedSpeed uint64 +} + +func NewCIM_DeviceConnectionEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceConnection, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceConnection{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_DeviceConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceConnection, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceConnection{ + CIM_Dependency: tmp, + } + return +} + +// SetNegotiatedDataWidth sets the value of NegotiatedDataWidth for the instance +func (instance *CIM_DeviceConnection) SetPropertyNegotiatedDataWidth(value uint32) (err error) { + return instance.SetProperty("NegotiatedDataWidth", (value)) +} + +// GetNegotiatedDataWidth gets the value of NegotiatedDataWidth for the instance +func (instance *CIM_DeviceConnection) GetPropertyNegotiatedDataWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("NegotiatedDataWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNegotiatedSpeed sets the value of NegotiatedSpeed for the instance +func (instance *CIM_DeviceConnection) SetPropertyNegotiatedSpeed(value uint64) (err error) { + return instance.SetProperty("NegotiatedSpeed", (value)) +} + +// GetNegotiatedSpeed gets the value of NegotiatedSpeed for the instance +func (instance *CIM_DeviceConnection) GetPropertyNegotiatedSpeed() (value uint64, err error) { + retValue, err := instance.GetProperty("NegotiatedSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceErrorCounts.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceErrorCounts.go new file mode 100644 index 00000000..f2b7f07a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceErrorCounts.go @@ -0,0 +1,335 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DeviceErrorCounts struct +type CIM_DeviceErrorCounts struct { + *CIM_StatisticalInformation + + // + CriticalErrorCount uint64 + + // + DeviceCreationClassName string + + // + DeviceID string + + // + IndeterminateErrorCount uint64 + + // + MajorErrorCount uint64 + + // + MinorErrorCount uint64 + + // + SystemCreationClassName string + + // + SystemName string + + // + WarningCount uint64 +} + +func NewCIM_DeviceErrorCountsEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceErrorCounts, err error) { + tmp, err := NewCIM_StatisticalInformationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceErrorCounts{ + CIM_StatisticalInformation: tmp, + } + return +} + +func NewCIM_DeviceErrorCountsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceErrorCounts, err error) { + tmp, err := NewCIM_StatisticalInformationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceErrorCounts{ + CIM_StatisticalInformation: tmp, + } + return +} + +// SetCriticalErrorCount sets the value of CriticalErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyCriticalErrorCount(value uint64) (err error) { + return instance.SetProperty("CriticalErrorCount", (value)) +} + +// GetCriticalErrorCount gets the value of CriticalErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyCriticalErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CriticalErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceCreationClassName sets the value of DeviceCreationClassName for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyDeviceCreationClassName(value string) (err error) { + return instance.SetProperty("DeviceCreationClassName", (value)) +} + +// GetDeviceCreationClassName gets the value of DeviceCreationClassName for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyDeviceCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("DeviceCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceID sets the value of DeviceID for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyDeviceID(value string) (err error) { + return instance.SetProperty("DeviceID", (value)) +} + +// GetDeviceID gets the value of DeviceID for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyDeviceID() (value string, err error) { + retValue, err := instance.GetProperty("DeviceID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndeterminateErrorCount sets the value of IndeterminateErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyIndeterminateErrorCount(value uint64) (err error) { + return instance.SetProperty("IndeterminateErrorCount", (value)) +} + +// GetIndeterminateErrorCount gets the value of IndeterminateErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyIndeterminateErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("IndeterminateErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMajorErrorCount sets the value of MajorErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyMajorErrorCount(value uint64) (err error) { + return instance.SetProperty("MajorErrorCount", (value)) +} + +// GetMajorErrorCount gets the value of MajorErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyMajorErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("MajorErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMinorErrorCount sets the value of MinorErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyMinorErrorCount(value uint64) (err error) { + return instance.SetProperty("MinorErrorCount", (value)) +} + +// GetMinorErrorCount gets the value of MinorErrorCount for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyMinorErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("MinorErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCreationClassName sets the value of SystemCreationClassName for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertySystemCreationClassName(value string) (err error) { + return instance.SetProperty("SystemCreationClassName", (value)) +} + +// GetSystemCreationClassName gets the value of SystemCreationClassName for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertySystemCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("SystemCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemName sets the value of SystemName for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertySystemName(value string) (err error) { + return instance.SetProperty("SystemName", (value)) +} + +// GetSystemName gets the value of SystemName for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertySystemName() (value string, err error) { + retValue, err := instance.GetProperty("SystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWarningCount sets the value of WarningCount for the instance +func (instance *CIM_DeviceErrorCounts) SetPropertyWarningCount(value uint64) (err error) { + return instance.SetProperty("WarningCount", (value)) +} + +// GetWarningCount gets the value of WarningCount for the instance +func (instance *CIM_DeviceErrorCounts) GetPropertyWarningCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WarningCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// + +// +func (instance *CIM_DeviceErrorCounts) ResetCounter( /* IN */ SelectedCounter uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ResetCounter", SelectedCounter) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceFile.go new file mode 100644 index 00000000..48e2669a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DeviceFile struct +type CIM_DeviceFile struct { + *CIM_LogicalFile +} + +func NewCIM_DeviceFileEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceFile, err error) { + tmp, err := NewCIM_LogicalFileEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceFile{ + CIM_LogicalFile: tmp, + } + return +} + +func NewCIM_DeviceFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceFile, err error) { + tmp, err := NewCIM_LogicalFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceFile{ + CIM_LogicalFile: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSAPImplementation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSAPImplementation.go new file mode 100644 index 00000000..54425c6d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSAPImplementation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DeviceSAPImplementation struct +type CIM_DeviceSAPImplementation struct { + *CIM_Dependency +} + +func NewCIM_DeviceSAPImplementationEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceSAPImplementation, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceSAPImplementation{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_DeviceSAPImplementationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceSAPImplementation, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceSAPImplementation{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceServiceImplementation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceServiceImplementation.go new file mode 100644 index 00000000..6e395403 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceServiceImplementation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DeviceServiceImplementation struct +type CIM_DeviceServiceImplementation struct { + *CIM_Dependency +} + +func NewCIM_DeviceServiceImplementationEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceServiceImplementation, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceServiceImplementation{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_DeviceServiceImplementationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceServiceImplementation, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceServiceImplementation{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSoftware.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSoftware.go new file mode 100644 index 00000000..1e744cf7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DeviceSoftware.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DeviceSoftware struct +type CIM_DeviceSoftware struct { + *CIM_Dependency + + // + Purpose uint16 + + // + PurposeDescription string +} + +func NewCIM_DeviceSoftwareEx1(instance *cim.WmiInstance) (newInstance *CIM_DeviceSoftware, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DeviceSoftware{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_DeviceSoftwareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DeviceSoftware, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DeviceSoftware{ + CIM_Dependency: tmp, + } + return +} + +// SetPurpose sets the value of Purpose for the instance +func (instance *CIM_DeviceSoftware) SetPropertyPurpose(value uint16) (err error) { + return instance.SetProperty("Purpose", (value)) +} + +// GetPurpose gets the value of Purpose for the instance +func (instance *CIM_DeviceSoftware) GetPropertyPurpose() (value uint16, err error) { + retValue, err := instance.GetProperty("Purpose") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPurposeDescription sets the value of PurposeDescription for the instance +func (instance *CIM_DeviceSoftware) SetPropertyPurposeDescription(value string) (err error) { + return instance.SetProperty("PurposeDescription", (value)) +} + +// GetPurposeDescription gets the value of PurposeDescription for the instance +func (instance *CIM_DeviceSoftware) GetPropertyPurposeDescription() (value string, err error) { + retValue, err := instance.GetProperty("PurposeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Directory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Directory.go new file mode 100644 index 00000000..df0754a4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Directory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Directory struct +type CIM_Directory struct { + *CIM_LogicalFile +} + +func NewCIM_DirectoryEx1(instance *cim.WmiInstance) (newInstance *CIM_Directory, err error) { + tmp, err := NewCIM_LogicalFileEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Directory{ + CIM_LogicalFile: tmp, + } + return +} + +func NewCIM_DirectoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Directory, err error) { + tmp, err := NewCIM_LogicalFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Directory{ + CIM_LogicalFile: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryAction.go new file mode 100644 index 00000000..e51fa6d8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryAction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DirectoryAction struct +type CIM_DirectoryAction struct { + *CIM_Action + + // + DirectoryName string +} + +func NewCIM_DirectoryActionEx1(instance *cim.WmiInstance) (newInstance *CIM_DirectoryAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DirectoryAction{ + CIM_Action: tmp, + } + return +} + +func NewCIM_DirectoryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DirectoryAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DirectoryAction{ + CIM_Action: tmp, + } + return +} + +// SetDirectoryName sets the value of DirectoryName for the instance +func (instance *CIM_DirectoryAction) SetPropertyDirectoryName(value string) (err error) { + return instance.SetProperty("DirectoryName", (value)) +} + +// GetDirectoryName gets the value of DirectoryName for the instance +func (instance *CIM_DirectoryAction) GetPropertyDirectoryName() (value string, err error) { + retValue, err := instance.GetProperty("DirectoryName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryContainsFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryContainsFile.go new file mode 100644 index 00000000..6e3837dc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectoryContainsFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DirectoryContainsFile struct +type CIM_DirectoryContainsFile struct { + *CIM_Component +} + +func NewCIM_DirectoryContainsFileEx1(instance *cim.WmiInstance) (newInstance *CIM_DirectoryContainsFile, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DirectoryContainsFile{ + CIM_Component: tmp, + } + return +} + +func NewCIM_DirectoryContainsFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DirectoryContainsFile, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DirectoryContainsFile{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecification.go new file mode 100644 index 00000000..377dee85 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecification.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DirectorySpecification struct +type CIM_DirectorySpecification struct { + *CIM_Check + + // + DirectoryPath string + + // + DirectoryType uint16 +} + +func NewCIM_DirectorySpecificationEx1(instance *cim.WmiInstance) (newInstance *CIM_DirectorySpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DirectorySpecification{ + CIM_Check: tmp, + } + return +} + +func NewCIM_DirectorySpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DirectorySpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DirectorySpecification{ + CIM_Check: tmp, + } + return +} + +// SetDirectoryPath sets the value of DirectoryPath for the instance +func (instance *CIM_DirectorySpecification) SetPropertyDirectoryPath(value string) (err error) { + return instance.SetProperty("DirectoryPath", (value)) +} + +// GetDirectoryPath gets the value of DirectoryPath for the instance +func (instance *CIM_DirectorySpecification) GetPropertyDirectoryPath() (value string, err error) { + retValue, err := instance.GetProperty("DirectoryPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDirectoryType sets the value of DirectoryType for the instance +func (instance *CIM_DirectorySpecification) SetPropertyDirectoryType(value uint16) (err error) { + return instance.SetProperty("DirectoryType", (value)) +} + +// GetDirectoryType gets the value of DirectoryType for the instance +func (instance *CIM_DirectorySpecification) GetPropertyDirectoryType() (value uint16, err error) { + retValue, err := instance.GetProperty("DirectoryType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecificationFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecificationFile.go new file mode 100644 index 00000000..23c5ed7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DirectorySpecificationFile.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DirectorySpecificationFile struct +type CIM_DirectorySpecificationFile struct { + *cim.WmiInstance + + // + DirectorySpecification CIM_DirectorySpecification + + // + FileSpecification CIM_FileSpecification +} + +func NewCIM_DirectorySpecificationFileEx1(instance *cim.WmiInstance) (newInstance *CIM_DirectorySpecificationFile, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_DirectorySpecificationFile{ + WmiInstance: tmp, + } + return +} + +func NewCIM_DirectorySpecificationFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DirectorySpecificationFile, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DirectorySpecificationFile{ + WmiInstance: tmp, + } + return +} + +// SetDirectorySpecification sets the value of DirectorySpecification for the instance +func (instance *CIM_DirectorySpecificationFile) SetPropertyDirectorySpecification(value CIM_DirectorySpecification) (err error) { + return instance.SetProperty("DirectorySpecification", (value)) +} + +// GetDirectorySpecification gets the value of DirectorySpecification for the instance +func (instance *CIM_DirectorySpecificationFile) GetPropertyDirectorySpecification() (value CIM_DirectorySpecification, err error) { + retValue, err := instance.GetProperty("DirectorySpecification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_DirectorySpecification) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_DirectorySpecification is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_DirectorySpecification(valuetmp) + + return +} + +// SetFileSpecification sets the value of FileSpecification for the instance +func (instance *CIM_DirectorySpecificationFile) SetPropertyFileSpecification(value CIM_FileSpecification) (err error) { + return instance.SetProperty("FileSpecification", (value)) +} + +// GetFileSpecification gets the value of FileSpecification for the instance +func (instance *CIM_DirectorySpecificationFile) GetPropertyFileSpecification() (value CIM_FileSpecification, err error) { + retValue, err := instance.GetProperty("FileSpecification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_FileSpecification) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_FileSpecification is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_FileSpecification(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiscreteSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiscreteSensor.go new file mode 100644 index 00000000..6f721aca --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiscreteSensor.go @@ -0,0 +1,142 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DiscreteSensor struct +type CIM_DiscreteSensor struct { + *CIM_Sensor + + // + AcceptableValues []string + + // + CurrentReading string + + // + PossibleValues []string +} + +func NewCIM_DiscreteSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_DiscreteSensor, err error) { + tmp, err := NewCIM_SensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DiscreteSensor{ + CIM_Sensor: tmp, + } + return +} + +func NewCIM_DiscreteSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DiscreteSensor, err error) { + tmp, err := NewCIM_SensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DiscreteSensor{ + CIM_Sensor: tmp, + } + return +} + +// SetAcceptableValues sets the value of AcceptableValues for the instance +func (instance *CIM_DiscreteSensor) SetPropertyAcceptableValues(value []string) (err error) { + return instance.SetProperty("AcceptableValues", (value)) +} + +// GetAcceptableValues gets the value of AcceptableValues for the instance +func (instance *CIM_DiscreteSensor) GetPropertyAcceptableValues() (value []string, err error) { + retValue, err := instance.GetProperty("AcceptableValues") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCurrentReading sets the value of CurrentReading for the instance +func (instance *CIM_DiscreteSensor) SetPropertyCurrentReading(value string) (err error) { + return instance.SetProperty("CurrentReading", (value)) +} + +// GetCurrentReading gets the value of CurrentReading for the instance +func (instance *CIM_DiscreteSensor) GetPropertyCurrentReading() (value string, err error) { + retValue, err := instance.GetProperty("CurrentReading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPossibleValues sets the value of PossibleValues for the instance +func (instance *CIM_DiscreteSensor) SetPropertyPossibleValues(value []string) (err error) { + return instance.SetProperty("PossibleValues", (value)) +} + +// GetPossibleValues gets the value of PossibleValues for the instance +func (instance *CIM_DiscreteSensor) GetPropertyPossibleValues() (value []string, err error) { + retValue, err := instance.GetProperty("PossibleValues") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskDrive.go new file mode 100644 index 00000000..528c4e79 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskDrive.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DiskDrive struct +type CIM_DiskDrive struct { + *CIM_MediaAccessDevice +} + +func NewCIM_DiskDriveEx1(instance *cim.WmiInstance) (newInstance *CIM_DiskDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DiskDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +func NewCIM_DiskDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DiskDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DiskDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskPartition.go new file mode 100644 index 00000000..f5051472 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskPartition.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DiskPartition struct +type CIM_DiskPartition struct { + *CIM_StorageExtent + + // + Bootable bool + + // + PrimaryPartition bool +} + +func NewCIM_DiskPartitionEx1(instance *cim.WmiInstance) (newInstance *CIM_DiskPartition, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DiskPartition{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_DiskPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DiskPartition, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DiskPartition{ + CIM_StorageExtent: tmp, + } + return +} + +// SetBootable sets the value of Bootable for the instance +func (instance *CIM_DiskPartition) SetPropertyBootable(value bool) (err error) { + return instance.SetProperty("Bootable", (value)) +} + +// GetBootable gets the value of Bootable for the instance +func (instance *CIM_DiskPartition) GetPropertyBootable() (value bool, err error) { + retValue, err := instance.GetProperty("Bootable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPrimaryPartition sets the value of PrimaryPartition for the instance +func (instance *CIM_DiskPartition) SetPropertyPrimaryPartition(value bool) (err error) { + return instance.SetProperty("PrimaryPartition", (value)) +} + +// GetPrimaryPartition gets the value of PrimaryPartition for the instance +func (instance *CIM_DiskPartition) GetPropertyPrimaryPartition() (value bool, err error) { + retValue, err := instance.GetProperty("PrimaryPartition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskSpaceCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskSpaceCheck.go new file mode 100644 index 00000000..ce645ac3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DiskSpaceCheck.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_DiskSpaceCheck struct +type CIM_DiskSpaceCheck struct { + *CIM_Check + + // + AvailableDiskSpace uint64 +} + +func NewCIM_DiskSpaceCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_DiskSpaceCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DiskSpaceCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_DiskSpaceCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DiskSpaceCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DiskSpaceCheck{ + CIM_Check: tmp, + } + return +} + +// SetAvailableDiskSpace sets the value of AvailableDiskSpace for the instance +func (instance *CIM_DiskSpaceCheck) SetPropertyAvailableDiskSpace(value uint64) (err error) { + return instance.SetProperty("AvailableDiskSpace", (value)) +} + +// GetAvailableDiskSpace gets the value of AvailableDiskSpace for the instance +func (instance *CIM_DiskSpaceCheck) GetPropertyAvailableDiskSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableDiskSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DisketteDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DisketteDrive.go new file mode 100644 index 00000000..cba5b916 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_DisketteDrive.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_DisketteDrive struct +type CIM_DisketteDrive struct { + *CIM_MediaAccessDevice +} + +func NewCIM_DisketteDriveEx1(instance *cim.WmiInstance) (newInstance *CIM_DisketteDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_DisketteDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +func NewCIM_DisketteDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_DisketteDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_DisketteDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Display.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Display.go new file mode 100644 index 00000000..c29b1439 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Display.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Display struct +type CIM_Display struct { + *CIM_UserDevice +} + +func NewCIM_DisplayEx1(instance *cim.WmiInstance) (newInstance *CIM_Display, err error) { + tmp, err := NewCIM_UserDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Display{ + CIM_UserDevice: tmp, + } + return +} + +func NewCIM_DisplayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Display, err error) { + tmp, err := NewCIM_UserDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Display{ + CIM_UserDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Docked.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Docked.go new file mode 100644 index 00000000..a83d7ca9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Docked.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Docked struct +type CIM_Docked struct { + *CIM_Dependency +} + +func NewCIM_DockedEx1(instance *cim.WmiInstance) (newInstance *CIM_Docked, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Docked{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_DockedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Docked, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Docked{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementCapacity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementCapacity.go new file mode 100644 index 00000000..579a137e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementCapacity.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ElementCapacity struct +type CIM_ElementCapacity struct { + *cim.WmiInstance + + // + Capacity CIM_PhysicalCapacity + + // + Element CIM_PhysicalElement +} + +func NewCIM_ElementCapacityEx1(instance *cim.WmiInstance) (newInstance *CIM_ElementCapacity, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ElementCapacity{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ElementCapacityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ElementCapacity, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ElementCapacity{ + WmiInstance: tmp, + } + return +} + +// SetCapacity sets the value of Capacity for the instance +func (instance *CIM_ElementCapacity) SetPropertyCapacity(value CIM_PhysicalCapacity) (err error) { + return instance.SetProperty("Capacity", (value)) +} + +// GetCapacity gets the value of Capacity for the instance +func (instance *CIM_ElementCapacity) GetPropertyCapacity() (value CIM_PhysicalCapacity, err error) { + retValue, err := instance.GetProperty("Capacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_PhysicalCapacity) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_PhysicalCapacity is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_PhysicalCapacity(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_ElementCapacity) SetPropertyElement(value CIM_PhysicalElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_ElementCapacity) GetPropertyElement() (value CIM_PhysicalElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_PhysicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_PhysicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_PhysicalElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementConfiguration.go new file mode 100644 index 00000000..4940ce5c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementConfiguration.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ElementConfiguration struct +type CIM_ElementConfiguration struct { + *cim.WmiInstance + + // + Configuration CIM_Configuration + + // + Element CIM_ManagedSystemElement +} + +func NewCIM_ElementConfigurationEx1(instance *cim.WmiInstance) (newInstance *CIM_ElementConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ElementConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ElementConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ElementConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ElementConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetConfiguration sets the value of Configuration for the instance +func (instance *CIM_ElementConfiguration) SetPropertyConfiguration(value CIM_Configuration) (err error) { + return instance.SetProperty("Configuration", (value)) +} + +// GetConfiguration gets the value of Configuration for the instance +func (instance *CIM_ElementConfiguration) GetPropertyConfiguration() (value CIM_Configuration, err error) { + retValue, err := instance.GetProperty("Configuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Configuration) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Configuration is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Configuration(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_ElementConfiguration) SetPropertyElement(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_ElementConfiguration) GetPropertyElement() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementSetting.go new file mode 100644 index 00000000..93a17571 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ElementSetting struct +type CIM_ElementSetting struct { + *cim.WmiInstance + + // + Element CIM_ManagedSystemElement + + // + Setting CIM_Setting +} + +func NewCIM_ElementSettingEx1(instance *cim.WmiInstance) (newInstance *CIM_ElementSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ElementSetting{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ElementSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ElementSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ElementSetting{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_ElementSetting) SetPropertyElement(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_ElementSetting) GetPropertyElement() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *CIM_ElementSetting) SetPropertySetting(value CIM_Setting) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *CIM_ElementSetting) GetPropertySetting() (value CIM_Setting, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Setting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Setting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Setting(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementsLinked.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementsLinked.go new file mode 100644 index 00000000..d5296de4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ElementsLinked.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ElementsLinked struct +type CIM_ElementsLinked struct { + *CIM_Dependency +} + +func NewCIM_ElementsLinkedEx1(instance *cim.WmiInstance) (newInstance *CIM_ElementsLinked, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ElementsLinked{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ElementsLinkedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ElementsLinked, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ElementsLinked{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Error.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Error.go new file mode 100644 index 00000000..5ec46980 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Error.go @@ -0,0 +1,552 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Error struct +type CIM_Error struct { + *cim.WmiInstance + + // The CIM status code that characterizes this instance. + ///This property defines the status codes that MAY be return by a conforming CIM Server or Listener. Note that not all status codes are valid for each operation. The specification for each operation SHOULD define the status codes that may be returned by that operation. + ///The following values for CIM status code are defined: + ///1 - CIM_ERR_FAILED. A general error occurred that is not covered by a more specific error code. + ///2 - CIM_ERR_ACCESS_DENIED. Access to a CIM resource was not available to the client. + ///3 - CIM_ERR_INVALID_NAMESPACE. The target namespace does not exist. + ///4 - CIM_ERR_INVALID_PARAMETER. One or more parameter values passed to the method were invalid. + ///5 - CIM_ERR_INVALID_CLASS. The specified Class does not exist. + ///6 - CIM_ERR_NOT_FOUND. The requested object could not be found. + ///7 - CIM_ERR_NOT_SUPPORTED. The requested operation is not supported. + ///8 - CIM_ERR_CLASS_HAS_CHILDREN. Operation cannot be carried out on this class since it has instances. + ///9 - CIM_ERR_CLASS_HAS_INSTANCES. Operation cannot be carried out on this class since it has instances. + ///10 - CIM_ERR_INVALID_SUPERCLASS. Operation cannot be carried out since the specified superclass does not exist. + ///11 - CIM_ERR_ALREADY_EXISTS. Operation cannot be carried out because an object already exists. + ///12 - CIM_ERR_NO_SUCH_PROPERTY. The specified Property does not exist. + ///13 - CIM_ERR_TYPE_MISMATCH. The value supplied is incompatible with the type. + ///14 - CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED. The query language is not recognized or supported. + ///15 - CIM_ERR_INVALID_QUERY. The query is not valid for the specified query language. + ///16 - CIM_ERR_METHOD_NOT_AVAILABLE. The extrinsic Method could not be executed. + ///17 - CIM_ERR_METHOD_NOT_FOUND. The specified extrinsic Method does not exist. + ///18 - CIM_ERR_UNEXPECTED_RESPONSE. The returned response to the asynchronous operation was not expected. + ///19 - CIM_ERR_INVALID_RESPONSE_DESTINATION. The specified destination for the asynchronous response is not valid. + ///20 - CIM_ERR_NAMESPACE_NOT_EMPTY. The specified Namespace is not empty. + ///21 - CIM_ERR_INVALID_ENUMERATION_CONTEXT. The enumeration context supplied is not valid. + ///22 - CIM_ERR_INVALID_OPERATION_TIMEOUT. The specified Namespace is not empty. + ///23 - CIM_ERR_PULL_HAS_BEEN_ABANDONED. The specified Namespace is not empty. + ///24 - CIM_ERR_PULL_CANNOT_BE_ABANDONED. The attempt to abandon a pull operation has failed. + ///25 - CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED. Filtered Enumeratrions are not supported. + ///26 - CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED. Continue on error is not supported. + ///27 - CIM_ERR_SERVER_LIMITS_EXCEEDED. The WBEM Server limits have been exceeded (e.g. memory, connections, ...). + ///28 - CIM_ERR_SERVER_IS_SHUTTING_DOWN. The WBEM Server is shutting down. + ///29 - CIM_ERR_QUERY_FEATURE_NOT_SUPPORTED. The specified Query Feature is not supported. + CIMStatusCode Error_CIMStatusCode + + // A free-form string containing a human-readable description of CIMStatusCode. This description MAY extend, but MUST be consistent with, the definition of CIMStatusCode. + CIMStatusCodeDescription string + + // The identifying information of the entity (i.e., the instance) generating the error. If this entity is modeled in the CIM Schema, this property contains the path of the instance encoded as a string parameter. If not modeled, the property contains some identifying string that names the entity that generated the error. The path or identifying string is formatted per the ErrorSourceFormat property. + ErrorSource string + + // An array containing the dynamic content of the message. + ErrorSourceFormat Error_ErrorSourceFormat + + // Primary classification of the error. The following values are defined: + ///2 - Communications Error. Errors of this type are principally associated with the procedures and/or processes required to convey information from one point to another. + ///3 - Quality of Service Error. Errors of this type are principally associated with failures that result in reduced functionality or performance. + ///4 - Software Error. Error of this type are principally associated with a software or processing fault. + ///5 - Hardware Error. Errors of this type are principally associated with an equipment or hardware failure. + ///6 - Environmental Error. Errors of this type are principally associated with a failure condition relating the to facility, or other environmental considerations. + ///7 - Security Error. Errors of this type are associated with security violations, detection of viruses, and similar issues. + ///8 - Oversubscription Error. Errors of this type are principally associated with the failure to allocate sufficient resources to complete the operation. + ///9 - Unavailable Resource Error. Errors of this type are principally associated with the failure to access a required resource. + ///10 -Unsupported Operation Error. Errors of this type are principally associated with requests that are not supported. + ErrorType Error_ErrorType + + // The formatted message. This message is constructed by combining some or all of the dynamic elements specified in the MessageArguments property with the static elements uniquely identified by the MessageID in a message registry or other catalog associated with the OwningEntity. + Message string + + // An array containing the dynamic content of the message. + MessageArguments []string + + // An opaque string that uniquely identifies, within the scope of the OwningEntity, the format of the Message. + MessageID string + + // A string defining "Other" values for ErrorSourceFormat. This value MUST be set to a non NULL value when ErrorSourceFormat is set to a value of 1 ("Other"). For all other values of ErrorSourceFormat, the value of this string must be set to NULL. + OtherErrorSourceFormat string + + // A free-form string describing the ErrorType when 1, "Other", is specified as the ErrorType. + OtherErrorType string + + // A string that uniquely identifies the entity that owns the definition of the format of the Message described in this instance. OwningEntity MUST include a copyrighted, trademarked or otherwise unique name that is owned by the business entity or standards body defining the format. + OWningEntity string + + // An enumerated value that describes the severity of the Indication from the notifier's point of view: + ///0 - the Perceived Severity of the indication is unknown or indeterminate. + ///1 - Other, by CIM convention, is used to indicate that the Severity's value can be found in the OtherSeverity property. + ///2 - Information should be used when providing an informative response. + ///3 - Degraded/Warning should be used when its appropriate to let the user decide if action is needed. + ///4 - Minor should be used to indicate action is needed, but the situation is not serious at this time. + ///5 - Major should be used to indicate action is needed NOW. + ///6 - Critical should be used to indicate action is needed NOW and the scope is broad (perhaps an imminent outage to a critical resource will result). + ///7 - Fatal/NonRecoverable should be used to indicate an error occurred, but it's too late to take remedial action. + ///2 and 0 - Information and Unknown (respectively) follow common usage. Literally, the Error is purely informational or its severity is simply unknown. + PerceivedSeverity Error_PerceivedSeverity + + // An enumerated value that describes the probable cause of the error. + ProbableCause Error_ProbableCause + + // A free-form string describing the probable cause of the error. + ProbableCauseDescription string + + // A free-form string describing recommended actions to take to resolve the error. + RecommendedActions []string +} + +func NewCIM_ErrorEx1(instance *cim.WmiInstance) (newInstance *CIM_Error, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Error{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ErrorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Error, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Error{ + WmiInstance: tmp, + } + return +} + +// SetCIMStatusCode sets the value of CIMStatusCode for the instance +func (instance *CIM_Error) SetPropertyCIMStatusCode(value Error_CIMStatusCode) (err error) { + return instance.SetProperty("CIMStatusCode", (value)) +} + +// GetCIMStatusCode gets the value of CIMStatusCode for the instance +func (instance *CIM_Error) GetPropertyCIMStatusCode() (value Error_CIMStatusCode, err error) { + retValue, err := instance.GetProperty("CIMStatusCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Error_CIMStatusCode(valuetmp) + + return +} + +// SetCIMStatusCodeDescription sets the value of CIMStatusCodeDescription for the instance +func (instance *CIM_Error) SetPropertyCIMStatusCodeDescription(value string) (err error) { + return instance.SetProperty("CIMStatusCodeDescription", (value)) +} + +// GetCIMStatusCodeDescription gets the value of CIMStatusCodeDescription for the instance +func (instance *CIM_Error) GetPropertyCIMStatusCodeDescription() (value string, err error) { + retValue, err := instance.GetProperty("CIMStatusCodeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorSource sets the value of ErrorSource for the instance +func (instance *CIM_Error) SetPropertyErrorSource(value string) (err error) { + return instance.SetProperty("ErrorSource", (value)) +} + +// GetErrorSource gets the value of ErrorSource for the instance +func (instance *CIM_Error) GetPropertyErrorSource() (value string, err error) { + retValue, err := instance.GetProperty("ErrorSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorSourceFormat sets the value of ErrorSourceFormat for the instance +func (instance *CIM_Error) SetPropertyErrorSourceFormat(value Error_ErrorSourceFormat) (err error) { + return instance.SetProperty("ErrorSourceFormat", (value)) +} + +// GetErrorSourceFormat gets the value of ErrorSourceFormat for the instance +func (instance *CIM_Error) GetPropertyErrorSourceFormat() (value Error_ErrorSourceFormat, err error) { + retValue, err := instance.GetProperty("ErrorSourceFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Error_ErrorSourceFormat(valuetmp) + + return +} + +// SetErrorType sets the value of ErrorType for the instance +func (instance *CIM_Error) SetPropertyErrorType(value Error_ErrorType) (err error) { + return instance.SetProperty("ErrorType", (value)) +} + +// GetErrorType gets the value of ErrorType for the instance +func (instance *CIM_Error) GetPropertyErrorType() (value Error_ErrorType, err error) { + retValue, err := instance.GetProperty("ErrorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Error_ErrorType(valuetmp) + + return +} + +// SetMessage sets the value of Message for the instance +func (instance *CIM_Error) SetPropertyMessage(value string) (err error) { + return instance.SetProperty("Message", (value)) +} + +// GetMessage gets the value of Message for the instance +func (instance *CIM_Error) GetPropertyMessage() (value string, err error) { + retValue, err := instance.GetProperty("Message") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMessageArguments sets the value of MessageArguments for the instance +func (instance *CIM_Error) SetPropertyMessageArguments(value []string) (err error) { + return instance.SetProperty("MessageArguments", (value)) +} + +// GetMessageArguments gets the value of MessageArguments for the instance +func (instance *CIM_Error) GetPropertyMessageArguments() (value []string, err error) { + retValue, err := instance.GetProperty("MessageArguments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetMessageID sets the value of MessageID for the instance +func (instance *CIM_Error) SetPropertyMessageID(value string) (err error) { + return instance.SetProperty("MessageID", (value)) +} + +// GetMessageID gets the value of MessageID for the instance +func (instance *CIM_Error) GetPropertyMessageID() (value string, err error) { + retValue, err := instance.GetProperty("MessageID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherErrorSourceFormat sets the value of OtherErrorSourceFormat for the instance +func (instance *CIM_Error) SetPropertyOtherErrorSourceFormat(value string) (err error) { + return instance.SetProperty("OtherErrorSourceFormat", (value)) +} + +// GetOtherErrorSourceFormat gets the value of OtherErrorSourceFormat for the instance +func (instance *CIM_Error) GetPropertyOtherErrorSourceFormat() (value string, err error) { + retValue, err := instance.GetProperty("OtherErrorSourceFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherErrorType sets the value of OtherErrorType for the instance +func (instance *CIM_Error) SetPropertyOtherErrorType(value string) (err error) { + return instance.SetProperty("OtherErrorType", (value)) +} + +// GetOtherErrorType gets the value of OtherErrorType for the instance +func (instance *CIM_Error) GetPropertyOtherErrorType() (value string, err error) { + retValue, err := instance.GetProperty("OtherErrorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOWningEntity sets the value of OWningEntity for the instance +func (instance *CIM_Error) SetPropertyOWningEntity(value string) (err error) { + return instance.SetProperty("OWningEntity", (value)) +} + +// GetOWningEntity gets the value of OWningEntity for the instance +func (instance *CIM_Error) GetPropertyOWningEntity() (value string, err error) { + retValue, err := instance.GetProperty("OWningEntity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerceivedSeverity sets the value of PerceivedSeverity for the instance +func (instance *CIM_Error) SetPropertyPerceivedSeverity(value Error_PerceivedSeverity) (err error) { + return instance.SetProperty("PerceivedSeverity", (value)) +} + +// GetPerceivedSeverity gets the value of PerceivedSeverity for the instance +func (instance *CIM_Error) GetPropertyPerceivedSeverity() (value Error_PerceivedSeverity, err error) { + retValue, err := instance.GetProperty("PerceivedSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Error_PerceivedSeverity(valuetmp) + + return +} + +// SetProbableCause sets the value of ProbableCause for the instance +func (instance *CIM_Error) SetPropertyProbableCause(value Error_ProbableCause) (err error) { + return instance.SetProperty("ProbableCause", (value)) +} + +// GetProbableCause gets the value of ProbableCause for the instance +func (instance *CIM_Error) GetPropertyProbableCause() (value Error_ProbableCause, err error) { + retValue, err := instance.GetProperty("ProbableCause") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Error_ProbableCause(valuetmp) + + return +} + +// SetProbableCauseDescription sets the value of ProbableCauseDescription for the instance +func (instance *CIM_Error) SetPropertyProbableCauseDescription(value string) (err error) { + return instance.SetProperty("ProbableCauseDescription", (value)) +} + +// GetProbableCauseDescription gets the value of ProbableCauseDescription for the instance +func (instance *CIM_Error) GetPropertyProbableCauseDescription() (value string, err error) { + retValue, err := instance.GetProperty("ProbableCauseDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecommendedActions sets the value of RecommendedActions for the instance +func (instance *CIM_Error) SetPropertyRecommendedActions(value []string) (err error) { + return instance.SetProperty("RecommendedActions", (value)) +} + +// GetRecommendedActions gets the value of RecommendedActions for the instance +func (instance *CIM_Error) GetPropertyRecommendedActions() (value []string, err error) { + retValue, err := instance.GetProperty("RecommendedActions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ErrorCountersForDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ErrorCountersForDevice.go new file mode 100644 index 00000000..687df90a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ErrorCountersForDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ErrorCountersForDevice struct +type CIM_ErrorCountersForDevice struct { + *CIM_Statistics +} + +func NewCIM_ErrorCountersForDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_ErrorCountersForDevice, err error) { + tmp, err := NewCIM_StatisticsEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ErrorCountersForDevice{ + CIM_Statistics: tmp, + } + return +} + +func NewCIM_ErrorCountersForDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ErrorCountersForDevice, err error) { + tmp, err := NewCIM_StatisticsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ErrorCountersForDevice{ + CIM_Statistics: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExecuteProgram.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExecuteProgram.go new file mode 100644 index 00000000..bc87e51f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExecuteProgram.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ExecuteProgram struct +type CIM_ExecuteProgram struct { + *CIM_Action + + // + CommandLine string + + // + ProgramPath string +} + +func NewCIM_ExecuteProgramEx1(instance *cim.WmiInstance) (newInstance *CIM_ExecuteProgram, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ExecuteProgram{ + CIM_Action: tmp, + } + return +} + +func NewCIM_ExecuteProgramEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ExecuteProgram, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ExecuteProgram{ + CIM_Action: tmp, + } + return +} + +// SetCommandLine sets the value of CommandLine for the instance +func (instance *CIM_ExecuteProgram) SetPropertyCommandLine(value string) (err error) { + return instance.SetProperty("CommandLine", (value)) +} + +// GetCommandLine gets the value of CommandLine for the instance +func (instance *CIM_ExecuteProgram) GetPropertyCommandLine() (value string, err error) { + retValue, err := instance.GetProperty("CommandLine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProgramPath sets the value of ProgramPath for the instance +func (instance *CIM_ExecuteProgram) SetPropertyProgramPath(value string) (err error) { + return instance.SetProperty("ProgramPath", (value)) +} + +// GetProgramPath gets the value of ProgramPath for the instance +func (instance *CIM_ExecuteProgram) GetPropertyProgramPath() (value string, err error) { + retValue, err := instance.GetProperty("ProgramPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Export.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Export.go new file mode 100644 index 00000000..f632ae0a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Export.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Export struct +type CIM_Export struct { + *cim.WmiInstance + + // + Directory CIM_Directory + + // + ExportedDirectoryName string + + // + LocalFS CIM_LocalFileSystem +} + +func NewCIM_ExportEx1(instance *cim.WmiInstance) (newInstance *CIM_Export, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Export{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ExportEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Export, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Export{ + WmiInstance: tmp, + } + return +} + +// SetDirectory sets the value of Directory for the instance +func (instance *CIM_Export) SetPropertyDirectory(value CIM_Directory) (err error) { + return instance.SetProperty("Directory", (value)) +} + +// GetDirectory gets the value of Directory for the instance +func (instance *CIM_Export) GetPropertyDirectory() (value CIM_Directory, err error) { + retValue, err := instance.GetProperty("Directory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Directory) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Directory is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Directory(valuetmp) + + return +} + +// SetExportedDirectoryName sets the value of ExportedDirectoryName for the instance +func (instance *CIM_Export) SetPropertyExportedDirectoryName(value string) (err error) { + return instance.SetProperty("ExportedDirectoryName", (value)) +} + +// GetExportedDirectoryName gets the value of ExportedDirectoryName for the instance +func (instance *CIM_Export) GetPropertyExportedDirectoryName() (value string, err error) { + retValue, err := instance.GetProperty("ExportedDirectoryName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalFS sets the value of LocalFS for the instance +func (instance *CIM_Export) SetPropertyLocalFS(value CIM_LocalFileSystem) (err error) { + return instance.SetProperty("LocalFS", (value)) +} + +// GetLocalFS gets the value of LocalFS for the instance +func (instance *CIM_Export) GetPropertyLocalFS() (value CIM_LocalFileSystem, err error) { + retValue, err := instance.GetProperty("LocalFS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_LocalFileSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_LocalFileSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_LocalFileSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExtraCapacityGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExtraCapacityGroup.go new file mode 100644 index 00000000..303eb4be --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ExtraCapacityGroup.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ExtraCapacityGroup struct +type CIM_ExtraCapacityGroup struct { + *CIM_RedundancyGroup + + // + MinNumberNeeded uint32 +} + +func NewCIM_ExtraCapacityGroupEx1(instance *cim.WmiInstance) (newInstance *CIM_ExtraCapacityGroup, err error) { + tmp, err := NewCIM_RedundancyGroupEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ExtraCapacityGroup{ + CIM_RedundancyGroup: tmp, + } + return +} + +func NewCIM_ExtraCapacityGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ExtraCapacityGroup, err error) { + tmp, err := NewCIM_RedundancyGroupEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ExtraCapacityGroup{ + CIM_RedundancyGroup: tmp, + } + return +} + +// SetMinNumberNeeded sets the value of MinNumberNeeded for the instance +func (instance *CIM_ExtraCapacityGroup) SetPropertyMinNumberNeeded(value uint32) (err error) { + return instance.SetProperty("MinNumberNeeded", (value)) +} + +// GetMinNumberNeeded gets the value of MinNumberNeeded for the instance +func (instance *CIM_ExtraCapacityGroup) GetPropertyMinNumberNeeded() (value uint32, err error) { + retValue, err := instance.GetProperty("MinNumberNeeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRU.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRU.go new file mode 100644 index 00000000..1f20da98 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRU.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FRU struct +type CIM_FRU struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + FRUNumber string + + // + IdentifyingNumber string + + // + Name string + + // + RevisionLevel string + + // + Vendor string +} + +func NewCIM_FRUEx1(instance *cim.WmiInstance) (newInstance *CIM_FRU, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_FRU{ + WmiInstance: tmp, + } + return +} + +func NewCIM_FRUEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FRU, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FRU{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_FRU) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_FRU) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_FRU) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_FRU) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFRUNumber sets the value of FRUNumber for the instance +func (instance *CIM_FRU) SetPropertyFRUNumber(value string) (err error) { + return instance.SetProperty("FRUNumber", (value)) +} + +// GetFRUNumber gets the value of FRUNumber for the instance +func (instance *CIM_FRU) GetPropertyFRUNumber() (value string, err error) { + retValue, err := instance.GetProperty("FRUNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIdentifyingNumber sets the value of IdentifyingNumber for the instance +func (instance *CIM_FRU) SetPropertyIdentifyingNumber(value string) (err error) { + return instance.SetProperty("IdentifyingNumber", (value)) +} + +// GetIdentifyingNumber gets the value of IdentifyingNumber for the instance +func (instance *CIM_FRU) GetPropertyIdentifyingNumber() (value string, err error) { + retValue, err := instance.GetProperty("IdentifyingNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_FRU) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_FRU) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRevisionLevel sets the value of RevisionLevel for the instance +func (instance *CIM_FRU) SetPropertyRevisionLevel(value string) (err error) { + return instance.SetProperty("RevisionLevel", (value)) +} + +// GetRevisionLevel gets the value of RevisionLevel for the instance +func (instance *CIM_FRU) GetPropertyRevisionLevel() (value string, err error) { + retValue, err := instance.GetProperty("RevisionLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVendor sets the value of Vendor for the instance +func (instance *CIM_FRU) SetPropertyVendor(value string) (err error) { + return instance.SetProperty("Vendor", (value)) +} + +// GetVendor gets the value of Vendor for the instance +func (instance *CIM_FRU) GetPropertyVendor() (value string, err error) { + retValue, err := instance.GetProperty("Vendor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUIncludesProduct.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUIncludesProduct.go new file mode 100644 index 00000000..25760325 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUIncludesProduct.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FRUIncludesProduct struct +type CIM_FRUIncludesProduct struct { + *cim.WmiInstance + + // + Component CIM_Product + + // + FRU CIM_FRU +} + +func NewCIM_FRUIncludesProductEx1(instance *cim.WmiInstance) (newInstance *CIM_FRUIncludesProduct, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_FRUIncludesProduct{ + WmiInstance: tmp, + } + return +} + +func NewCIM_FRUIncludesProductEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FRUIncludesProduct, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FRUIncludesProduct{ + WmiInstance: tmp, + } + return +} + +// SetComponent sets the value of Component for the instance +func (instance *CIM_FRUIncludesProduct) SetPropertyComponent(value CIM_Product) (err error) { + return instance.SetProperty("Component", (value)) +} + +// GetComponent gets the value of Component for the instance +func (instance *CIM_FRUIncludesProduct) GetPropertyComponent() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Component") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} + +// SetFRU sets the value of FRU for the instance +func (instance *CIM_FRUIncludesProduct) SetPropertyFRU(value CIM_FRU) (err error) { + return instance.SetProperty("FRU", (value)) +} + +// GetFRU gets the value of FRU for the instance +func (instance *CIM_FRUIncludesProduct) GetPropertyFRU() (value CIM_FRU, err error) { + retValue, err := instance.GetProperty("FRU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_FRU) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_FRU is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_FRU(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUPhysicalElements.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUPhysicalElements.go new file mode 100644 index 00000000..843610b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FRUPhysicalElements.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FRUPhysicalElements struct +type CIM_FRUPhysicalElements struct { + *cim.WmiInstance + + // + Component CIM_PhysicalElement + + // + FRU CIM_FRU +} + +func NewCIM_FRUPhysicalElementsEx1(instance *cim.WmiInstance) (newInstance *CIM_FRUPhysicalElements, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_FRUPhysicalElements{ + WmiInstance: tmp, + } + return +} + +func NewCIM_FRUPhysicalElementsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FRUPhysicalElements, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FRUPhysicalElements{ + WmiInstance: tmp, + } + return +} + +// SetComponent sets the value of Component for the instance +func (instance *CIM_FRUPhysicalElements) SetPropertyComponent(value CIM_PhysicalElement) (err error) { + return instance.SetProperty("Component", (value)) +} + +// GetComponent gets the value of Component for the instance +func (instance *CIM_FRUPhysicalElements) GetPropertyComponent() (value CIM_PhysicalElement, err error) { + retValue, err := instance.GetProperty("Component") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_PhysicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_PhysicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_PhysicalElement(valuetmp) + + return +} + +// SetFRU sets the value of FRU for the instance +func (instance *CIM_FRUPhysicalElements) SetPropertyFRU(value CIM_FRU) (err error) { + return instance.SetProperty("FRU", (value)) +} + +// GetFRU gets the value of FRU for the instance +func (instance *CIM_FRUPhysicalElements) GetPropertyFRU() (value CIM_FRU, err error) { + retValue, err := instance.GetProperty("FRU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_FRU) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_FRU is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_FRU(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Fan.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Fan.go new file mode 100644 index 00000000..2916a5da --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Fan.go @@ -0,0 +1,125 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Fan struct +type CIM_Fan struct { + *CIM_CoolingDevice + + // + DesiredSpeed uint64 + + // + VariableSpeed bool +} + +func NewCIM_FanEx1(instance *cim.WmiInstance) (newInstance *CIM_Fan, err error) { + tmp, err := NewCIM_CoolingDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Fan{ + CIM_CoolingDevice: tmp, + } + return +} + +func NewCIM_FanEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Fan, err error) { + tmp, err := NewCIM_CoolingDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Fan{ + CIM_CoolingDevice: tmp, + } + return +} + +// SetDesiredSpeed sets the value of DesiredSpeed for the instance +func (instance *CIM_Fan) SetPropertyDesiredSpeed(value uint64) (err error) { + return instance.SetProperty("DesiredSpeed", (value)) +} + +// GetDesiredSpeed gets the value of DesiredSpeed for the instance +func (instance *CIM_Fan) GetPropertyDesiredSpeed() (value uint64, err error) { + retValue, err := instance.GetProperty("DesiredSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVariableSpeed sets the value of VariableSpeed for the instance +func (instance *CIM_Fan) SetPropertyVariableSpeed(value bool) (err error) { + return instance.SetProperty("VariableSpeed", (value)) +} + +// GetVariableSpeed gets the value of VariableSpeed for the instance +func (instance *CIM_Fan) GetPropertyVariableSpeed() (value bool, err error) { + retValue, err := instance.GetProperty("VariableSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// + +// +func (instance *CIM_Fan) SetSpeed( /* IN */ DesiredSpeed uint64) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSpeed", DesiredSpeed) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileAction.go new file mode 100644 index 00000000..e773b7b1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileAction.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_FileAction struct +type CIM_FileAction struct { + *CIM_Action +} + +func NewCIM_FileActionEx1(instance *cim.WmiInstance) (newInstance *CIM_FileAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_FileAction{ + CIM_Action: tmp, + } + return +} + +func NewCIM_FileActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FileAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FileAction{ + CIM_Action: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSpecification.go new file mode 100644 index 00000000..7600a5cb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSpecification.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FileSpecification struct +type CIM_FileSpecification struct { + *CIM_Check + + // + CheckSum uint32 + + // + CRC1 uint32 + + // + CRC2 uint32 + + // + CreateTimeStamp string + + // + FileSize uint64 + + // + MD5Checksum string +} + +func NewCIM_FileSpecificationEx1(instance *cim.WmiInstance) (newInstance *CIM_FileSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_FileSpecification{ + CIM_Check: tmp, + } + return +} + +func NewCIM_FileSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FileSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FileSpecification{ + CIM_Check: tmp, + } + return +} + +// SetCheckSum sets the value of CheckSum for the instance +func (instance *CIM_FileSpecification) SetPropertyCheckSum(value uint32) (err error) { + return instance.SetProperty("CheckSum", (value)) +} + +// GetCheckSum gets the value of CheckSum for the instance +func (instance *CIM_FileSpecification) GetPropertyCheckSum() (value uint32, err error) { + retValue, err := instance.GetProperty("CheckSum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCRC1 sets the value of CRC1 for the instance +func (instance *CIM_FileSpecification) SetPropertyCRC1(value uint32) (err error) { + return instance.SetProperty("CRC1", (value)) +} + +// GetCRC1 gets the value of CRC1 for the instance +func (instance *CIM_FileSpecification) GetPropertyCRC1() (value uint32, err error) { + retValue, err := instance.GetProperty("CRC1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCRC2 sets the value of CRC2 for the instance +func (instance *CIM_FileSpecification) SetPropertyCRC2(value uint32) (err error) { + return instance.SetProperty("CRC2", (value)) +} + +// GetCRC2 gets the value of CRC2 for the instance +func (instance *CIM_FileSpecification) GetPropertyCRC2() (value uint32, err error) { + retValue, err := instance.GetProperty("CRC2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCreateTimeStamp sets the value of CreateTimeStamp for the instance +func (instance *CIM_FileSpecification) SetPropertyCreateTimeStamp(value string) (err error) { + return instance.SetProperty("CreateTimeStamp", (value)) +} + +// GetCreateTimeStamp gets the value of CreateTimeStamp for the instance +func (instance *CIM_FileSpecification) GetPropertyCreateTimeStamp() (value string, err error) { + retValue, err := instance.GetProperty("CreateTimeStamp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSize sets the value of FileSize for the instance +func (instance *CIM_FileSpecification) SetPropertyFileSize(value uint64) (err error) { + return instance.SetProperty("FileSize", (value)) +} + +// GetFileSize gets the value of FileSize for the instance +func (instance *CIM_FileSpecification) GetPropertyFileSize() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMD5Checksum sets the value of MD5Checksum for the instance +func (instance *CIM_FileSpecification) SetPropertyMD5Checksum(value string) (err error) { + return instance.SetProperty("MD5Checksum", (value)) +} + +// GetMD5Checksum gets the value of MD5Checksum for the instance +func (instance *CIM_FileSpecification) GetPropertyMD5Checksum() (value string, err error) { + retValue, err := instance.GetProperty("MD5Checksum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileStorage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileStorage.go new file mode 100644 index 00000000..3fd17d37 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileStorage.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_FileStorage struct +type CIM_FileStorage struct { + *CIM_Component +} + +func NewCIM_FileStorageEx1(instance *cim.WmiInstance) (newInstance *CIM_FileStorage, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_FileStorage{ + CIM_Component: tmp, + } + return +} + +func NewCIM_FileStorageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FileStorage, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FileStorage{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSystem.go new file mode 100644 index 00000000..9bd35513 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FileSystem.go @@ -0,0 +1,471 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FileSystem struct +type CIM_FileSystem struct { + *CIM_LogicalElement + + // + AvailableSpace uint64 + + // + BlockSize uint64 + + // + CasePreserved bool + + // + CaseSensitive bool + + // + CodeSet []uint16 + + // + CompressionMethod string + + // + CreationClassName string + + // + CSCreationClassName string + + // + CSName string + + // + EncryptionMethod string + + // + FileSystemSize uint64 + + // + MaxFileNameLength uint32 + + // + ReadOnly bool + + // + Root string +} + +func NewCIM_FileSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_FileSystem, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_FileSystem{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_FileSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FileSystem, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FileSystem{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAvailableSpace sets the value of AvailableSpace for the instance +func (instance *CIM_FileSystem) SetPropertyAvailableSpace(value uint64) (err error) { + return instance.SetProperty("AvailableSpace", (value)) +} + +// GetAvailableSpace gets the value of AvailableSpace for the instance +func (instance *CIM_FileSystem) GetPropertyAvailableSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBlockSize sets the value of BlockSize for the instance +func (instance *CIM_FileSystem) SetPropertyBlockSize(value uint64) (err error) { + return instance.SetProperty("BlockSize", (value)) +} + +// GetBlockSize gets the value of BlockSize for the instance +func (instance *CIM_FileSystem) GetPropertyBlockSize() (value uint64, err error) { + retValue, err := instance.GetProperty("BlockSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCasePreserved sets the value of CasePreserved for the instance +func (instance *CIM_FileSystem) SetPropertyCasePreserved(value bool) (err error) { + return instance.SetProperty("CasePreserved", (value)) +} + +// GetCasePreserved gets the value of CasePreserved for the instance +func (instance *CIM_FileSystem) GetPropertyCasePreserved() (value bool, err error) { + retValue, err := instance.GetProperty("CasePreserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCaseSensitive sets the value of CaseSensitive for the instance +func (instance *CIM_FileSystem) SetPropertyCaseSensitive(value bool) (err error) { + return instance.SetProperty("CaseSensitive", (value)) +} + +// GetCaseSensitive gets the value of CaseSensitive for the instance +func (instance *CIM_FileSystem) GetPropertyCaseSensitive() (value bool, err error) { + retValue, err := instance.GetProperty("CaseSensitive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCodeSet sets the value of CodeSet for the instance +func (instance *CIM_FileSystem) SetPropertyCodeSet(value []uint16) (err error) { + return instance.SetProperty("CodeSet", (value)) +} + +// GetCodeSet gets the value of CodeSet for the instance +func (instance *CIM_FileSystem) GetPropertyCodeSet() (value []uint16, err error) { + retValue, err := instance.GetProperty("CodeSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCompressionMethod sets the value of CompressionMethod for the instance +func (instance *CIM_FileSystem) SetPropertyCompressionMethod(value string) (err error) { + return instance.SetProperty("CompressionMethod", (value)) +} + +// GetCompressionMethod gets the value of CompressionMethod for the instance +func (instance *CIM_FileSystem) GetPropertyCompressionMethod() (value string, err error) { + retValue, err := instance.GetProperty("CompressionMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_FileSystem) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_FileSystem) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_FileSystem) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_FileSystem) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_FileSystem) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_FileSystem) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEncryptionMethod sets the value of EncryptionMethod for the instance +func (instance *CIM_FileSystem) SetPropertyEncryptionMethod(value string) (err error) { + return instance.SetProperty("EncryptionMethod", (value)) +} + +// GetEncryptionMethod gets the value of EncryptionMethod for the instance +func (instance *CIM_FileSystem) GetPropertyEncryptionMethod() (value string, err error) { + retValue, err := instance.GetProperty("EncryptionMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSystemSize sets the value of FileSystemSize for the instance +func (instance *CIM_FileSystem) SetPropertyFileSystemSize(value uint64) (err error) { + return instance.SetProperty("FileSystemSize", (value)) +} + +// GetFileSystemSize gets the value of FileSystemSize for the instance +func (instance *CIM_FileSystem) GetPropertyFileSystemSize() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSystemSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaxFileNameLength sets the value of MaxFileNameLength for the instance +func (instance *CIM_FileSystem) SetPropertyMaxFileNameLength(value uint32) (err error) { + return instance.SetProperty("MaxFileNameLength", (value)) +} + +// GetMaxFileNameLength gets the value of MaxFileNameLength for the instance +func (instance *CIM_FileSystem) GetPropertyMaxFileNameLength() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxFileNameLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadOnly sets the value of ReadOnly for the instance +func (instance *CIM_FileSystem) SetPropertyReadOnly(value bool) (err error) { + return instance.SetProperty("ReadOnly", (value)) +} + +// GetReadOnly gets the value of ReadOnly for the instance +func (instance *CIM_FileSystem) GetPropertyReadOnly() (value bool, err error) { + retValue, err := instance.GetProperty("ReadOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRoot sets the value of Root for the instance +func (instance *CIM_FileSystem) SetPropertyRoot(value string) (err error) { + return instance.SetProperty("Root", (value)) +} + +// GetRoot gets the value of Root for the instance +func (instance *CIM_FileSystem) GetPropertyRoot() (value string, err error) { + retValue, err := instance.GetProperty("Root") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FlatPanel.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FlatPanel.go new file mode 100644 index 00000000..16f4953b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FlatPanel.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FlatPanel struct +type CIM_FlatPanel struct { + *CIM_Display + + // + DisplayType uint16 + + // + HorizontalResolution uint32 + + // + LightSource uint16 + + // + ScanMode uint16 + + // + SupportsColor bool + + // + VerticalResolution uint32 +} + +func NewCIM_FlatPanelEx1(instance *cim.WmiInstance) (newInstance *CIM_FlatPanel, err error) { + tmp, err := NewCIM_DisplayEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_FlatPanel{ + CIM_Display: tmp, + } + return +} + +func NewCIM_FlatPanelEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FlatPanel, err error) { + tmp, err := NewCIM_DisplayEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FlatPanel{ + CIM_Display: tmp, + } + return +} + +// SetDisplayType sets the value of DisplayType for the instance +func (instance *CIM_FlatPanel) SetPropertyDisplayType(value uint16) (err error) { + return instance.SetProperty("DisplayType", (value)) +} + +// GetDisplayType gets the value of DisplayType for the instance +func (instance *CIM_FlatPanel) GetPropertyDisplayType() (value uint16, err error) { + retValue, err := instance.GetProperty("DisplayType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *CIM_FlatPanel) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *CIM_FlatPanel) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLightSource sets the value of LightSource for the instance +func (instance *CIM_FlatPanel) SetPropertyLightSource(value uint16) (err error) { + return instance.SetProperty("LightSource", (value)) +} + +// GetLightSource gets the value of LightSource for the instance +func (instance *CIM_FlatPanel) GetPropertyLightSource() (value uint16, err error) { + retValue, err := instance.GetProperty("LightSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetScanMode sets the value of ScanMode for the instance +func (instance *CIM_FlatPanel) SetPropertyScanMode(value uint16) (err error) { + return instance.SetProperty("ScanMode", (value)) +} + +// GetScanMode gets the value of ScanMode for the instance +func (instance *CIM_FlatPanel) GetPropertyScanMode() (value uint16, err error) { + retValue, err := instance.GetProperty("ScanMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSupportsColor sets the value of SupportsColor for the instance +func (instance *CIM_FlatPanel) SetPropertySupportsColor(value bool) (err error) { + return instance.SetProperty("SupportsColor", (value)) +} + +// GetSupportsColor gets the value of SupportsColor for the instance +func (instance *CIM_FlatPanel) GetPropertySupportsColor() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsColor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *CIM_FlatPanel) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *CIM_FlatPanel) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectoryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectoryAction.go new file mode 100644 index 00000000..49dfe055 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectoryAction.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FromDirectoryAction struct +type CIM_FromDirectoryAction struct { + *cim.WmiInstance + + // + FileName CIM_FileAction + + // + SourceDirectory CIM_DirectoryAction +} + +func NewCIM_FromDirectoryActionEx1(instance *cim.WmiInstance) (newInstance *CIM_FromDirectoryAction, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_FromDirectoryAction{ + WmiInstance: tmp, + } + return +} + +func NewCIM_FromDirectoryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FromDirectoryAction, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FromDirectoryAction{ + WmiInstance: tmp, + } + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_FromDirectoryAction) SetPropertyFileName(value CIM_FileAction) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_FromDirectoryAction) GetPropertyFileName() (value CIM_FileAction, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_FileAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_FileAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_FileAction(valuetmp) + + return +} + +// SetSourceDirectory sets the value of SourceDirectory for the instance +func (instance *CIM_FromDirectoryAction) SetPropertySourceDirectory(value CIM_DirectoryAction) (err error) { + return instance.SetProperty("SourceDirectory", (value)) +} + +// GetSourceDirectory gets the value of SourceDirectory for the instance +func (instance *CIM_FromDirectoryAction) GetPropertySourceDirectory() (value CIM_DirectoryAction, err error) { + retValue, err := instance.GetProperty("SourceDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_DirectoryAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_DirectoryAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_DirectoryAction(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectorySpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectorySpecification.go new file mode 100644 index 00000000..8a863869 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_FromDirectorySpecification.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_FromDirectorySpecification struct +type CIM_FromDirectorySpecification struct { + *cim.WmiInstance + + // + FileName CIM_FileAction + + // + SourceDirectory CIM_DirectorySpecification +} + +func NewCIM_FromDirectorySpecificationEx1(instance *cim.WmiInstance) (newInstance *CIM_FromDirectorySpecification, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_FromDirectorySpecification{ + WmiInstance: tmp, + } + return +} + +func NewCIM_FromDirectorySpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_FromDirectorySpecification, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_FromDirectorySpecification{ + WmiInstance: tmp, + } + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_FromDirectorySpecification) SetPropertyFileName(value CIM_FileAction) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_FromDirectorySpecification) GetPropertyFileName() (value CIM_FileAction, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_FileAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_FileAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_FileAction(valuetmp) + + return +} + +// SetSourceDirectory sets the value of SourceDirectory for the instance +func (instance *CIM_FromDirectorySpecification) SetPropertySourceDirectory(value CIM_DirectorySpecification) (err error) { + return instance.SetProperty("SourceDirectory", (value)) +} + +// GetSourceDirectory gets the value of SourceDirectory for the instance +func (instance *CIM_FromDirectorySpecification) GetPropertySourceDirectory() (value CIM_DirectorySpecification, err error) { + retValue, err := instance.GetProperty("SourceDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_DirectorySpecification) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_DirectorySpecification is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_DirectorySpecification(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HeatPipe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HeatPipe.go new file mode 100644 index 00000000..e2d09ecf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HeatPipe.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HeatPipe struct +type CIM_HeatPipe struct { + *CIM_CoolingDevice +} + +func NewCIM_HeatPipeEx1(instance *cim.WmiInstance) (newInstance *CIM_HeatPipe, err error) { + tmp, err := NewCIM_CoolingDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HeatPipe{ + CIM_CoolingDevice: tmp, + } + return +} + +func NewCIM_HeatPipeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HeatPipe, err error) { + tmp, err := NewCIM_CoolingDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HeatPipe{ + CIM_CoolingDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedAccessPoint.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedAccessPoint.go new file mode 100644 index 00000000..c146d234 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedAccessPoint.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HostedAccessPoint struct +type CIM_HostedAccessPoint struct { + *CIM_Dependency +} + +func NewCIM_HostedAccessPointEx1(instance *cim.WmiInstance) (newInstance *CIM_HostedAccessPoint, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HostedAccessPoint{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_HostedAccessPointEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HostedAccessPoint, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HostedAccessPoint{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootSAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootSAP.go new file mode 100644 index 00000000..5d2443e7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootSAP.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HostedBootSAP struct +type CIM_HostedBootSAP struct { + *CIM_HostedAccessPoint +} + +func NewCIM_HostedBootSAPEx1(instance *cim.WmiInstance) (newInstance *CIM_HostedBootSAP, err error) { + tmp, err := NewCIM_HostedAccessPointEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HostedBootSAP{ + CIM_HostedAccessPoint: tmp, + } + return +} + +func NewCIM_HostedBootSAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HostedBootSAP, err error) { + tmp, err := NewCIM_HostedAccessPointEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HostedBootSAP{ + CIM_HostedAccessPoint: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootService.go new file mode 100644 index 00000000..4b823036 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedBootService.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HostedBootService struct +type CIM_HostedBootService struct { + *CIM_HostedService +} + +func NewCIM_HostedBootServiceEx1(instance *cim.WmiInstance) (newInstance *CIM_HostedBootService, err error) { + tmp, err := NewCIM_HostedServiceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HostedBootService{ + CIM_HostedService: tmp, + } + return +} + +func NewCIM_HostedBootServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HostedBootService, err error) { + tmp, err := NewCIM_HostedServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HostedBootService{ + CIM_HostedService: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedFileSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedFileSystem.go new file mode 100644 index 00000000..02cd422f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedFileSystem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HostedFileSystem struct +type CIM_HostedFileSystem struct { + *CIM_SystemComponent +} + +func NewCIM_HostedFileSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_HostedFileSystem, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HostedFileSystem{ + CIM_SystemComponent: tmp, + } + return +} + +func NewCIM_HostedFileSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HostedFileSystem, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HostedFileSystem{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedJobDestination.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedJobDestination.go new file mode 100644 index 00000000..a816022f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedJobDestination.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HostedJobDestination struct +type CIM_HostedJobDestination struct { + *CIM_Dependency +} + +func NewCIM_HostedJobDestinationEx1(instance *cim.WmiInstance) (newInstance *CIM_HostedJobDestination, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HostedJobDestination{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_HostedJobDestinationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HostedJobDestination, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HostedJobDestination{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedService.go new file mode 100644 index 00000000..f255142f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_HostedService.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_HostedService struct +type CIM_HostedService struct { + *CIM_Dependency +} + +func NewCIM_HostedServiceEx1(instance *cim.WmiInstance) (newInstance *CIM_HostedService, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_HostedService{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_HostedServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_HostedService, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_HostedService{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_IRQ.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_IRQ.go new file mode 100644 index 00000000..3f6e026c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_IRQ.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_IRQ struct +type CIM_IRQ struct { + *CIM_SystemResource + + // + Availability uint16 + + // + CreationClassName string + + // + CSCreationClassName string + + // + CSName string + + // + IRQNumber uint32 + + // + Shareable bool + + // + TriggerLevel uint16 + + // + TriggerType uint16 +} + +func NewCIM_IRQEx1(instance *cim.WmiInstance) (newInstance *CIM_IRQ, err error) { + tmp, err := NewCIM_SystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_IRQ{ + CIM_SystemResource: tmp, + } + return +} + +func NewCIM_IRQEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_IRQ, err error) { + tmp, err := NewCIM_SystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_IRQ{ + CIM_SystemResource: tmp, + } + return +} + +// SetAvailability sets the value of Availability for the instance +func (instance *CIM_IRQ) SetPropertyAvailability(value uint16) (err error) { + return instance.SetProperty("Availability", (value)) +} + +// GetAvailability gets the value of Availability for the instance +func (instance *CIM_IRQ) GetPropertyAvailability() (value uint16, err error) { + retValue, err := instance.GetProperty("Availability") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_IRQ) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_IRQ) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_IRQ) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_IRQ) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_IRQ) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_IRQ) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIRQNumber sets the value of IRQNumber for the instance +func (instance *CIM_IRQ) SetPropertyIRQNumber(value uint32) (err error) { + return instance.SetProperty("IRQNumber", (value)) +} + +// GetIRQNumber gets the value of IRQNumber for the instance +func (instance *CIM_IRQ) GetPropertyIRQNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("IRQNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetShareable sets the value of Shareable for the instance +func (instance *CIM_IRQ) SetPropertyShareable(value bool) (err error) { + return instance.SetProperty("Shareable", (value)) +} + +// GetShareable gets the value of Shareable for the instance +func (instance *CIM_IRQ) GetPropertyShareable() (value bool, err error) { + retValue, err := instance.GetProperty("Shareable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTriggerLevel sets the value of TriggerLevel for the instance +func (instance *CIM_IRQ) SetPropertyTriggerLevel(value uint16) (err error) { + return instance.SetProperty("TriggerLevel", (value)) +} + +// GetTriggerLevel gets the value of TriggerLevel for the instance +func (instance *CIM_IRQ) GetPropertyTriggerLevel() (value uint16, err error) { + retValue, err := instance.GetProperty("TriggerLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTriggerType sets the value of TriggerType for the instance +func (instance *CIM_IRQ) SetPropertyTriggerType(value uint16) (err error) { + return instance.SetProperty("TriggerType", (value)) +} + +// GetTriggerType gets the value of TriggerType for the instance +func (instance *CIM_IRQ) GetPropertyTriggerType() (value uint16, err error) { + retValue, err := instance.GetProperty("TriggerType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Indication.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Indication.go new file mode 100644 index 00000000..e0da1767 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Indication.go @@ -0,0 +1,315 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Indication struct +type CIM_Indication struct { + *cim.WmiInstance + + // A list of IndicationIdentifiers whose notifications are correlated with (related to) this one. + CorrelatedIndications []string + + // An identifier for the indication filter that selects this indication and causes it to be sent. This property is to be filled out by the indication sending service. The value shall be correlatable with the Name property of the instance of CIM_IndicationFilter describing the criteria of the indication. The value of the IndicationFilterName should be formatted using the following algorithm: < OrgID > : < LocalID >, where < OrgID > and < LocalID > are separated by a colon (:) and < OrgID > shall include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the value or that is a registered ID assigned to the business entity by a recognized global authority. In addition, to ensure uniqueness, < OrgID > shall not contain a colon (:).When using this algorithm, the first colon to appear in the value shall appear between < OrgID > and < LocalID >. < LocalID > is chosen by the business entity and shall be used uniquely. + IndicationFilterName string + + // An identifier for the Indication. This property is similar to a key value in that it can be used for identification, when correlating Indications (see the CorrelatedIndications array). Its value SHOULD be unique as long as correlations are reported, but MAY be reused or left NULL if no future Indications will reference it in their CorrelatedIndications array.To ensure uniqueness, the value of IndicationIdentifier should be constructed using the following "preferred" algorithm: + ///: + ///Where and are separated by a colon (:), and where must include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the IndicationIdentifier or that is a recognized ID that is assigned to the business entity by a recognized global authority. (This requirement is similar to the _ structure of Schema class names.) In addition, to ensure uniqueness must not contain a colon (:). When using this algorithm, the first colon to appear in IndicationIdentifier must appear between and . + /// is chosen by the business entity and should not be re-used to identify different underlying (real-world) elements. + ///If the above "preferred" algorithm is not used, the defining entity should assure that the resulting IndicationIdentifier is not re-used across any IndicationIdentifiers that are produced by this or other providers for the NameSpace of this instance. + ///For DMTF-defined instances, the "preferred" algorithm should be used with the set to CIM. + IndicationIdentifier string + + // The time and date of creation of the Indication. The property may be set to NULL if the entity creating the Indication is not capable of determining this information. Note that IndicationTime may be the same for two Indications that are generated in rapid succession. + IndicationTime string + + // Holds the value of the user defined severity value when 'PerceivedSeverity' is 1 ("Other"). + OtherSeverity string + + // An enumerated value that describes the severity of the Indication from the notifier's point of view: + ///1 - Other, by CIM convention, is used to indicate that the Severity's value can be found in the OtherSeverity property. + ///3 - Degraded/Warning should be used when its appropriate to let the user decide if action is needed. + ///4 - Minor should be used to indicate action is needed, but the situation is not serious at this time. + ///5 - Major should be used to indicate action is needed NOW. + ///6 - Critical should be used to indicate action is needed NOW and the scope is broad (perhaps an imminent outage to a critical resource will result). + ///7 - Fatal/NonRecoverable should be used to indicate an error occurred, but it's too late to take remedial action. + ///2 and 0 - Information and Unknown (respectively) follow common usage. Literally, the Indication is purely informational or its severity is simply unknown. + PerceivedSeverity Indication_PerceivedSeverity + + // The sequence context portion of a sequence identifier for the indication. The sequence number portion of the sequence identifier is provided by the SequenceNumber property. The combination of both property values represents the sequence identifier for the indication. + ///The sequence identifier for the indication enables a CIM listener to identify duplicate indications when the CIM service attempts the delivery retry of indications, to reorder indications that arrive out-of-order, and to detect lost indications. + ///If a CIM service does not support sequence identifiers for indications, this property shall be NULL. + ///If a CIM service supports sequence identifiers for indications, this property shall be maintained by the CIM service for each registered listener destination, and its value shall uniquely identify the CIM service and the indication service within the CIM service such that restarts of the CIM service and deregistration of listener destinations to the CIM service cause the value to change, without reusing earlier values for a sufficiently long time. + ///When retrying the delivery of an indication, this property shall have the same value as in the original delivery. + ///To guarantee this uniqueness, the property value should be constructed using the following format (defined in ABNF): sequence-context = indication-service-name "#" cim-service-start-id "#" listener-destination-creation-time + ///Where: indication-service-name is the value of the Name property of the CIM_IndicationService instance responsible for delivering the indication. cim-service-start-id is an identifier that uniquely identifies the CIM service start, for example via a timestamp of the start time, or via a counter that increases for each start or restart. listener-destination-creation-time is a timestamp of the creation time of the CIM_ListenerDestination instance representing the listener destination. + ///Since this format is only a recommendation, CIM clients shall treat the value as an opaque identifier for the sequence context and shall not rely on this format. + SequenceContext string + + // The sequence number portion of a sequence identifier for the indication. The sequence context portion of the sequence identifier is provided by the SequenceContext property. The combination of both property values represents the sequence identifier for the indication. + ///The sequence identifier for the indication enables a CIM listener to identify duplicate indications when the CIM service attempts the delivery retry of indications, to reorder indications that arrive out-of-order, and to detect lost indications. + ///If a CIM service does not support sequence identifiers for indications, this property shall be NULL. + ///If a CIM service supports sequence identifiers for indications, this property shall be maintained by the CIM service for each registered listener destination, and its value shall uniquely identify the indication within the sequence context provided by SequenceContext. It shall start at 0 whenever the sequence context string changes. Otherwise, it shall be increased by 1 for every new indication to that listener destination, and it shall wrap to 0 when the value range is exceeded. + ///When retrying the delivery of an indication, this property shall have the same value as in the original delivery. + SequenceNumber int64 +} + +func NewCIM_IndicationEx1(instance *cim.WmiInstance) (newInstance *CIM_Indication, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Indication{ + WmiInstance: tmp, + } + return +} + +func NewCIM_IndicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Indication, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Indication{ + WmiInstance: tmp, + } + return +} + +// SetCorrelatedIndications sets the value of CorrelatedIndications for the instance +func (instance *CIM_Indication) SetPropertyCorrelatedIndications(value []string) (err error) { + return instance.SetProperty("CorrelatedIndications", (value)) +} + +// GetCorrelatedIndications gets the value of CorrelatedIndications for the instance +func (instance *CIM_Indication) GetPropertyCorrelatedIndications() (value []string, err error) { + retValue, err := instance.GetProperty("CorrelatedIndications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIndicationFilterName sets the value of IndicationFilterName for the instance +func (instance *CIM_Indication) SetPropertyIndicationFilterName(value string) (err error) { + return instance.SetProperty("IndicationFilterName", (value)) +} + +// GetIndicationFilterName gets the value of IndicationFilterName for the instance +func (instance *CIM_Indication) GetPropertyIndicationFilterName() (value string, err error) { + retValue, err := instance.GetProperty("IndicationFilterName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndicationIdentifier sets the value of IndicationIdentifier for the instance +func (instance *CIM_Indication) SetPropertyIndicationIdentifier(value string) (err error) { + return instance.SetProperty("IndicationIdentifier", (value)) +} + +// GetIndicationIdentifier gets the value of IndicationIdentifier for the instance +func (instance *CIM_Indication) GetPropertyIndicationIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("IndicationIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndicationTime sets the value of IndicationTime for the instance +func (instance *CIM_Indication) SetPropertyIndicationTime(value string) (err error) { + return instance.SetProperty("IndicationTime", (value)) +} + +// GetIndicationTime gets the value of IndicationTime for the instance +func (instance *CIM_Indication) GetPropertyIndicationTime() (value string, err error) { + retValue, err := instance.GetProperty("IndicationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherSeverity sets the value of OtherSeverity for the instance +func (instance *CIM_Indication) SetPropertyOtherSeverity(value string) (err error) { + return instance.SetProperty("OtherSeverity", (value)) +} + +// GetOtherSeverity gets the value of OtherSeverity for the instance +func (instance *CIM_Indication) GetPropertyOtherSeverity() (value string, err error) { + retValue, err := instance.GetProperty("OtherSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerceivedSeverity sets the value of PerceivedSeverity for the instance +func (instance *CIM_Indication) SetPropertyPerceivedSeverity(value Indication_PerceivedSeverity) (err error) { + return instance.SetProperty("PerceivedSeverity", (value)) +} + +// GetPerceivedSeverity gets the value of PerceivedSeverity for the instance +func (instance *CIM_Indication) GetPropertyPerceivedSeverity() (value Indication_PerceivedSeverity, err error) { + retValue, err := instance.GetProperty("PerceivedSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Indication_PerceivedSeverity(valuetmp) + + return +} + +// SetSequenceContext sets the value of SequenceContext for the instance +func (instance *CIM_Indication) SetPropertySequenceContext(value string) (err error) { + return instance.SetProperty("SequenceContext", (value)) +} + +// GetSequenceContext gets the value of SequenceContext for the instance +func (instance *CIM_Indication) GetPropertySequenceContext() (value string, err error) { + retValue, err := instance.GetProperty("SequenceContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSequenceNumber sets the value of SequenceNumber for the instance +func (instance *CIM_Indication) SetPropertySequenceNumber(value int64) (err error) { + return instance.SetProperty("SequenceNumber", (value)) +} + +// GetSequenceNumber gets the value of SequenceNumber for the instance +func (instance *CIM_Indication) GetPropertySequenceNumber() (value int64, err error) { + retValue, err := instance.GetProperty("SequenceNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InfraredController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InfraredController.go new file mode 100644 index 00000000..a489bb76 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InfraredController.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_InfraredController struct +type CIM_InfraredController struct { + *CIM_Controller +} + +func NewCIM_InfraredControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_InfraredController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InfraredController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_InfraredControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InfraredController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InfraredController{ + CIM_Controller: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstCreation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstCreation.go new file mode 100644 index 00000000..7d3ecb3c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstCreation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_InstCreation struct +type CIM_InstCreation struct { + *CIM_InstIndication +} + +func NewCIM_InstCreationEx1(instance *cim.WmiInstance) (newInstance *CIM_InstCreation, err error) { + tmp, err := NewCIM_InstIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstCreation{ + CIM_InstIndication: tmp, + } + return +} + +func NewCIM_InstCreationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstCreation, err error) { + tmp, err := NewCIM_InstIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstCreation{ + CIM_InstIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstDeletion.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstDeletion.go new file mode 100644 index 00000000..704491ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstDeletion.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_InstDeletion struct +type CIM_InstDeletion struct { + *CIM_InstIndication +} + +func NewCIM_InstDeletionEx1(instance *cim.WmiInstance) (newInstance *CIM_InstDeletion, err error) { + tmp, err := NewCIM_InstIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstDeletion{ + CIM_InstIndication: tmp, + } + return +} + +func NewCIM_InstDeletionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstDeletion, err error) { + tmp, err := NewCIM_InstIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstDeletion{ + CIM_InstIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstIndication.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstIndication.go new file mode 100644 index 00000000..c8a60969 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstIndication.go @@ -0,0 +1,142 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_InstIndication struct +type CIM_InstIndication struct { + *CIM_Indication + + // A copy of the instance that changed to generate the Indication. SourceInstance contains the current values of the properties selected by the Indication Filter's Query. In the case of CIM_InstDeletion, the property values are copied before the instance is deleted. + SourceInstance interface{} + + // The host name or IP address of the SourceInstance. + SourceInstanceHost string + + // The Model Path of the SourceInstance. The following format MUST be used to encode the Model Path: + ///:.="", + ///="", ... + SourceInstanceModelPath string +} + +func NewCIM_InstIndicationEx1(instance *cim.WmiInstance) (newInstance *CIM_InstIndication, err error) { + tmp, err := NewCIM_IndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstIndication{ + CIM_Indication: tmp, + } + return +} + +func NewCIM_InstIndicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstIndication, err error) { + tmp, err := NewCIM_IndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstIndication{ + CIM_Indication: tmp, + } + return +} + +// SetSourceInstance sets the value of SourceInstance for the instance +func (instance *CIM_InstIndication) SetPropertySourceInstance(value interface{}) (err error) { + return instance.SetProperty("SourceInstance", (value)) +} + +// GetSourceInstance gets the value of SourceInstance for the instance +func (instance *CIM_InstIndication) GetPropertySourceInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("SourceInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetSourceInstanceHost sets the value of SourceInstanceHost for the instance +func (instance *CIM_InstIndication) SetPropertySourceInstanceHost(value string) (err error) { + return instance.SetProperty("SourceInstanceHost", (value)) +} + +// GetSourceInstanceHost gets the value of SourceInstanceHost for the instance +func (instance *CIM_InstIndication) GetPropertySourceInstanceHost() (value string, err error) { + retValue, err := instance.GetProperty("SourceInstanceHost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceInstanceModelPath sets the value of SourceInstanceModelPath for the instance +func (instance *CIM_InstIndication) SetPropertySourceInstanceModelPath(value string) (err error) { + return instance.SetProperty("SourceInstanceModelPath", (value)) +} + +// GetSourceInstanceModelPath gets the value of SourceInstanceModelPath for the instance +func (instance *CIM_InstIndication) GetPropertySourceInstanceModelPath() (value string, err error) { + retValue, err := instance.GetProperty("SourceInstanceModelPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstModification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstModification.go new file mode 100644 index 00000000..0704cbaa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstModification.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_InstModification struct +type CIM_InstModification struct { + *CIM_InstIndication + + // A copy of the 'previous' instance whose change generated the Indication. PreviousInstance contains 'older' values of an instance's properties (as compared to SourceInstance), selected by the IndicationFilter's Query. + PreviousInstance interface{} +} + +func NewCIM_InstModificationEx1(instance *cim.WmiInstance) (newInstance *CIM_InstModification, err error) { + tmp, err := NewCIM_InstIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstModification{ + CIM_InstIndication: tmp, + } + return +} + +func NewCIM_InstModificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstModification, err error) { + tmp, err := NewCIM_InstIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstModification{ + CIM_InstIndication: tmp, + } + return +} + +// SetPreviousInstance sets the value of PreviousInstance for the instance +func (instance *CIM_InstModification) SetPropertyPreviousInstance(value interface{}) (err error) { + return instance.SetProperty("PreviousInstance", (value)) +} + +// GetPreviousInstance gets the value of PreviousInstance for the instance +func (instance *CIM_InstModification) GetPropertyPreviousInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledOS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledOS.go new file mode 100644 index 00000000..cb597e2e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledOS.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_InstalledOS struct +type CIM_InstalledOS struct { + *CIM_SystemComponent + + // + PrimaryOS bool +} + +func NewCIM_InstalledOSEx1(instance *cim.WmiInstance) (newInstance *CIM_InstalledOS, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstalledOS{ + CIM_SystemComponent: tmp, + } + return +} + +func NewCIM_InstalledOSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstalledOS, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstalledOS{ + CIM_SystemComponent: tmp, + } + return +} + +// SetPrimaryOS sets the value of PrimaryOS for the instance +func (instance *CIM_InstalledOS) SetPropertyPrimaryOS(value bool) (err error) { + return instance.SetProperty("PrimaryOS", (value)) +} + +// GetPrimaryOS gets the value of PrimaryOS for the instance +func (instance *CIM_InstalledOS) GetPropertyPrimaryOS() (value bool, err error) { + retValue, err := instance.GetProperty("PrimaryOS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledSoftwareElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledSoftwareElement.go new file mode 100644 index 00000000..505c4449 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_InstalledSoftwareElement.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_InstalledSoftwareElement struct +type CIM_InstalledSoftwareElement struct { + *cim.WmiInstance + + // + Software CIM_SoftwareElement + + // + System CIM_ComputerSystem +} + +func NewCIM_InstalledSoftwareElementEx1(instance *cim.WmiInstance) (newInstance *CIM_InstalledSoftwareElement, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_InstalledSoftwareElement{ + WmiInstance: tmp, + } + return +} + +func NewCIM_InstalledSoftwareElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstalledSoftwareElement, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstalledSoftwareElement{ + WmiInstance: tmp, + } + return +} + +// SetSoftware sets the value of Software for the instance +func (instance *CIM_InstalledSoftwareElement) SetPropertySoftware(value CIM_SoftwareElement) (err error) { + return instance.SetProperty("Software", (value)) +} + +// GetSoftware gets the value of Software for the instance +func (instance *CIM_InstalledSoftwareElement) GetPropertySoftware() (value CIM_SoftwareElement, err error) { + retValue, err := instance.GetProperty("Software") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_SoftwareElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_SoftwareElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_SoftwareElement(valuetmp) + + return +} + +// SetSystem sets the value of System for the instance +func (instance *CIM_InstalledSoftwareElement) SetPropertySystem(value CIM_ComputerSystem) (err error) { + return instance.SetProperty("System", (value)) +} + +// GetSystem gets the value of System for the instance +func (instance *CIM_InstalledSoftwareElement) GetPropertySystem() (value CIM_ComputerSystem, err error) { + retValue, err := instance.GetProperty("System") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ComputerSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ComputerSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ComputerSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Job.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Job.go new file mode 100644 index 00000000..2c7298ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Job.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Job struct +type CIM_Job struct { + *CIM_LogicalElement + + // + ElapsedTime string + + // + JobStatus string + + // + Notify string + + // + Owner string + + // + Priority uint32 + + // + StartTime string + + // + TimeSubmitted string + + // + UntilTime string +} + +func NewCIM_JobEx1(instance *cim.WmiInstance) (newInstance *CIM_Job, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Job{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_JobEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Job, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Job{ + CIM_LogicalElement: tmp, + } + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *CIM_Job) SetPropertyElapsedTime(value string) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *CIM_Job) GetPropertyElapsedTime() (value string, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetJobStatus sets the value of JobStatus for the instance +func (instance *CIM_Job) SetPropertyJobStatus(value string) (err error) { + return instance.SetProperty("JobStatus", (value)) +} + +// GetJobStatus gets the value of JobStatus for the instance +func (instance *CIM_Job) GetPropertyJobStatus() (value string, err error) { + retValue, err := instance.GetProperty("JobStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNotify sets the value of Notify for the instance +func (instance *CIM_Job) SetPropertyNotify(value string) (err error) { + return instance.SetProperty("Notify", (value)) +} + +// GetNotify gets the value of Notify for the instance +func (instance *CIM_Job) GetPropertyNotify() (value string, err error) { + retValue, err := instance.GetProperty("Notify") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOwner sets the value of Owner for the instance +func (instance *CIM_Job) SetPropertyOwner(value string) (err error) { + return instance.SetProperty("Owner", (value)) +} + +// GetOwner gets the value of Owner for the instance +func (instance *CIM_Job) GetPropertyOwner() (value string, err error) { + retValue, err := instance.GetProperty("Owner") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPriority sets the value of Priority for the instance +func (instance *CIM_Job) SetPropertyPriority(value uint32) (err error) { + return instance.SetProperty("Priority", (value)) +} + +// GetPriority gets the value of Priority for the instance +func (instance *CIM_Job) GetPropertyPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("Priority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStartTime sets the value of StartTime for the instance +func (instance *CIM_Job) SetPropertyStartTime(value string) (err error) { + return instance.SetProperty("StartTime", (value)) +} + +// GetStartTime gets the value of StartTime for the instance +func (instance *CIM_Job) GetPropertyStartTime() (value string, err error) { + retValue, err := instance.GetProperty("StartTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeSubmitted sets the value of TimeSubmitted for the instance +func (instance *CIM_Job) SetPropertyTimeSubmitted(value string) (err error) { + return instance.SetProperty("TimeSubmitted", (value)) +} + +// GetTimeSubmitted gets the value of TimeSubmitted for the instance +func (instance *CIM_Job) GetPropertyTimeSubmitted() (value string, err error) { + retValue, err := instance.GetProperty("TimeSubmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUntilTime sets the value of UntilTime for the instance +func (instance *CIM_Job) SetPropertyUntilTime(value string) (err error) { + return instance.SetProperty("UntilTime", (value)) +} + +// GetUntilTime gets the value of UntilTime for the instance +func (instance *CIM_Job) GetPropertyUntilTime() (value string, err error) { + retValue, err := instance.GetProperty("UntilTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestination.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestination.go new file mode 100644 index 00000000..bee95156 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestination.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_JobDestination struct +type CIM_JobDestination struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + SystemCreationClassName string + + // + SystemName string +} + +func NewCIM_JobDestinationEx1(instance *cim.WmiInstance) (newInstance *CIM_JobDestination, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_JobDestination{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_JobDestinationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_JobDestination, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_JobDestination{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_JobDestination) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_JobDestination) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemCreationClassName sets the value of SystemCreationClassName for the instance +func (instance *CIM_JobDestination) SetPropertySystemCreationClassName(value string) (err error) { + return instance.SetProperty("SystemCreationClassName", (value)) +} + +// GetSystemCreationClassName gets the value of SystemCreationClassName for the instance +func (instance *CIM_JobDestination) GetPropertySystemCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("SystemCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemName sets the value of SystemName for the instance +func (instance *CIM_JobDestination) SetPropertySystemName(value string) (err error) { + return instance.SetProperty("SystemName", (value)) +} + +// GetSystemName gets the value of SystemName for the instance +func (instance *CIM_JobDestination) GetPropertySystemName() (value string, err error) { + retValue, err := instance.GetProperty("SystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestinationJobs.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestinationJobs.go new file mode 100644 index 00000000..dd582aea --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_JobDestinationJobs.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_JobDestinationJobs struct +type CIM_JobDestinationJobs struct { + *CIM_Dependency +} + +func NewCIM_JobDestinationJobsEx1(instance *cim.WmiInstance) (newInstance *CIM_JobDestinationJobs, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_JobDestinationJobs{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_JobDestinationJobsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_JobDestinationJobs, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_JobDestinationJobs{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Keyboard.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Keyboard.go new file mode 100644 index 00000000..31b1c3b3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Keyboard.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Keyboard struct +type CIM_Keyboard struct { + *CIM_UserDevice + + // + Layout string + + // + NumberOfFunctionKeys uint16 + + // + Password uint16 +} + +func NewCIM_KeyboardEx1(instance *cim.WmiInstance) (newInstance *CIM_Keyboard, err error) { + tmp, err := NewCIM_UserDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Keyboard{ + CIM_UserDevice: tmp, + } + return +} + +func NewCIM_KeyboardEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Keyboard, err error) { + tmp, err := NewCIM_UserDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Keyboard{ + CIM_UserDevice: tmp, + } + return +} + +// SetLayout sets the value of Layout for the instance +func (instance *CIM_Keyboard) SetPropertyLayout(value string) (err error) { + return instance.SetProperty("Layout", (value)) +} + +// GetLayout gets the value of Layout for the instance +func (instance *CIM_Keyboard) GetPropertyLayout() (value string, err error) { + retValue, err := instance.GetProperty("Layout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNumberOfFunctionKeys sets the value of NumberOfFunctionKeys for the instance +func (instance *CIM_Keyboard) SetPropertyNumberOfFunctionKeys(value uint16) (err error) { + return instance.SetProperty("NumberOfFunctionKeys", (value)) +} + +// GetNumberOfFunctionKeys gets the value of NumberOfFunctionKeys for the instance +func (instance *CIM_Keyboard) GetPropertyNumberOfFunctionKeys() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfFunctionKeys") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPassword sets the value of Password for the instance +func (instance *CIM_Keyboard) SetPropertyPassword(value uint16) (err error) { + return instance.SetProperty("Password", (value)) +} + +// GetPassword gets the value of Password for the instance +func (instance *CIM_Keyboard) GetPropertyPassword() (value uint16, err error) { + retValue, err := instance.GetProperty("Password") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LinkHasConnector.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LinkHasConnector.go new file mode 100644 index 00000000..88816118 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LinkHasConnector.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_LinkHasConnector struct +type CIM_LinkHasConnector struct { + *CIM_Component +} + +func NewCIM_LinkHasConnectorEx1(instance *cim.WmiInstance) (newInstance *CIM_LinkHasConnector, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LinkHasConnector{ + CIM_Component: tmp, + } + return +} + +func NewCIM_LinkHasConnectorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LinkHasConnector, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LinkHasConnector{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LocalFileSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LocalFileSystem.go new file mode 100644 index 00000000..ffc3b9e3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LocalFileSystem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_LocalFileSystem struct +type CIM_LocalFileSystem struct { + *CIM_FileSystem +} + +func NewCIM_LocalFileSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_LocalFileSystem, err error) { + tmp, err := NewCIM_FileSystemEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LocalFileSystem{ + CIM_FileSystem: tmp, + } + return +} + +func NewCIM_LocalFileSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LocalFileSystem, err error) { + tmp, err := NewCIM_FileSystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LocalFileSystem{ + CIM_FileSystem: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Location.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Location.go new file mode 100644 index 00000000..1fc3d8f7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Location.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Location struct +type CIM_Location struct { + *cim.WmiInstance + + // + Address string + + // + Name string + + // + PhysicalPosition string +} + +func NewCIM_LocationEx1(instance *cim.WmiInstance) (newInstance *CIM_Location, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Location{ + WmiInstance: tmp, + } + return +} + +func NewCIM_LocationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Location, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Location{ + WmiInstance: tmp, + } + return +} + +// SetAddress sets the value of Address for the instance +func (instance *CIM_Location) SetPropertyAddress(value string) (err error) { + return instance.SetProperty("Address", (value)) +} + +// GetAddress gets the value of Address for the instance +func (instance *CIM_Location) GetPropertyAddress() (value string, err error) { + retValue, err := instance.GetProperty("Address") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_Location) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_Location) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPhysicalPosition sets the value of PhysicalPosition for the instance +func (instance *CIM_Location) SetPropertyPhysicalPosition(value string) (err error) { + return instance.SetProperty("PhysicalPosition", (value)) +} + +// GetPhysicalPosition gets the value of PhysicalPosition for the instance +func (instance *CIM_Location) GetPropertyPhysicalPosition() (value string, err error) { + retValue, err := instance.GetProperty("PhysicalPosition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDevice.go new file mode 100644 index 00000000..5c320a54 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDevice.go @@ -0,0 +1,501 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_LogicalDevice struct +type CIM_LogicalDevice struct { + *CIM_LogicalElement + + // + Availability uint16 + + // + ConfigManagerErrorCode uint32 + + // + ConfigManagerUserConfig bool + + // + CreationClassName string + + // + DeviceID string + + // + ErrorCleared bool + + // + ErrorDescription string + + // + LastErrorCode uint32 + + // + PNPDeviceID string + + // + PowerManagementCapabilities []uint16 + + // + PowerManagementSupported bool + + // + StatusInfo uint16 + + // + SystemCreationClassName string + + // + SystemName string +} + +func NewCIM_LogicalDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalDevice, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LogicalDevice{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_LogicalDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalDevice, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalDevice{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAvailability sets the value of Availability for the instance +func (instance *CIM_LogicalDevice) SetPropertyAvailability(value uint16) (err error) { + return instance.SetProperty("Availability", (value)) +} + +// GetAvailability gets the value of Availability for the instance +func (instance *CIM_LogicalDevice) GetPropertyAvailability() (value uint16, err error) { + retValue, err := instance.GetProperty("Availability") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetConfigManagerErrorCode sets the value of ConfigManagerErrorCode for the instance +func (instance *CIM_LogicalDevice) SetPropertyConfigManagerErrorCode(value uint32) (err error) { + return instance.SetProperty("ConfigManagerErrorCode", (value)) +} + +// GetConfigManagerErrorCode gets the value of ConfigManagerErrorCode for the instance +func (instance *CIM_LogicalDevice) GetPropertyConfigManagerErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ConfigManagerErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfigManagerUserConfig sets the value of ConfigManagerUserConfig for the instance +func (instance *CIM_LogicalDevice) SetPropertyConfigManagerUserConfig(value bool) (err error) { + return instance.SetProperty("ConfigManagerUserConfig", (value)) +} + +// GetConfigManagerUserConfig gets the value of ConfigManagerUserConfig for the instance +func (instance *CIM_LogicalDevice) GetPropertyConfigManagerUserConfig() (value bool, err error) { + retValue, err := instance.GetProperty("ConfigManagerUserConfig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_LogicalDevice) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_LogicalDevice) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceID sets the value of DeviceID for the instance +func (instance *CIM_LogicalDevice) SetPropertyDeviceID(value string) (err error) { + return instance.SetProperty("DeviceID", (value)) +} + +// GetDeviceID gets the value of DeviceID for the instance +func (instance *CIM_LogicalDevice) GetPropertyDeviceID() (value string, err error) { + retValue, err := instance.GetProperty("DeviceID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorCleared sets the value of ErrorCleared for the instance +func (instance *CIM_LogicalDevice) SetPropertyErrorCleared(value bool) (err error) { + return instance.SetProperty("ErrorCleared", (value)) +} + +// GetErrorCleared gets the value of ErrorCleared for the instance +func (instance *CIM_LogicalDevice) GetPropertyErrorCleared() (value bool, err error) { + retValue, err := instance.GetProperty("ErrorCleared") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *CIM_LogicalDevice) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *CIM_LogicalDevice) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastErrorCode sets the value of LastErrorCode for the instance +func (instance *CIM_LogicalDevice) SetPropertyLastErrorCode(value uint32) (err error) { + return instance.SetProperty("LastErrorCode", (value)) +} + +// GetLastErrorCode gets the value of LastErrorCode for the instance +func (instance *CIM_LogicalDevice) GetPropertyLastErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("LastErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPNPDeviceID sets the value of PNPDeviceID for the instance +func (instance *CIM_LogicalDevice) SetPropertyPNPDeviceID(value string) (err error) { + return instance.SetProperty("PNPDeviceID", (value)) +} + +// GetPNPDeviceID gets the value of PNPDeviceID for the instance +func (instance *CIM_LogicalDevice) GetPropertyPNPDeviceID() (value string, err error) { + retValue, err := instance.GetProperty("PNPDeviceID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPowerManagementCapabilities sets the value of PowerManagementCapabilities for the instance +func (instance *CIM_LogicalDevice) SetPropertyPowerManagementCapabilities(value []uint16) (err error) { + return instance.SetProperty("PowerManagementCapabilities", (value)) +} + +// GetPowerManagementCapabilities gets the value of PowerManagementCapabilities for the instance +func (instance *CIM_LogicalDevice) GetPropertyPowerManagementCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("PowerManagementCapabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPowerManagementSupported sets the value of PowerManagementSupported for the instance +func (instance *CIM_LogicalDevice) SetPropertyPowerManagementSupported(value bool) (err error) { + return instance.SetProperty("PowerManagementSupported", (value)) +} + +// GetPowerManagementSupported gets the value of PowerManagementSupported for the instance +func (instance *CIM_LogicalDevice) GetPropertyPowerManagementSupported() (value bool, err error) { + retValue, err := instance.GetProperty("PowerManagementSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetStatusInfo sets the value of StatusInfo for the instance +func (instance *CIM_LogicalDevice) SetPropertyStatusInfo(value uint16) (err error) { + return instance.SetProperty("StatusInfo", (value)) +} + +// GetStatusInfo gets the value of StatusInfo for the instance +func (instance *CIM_LogicalDevice) GetPropertyStatusInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("StatusInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSystemCreationClassName sets the value of SystemCreationClassName for the instance +func (instance *CIM_LogicalDevice) SetPropertySystemCreationClassName(value string) (err error) { + return instance.SetProperty("SystemCreationClassName", (value)) +} + +// GetSystemCreationClassName gets the value of SystemCreationClassName for the instance +func (instance *CIM_LogicalDevice) GetPropertySystemCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("SystemCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemName sets the value of SystemName for the instance +func (instance *CIM_LogicalDevice) SetPropertySystemName(value string) (err error) { + return instance.SetProperty("SystemName", (value)) +} + +// GetSystemName gets the value of SystemName for the instance +func (instance *CIM_LogicalDevice) GetPropertySystemName() (value string, err error) { + retValue, err := instance.GetProperty("SystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// + +// +func (instance *CIM_LogicalDevice) SetPowerState( /* IN */ PowerState uint16, + /* IN */ Time string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPowerState", PowerState, Time) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *CIM_LogicalDevice) Reset() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Reset") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDisk.go new file mode 100644 index 00000000..adc9ac36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDisk.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_LogicalDisk struct +type CIM_LogicalDisk struct { + *CIM_StorageExtent + + // + FreeSpace uint64 + + // + Size uint64 +} + +func NewCIM_LogicalDiskEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalDisk, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LogicalDisk{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_LogicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalDisk, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalDisk{ + CIM_StorageExtent: tmp, + } + return +} + +// SetFreeSpace sets the value of FreeSpace for the instance +func (instance *CIM_LogicalDisk) SetPropertyFreeSpace(value uint64) (err error) { + return instance.SetProperty("FreeSpace", (value)) +} + +// GetFreeSpace gets the value of FreeSpace for the instance +func (instance *CIM_LogicalDisk) GetPropertyFreeSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *CIM_LogicalDisk) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *CIM_LogicalDisk) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnPartition.go new file mode 100644 index 00000000..712be41b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnPartition.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_LogicalDiskBasedOnPartition struct +type CIM_LogicalDiskBasedOnPartition struct { + *CIM_BasedOn +} + +func NewCIM_LogicalDiskBasedOnPartitionEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalDiskBasedOnPartition, err error) { + tmp, err := NewCIM_BasedOnEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LogicalDiskBasedOnPartition{ + CIM_BasedOn: tmp, + } + return +} + +func NewCIM_LogicalDiskBasedOnPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalDiskBasedOnPartition, err error) { + tmp, err := NewCIM_BasedOnEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalDiskBasedOnPartition{ + CIM_BasedOn: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnVolumeSet.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnVolumeSet.go new file mode 100644 index 00000000..94360413 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalDiskBasedOnVolumeSet.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_LogicalDiskBasedOnVolumeSet struct +type CIM_LogicalDiskBasedOnVolumeSet struct { + *CIM_BasedOn +} + +func NewCIM_LogicalDiskBasedOnVolumeSetEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalDiskBasedOnVolumeSet, err error) { + tmp, err := NewCIM_BasedOnEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LogicalDiskBasedOnVolumeSet{ + CIM_BasedOn: tmp, + } + return +} + +func NewCIM_LogicalDiskBasedOnVolumeSetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalDiskBasedOnVolumeSet, err error) { + tmp, err := NewCIM_BasedOnEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalDiskBasedOnVolumeSet{ + CIM_BasedOn: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalElement.go new file mode 100644 index 00000000..22ac14c1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalElement.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_LogicalElement struct +type CIM_LogicalElement struct { + *CIM_ManagedSystemElement +} + +func NewCIM_LogicalElementEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalElement, err error) { + tmp, err := NewCIM_ManagedSystemElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LogicalElement{ + CIM_ManagedSystemElement: tmp, + } + return +} + +func NewCIM_LogicalElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalElement, err error) { + tmp, err := NewCIM_ManagedSystemElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalElement{ + CIM_ManagedSystemElement: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalFile.go new file mode 100644 index 00000000..f701cd4b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalFile.go @@ -0,0 +1,1068 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_LogicalFile struct +type CIM_LogicalFile struct { + *CIM_LogicalElement + + // + AccessMask uint32 + + // + Archive bool + + // + Compressed bool + + // + CompressionMethod string + + // + CreationClassName string + + // + CreationDate string + + // + CSCreationClassName string + + // + CSName string + + // + Drive string + + // + EightDotThreeFileName string + + // + Encrypted bool + + // + EncryptionMethod string + + // + Extension string + + // + FileName string + + // + FileSize uint64 + + // + FileType string + + // + FSCreationClassName string + + // + FSName string + + // + Hidden bool + + // + InUseCount uint64 + + // + LastAccessed string + + // + LastModified string + + // + Path string + + // + Readable bool + + // + System bool + + // + Writeable bool +} + +func NewCIM_LogicalFileEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalFile, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_LogicalFile{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_LogicalFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalFile, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalFile{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAccessMask sets the value of AccessMask for the instance +func (instance *CIM_LogicalFile) SetPropertyAccessMask(value uint32) (err error) { + return instance.SetProperty("AccessMask", (value)) +} + +// GetAccessMask gets the value of AccessMask for the instance +func (instance *CIM_LogicalFile) GetPropertyAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetArchive sets the value of Archive for the instance +func (instance *CIM_LogicalFile) SetPropertyArchive(value bool) (err error) { + return instance.SetProperty("Archive", (value)) +} + +// GetArchive gets the value of Archive for the instance +func (instance *CIM_LogicalFile) GetPropertyArchive() (value bool, err error) { + retValue, err := instance.GetProperty("Archive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCompressed sets the value of Compressed for the instance +func (instance *CIM_LogicalFile) SetPropertyCompressed(value bool) (err error) { + return instance.SetProperty("Compressed", (value)) +} + +// GetCompressed gets the value of Compressed for the instance +func (instance *CIM_LogicalFile) GetPropertyCompressed() (value bool, err error) { + retValue, err := instance.GetProperty("Compressed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCompressionMethod sets the value of CompressionMethod for the instance +func (instance *CIM_LogicalFile) SetPropertyCompressionMethod(value string) (err error) { + return instance.SetProperty("CompressionMethod", (value)) +} + +// GetCompressionMethod gets the value of CompressionMethod for the instance +func (instance *CIM_LogicalFile) GetPropertyCompressionMethod() (value string, err error) { + retValue, err := instance.GetProperty("CompressionMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_LogicalFile) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_LogicalFile) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCreationDate sets the value of CreationDate for the instance +func (instance *CIM_LogicalFile) SetPropertyCreationDate(value string) (err error) { + return instance.SetProperty("CreationDate", (value)) +} + +// GetCreationDate gets the value of CreationDate for the instance +func (instance *CIM_LogicalFile) GetPropertyCreationDate() (value string, err error) { + retValue, err := instance.GetProperty("CreationDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_LogicalFile) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_LogicalFile) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_LogicalFile) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_LogicalFile) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDrive sets the value of Drive for the instance +func (instance *CIM_LogicalFile) SetPropertyDrive(value string) (err error) { + return instance.SetProperty("Drive", (value)) +} + +// GetDrive gets the value of Drive for the instance +func (instance *CIM_LogicalFile) GetPropertyDrive() (value string, err error) { + retValue, err := instance.GetProperty("Drive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEightDotThreeFileName sets the value of EightDotThreeFileName for the instance +func (instance *CIM_LogicalFile) SetPropertyEightDotThreeFileName(value string) (err error) { + return instance.SetProperty("EightDotThreeFileName", (value)) +} + +// GetEightDotThreeFileName gets the value of EightDotThreeFileName for the instance +func (instance *CIM_LogicalFile) GetPropertyEightDotThreeFileName() (value string, err error) { + retValue, err := instance.GetProperty("EightDotThreeFileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEncrypted sets the value of Encrypted for the instance +func (instance *CIM_LogicalFile) SetPropertyEncrypted(value bool) (err error) { + return instance.SetProperty("Encrypted", (value)) +} + +// GetEncrypted gets the value of Encrypted for the instance +func (instance *CIM_LogicalFile) GetPropertyEncrypted() (value bool, err error) { + retValue, err := instance.GetProperty("Encrypted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEncryptionMethod sets the value of EncryptionMethod for the instance +func (instance *CIM_LogicalFile) SetPropertyEncryptionMethod(value string) (err error) { + return instance.SetProperty("EncryptionMethod", (value)) +} + +// GetEncryptionMethod gets the value of EncryptionMethod for the instance +func (instance *CIM_LogicalFile) GetPropertyEncryptionMethod() (value string, err error) { + retValue, err := instance.GetProperty("EncryptionMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExtension sets the value of Extension for the instance +func (instance *CIM_LogicalFile) SetPropertyExtension(value string) (err error) { + return instance.SetProperty("Extension", (value)) +} + +// GetExtension gets the value of Extension for the instance +func (instance *CIM_LogicalFile) GetPropertyExtension() (value string, err error) { + retValue, err := instance.GetProperty("Extension") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_LogicalFile) SetPropertyFileName(value string) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_LogicalFile) GetPropertyFileName() (value string, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSize sets the value of FileSize for the instance +func (instance *CIM_LogicalFile) SetPropertyFileSize(value uint64) (err error) { + return instance.SetProperty("FileSize", (value)) +} + +// GetFileSize gets the value of FileSize for the instance +func (instance *CIM_LogicalFile) GetPropertyFileSize() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileType sets the value of FileType for the instance +func (instance *CIM_LogicalFile) SetPropertyFileType(value string) (err error) { + return instance.SetProperty("FileType", (value)) +} + +// GetFileType gets the value of FileType for the instance +func (instance *CIM_LogicalFile) GetPropertyFileType() (value string, err error) { + retValue, err := instance.GetProperty("FileType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFSCreationClassName sets the value of FSCreationClassName for the instance +func (instance *CIM_LogicalFile) SetPropertyFSCreationClassName(value string) (err error) { + return instance.SetProperty("FSCreationClassName", (value)) +} + +// GetFSCreationClassName gets the value of FSCreationClassName for the instance +func (instance *CIM_LogicalFile) GetPropertyFSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("FSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFSName sets the value of FSName for the instance +func (instance *CIM_LogicalFile) SetPropertyFSName(value string) (err error) { + return instance.SetProperty("FSName", (value)) +} + +// GetFSName gets the value of FSName for the instance +func (instance *CIM_LogicalFile) GetPropertyFSName() (value string, err error) { + retValue, err := instance.GetProperty("FSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHidden sets the value of Hidden for the instance +func (instance *CIM_LogicalFile) SetPropertyHidden(value bool) (err error) { + return instance.SetProperty("Hidden", (value)) +} + +// GetHidden gets the value of Hidden for the instance +func (instance *CIM_LogicalFile) GetPropertyHidden() (value bool, err error) { + retValue, err := instance.GetProperty("Hidden") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInUseCount sets the value of InUseCount for the instance +func (instance *CIM_LogicalFile) SetPropertyInUseCount(value uint64) (err error) { + return instance.SetProperty("InUseCount", (value)) +} + +// GetInUseCount gets the value of InUseCount for the instance +func (instance *CIM_LogicalFile) GetPropertyInUseCount() (value uint64, err error) { + retValue, err := instance.GetProperty("InUseCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLastAccessed sets the value of LastAccessed for the instance +func (instance *CIM_LogicalFile) SetPropertyLastAccessed(value string) (err error) { + return instance.SetProperty("LastAccessed", (value)) +} + +// GetLastAccessed gets the value of LastAccessed for the instance +func (instance *CIM_LogicalFile) GetPropertyLastAccessed() (value string, err error) { + retValue, err := instance.GetProperty("LastAccessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastModified sets the value of LastModified for the instance +func (instance *CIM_LogicalFile) SetPropertyLastModified(value string) (err error) { + return instance.SetProperty("LastModified", (value)) +} + +// GetLastModified gets the value of LastModified for the instance +func (instance *CIM_LogicalFile) GetPropertyLastModified() (value string, err error) { + retValue, err := instance.GetProperty("LastModified") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPath sets the value of Path for the instance +func (instance *CIM_LogicalFile) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *CIM_LogicalFile) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReadable sets the value of Readable for the instance +func (instance *CIM_LogicalFile) SetPropertyReadable(value bool) (err error) { + return instance.SetProperty("Readable", (value)) +} + +// GetReadable gets the value of Readable for the instance +func (instance *CIM_LogicalFile) GetPropertyReadable() (value bool, err error) { + retValue, err := instance.GetProperty("Readable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSystem sets the value of System for the instance +func (instance *CIM_LogicalFile) SetPropertySystem(value bool) (err error) { + return instance.SetProperty("System", (value)) +} + +// GetSystem gets the value of System for the instance +func (instance *CIM_LogicalFile) GetPropertySystem() (value bool, err error) { + retValue, err := instance.GetProperty("System") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWriteable sets the value of Writeable for the instance +func (instance *CIM_LogicalFile) SetPropertyWriteable(value bool) (err error) { + return instance.SetProperty("Writeable", (value)) +} + +// GetWriteable gets the value of Writeable for the instance +func (instance *CIM_LogicalFile) GetPropertyWriteable() (value bool, err error) { + retValue, err := instance.GetProperty("Writeable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +func (instance *CIM_LogicalFile) TakeOwnerShip() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("TakeOwnerShip") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *CIM_LogicalFile) ChangeSecurityPermissions( /* IN */ SecurityDescriptor Win32_SecurityDescriptor, + /* IN */ Option uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ChangeSecurityPermissions", SecurityDescriptor, Option) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *CIM_LogicalFile) Copy( /* IN */ FileName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Copy", FileName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *CIM_LogicalFile) Rename( /* IN */ FileName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Rename", FileName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *CIM_LogicalFile) Delete() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Delete") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *CIM_LogicalFile) Compress() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Compress") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *CIM_LogicalFile) Uncompress() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Uncompress") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +// +func (instance *CIM_LogicalFile) TakeOwnerShipEx( /* OUT */ StopFileName string, + /* OPTIONAL IN */ StartFileName string, + /* OPTIONAL IN */ Recursive bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("TakeOwnerShipEx", StartFileName, Recursive) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +// +func (instance *CIM_LogicalFile) ChangeSecurityPermissionsEx( /* IN */ SecurityDescriptor Win32_SecurityDescriptor, + /* IN */ Option uint32, + /* OUT */ StopFileName string, + /* OPTIONAL IN */ StartFileName string, + /* OPTIONAL IN */ Recursive bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("ChangeSecurityPermissionsEx", SecurityDescriptor, Option, StartFileName, Recursive) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *CIM_LogicalFile) CopyEx( /* IN */ FileName string, + /* OUT */ StopFileName string, + /* OPTIONAL IN */ StartFileName string, + /* OPTIONAL IN */ Recursive bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CopyEx", FileName, StartFileName, Recursive) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *CIM_LogicalFile) DeleteEx( /* OUT */ StopFileName string, + /* OPTIONAL IN */ StartFileName string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteEx", StartFileName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *CIM_LogicalFile) CompressEx( /* OUT */ StopFileName string, + /* OPTIONAL IN */ StartFileName string, + /* OPTIONAL IN */ Recursive bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CompressEx", StartFileName, Recursive) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *CIM_LogicalFile) UncompressEx( /* OUT */ StopFileName string, + /* OPTIONAL IN */ StartFileName string, + /* OPTIONAL IN */ Recursive bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("UncompressEx", StartFileName, Recursive) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *CIM_LogicalFile) GetEffectivePermission( /* IN */ Permissions uint32) (result bool, err error) { + retVal, err := instance.InvokeMethodWithReturn("GetEffectivePermission", Permissions) + if err != nil { + return + } + result = (retVal > 0) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalIdentity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalIdentity.go new file mode 100644 index 00000000..ce6ae8e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_LogicalIdentity.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_LogicalIdentity struct +type CIM_LogicalIdentity struct { + *cim.WmiInstance + + // + SameElement CIM_LogicalElement + + // + SystemElement CIM_LogicalElement +} + +func NewCIM_LogicalIdentityEx1(instance *cim.WmiInstance) (newInstance *CIM_LogicalIdentity, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_LogicalIdentity{ + WmiInstance: tmp, + } + return +} + +func NewCIM_LogicalIdentityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_LogicalIdentity, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_LogicalIdentity{ + WmiInstance: tmp, + } + return +} + +// SetSameElement sets the value of SameElement for the instance +func (instance *CIM_LogicalIdentity) SetPropertySameElement(value CIM_LogicalElement) (err error) { + return instance.SetProperty("SameElement", (value)) +} + +// GetSameElement gets the value of SameElement for the instance +func (instance *CIM_LogicalIdentity) GetPropertySameElement() (value CIM_LogicalElement, err error) { + retValue, err := instance.GetProperty("SameElement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_LogicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_LogicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_LogicalElement(valuetmp) + + return +} + +// SetSystemElement sets the value of SystemElement for the instance +func (instance *CIM_LogicalIdentity) SetPropertySystemElement(value CIM_LogicalElement) (err error) { + return instance.SetProperty("SystemElement", (value)) +} + +// GetSystemElement gets the value of SystemElement for the instance +func (instance *CIM_LogicalIdentity) GetPropertySystemElement() (value CIM_LogicalElement, err error) { + retValue, err := instance.GetProperty("SystemElement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_LogicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_LogicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_LogicalElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MagnetoOpticalDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MagnetoOpticalDrive.go new file mode 100644 index 00000000..63da831d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MagnetoOpticalDrive.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_MagnetoOpticalDrive struct +type CIM_MagnetoOpticalDrive struct { + *CIM_MediaAccessDevice +} + +func NewCIM_MagnetoOpticalDriveEx1(instance *cim.WmiInstance) (newInstance *CIM_MagnetoOpticalDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MagnetoOpticalDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +func NewCIM_MagnetoOpticalDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MagnetoOpticalDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MagnetoOpticalDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagedSystemElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagedSystemElement.go new file mode 100644 index 00000000..8c44174c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagedSystemElement.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ManagedSystemElement struct +type CIM_ManagedSystemElement struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + InstallDate string + + // + Name string + + // + Status string +} + +func NewCIM_ManagedSystemElementEx1(instance *cim.WmiInstance) (newInstance *CIM_ManagedSystemElement, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ManagedSystemElement{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ManagedSystemElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ManagedSystemElement, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ManagedSystemElement{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_ManagedSystemElement) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_ManagedSystemElement) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_ManagedSystemElement) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_ManagedSystemElement) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallDate sets the value of InstallDate for the instance +func (instance *CIM_ManagedSystemElement) SetPropertyInstallDate(value string) (err error) { + return instance.SetProperty("InstallDate", (value)) +} + +// GetInstallDate gets the value of InstallDate for the instance +func (instance *CIM_ManagedSystemElement) GetPropertyInstallDate() (value string, err error) { + retValue, err := instance.GetProperty("InstallDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_ManagedSystemElement) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_ManagedSystemElement) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *CIM_ManagedSystemElement) SetPropertyStatus(value string) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *CIM_ManagedSystemElement) GetPropertyStatus() (value string, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagementController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagementController.go new file mode 100644 index 00000000..30770d94 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ManagementController.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ManagementController struct +type CIM_ManagementController struct { + *CIM_Controller +} + +func NewCIM_ManagementControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_ManagementController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ManagementController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_ManagementControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ManagementController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ManagementController{ + CIM_Controller: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaAccessDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaAccessDevice.go new file mode 100644 index 00000000..68ef7582 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaAccessDevice.go @@ -0,0 +1,352 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_MediaAccessDevice struct +type CIM_MediaAccessDevice struct { + *CIM_LogicalDevice + + // + Capabilities []uint16 + + // + CapabilityDescriptions []string + + // + CompressionMethod string + + // + DefaultBlockSize uint64 + + // + ErrorMethodology string + + // + MaxBlockSize uint64 + + // + MaxMediaSize uint64 + + // + MinBlockSize uint64 + + // + NeedsCleaning bool + + // + NumberOfMediaSupported uint32 +} + +func NewCIM_MediaAccessDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_MediaAccessDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MediaAccessDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_MediaAccessDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MediaAccessDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MediaAccessDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetCapabilities sets the value of Capabilities for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyCapabilities(value []uint16) (err error) { + return instance.SetProperty("Capabilities", (value)) +} + +// GetCapabilities gets the value of Capabilities for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("Capabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCapabilityDescriptions sets the value of CapabilityDescriptions for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyCapabilityDescriptions(value []string) (err error) { + return instance.SetProperty("CapabilityDescriptions", (value)) +} + +// GetCapabilityDescriptions gets the value of CapabilityDescriptions for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyCapabilityDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CapabilityDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCompressionMethod sets the value of CompressionMethod for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyCompressionMethod(value string) (err error) { + return instance.SetProperty("CompressionMethod", (value)) +} + +// GetCompressionMethod gets the value of CompressionMethod for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyCompressionMethod() (value string, err error) { + retValue, err := instance.GetProperty("CompressionMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDefaultBlockSize sets the value of DefaultBlockSize for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyDefaultBlockSize(value uint64) (err error) { + return instance.SetProperty("DefaultBlockSize", (value)) +} + +// GetDefaultBlockSize gets the value of DefaultBlockSize for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyDefaultBlockSize() (value uint64, err error) { + retValue, err := instance.GetProperty("DefaultBlockSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorMethodology sets the value of ErrorMethodology for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyErrorMethodology(value string) (err error) { + return instance.SetProperty("ErrorMethodology", (value)) +} + +// GetErrorMethodology gets the value of ErrorMethodology for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyErrorMethodology() (value string, err error) { + retValue, err := instance.GetProperty("ErrorMethodology") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaxBlockSize sets the value of MaxBlockSize for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyMaxBlockSize(value uint64) (err error) { + return instance.SetProperty("MaxBlockSize", (value)) +} + +// GetMaxBlockSize gets the value of MaxBlockSize for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyMaxBlockSize() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxBlockSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaxMediaSize sets the value of MaxMediaSize for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyMaxMediaSize(value uint64) (err error) { + return instance.SetProperty("MaxMediaSize", (value)) +} + +// GetMaxMediaSize gets the value of MaxMediaSize for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyMaxMediaSize() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxMediaSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMinBlockSize sets the value of MinBlockSize for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyMinBlockSize(value uint64) (err error) { + return instance.SetProperty("MinBlockSize", (value)) +} + +// GetMinBlockSize gets the value of MinBlockSize for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyMinBlockSize() (value uint64, err error) { + retValue, err := instance.GetProperty("MinBlockSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNeedsCleaning sets the value of NeedsCleaning for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyNeedsCleaning(value bool) (err error) { + return instance.SetProperty("NeedsCleaning", (value)) +} + +// GetNeedsCleaning gets the value of NeedsCleaning for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyNeedsCleaning() (value bool, err error) { + retValue, err := instance.GetProperty("NeedsCleaning") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNumberOfMediaSupported sets the value of NumberOfMediaSupported for the instance +func (instance *CIM_MediaAccessDevice) SetPropertyNumberOfMediaSupported(value uint32) (err error) { + return instance.SetProperty("NumberOfMediaSupported", (value)) +} + +// GetNumberOfMediaSupported gets the value of NumberOfMediaSupported for the instance +func (instance *CIM_MediaAccessDevice) GetPropertyNumberOfMediaSupported() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfMediaSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaPresent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaPresent.go new file mode 100644 index 00000000..ac806a61 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MediaPresent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_MediaPresent struct +type CIM_MediaPresent struct { + *CIM_Dependency +} + +func NewCIM_MediaPresentEx1(instance *cim.WmiInstance) (newInstance *CIM_MediaPresent, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MediaPresent{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_MediaPresentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MediaPresent, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MediaPresent{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Memory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Memory.go new file mode 100644 index 00000000..4cdea69b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Memory.go @@ -0,0 +1,472 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Memory struct +type CIM_Memory struct { + *CIM_StorageExtent + + // + AdditionalErrorData []uint8 + + // + CorrectableError bool + + // + EndingAddress uint64 + + // + ErrorAccess uint16 + + // + ErrorAddress uint64 + + // + ErrorData []uint8 + + // + ErrorDataOrder uint16 + + // + ErrorInfo uint16 + + // + ErrorResolution uint64 + + // + ErrorTime string + + // + ErrorTransferSize uint32 + + // + OtherErrorDescription string + + // + StartingAddress uint64 + + // + SystemLevelAddress bool +} + +func NewCIM_MemoryEx1(instance *cim.WmiInstance) (newInstance *CIM_Memory, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Memory{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_MemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Memory, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Memory{ + CIM_StorageExtent: tmp, + } + return +} + +// SetAdditionalErrorData sets the value of AdditionalErrorData for the instance +func (instance *CIM_Memory) SetPropertyAdditionalErrorData(value []uint8) (err error) { + return instance.SetProperty("AdditionalErrorData", (value)) +} + +// GetAdditionalErrorData gets the value of AdditionalErrorData for the instance +func (instance *CIM_Memory) GetPropertyAdditionalErrorData() (value []uint8, err error) { + retValue, err := instance.GetProperty("AdditionalErrorData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetCorrectableError sets the value of CorrectableError for the instance +func (instance *CIM_Memory) SetPropertyCorrectableError(value bool) (err error) { + return instance.SetProperty("CorrectableError", (value)) +} + +// GetCorrectableError gets the value of CorrectableError for the instance +func (instance *CIM_Memory) GetPropertyCorrectableError() (value bool, err error) { + retValue, err := instance.GetProperty("CorrectableError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEndingAddress sets the value of EndingAddress for the instance +func (instance *CIM_Memory) SetPropertyEndingAddress(value uint64) (err error) { + return instance.SetProperty("EndingAddress", (value)) +} + +// GetEndingAddress gets the value of EndingAddress for the instance +func (instance *CIM_Memory) GetPropertyEndingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("EndingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorAccess sets the value of ErrorAccess for the instance +func (instance *CIM_Memory) SetPropertyErrorAccess(value uint16) (err error) { + return instance.SetProperty("ErrorAccess", (value)) +} + +// GetErrorAccess gets the value of ErrorAccess for the instance +func (instance *CIM_Memory) GetPropertyErrorAccess() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorAccess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorAddress sets the value of ErrorAddress for the instance +func (instance *CIM_Memory) SetPropertyErrorAddress(value uint64) (err error) { + return instance.SetProperty("ErrorAddress", (value)) +} + +// GetErrorAddress gets the value of ErrorAddress for the instance +func (instance *CIM_Memory) GetPropertyErrorAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorData sets the value of ErrorData for the instance +func (instance *CIM_Memory) SetPropertyErrorData(value []uint8) (err error) { + return instance.SetProperty("ErrorData", (value)) +} + +// GetErrorData gets the value of ErrorData for the instance +func (instance *CIM_Memory) GetPropertyErrorData() (value []uint8, err error) { + retValue, err := instance.GetProperty("ErrorData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetErrorDataOrder sets the value of ErrorDataOrder for the instance +func (instance *CIM_Memory) SetPropertyErrorDataOrder(value uint16) (err error) { + return instance.SetProperty("ErrorDataOrder", (value)) +} + +// GetErrorDataOrder gets the value of ErrorDataOrder for the instance +func (instance *CIM_Memory) GetPropertyErrorDataOrder() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorDataOrder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorInfo sets the value of ErrorInfo for the instance +func (instance *CIM_Memory) SetPropertyErrorInfo(value uint16) (err error) { + return instance.SetProperty("ErrorInfo", (value)) +} + +// GetErrorInfo gets the value of ErrorInfo for the instance +func (instance *CIM_Memory) GetPropertyErrorInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorResolution sets the value of ErrorResolution for the instance +func (instance *CIM_Memory) SetPropertyErrorResolution(value uint64) (err error) { + return instance.SetProperty("ErrorResolution", (value)) +} + +// GetErrorResolution gets the value of ErrorResolution for the instance +func (instance *CIM_Memory) GetPropertyErrorResolution() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorTime sets the value of ErrorTime for the instance +func (instance *CIM_Memory) SetPropertyErrorTime(value string) (err error) { + return instance.SetProperty("ErrorTime", (value)) +} + +// GetErrorTime gets the value of ErrorTime for the instance +func (instance *CIM_Memory) GetPropertyErrorTime() (value string, err error) { + retValue, err := instance.GetProperty("ErrorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorTransferSize sets the value of ErrorTransferSize for the instance +func (instance *CIM_Memory) SetPropertyErrorTransferSize(value uint32) (err error) { + return instance.SetProperty("ErrorTransferSize", (value)) +} + +// GetErrorTransferSize gets the value of ErrorTransferSize for the instance +func (instance *CIM_Memory) GetPropertyErrorTransferSize() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorTransferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOtherErrorDescription sets the value of OtherErrorDescription for the instance +func (instance *CIM_Memory) SetPropertyOtherErrorDescription(value string) (err error) { + return instance.SetProperty("OtherErrorDescription", (value)) +} + +// GetOtherErrorDescription gets the value of OtherErrorDescription for the instance +func (instance *CIM_Memory) GetPropertyOtherErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_Memory) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_Memory) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemLevelAddress sets the value of SystemLevelAddress for the instance +func (instance *CIM_Memory) SetPropertySystemLevelAddress(value bool) (err error) { + return instance.SetProperty("SystemLevelAddress", (value)) +} + +// GetSystemLevelAddress gets the value of SystemLevelAddress for the instance +func (instance *CIM_Memory) GetPropertySystemLevelAddress() (value bool, err error) { + retValue, err := instance.GetProperty("SystemLevelAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCapacity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCapacity.go new file mode 100644 index 00000000..70cd49d7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCapacity.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_MemoryCapacity struct +type CIM_MemoryCapacity struct { + *CIM_PhysicalCapacity + + // + MaximumMemoryCapacity uint64 + + // + MemoryType uint16 + + // + MinimumMemoryCapacity uint64 +} + +func NewCIM_MemoryCapacityEx1(instance *cim.WmiInstance) (newInstance *CIM_MemoryCapacity, err error) { + tmp, err := NewCIM_PhysicalCapacityEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MemoryCapacity{ + CIM_PhysicalCapacity: tmp, + } + return +} + +func NewCIM_MemoryCapacityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MemoryCapacity, err error) { + tmp, err := NewCIM_PhysicalCapacityEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MemoryCapacity{ + CIM_PhysicalCapacity: tmp, + } + return +} + +// SetMaximumMemoryCapacity sets the value of MaximumMemoryCapacity for the instance +func (instance *CIM_MemoryCapacity) SetPropertyMaximumMemoryCapacity(value uint64) (err error) { + return instance.SetProperty("MaximumMemoryCapacity", (value)) +} + +// GetMaximumMemoryCapacity gets the value of MaximumMemoryCapacity for the instance +func (instance *CIM_MemoryCapacity) GetPropertyMaximumMemoryCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumMemoryCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryType sets the value of MemoryType for the instance +func (instance *CIM_MemoryCapacity) SetPropertyMemoryType(value uint16) (err error) { + return instance.SetProperty("MemoryType", (value)) +} + +// GetMemoryType gets the value of MemoryType for the instance +func (instance *CIM_MemoryCapacity) GetPropertyMemoryType() (value uint16, err error) { + retValue, err := instance.GetProperty("MemoryType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMinimumMemoryCapacity sets the value of MinimumMemoryCapacity for the instance +func (instance *CIM_MemoryCapacity) SetPropertyMinimumMemoryCapacity(value uint64) (err error) { + return instance.SetProperty("MinimumMemoryCapacity", (value)) +} + +// GetMinimumMemoryCapacity gets the value of MinimumMemoryCapacity for the instance +func (instance *CIM_MemoryCapacity) GetPropertyMinimumMemoryCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("MinimumMemoryCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCheck.go new file mode 100644 index 00000000..458451b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryCheck.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_MemoryCheck struct +type CIM_MemoryCheck struct { + *CIM_Check + + // + MemorySize uint64 +} + +func NewCIM_MemoryCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_MemoryCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MemoryCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_MemoryCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MemoryCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MemoryCheck{ + CIM_Check: tmp, + } + return +} + +// SetMemorySize sets the value of MemorySize for the instance +func (instance *CIM_MemoryCheck) SetPropertyMemorySize(value uint64) (err error) { + return instance.SetProperty("MemorySize", (value)) +} + +// GetMemorySize gets the value of MemorySize for the instance +func (instance *CIM_MemoryCheck) GetPropertyMemorySize() (value uint64, err error) { + retValue, err := instance.GetProperty("MemorySize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryMappedIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryMappedIO.go new file mode 100644 index 00000000..c5eb5bbe --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryMappedIO.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_MemoryMappedIO struct +type CIM_MemoryMappedIO struct { + *CIM_SystemResource + + // + CreationClassName string + + // + CSCreationClassName string + + // + CSName string + + // + EndingAddress uint64 + + // + StartingAddress uint64 +} + +func NewCIM_MemoryMappedIOEx1(instance *cim.WmiInstance) (newInstance *CIM_MemoryMappedIO, err error) { + tmp, err := NewCIM_SystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MemoryMappedIO{ + CIM_SystemResource: tmp, + } + return +} + +func NewCIM_MemoryMappedIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MemoryMappedIO, err error) { + tmp, err := NewCIM_SystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MemoryMappedIO{ + CIM_SystemResource: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_MemoryMappedIO) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_MemoryMappedIO) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_MemoryMappedIO) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_MemoryMappedIO) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_MemoryMappedIO) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_MemoryMappedIO) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEndingAddress sets the value of EndingAddress for the instance +func (instance *CIM_MemoryMappedIO) SetPropertyEndingAddress(value uint64) (err error) { + return instance.SetProperty("EndingAddress", (value)) +} + +// GetEndingAddress gets the value of EndingAddress for the instance +func (instance *CIM_MemoryMappedIO) GetPropertyEndingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("EndingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_MemoryMappedIO) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_MemoryMappedIO) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryOnCard.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryOnCard.go new file mode 100644 index 00000000..e5ec4431 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryOnCard.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_MemoryOnCard struct +type CIM_MemoryOnCard struct { + *CIM_PackagedComponent +} + +func NewCIM_MemoryOnCardEx1(instance *cim.WmiInstance) (newInstance *CIM_MemoryOnCard, err error) { + tmp, err := NewCIM_PackagedComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MemoryOnCard{ + CIM_PackagedComponent: tmp, + } + return +} + +func NewCIM_MemoryOnCardEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MemoryOnCard, err error) { + tmp, err := NewCIM_PackagedComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MemoryOnCard{ + CIM_PackagedComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryWithMedia.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryWithMedia.go new file mode 100644 index 00000000..4e46e5fa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MemoryWithMedia.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_MemoryWithMedia struct +type CIM_MemoryWithMedia struct { + *CIM_Dependency +} + +func NewCIM_MemoryWithMediaEx1(instance *cim.WmiInstance) (newInstance *CIM_MemoryWithMedia, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MemoryWithMedia{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_MemoryWithMediaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MemoryWithMedia, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MemoryWithMedia{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ModifySettingAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ModifySettingAction.go new file mode 100644 index 00000000..8282a27a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ModifySettingAction.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ModifySettingAction struct +type CIM_ModifySettingAction struct { + *CIM_Action + + // + ActionType uint16 + + // + EntryName string + + // + EntryValue string + + // + FileName string + + // + SectionKey string +} + +func NewCIM_ModifySettingActionEx1(instance *cim.WmiInstance) (newInstance *CIM_ModifySettingAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ModifySettingAction{ + CIM_Action: tmp, + } + return +} + +func NewCIM_ModifySettingActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ModifySettingAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ModifySettingAction{ + CIM_Action: tmp, + } + return +} + +// SetActionType sets the value of ActionType for the instance +func (instance *CIM_ModifySettingAction) SetPropertyActionType(value uint16) (err error) { + return instance.SetProperty("ActionType", (value)) +} + +// GetActionType gets the value of ActionType for the instance +func (instance *CIM_ModifySettingAction) GetPropertyActionType() (value uint16, err error) { + retValue, err := instance.GetProperty("ActionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEntryName sets the value of EntryName for the instance +func (instance *CIM_ModifySettingAction) SetPropertyEntryName(value string) (err error) { + return instance.SetProperty("EntryName", (value)) +} + +// GetEntryName gets the value of EntryName for the instance +func (instance *CIM_ModifySettingAction) GetPropertyEntryName() (value string, err error) { + retValue, err := instance.GetProperty("EntryName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEntryValue sets the value of EntryValue for the instance +func (instance *CIM_ModifySettingAction) SetPropertyEntryValue(value string) (err error) { + return instance.SetProperty("EntryValue", (value)) +} + +// GetEntryValue gets the value of EntryValue for the instance +func (instance *CIM_ModifySettingAction) GetPropertyEntryValue() (value string, err error) { + retValue, err := instance.GetProperty("EntryValue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_ModifySettingAction) SetPropertyFileName(value string) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_ModifySettingAction) GetPropertyFileName() (value string, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSectionKey sets the value of SectionKey for the instance +func (instance *CIM_ModifySettingAction) SetPropertySectionKey(value string) (err error) { + return instance.SetProperty("SectionKey", (value)) +} + +// GetSectionKey gets the value of SectionKey for the instance +func (instance *CIM_ModifySettingAction) GetPropertySectionKey() (value string, err error) { + retValue, err := instance.GetProperty("SectionKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorResolution.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorResolution.go new file mode 100644 index 00000000..7224e117 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorResolution.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_MonitorResolution struct +type CIM_MonitorResolution struct { + *CIM_Setting + + // + HorizontalResolution uint32 + + // + MaxRefreshRate uint32 + + // + MinRefreshRate uint32 + + // + RefreshRate uint32 + + // + ScanMode uint16 + + // + VerticalResolution uint32 +} + +func NewCIM_MonitorResolutionEx1(instance *cim.WmiInstance) (newInstance *CIM_MonitorResolution, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MonitorResolution{ + CIM_Setting: tmp, + } + return +} + +func NewCIM_MonitorResolutionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MonitorResolution, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MonitorResolution{ + CIM_Setting: tmp, + } + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *CIM_MonitorResolution) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *CIM_MonitorResolution) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxRefreshRate sets the value of MaxRefreshRate for the instance +func (instance *CIM_MonitorResolution) SetPropertyMaxRefreshRate(value uint32) (err error) { + return instance.SetProperty("MaxRefreshRate", (value)) +} + +// GetMaxRefreshRate gets the value of MaxRefreshRate for the instance +func (instance *CIM_MonitorResolution) GetPropertyMaxRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinRefreshRate sets the value of MinRefreshRate for the instance +func (instance *CIM_MonitorResolution) SetPropertyMinRefreshRate(value uint32) (err error) { + return instance.SetProperty("MinRefreshRate", (value)) +} + +// GetMinRefreshRate gets the value of MinRefreshRate for the instance +func (instance *CIM_MonitorResolution) GetPropertyMinRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MinRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRefreshRate sets the value of RefreshRate for the instance +func (instance *CIM_MonitorResolution) SetPropertyRefreshRate(value uint32) (err error) { + return instance.SetProperty("RefreshRate", (value)) +} + +// GetRefreshRate gets the value of RefreshRate for the instance +func (instance *CIM_MonitorResolution) GetPropertyRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("RefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScanMode sets the value of ScanMode for the instance +func (instance *CIM_MonitorResolution) SetPropertyScanMode(value uint16) (err error) { + return instance.SetProperty("ScanMode", (value)) +} + +// GetScanMode gets the value of ScanMode for the instance +func (instance *CIM_MonitorResolution) GetPropertyScanMode() (value uint16, err error) { + retValue, err := instance.GetProperty("ScanMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *CIM_MonitorResolution) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *CIM_MonitorResolution) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorSetting.go new file mode 100644 index 00000000..3e2b7700 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MonitorSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_MonitorSetting struct +type CIM_MonitorSetting struct { + *CIM_ElementSetting +} + +func NewCIM_MonitorSettingEx1(instance *cim.WmiInstance) (newInstance *CIM_MonitorSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MonitorSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewCIM_MonitorSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MonitorSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MonitorSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Mount.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Mount.go new file mode 100644 index 00000000..d887dae6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Mount.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Mount struct +type CIM_Mount struct { + *CIM_Dependency +} + +func NewCIM_MountEx1(instance *cim.WmiInstance) (newInstance *CIM_Mount, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Mount{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_MountEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Mount, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Mount{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MultiStateSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MultiStateSensor.go new file mode 100644 index 00000000..4ed303fc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_MultiStateSensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_MultiStateSensor struct +type CIM_MultiStateSensor struct { + *CIM_Sensor +} + +func NewCIM_MultiStateSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_MultiStateSensor, err error) { + tmp, err := NewCIM_SensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_MultiStateSensor{ + CIM_Sensor: tmp, + } + return +} + +func NewCIM_MultiStateSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_MultiStateSensor, err error) { + tmp, err := NewCIM_SensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_MultiStateSensor{ + CIM_Sensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NFS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NFS.go new file mode 100644 index 00000000..9eaa9d30 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NFS.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_NFS struct +type CIM_NFS struct { + *CIM_RemoteFileSystem + + // + AttributeCaching bool + + // + AttributeCachingForDirectoriesMax uint16 + + // + AttributeCachingForDirectoriesMin uint16 + + // + AttributeCachingForRegularFilesMax uint16 + + // + AttributeCachingForRegularFilesMin uint16 + + // + ForegroundMount bool + + // + HardMount bool + + // + Interrupt bool + + // + MountFailureRetries uint16 + + // + ReadBufferSize uint64 + + // + RetransmissionAttempts uint16 + + // + RetransmissionTimeout uint32 + + // + ServerCommunicationPort uint32 + + // + WriteBufferSize uint64 +} + +func NewCIM_NFSEx1(instance *cim.WmiInstance) (newInstance *CIM_NFS, err error) { + tmp, err := NewCIM_RemoteFileSystemEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_NFS{ + CIM_RemoteFileSystem: tmp, + } + return +} + +func NewCIM_NFSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_NFS, err error) { + tmp, err := NewCIM_RemoteFileSystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_NFS{ + CIM_RemoteFileSystem: tmp, + } + return +} + +// SetAttributeCaching sets the value of AttributeCaching for the instance +func (instance *CIM_NFS) SetPropertyAttributeCaching(value bool) (err error) { + return instance.SetProperty("AttributeCaching", (value)) +} + +// GetAttributeCaching gets the value of AttributeCaching for the instance +func (instance *CIM_NFS) GetPropertyAttributeCaching() (value bool, err error) { + retValue, err := instance.GetProperty("AttributeCaching") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAttributeCachingForDirectoriesMax sets the value of AttributeCachingForDirectoriesMax for the instance +func (instance *CIM_NFS) SetPropertyAttributeCachingForDirectoriesMax(value uint16) (err error) { + return instance.SetProperty("AttributeCachingForDirectoriesMax", (value)) +} + +// GetAttributeCachingForDirectoriesMax gets the value of AttributeCachingForDirectoriesMax for the instance +func (instance *CIM_NFS) GetPropertyAttributeCachingForDirectoriesMax() (value uint16, err error) { + retValue, err := instance.GetProperty("AttributeCachingForDirectoriesMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAttributeCachingForDirectoriesMin sets the value of AttributeCachingForDirectoriesMin for the instance +func (instance *CIM_NFS) SetPropertyAttributeCachingForDirectoriesMin(value uint16) (err error) { + return instance.SetProperty("AttributeCachingForDirectoriesMin", (value)) +} + +// GetAttributeCachingForDirectoriesMin gets the value of AttributeCachingForDirectoriesMin for the instance +func (instance *CIM_NFS) GetPropertyAttributeCachingForDirectoriesMin() (value uint16, err error) { + retValue, err := instance.GetProperty("AttributeCachingForDirectoriesMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAttributeCachingForRegularFilesMax sets the value of AttributeCachingForRegularFilesMax for the instance +func (instance *CIM_NFS) SetPropertyAttributeCachingForRegularFilesMax(value uint16) (err error) { + return instance.SetProperty("AttributeCachingForRegularFilesMax", (value)) +} + +// GetAttributeCachingForRegularFilesMax gets the value of AttributeCachingForRegularFilesMax for the instance +func (instance *CIM_NFS) GetPropertyAttributeCachingForRegularFilesMax() (value uint16, err error) { + retValue, err := instance.GetProperty("AttributeCachingForRegularFilesMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAttributeCachingForRegularFilesMin sets the value of AttributeCachingForRegularFilesMin for the instance +func (instance *CIM_NFS) SetPropertyAttributeCachingForRegularFilesMin(value uint16) (err error) { + return instance.SetProperty("AttributeCachingForRegularFilesMin", (value)) +} + +// GetAttributeCachingForRegularFilesMin gets the value of AttributeCachingForRegularFilesMin for the instance +func (instance *CIM_NFS) GetPropertyAttributeCachingForRegularFilesMin() (value uint16, err error) { + retValue, err := instance.GetProperty("AttributeCachingForRegularFilesMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetForegroundMount sets the value of ForegroundMount for the instance +func (instance *CIM_NFS) SetPropertyForegroundMount(value bool) (err error) { + return instance.SetProperty("ForegroundMount", (value)) +} + +// GetForegroundMount gets the value of ForegroundMount for the instance +func (instance *CIM_NFS) GetPropertyForegroundMount() (value bool, err error) { + retValue, err := instance.GetProperty("ForegroundMount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHardMount sets the value of HardMount for the instance +func (instance *CIM_NFS) SetPropertyHardMount(value bool) (err error) { + return instance.SetProperty("HardMount", (value)) +} + +// GetHardMount gets the value of HardMount for the instance +func (instance *CIM_NFS) GetPropertyHardMount() (value bool, err error) { + retValue, err := instance.GetProperty("HardMount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInterrupt sets the value of Interrupt for the instance +func (instance *CIM_NFS) SetPropertyInterrupt(value bool) (err error) { + return instance.SetProperty("Interrupt", (value)) +} + +// GetInterrupt gets the value of Interrupt for the instance +func (instance *CIM_NFS) GetPropertyInterrupt() (value bool, err error) { + retValue, err := instance.GetProperty("Interrupt") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMountFailureRetries sets the value of MountFailureRetries for the instance +func (instance *CIM_NFS) SetPropertyMountFailureRetries(value uint16) (err error) { + return instance.SetProperty("MountFailureRetries", (value)) +} + +// GetMountFailureRetries gets the value of MountFailureRetries for the instance +func (instance *CIM_NFS) GetPropertyMountFailureRetries() (value uint16, err error) { + retValue, err := instance.GetProperty("MountFailureRetries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReadBufferSize sets the value of ReadBufferSize for the instance +func (instance *CIM_NFS) SetPropertyReadBufferSize(value uint64) (err error) { + return instance.SetProperty("ReadBufferSize", (value)) +} + +// GetReadBufferSize gets the value of ReadBufferSize for the instance +func (instance *CIM_NFS) GetPropertyReadBufferSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBufferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRetransmissionAttempts sets the value of RetransmissionAttempts for the instance +func (instance *CIM_NFS) SetPropertyRetransmissionAttempts(value uint16) (err error) { + return instance.SetProperty("RetransmissionAttempts", (value)) +} + +// GetRetransmissionAttempts gets the value of RetransmissionAttempts for the instance +func (instance *CIM_NFS) GetPropertyRetransmissionAttempts() (value uint16, err error) { + retValue, err := instance.GetProperty("RetransmissionAttempts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRetransmissionTimeout sets the value of RetransmissionTimeout for the instance +func (instance *CIM_NFS) SetPropertyRetransmissionTimeout(value uint32) (err error) { + return instance.SetProperty("RetransmissionTimeout", (value)) +} + +// GetRetransmissionTimeout gets the value of RetransmissionTimeout for the instance +func (instance *CIM_NFS) GetPropertyRetransmissionTimeout() (value uint32, err error) { + retValue, err := instance.GetProperty("RetransmissionTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerCommunicationPort sets the value of ServerCommunicationPort for the instance +func (instance *CIM_NFS) SetPropertyServerCommunicationPort(value uint32) (err error) { + return instance.SetProperty("ServerCommunicationPort", (value)) +} + +// GetServerCommunicationPort gets the value of ServerCommunicationPort for the instance +func (instance *CIM_NFS) GetPropertyServerCommunicationPort() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerCommunicationPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBufferSize sets the value of WriteBufferSize for the instance +func (instance *CIM_NFS) SetPropertyWriteBufferSize(value uint64) (err error) { + return instance.SetProperty("WriteBufferSize", (value)) +} + +// GetWriteBufferSize gets the value of WriteBufferSize for the instance +func (instance *CIM_NFS) GetPropertyWriteBufferSize() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBufferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NetworkAdapter.go new file mode 100644 index 00000000..eec25242 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NetworkAdapter.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_NetworkAdapter struct +type CIM_NetworkAdapter struct { + *CIM_LogicalDevice + + // + AutoSense bool + + // + MaxSpeed uint64 + + // + NetworkAddresses []string + + // + PermanentAddress string + + // + Speed uint64 +} + +func NewCIM_NetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *CIM_NetworkAdapter, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_NetworkAdapter{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_NetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_NetworkAdapter, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_NetworkAdapter{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetAutoSense sets the value of AutoSense for the instance +func (instance *CIM_NetworkAdapter) SetPropertyAutoSense(value bool) (err error) { + return instance.SetProperty("AutoSense", (value)) +} + +// GetAutoSense gets the value of AutoSense for the instance +func (instance *CIM_NetworkAdapter) GetPropertyAutoSense() (value bool, err error) { + retValue, err := instance.GetProperty("AutoSense") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMaxSpeed sets the value of MaxSpeed for the instance +func (instance *CIM_NetworkAdapter) SetPropertyMaxSpeed(value uint64) (err error) { + return instance.SetProperty("MaxSpeed", (value)) +} + +// GetMaxSpeed gets the value of MaxSpeed for the instance +func (instance *CIM_NetworkAdapter) GetPropertyMaxSpeed() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkAddresses sets the value of NetworkAddresses for the instance +func (instance *CIM_NetworkAdapter) SetPropertyNetworkAddresses(value []string) (err error) { + return instance.SetProperty("NetworkAddresses", (value)) +} + +// GetNetworkAddresses gets the value of NetworkAddresses for the instance +func (instance *CIM_NetworkAdapter) GetPropertyNetworkAddresses() (value []string, err error) { + retValue, err := instance.GetProperty("NetworkAddresses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPermanentAddress sets the value of PermanentAddress for the instance +func (instance *CIM_NetworkAdapter) SetPropertyPermanentAddress(value string) (err error) { + return instance.SetProperty("PermanentAddress", (value)) +} + +// GetPermanentAddress gets the value of PermanentAddress for the instance +func (instance *CIM_NetworkAdapter) GetPropertyPermanentAddress() (value string, err error) { + retValue, err := instance.GetProperty("PermanentAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeed sets the value of Speed for the instance +func (instance *CIM_NetworkAdapter) SetPropertySpeed(value uint64) (err error) { + return instance.SetProperty("Speed", (value)) +} + +// GetSpeed gets the value of Speed for the instance +func (instance *CIM_NetworkAdapter) GetPropertySpeed() (value uint64, err error) { + retValue, err := instance.GetProperty("Speed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NonVolatileStorage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NonVolatileStorage.go new file mode 100644 index 00000000..b75d04ab --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NonVolatileStorage.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_NonVolatileStorage struct +type CIM_NonVolatileStorage struct { + *CIM_Memory + + // + IsWriteable bool +} + +func NewCIM_NonVolatileStorageEx1(instance *cim.WmiInstance) (newInstance *CIM_NonVolatileStorage, err error) { + tmp, err := NewCIM_MemoryEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_NonVolatileStorage{ + CIM_Memory: tmp, + } + return +} + +func NewCIM_NonVolatileStorageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_NonVolatileStorage, err error) { + tmp, err := NewCIM_MemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_NonVolatileStorage{ + CIM_Memory: tmp, + } + return +} + +// SetIsWriteable sets the value of IsWriteable for the instance +func (instance *CIM_NonVolatileStorage) SetPropertyIsWriteable(value bool) (err error) { + return instance.SetProperty("IsWriteable", (value)) +} + +// GetIsWriteable gets the value of IsWriteable for the instance +func (instance *CIM_NonVolatileStorage) GetPropertyIsWriteable() (value bool, err error) { + retValue, err := instance.GetProperty("IsWriteable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NumericSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NumericSensor.go new file mode 100644 index 00000000..58957935 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_NumericSensor.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_NumericSensor struct +type CIM_NumericSensor struct { + *CIM_Sensor + + // + Accuracy int32 + + // + CurrentReading int32 + + // + IsLinear bool + + // + LowerThresholdCritical int32 + + // + LowerThresholdFatal int32 + + // + LowerThresholdNonCritical int32 + + // + MaxReadable int32 + + // + MinReadable int32 + + // + NominalReading int32 + + // + NormalMax int32 + + // + NormalMin int32 + + // + Resolution uint32 + + // + Tolerance int32 + + // + UpperThresholdCritical int32 + + // + UpperThresholdFatal int32 + + // + UpperThresholdNonCritical int32 +} + +func NewCIM_NumericSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_NumericSensor, err error) { + tmp, err := NewCIM_SensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_NumericSensor{ + CIM_Sensor: tmp, + } + return +} + +func NewCIM_NumericSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_NumericSensor, err error) { + tmp, err := NewCIM_SensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_NumericSensor{ + CIM_Sensor: tmp, + } + return +} + +// SetAccuracy sets the value of Accuracy for the instance +func (instance *CIM_NumericSensor) SetPropertyAccuracy(value int32) (err error) { + return instance.SetProperty("Accuracy", (value)) +} + +// GetAccuracy gets the value of Accuracy for the instance +func (instance *CIM_NumericSensor) GetPropertyAccuracy() (value int32, err error) { + retValue, err := instance.GetProperty("Accuracy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetCurrentReading sets the value of CurrentReading for the instance +func (instance *CIM_NumericSensor) SetPropertyCurrentReading(value int32) (err error) { + return instance.SetProperty("CurrentReading", (value)) +} + +// GetCurrentReading gets the value of CurrentReading for the instance +func (instance *CIM_NumericSensor) GetPropertyCurrentReading() (value int32, err error) { + retValue, err := instance.GetProperty("CurrentReading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetIsLinear sets the value of IsLinear for the instance +func (instance *CIM_NumericSensor) SetPropertyIsLinear(value bool) (err error) { + return instance.SetProperty("IsLinear", (value)) +} + +// GetIsLinear gets the value of IsLinear for the instance +func (instance *CIM_NumericSensor) GetPropertyIsLinear() (value bool, err error) { + retValue, err := instance.GetProperty("IsLinear") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLowerThresholdCritical sets the value of LowerThresholdCritical for the instance +func (instance *CIM_NumericSensor) SetPropertyLowerThresholdCritical(value int32) (err error) { + return instance.SetProperty("LowerThresholdCritical", (value)) +} + +// GetLowerThresholdCritical gets the value of LowerThresholdCritical for the instance +func (instance *CIM_NumericSensor) GetPropertyLowerThresholdCritical() (value int32, err error) { + retValue, err := instance.GetProperty("LowerThresholdCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetLowerThresholdFatal sets the value of LowerThresholdFatal for the instance +func (instance *CIM_NumericSensor) SetPropertyLowerThresholdFatal(value int32) (err error) { + return instance.SetProperty("LowerThresholdFatal", (value)) +} + +// GetLowerThresholdFatal gets the value of LowerThresholdFatal for the instance +func (instance *CIM_NumericSensor) GetPropertyLowerThresholdFatal() (value int32, err error) { + retValue, err := instance.GetProperty("LowerThresholdFatal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetLowerThresholdNonCritical sets the value of LowerThresholdNonCritical for the instance +func (instance *CIM_NumericSensor) SetPropertyLowerThresholdNonCritical(value int32) (err error) { + return instance.SetProperty("LowerThresholdNonCritical", (value)) +} + +// GetLowerThresholdNonCritical gets the value of LowerThresholdNonCritical for the instance +func (instance *CIM_NumericSensor) GetPropertyLowerThresholdNonCritical() (value int32, err error) { + retValue, err := instance.GetProperty("LowerThresholdNonCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMaxReadable sets the value of MaxReadable for the instance +func (instance *CIM_NumericSensor) SetPropertyMaxReadable(value int32) (err error) { + return instance.SetProperty("MaxReadable", (value)) +} + +// GetMaxReadable gets the value of MaxReadable for the instance +func (instance *CIM_NumericSensor) GetPropertyMaxReadable() (value int32, err error) { + retValue, err := instance.GetProperty("MaxReadable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMinReadable sets the value of MinReadable for the instance +func (instance *CIM_NumericSensor) SetPropertyMinReadable(value int32) (err error) { + return instance.SetProperty("MinReadable", (value)) +} + +// GetMinReadable gets the value of MinReadable for the instance +func (instance *CIM_NumericSensor) GetPropertyMinReadable() (value int32, err error) { + retValue, err := instance.GetProperty("MinReadable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetNominalReading sets the value of NominalReading for the instance +func (instance *CIM_NumericSensor) SetPropertyNominalReading(value int32) (err error) { + return instance.SetProperty("NominalReading", (value)) +} + +// GetNominalReading gets the value of NominalReading for the instance +func (instance *CIM_NumericSensor) GetPropertyNominalReading() (value int32, err error) { + retValue, err := instance.GetProperty("NominalReading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetNormalMax sets the value of NormalMax for the instance +func (instance *CIM_NumericSensor) SetPropertyNormalMax(value int32) (err error) { + return instance.SetProperty("NormalMax", (value)) +} + +// GetNormalMax gets the value of NormalMax for the instance +func (instance *CIM_NumericSensor) GetPropertyNormalMax() (value int32, err error) { + retValue, err := instance.GetProperty("NormalMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetNormalMin sets the value of NormalMin for the instance +func (instance *CIM_NumericSensor) SetPropertyNormalMin(value int32) (err error) { + return instance.SetProperty("NormalMin", (value)) +} + +// GetNormalMin gets the value of NormalMin for the instance +func (instance *CIM_NumericSensor) GetPropertyNormalMin() (value int32, err error) { + retValue, err := instance.GetProperty("NormalMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetResolution sets the value of Resolution for the instance +func (instance *CIM_NumericSensor) SetPropertyResolution(value uint32) (err error) { + return instance.SetProperty("Resolution", (value)) +} + +// GetResolution gets the value of Resolution for the instance +func (instance *CIM_NumericSensor) GetPropertyResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("Resolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTolerance sets the value of Tolerance for the instance +func (instance *CIM_NumericSensor) SetPropertyTolerance(value int32) (err error) { + return instance.SetProperty("Tolerance", (value)) +} + +// GetTolerance gets the value of Tolerance for the instance +func (instance *CIM_NumericSensor) GetPropertyTolerance() (value int32, err error) { + retValue, err := instance.GetProperty("Tolerance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetUpperThresholdCritical sets the value of UpperThresholdCritical for the instance +func (instance *CIM_NumericSensor) SetPropertyUpperThresholdCritical(value int32) (err error) { + return instance.SetProperty("UpperThresholdCritical", (value)) +} + +// GetUpperThresholdCritical gets the value of UpperThresholdCritical for the instance +func (instance *CIM_NumericSensor) GetPropertyUpperThresholdCritical() (value int32, err error) { + retValue, err := instance.GetProperty("UpperThresholdCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetUpperThresholdFatal sets the value of UpperThresholdFatal for the instance +func (instance *CIM_NumericSensor) SetPropertyUpperThresholdFatal(value int32) (err error) { + return instance.SetProperty("UpperThresholdFatal", (value)) +} + +// GetUpperThresholdFatal gets the value of UpperThresholdFatal for the instance +func (instance *CIM_NumericSensor) GetPropertyUpperThresholdFatal() (value int32, err error) { + retValue, err := instance.GetProperty("UpperThresholdFatal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetUpperThresholdNonCritical sets the value of UpperThresholdNonCritical for the instance +func (instance *CIM_NumericSensor) SetPropertyUpperThresholdNonCritical(value int32) (err error) { + return instance.SetProperty("UpperThresholdNonCritical", (value)) +} + +// GetUpperThresholdNonCritical gets the value of UpperThresholdNonCritical for the instance +func (instance *CIM_NumericSensor) GetPropertyUpperThresholdNonCritical() (value int32, err error) { + retValue, err := instance.GetProperty("UpperThresholdNonCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSProcess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSProcess.go new file mode 100644 index 00000000..ad814233 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSProcess.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_OSProcess struct +type CIM_OSProcess struct { + *CIM_Component +} + +func NewCIM_OSProcessEx1(instance *cim.WmiInstance) (newInstance *CIM_OSProcess, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_OSProcess{ + CIM_Component: tmp, + } + return +} + +func NewCIM_OSProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_OSProcess, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_OSProcess{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSVersionCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSVersionCheck.go new file mode 100644 index 00000000..359d9f5a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OSVersionCheck.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_OSVersionCheck struct +type CIM_OSVersionCheck struct { + *CIM_Check + + // + MaximumVersion string + + // + MinimumVersion string +} + +func NewCIM_OSVersionCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_OSVersionCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_OSVersionCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_OSVersionCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_OSVersionCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_OSVersionCheck{ + CIM_Check: tmp, + } + return +} + +// SetMaximumVersion sets the value of MaximumVersion for the instance +func (instance *CIM_OSVersionCheck) SetPropertyMaximumVersion(value string) (err error) { + return instance.SetProperty("MaximumVersion", (value)) +} + +// GetMaximumVersion gets the value of MaximumVersion for the instance +func (instance *CIM_OSVersionCheck) GetPropertyMaximumVersion() (value string, err error) { + retValue, err := instance.GetProperty("MaximumVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMinimumVersion sets the value of MinimumVersion for the instance +func (instance *CIM_OSVersionCheck) SetPropertyMinimumVersion(value string) (err error) { + return instance.SetProperty("MinimumVersion", (value)) +} + +// GetMinimumVersion gets the value of MinimumVersion for the instance +func (instance *CIM_OSVersionCheck) GetPropertyMinimumVersion() (value string, err error) { + retValue, err := instance.GetProperty("MinimumVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystem.go new file mode 100644 index 00000000..9a06e756 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystem.go @@ -0,0 +1,736 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_OperatingSystem struct +type CIM_OperatingSystem struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + CSCreationClassName string + + // + CSName string + + // + CurrentTimeZone int16 + + // + Distributed bool + + // + FreePhysicalMemory uint64 + + // + FreeSpaceInPagingFiles uint64 + + // + FreeVirtualMemory uint64 + + // + LastBootUpTime string + + // + LocalDateTime string + + // + MaxNumberOfProcesses uint32 + + // + MaxProcessMemorySize uint64 + + // + NumberOfLicensedUsers uint32 + + // + NumberOfProcesses uint32 + + // + NumberOfUsers uint32 + + // + OSType uint16 + + // + OtherTypeDescription string + + // + SizeStoredInPagingFiles uint64 + + // + TotalSwapSpaceSize uint64 + + // + TotalVirtualMemorySize uint64 + + // + TotalVisibleMemorySize uint64 + + // + Version string +} + +func NewCIM_OperatingSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_OperatingSystem, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_OperatingSystem{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_OperatingSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_OperatingSystem, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_OperatingSystem{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_OperatingSystem) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_OperatingSystem) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_OperatingSystem) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_OperatingSystem) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_OperatingSystem) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_OperatingSystem) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentTimeZone sets the value of CurrentTimeZone for the instance +func (instance *CIM_OperatingSystem) SetPropertyCurrentTimeZone(value int16) (err error) { + return instance.SetProperty("CurrentTimeZone", (value)) +} + +// GetCurrentTimeZone gets the value of CurrentTimeZone for the instance +func (instance *CIM_OperatingSystem) GetPropertyCurrentTimeZone() (value int16, err error) { + retValue, err := instance.GetProperty("CurrentTimeZone") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetDistributed sets the value of Distributed for the instance +func (instance *CIM_OperatingSystem) SetPropertyDistributed(value bool) (err error) { + return instance.SetProperty("Distributed", (value)) +} + +// GetDistributed gets the value of Distributed for the instance +func (instance *CIM_OperatingSystem) GetPropertyDistributed() (value bool, err error) { + retValue, err := instance.GetProperty("Distributed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFreePhysicalMemory sets the value of FreePhysicalMemory for the instance +func (instance *CIM_OperatingSystem) SetPropertyFreePhysicalMemory(value uint64) (err error) { + return instance.SetProperty("FreePhysicalMemory", (value)) +} + +// GetFreePhysicalMemory gets the value of FreePhysicalMemory for the instance +func (instance *CIM_OperatingSystem) GetPropertyFreePhysicalMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("FreePhysicalMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFreeSpaceInPagingFiles sets the value of FreeSpaceInPagingFiles for the instance +func (instance *CIM_OperatingSystem) SetPropertyFreeSpaceInPagingFiles(value uint64) (err error) { + return instance.SetProperty("FreeSpaceInPagingFiles", (value)) +} + +// GetFreeSpaceInPagingFiles gets the value of FreeSpaceInPagingFiles for the instance +func (instance *CIM_OperatingSystem) GetPropertyFreeSpaceInPagingFiles() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeSpaceInPagingFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFreeVirtualMemory sets the value of FreeVirtualMemory for the instance +func (instance *CIM_OperatingSystem) SetPropertyFreeVirtualMemory(value uint64) (err error) { + return instance.SetProperty("FreeVirtualMemory", (value)) +} + +// GetFreeVirtualMemory gets the value of FreeVirtualMemory for the instance +func (instance *CIM_OperatingSystem) GetPropertyFreeVirtualMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeVirtualMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLastBootUpTime sets the value of LastBootUpTime for the instance +func (instance *CIM_OperatingSystem) SetPropertyLastBootUpTime(value string) (err error) { + return instance.SetProperty("LastBootUpTime", (value)) +} + +// GetLastBootUpTime gets the value of LastBootUpTime for the instance +func (instance *CIM_OperatingSystem) GetPropertyLastBootUpTime() (value string, err error) { + retValue, err := instance.GetProperty("LastBootUpTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalDateTime sets the value of LocalDateTime for the instance +func (instance *CIM_OperatingSystem) SetPropertyLocalDateTime(value string) (err error) { + return instance.SetProperty("LocalDateTime", (value)) +} + +// GetLocalDateTime gets the value of LocalDateTime for the instance +func (instance *CIM_OperatingSystem) GetPropertyLocalDateTime() (value string, err error) { + retValue, err := instance.GetProperty("LocalDateTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaxNumberOfProcesses sets the value of MaxNumberOfProcesses for the instance +func (instance *CIM_OperatingSystem) SetPropertyMaxNumberOfProcesses(value uint32) (err error) { + return instance.SetProperty("MaxNumberOfProcesses", (value)) +} + +// GetMaxNumberOfProcesses gets the value of MaxNumberOfProcesses for the instance +func (instance *CIM_OperatingSystem) GetPropertyMaxNumberOfProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxNumberOfProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxProcessMemorySize sets the value of MaxProcessMemorySize for the instance +func (instance *CIM_OperatingSystem) SetPropertyMaxProcessMemorySize(value uint64) (err error) { + return instance.SetProperty("MaxProcessMemorySize", (value)) +} + +// GetMaxProcessMemorySize gets the value of MaxProcessMemorySize for the instance +func (instance *CIM_OperatingSystem) GetPropertyMaxProcessMemorySize() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxProcessMemorySize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberOfLicensedUsers sets the value of NumberOfLicensedUsers for the instance +func (instance *CIM_OperatingSystem) SetPropertyNumberOfLicensedUsers(value uint32) (err error) { + return instance.SetProperty("NumberOfLicensedUsers", (value)) +} + +// GetNumberOfLicensedUsers gets the value of NumberOfLicensedUsers for the instance +func (instance *CIM_OperatingSystem) GetPropertyNumberOfLicensedUsers() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfLicensedUsers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfProcesses sets the value of NumberOfProcesses for the instance +func (instance *CIM_OperatingSystem) SetPropertyNumberOfProcesses(value uint32) (err error) { + return instance.SetProperty("NumberOfProcesses", (value)) +} + +// GetNumberOfProcesses gets the value of NumberOfProcesses for the instance +func (instance *CIM_OperatingSystem) GetPropertyNumberOfProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfUsers sets the value of NumberOfUsers for the instance +func (instance *CIM_OperatingSystem) SetPropertyNumberOfUsers(value uint32) (err error) { + return instance.SetProperty("NumberOfUsers", (value)) +} + +// GetNumberOfUsers gets the value of NumberOfUsers for the instance +func (instance *CIM_OperatingSystem) GetPropertyNumberOfUsers() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfUsers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOSType sets the value of OSType for the instance +func (instance *CIM_OperatingSystem) SetPropertyOSType(value uint16) (err error) { + return instance.SetProperty("OSType", (value)) +} + +// GetOSType gets the value of OSType for the instance +func (instance *CIM_OperatingSystem) GetPropertyOSType() (value uint16, err error) { + retValue, err := instance.GetProperty("OSType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOtherTypeDescription sets the value of OtherTypeDescription for the instance +func (instance *CIM_OperatingSystem) SetPropertyOtherTypeDescription(value string) (err error) { + return instance.SetProperty("OtherTypeDescription", (value)) +} + +// GetOtherTypeDescription gets the value of OtherTypeDescription for the instance +func (instance *CIM_OperatingSystem) GetPropertyOtherTypeDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherTypeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSizeStoredInPagingFiles sets the value of SizeStoredInPagingFiles for the instance +func (instance *CIM_OperatingSystem) SetPropertySizeStoredInPagingFiles(value uint64) (err error) { + return instance.SetProperty("SizeStoredInPagingFiles", (value)) +} + +// GetSizeStoredInPagingFiles gets the value of SizeStoredInPagingFiles for the instance +func (instance *CIM_OperatingSystem) GetPropertySizeStoredInPagingFiles() (value uint64, err error) { + retValue, err := instance.GetProperty("SizeStoredInPagingFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalSwapSpaceSize sets the value of TotalSwapSpaceSize for the instance +func (instance *CIM_OperatingSystem) SetPropertyTotalSwapSpaceSize(value uint64) (err error) { + return instance.SetProperty("TotalSwapSpaceSize", (value)) +} + +// GetTotalSwapSpaceSize gets the value of TotalSwapSpaceSize for the instance +func (instance *CIM_OperatingSystem) GetPropertyTotalSwapSpaceSize() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSwapSpaceSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualMemorySize sets the value of TotalVirtualMemorySize for the instance +func (instance *CIM_OperatingSystem) SetPropertyTotalVirtualMemorySize(value uint64) (err error) { + return instance.SetProperty("TotalVirtualMemorySize", (value)) +} + +// GetTotalVirtualMemorySize gets the value of TotalVirtualMemorySize for the instance +func (instance *CIM_OperatingSystem) GetPropertyTotalVirtualMemorySize() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualMemorySize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVisibleMemorySize sets the value of TotalVisibleMemorySize for the instance +func (instance *CIM_OperatingSystem) SetPropertyTotalVisibleMemorySize(value uint64) (err error) { + return instance.SetProperty("TotalVisibleMemorySize", (value)) +} + +// GetTotalVisibleMemorySize gets the value of TotalVisibleMemorySize for the instance +func (instance *CIM_OperatingSystem) GetPropertyTotalVisibleMemorySize() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVisibleMemorySize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_OperatingSystem) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_OperatingSystem) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *CIM_OperatingSystem) Reboot() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Reboot") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *CIM_OperatingSystem) Shutdown() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Shutdown") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystemSoftwareFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystemSoftwareFeature.go new file mode 100644 index 00000000..38ab2866 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_OperatingSystemSoftwareFeature.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_OperatingSystemSoftwareFeature struct +type CIM_OperatingSystemSoftwareFeature struct { + *CIM_Component +} + +func NewCIM_OperatingSystemSoftwareFeatureEx1(instance *cim.WmiInstance) (newInstance *CIM_OperatingSystemSoftwareFeature, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_OperatingSystemSoftwareFeature{ + CIM_Component: tmp, + } + return +} + +func NewCIM_OperatingSystemSoftwareFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_OperatingSystemSoftwareFeature, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_OperatingSystemSoftwareFeature{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCIController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCIController.go new file mode 100644 index 00000000..8d8a4aea --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCIController.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PCIController struct +type CIM_PCIController struct { + *CIM_Controller +} + +func NewCIM_PCIControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_PCIController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PCIController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_PCIControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PCIController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PCIController{ + CIM_Controller: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCMCIAController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCMCIAController.go new file mode 100644 index 00000000..2af44f64 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCMCIAController.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PCMCIAController struct +type CIM_PCMCIAController struct { + *CIM_Controller + + // + Manufacturer string +} + +func NewCIM_PCMCIAControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_PCMCIAController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PCMCIAController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_PCMCIAControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PCMCIAController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PCMCIAController{ + CIM_Controller: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *CIM_PCMCIAController) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *CIM_PCMCIAController) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCVideoController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCVideoController.go new file mode 100644 index 00000000..59389999 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PCVideoController.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PCVideoController struct +type CIM_PCVideoController struct { + *CIM_VideoController + + // + NumberOfColorPlanes uint16 + + // + VideoArchitecture uint16 + + // + VideoMode uint16 +} + +func NewCIM_PCVideoControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_PCVideoController, err error) { + tmp, err := NewCIM_VideoControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PCVideoController{ + CIM_VideoController: tmp, + } + return +} + +func NewCIM_PCVideoControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PCVideoController, err error) { + tmp, err := NewCIM_VideoControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PCVideoController{ + CIM_VideoController: tmp, + } + return +} + +// SetNumberOfColorPlanes sets the value of NumberOfColorPlanes for the instance +func (instance *CIM_PCVideoController) SetPropertyNumberOfColorPlanes(value uint16) (err error) { + return instance.SetProperty("NumberOfColorPlanes", (value)) +} + +// GetNumberOfColorPlanes gets the value of NumberOfColorPlanes for the instance +func (instance *CIM_PCVideoController) GetPropertyNumberOfColorPlanes() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfColorPlanes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVideoArchitecture sets the value of VideoArchitecture for the instance +func (instance *CIM_PCVideoController) SetPropertyVideoArchitecture(value uint16) (err error) { + return instance.SetProperty("VideoArchitecture", (value)) +} + +// GetVideoArchitecture gets the value of VideoArchitecture for the instance +func (instance *CIM_PCVideoController) GetPropertyVideoArchitecture() (value uint16, err error) { + retValue, err := instance.GetProperty("VideoArchitecture") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVideoMode sets the value of VideoMode for the instance +func (instance *CIM_PCVideoController) SetPropertyVideoMode(value uint16) (err error) { + return instance.SetProperty("VideoMode", (value)) +} + +// GetVideoMode gets the value of VideoMode for the instance +func (instance *CIM_PCVideoController) GetPropertyVideoMode() (value uint16, err error) { + retValue, err := instance.GetProperty("VideoMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PExtentRedundancyComponent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PExtentRedundancyComponent.go new file mode 100644 index 00000000..99a34283 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PExtentRedundancyComponent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PExtentRedundancyComponent struct +type CIM_PExtentRedundancyComponent struct { + *CIM_RedundancyComponent +} + +func NewCIM_PExtentRedundancyComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_PExtentRedundancyComponent, err error) { + tmp, err := NewCIM_RedundancyComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PExtentRedundancyComponent{ + CIM_RedundancyComponent: tmp, + } + return +} + +func NewCIM_PExtentRedundancyComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PExtentRedundancyComponent, err error) { + tmp, err := NewCIM_RedundancyComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PExtentRedundancyComponent{ + CIM_RedundancyComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PSExtentBasedOnPExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PSExtentBasedOnPExtent.go new file mode 100644 index 00000000..3bf20750 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PSExtentBasedOnPExtent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PSExtentBasedOnPExtent struct +type CIM_PSExtentBasedOnPExtent struct { + *CIM_BasedOn +} + +func NewCIM_PSExtentBasedOnPExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_PSExtentBasedOnPExtent, err error) { + tmp, err := NewCIM_BasedOnEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PSExtentBasedOnPExtent{ + CIM_BasedOn: tmp, + } + return +} + +func NewCIM_PSExtentBasedOnPExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PSExtentBasedOnPExtent, err error) { + tmp, err := NewCIM_BasedOnEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PSExtentBasedOnPExtent{ + CIM_BasedOn: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageAlarm.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageAlarm.go new file mode 100644 index 00000000..f3bb4a7e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageAlarm.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PackageAlarm struct +type CIM_PackageAlarm struct { + *CIM_Dependency +} + +func NewCIM_PackageAlarmEx1(instance *cim.WmiInstance) (newInstance *CIM_PackageAlarm, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PackageAlarm{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_PackageAlarmEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PackageAlarm, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PackageAlarm{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageCooling.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageCooling.go new file mode 100644 index 00000000..41a6e60a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageCooling.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PackageCooling struct +type CIM_PackageCooling struct { + *CIM_Dependency +} + +func NewCIM_PackageCoolingEx1(instance *cim.WmiInstance) (newInstance *CIM_PackageCooling, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PackageCooling{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_PackageCoolingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PackageCooling, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PackageCooling{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInChassis.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInChassis.go new file mode 100644 index 00000000..128c6f7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInChassis.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PackageInChassis struct +type CIM_PackageInChassis struct { + *CIM_Container +} + +func NewCIM_PackageInChassisEx1(instance *cim.WmiInstance) (newInstance *CIM_PackageInChassis, err error) { + tmp, err := NewCIM_ContainerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PackageInChassis{ + CIM_Container: tmp, + } + return +} + +func NewCIM_PackageInChassisEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PackageInChassis, err error) { + tmp, err := NewCIM_ContainerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PackageInChassis{ + CIM_Container: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInSlot.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInSlot.go new file mode 100644 index 00000000..c038a4c0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageInSlot.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PackageInSlot struct +type CIM_PackageInSlot struct { + *CIM_Dependency +} + +func NewCIM_PackageInSlotEx1(instance *cim.WmiInstance) (newInstance *CIM_PackageInSlot, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PackageInSlot{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_PackageInSlotEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PackageInSlot, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PackageInSlot{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageTempSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageTempSensor.go new file mode 100644 index 00000000..b4491804 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackageTempSensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PackageTempSensor struct +type CIM_PackageTempSensor struct { + *CIM_Dependency +} + +func NewCIM_PackageTempSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_PackageTempSensor, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PackageTempSensor{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_PackageTempSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PackageTempSensor, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PackageTempSensor{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackagedComponent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackagedComponent.go new file mode 100644 index 00000000..66539b7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PackagedComponent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_PackagedComponent struct +type CIM_PackagedComponent struct { + *CIM_Container +} + +func NewCIM_PackagedComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_PackagedComponent, err error) { + tmp, err := NewCIM_ContainerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PackagedComponent{ + CIM_Container: tmp, + } + return +} + +func NewCIM_PackagedComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PackagedComponent, err error) { + tmp, err := NewCIM_ContainerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PackagedComponent{ + CIM_Container: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParallelController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParallelController.go new file mode 100644 index 00000000..0dd0b65d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParallelController.go @@ -0,0 +1,142 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ParallelController struct +type CIM_ParallelController struct { + *CIM_Controller + + // + Capabilities []uint16 + + // + CapabilityDescriptions []string + + // + DMASupport bool +} + +func NewCIM_ParallelControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_ParallelController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ParallelController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_ParallelControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ParallelController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ParallelController{ + CIM_Controller: tmp, + } + return +} + +// SetCapabilities sets the value of Capabilities for the instance +func (instance *CIM_ParallelController) SetPropertyCapabilities(value []uint16) (err error) { + return instance.SetProperty("Capabilities", (value)) +} + +// GetCapabilities gets the value of Capabilities for the instance +func (instance *CIM_ParallelController) GetPropertyCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("Capabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCapabilityDescriptions sets the value of CapabilityDescriptions for the instance +func (instance *CIM_ParallelController) SetPropertyCapabilityDescriptions(value []string) (err error) { + return instance.SetProperty("CapabilityDescriptions", (value)) +} + +// GetCapabilityDescriptions gets the value of CapabilityDescriptions for the instance +func (instance *CIM_ParallelController) GetPropertyCapabilityDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CapabilityDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDMASupport sets the value of DMASupport for the instance +func (instance *CIM_ParallelController) SetPropertyDMASupport(value bool) (err error) { + return instance.SetProperty("DMASupport", (value)) +} + +// GetDMASupport gets the value of DMASupport for the instance +func (instance *CIM_ParallelController) GetPropertyDMASupport() (value bool, err error) { + retValue, err := instance.GetProperty("DMASupport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParticipatesInSet.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParticipatesInSet.go new file mode 100644 index 00000000..8380942f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ParticipatesInSet.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ParticipatesInSet struct +type CIM_ParticipatesInSet struct { + *cim.WmiInstance + + // + Element CIM_PhysicalElement + + // + Set CIM_ReplacementSet +} + +func NewCIM_ParticipatesInSetEx1(instance *cim.WmiInstance) (newInstance *CIM_ParticipatesInSet, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ParticipatesInSet{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ParticipatesInSetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ParticipatesInSet, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ParticipatesInSet{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_ParticipatesInSet) SetPropertyElement(value CIM_PhysicalElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_ParticipatesInSet) GetPropertyElement() (value CIM_PhysicalElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_PhysicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_PhysicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_PhysicalElement(valuetmp) + + return +} + +// SetSet sets the value of Set for the instance +func (instance *CIM_ParticipatesInSet) SetPropertySet(value CIM_ReplacementSet) (err error) { + return instance.SetProperty("Set", (value)) +} + +// GetSet gets the value of Set for the instance +func (instance *CIM_ParticipatesInSet) GetPropertySet() (value CIM_ReplacementSet, err error) { + retValue, err := instance.GetProperty("Set") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ReplacementSet) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ReplacementSet is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ReplacementSet(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalCapacity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalCapacity.go new file mode 100644 index 00000000..83b2874f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalCapacity.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalCapacity struct +type CIM_PhysicalCapacity struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + Name string +} + +func NewCIM_PhysicalCapacityEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalCapacity, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_PhysicalCapacity{ + WmiInstance: tmp, + } + return +} + +func NewCIM_PhysicalCapacityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalCapacity, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalCapacity{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_PhysicalCapacity) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_PhysicalCapacity) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_PhysicalCapacity) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_PhysicalCapacity) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_PhysicalCapacity) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_PhysicalCapacity) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalComponent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalComponent.go new file mode 100644 index 00000000..ac8a7a5a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalComponent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalComponent struct +type CIM_PhysicalComponent struct { + *CIM_PhysicalElement + + // + HotSwappable bool + + // + Removable bool + + // + Replaceable bool +} + +func NewCIM_PhysicalComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalComponent, err error) { + tmp, err := NewCIM_PhysicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalComponent{ + CIM_PhysicalElement: tmp, + } + return +} + +func NewCIM_PhysicalComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalComponent, err error) { + tmp, err := NewCIM_PhysicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalComponent{ + CIM_PhysicalElement: tmp, + } + return +} + +// SetHotSwappable sets the value of HotSwappable for the instance +func (instance *CIM_PhysicalComponent) SetPropertyHotSwappable(value bool) (err error) { + return instance.SetProperty("HotSwappable", (value)) +} + +// GetHotSwappable gets the value of HotSwappable for the instance +func (instance *CIM_PhysicalComponent) GetPropertyHotSwappable() (value bool, err error) { + retValue, err := instance.GetProperty("HotSwappable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRemovable sets the value of Removable for the instance +func (instance *CIM_PhysicalComponent) SetPropertyRemovable(value bool) (err error) { + return instance.SetProperty("Removable", (value)) +} + +// GetRemovable gets the value of Removable for the instance +func (instance *CIM_PhysicalComponent) GetPropertyRemovable() (value bool, err error) { + retValue, err := instance.GetProperty("Removable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReplaceable sets the value of Replaceable for the instance +func (instance *CIM_PhysicalComponent) SetPropertyReplaceable(value bool) (err error) { + return instance.SetProperty("Replaceable", (value)) +} + +// GetReplaceable gets the value of Replaceable for the instance +func (instance *CIM_PhysicalComponent) GetPropertyReplaceable() (value bool, err error) { + retValue, err := instance.GetProperty("Replaceable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalConnector.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalConnector.go new file mode 100644 index 00000000..c4158bfd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalConnector.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalConnector struct +type CIM_PhysicalConnector struct { + *CIM_PhysicalElement + + // + ConnectorPinout string + + // + ConnectorType []uint16 +} + +func NewCIM_PhysicalConnectorEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalConnector, err error) { + tmp, err := NewCIM_PhysicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalConnector{ + CIM_PhysicalElement: tmp, + } + return +} + +func NewCIM_PhysicalConnectorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalConnector, err error) { + tmp, err := NewCIM_PhysicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalConnector{ + CIM_PhysicalElement: tmp, + } + return +} + +// SetConnectorPinout sets the value of ConnectorPinout for the instance +func (instance *CIM_PhysicalConnector) SetPropertyConnectorPinout(value string) (err error) { + return instance.SetProperty("ConnectorPinout", (value)) +} + +// GetConnectorPinout gets the value of ConnectorPinout for the instance +func (instance *CIM_PhysicalConnector) GetPropertyConnectorPinout() (value string, err error) { + retValue, err := instance.GetProperty("ConnectorPinout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConnectorType sets the value of ConnectorType for the instance +func (instance *CIM_PhysicalConnector) SetPropertyConnectorType(value []uint16) (err error) { + return instance.SetProperty("ConnectorType", (value)) +} + +// GetConnectorType gets the value of ConnectorType for the instance +func (instance *CIM_PhysicalConnector) GetPropertyConnectorType() (value []uint16, err error) { + retValue, err := instance.GetProperty("ConnectorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElement.go new file mode 100644 index 00000000..86ff01e1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElement.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalElement struct +type CIM_PhysicalElement struct { + *CIM_ManagedSystemElement + + // + CreationClassName string + + // + Manufacturer string + + // + Model string + + // + OtherIdentifyingInfo string + + // + PartNumber string + + // + PoweredOn bool + + // + SerialNumber string + + // + SKU string + + // + Tag string + + // + Version string +} + +func NewCIM_PhysicalElementEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalElement, err error) { + tmp, err := NewCIM_ManagedSystemElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalElement{ + CIM_ManagedSystemElement: tmp, + } + return +} + +func NewCIM_PhysicalElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalElement, err error) { + tmp, err := NewCIM_ManagedSystemElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalElement{ + CIM_ManagedSystemElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_PhysicalElement) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_PhysicalElement) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *CIM_PhysicalElement) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *CIM_PhysicalElement) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *CIM_PhysicalElement) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *CIM_PhysicalElement) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherIdentifyingInfo sets the value of OtherIdentifyingInfo for the instance +func (instance *CIM_PhysicalElement) SetPropertyOtherIdentifyingInfo(value string) (err error) { + return instance.SetProperty("OtherIdentifyingInfo", (value)) +} + +// GetOtherIdentifyingInfo gets the value of OtherIdentifyingInfo for the instance +func (instance *CIM_PhysicalElement) GetPropertyOtherIdentifyingInfo() (value string, err error) { + retValue, err := instance.GetProperty("OtherIdentifyingInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPartNumber sets the value of PartNumber for the instance +func (instance *CIM_PhysicalElement) SetPropertyPartNumber(value string) (err error) { + return instance.SetProperty("PartNumber", (value)) +} + +// GetPartNumber gets the value of PartNumber for the instance +func (instance *CIM_PhysicalElement) GetPropertyPartNumber() (value string, err error) { + retValue, err := instance.GetProperty("PartNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPoweredOn sets the value of PoweredOn for the instance +func (instance *CIM_PhysicalElement) SetPropertyPoweredOn(value bool) (err error) { + return instance.SetProperty("PoweredOn", (value)) +} + +// GetPoweredOn gets the value of PoweredOn for the instance +func (instance *CIM_PhysicalElement) GetPropertyPoweredOn() (value bool, err error) { + retValue, err := instance.GetProperty("PoweredOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *CIM_PhysicalElement) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *CIM_PhysicalElement) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSKU sets the value of SKU for the instance +func (instance *CIM_PhysicalElement) SetPropertySKU(value string) (err error) { + return instance.SetProperty("SKU", (value)) +} + +// GetSKU gets the value of SKU for the instance +func (instance *CIM_PhysicalElement) GetPropertySKU() (value string, err error) { + retValue, err := instance.GetProperty("SKU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTag sets the value of Tag for the instance +func (instance *CIM_PhysicalElement) SetPropertyTag(value string) (err error) { + return instance.SetProperty("Tag", (value)) +} + +// GetTag gets the value of Tag for the instance +func (instance *CIM_PhysicalElement) GetPropertyTag() (value string, err error) { + retValue, err := instance.GetProperty("Tag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_PhysicalElement) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_PhysicalElement) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElementLocation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElementLocation.go new file mode 100644 index 00000000..5f2ffbc9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalElementLocation.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalElementLocation struct +type CIM_PhysicalElementLocation struct { + *cim.WmiInstance + + // + Element CIM_PhysicalElement + + // + PhysicalLocation CIM_Location +} + +func NewCIM_PhysicalElementLocationEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalElementLocation, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_PhysicalElementLocation{ + WmiInstance: tmp, + } + return +} + +func NewCIM_PhysicalElementLocationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalElementLocation, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalElementLocation{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_PhysicalElementLocation) SetPropertyElement(value CIM_PhysicalElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_PhysicalElementLocation) GetPropertyElement() (value CIM_PhysicalElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_PhysicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_PhysicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_PhysicalElement(valuetmp) + + return +} + +// SetPhysicalLocation sets the value of PhysicalLocation for the instance +func (instance *CIM_PhysicalElementLocation) SetPropertyPhysicalLocation(value CIM_Location) (err error) { + return instance.SetProperty("PhysicalLocation", (value)) +} + +// GetPhysicalLocation gets the value of PhysicalLocation for the instance +func (instance *CIM_PhysicalElementLocation) GetPropertyPhysicalLocation() (value CIM_Location, err error) { + retValue, err := instance.GetProperty("PhysicalLocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Location) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Location is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Location(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalExtent.go new file mode 100644 index 00000000..9a78f8b1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalExtent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalExtent struct +type CIM_PhysicalExtent struct { + *CIM_StorageExtent + + // + UnitsBeforeCheckDataInterleave uint64 + + // + UnitsOfCheckData uint64 + + // + UnitsOfUserData uint64 +} + +func NewCIM_PhysicalExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalExtent, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalExtent{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_PhysicalExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalExtent, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalExtent{ + CIM_StorageExtent: tmp, + } + return +} + +// SetUnitsBeforeCheckDataInterleave sets the value of UnitsBeforeCheckDataInterleave for the instance +func (instance *CIM_PhysicalExtent) SetPropertyUnitsBeforeCheckDataInterleave(value uint64) (err error) { + return instance.SetProperty("UnitsBeforeCheckDataInterleave", (value)) +} + +// GetUnitsBeforeCheckDataInterleave gets the value of UnitsBeforeCheckDataInterleave for the instance +func (instance *CIM_PhysicalExtent) GetPropertyUnitsBeforeCheckDataInterleave() (value uint64, err error) { + retValue, err := instance.GetProperty("UnitsBeforeCheckDataInterleave") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnitsOfCheckData sets the value of UnitsOfCheckData for the instance +func (instance *CIM_PhysicalExtent) SetPropertyUnitsOfCheckData(value uint64) (err error) { + return instance.SetProperty("UnitsOfCheckData", (value)) +} + +// GetUnitsOfCheckData gets the value of UnitsOfCheckData for the instance +func (instance *CIM_PhysicalExtent) GetPropertyUnitsOfCheckData() (value uint64, err error) { + retValue, err := instance.GetProperty("UnitsOfCheckData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnitsOfUserData sets the value of UnitsOfUserData for the instance +func (instance *CIM_PhysicalExtent) SetPropertyUnitsOfUserData(value uint64) (err error) { + return instance.SetProperty("UnitsOfUserData", (value)) +} + +// GetUnitsOfUserData gets the value of UnitsOfUserData for the instance +func (instance *CIM_PhysicalExtent) GetPropertyUnitsOfUserData() (value uint64, err error) { + retValue, err := instance.GetProperty("UnitsOfUserData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalFrame.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalFrame.go new file mode 100644 index 00000000..bd41cabf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalFrame.go @@ -0,0 +1,292 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalFrame struct +type CIM_PhysicalFrame struct { + *CIM_PhysicalPackage + + // + AudibleAlarm bool + + // + BreachDescription string + + // + CableManagementStrategy string + + // + LockPresent bool + + // + SecurityBreach uint16 + + // + ServiceDescriptions []string + + // + ServicePhilosophy []uint16 + + // + VisibleAlarm bool +} + +func NewCIM_PhysicalFrameEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalFrame, err error) { + tmp, err := NewCIM_PhysicalPackageEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalFrame{ + CIM_PhysicalPackage: tmp, + } + return +} + +func NewCIM_PhysicalFrameEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalFrame, err error) { + tmp, err := NewCIM_PhysicalPackageEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalFrame{ + CIM_PhysicalPackage: tmp, + } + return +} + +// SetAudibleAlarm sets the value of AudibleAlarm for the instance +func (instance *CIM_PhysicalFrame) SetPropertyAudibleAlarm(value bool) (err error) { + return instance.SetProperty("AudibleAlarm", (value)) +} + +// GetAudibleAlarm gets the value of AudibleAlarm for the instance +func (instance *CIM_PhysicalFrame) GetPropertyAudibleAlarm() (value bool, err error) { + retValue, err := instance.GetProperty("AudibleAlarm") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBreachDescription sets the value of BreachDescription for the instance +func (instance *CIM_PhysicalFrame) SetPropertyBreachDescription(value string) (err error) { + return instance.SetProperty("BreachDescription", (value)) +} + +// GetBreachDescription gets the value of BreachDescription for the instance +func (instance *CIM_PhysicalFrame) GetPropertyBreachDescription() (value string, err error) { + retValue, err := instance.GetProperty("BreachDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCableManagementStrategy sets the value of CableManagementStrategy for the instance +func (instance *CIM_PhysicalFrame) SetPropertyCableManagementStrategy(value string) (err error) { + return instance.SetProperty("CableManagementStrategy", (value)) +} + +// GetCableManagementStrategy gets the value of CableManagementStrategy for the instance +func (instance *CIM_PhysicalFrame) GetPropertyCableManagementStrategy() (value string, err error) { + retValue, err := instance.GetProperty("CableManagementStrategy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLockPresent sets the value of LockPresent for the instance +func (instance *CIM_PhysicalFrame) SetPropertyLockPresent(value bool) (err error) { + return instance.SetProperty("LockPresent", (value)) +} + +// GetLockPresent gets the value of LockPresent for the instance +func (instance *CIM_PhysicalFrame) GetPropertyLockPresent() (value bool, err error) { + retValue, err := instance.GetProperty("LockPresent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSecurityBreach sets the value of SecurityBreach for the instance +func (instance *CIM_PhysicalFrame) SetPropertySecurityBreach(value uint16) (err error) { + return instance.SetProperty("SecurityBreach", (value)) +} + +// GetSecurityBreach gets the value of SecurityBreach for the instance +func (instance *CIM_PhysicalFrame) GetPropertySecurityBreach() (value uint16, err error) { + retValue, err := instance.GetProperty("SecurityBreach") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetServiceDescriptions sets the value of ServiceDescriptions for the instance +func (instance *CIM_PhysicalFrame) SetPropertyServiceDescriptions(value []string) (err error) { + return instance.SetProperty("ServiceDescriptions", (value)) +} + +// GetServiceDescriptions gets the value of ServiceDescriptions for the instance +func (instance *CIM_PhysicalFrame) GetPropertyServiceDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("ServiceDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetServicePhilosophy sets the value of ServicePhilosophy for the instance +func (instance *CIM_PhysicalFrame) SetPropertyServicePhilosophy(value []uint16) (err error) { + return instance.SetProperty("ServicePhilosophy", (value)) +} + +// GetServicePhilosophy gets the value of ServicePhilosophy for the instance +func (instance *CIM_PhysicalFrame) GetPropertyServicePhilosophy() (value []uint16, err error) { + retValue, err := instance.GetProperty("ServicePhilosophy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetVisibleAlarm sets the value of VisibleAlarm for the instance +func (instance *CIM_PhysicalFrame) SetPropertyVisibleAlarm(value bool) (err error) { + return instance.SetProperty("VisibleAlarm", (value)) +} + +// GetVisibleAlarm gets the value of VisibleAlarm for the instance +func (instance *CIM_PhysicalFrame) GetPropertyVisibleAlarm() (value bool, err error) { + retValue, err := instance.GetProperty("VisibleAlarm") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalLink.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalLink.go new file mode 100644 index 00000000..d83d03e6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalLink.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalLink struct +type CIM_PhysicalLink struct { + *CIM_PhysicalElement + + // + Length float64 + + // + MaxLength float64 + + // + MediaType uint16 + + // + Wired bool +} + +func NewCIM_PhysicalLinkEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalLink, err error) { + tmp, err := NewCIM_PhysicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalLink{ + CIM_PhysicalElement: tmp, + } + return +} + +func NewCIM_PhysicalLinkEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalLink, err error) { + tmp, err := NewCIM_PhysicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalLink{ + CIM_PhysicalElement: tmp, + } + return +} + +// SetLength sets the value of Length for the instance +func (instance *CIM_PhysicalLink) SetPropertyLength(value float64) (err error) { + return instance.SetProperty("Length", (value)) +} + +// GetLength gets the value of Length for the instance +func (instance *CIM_PhysicalLink) GetPropertyLength() (value float64, err error) { + retValue, err := instance.GetProperty("Length") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} + +// SetMaxLength sets the value of MaxLength for the instance +func (instance *CIM_PhysicalLink) SetPropertyMaxLength(value float64) (err error) { + return instance.SetProperty("MaxLength", (value)) +} + +// GetMaxLength gets the value of MaxLength for the instance +func (instance *CIM_PhysicalLink) GetPropertyMaxLength() (value float64, err error) { + retValue, err := instance.GetProperty("MaxLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *CIM_PhysicalLink) SetPropertyMediaType(value uint16) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *CIM_PhysicalLink) GetPropertyMediaType() (value uint16, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWired sets the value of Wired for the instance +func (instance *CIM_PhysicalLink) SetPropertyWired(value bool) (err error) { + return instance.SetProperty("Wired", (value)) +} + +// GetWired gets the value of Wired for the instance +func (instance *CIM_PhysicalLink) GetPropertyWired() (value bool, err error) { + retValue, err := instance.GetProperty("Wired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMedia.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMedia.go new file mode 100644 index 00000000..fe7a3af0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMedia.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalMedia struct +type CIM_PhysicalMedia struct { + *CIM_PhysicalComponent + + // + Capacity uint64 + + // + CleanerMedia bool + + // + MediaDescription string + + // + MediaType uint16 + + // + WriteProtectOn bool +} + +func NewCIM_PhysicalMediaEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalMedia, err error) { + tmp, err := NewCIM_PhysicalComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalMedia{ + CIM_PhysicalComponent: tmp, + } + return +} + +func NewCIM_PhysicalMediaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalMedia, err error) { + tmp, err := NewCIM_PhysicalComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalMedia{ + CIM_PhysicalComponent: tmp, + } + return +} + +// SetCapacity sets the value of Capacity for the instance +func (instance *CIM_PhysicalMedia) SetPropertyCapacity(value uint64) (err error) { + return instance.SetProperty("Capacity", (value)) +} + +// GetCapacity gets the value of Capacity for the instance +func (instance *CIM_PhysicalMedia) GetPropertyCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("Capacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanerMedia sets the value of CleanerMedia for the instance +func (instance *CIM_PhysicalMedia) SetPropertyCleanerMedia(value bool) (err error) { + return instance.SetProperty("CleanerMedia", (value)) +} + +// GetCleanerMedia gets the value of CleanerMedia for the instance +func (instance *CIM_PhysicalMedia) GetPropertyCleanerMedia() (value bool, err error) { + retValue, err := instance.GetProperty("CleanerMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMediaDescription sets the value of MediaDescription for the instance +func (instance *CIM_PhysicalMedia) SetPropertyMediaDescription(value string) (err error) { + return instance.SetProperty("MediaDescription", (value)) +} + +// GetMediaDescription gets the value of MediaDescription for the instance +func (instance *CIM_PhysicalMedia) GetPropertyMediaDescription() (value string, err error) { + retValue, err := instance.GetProperty("MediaDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *CIM_PhysicalMedia) SetPropertyMediaType(value uint16) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *CIM_PhysicalMedia) GetPropertyMediaType() (value uint16, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWriteProtectOn sets the value of WriteProtectOn for the instance +func (instance *CIM_PhysicalMedia) SetPropertyWriteProtectOn(value bool) (err error) { + return instance.SetProperty("WriteProtectOn", (value)) +} + +// GetWriteProtectOn gets the value of WriteProtectOn for the instance +func (instance *CIM_PhysicalMedia) GetPropertyWriteProtectOn() (value bool, err error) { + retValue, err := instance.GetProperty("WriteProtectOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMemory.go new file mode 100644 index 00000000..1e846995 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalMemory.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalMemory struct +type CIM_PhysicalMemory struct { + *CIM_Chip + + // + BankLabel string + + // + Capacity uint64 + + // + DataWidth uint16 + + // + InterleavePosition uint32 + + // + MemoryType uint16 + + // + PositionInRow uint32 + + // + Speed uint32 + + // + TotalWidth uint16 +} + +func NewCIM_PhysicalMemoryEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalMemory, err error) { + tmp, err := NewCIM_ChipEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalMemory{ + CIM_Chip: tmp, + } + return +} + +func NewCIM_PhysicalMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalMemory, err error) { + tmp, err := NewCIM_ChipEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalMemory{ + CIM_Chip: tmp, + } + return +} + +// SetBankLabel sets the value of BankLabel for the instance +func (instance *CIM_PhysicalMemory) SetPropertyBankLabel(value string) (err error) { + return instance.SetProperty("BankLabel", (value)) +} + +// GetBankLabel gets the value of BankLabel for the instance +func (instance *CIM_PhysicalMemory) GetPropertyBankLabel() (value string, err error) { + retValue, err := instance.GetProperty("BankLabel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCapacity sets the value of Capacity for the instance +func (instance *CIM_PhysicalMemory) SetPropertyCapacity(value uint64) (err error) { + return instance.SetProperty("Capacity", (value)) +} + +// GetCapacity gets the value of Capacity for the instance +func (instance *CIM_PhysicalMemory) GetPropertyCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("Capacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataWidth sets the value of DataWidth for the instance +func (instance *CIM_PhysicalMemory) SetPropertyDataWidth(value uint16) (err error) { + return instance.SetProperty("DataWidth", (value)) +} + +// GetDataWidth gets the value of DataWidth for the instance +func (instance *CIM_PhysicalMemory) GetPropertyDataWidth() (value uint16, err error) { + retValue, err := instance.GetProperty("DataWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInterleavePosition sets the value of InterleavePosition for the instance +func (instance *CIM_PhysicalMemory) SetPropertyInterleavePosition(value uint32) (err error) { + return instance.SetProperty("InterleavePosition", (value)) +} + +// GetInterleavePosition gets the value of InterleavePosition for the instance +func (instance *CIM_PhysicalMemory) GetPropertyInterleavePosition() (value uint32, err error) { + retValue, err := instance.GetProperty("InterleavePosition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMemoryType sets the value of MemoryType for the instance +func (instance *CIM_PhysicalMemory) SetPropertyMemoryType(value uint16) (err error) { + return instance.SetProperty("MemoryType", (value)) +} + +// GetMemoryType gets the value of MemoryType for the instance +func (instance *CIM_PhysicalMemory) GetPropertyMemoryType() (value uint16, err error) { + retValue, err := instance.GetProperty("MemoryType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPositionInRow sets the value of PositionInRow for the instance +func (instance *CIM_PhysicalMemory) SetPropertyPositionInRow(value uint32) (err error) { + return instance.SetProperty("PositionInRow", (value)) +} + +// GetPositionInRow gets the value of PositionInRow for the instance +func (instance *CIM_PhysicalMemory) GetPropertyPositionInRow() (value uint32, err error) { + retValue, err := instance.GetProperty("PositionInRow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpeed sets the value of Speed for the instance +func (instance *CIM_PhysicalMemory) SetPropertySpeed(value uint32) (err error) { + return instance.SetProperty("Speed", (value)) +} + +// GetSpeed gets the value of Speed for the instance +func (instance *CIM_PhysicalMemory) GetPropertySpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("Speed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalWidth sets the value of TotalWidth for the instance +func (instance *CIM_PhysicalMemory) SetPropertyTotalWidth(value uint16) (err error) { + return instance.SetProperty("TotalWidth", (value)) +} + +// GetTotalWidth gets the value of TotalWidth for the instance +func (instance *CIM_PhysicalMemory) GetPropertyTotalWidth() (value uint16, err error) { + retValue, err := instance.GetProperty("TotalWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalPackage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalPackage.go new file mode 100644 index 00000000..eba2fc42 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PhysicalPackage.go @@ -0,0 +1,275 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PhysicalPackage struct +type CIM_PhysicalPackage struct { + *CIM_PhysicalElement + + // + Depth float32 + + // + Height float32 + + // + HotSwappable bool + + // + Removable bool + + // + Replaceable bool + + // + Weight float32 + + // + Width float32 +} + +func NewCIM_PhysicalPackageEx1(instance *cim.WmiInstance) (newInstance *CIM_PhysicalPackage, err error) { + tmp, err := NewCIM_PhysicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PhysicalPackage{ + CIM_PhysicalElement: tmp, + } + return +} + +func NewCIM_PhysicalPackageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PhysicalPackage, err error) { + tmp, err := NewCIM_PhysicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PhysicalPackage{ + CIM_PhysicalElement: tmp, + } + return +} + +// SetDepth sets the value of Depth for the instance +func (instance *CIM_PhysicalPackage) SetPropertyDepth(value float32) (err error) { + return instance.SetProperty("Depth", (value)) +} + +// GetDepth gets the value of Depth for the instance +func (instance *CIM_PhysicalPackage) GetPropertyDepth() (value float32, err error) { + retValue, err := instance.GetProperty("Depth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetHeight sets the value of Height for the instance +func (instance *CIM_PhysicalPackage) SetPropertyHeight(value float32) (err error) { + return instance.SetProperty("Height", (value)) +} + +// GetHeight gets the value of Height for the instance +func (instance *CIM_PhysicalPackage) GetPropertyHeight() (value float32, err error) { + retValue, err := instance.GetProperty("Height") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetHotSwappable sets the value of HotSwappable for the instance +func (instance *CIM_PhysicalPackage) SetPropertyHotSwappable(value bool) (err error) { + return instance.SetProperty("HotSwappable", (value)) +} + +// GetHotSwappable gets the value of HotSwappable for the instance +func (instance *CIM_PhysicalPackage) GetPropertyHotSwappable() (value bool, err error) { + retValue, err := instance.GetProperty("HotSwappable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRemovable sets the value of Removable for the instance +func (instance *CIM_PhysicalPackage) SetPropertyRemovable(value bool) (err error) { + return instance.SetProperty("Removable", (value)) +} + +// GetRemovable gets the value of Removable for the instance +func (instance *CIM_PhysicalPackage) GetPropertyRemovable() (value bool, err error) { + retValue, err := instance.GetProperty("Removable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReplaceable sets the value of Replaceable for the instance +func (instance *CIM_PhysicalPackage) SetPropertyReplaceable(value bool) (err error) { + return instance.SetProperty("Replaceable", (value)) +} + +// GetReplaceable gets the value of Replaceable for the instance +func (instance *CIM_PhysicalPackage) GetPropertyReplaceable() (value bool, err error) { + retValue, err := instance.GetProperty("Replaceable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWeight sets the value of Weight for the instance +func (instance *CIM_PhysicalPackage) SetPropertyWeight(value float32) (err error) { + return instance.SetProperty("Weight", (value)) +} + +// GetWeight gets the value of Weight for the instance +func (instance *CIM_PhysicalPackage) GetPropertyWeight() (value float32, err error) { + retValue, err := instance.GetProperty("Weight") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetWidth sets the value of Width for the instance +func (instance *CIM_PhysicalPackage) SetPropertyWidth(value float32) (err error) { + return instance.SetProperty("Width", (value)) +} + +// GetWidth gets the value of Width for the instance +func (instance *CIM_PhysicalPackage) GetPropertyWidth() (value float32, err error) { + retValue, err := instance.GetProperty("Width") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// + +// + +// +func (instance *CIM_PhysicalPackage) IsCompatible( /* IN */ ElementToCheck CIM_PhysicalElement) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("IsCompatible", ElementToCheck) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PointingDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PointingDevice.go new file mode 100644 index 00000000..a7712393 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PointingDevice.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PointingDevice struct +type CIM_PointingDevice struct { + *CIM_UserDevice + + // + Handedness uint16 + + // + NumberOfButtons uint8 + + // + PointingType uint16 + + // + Resolution uint32 +} + +func NewCIM_PointingDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_PointingDevice, err error) { + tmp, err := NewCIM_UserDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PointingDevice{ + CIM_UserDevice: tmp, + } + return +} + +func NewCIM_PointingDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PointingDevice, err error) { + tmp, err := NewCIM_UserDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PointingDevice{ + CIM_UserDevice: tmp, + } + return +} + +// SetHandedness sets the value of Handedness for the instance +func (instance *CIM_PointingDevice) SetPropertyHandedness(value uint16) (err error) { + return instance.SetProperty("Handedness", (value)) +} + +// GetHandedness gets the value of Handedness for the instance +func (instance *CIM_PointingDevice) GetPropertyHandedness() (value uint16, err error) { + retValue, err := instance.GetProperty("Handedness") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfButtons sets the value of NumberOfButtons for the instance +func (instance *CIM_PointingDevice) SetPropertyNumberOfButtons(value uint8) (err error) { + return instance.SetProperty("NumberOfButtons", (value)) +} + +// GetNumberOfButtons gets the value of NumberOfButtons for the instance +func (instance *CIM_PointingDevice) GetPropertyNumberOfButtons() (value uint8, err error) { + retValue, err := instance.GetProperty("NumberOfButtons") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetPointingType sets the value of PointingType for the instance +func (instance *CIM_PointingDevice) SetPropertyPointingType(value uint16) (err error) { + return instance.SetProperty("PointingType", (value)) +} + +// GetPointingType gets the value of PointingType for the instance +func (instance *CIM_PointingDevice) GetPropertyPointingType() (value uint16, err error) { + retValue, err := instance.GetProperty("PointingType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetResolution sets the value of Resolution for the instance +func (instance *CIM_PointingDevice) SetPropertyResolution(value uint32) (err error) { + return instance.SetProperty("Resolution", (value)) +} + +// GetResolution gets the value of Resolution for the instance +func (instance *CIM_PointingDevice) GetPropertyResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("Resolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PotsModem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PotsModem.go new file mode 100644 index 00000000..33893300 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PotsModem.go @@ -0,0 +1,562 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PotsModem struct +type CIM_PotsModem struct { + *CIM_LogicalDevice + + // + AnswerMode uint16 + + // + CompressionInfo uint16 + + // + CountriesSupported []string + + // + CountrySelected string + + // + CurrentPasswords []string + + // + DialType uint16 + + // + ErrorControlInfo uint16 + + // + InactivityTimeout uint32 + + // + MaxBaudRateToPhone uint32 + + // + MaxBaudRateToSerialPort uint32 + + // + MaxNumberOfPasswords uint16 + + // + ModulationScheme uint16 + + // + RingsBeforeAnswer uint8 + + // + SpeakerVolumeInfo uint16 + + // + SupportsCallback bool + + // + SupportsSynchronousConnect bool + + // + TimeOfLastReset string +} + +func NewCIM_PotsModemEx1(instance *cim.WmiInstance) (newInstance *CIM_PotsModem, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PotsModem{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_PotsModemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PotsModem, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PotsModem{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetAnswerMode sets the value of AnswerMode for the instance +func (instance *CIM_PotsModem) SetPropertyAnswerMode(value uint16) (err error) { + return instance.SetProperty("AnswerMode", (value)) +} + +// GetAnswerMode gets the value of AnswerMode for the instance +func (instance *CIM_PotsModem) GetPropertyAnswerMode() (value uint16, err error) { + retValue, err := instance.GetProperty("AnswerMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCompressionInfo sets the value of CompressionInfo for the instance +func (instance *CIM_PotsModem) SetPropertyCompressionInfo(value uint16) (err error) { + return instance.SetProperty("CompressionInfo", (value)) +} + +// GetCompressionInfo gets the value of CompressionInfo for the instance +func (instance *CIM_PotsModem) GetPropertyCompressionInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("CompressionInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCountriesSupported sets the value of CountriesSupported for the instance +func (instance *CIM_PotsModem) SetPropertyCountriesSupported(value []string) (err error) { + return instance.SetProperty("CountriesSupported", (value)) +} + +// GetCountriesSupported gets the value of CountriesSupported for the instance +func (instance *CIM_PotsModem) GetPropertyCountriesSupported() (value []string, err error) { + retValue, err := instance.GetProperty("CountriesSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCountrySelected sets the value of CountrySelected for the instance +func (instance *CIM_PotsModem) SetPropertyCountrySelected(value string) (err error) { + return instance.SetProperty("CountrySelected", (value)) +} + +// GetCountrySelected gets the value of CountrySelected for the instance +func (instance *CIM_PotsModem) GetPropertyCountrySelected() (value string, err error) { + retValue, err := instance.GetProperty("CountrySelected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentPasswords sets the value of CurrentPasswords for the instance +func (instance *CIM_PotsModem) SetPropertyCurrentPasswords(value []string) (err error) { + return instance.SetProperty("CurrentPasswords", (value)) +} + +// GetCurrentPasswords gets the value of CurrentPasswords for the instance +func (instance *CIM_PotsModem) GetPropertyCurrentPasswords() (value []string, err error) { + retValue, err := instance.GetProperty("CurrentPasswords") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDialType sets the value of DialType for the instance +func (instance *CIM_PotsModem) SetPropertyDialType(value uint16) (err error) { + return instance.SetProperty("DialType", (value)) +} + +// GetDialType gets the value of DialType for the instance +func (instance *CIM_PotsModem) GetPropertyDialType() (value uint16, err error) { + retValue, err := instance.GetProperty("DialType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorControlInfo sets the value of ErrorControlInfo for the instance +func (instance *CIM_PotsModem) SetPropertyErrorControlInfo(value uint16) (err error) { + return instance.SetProperty("ErrorControlInfo", (value)) +} + +// GetErrorControlInfo gets the value of ErrorControlInfo for the instance +func (instance *CIM_PotsModem) GetPropertyErrorControlInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorControlInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInactivityTimeout sets the value of InactivityTimeout for the instance +func (instance *CIM_PotsModem) SetPropertyInactivityTimeout(value uint32) (err error) { + return instance.SetProperty("InactivityTimeout", (value)) +} + +// GetInactivityTimeout gets the value of InactivityTimeout for the instance +func (instance *CIM_PotsModem) GetPropertyInactivityTimeout() (value uint32, err error) { + retValue, err := instance.GetProperty("InactivityTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxBaudRateToPhone sets the value of MaxBaudRateToPhone for the instance +func (instance *CIM_PotsModem) SetPropertyMaxBaudRateToPhone(value uint32) (err error) { + return instance.SetProperty("MaxBaudRateToPhone", (value)) +} + +// GetMaxBaudRateToPhone gets the value of MaxBaudRateToPhone for the instance +func (instance *CIM_PotsModem) GetPropertyMaxBaudRateToPhone() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxBaudRateToPhone") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxBaudRateToSerialPort sets the value of MaxBaudRateToSerialPort for the instance +func (instance *CIM_PotsModem) SetPropertyMaxBaudRateToSerialPort(value uint32) (err error) { + return instance.SetProperty("MaxBaudRateToSerialPort", (value)) +} + +// GetMaxBaudRateToSerialPort gets the value of MaxBaudRateToSerialPort for the instance +func (instance *CIM_PotsModem) GetPropertyMaxBaudRateToSerialPort() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxBaudRateToSerialPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxNumberOfPasswords sets the value of MaxNumberOfPasswords for the instance +func (instance *CIM_PotsModem) SetPropertyMaxNumberOfPasswords(value uint16) (err error) { + return instance.SetProperty("MaxNumberOfPasswords", (value)) +} + +// GetMaxNumberOfPasswords gets the value of MaxNumberOfPasswords for the instance +func (instance *CIM_PotsModem) GetPropertyMaxNumberOfPasswords() (value uint16, err error) { + retValue, err := instance.GetProperty("MaxNumberOfPasswords") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetModulationScheme sets the value of ModulationScheme for the instance +func (instance *CIM_PotsModem) SetPropertyModulationScheme(value uint16) (err error) { + return instance.SetProperty("ModulationScheme", (value)) +} + +// GetModulationScheme gets the value of ModulationScheme for the instance +func (instance *CIM_PotsModem) GetPropertyModulationScheme() (value uint16, err error) { + retValue, err := instance.GetProperty("ModulationScheme") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRingsBeforeAnswer sets the value of RingsBeforeAnswer for the instance +func (instance *CIM_PotsModem) SetPropertyRingsBeforeAnswer(value uint8) (err error) { + return instance.SetProperty("RingsBeforeAnswer", (value)) +} + +// GetRingsBeforeAnswer gets the value of RingsBeforeAnswer for the instance +func (instance *CIM_PotsModem) GetPropertyRingsBeforeAnswer() (value uint8, err error) { + retValue, err := instance.GetProperty("RingsBeforeAnswer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetSpeakerVolumeInfo sets the value of SpeakerVolumeInfo for the instance +func (instance *CIM_PotsModem) SetPropertySpeakerVolumeInfo(value uint16) (err error) { + return instance.SetProperty("SpeakerVolumeInfo", (value)) +} + +// GetSpeakerVolumeInfo gets the value of SpeakerVolumeInfo for the instance +func (instance *CIM_PotsModem) GetPropertySpeakerVolumeInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("SpeakerVolumeInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSupportsCallback sets the value of SupportsCallback for the instance +func (instance *CIM_PotsModem) SetPropertySupportsCallback(value bool) (err error) { + return instance.SetProperty("SupportsCallback", (value)) +} + +// GetSupportsCallback gets the value of SupportsCallback for the instance +func (instance *CIM_PotsModem) GetPropertySupportsCallback() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsCallback") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsSynchronousConnect sets the value of SupportsSynchronousConnect for the instance +func (instance *CIM_PotsModem) SetPropertySupportsSynchronousConnect(value bool) (err error) { + return instance.SetProperty("SupportsSynchronousConnect", (value)) +} + +// GetSupportsSynchronousConnect gets the value of SupportsSynchronousConnect for the instance +func (instance *CIM_PotsModem) GetPropertySupportsSynchronousConnect() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSynchronousConnect") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTimeOfLastReset sets the value of TimeOfLastReset for the instance +func (instance *CIM_PotsModem) SetPropertyTimeOfLastReset(value string) (err error) { + return instance.SetProperty("TimeOfLastReset", (value)) +} + +// GetTimeOfLastReset gets the value of TimeOfLastReset for the instance +func (instance *CIM_PotsModem) GetPropertyTimeOfLastReset() (value string, err error) { + retValue, err := instance.GetProperty("TimeOfLastReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PowerSupply.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PowerSupply.go new file mode 100644 index 00000000..2b4c744b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_PowerSupply.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_PowerSupply struct +type CIM_PowerSupply struct { + *CIM_LogicalDevice + + // + ActiveInputVoltage uint16 + + // + IsSwitchingSupply bool + + // + Range1InputFrequencyHigh uint32 + + // + Range1InputFrequencyLow uint32 + + // + Range1InputVoltageHigh uint32 + + // + Range1InputVoltageLow uint32 + + // + Range2InputFrequencyHigh uint32 + + // + Range2InputFrequencyLow uint32 + + // + Range2InputVoltageHigh uint32 + + // + Range2InputVoltageLow uint32 + + // + TotalOutputPower uint32 + + // + TypeOfRangeSwitching uint16 +} + +func NewCIM_PowerSupplyEx1(instance *cim.WmiInstance) (newInstance *CIM_PowerSupply, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_PowerSupply{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_PowerSupplyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_PowerSupply, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_PowerSupply{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetActiveInputVoltage sets the value of ActiveInputVoltage for the instance +func (instance *CIM_PowerSupply) SetPropertyActiveInputVoltage(value uint16) (err error) { + return instance.SetProperty("ActiveInputVoltage", (value)) +} + +// GetActiveInputVoltage gets the value of ActiveInputVoltage for the instance +func (instance *CIM_PowerSupply) GetPropertyActiveInputVoltage() (value uint16, err error) { + retValue, err := instance.GetProperty("ActiveInputVoltage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIsSwitchingSupply sets the value of IsSwitchingSupply for the instance +func (instance *CIM_PowerSupply) SetPropertyIsSwitchingSupply(value bool) (err error) { + return instance.SetProperty("IsSwitchingSupply", (value)) +} + +// GetIsSwitchingSupply gets the value of IsSwitchingSupply for the instance +func (instance *CIM_PowerSupply) GetPropertyIsSwitchingSupply() (value bool, err error) { + retValue, err := instance.GetProperty("IsSwitchingSupply") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRange1InputFrequencyHigh sets the value of Range1InputFrequencyHigh for the instance +func (instance *CIM_PowerSupply) SetPropertyRange1InputFrequencyHigh(value uint32) (err error) { + return instance.SetProperty("Range1InputFrequencyHigh", (value)) +} + +// GetRange1InputFrequencyHigh gets the value of Range1InputFrequencyHigh for the instance +func (instance *CIM_PowerSupply) GetPropertyRange1InputFrequencyHigh() (value uint32, err error) { + retValue, err := instance.GetProperty("Range1InputFrequencyHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange1InputFrequencyLow sets the value of Range1InputFrequencyLow for the instance +func (instance *CIM_PowerSupply) SetPropertyRange1InputFrequencyLow(value uint32) (err error) { + return instance.SetProperty("Range1InputFrequencyLow", (value)) +} + +// GetRange1InputFrequencyLow gets the value of Range1InputFrequencyLow for the instance +func (instance *CIM_PowerSupply) GetPropertyRange1InputFrequencyLow() (value uint32, err error) { + retValue, err := instance.GetProperty("Range1InputFrequencyLow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange1InputVoltageHigh sets the value of Range1InputVoltageHigh for the instance +func (instance *CIM_PowerSupply) SetPropertyRange1InputVoltageHigh(value uint32) (err error) { + return instance.SetProperty("Range1InputVoltageHigh", (value)) +} + +// GetRange1InputVoltageHigh gets the value of Range1InputVoltageHigh for the instance +func (instance *CIM_PowerSupply) GetPropertyRange1InputVoltageHigh() (value uint32, err error) { + retValue, err := instance.GetProperty("Range1InputVoltageHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange1InputVoltageLow sets the value of Range1InputVoltageLow for the instance +func (instance *CIM_PowerSupply) SetPropertyRange1InputVoltageLow(value uint32) (err error) { + return instance.SetProperty("Range1InputVoltageLow", (value)) +} + +// GetRange1InputVoltageLow gets the value of Range1InputVoltageLow for the instance +func (instance *CIM_PowerSupply) GetPropertyRange1InputVoltageLow() (value uint32, err error) { + retValue, err := instance.GetProperty("Range1InputVoltageLow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange2InputFrequencyHigh sets the value of Range2InputFrequencyHigh for the instance +func (instance *CIM_PowerSupply) SetPropertyRange2InputFrequencyHigh(value uint32) (err error) { + return instance.SetProperty("Range2InputFrequencyHigh", (value)) +} + +// GetRange2InputFrequencyHigh gets the value of Range2InputFrequencyHigh for the instance +func (instance *CIM_PowerSupply) GetPropertyRange2InputFrequencyHigh() (value uint32, err error) { + retValue, err := instance.GetProperty("Range2InputFrequencyHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange2InputFrequencyLow sets the value of Range2InputFrequencyLow for the instance +func (instance *CIM_PowerSupply) SetPropertyRange2InputFrequencyLow(value uint32) (err error) { + return instance.SetProperty("Range2InputFrequencyLow", (value)) +} + +// GetRange2InputFrequencyLow gets the value of Range2InputFrequencyLow for the instance +func (instance *CIM_PowerSupply) GetPropertyRange2InputFrequencyLow() (value uint32, err error) { + retValue, err := instance.GetProperty("Range2InputFrequencyLow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange2InputVoltageHigh sets the value of Range2InputVoltageHigh for the instance +func (instance *CIM_PowerSupply) SetPropertyRange2InputVoltageHigh(value uint32) (err error) { + return instance.SetProperty("Range2InputVoltageHigh", (value)) +} + +// GetRange2InputVoltageHigh gets the value of Range2InputVoltageHigh for the instance +func (instance *CIM_PowerSupply) GetPropertyRange2InputVoltageHigh() (value uint32, err error) { + retValue, err := instance.GetProperty("Range2InputVoltageHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRange2InputVoltageLow sets the value of Range2InputVoltageLow for the instance +func (instance *CIM_PowerSupply) SetPropertyRange2InputVoltageLow(value uint32) (err error) { + return instance.SetProperty("Range2InputVoltageLow", (value)) +} + +// GetRange2InputVoltageLow gets the value of Range2InputVoltageLow for the instance +func (instance *CIM_PowerSupply) GetPropertyRange2InputVoltageLow() (value uint32, err error) { + retValue, err := instance.GetProperty("Range2InputVoltageLow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalOutputPower sets the value of TotalOutputPower for the instance +func (instance *CIM_PowerSupply) SetPropertyTotalOutputPower(value uint32) (err error) { + return instance.SetProperty("TotalOutputPower", (value)) +} + +// GetTotalOutputPower gets the value of TotalOutputPower for the instance +func (instance *CIM_PowerSupply) GetPropertyTotalOutputPower() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalOutputPower") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTypeOfRangeSwitching sets the value of TypeOfRangeSwitching for the instance +func (instance *CIM_PowerSupply) SetPropertyTypeOfRangeSwitching(value uint16) (err error) { + return instance.SetProperty("TypeOfRangeSwitching", (value)) +} + +// GetTypeOfRangeSwitching gets the value of TypeOfRangeSwitching for the instance +func (instance *CIM_PowerSupply) GetPropertyTypeOfRangeSwitching() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeOfRangeSwitching") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Printer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Printer.go new file mode 100644 index 00000000..6f89c4a2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Printer.go @@ -0,0 +1,1022 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Printer struct +type CIM_Printer struct { + *CIM_LogicalDevice + + // + AvailableJobSheets []string + + // + Capabilities []uint16 + + // + CapabilityDescriptions []string + + // + CharSetsSupported []string + + // + CurrentCapabilities []uint16 + + // + CurrentCharSet string + + // + CurrentLanguage uint16 + + // + CurrentMimeType string + + // + CurrentNaturalLanguage string + + // + CurrentPaperType string + + // + DefaultCapabilities []uint16 + + // + DefaultCopies uint32 + + // + DefaultLanguage uint16 + + // + DefaultMimeType string + + // + DefaultNumberUp uint32 + + // + DefaultPaperType string + + // + DetectedErrorState uint16 + + // + ErrorInformation []string + + // + HorizontalResolution uint32 + + // + JobCountSinceLastReset uint32 + + // + LanguagesSupported []uint16 + + // + MarkingTechnology uint16 + + // + MaxCopies uint32 + + // + MaxNumberUp uint32 + + // + MaxSizeSupported uint32 + + // + MimeTypesSupported []string + + // + NaturalLanguagesSupported []string + + // + PaperSizesSupported []uint16 + + // + PaperTypesAvailable []string + + // + PrinterStatus uint16 + + // + TimeOfLastReset string + + // + VerticalResolution uint32 +} + +func NewCIM_PrinterEx1(instance *cim.WmiInstance) (newInstance *CIM_Printer, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Printer{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_PrinterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Printer, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Printer{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetAvailableJobSheets sets the value of AvailableJobSheets for the instance +func (instance *CIM_Printer) SetPropertyAvailableJobSheets(value []string) (err error) { + return instance.SetProperty("AvailableJobSheets", (value)) +} + +// GetAvailableJobSheets gets the value of AvailableJobSheets for the instance +func (instance *CIM_Printer) GetPropertyAvailableJobSheets() (value []string, err error) { + retValue, err := instance.GetProperty("AvailableJobSheets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCapabilities sets the value of Capabilities for the instance +func (instance *CIM_Printer) SetPropertyCapabilities(value []uint16) (err error) { + return instance.SetProperty("Capabilities", (value)) +} + +// GetCapabilities gets the value of Capabilities for the instance +func (instance *CIM_Printer) GetPropertyCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("Capabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCapabilityDescriptions sets the value of CapabilityDescriptions for the instance +func (instance *CIM_Printer) SetPropertyCapabilityDescriptions(value []string) (err error) { + return instance.SetProperty("CapabilityDescriptions", (value)) +} + +// GetCapabilityDescriptions gets the value of CapabilityDescriptions for the instance +func (instance *CIM_Printer) GetPropertyCapabilityDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CapabilityDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCharSetsSupported sets the value of CharSetsSupported for the instance +func (instance *CIM_Printer) SetPropertyCharSetsSupported(value []string) (err error) { + return instance.SetProperty("CharSetsSupported", (value)) +} + +// GetCharSetsSupported gets the value of CharSetsSupported for the instance +func (instance *CIM_Printer) GetPropertyCharSetsSupported() (value []string, err error) { + retValue, err := instance.GetProperty("CharSetsSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCurrentCapabilities sets the value of CurrentCapabilities for the instance +func (instance *CIM_Printer) SetPropertyCurrentCapabilities(value []uint16) (err error) { + return instance.SetProperty("CurrentCapabilities", (value)) +} + +// GetCurrentCapabilities gets the value of CurrentCapabilities for the instance +func (instance *CIM_Printer) GetPropertyCurrentCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("CurrentCapabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCurrentCharSet sets the value of CurrentCharSet for the instance +func (instance *CIM_Printer) SetPropertyCurrentCharSet(value string) (err error) { + return instance.SetProperty("CurrentCharSet", (value)) +} + +// GetCurrentCharSet gets the value of CurrentCharSet for the instance +func (instance *CIM_Printer) GetPropertyCurrentCharSet() (value string, err error) { + retValue, err := instance.GetProperty("CurrentCharSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentLanguage sets the value of CurrentLanguage for the instance +func (instance *CIM_Printer) SetPropertyCurrentLanguage(value uint16) (err error) { + return instance.SetProperty("CurrentLanguage", (value)) +} + +// GetCurrentLanguage gets the value of CurrentLanguage for the instance +func (instance *CIM_Printer) GetPropertyCurrentLanguage() (value uint16, err error) { + retValue, err := instance.GetProperty("CurrentLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCurrentMimeType sets the value of CurrentMimeType for the instance +func (instance *CIM_Printer) SetPropertyCurrentMimeType(value string) (err error) { + return instance.SetProperty("CurrentMimeType", (value)) +} + +// GetCurrentMimeType gets the value of CurrentMimeType for the instance +func (instance *CIM_Printer) GetPropertyCurrentMimeType() (value string, err error) { + retValue, err := instance.GetProperty("CurrentMimeType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentNaturalLanguage sets the value of CurrentNaturalLanguage for the instance +func (instance *CIM_Printer) SetPropertyCurrentNaturalLanguage(value string) (err error) { + return instance.SetProperty("CurrentNaturalLanguage", (value)) +} + +// GetCurrentNaturalLanguage gets the value of CurrentNaturalLanguage for the instance +func (instance *CIM_Printer) GetPropertyCurrentNaturalLanguage() (value string, err error) { + retValue, err := instance.GetProperty("CurrentNaturalLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentPaperType sets the value of CurrentPaperType for the instance +func (instance *CIM_Printer) SetPropertyCurrentPaperType(value string) (err error) { + return instance.SetProperty("CurrentPaperType", (value)) +} + +// GetCurrentPaperType gets the value of CurrentPaperType for the instance +func (instance *CIM_Printer) GetPropertyCurrentPaperType() (value string, err error) { + retValue, err := instance.GetProperty("CurrentPaperType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDefaultCapabilities sets the value of DefaultCapabilities for the instance +func (instance *CIM_Printer) SetPropertyDefaultCapabilities(value []uint16) (err error) { + return instance.SetProperty("DefaultCapabilities", (value)) +} + +// GetDefaultCapabilities gets the value of DefaultCapabilities for the instance +func (instance *CIM_Printer) GetPropertyDefaultCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("DefaultCapabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetDefaultCopies sets the value of DefaultCopies for the instance +func (instance *CIM_Printer) SetPropertyDefaultCopies(value uint32) (err error) { + return instance.SetProperty("DefaultCopies", (value)) +} + +// GetDefaultCopies gets the value of DefaultCopies for the instance +func (instance *CIM_Printer) GetPropertyDefaultCopies() (value uint32, err error) { + retValue, err := instance.GetProperty("DefaultCopies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefaultLanguage sets the value of DefaultLanguage for the instance +func (instance *CIM_Printer) SetPropertyDefaultLanguage(value uint16) (err error) { + return instance.SetProperty("DefaultLanguage", (value)) +} + +// GetDefaultLanguage gets the value of DefaultLanguage for the instance +func (instance *CIM_Printer) GetPropertyDefaultLanguage() (value uint16, err error) { + retValue, err := instance.GetProperty("DefaultLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDefaultMimeType sets the value of DefaultMimeType for the instance +func (instance *CIM_Printer) SetPropertyDefaultMimeType(value string) (err error) { + return instance.SetProperty("DefaultMimeType", (value)) +} + +// GetDefaultMimeType gets the value of DefaultMimeType for the instance +func (instance *CIM_Printer) GetPropertyDefaultMimeType() (value string, err error) { + retValue, err := instance.GetProperty("DefaultMimeType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDefaultNumberUp sets the value of DefaultNumberUp for the instance +func (instance *CIM_Printer) SetPropertyDefaultNumberUp(value uint32) (err error) { + return instance.SetProperty("DefaultNumberUp", (value)) +} + +// GetDefaultNumberUp gets the value of DefaultNumberUp for the instance +func (instance *CIM_Printer) GetPropertyDefaultNumberUp() (value uint32, err error) { + retValue, err := instance.GetProperty("DefaultNumberUp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefaultPaperType sets the value of DefaultPaperType for the instance +func (instance *CIM_Printer) SetPropertyDefaultPaperType(value string) (err error) { + return instance.SetProperty("DefaultPaperType", (value)) +} + +// GetDefaultPaperType gets the value of DefaultPaperType for the instance +func (instance *CIM_Printer) GetPropertyDefaultPaperType() (value string, err error) { + retValue, err := instance.GetProperty("DefaultPaperType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDetectedErrorState sets the value of DetectedErrorState for the instance +func (instance *CIM_Printer) SetPropertyDetectedErrorState(value uint16) (err error) { + return instance.SetProperty("DetectedErrorState", (value)) +} + +// GetDetectedErrorState gets the value of DetectedErrorState for the instance +func (instance *CIM_Printer) GetPropertyDetectedErrorState() (value uint16, err error) { + retValue, err := instance.GetProperty("DetectedErrorState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorInformation sets the value of ErrorInformation for the instance +func (instance *CIM_Printer) SetPropertyErrorInformation(value []string) (err error) { + return instance.SetProperty("ErrorInformation", (value)) +} + +// GetErrorInformation gets the value of ErrorInformation for the instance +func (instance *CIM_Printer) GetPropertyErrorInformation() (value []string, err error) { + retValue, err := instance.GetProperty("ErrorInformation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *CIM_Printer) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *CIM_Printer) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobCountSinceLastReset sets the value of JobCountSinceLastReset for the instance +func (instance *CIM_Printer) SetPropertyJobCountSinceLastReset(value uint32) (err error) { + return instance.SetProperty("JobCountSinceLastReset", (value)) +} + +// GetJobCountSinceLastReset gets the value of JobCountSinceLastReset for the instance +func (instance *CIM_Printer) GetPropertyJobCountSinceLastReset() (value uint32, err error) { + retValue, err := instance.GetProperty("JobCountSinceLastReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLanguagesSupported sets the value of LanguagesSupported for the instance +func (instance *CIM_Printer) SetPropertyLanguagesSupported(value []uint16) (err error) { + return instance.SetProperty("LanguagesSupported", (value)) +} + +// GetLanguagesSupported gets the value of LanguagesSupported for the instance +func (instance *CIM_Printer) GetPropertyLanguagesSupported() (value []uint16, err error) { + retValue, err := instance.GetProperty("LanguagesSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetMarkingTechnology sets the value of MarkingTechnology for the instance +func (instance *CIM_Printer) SetPropertyMarkingTechnology(value uint16) (err error) { + return instance.SetProperty("MarkingTechnology", (value)) +} + +// GetMarkingTechnology gets the value of MarkingTechnology for the instance +func (instance *CIM_Printer) GetPropertyMarkingTechnology() (value uint16, err error) { + retValue, err := instance.GetProperty("MarkingTechnology") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxCopies sets the value of MaxCopies for the instance +func (instance *CIM_Printer) SetPropertyMaxCopies(value uint32) (err error) { + return instance.SetProperty("MaxCopies", (value)) +} + +// GetMaxCopies gets the value of MaxCopies for the instance +func (instance *CIM_Printer) GetPropertyMaxCopies() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxCopies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxNumberUp sets the value of MaxNumberUp for the instance +func (instance *CIM_Printer) SetPropertyMaxNumberUp(value uint32) (err error) { + return instance.SetProperty("MaxNumberUp", (value)) +} + +// GetMaxNumberUp gets the value of MaxNumberUp for the instance +func (instance *CIM_Printer) GetPropertyMaxNumberUp() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxNumberUp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxSizeSupported sets the value of MaxSizeSupported for the instance +func (instance *CIM_Printer) SetPropertyMaxSizeSupported(value uint32) (err error) { + return instance.SetProperty("MaxSizeSupported", (value)) +} + +// GetMaxSizeSupported gets the value of MaxSizeSupported for the instance +func (instance *CIM_Printer) GetPropertyMaxSizeSupported() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxSizeSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMimeTypesSupported sets the value of MimeTypesSupported for the instance +func (instance *CIM_Printer) SetPropertyMimeTypesSupported(value []string) (err error) { + return instance.SetProperty("MimeTypesSupported", (value)) +} + +// GetMimeTypesSupported gets the value of MimeTypesSupported for the instance +func (instance *CIM_Printer) GetPropertyMimeTypesSupported() (value []string, err error) { + retValue, err := instance.GetProperty("MimeTypesSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetNaturalLanguagesSupported sets the value of NaturalLanguagesSupported for the instance +func (instance *CIM_Printer) SetPropertyNaturalLanguagesSupported(value []string) (err error) { + return instance.SetProperty("NaturalLanguagesSupported", (value)) +} + +// GetNaturalLanguagesSupported gets the value of NaturalLanguagesSupported for the instance +func (instance *CIM_Printer) GetPropertyNaturalLanguagesSupported() (value []string, err error) { + retValue, err := instance.GetProperty("NaturalLanguagesSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPaperSizesSupported sets the value of PaperSizesSupported for the instance +func (instance *CIM_Printer) SetPropertyPaperSizesSupported(value []uint16) (err error) { + return instance.SetProperty("PaperSizesSupported", (value)) +} + +// GetPaperSizesSupported gets the value of PaperSizesSupported for the instance +func (instance *CIM_Printer) GetPropertyPaperSizesSupported() (value []uint16, err error) { + retValue, err := instance.GetProperty("PaperSizesSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPaperTypesAvailable sets the value of PaperTypesAvailable for the instance +func (instance *CIM_Printer) SetPropertyPaperTypesAvailable(value []string) (err error) { + return instance.SetProperty("PaperTypesAvailable", (value)) +} + +// GetPaperTypesAvailable gets the value of PaperTypesAvailable for the instance +func (instance *CIM_Printer) GetPropertyPaperTypesAvailable() (value []string, err error) { + retValue, err := instance.GetProperty("PaperTypesAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPrinterStatus sets the value of PrinterStatus for the instance +func (instance *CIM_Printer) SetPropertyPrinterStatus(value uint16) (err error) { + return instance.SetProperty("PrinterStatus", (value)) +} + +// GetPrinterStatus gets the value of PrinterStatus for the instance +func (instance *CIM_Printer) GetPropertyPrinterStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("PrinterStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTimeOfLastReset sets the value of TimeOfLastReset for the instance +func (instance *CIM_Printer) SetPropertyTimeOfLastReset(value string) (err error) { + return instance.SetProperty("TimeOfLastReset", (value)) +} + +// GetTimeOfLastReset gets the value of TimeOfLastReset for the instance +func (instance *CIM_Printer) GetPropertyTimeOfLastReset() (value string, err error) { + retValue, err := instance.GetProperty("TimeOfLastReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *CIM_Printer) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *CIM_Printer) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Process.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Process.go new file mode 100644 index 00000000..8235efb2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Process.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Process struct +type CIM_Process struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + CreationDate string + + // + CSCreationClassName string + + // + CSName string + + // + ExecutionState uint16 + + // + Handle string + + // + KernelModeTime uint64 + + // + OSCreationClassName string + + // + OSName string + + // + Priority uint32 + + // + TerminationDate string + + // + UserModeTime uint64 + + // + WorkingSetSize uint64 +} + +func NewCIM_ProcessEx1(instance *cim.WmiInstance) (newInstance *CIM_Process, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Process{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_ProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Process, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Process{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_Process) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_Process) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCreationDate sets the value of CreationDate for the instance +func (instance *CIM_Process) SetPropertyCreationDate(value string) (err error) { + return instance.SetProperty("CreationDate", (value)) +} + +// GetCreationDate gets the value of CreationDate for the instance +func (instance *CIM_Process) GetPropertyCreationDate() (value string, err error) { + retValue, err := instance.GetProperty("CreationDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_Process) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_Process) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_Process) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_Process) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExecutionState sets the value of ExecutionState for the instance +func (instance *CIM_Process) SetPropertyExecutionState(value uint16) (err error) { + return instance.SetProperty("ExecutionState", (value)) +} + +// GetExecutionState gets the value of ExecutionState for the instance +func (instance *CIM_Process) GetPropertyExecutionState() (value uint16, err error) { + retValue, err := instance.GetProperty("ExecutionState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHandle sets the value of Handle for the instance +func (instance *CIM_Process) SetPropertyHandle(value string) (err error) { + return instance.SetProperty("Handle", (value)) +} + +// GetHandle gets the value of Handle for the instance +func (instance *CIM_Process) GetPropertyHandle() (value string, err error) { + retValue, err := instance.GetProperty("Handle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKernelModeTime sets the value of KernelModeTime for the instance +func (instance *CIM_Process) SetPropertyKernelModeTime(value uint64) (err error) { + return instance.SetProperty("KernelModeTime", (value)) +} + +// GetKernelModeTime gets the value of KernelModeTime for the instance +func (instance *CIM_Process) GetPropertyKernelModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("KernelModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOSCreationClassName sets the value of OSCreationClassName for the instance +func (instance *CIM_Process) SetPropertyOSCreationClassName(value string) (err error) { + return instance.SetProperty("OSCreationClassName", (value)) +} + +// GetOSCreationClassName gets the value of OSCreationClassName for the instance +func (instance *CIM_Process) GetPropertyOSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("OSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOSName sets the value of OSName for the instance +func (instance *CIM_Process) SetPropertyOSName(value string) (err error) { + return instance.SetProperty("OSName", (value)) +} + +// GetOSName gets the value of OSName for the instance +func (instance *CIM_Process) GetPropertyOSName() (value string, err error) { + retValue, err := instance.GetProperty("OSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPriority sets the value of Priority for the instance +func (instance *CIM_Process) SetPropertyPriority(value uint32) (err error) { + return instance.SetProperty("Priority", (value)) +} + +// GetPriority gets the value of Priority for the instance +func (instance *CIM_Process) GetPropertyPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("Priority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTerminationDate sets the value of TerminationDate for the instance +func (instance *CIM_Process) SetPropertyTerminationDate(value string) (err error) { + return instance.SetProperty("TerminationDate", (value)) +} + +// GetTerminationDate gets the value of TerminationDate for the instance +func (instance *CIM_Process) GetPropertyTerminationDate() (value string, err error) { + retValue, err := instance.GetProperty("TerminationDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserModeTime sets the value of UserModeTime for the instance +func (instance *CIM_Process) SetPropertyUserModeTime(value uint64) (err error) { + return instance.SetProperty("UserModeTime", (value)) +} + +// GetUserModeTime gets the value of UserModeTime for the instance +func (instance *CIM_Process) GetPropertyUserModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("UserModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetSize sets the value of WorkingSetSize for the instance +func (instance *CIM_Process) SetPropertyWorkingSetSize(value uint64) (err error) { + return instance.SetProperty("WorkingSetSize", (value)) +} + +// GetWorkingSetSize gets the value of WorkingSetSize for the instance +func (instance *CIM_Process) GetPropertyWorkingSetSize() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessExecutable.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessExecutable.go new file mode 100644 index 00000000..ee744007 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessExecutable.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProcessExecutable struct +type CIM_ProcessExecutable struct { + *CIM_Dependency + + // + BaseAddress uint64 + + // + GlobalProcessCount uint32 + + // + ModuleInstance uint32 + + // + ProcessCount uint32 +} + +func NewCIM_ProcessExecutableEx1(instance *cim.WmiInstance) (newInstance *CIM_ProcessExecutable, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ProcessExecutable{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ProcessExecutableEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProcessExecutable, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProcessExecutable{ + CIM_Dependency: tmp, + } + return +} + +// SetBaseAddress sets the value of BaseAddress for the instance +func (instance *CIM_ProcessExecutable) SetPropertyBaseAddress(value uint64) (err error) { + return instance.SetProperty("BaseAddress", (value)) +} + +// GetBaseAddress gets the value of BaseAddress for the instance +func (instance *CIM_ProcessExecutable) GetPropertyBaseAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("BaseAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalProcessCount sets the value of GlobalProcessCount for the instance +func (instance *CIM_ProcessExecutable) SetPropertyGlobalProcessCount(value uint32) (err error) { + return instance.SetProperty("GlobalProcessCount", (value)) +} + +// GetGlobalProcessCount gets the value of GlobalProcessCount for the instance +func (instance *CIM_ProcessExecutable) GetPropertyGlobalProcessCount() (value uint32, err error) { + retValue, err := instance.GetProperty("GlobalProcessCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetModuleInstance sets the value of ModuleInstance for the instance +func (instance *CIM_ProcessExecutable) SetPropertyModuleInstance(value uint32) (err error) { + return instance.SetProperty("ModuleInstance", (value)) +} + +// GetModuleInstance gets the value of ModuleInstance for the instance +func (instance *CIM_ProcessExecutable) GetPropertyModuleInstance() (value uint32, err error) { + retValue, err := instance.GetProperty("ModuleInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCount sets the value of ProcessCount for the instance +func (instance *CIM_ProcessExecutable) SetPropertyProcessCount(value uint32) (err error) { + return instance.SetProperty("ProcessCount", (value)) +} + +// GetProcessCount gets the value of ProcessCount for the instance +func (instance *CIM_ProcessExecutable) GetPropertyProcessCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessThread.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessThread.go new file mode 100644 index 00000000..5a2a484e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProcessThread.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ProcessThread struct +type CIM_ProcessThread struct { + *CIM_Component +} + +func NewCIM_ProcessThreadEx1(instance *cim.WmiInstance) (newInstance *CIM_ProcessThread, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ProcessThread{ + CIM_Component: tmp, + } + return +} + +func NewCIM_ProcessThreadEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProcessThread, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProcessThread{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Processor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Processor.go new file mode 100644 index 00000000..7b7414e3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Processor.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Processor struct +type CIM_Processor struct { + *CIM_LogicalDevice + + // + AddressWidth uint16 + + // + CurrentClockSpeed uint32 + + // + DataWidth uint16 + + // + Family uint16 + + // + LoadPercentage uint16 + + // + MaxClockSpeed uint32 + + // + OtherFamilyDescription string + + // + Role string + + // + Stepping string + + // + UniqueId string + + // + UpgradeMethod uint16 +} + +func NewCIM_ProcessorEx1(instance *cim.WmiInstance) (newInstance *CIM_Processor, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Processor{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_ProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Processor, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Processor{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetAddressWidth sets the value of AddressWidth for the instance +func (instance *CIM_Processor) SetPropertyAddressWidth(value uint16) (err error) { + return instance.SetProperty("AddressWidth", (value)) +} + +// GetAddressWidth gets the value of AddressWidth for the instance +func (instance *CIM_Processor) GetPropertyAddressWidth() (value uint16, err error) { + retValue, err := instance.GetProperty("AddressWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCurrentClockSpeed sets the value of CurrentClockSpeed for the instance +func (instance *CIM_Processor) SetPropertyCurrentClockSpeed(value uint32) (err error) { + return instance.SetProperty("CurrentClockSpeed", (value)) +} + +// GetCurrentClockSpeed gets the value of CurrentClockSpeed for the instance +func (instance *CIM_Processor) GetPropertyCurrentClockSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentClockSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataWidth sets the value of DataWidth for the instance +func (instance *CIM_Processor) SetPropertyDataWidth(value uint16) (err error) { + return instance.SetProperty("DataWidth", (value)) +} + +// GetDataWidth gets the value of DataWidth for the instance +func (instance *CIM_Processor) GetPropertyDataWidth() (value uint16, err error) { + retValue, err := instance.GetProperty("DataWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFamily sets the value of Family for the instance +func (instance *CIM_Processor) SetPropertyFamily(value uint16) (err error) { + return instance.SetProperty("Family", (value)) +} + +// GetFamily gets the value of Family for the instance +func (instance *CIM_Processor) GetPropertyFamily() (value uint16, err error) { + retValue, err := instance.GetProperty("Family") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLoadPercentage sets the value of LoadPercentage for the instance +func (instance *CIM_Processor) SetPropertyLoadPercentage(value uint16) (err error) { + return instance.SetProperty("LoadPercentage", (value)) +} + +// GetLoadPercentage gets the value of LoadPercentage for the instance +func (instance *CIM_Processor) GetPropertyLoadPercentage() (value uint16, err error) { + retValue, err := instance.GetProperty("LoadPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxClockSpeed sets the value of MaxClockSpeed for the instance +func (instance *CIM_Processor) SetPropertyMaxClockSpeed(value uint32) (err error) { + return instance.SetProperty("MaxClockSpeed", (value)) +} + +// GetMaxClockSpeed gets the value of MaxClockSpeed for the instance +func (instance *CIM_Processor) GetPropertyMaxClockSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxClockSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOtherFamilyDescription sets the value of OtherFamilyDescription for the instance +func (instance *CIM_Processor) SetPropertyOtherFamilyDescription(value string) (err error) { + return instance.SetProperty("OtherFamilyDescription", (value)) +} + +// GetOtherFamilyDescription gets the value of OtherFamilyDescription for the instance +func (instance *CIM_Processor) GetPropertyOtherFamilyDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherFamilyDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRole sets the value of Role for the instance +func (instance *CIM_Processor) SetPropertyRole(value string) (err error) { + return instance.SetProperty("Role", (value)) +} + +// GetRole gets the value of Role for the instance +func (instance *CIM_Processor) GetPropertyRole() (value string, err error) { + retValue, err := instance.GetProperty("Role") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStepping sets the value of Stepping for the instance +func (instance *CIM_Processor) SetPropertyStepping(value string) (err error) { + return instance.SetProperty("Stepping", (value)) +} + +// GetStepping gets the value of Stepping for the instance +func (instance *CIM_Processor) GetPropertyStepping() (value string, err error) { + retValue, err := instance.GetProperty("Stepping") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUniqueId sets the value of UniqueId for the instance +func (instance *CIM_Processor) SetPropertyUniqueId(value string) (err error) { + return instance.SetProperty("UniqueId", (value)) +} + +// GetUniqueId gets the value of UniqueId for the instance +func (instance *CIM_Processor) GetPropertyUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("UniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUpgradeMethod sets the value of UpgradeMethod for the instance +func (instance *CIM_Processor) SetPropertyUpgradeMethod(value uint16) (err error) { + return instance.SetProperty("UpgradeMethod", (value)) +} + +// GetUpgradeMethod gets the value of UpgradeMethod for the instance +func (instance *CIM_Processor) GetPropertyUpgradeMethod() (value uint16, err error) { + retValue, err := instance.GetProperty("UpgradeMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Product.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Product.go new file mode 100644 index 00000000..08310b42 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Product.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Product struct +type CIM_Product struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + IdentifyingNumber string + + // + Name string + + // + SKUNumber string + + // + Vendor string + + // + Version string +} + +func NewCIM_ProductEx1(instance *cim.WmiInstance) (newInstance *CIM_Product, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Product{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Product, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Product{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_Product) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_Product) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_Product) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_Product) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIdentifyingNumber sets the value of IdentifyingNumber for the instance +func (instance *CIM_Product) SetPropertyIdentifyingNumber(value string) (err error) { + return instance.SetProperty("IdentifyingNumber", (value)) +} + +// GetIdentifyingNumber gets the value of IdentifyingNumber for the instance +func (instance *CIM_Product) GetPropertyIdentifyingNumber() (value string, err error) { + retValue, err := instance.GetProperty("IdentifyingNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_Product) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_Product) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSKUNumber sets the value of SKUNumber for the instance +func (instance *CIM_Product) SetPropertySKUNumber(value string) (err error) { + return instance.SetProperty("SKUNumber", (value)) +} + +// GetSKUNumber gets the value of SKUNumber for the instance +func (instance *CIM_Product) GetPropertySKUNumber() (value string, err error) { + retValue, err := instance.GetProperty("SKUNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVendor sets the value of Vendor for the instance +func (instance *CIM_Product) SetPropertyVendor(value string) (err error) { + return instance.SetProperty("Vendor", (value)) +} + +// GetVendor gets the value of Vendor for the instance +func (instance *CIM_Product) GetPropertyVendor() (value string, err error) { + retValue, err := instance.GetProperty("Vendor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_Product) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_Product) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductFRU.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductFRU.go new file mode 100644 index 00000000..04884802 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductFRU.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProductFRU struct +type CIM_ProductFRU struct { + *cim.WmiInstance + + // + FRU CIM_FRU + + // + Product CIM_Product +} + +func NewCIM_ProductFRUEx1(instance *cim.WmiInstance) (newInstance *CIM_ProductFRU, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ProductFRU{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductFRUEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProductFRU, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProductFRU{ + WmiInstance: tmp, + } + return +} + +// SetFRU sets the value of FRU for the instance +func (instance *CIM_ProductFRU) SetPropertyFRU(value CIM_FRU) (err error) { + return instance.SetProperty("FRU", (value)) +} + +// GetFRU gets the value of FRU for the instance +func (instance *CIM_ProductFRU) GetPropertyFRU() (value CIM_FRU, err error) { + retValue, err := instance.GetProperty("FRU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_FRU) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_FRU is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_FRU(valuetmp) + + return +} + +// SetProduct sets the value of Product for the instance +func (instance *CIM_ProductFRU) SetPropertyProduct(value CIM_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *CIM_ProductFRU) GetPropertyProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductParentChild.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductParentChild.go new file mode 100644 index 00000000..eb133780 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductParentChild.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProductParentChild struct +type CIM_ProductParentChild struct { + *cim.WmiInstance + + // + Child CIM_Product + + // + Parent CIM_Product +} + +func NewCIM_ProductParentChildEx1(instance *cim.WmiInstance) (newInstance *CIM_ProductParentChild, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ProductParentChild{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductParentChildEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProductParentChild, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProductParentChild{ + WmiInstance: tmp, + } + return +} + +// SetChild sets the value of Child for the instance +func (instance *CIM_ProductParentChild) SetPropertyChild(value CIM_Product) (err error) { + return instance.SetProperty("Child", (value)) +} + +// GetChild gets the value of Child for the instance +func (instance *CIM_ProductParentChild) GetPropertyChild() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Child") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} + +// SetParent sets the value of Parent for the instance +func (instance *CIM_ProductParentChild) SetPropertyParent(value CIM_Product) (err error) { + return instance.SetProperty("Parent", (value)) +} + +// GetParent gets the value of Parent for the instance +func (instance *CIM_ProductParentChild) GetPropertyParent() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Parent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductPhysicalElements.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductPhysicalElements.go new file mode 100644 index 00000000..6e60b649 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductPhysicalElements.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProductPhysicalElements struct +type CIM_ProductPhysicalElements struct { + *cim.WmiInstance + + // + Component CIM_PhysicalElement + + // + Product CIM_Product +} + +func NewCIM_ProductPhysicalElementsEx1(instance *cim.WmiInstance) (newInstance *CIM_ProductPhysicalElements, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ProductPhysicalElements{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductPhysicalElementsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProductPhysicalElements, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProductPhysicalElements{ + WmiInstance: tmp, + } + return +} + +// SetComponent sets the value of Component for the instance +func (instance *CIM_ProductPhysicalElements) SetPropertyComponent(value CIM_PhysicalElement) (err error) { + return instance.SetProperty("Component", (value)) +} + +// GetComponent gets the value of Component for the instance +func (instance *CIM_ProductPhysicalElements) GetPropertyComponent() (value CIM_PhysicalElement, err error) { + retValue, err := instance.GetProperty("Component") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_PhysicalElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_PhysicalElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_PhysicalElement(valuetmp) + + return +} + +// SetProduct sets the value of Product for the instance +func (instance *CIM_ProductPhysicalElements) SetPropertyProduct(value CIM_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *CIM_ProductPhysicalElements) GetPropertyProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductProductDependency.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductProductDependency.go new file mode 100644 index 00000000..a322091e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductProductDependency.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProductProductDependency struct +type CIM_ProductProductDependency struct { + *cim.WmiInstance + + // + DependentProduct CIM_Product + + // + RequiredProduct CIM_Product + + // + TypeOfDependency uint16 +} + +func NewCIM_ProductProductDependencyEx1(instance *cim.WmiInstance) (newInstance *CIM_ProductProductDependency, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ProductProductDependency{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductProductDependencyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProductProductDependency, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProductProductDependency{ + WmiInstance: tmp, + } + return +} + +// SetDependentProduct sets the value of DependentProduct for the instance +func (instance *CIM_ProductProductDependency) SetPropertyDependentProduct(value CIM_Product) (err error) { + return instance.SetProperty("DependentProduct", (value)) +} + +// GetDependentProduct gets the value of DependentProduct for the instance +func (instance *CIM_ProductProductDependency) GetPropertyDependentProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("DependentProduct") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} + +// SetRequiredProduct sets the value of RequiredProduct for the instance +func (instance *CIM_ProductProductDependency) SetPropertyRequiredProduct(value CIM_Product) (err error) { + return instance.SetProperty("RequiredProduct", (value)) +} + +// GetRequiredProduct gets the value of RequiredProduct for the instance +func (instance *CIM_ProductProductDependency) GetPropertyRequiredProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("RequiredProduct") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} + +// SetTypeOfDependency sets the value of TypeOfDependency for the instance +func (instance *CIM_ProductProductDependency) SetPropertyTypeOfDependency(value uint16) (err error) { + return instance.SetProperty("TypeOfDependency", (value)) +} + +// GetTypeOfDependency gets the value of TypeOfDependency for the instance +func (instance *CIM_ProductProductDependency) GetPropertyTypeOfDependency() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeOfDependency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSoftwareFeatures.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSoftwareFeatures.go new file mode 100644 index 00000000..4d20545c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSoftwareFeatures.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProductSoftwareFeatures struct +type CIM_ProductSoftwareFeatures struct { + *cim.WmiInstance + + // + Component CIM_SoftwareFeature + + // + Product CIM_Product +} + +func NewCIM_ProductSoftwareFeaturesEx1(instance *cim.WmiInstance) (newInstance *CIM_ProductSoftwareFeatures, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ProductSoftwareFeatures{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductSoftwareFeaturesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProductSoftwareFeatures, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProductSoftwareFeatures{ + WmiInstance: tmp, + } + return +} + +// SetComponent sets the value of Component for the instance +func (instance *CIM_ProductSoftwareFeatures) SetPropertyComponent(value CIM_SoftwareFeature) (err error) { + return instance.SetProperty("Component", (value)) +} + +// GetComponent gets the value of Component for the instance +func (instance *CIM_ProductSoftwareFeatures) GetPropertyComponent() (value CIM_SoftwareFeature, err error) { + retValue, err := instance.GetProperty("Component") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_SoftwareFeature) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_SoftwareFeature is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_SoftwareFeature(valuetmp) + + return +} + +// SetProduct sets the value of Product for the instance +func (instance *CIM_ProductSoftwareFeatures) SetPropertyProduct(value CIM_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *CIM_ProductSoftwareFeatures) GetPropertyProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSupport.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSupport.go new file mode 100644 index 00000000..479b7b1e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProductSupport.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProductSupport struct +type CIM_ProductSupport struct { + *cim.WmiInstance + + // + Product CIM_Product + + // + Support CIM_SupportAccess +} + +func NewCIM_ProductSupportEx1(instance *cim.WmiInstance) (newInstance *CIM_ProductSupport, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ProductSupport{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ProductSupportEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProductSupport, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProductSupport{ + WmiInstance: tmp, + } + return +} + +// SetProduct sets the value of Product for the instance +func (instance *CIM_ProductSupport) SetPropertyProduct(value CIM_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *CIM_ProductSupport) GetPropertyProduct() (value CIM_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Product(valuetmp) + + return +} + +// SetSupport sets the value of Support for the instance +func (instance *CIM_ProductSupport) SetPropertySupport(value CIM_SupportAccess) (err error) { + return instance.SetProperty("Support", (value)) +} + +// GetSupport gets the value of Support for the instance +func (instance *CIM_ProductSupport) GetPropertySupport() (value CIM_SupportAccess, err error) { + retValue, err := instance.GetProperty("Support") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_SupportAccess) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_SupportAccess is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_SupportAccess(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProtectedSpaceExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProtectedSpaceExtent.go new file mode 100644 index 00000000..72d9fcbc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ProtectedSpaceExtent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ProtectedSpaceExtent struct +type CIM_ProtectedSpaceExtent struct { + *CIM_StorageExtent + + // + UserDataStripeDepth uint64 +} + +func NewCIM_ProtectedSpaceExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_ProtectedSpaceExtent, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ProtectedSpaceExtent{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_ProtectedSpaceExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ProtectedSpaceExtent, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ProtectedSpaceExtent{ + CIM_StorageExtent: tmp, + } + return +} + +// SetUserDataStripeDepth sets the value of UserDataStripeDepth for the instance +func (instance *CIM_ProtectedSpaceExtent) SetPropertyUserDataStripeDepth(value uint64) (err error) { + return instance.SetProperty("UserDataStripeDepth", (value)) +} + +// GetUserDataStripeDepth gets the value of UserDataStripeDepth for the instance +func (instance *CIM_ProtectedSpaceExtent) GetPropertyUserDataStripeDepth() (value uint64, err error) { + retValue, err := instance.GetProperty("UserDataStripeDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Rack.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Rack.go new file mode 100644 index 00000000..9586c790 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Rack.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Rack struct +type CIM_Rack struct { + *CIM_PhysicalFrame + + // + CountryDesignation string + + // + TypeOfRack uint16 +} + +func NewCIM_RackEx1(instance *cim.WmiInstance) (newInstance *CIM_Rack, err error) { + tmp, err := NewCIM_PhysicalFrameEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Rack{ + CIM_PhysicalFrame: tmp, + } + return +} + +func NewCIM_RackEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Rack, err error) { + tmp, err := NewCIM_PhysicalFrameEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Rack{ + CIM_PhysicalFrame: tmp, + } + return +} + +// SetCountryDesignation sets the value of CountryDesignation for the instance +func (instance *CIM_Rack) SetPropertyCountryDesignation(value string) (err error) { + return instance.SetProperty("CountryDesignation", (value)) +} + +// GetCountryDesignation gets the value of CountryDesignation for the instance +func (instance *CIM_Rack) GetPropertyCountryDesignation() (value string, err error) { + retValue, err := instance.GetProperty("CountryDesignation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTypeOfRack sets the value of TypeOfRack for the instance +func (instance *CIM_Rack) SetPropertyTypeOfRack(value uint16) (err error) { + return instance.SetProperty("TypeOfRack", (value)) +} + +// GetTypeOfRack gets the value of TypeOfRack for the instance +func (instance *CIM_Rack) GetPropertyTypeOfRack() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeOfRack") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Realizes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Realizes.go new file mode 100644 index 00000000..c0a73d82 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Realizes.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Realizes struct +type CIM_Realizes struct { + *CIM_Dependency +} + +func NewCIM_RealizesEx1(instance *cim.WmiInstance) (newInstance *CIM_Realizes, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Realizes{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_RealizesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Realizes, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Realizes{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesAggregatePExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesAggregatePExtent.go new file mode 100644 index 00000000..8a0f6813 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesAggregatePExtent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_RealizesAggregatePExtent struct +type CIM_RealizesAggregatePExtent struct { + *CIM_Realizes +} + +func NewCIM_RealizesAggregatePExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_RealizesAggregatePExtent, err error) { + tmp, err := NewCIM_RealizesEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RealizesAggregatePExtent{ + CIM_Realizes: tmp, + } + return +} + +func NewCIM_RealizesAggregatePExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RealizesAggregatePExtent, err error) { + tmp, err := NewCIM_RealizesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RealizesAggregatePExtent{ + CIM_Realizes: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesDiskPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesDiskPartition.go new file mode 100644 index 00000000..2ccdf7ce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesDiskPartition.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_RealizesDiskPartition struct +type CIM_RealizesDiskPartition struct { + *CIM_Realizes + + // + StartingAddress uint64 +} + +func NewCIM_RealizesDiskPartitionEx1(instance *cim.WmiInstance) (newInstance *CIM_RealizesDiskPartition, err error) { + tmp, err := NewCIM_RealizesEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RealizesDiskPartition{ + CIM_Realizes: tmp, + } + return +} + +func NewCIM_RealizesDiskPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RealizesDiskPartition, err error) { + tmp, err := NewCIM_RealizesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RealizesDiskPartition{ + CIM_Realizes: tmp, + } + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_RealizesDiskPartition) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_RealizesDiskPartition) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesPExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesPExtent.go new file mode 100644 index 00000000..f7128d53 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RealizesPExtent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_RealizesPExtent struct +type CIM_RealizesPExtent struct { + *CIM_Realizes + + // + StartingAddress uint64 +} + +func NewCIM_RealizesPExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_RealizesPExtent, err error) { + tmp, err := NewCIM_RealizesEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RealizesPExtent{ + CIM_Realizes: tmp, + } + return +} + +func NewCIM_RealizesPExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RealizesPExtent, err error) { + tmp, err := NewCIM_RealizesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RealizesPExtent{ + CIM_Realizes: tmp, + } + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_RealizesPExtent) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_RealizesPExtent) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RebootAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RebootAction.go new file mode 100644 index 00000000..e2132a21 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RebootAction.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_RebootAction struct +type CIM_RebootAction struct { + *CIM_Action +} + +func NewCIM_RebootActionEx1(instance *cim.WmiInstance) (newInstance *CIM_RebootAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RebootAction{ + CIM_Action: tmp, + } + return +} + +func NewCIM_RebootActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RebootAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RebootAction{ + CIM_Action: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyComponent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyComponent.go new file mode 100644 index 00000000..b872c7eb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyComponent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_RedundancyComponent struct +type CIM_RedundancyComponent struct { + *CIM_Component +} + +func NewCIM_RedundancyComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_RedundancyComponent, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RedundancyComponent{ + CIM_Component: tmp, + } + return +} + +func NewCIM_RedundancyComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RedundancyComponent, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RedundancyComponent{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyGroup.go new file mode 100644 index 00000000..b927a4ae --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RedundancyGroup.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_RedundancyGroup struct +type CIM_RedundancyGroup struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + RedundancyStatus uint16 +} + +func NewCIM_RedundancyGroupEx1(instance *cim.WmiInstance) (newInstance *CIM_RedundancyGroup, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RedundancyGroup{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_RedundancyGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RedundancyGroup, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RedundancyGroup{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_RedundancyGroup) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_RedundancyGroup) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRedundancyStatus sets the value of RedundancyStatus for the instance +func (instance *CIM_RedundancyGroup) SetPropertyRedundancyStatus(value uint16) (err error) { + return instance.SetProperty("RedundancyStatus", (value)) +} + +// GetRedundancyStatus gets the value of RedundancyStatus for the instance +func (instance *CIM_RedundancyGroup) GetPropertyRedundancyStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("RedundancyStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Refrigeration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Refrigeration.go new file mode 100644 index 00000000..bab890c9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Refrigeration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Refrigeration struct +type CIM_Refrigeration struct { + *CIM_CoolingDevice +} + +func NewCIM_RefrigerationEx1(instance *cim.WmiInstance) (newInstance *CIM_Refrigeration, err error) { + tmp, err := NewCIM_CoolingDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Refrigeration{ + CIM_CoolingDevice: tmp, + } + return +} + +func NewCIM_RefrigerationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Refrigeration, err error) { + tmp, err := NewCIM_CoolingDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Refrigeration{ + CIM_CoolingDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RelatedStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RelatedStatistics.go new file mode 100644 index 00000000..0b40a502 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RelatedStatistics.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_RelatedStatistics struct +type CIM_RelatedStatistics struct { + *cim.WmiInstance + + // + RelatedStats CIM_StatisticalInformation + + // + Stats CIM_StatisticalInformation +} + +func NewCIM_RelatedStatisticsEx1(instance *cim.WmiInstance) (newInstance *CIM_RelatedStatistics, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_RelatedStatistics{ + WmiInstance: tmp, + } + return +} + +func NewCIM_RelatedStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RelatedStatistics, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RelatedStatistics{ + WmiInstance: tmp, + } + return +} + +// SetRelatedStats sets the value of RelatedStats for the instance +func (instance *CIM_RelatedStatistics) SetPropertyRelatedStats(value CIM_StatisticalInformation) (err error) { + return instance.SetProperty("RelatedStats", (value)) +} + +// GetRelatedStats gets the value of RelatedStats for the instance +func (instance *CIM_RelatedStatistics) GetPropertyRelatedStats() (value CIM_StatisticalInformation, err error) { + retValue, err := instance.GetProperty("RelatedStats") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_StatisticalInformation) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_StatisticalInformation is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_StatisticalInformation(valuetmp) + + return +} + +// SetStats sets the value of Stats for the instance +func (instance *CIM_RelatedStatistics) SetPropertyStats(value CIM_StatisticalInformation) (err error) { + return instance.SetProperty("Stats", (value)) +} + +// GetStats gets the value of Stats for the instance +func (instance *CIM_RelatedStatistics) GetPropertyStats() (value CIM_StatisticalInformation, err error) { + retValue, err := instance.GetProperty("Stats") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_StatisticalInformation) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_StatisticalInformation is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_StatisticalInformation(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoteFileSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoteFileSystem.go new file mode 100644 index 00000000..e3afc9cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoteFileSystem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_RemoteFileSystem struct +type CIM_RemoteFileSystem struct { + *CIM_FileSystem +} + +func NewCIM_RemoteFileSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_RemoteFileSystem, err error) { + tmp, err := NewCIM_FileSystemEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RemoteFileSystem{ + CIM_FileSystem: tmp, + } + return +} + +func NewCIM_RemoteFileSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RemoteFileSystem, err error) { + tmp, err := NewCIM_FileSystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RemoteFileSystem{ + CIM_FileSystem: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveDirectoryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveDirectoryAction.go new file mode 100644 index 00000000..13044777 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveDirectoryAction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_RemoveDirectoryAction struct +type CIM_RemoveDirectoryAction struct { + *CIM_DirectoryAction + + // + MustBeEmpty bool +} + +func NewCIM_RemoveDirectoryActionEx1(instance *cim.WmiInstance) (newInstance *CIM_RemoveDirectoryAction, err error) { + tmp, err := NewCIM_DirectoryActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RemoveDirectoryAction{ + CIM_DirectoryAction: tmp, + } + return +} + +func NewCIM_RemoveDirectoryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RemoveDirectoryAction, err error) { + tmp, err := NewCIM_DirectoryActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RemoveDirectoryAction{ + CIM_DirectoryAction: tmp, + } + return +} + +// SetMustBeEmpty sets the value of MustBeEmpty for the instance +func (instance *CIM_RemoveDirectoryAction) SetPropertyMustBeEmpty(value bool) (err error) { + return instance.SetProperty("MustBeEmpty", (value)) +} + +// GetMustBeEmpty gets the value of MustBeEmpty for the instance +func (instance *CIM_RemoveDirectoryAction) GetPropertyMustBeEmpty() (value bool, err error) { + retValue, err := instance.GetProperty("MustBeEmpty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveFileAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveFileAction.go new file mode 100644 index 00000000..1529e53e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RemoveFileAction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_RemoveFileAction struct +type CIM_RemoveFileAction struct { + *CIM_FileAction + + // + File string +} + +func NewCIM_RemoveFileActionEx1(instance *cim.WmiInstance) (newInstance *CIM_RemoveFileAction, err error) { + tmp, err := NewCIM_FileActionEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RemoveFileAction{ + CIM_FileAction: tmp, + } + return +} + +func NewCIM_RemoveFileActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RemoveFileAction, err error) { + tmp, err := NewCIM_FileActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RemoveFileAction{ + CIM_FileAction: tmp, + } + return +} + +// SetFile sets the value of File for the instance +func (instance *CIM_RemoveFileAction) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *CIM_RemoveFileAction) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ReplacementSet.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ReplacementSet.go new file mode 100644 index 00000000..99354aa9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ReplacementSet.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ReplacementSet struct +type CIM_ReplacementSet struct { + *cim.WmiInstance + + // + Description string + + // + Name string +} + +func NewCIM_ReplacementSetEx1(instance *cim.WmiInstance) (newInstance *CIM_ReplacementSet, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ReplacementSet{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ReplacementSetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ReplacementSet, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ReplacementSet{ + WmiInstance: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_ReplacementSet) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_ReplacementSet) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_ReplacementSet) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_ReplacementSet) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ResidesOnExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ResidesOnExtent.go new file mode 100644 index 00000000..0d6d06d2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ResidesOnExtent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ResidesOnExtent struct +type CIM_ResidesOnExtent struct { + *CIM_Dependency +} + +func NewCIM_ResidesOnExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_ResidesOnExtent, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ResidesOnExtent{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ResidesOnExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ResidesOnExtent, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ResidesOnExtent{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RunningOS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RunningOS.go new file mode 100644 index 00000000..bc087214 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_RunningOS.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_RunningOS struct +type CIM_RunningOS struct { + *CIM_Dependency +} + +func NewCIM_RunningOSEx1(instance *cim.WmiInstance) (newInstance *CIM_RunningOS, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_RunningOS{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_RunningOSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_RunningOS, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_RunningOS{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SAPSAPDependency.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SAPSAPDependency.go new file mode 100644 index 00000000..73a80bc8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SAPSAPDependency.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SAPSAPDependency struct +type CIM_SAPSAPDependency struct { + *CIM_Dependency +} + +func NewCIM_SAPSAPDependencyEx1(instance *cim.WmiInstance) (newInstance *CIM_SAPSAPDependency, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SAPSAPDependency{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_SAPSAPDependencyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SAPSAPDependency, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SAPSAPDependency{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIController.go new file mode 100644 index 00000000..22615384 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIController.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SCSIController struct +type CIM_SCSIController struct { + *CIM_Controller + + // + ControllerTimeouts uint32 + + // + MaxDataWidth uint32 + + // + MaxTransferRate uint64 + + // + ProtectionManagement uint16 +} + +func NewCIM_SCSIControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_SCSIController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SCSIController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_SCSIControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SCSIController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SCSIController{ + CIM_Controller: tmp, + } + return +} + +// SetControllerTimeouts sets the value of ControllerTimeouts for the instance +func (instance *CIM_SCSIController) SetPropertyControllerTimeouts(value uint32) (err error) { + return instance.SetProperty("ControllerTimeouts", (value)) +} + +// GetControllerTimeouts gets the value of ControllerTimeouts for the instance +func (instance *CIM_SCSIController) GetPropertyControllerTimeouts() (value uint32, err error) { + retValue, err := instance.GetProperty("ControllerTimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxDataWidth sets the value of MaxDataWidth for the instance +func (instance *CIM_SCSIController) SetPropertyMaxDataWidth(value uint32) (err error) { + return instance.SetProperty("MaxDataWidth", (value)) +} + +// GetMaxDataWidth gets the value of MaxDataWidth for the instance +func (instance *CIM_SCSIController) GetPropertyMaxDataWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxDataWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxTransferRate sets the value of MaxTransferRate for the instance +func (instance *CIM_SCSIController) SetPropertyMaxTransferRate(value uint64) (err error) { + return instance.SetProperty("MaxTransferRate", (value)) +} + +// GetMaxTransferRate gets the value of MaxTransferRate for the instance +func (instance *CIM_SCSIController) GetPropertyMaxTransferRate() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxTransferRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtectionManagement sets the value of ProtectionManagement for the instance +func (instance *CIM_SCSIController) SetPropertyProtectionManagement(value uint16) (err error) { + return instance.SetProperty("ProtectionManagement", (value)) +} + +// GetProtectionManagement gets the value of ProtectionManagement for the instance +func (instance *CIM_SCSIController) GetPropertyProtectionManagement() (value uint16, err error) { + retValue, err := instance.GetProperty("ProtectionManagement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIInterface.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIInterface.go new file mode 100644 index 00000000..9de49aee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SCSIInterface.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SCSIInterface struct +type CIM_SCSIInterface struct { + *CIM_ControlledBy + + // + SCSIRetries uint32 + + // + SCSITimeouts uint32 +} + +func NewCIM_SCSIInterfaceEx1(instance *cim.WmiInstance) (newInstance *CIM_SCSIInterface, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SCSIInterface{ + CIM_ControlledBy: tmp, + } + return +} + +func NewCIM_SCSIInterfaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SCSIInterface, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SCSIInterface{ + CIM_ControlledBy: tmp, + } + return +} + +// SetSCSIRetries sets the value of SCSIRetries for the instance +func (instance *CIM_SCSIInterface) SetPropertySCSIRetries(value uint32) (err error) { + return instance.SetProperty("SCSIRetries", (value)) +} + +// GetSCSIRetries gets the value of SCSIRetries for the instance +func (instance *CIM_SCSIInterface) GetPropertySCSIRetries() (value uint32, err error) { + retValue, err := instance.GetProperty("SCSIRetries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCSITimeouts sets the value of SCSITimeouts for the instance +func (instance *CIM_SCSIInterface) SetPropertySCSITimeouts(value uint32) (err error) { + return instance.SetProperty("SCSITimeouts", (value)) +} + +// GetSCSITimeouts gets the value of SCSITimeouts for the instance +func (instance *CIM_SCSIInterface) GetPropertySCSITimeouts() (value uint32, err error) { + retValue, err := instance.GetProperty("SCSITimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Scanner.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Scanner.go new file mode 100644 index 00000000..323376a2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Scanner.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Scanner struct +type CIM_Scanner struct { + *CIM_LogicalDevice +} + +func NewCIM_ScannerEx1(instance *cim.WmiInstance) (newInstance *CIM_Scanner, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Scanner{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_ScannerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Scanner, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Scanner{ + CIM_LogicalDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Sensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Sensor.go new file mode 100644 index 00000000..bf7be515 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Sensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Sensor struct +type CIM_Sensor struct { + *CIM_LogicalDevice +} + +func NewCIM_SensorEx1(instance *cim.WmiInstance) (newInstance *CIM_Sensor, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Sensor{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_SensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Sensor, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Sensor{ + CIM_LogicalDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialController.go new file mode 100644 index 00000000..6e90bf91 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialController.go @@ -0,0 +1,142 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SerialController struct +type CIM_SerialController struct { + *CIM_Controller + + // + Capabilities []uint16 + + // + CapabilityDescriptions []string + + // + MaxBaudRate uint32 +} + +func NewCIM_SerialControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_SerialController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SerialController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_SerialControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SerialController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SerialController{ + CIM_Controller: tmp, + } + return +} + +// SetCapabilities sets the value of Capabilities for the instance +func (instance *CIM_SerialController) SetPropertyCapabilities(value []uint16) (err error) { + return instance.SetProperty("Capabilities", (value)) +} + +// GetCapabilities gets the value of Capabilities for the instance +func (instance *CIM_SerialController) GetPropertyCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("Capabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCapabilityDescriptions sets the value of CapabilityDescriptions for the instance +func (instance *CIM_SerialController) SetPropertyCapabilityDescriptions(value []string) (err error) { + return instance.SetProperty("CapabilityDescriptions", (value)) +} + +// GetCapabilityDescriptions gets the value of CapabilityDescriptions for the instance +func (instance *CIM_SerialController) GetPropertyCapabilityDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CapabilityDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetMaxBaudRate sets the value of MaxBaudRate for the instance +func (instance *CIM_SerialController) SetPropertyMaxBaudRate(value uint32) (err error) { + return instance.SetProperty("MaxBaudRate", (value)) +} + +// GetMaxBaudRate gets the value of MaxBaudRate for the instance +func (instance *CIM_SerialController) GetPropertyMaxBaudRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxBaudRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialInterface.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialInterface.go new file mode 100644 index 00000000..a70f3513 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SerialInterface.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SerialInterface struct +type CIM_SerialInterface struct { + *CIM_ControlledBy + + // + FlowControlInfo uint16 + + // + NumberOfStopBits uint16 + + // + ParityInfo uint16 +} + +func NewCIM_SerialInterfaceEx1(instance *cim.WmiInstance) (newInstance *CIM_SerialInterface, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SerialInterface{ + CIM_ControlledBy: tmp, + } + return +} + +func NewCIM_SerialInterfaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SerialInterface, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SerialInterface{ + CIM_ControlledBy: tmp, + } + return +} + +// SetFlowControlInfo sets the value of FlowControlInfo for the instance +func (instance *CIM_SerialInterface) SetPropertyFlowControlInfo(value uint16) (err error) { + return instance.SetProperty("FlowControlInfo", (value)) +} + +// GetFlowControlInfo gets the value of FlowControlInfo for the instance +func (instance *CIM_SerialInterface) GetPropertyFlowControlInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("FlowControlInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfStopBits sets the value of NumberOfStopBits for the instance +func (instance *CIM_SerialInterface) SetPropertyNumberOfStopBits(value uint16) (err error) { + return instance.SetProperty("NumberOfStopBits", (value)) +} + +// GetNumberOfStopBits gets the value of NumberOfStopBits for the instance +func (instance *CIM_SerialInterface) GetPropertyNumberOfStopBits() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfStopBits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetParityInfo sets the value of ParityInfo for the instance +func (instance *CIM_SerialInterface) SetPropertyParityInfo(value uint16) (err error) { + return instance.SetProperty("ParityInfo", (value)) +} + +// GetParityInfo gets the value of ParityInfo for the instance +func (instance *CIM_SerialInterface) GetPropertyParityInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("ParityInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Service.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Service.go new file mode 100644 index 00000000..2c90955e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Service.go @@ -0,0 +1,226 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Service struct +type CIM_Service struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + Started bool + + // + StartMode string + + // + SystemCreationClassName string + + // + SystemName string +} + +func NewCIM_ServiceEx1(instance *cim.WmiInstance) (newInstance *CIM_Service, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Service{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_ServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Service, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Service{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_Service) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_Service) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStarted sets the value of Started for the instance +func (instance *CIM_Service) SetPropertyStarted(value bool) (err error) { + return instance.SetProperty("Started", (value)) +} + +// GetStarted gets the value of Started for the instance +func (instance *CIM_Service) GetPropertyStarted() (value bool, err error) { + retValue, err := instance.GetProperty("Started") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetStartMode sets the value of StartMode for the instance +func (instance *CIM_Service) SetPropertyStartMode(value string) (err error) { + return instance.SetProperty("StartMode", (value)) +} + +// GetStartMode gets the value of StartMode for the instance +func (instance *CIM_Service) GetPropertyStartMode() (value string, err error) { + retValue, err := instance.GetProperty("StartMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemCreationClassName sets the value of SystemCreationClassName for the instance +func (instance *CIM_Service) SetPropertySystemCreationClassName(value string) (err error) { + return instance.SetProperty("SystemCreationClassName", (value)) +} + +// GetSystemCreationClassName gets the value of SystemCreationClassName for the instance +func (instance *CIM_Service) GetPropertySystemCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("SystemCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemName sets the value of SystemName for the instance +func (instance *CIM_Service) SetPropertySystemName(value string) (err error) { + return instance.SetProperty("SystemName", (value)) +} + +// GetSystemName gets the value of SystemName for the instance +func (instance *CIM_Service) GetPropertySystemName() (value string, err error) { + retValue, err := instance.GetProperty("SystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *CIM_Service) StartService() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("StartService") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *CIM_Service) StopService() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("StopService") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessBySAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessBySAP.go new file mode 100644 index 00000000..671be689 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessBySAP.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ServiceAccessBySAP struct +type CIM_ServiceAccessBySAP struct { + *CIM_Dependency +} + +func NewCIM_ServiceAccessBySAPEx1(instance *cim.WmiInstance) (newInstance *CIM_ServiceAccessBySAP, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ServiceAccessBySAP{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ServiceAccessBySAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ServiceAccessBySAP, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ServiceAccessBySAP{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessPoint.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessPoint.go new file mode 100644 index 00000000..d17e5f59 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceAccessPoint.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ServiceAccessPoint struct +type CIM_ServiceAccessPoint struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + SystemCreationClassName string + + // + SystemName string + + // + Type uint32 +} + +func NewCIM_ServiceAccessPointEx1(instance *cim.WmiInstance) (newInstance *CIM_ServiceAccessPoint, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ServiceAccessPoint{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_ServiceAccessPointEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ServiceAccessPoint, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ServiceAccessPoint{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_ServiceAccessPoint) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_ServiceAccessPoint) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemCreationClassName sets the value of SystemCreationClassName for the instance +func (instance *CIM_ServiceAccessPoint) SetPropertySystemCreationClassName(value string) (err error) { + return instance.SetProperty("SystemCreationClassName", (value)) +} + +// GetSystemCreationClassName gets the value of SystemCreationClassName for the instance +func (instance *CIM_ServiceAccessPoint) GetPropertySystemCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("SystemCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemName sets the value of SystemName for the instance +func (instance *CIM_ServiceAccessPoint) SetPropertySystemName(value string) (err error) { + return instance.SetProperty("SystemName", (value)) +} + +// GetSystemName gets the value of SystemName for the instance +func (instance *CIM_ServiceAccessPoint) GetPropertySystemName() (value string, err error) { + retValue, err := instance.GetProperty("SystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *CIM_ServiceAccessPoint) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *CIM_ServiceAccessPoint) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceSAPDependency.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceSAPDependency.go new file mode 100644 index 00000000..aff72f59 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceSAPDependency.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ServiceSAPDependency struct +type CIM_ServiceSAPDependency struct { + *CIM_Dependency +} + +func NewCIM_ServiceSAPDependencyEx1(instance *cim.WmiInstance) (newInstance *CIM_ServiceSAPDependency, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ServiceSAPDependency{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ServiceSAPDependencyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ServiceSAPDependency, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ServiceSAPDependency{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceServiceDependency.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceServiceDependency.go new file mode 100644 index 00000000..95dbcb71 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ServiceServiceDependency.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ServiceServiceDependency struct +type CIM_ServiceServiceDependency struct { + *CIM_Dependency + + // + TypeOfDependency uint16 +} + +func NewCIM_ServiceServiceDependencyEx1(instance *cim.WmiInstance) (newInstance *CIM_ServiceServiceDependency, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ServiceServiceDependency{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_ServiceServiceDependencyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ServiceServiceDependency, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ServiceServiceDependency{ + CIM_Dependency: tmp, + } + return +} + +// SetTypeOfDependency sets the value of TypeOfDependency for the instance +func (instance *CIM_ServiceServiceDependency) SetPropertyTypeOfDependency(value uint16) (err error) { + return instance.SetProperty("TypeOfDependency", (value)) +} + +// GetTypeOfDependency gets the value of TypeOfDependency for the instance +func (instance *CIM_ServiceServiceDependency) GetPropertyTypeOfDependency() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeOfDependency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Setting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Setting.go new file mode 100644 index 00000000..af577fd8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Setting.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Setting struct +type CIM_Setting struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + SettingID string +} + +func NewCIM_SettingEx1(instance *cim.WmiInstance) (newInstance *CIM_Setting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Setting{ + WmiInstance: tmp, + } + return +} + +func NewCIM_SettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Setting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Setting{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_Setting) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_Setting) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_Setting) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_Setting) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSettingID sets the value of SettingID for the instance +func (instance *CIM_Setting) SetPropertySettingID(value string) (err error) { + return instance.SetProperty("SettingID", (value)) +} + +// GetSettingID gets the value of SettingID for the instance +func (instance *CIM_Setting) GetPropertySettingID() (value string, err error) { + retValue, err := instance.GetProperty("SettingID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingCheck.go new file mode 100644 index 00000000..ea0bbcff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingCheck.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SettingCheck struct +type CIM_SettingCheck struct { + *CIM_Check + + // + CheckType uint16 + + // + EntryName string + + // + EntryValue string + + // + FileName string + + // + SectionKey string +} + +func NewCIM_SettingCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_SettingCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SettingCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_SettingCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SettingCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SettingCheck{ + CIM_Check: tmp, + } + return +} + +// SetCheckType sets the value of CheckType for the instance +func (instance *CIM_SettingCheck) SetPropertyCheckType(value uint16) (err error) { + return instance.SetProperty("CheckType", (value)) +} + +// GetCheckType gets the value of CheckType for the instance +func (instance *CIM_SettingCheck) GetPropertyCheckType() (value uint16, err error) { + retValue, err := instance.GetProperty("CheckType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEntryName sets the value of EntryName for the instance +func (instance *CIM_SettingCheck) SetPropertyEntryName(value string) (err error) { + return instance.SetProperty("EntryName", (value)) +} + +// GetEntryName gets the value of EntryName for the instance +func (instance *CIM_SettingCheck) GetPropertyEntryName() (value string, err error) { + retValue, err := instance.GetProperty("EntryName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEntryValue sets the value of EntryValue for the instance +func (instance *CIM_SettingCheck) SetPropertyEntryValue(value string) (err error) { + return instance.SetProperty("EntryValue", (value)) +} + +// GetEntryValue gets the value of EntryValue for the instance +func (instance *CIM_SettingCheck) GetPropertyEntryValue() (value string, err error) { + retValue, err := instance.GetProperty("EntryValue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_SettingCheck) SetPropertyFileName(value string) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_SettingCheck) GetPropertyFileName() (value string, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSectionKey sets the value of SectionKey for the instance +func (instance *CIM_SettingCheck) SetPropertySectionKey(value string) (err error) { + return instance.SetProperty("SectionKey", (value)) +} + +// GetSectionKey gets the value of SectionKey for the instance +func (instance *CIM_SettingCheck) GetPropertySectionKey() (value string, err error) { + retValue, err := instance.GetProperty("SectionKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingContext.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingContext.go new file mode 100644 index 00000000..eaeb77ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SettingContext.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SettingContext struct +type CIM_SettingContext struct { + *cim.WmiInstance + + // + Context CIM_Configuration + + // + Setting CIM_Setting +} + +func NewCIM_SettingContextEx1(instance *cim.WmiInstance) (newInstance *CIM_SettingContext, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_SettingContext{ + WmiInstance: tmp, + } + return +} + +func NewCIM_SettingContextEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SettingContext, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SettingContext{ + WmiInstance: tmp, + } + return +} + +// SetContext sets the value of Context for the instance +func (instance *CIM_SettingContext) SetPropertyContext(value CIM_Configuration) (err error) { + return instance.SetProperty("Context", (value)) +} + +// GetContext gets the value of Context for the instance +func (instance *CIM_SettingContext) GetPropertyContext() (value CIM_Configuration, err error) { + retValue, err := instance.GetProperty("Context") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Configuration) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Configuration is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Configuration(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *CIM_SettingContext) SetPropertySetting(value CIM_Setting) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *CIM_SettingContext) GetPropertySetting() (value CIM_Setting, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Setting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Setting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Setting(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Slot.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Slot.go new file mode 100644 index 00000000..050e93cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Slot.go @@ -0,0 +1,352 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Slot struct +type CIM_Slot struct { + *CIM_PhysicalConnector + + // + HeightAllowed float32 + + // + LengthAllowed float32 + + // + MaxDataWidth uint16 + + // + Number uint16 + + // + PurposeDescription string + + // + SpecialPurpose bool + + // + SupportsHotPlug bool + + // + ThermalRating uint32 + + // + VccMixedVoltageSupport []uint16 + + // + VppMixedVoltageSupport []uint16 +} + +func NewCIM_SlotEx1(instance *cim.WmiInstance) (newInstance *CIM_Slot, err error) { + tmp, err := NewCIM_PhysicalConnectorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Slot{ + CIM_PhysicalConnector: tmp, + } + return +} + +func NewCIM_SlotEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Slot, err error) { + tmp, err := NewCIM_PhysicalConnectorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Slot{ + CIM_PhysicalConnector: tmp, + } + return +} + +// SetHeightAllowed sets the value of HeightAllowed for the instance +func (instance *CIM_Slot) SetPropertyHeightAllowed(value float32) (err error) { + return instance.SetProperty("HeightAllowed", (value)) +} + +// GetHeightAllowed gets the value of HeightAllowed for the instance +func (instance *CIM_Slot) GetPropertyHeightAllowed() (value float32, err error) { + retValue, err := instance.GetProperty("HeightAllowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetLengthAllowed sets the value of LengthAllowed for the instance +func (instance *CIM_Slot) SetPropertyLengthAllowed(value float32) (err error) { + return instance.SetProperty("LengthAllowed", (value)) +} + +// GetLengthAllowed gets the value of LengthAllowed for the instance +func (instance *CIM_Slot) GetPropertyLengthAllowed() (value float32, err error) { + retValue, err := instance.GetProperty("LengthAllowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetMaxDataWidth sets the value of MaxDataWidth for the instance +func (instance *CIM_Slot) SetPropertyMaxDataWidth(value uint16) (err error) { + return instance.SetProperty("MaxDataWidth", (value)) +} + +// GetMaxDataWidth gets the value of MaxDataWidth for the instance +func (instance *CIM_Slot) GetPropertyMaxDataWidth() (value uint16, err error) { + retValue, err := instance.GetProperty("MaxDataWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumber sets the value of Number for the instance +func (instance *CIM_Slot) SetPropertyNumber(value uint16) (err error) { + return instance.SetProperty("Number", (value)) +} + +// GetNumber gets the value of Number for the instance +func (instance *CIM_Slot) GetPropertyNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("Number") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPurposeDescription sets the value of PurposeDescription for the instance +func (instance *CIM_Slot) SetPropertyPurposeDescription(value string) (err error) { + return instance.SetProperty("PurposeDescription", (value)) +} + +// GetPurposeDescription gets the value of PurposeDescription for the instance +func (instance *CIM_Slot) GetPropertyPurposeDescription() (value string, err error) { + retValue, err := instance.GetProperty("PurposeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpecialPurpose sets the value of SpecialPurpose for the instance +func (instance *CIM_Slot) SetPropertySpecialPurpose(value bool) (err error) { + return instance.SetProperty("SpecialPurpose", (value)) +} + +// GetSpecialPurpose gets the value of SpecialPurpose for the instance +func (instance *CIM_Slot) GetPropertySpecialPurpose() (value bool, err error) { + retValue, err := instance.GetProperty("SpecialPurpose") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsHotPlug sets the value of SupportsHotPlug for the instance +func (instance *CIM_Slot) SetPropertySupportsHotPlug(value bool) (err error) { + return instance.SetProperty("SupportsHotPlug", (value)) +} + +// GetSupportsHotPlug gets the value of SupportsHotPlug for the instance +func (instance *CIM_Slot) GetPropertySupportsHotPlug() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsHotPlug") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetThermalRating sets the value of ThermalRating for the instance +func (instance *CIM_Slot) SetPropertyThermalRating(value uint32) (err error) { + return instance.SetProperty("ThermalRating", (value)) +} + +// GetThermalRating gets the value of ThermalRating for the instance +func (instance *CIM_Slot) GetPropertyThermalRating() (value uint32, err error) { + retValue, err := instance.GetProperty("ThermalRating") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVccMixedVoltageSupport sets the value of VccMixedVoltageSupport for the instance +func (instance *CIM_Slot) SetPropertyVccMixedVoltageSupport(value []uint16) (err error) { + return instance.SetProperty("VccMixedVoltageSupport", (value)) +} + +// GetVccMixedVoltageSupport gets the value of VccMixedVoltageSupport for the instance +func (instance *CIM_Slot) GetPropertyVccMixedVoltageSupport() (value []uint16, err error) { + retValue, err := instance.GetProperty("VccMixedVoltageSupport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetVppMixedVoltageSupport sets the value of VppMixedVoltageSupport for the instance +func (instance *CIM_Slot) SetPropertyVppMixedVoltageSupport(value []uint16) (err error) { + return instance.SetProperty("VppMixedVoltageSupport", (value)) +} + +// GetVppMixedVoltageSupport gets the value of VppMixedVoltageSupport for the instance +func (instance *CIM_Slot) GetPropertyVppMixedVoltageSupport() (value []uint16, err error) { + retValue, err := instance.GetProperty("VppMixedVoltageSupport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SlotInSlot.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SlotInSlot.go new file mode 100644 index 00000000..0b2a25ba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SlotInSlot.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SlotInSlot struct +type CIM_SlotInSlot struct { + *CIM_ConnectedTo +} + +func NewCIM_SlotInSlotEx1(instance *cim.WmiInstance) (newInstance *CIM_SlotInSlot, err error) { + tmp, err := NewCIM_ConnectedToEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SlotInSlot{ + CIM_ConnectedTo: tmp, + } + return +} + +func NewCIM_SlotInSlotEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SlotInSlot, err error) { + tmp, err := NewCIM_ConnectedToEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SlotInSlot{ + CIM_ConnectedTo: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElement.go new file mode 100644 index 00000000..963d07c9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElement.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SoftwareElement struct +type CIM_SoftwareElement struct { + *CIM_LogicalElement + + // + BuildNumber string + + // + CodeSet string + + // + IdentificationCode string + + // + LanguageEdition string + + // + Manufacturer string + + // + OtherTargetOS string + + // + SerialNumber string + + // + SoftwareElementID string + + // + SoftwareElementState uint16 + + // + TargetOperatingSystem uint16 + + // + Version string +} + +func NewCIM_SoftwareElementEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareElement, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SoftwareElement{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_SoftwareElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareElement, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareElement{ + CIM_LogicalElement: tmp, + } + return +} + +// SetBuildNumber sets the value of BuildNumber for the instance +func (instance *CIM_SoftwareElement) SetPropertyBuildNumber(value string) (err error) { + return instance.SetProperty("BuildNumber", (value)) +} + +// GetBuildNumber gets the value of BuildNumber for the instance +func (instance *CIM_SoftwareElement) GetPropertyBuildNumber() (value string, err error) { + retValue, err := instance.GetProperty("BuildNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCodeSet sets the value of CodeSet for the instance +func (instance *CIM_SoftwareElement) SetPropertyCodeSet(value string) (err error) { + return instance.SetProperty("CodeSet", (value)) +} + +// GetCodeSet gets the value of CodeSet for the instance +func (instance *CIM_SoftwareElement) GetPropertyCodeSet() (value string, err error) { + retValue, err := instance.GetProperty("CodeSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIdentificationCode sets the value of IdentificationCode for the instance +func (instance *CIM_SoftwareElement) SetPropertyIdentificationCode(value string) (err error) { + return instance.SetProperty("IdentificationCode", (value)) +} + +// GetIdentificationCode gets the value of IdentificationCode for the instance +func (instance *CIM_SoftwareElement) GetPropertyIdentificationCode() (value string, err error) { + retValue, err := instance.GetProperty("IdentificationCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLanguageEdition sets the value of LanguageEdition for the instance +func (instance *CIM_SoftwareElement) SetPropertyLanguageEdition(value string) (err error) { + return instance.SetProperty("LanguageEdition", (value)) +} + +// GetLanguageEdition gets the value of LanguageEdition for the instance +func (instance *CIM_SoftwareElement) GetPropertyLanguageEdition() (value string, err error) { + retValue, err := instance.GetProperty("LanguageEdition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *CIM_SoftwareElement) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *CIM_SoftwareElement) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherTargetOS sets the value of OtherTargetOS for the instance +func (instance *CIM_SoftwareElement) SetPropertyOtherTargetOS(value string) (err error) { + return instance.SetProperty("OtherTargetOS", (value)) +} + +// GetOtherTargetOS gets the value of OtherTargetOS for the instance +func (instance *CIM_SoftwareElement) GetPropertyOtherTargetOS() (value string, err error) { + retValue, err := instance.GetProperty("OtherTargetOS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *CIM_SoftwareElement) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *CIM_SoftwareElement) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementID sets the value of SoftwareElementID for the instance +func (instance *CIM_SoftwareElement) SetPropertySoftwareElementID(value string) (err error) { + return instance.SetProperty("SoftwareElementID", (value)) +} + +// GetSoftwareElementID gets the value of SoftwareElementID for the instance +func (instance *CIM_SoftwareElement) GetPropertySoftwareElementID() (value string, err error) { + retValue, err := instance.GetProperty("SoftwareElementID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementState sets the value of SoftwareElementState for the instance +func (instance *CIM_SoftwareElement) SetPropertySoftwareElementState(value uint16) (err error) { + return instance.SetProperty("SoftwareElementState", (value)) +} + +// GetSoftwareElementState gets the value of SoftwareElementState for the instance +func (instance *CIM_SoftwareElement) GetPropertySoftwareElementState() (value uint16, err error) { + retValue, err := instance.GetProperty("SoftwareElementState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTargetOperatingSystem sets the value of TargetOperatingSystem for the instance +func (instance *CIM_SoftwareElement) SetPropertyTargetOperatingSystem(value uint16) (err error) { + return instance.SetProperty("TargetOperatingSystem", (value)) +} + +// GetTargetOperatingSystem gets the value of TargetOperatingSystem for the instance +func (instance *CIM_SoftwareElement) GetPropertyTargetOperatingSystem() (value uint16, err error) { + retValue, err := instance.GetProperty("TargetOperatingSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_SoftwareElement) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_SoftwareElement) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementActions.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementActions.go new file mode 100644 index 00000000..ba9642da --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementActions.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SoftwareElementActions struct +type CIM_SoftwareElementActions struct { + *cim.WmiInstance + + // + Action CIM_Action + + // + Element CIM_SoftwareElement +} + +func NewCIM_SoftwareElementActionsEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareElementActions, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_SoftwareElementActions{ + WmiInstance: tmp, + } + return +} + +func NewCIM_SoftwareElementActionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareElementActions, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareElementActions{ + WmiInstance: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *CIM_SoftwareElementActions) SetPropertyAction(value CIM_Action) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *CIM_SoftwareElementActions) GetPropertyAction() (value CIM_Action, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Action) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Action is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Action(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_SoftwareElementActions) SetPropertyElement(value CIM_SoftwareElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_SoftwareElementActions) GetPropertyElement() (value CIM_SoftwareElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_SoftwareElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_SoftwareElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_SoftwareElement(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementChecks.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementChecks.go new file mode 100644 index 00000000..2a999ada --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementChecks.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SoftwareElementChecks struct +type CIM_SoftwareElementChecks struct { + *cim.WmiInstance + + // + Check CIM_Check + + // + Element CIM_SoftwareElement + + // + Phase uint16 +} + +func NewCIM_SoftwareElementChecksEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareElementChecks, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_SoftwareElementChecks{ + WmiInstance: tmp, + } + return +} + +func NewCIM_SoftwareElementChecksEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareElementChecks, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareElementChecks{ + WmiInstance: tmp, + } + return +} + +// SetCheck sets the value of Check for the instance +func (instance *CIM_SoftwareElementChecks) SetPropertyCheck(value CIM_Check) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *CIM_SoftwareElementChecks) GetPropertyCheck() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_SoftwareElementChecks) SetPropertyElement(value CIM_SoftwareElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_SoftwareElementChecks) GetPropertyElement() (value CIM_SoftwareElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_SoftwareElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_SoftwareElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_SoftwareElement(valuetmp) + + return +} + +// SetPhase sets the value of Phase for the instance +func (instance *CIM_SoftwareElementChecks) SetPropertyPhase(value uint16) (err error) { + return instance.SetProperty("Phase", (value)) +} + +// GetPhase gets the value of Phase for the instance +func (instance *CIM_SoftwareElementChecks) GetPropertyPhase() (value uint16, err error) { + retValue, err := instance.GetProperty("Phase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementVersionCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementVersionCheck.go new file mode 100644 index 00000000..65d32edb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareElementVersionCheck.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SoftwareElementVersionCheck struct +type CIM_SoftwareElementVersionCheck struct { + *CIM_Check + + // + LowerSoftwareElementVersion string + + // + SoftwareElementName string + + // + SoftwareElementStateDesired uint16 + + // + TargetOperatingSystemDesired uint16 + + // + UpperSoftwareElementVersion string +} + +func NewCIM_SoftwareElementVersionCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareElementVersionCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SoftwareElementVersionCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_SoftwareElementVersionCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareElementVersionCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareElementVersionCheck{ + CIM_Check: tmp, + } + return +} + +// SetLowerSoftwareElementVersion sets the value of LowerSoftwareElementVersion for the instance +func (instance *CIM_SoftwareElementVersionCheck) SetPropertyLowerSoftwareElementVersion(value string) (err error) { + return instance.SetProperty("LowerSoftwareElementVersion", (value)) +} + +// GetLowerSoftwareElementVersion gets the value of LowerSoftwareElementVersion for the instance +func (instance *CIM_SoftwareElementVersionCheck) GetPropertyLowerSoftwareElementVersion() (value string, err error) { + retValue, err := instance.GetProperty("LowerSoftwareElementVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementName sets the value of SoftwareElementName for the instance +func (instance *CIM_SoftwareElementVersionCheck) SetPropertySoftwareElementName(value string) (err error) { + return instance.SetProperty("SoftwareElementName", (value)) +} + +// GetSoftwareElementName gets the value of SoftwareElementName for the instance +func (instance *CIM_SoftwareElementVersionCheck) GetPropertySoftwareElementName() (value string, err error) { + retValue, err := instance.GetProperty("SoftwareElementName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSoftwareElementStateDesired sets the value of SoftwareElementStateDesired for the instance +func (instance *CIM_SoftwareElementVersionCheck) SetPropertySoftwareElementStateDesired(value uint16) (err error) { + return instance.SetProperty("SoftwareElementStateDesired", (value)) +} + +// GetSoftwareElementStateDesired gets the value of SoftwareElementStateDesired for the instance +func (instance *CIM_SoftwareElementVersionCheck) GetPropertySoftwareElementStateDesired() (value uint16, err error) { + retValue, err := instance.GetProperty("SoftwareElementStateDesired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTargetOperatingSystemDesired sets the value of TargetOperatingSystemDesired for the instance +func (instance *CIM_SoftwareElementVersionCheck) SetPropertyTargetOperatingSystemDesired(value uint16) (err error) { + return instance.SetProperty("TargetOperatingSystemDesired", (value)) +} + +// GetTargetOperatingSystemDesired gets the value of TargetOperatingSystemDesired for the instance +func (instance *CIM_SoftwareElementVersionCheck) GetPropertyTargetOperatingSystemDesired() (value uint16, err error) { + retValue, err := instance.GetProperty("TargetOperatingSystemDesired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetUpperSoftwareElementVersion sets the value of UpperSoftwareElementVersion for the instance +func (instance *CIM_SoftwareElementVersionCheck) SetPropertyUpperSoftwareElementVersion(value string) (err error) { + return instance.SetProperty("UpperSoftwareElementVersion", (value)) +} + +// GetUpperSoftwareElementVersion gets the value of UpperSoftwareElementVersion for the instance +func (instance *CIM_SoftwareElementVersionCheck) GetPropertyUpperSoftwareElementVersion() (value string, err error) { + retValue, err := instance.GetProperty("UpperSoftwareElementVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeature.go new file mode 100644 index 00000000..9fad4be1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeature.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SoftwareFeature struct +type CIM_SoftwareFeature struct { + *CIM_LogicalElement + + // + IdentifyingNumber string + + // + ProductName string + + // + Vendor string + + // + Version string +} + +func NewCIM_SoftwareFeatureEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareFeature, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeature{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_SoftwareFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareFeature, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeature{ + CIM_LogicalElement: tmp, + } + return +} + +// SetIdentifyingNumber sets the value of IdentifyingNumber for the instance +func (instance *CIM_SoftwareFeature) SetPropertyIdentifyingNumber(value string) (err error) { + return instance.SetProperty("IdentifyingNumber", (value)) +} + +// GetIdentifyingNumber gets the value of IdentifyingNumber for the instance +func (instance *CIM_SoftwareFeature) GetPropertyIdentifyingNumber() (value string, err error) { + retValue, err := instance.GetProperty("IdentifyingNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductName sets the value of ProductName for the instance +func (instance *CIM_SoftwareFeature) SetPropertyProductName(value string) (err error) { + return instance.SetProperty("ProductName", (value)) +} + +// GetProductName gets the value of ProductName for the instance +func (instance *CIM_SoftwareFeature) GetPropertyProductName() (value string, err error) { + retValue, err := instance.GetProperty("ProductName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVendor sets the value of Vendor for the instance +func (instance *CIM_SoftwareFeature) SetPropertyVendor(value string) (err error) { + return instance.SetProperty("Vendor", (value)) +} + +// GetVendor gets the value of Vendor for the instance +func (instance *CIM_SoftwareFeature) GetPropertyVendor() (value string, err error) { + retValue, err := instance.GetProperty("Vendor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *CIM_SoftwareFeature) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *CIM_SoftwareFeature) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSAPImplementation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSAPImplementation.go new file mode 100644 index 00000000..16e6a11c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSAPImplementation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SoftwareFeatureSAPImplementation struct +type CIM_SoftwareFeatureSAPImplementation struct { + *CIM_Dependency +} + +func NewCIM_SoftwareFeatureSAPImplementationEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareFeatureSAPImplementation, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeatureSAPImplementation{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_SoftwareFeatureSAPImplementationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareFeatureSAPImplementation, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeatureSAPImplementation{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureServiceImplementation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureServiceImplementation.go new file mode 100644 index 00000000..33466267 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureServiceImplementation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SoftwareFeatureServiceImplementation struct +type CIM_SoftwareFeatureServiceImplementation struct { + *CIM_Dependency +} + +func NewCIM_SoftwareFeatureServiceImplementationEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareFeatureServiceImplementation, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeatureServiceImplementation{ + CIM_Dependency: tmp, + } + return +} + +func NewCIM_SoftwareFeatureServiceImplementationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareFeatureServiceImplementation, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeatureServiceImplementation{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSoftwareElements.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSoftwareElements.go new file mode 100644 index 00000000..fb291a44 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SoftwareFeatureSoftwareElements.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SoftwareFeatureSoftwareElements struct +type CIM_SoftwareFeatureSoftwareElements struct { + *CIM_Component +} + +func NewCIM_SoftwareFeatureSoftwareElementsEx1(instance *cim.WmiInstance) (newInstance *CIM_SoftwareFeatureSoftwareElements, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeatureSoftwareElements{ + CIM_Component: tmp, + } + return +} + +func NewCIM_SoftwareFeatureSoftwareElementsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SoftwareFeatureSoftwareElements, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SoftwareFeatureSoftwareElements{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SpareGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SpareGroup.go new file mode 100644 index 00000000..32ed2443 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SpareGroup.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SpareGroup struct +type CIM_SpareGroup struct { + *CIM_RedundancyGroup +} + +func NewCIM_SpareGroupEx1(instance *cim.WmiInstance) (newInstance *CIM_SpareGroup, err error) { + tmp, err := NewCIM_RedundancyGroupEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SpareGroup{ + CIM_RedundancyGroup: tmp, + } + return +} + +func NewCIM_SpareGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SpareGroup, err error) { + tmp, err := NewCIM_RedundancyGroupEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SpareGroup{ + CIM_RedundancyGroup: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StatisticalInformation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StatisticalInformation.go new file mode 100644 index 00000000..172573f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StatisticalInformation.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_StatisticalInformation struct +type CIM_StatisticalInformation struct { + *cim.WmiInstance + + // + Caption string + + // + Description string + + // + Name string +} + +func NewCIM_StatisticalInformationEx1(instance *cim.WmiInstance) (newInstance *CIM_StatisticalInformation, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_StatisticalInformation{ + WmiInstance: tmp, + } + return +} + +func NewCIM_StatisticalInformationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_StatisticalInformation, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_StatisticalInformation{ + WmiInstance: tmp, + } + return +} + +// SetCaption sets the value of Caption for the instance +func (instance *CIM_StatisticalInformation) SetPropertyCaption(value string) (err error) { + return instance.SetProperty("Caption", (value)) +} + +// GetCaption gets the value of Caption for the instance +func (instance *CIM_StatisticalInformation) GetPropertyCaption() (value string, err error) { + retValue, err := instance.GetProperty("Caption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_StatisticalInformation) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_StatisticalInformation) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *CIM_StatisticalInformation) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *CIM_StatisticalInformation) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Statistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Statistics.go new file mode 100644 index 00000000..f8fb4236 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Statistics.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Statistics struct +type CIM_Statistics struct { + *cim.WmiInstance + + // + Element CIM_ManagedSystemElement + + // + Stats CIM_StatisticalInformation +} + +func NewCIM_StatisticsEx1(instance *cim.WmiInstance) (newInstance *CIM_Statistics, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Statistics{ + WmiInstance: tmp, + } + return +} + +func NewCIM_StatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Statistics, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Statistics{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *CIM_Statistics) SetPropertyElement(value CIM_ManagedSystemElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *CIM_Statistics) GetPropertyElement() (value CIM_ManagedSystemElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_ManagedSystemElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_ManagedSystemElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_ManagedSystemElement(valuetmp) + + return +} + +// SetStats sets the value of Stats for the instance +func (instance *CIM_Statistics) SetPropertyStats(value CIM_StatisticalInformation) (err error) { + return instance.SetProperty("Stats", (value)) +} + +// GetStats gets the value of Stats for the instance +func (instance *CIM_Statistics) GetPropertyStats() (value CIM_StatisticalInformation, err error) { + retValue, err := instance.GetProperty("Stats") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_StatisticalInformation) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_StatisticalInformation is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_StatisticalInformation(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageDefect.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageDefect.go new file mode 100644 index 00000000..9fab897c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageDefect.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_StorageDefect struct +type CIM_StorageDefect struct { + *cim.WmiInstance + + // + Error CIM_StorageError + + // + Extent CIM_StorageExtent +} + +func NewCIM_StorageDefectEx1(instance *cim.WmiInstance) (newInstance *CIM_StorageDefect, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_StorageDefect{ + WmiInstance: tmp, + } + return +} + +func NewCIM_StorageDefectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_StorageDefect, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_StorageDefect{ + WmiInstance: tmp, + } + return +} + +// SetError sets the value of Error for the instance +func (instance *CIM_StorageDefect) SetPropertyError(value CIM_StorageError) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *CIM_StorageDefect) GetPropertyError() (value CIM_StorageError, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_StorageError) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_StorageError is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_StorageError(valuetmp) + + return +} + +// SetExtent sets the value of Extent for the instance +func (instance *CIM_StorageDefect) SetPropertyExtent(value CIM_StorageExtent) (err error) { + return instance.SetProperty("Extent", (value)) +} + +// GetExtent gets the value of Extent for the instance +func (instance *CIM_StorageDefect) GetPropertyExtent() (value CIM_StorageExtent, err error) { + retValue, err := instance.GetProperty("Extent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_StorageExtent) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_StorageExtent is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_StorageExtent(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageError.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageError.go new file mode 100644 index 00000000..cf78626f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageError.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_StorageError struct +type CIM_StorageError struct { + *cim.WmiInstance + + // + DeviceCreationClassName string + + // + DeviceID string + + // + EndingAddress uint64 + + // + StartingAddress uint64 + + // + SystemCreationClassName string + + // + SystemName string +} + +func NewCIM_StorageErrorEx1(instance *cim.WmiInstance) (newInstance *CIM_StorageError, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_StorageError{ + WmiInstance: tmp, + } + return +} + +func NewCIM_StorageErrorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_StorageError, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_StorageError{ + WmiInstance: tmp, + } + return +} + +// SetDeviceCreationClassName sets the value of DeviceCreationClassName for the instance +func (instance *CIM_StorageError) SetPropertyDeviceCreationClassName(value string) (err error) { + return instance.SetProperty("DeviceCreationClassName", (value)) +} + +// GetDeviceCreationClassName gets the value of DeviceCreationClassName for the instance +func (instance *CIM_StorageError) GetPropertyDeviceCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("DeviceCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceID sets the value of DeviceID for the instance +func (instance *CIM_StorageError) SetPropertyDeviceID(value string) (err error) { + return instance.SetProperty("DeviceID", (value)) +} + +// GetDeviceID gets the value of DeviceID for the instance +func (instance *CIM_StorageError) GetPropertyDeviceID() (value string, err error) { + retValue, err := instance.GetProperty("DeviceID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEndingAddress sets the value of EndingAddress for the instance +func (instance *CIM_StorageError) SetPropertyEndingAddress(value uint64) (err error) { + return instance.SetProperty("EndingAddress", (value)) +} + +// GetEndingAddress gets the value of EndingAddress for the instance +func (instance *CIM_StorageError) GetPropertyEndingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("EndingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *CIM_StorageError) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *CIM_StorageError) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCreationClassName sets the value of SystemCreationClassName for the instance +func (instance *CIM_StorageError) SetPropertySystemCreationClassName(value string) (err error) { + return instance.SetProperty("SystemCreationClassName", (value)) +} + +// GetSystemCreationClassName gets the value of SystemCreationClassName for the instance +func (instance *CIM_StorageError) GetPropertySystemCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("SystemCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemName sets the value of SystemName for the instance +func (instance *CIM_StorageError) SetPropertySystemName(value string) (err error) { + return instance.SetProperty("SystemName", (value)) +} + +// GetSystemName gets the value of SystemName for the instance +func (instance *CIM_StorageError) GetPropertySystemName() (value string, err error) { + retValue, err := instance.GetProperty("SystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageExtent.go new file mode 100644 index 00000000..e2b03543 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageExtent.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_StorageExtent struct +type CIM_StorageExtent struct { + *CIM_LogicalDevice + + // + Access uint16 + + // + BlockSize uint64 + + // + ErrorMethodology string + + // + NumberOfBlocks uint64 + + // + Purpose string +} + +func NewCIM_StorageExtentEx1(instance *cim.WmiInstance) (newInstance *CIM_StorageExtent, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_StorageExtent{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_StorageExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_StorageExtent, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_StorageExtent{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetAccess sets the value of Access for the instance +func (instance *CIM_StorageExtent) SetPropertyAccess(value uint16) (err error) { + return instance.SetProperty("Access", (value)) +} + +// GetAccess gets the value of Access for the instance +func (instance *CIM_StorageExtent) GetPropertyAccess() (value uint16, err error) { + retValue, err := instance.GetProperty("Access") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetBlockSize sets the value of BlockSize for the instance +func (instance *CIM_StorageExtent) SetPropertyBlockSize(value uint64) (err error) { + return instance.SetProperty("BlockSize", (value)) +} + +// GetBlockSize gets the value of BlockSize for the instance +func (instance *CIM_StorageExtent) GetPropertyBlockSize() (value uint64, err error) { + retValue, err := instance.GetProperty("BlockSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorMethodology sets the value of ErrorMethodology for the instance +func (instance *CIM_StorageExtent) SetPropertyErrorMethodology(value string) (err error) { + return instance.SetProperty("ErrorMethodology", (value)) +} + +// GetErrorMethodology gets the value of ErrorMethodology for the instance +func (instance *CIM_StorageExtent) GetPropertyErrorMethodology() (value string, err error) { + retValue, err := instance.GetProperty("ErrorMethodology") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNumberOfBlocks sets the value of NumberOfBlocks for the instance +func (instance *CIM_StorageExtent) SetPropertyNumberOfBlocks(value uint64) (err error) { + return instance.SetProperty("NumberOfBlocks", (value)) +} + +// GetNumberOfBlocks gets the value of NumberOfBlocks for the instance +func (instance *CIM_StorageExtent) GetPropertyNumberOfBlocks() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberOfBlocks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPurpose sets the value of Purpose for the instance +func (instance *CIM_StorageExtent) SetPropertyPurpose(value string) (err error) { + return instance.SetProperty("Purpose", (value)) +} + +// GetPurpose gets the value of Purpose for the instance +func (instance *CIM_StorageExtent) GetPropertyPurpose() (value string, err error) { + retValue, err := instance.GetProperty("Purpose") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageRedundancyGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageRedundancyGroup.go new file mode 100644 index 00000000..d1fbc168 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageRedundancyGroup.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_StorageRedundancyGroup struct +type CIM_StorageRedundancyGroup struct { + *CIM_RedundancyGroup + + // + TypeOfAlgorithm uint16 +} + +func NewCIM_StorageRedundancyGroupEx1(instance *cim.WmiInstance) (newInstance *CIM_StorageRedundancyGroup, err error) { + tmp, err := NewCIM_RedundancyGroupEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_StorageRedundancyGroup{ + CIM_RedundancyGroup: tmp, + } + return +} + +func NewCIM_StorageRedundancyGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_StorageRedundancyGroup, err error) { + tmp, err := NewCIM_RedundancyGroupEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_StorageRedundancyGroup{ + CIM_RedundancyGroup: tmp, + } + return +} + +// SetTypeOfAlgorithm sets the value of TypeOfAlgorithm for the instance +func (instance *CIM_StorageRedundancyGroup) SetPropertyTypeOfAlgorithm(value uint16) (err error) { + return instance.SetProperty("TypeOfAlgorithm", (value)) +} + +// GetTypeOfAlgorithm gets the value of TypeOfAlgorithm for the instance +func (instance *CIM_StorageRedundancyGroup) GetPropertyTypeOfAlgorithm() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeOfAlgorithm") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageVolume.go new file mode 100644 index 00000000..1548345b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_StorageVolume.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_StorageVolume struct +type CIM_StorageVolume struct { + *CIM_StorageExtent +} + +func NewCIM_StorageVolumeEx1(instance *cim.WmiInstance) (newInstance *CIM_StorageVolume, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_StorageVolume{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_StorageVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_StorageVolume, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_StorageVolume{ + CIM_StorageExtent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SupportAccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SupportAccess.go new file mode 100644 index 00000000..b9d34681 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SupportAccess.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SupportAccess struct +type CIM_SupportAccess struct { + *cim.WmiInstance + + // + CommunicationInfo string + + // + CommunicationMode uint16 + + // + Description string + + // + Locale string + + // + SupportAccessId string +} + +func NewCIM_SupportAccessEx1(instance *cim.WmiInstance) (newInstance *CIM_SupportAccess, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_SupportAccess{ + WmiInstance: tmp, + } + return +} + +func NewCIM_SupportAccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SupportAccess, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SupportAccess{ + WmiInstance: tmp, + } + return +} + +// SetCommunicationInfo sets the value of CommunicationInfo for the instance +func (instance *CIM_SupportAccess) SetPropertyCommunicationInfo(value string) (err error) { + return instance.SetProperty("CommunicationInfo", (value)) +} + +// GetCommunicationInfo gets the value of CommunicationInfo for the instance +func (instance *CIM_SupportAccess) GetPropertyCommunicationInfo() (value string, err error) { + retValue, err := instance.GetProperty("CommunicationInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCommunicationMode sets the value of CommunicationMode for the instance +func (instance *CIM_SupportAccess) SetPropertyCommunicationMode(value uint16) (err error) { + return instance.SetProperty("CommunicationMode", (value)) +} + +// GetCommunicationMode gets the value of CommunicationMode for the instance +func (instance *CIM_SupportAccess) GetPropertyCommunicationMode() (value uint16, err error) { + retValue, err := instance.GetProperty("CommunicationMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *CIM_SupportAccess) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *CIM_SupportAccess) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocale sets the value of Locale for the instance +func (instance *CIM_SupportAccess) SetPropertyLocale(value string) (err error) { + return instance.SetProperty("Locale", (value)) +} + +// GetLocale gets the value of Locale for the instance +func (instance *CIM_SupportAccess) GetPropertyLocale() (value string, err error) { + retValue, err := instance.GetProperty("Locale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportAccessId sets the value of SupportAccessId for the instance +func (instance *CIM_SupportAccess) SetPropertySupportAccessId(value string) (err error) { + return instance.SetProperty("SupportAccessId", (value)) +} + +// GetSupportAccessId gets the value of SupportAccessId for the instance +func (instance *CIM_SupportAccess) GetPropertySupportAccessId() (value string, err error) { + retValue, err := instance.GetProperty("SupportAccessId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SwapSpaceCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SwapSpaceCheck.go new file mode 100644 index 00000000..91946441 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SwapSpaceCheck.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_SwapSpaceCheck struct +type CIM_SwapSpaceCheck struct { + *CIM_Check + + // + SwapSpaceSize uint64 +} + +func NewCIM_SwapSpaceCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_SwapSpaceCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SwapSpaceCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_SwapSpaceCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SwapSpaceCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SwapSpaceCheck{ + CIM_Check: tmp, + } + return +} + +// SetSwapSpaceSize sets the value of SwapSpaceSize for the instance +func (instance *CIM_SwapSpaceCheck) SetPropertySwapSpaceSize(value uint64) (err error) { + return instance.SetProperty("SwapSpaceSize", (value)) +} + +// GetSwapSpaceSize gets the value of SwapSpaceSize for the instance +func (instance *CIM_SwapSpaceCheck) GetPropertySwapSpaceSize() (value uint64, err error) { + retValue, err := instance.GetProperty("SwapSpaceSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_System.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_System.go new file mode 100644 index 00000000..7a02b5a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_System.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_System struct +type CIM_System struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + NameFormat string + + // + PrimaryOwnerContact string + + // + PrimaryOwnerName string + + // + Roles []string +} + +func NewCIM_SystemEx1(instance *cim.WmiInstance) (newInstance *CIM_System, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_System{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_SystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_System, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_System{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_System) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_System) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNameFormat sets the value of NameFormat for the instance +func (instance *CIM_System) SetPropertyNameFormat(value string) (err error) { + return instance.SetProperty("NameFormat", (value)) +} + +// GetNameFormat gets the value of NameFormat for the instance +func (instance *CIM_System) GetPropertyNameFormat() (value string, err error) { + retValue, err := instance.GetProperty("NameFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrimaryOwnerContact sets the value of PrimaryOwnerContact for the instance +func (instance *CIM_System) SetPropertyPrimaryOwnerContact(value string) (err error) { + return instance.SetProperty("PrimaryOwnerContact", (value)) +} + +// GetPrimaryOwnerContact gets the value of PrimaryOwnerContact for the instance +func (instance *CIM_System) GetPropertyPrimaryOwnerContact() (value string, err error) { + retValue, err := instance.GetProperty("PrimaryOwnerContact") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrimaryOwnerName sets the value of PrimaryOwnerName for the instance +func (instance *CIM_System) SetPropertyPrimaryOwnerName(value string) (err error) { + return instance.SetProperty("PrimaryOwnerName", (value)) +} + +// GetPrimaryOwnerName gets the value of PrimaryOwnerName for the instance +func (instance *CIM_System) GetPropertyPrimaryOwnerName() (value string, err error) { + retValue, err := instance.GetProperty("PrimaryOwnerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRoles sets the value of Roles for the instance +func (instance *CIM_System) SetPropertyRoles(value []string) (err error) { + return instance.SetProperty("Roles", (value)) +} + +// GetRoles gets the value of Roles for the instance +func (instance *CIM_System) GetPropertyRoles() (value []string, err error) { + retValue, err := instance.GetProperty("Roles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemComponent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemComponent.go new file mode 100644 index 00000000..166e0832 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemComponent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SystemComponent struct +type CIM_SystemComponent struct { + *CIM_Component +} + +func NewCIM_SystemComponentEx1(instance *cim.WmiInstance) (newInstance *CIM_SystemComponent, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SystemComponent{ + CIM_Component: tmp, + } + return +} + +func NewCIM_SystemComponentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SystemComponent, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SystemComponent{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemDevice.go new file mode 100644 index 00000000..df4e0c2b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SystemDevice struct +type CIM_SystemDevice struct { + *CIM_SystemComponent +} + +func NewCIM_SystemDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_SystemDevice, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SystemDevice{ + CIM_SystemComponent: tmp, + } + return +} + +func NewCIM_SystemDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SystemDevice, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SystemDevice{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemResource.go new file mode 100644 index 00000000..237a6782 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_SystemResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_SystemResource struct +type CIM_SystemResource struct { + *CIM_LogicalElement +} + +func NewCIM_SystemResourceEx1(instance *cim.WmiInstance) (newInstance *CIM_SystemResource, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_SystemResource{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_SystemResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_SystemResource, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_SystemResource{ + CIM_LogicalElement: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Tachometer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Tachometer.go new file mode 100644 index 00000000..b8c76810 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Tachometer.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_Tachometer struct +type CIM_Tachometer struct { + *CIM_NumericSensor +} + +func NewCIM_TachometerEx1(instance *cim.WmiInstance) (newInstance *CIM_Tachometer, err error) { + tmp, err := NewCIM_NumericSensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Tachometer{ + CIM_NumericSensor: tmp, + } + return +} + +func NewCIM_TachometerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Tachometer, err error) { + tmp, err := NewCIM_NumericSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Tachometer{ + CIM_NumericSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TapeDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TapeDrive.go new file mode 100644 index 00000000..bf9f16b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TapeDrive.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_TapeDrive struct +type CIM_TapeDrive struct { + *CIM_MediaAccessDevice + + // + EOTWarningZoneSize uint32 + + // + MaxPartitionCount uint32 + + // + Padding uint32 +} + +func NewCIM_TapeDriveEx1(instance *cim.WmiInstance) (newInstance *CIM_TapeDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_TapeDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +func NewCIM_TapeDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_TapeDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_TapeDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +// SetEOTWarningZoneSize sets the value of EOTWarningZoneSize for the instance +func (instance *CIM_TapeDrive) SetPropertyEOTWarningZoneSize(value uint32) (err error) { + return instance.SetProperty("EOTWarningZoneSize", (value)) +} + +// GetEOTWarningZoneSize gets the value of EOTWarningZoneSize for the instance +func (instance *CIM_TapeDrive) GetPropertyEOTWarningZoneSize() (value uint32, err error) { + retValue, err := instance.GetProperty("EOTWarningZoneSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxPartitionCount sets the value of MaxPartitionCount for the instance +func (instance *CIM_TapeDrive) SetPropertyMaxPartitionCount(value uint32) (err error) { + return instance.SetProperty("MaxPartitionCount", (value)) +} + +// GetMaxPartitionCount gets the value of MaxPartitionCount for the instance +func (instance *CIM_TapeDrive) GetPropertyMaxPartitionCount() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxPartitionCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPadding sets the value of Padding for the instance +func (instance *CIM_TapeDrive) SetPropertyPadding(value uint32) (err error) { + return instance.SetProperty("Padding", (value)) +} + +// GetPadding gets the value of Padding for the instance +func (instance *CIM_TapeDrive) GetPropertyPadding() (value uint32, err error) { + retValue, err := instance.GetProperty("Padding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TemperatureSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TemperatureSensor.go new file mode 100644 index 00000000..208af183 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_TemperatureSensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_TemperatureSensor struct +type CIM_TemperatureSensor struct { + *CIM_NumericSensor +} + +func NewCIM_TemperatureSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_TemperatureSensor, err error) { + tmp, err := NewCIM_NumericSensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_TemperatureSensor{ + CIM_NumericSensor: tmp, + } + return +} + +func NewCIM_TemperatureSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_TemperatureSensor, err error) { + tmp, err := NewCIM_NumericSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_TemperatureSensor{ + CIM_NumericSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Thread.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Thread.go new file mode 100644 index 00000000..0b97039f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_Thread.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Thread struct +type CIM_Thread struct { + *CIM_LogicalElement + + // + CreationClassName string + + // + CSCreationClassName string + + // + CSName string + + // + ExecutionState uint16 + + // + Handle string + + // + KernelModeTime uint64 + + // + OSCreationClassName string + + // + OSName string + + // + Priority uint32 + + // + ProcessCreationClassName string + + // + ProcessHandle string + + // + UserModeTime uint64 +} + +func NewCIM_ThreadEx1(instance *cim.WmiInstance) (newInstance *CIM_Thread, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_Thread{ + CIM_LogicalElement: tmp, + } + return +} + +func NewCIM_ThreadEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Thread, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Thread{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCreationClassName sets the value of CreationClassName for the instance +func (instance *CIM_Thread) SetPropertyCreationClassName(value string) (err error) { + return instance.SetProperty("CreationClassName", (value)) +} + +// GetCreationClassName gets the value of CreationClassName for the instance +func (instance *CIM_Thread) GetPropertyCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSCreationClassName sets the value of CSCreationClassName for the instance +func (instance *CIM_Thread) SetPropertyCSCreationClassName(value string) (err error) { + return instance.SetProperty("CSCreationClassName", (value)) +} + +// GetCSCreationClassName gets the value of CSCreationClassName for the instance +func (instance *CIM_Thread) GetPropertyCSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("CSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *CIM_Thread) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *CIM_Thread) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExecutionState sets the value of ExecutionState for the instance +func (instance *CIM_Thread) SetPropertyExecutionState(value uint16) (err error) { + return instance.SetProperty("ExecutionState", (value)) +} + +// GetExecutionState gets the value of ExecutionState for the instance +func (instance *CIM_Thread) GetPropertyExecutionState() (value uint16, err error) { + retValue, err := instance.GetProperty("ExecutionState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHandle sets the value of Handle for the instance +func (instance *CIM_Thread) SetPropertyHandle(value string) (err error) { + return instance.SetProperty("Handle", (value)) +} + +// GetHandle gets the value of Handle for the instance +func (instance *CIM_Thread) GetPropertyHandle() (value string, err error) { + retValue, err := instance.GetProperty("Handle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKernelModeTime sets the value of KernelModeTime for the instance +func (instance *CIM_Thread) SetPropertyKernelModeTime(value uint64) (err error) { + return instance.SetProperty("KernelModeTime", (value)) +} + +// GetKernelModeTime gets the value of KernelModeTime for the instance +func (instance *CIM_Thread) GetPropertyKernelModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("KernelModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOSCreationClassName sets the value of OSCreationClassName for the instance +func (instance *CIM_Thread) SetPropertyOSCreationClassName(value string) (err error) { + return instance.SetProperty("OSCreationClassName", (value)) +} + +// GetOSCreationClassName gets the value of OSCreationClassName for the instance +func (instance *CIM_Thread) GetPropertyOSCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("OSCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOSName sets the value of OSName for the instance +func (instance *CIM_Thread) SetPropertyOSName(value string) (err error) { + return instance.SetProperty("OSName", (value)) +} + +// GetOSName gets the value of OSName for the instance +func (instance *CIM_Thread) GetPropertyOSName() (value string, err error) { + retValue, err := instance.GetProperty("OSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPriority sets the value of Priority for the instance +func (instance *CIM_Thread) SetPropertyPriority(value uint32) (err error) { + return instance.SetProperty("Priority", (value)) +} + +// GetPriority gets the value of Priority for the instance +func (instance *CIM_Thread) GetPropertyPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("Priority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCreationClassName sets the value of ProcessCreationClassName for the instance +func (instance *CIM_Thread) SetPropertyProcessCreationClassName(value string) (err error) { + return instance.SetProperty("ProcessCreationClassName", (value)) +} + +// GetProcessCreationClassName gets the value of ProcessCreationClassName for the instance +func (instance *CIM_Thread) GetPropertyProcessCreationClassName() (value string, err error) { + retValue, err := instance.GetProperty("ProcessCreationClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProcessHandle sets the value of ProcessHandle for the instance +func (instance *CIM_Thread) SetPropertyProcessHandle(value string) (err error) { + return instance.SetProperty("ProcessHandle", (value)) +} + +// GetProcessHandle gets the value of ProcessHandle for the instance +func (instance *CIM_Thread) GetPropertyProcessHandle() (value string, err error) { + retValue, err := instance.GetProperty("ProcessHandle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserModeTime sets the value of UserModeTime for the instance +func (instance *CIM_Thread) SetPropertyUserModeTime(value uint64) (err error) { + return instance.SetProperty("UserModeTime", (value)) +} + +// GetUserModeTime gets the value of UserModeTime for the instance +func (instance *CIM_Thread) GetPropertyUserModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("UserModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectoryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectoryAction.go new file mode 100644 index 00000000..9cdd300d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectoryAction.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ToDirectoryAction struct +type CIM_ToDirectoryAction struct { + *cim.WmiInstance + + // + DestinationDirectory CIM_DirectoryAction + + // + FileName CIM_CopyFileAction +} + +func NewCIM_ToDirectoryActionEx1(instance *cim.WmiInstance) (newInstance *CIM_ToDirectoryAction, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ToDirectoryAction{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ToDirectoryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ToDirectoryAction, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ToDirectoryAction{ + WmiInstance: tmp, + } + return +} + +// SetDestinationDirectory sets the value of DestinationDirectory for the instance +func (instance *CIM_ToDirectoryAction) SetPropertyDestinationDirectory(value CIM_DirectoryAction) (err error) { + return instance.SetProperty("DestinationDirectory", (value)) +} + +// GetDestinationDirectory gets the value of DestinationDirectory for the instance +func (instance *CIM_ToDirectoryAction) GetPropertyDestinationDirectory() (value CIM_DirectoryAction, err error) { + retValue, err := instance.GetProperty("DestinationDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_DirectoryAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_DirectoryAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_DirectoryAction(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_ToDirectoryAction) SetPropertyFileName(value CIM_CopyFileAction) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_ToDirectoryAction) GetPropertyFileName() (value CIM_CopyFileAction, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CopyFileAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CopyFileAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CopyFileAction(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectorySpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectorySpecification.go new file mode 100644 index 00000000..6e55860e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_ToDirectorySpecification.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ToDirectorySpecification struct +type CIM_ToDirectorySpecification struct { + *cim.WmiInstance + + // + DestinationDirectory CIM_DirectorySpecification + + // + FileName CIM_CopyFileAction +} + +func NewCIM_ToDirectorySpecificationEx1(instance *cim.WmiInstance) (newInstance *CIM_ToDirectorySpecification, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_ToDirectorySpecification{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ToDirectorySpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ToDirectorySpecification, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ToDirectorySpecification{ + WmiInstance: tmp, + } + return +} + +// SetDestinationDirectory sets the value of DestinationDirectory for the instance +func (instance *CIM_ToDirectorySpecification) SetPropertyDestinationDirectory(value CIM_DirectorySpecification) (err error) { + return instance.SetProperty("DestinationDirectory", (value)) +} + +// GetDestinationDirectory gets the value of DestinationDirectory for the instance +func (instance *CIM_ToDirectorySpecification) GetPropertyDestinationDirectory() (value CIM_DirectorySpecification, err error) { + retValue, err := instance.GetProperty("DestinationDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_DirectorySpecification) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_DirectorySpecification is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_DirectorySpecification(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *CIM_ToDirectorySpecification) SetPropertyFileName(value CIM_CopyFileAction) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *CIM_ToDirectorySpecification) GetPropertyFileName() (value CIM_CopyFileAction, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CopyFileAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CopyFileAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CopyFileAction(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBController.go new file mode 100644 index 00000000..413e5474 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBController.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_USBController struct +type CIM_USBController struct { + *CIM_Controller + + // + Manufacturer string +} + +func NewCIM_USBControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_USBController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_USBController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_USBControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_USBController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_USBController{ + CIM_Controller: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *CIM_USBController) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *CIM_USBController) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBControllerHasHub.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBControllerHasHub.go new file mode 100644 index 00000000..f1adfd2b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBControllerHasHub.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_USBControllerHasHub struct +type CIM_USBControllerHasHub struct { + *CIM_ControlledBy +} + +func NewCIM_USBControllerHasHubEx1(instance *cim.WmiInstance) (newInstance *CIM_USBControllerHasHub, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_USBControllerHasHub{ + CIM_ControlledBy: tmp, + } + return +} + +func NewCIM_USBControllerHasHubEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_USBControllerHasHub, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_USBControllerHasHub{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBDevice.go new file mode 100644 index 00000000..2787344f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBDevice.go @@ -0,0 +1,286 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_USBDevice struct +type CIM_USBDevice struct { + *CIM_LogicalDevice + + // + ClassCode uint8 + + // + CurrentAlternateSettings []uint8 + + // + CurrentConfigValue uint8 + + // + NumberOfConfigs uint8 + + // + ProtocolCode uint8 + + // + SubclassCode uint8 + + // + USBVersion uint16 +} + +func NewCIM_USBDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_USBDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_USBDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_USBDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_USBDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_USBDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetClassCode sets the value of ClassCode for the instance +func (instance *CIM_USBDevice) SetPropertyClassCode(value uint8) (err error) { + return instance.SetProperty("ClassCode", (value)) +} + +// GetClassCode gets the value of ClassCode for the instance +func (instance *CIM_USBDevice) GetPropertyClassCode() (value uint8, err error) { + retValue, err := instance.GetProperty("ClassCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetCurrentAlternateSettings sets the value of CurrentAlternateSettings for the instance +func (instance *CIM_USBDevice) SetPropertyCurrentAlternateSettings(value []uint8) (err error) { + return instance.SetProperty("CurrentAlternateSettings", (value)) +} + +// GetCurrentAlternateSettings gets the value of CurrentAlternateSettings for the instance +func (instance *CIM_USBDevice) GetPropertyCurrentAlternateSettings() (value []uint8, err error) { + retValue, err := instance.GetProperty("CurrentAlternateSettings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetCurrentConfigValue sets the value of CurrentConfigValue for the instance +func (instance *CIM_USBDevice) SetPropertyCurrentConfigValue(value uint8) (err error) { + return instance.SetProperty("CurrentConfigValue", (value)) +} + +// GetCurrentConfigValue gets the value of CurrentConfigValue for the instance +func (instance *CIM_USBDevice) GetPropertyCurrentConfigValue() (value uint8, err error) { + retValue, err := instance.GetProperty("CurrentConfigValue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetNumberOfConfigs sets the value of NumberOfConfigs for the instance +func (instance *CIM_USBDevice) SetPropertyNumberOfConfigs(value uint8) (err error) { + return instance.SetProperty("NumberOfConfigs", (value)) +} + +// GetNumberOfConfigs gets the value of NumberOfConfigs for the instance +func (instance *CIM_USBDevice) GetPropertyNumberOfConfigs() (value uint8, err error) { + retValue, err := instance.GetProperty("NumberOfConfigs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetProtocolCode sets the value of ProtocolCode for the instance +func (instance *CIM_USBDevice) SetPropertyProtocolCode(value uint8) (err error) { + return instance.SetProperty("ProtocolCode", (value)) +} + +// GetProtocolCode gets the value of ProtocolCode for the instance +func (instance *CIM_USBDevice) GetPropertyProtocolCode() (value uint8, err error) { + retValue, err := instance.GetProperty("ProtocolCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetSubclassCode sets the value of SubclassCode for the instance +func (instance *CIM_USBDevice) SetPropertySubclassCode(value uint8) (err error) { + return instance.SetProperty("SubclassCode", (value)) +} + +// GetSubclassCode gets the value of SubclassCode for the instance +func (instance *CIM_USBDevice) GetPropertySubclassCode() (value uint8, err error) { + retValue, err := instance.GetProperty("SubclassCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetUSBVersion sets the value of USBVersion for the instance +func (instance *CIM_USBDevice) SetPropertyUSBVersion(value uint16) (err error) { + return instance.SetProperty("USBVersion", (value)) +} + +// GetUSBVersion gets the value of USBVersion for the instance +func (instance *CIM_USBDevice) GetPropertyUSBVersion() (value uint16, err error) { + retValue, err := instance.GetProperty("USBVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +// +// + +// +// +// +func (instance *CIM_USBDevice) GetDescriptor( /* IN */ RequestType uint8, + /* IN */ RequestValue uint16, + /* IN */ RequestIndex uint16, + /* IN/OUT */ RequestLength uint16, + /* OUT */ Buffer []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetDescriptor", RequestType, RequestValue, RequestIndex) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBHub.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBHub.go new file mode 100644 index 00000000..becfba69 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_USBHub.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_USBHub struct +type CIM_USBHub struct { + *CIM_USBDevice + + // + GangSwitched bool + + // + NumberOfPorts uint8 +} + +func NewCIM_USBHubEx1(instance *cim.WmiInstance) (newInstance *CIM_USBHub, err error) { + tmp, err := NewCIM_USBDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_USBHub{ + CIM_USBDevice: tmp, + } + return +} + +func NewCIM_USBHubEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_USBHub, err error) { + tmp, err := NewCIM_USBDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_USBHub{ + CIM_USBDevice: tmp, + } + return +} + +// SetGangSwitched sets the value of GangSwitched for the instance +func (instance *CIM_USBHub) SetPropertyGangSwitched(value bool) (err error) { + return instance.SetProperty("GangSwitched", (value)) +} + +// GetGangSwitched gets the value of GangSwitched for the instance +func (instance *CIM_USBHub) GetPropertyGangSwitched() (value bool, err error) { + retValue, err := instance.GetProperty("GangSwitched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNumberOfPorts sets the value of NumberOfPorts for the instance +func (instance *CIM_USBHub) SetPropertyNumberOfPorts(value uint8) (err error) { + return instance.SetProperty("NumberOfPorts", (value)) +} + +// GetNumberOfPorts gets the value of NumberOfPorts for the instance +func (instance *CIM_USBHub) GetPropertyNumberOfPorts() (value uint8, err error) { + retValue, err := instance.GetProperty("NumberOfPorts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UninterruptiblePowerSupply.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UninterruptiblePowerSupply.go new file mode 100644 index 00000000..9c4b8157 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UninterruptiblePowerSupply.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_UninterruptiblePowerSupply struct +type CIM_UninterruptiblePowerSupply struct { + *CIM_PowerSupply + + // + EstimatedChargeRemaining uint16 + + // + EstimatedRunTime uint32 + + // + RemainingCapacityStatus uint16 + + // + TimeOnBackup uint32 +} + +func NewCIM_UninterruptiblePowerSupplyEx1(instance *cim.WmiInstance) (newInstance *CIM_UninterruptiblePowerSupply, err error) { + tmp, err := NewCIM_PowerSupplyEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_UninterruptiblePowerSupply{ + CIM_PowerSupply: tmp, + } + return +} + +func NewCIM_UninterruptiblePowerSupplyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_UninterruptiblePowerSupply, err error) { + tmp, err := NewCIM_PowerSupplyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_UninterruptiblePowerSupply{ + CIM_PowerSupply: tmp, + } + return +} + +// SetEstimatedChargeRemaining sets the value of EstimatedChargeRemaining for the instance +func (instance *CIM_UninterruptiblePowerSupply) SetPropertyEstimatedChargeRemaining(value uint16) (err error) { + return instance.SetProperty("EstimatedChargeRemaining", (value)) +} + +// GetEstimatedChargeRemaining gets the value of EstimatedChargeRemaining for the instance +func (instance *CIM_UninterruptiblePowerSupply) GetPropertyEstimatedChargeRemaining() (value uint16, err error) { + retValue, err := instance.GetProperty("EstimatedChargeRemaining") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEstimatedRunTime sets the value of EstimatedRunTime for the instance +func (instance *CIM_UninterruptiblePowerSupply) SetPropertyEstimatedRunTime(value uint32) (err error) { + return instance.SetProperty("EstimatedRunTime", (value)) +} + +// GetEstimatedRunTime gets the value of EstimatedRunTime for the instance +func (instance *CIM_UninterruptiblePowerSupply) GetPropertyEstimatedRunTime() (value uint32, err error) { + retValue, err := instance.GetProperty("EstimatedRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemainingCapacityStatus sets the value of RemainingCapacityStatus for the instance +func (instance *CIM_UninterruptiblePowerSupply) SetPropertyRemainingCapacityStatus(value uint16) (err error) { + return instance.SetProperty("RemainingCapacityStatus", (value)) +} + +// GetRemainingCapacityStatus gets the value of RemainingCapacityStatus for the instance +func (instance *CIM_UninterruptiblePowerSupply) GetPropertyRemainingCapacityStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("RemainingCapacityStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTimeOnBackup sets the value of TimeOnBackup for the instance +func (instance *CIM_UninterruptiblePowerSupply) SetPropertyTimeOnBackup(value uint32) (err error) { + return instance.SetProperty("TimeOnBackup", (value)) +} + +// GetTimeOnBackup gets the value of TimeOnBackup for the instance +func (instance *CIM_UninterruptiblePowerSupply) GetPropertyTimeOnBackup() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeOnBackup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UnitaryComputerSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UnitaryComputerSystem.go new file mode 100644 index 00000000..7c71b5d2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UnitaryComputerSystem.go @@ -0,0 +1,249 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_UnitaryComputerSystem struct +type CIM_UnitaryComputerSystem struct { + *CIM_ComputerSystem + + // + InitialLoadInfo []string + + // + LastLoadInfo string + + // + PowerManagementCapabilities []uint16 + + // + PowerManagementSupported bool + + // + PowerState uint16 + + // + ResetCapability uint16 +} + +func NewCIM_UnitaryComputerSystemEx1(instance *cim.WmiInstance) (newInstance *CIM_UnitaryComputerSystem, err error) { + tmp, err := NewCIM_ComputerSystemEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_UnitaryComputerSystem{ + CIM_ComputerSystem: tmp, + } + return +} + +func NewCIM_UnitaryComputerSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_UnitaryComputerSystem, err error) { + tmp, err := NewCIM_ComputerSystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_UnitaryComputerSystem{ + CIM_ComputerSystem: tmp, + } + return +} + +// SetInitialLoadInfo sets the value of InitialLoadInfo for the instance +func (instance *CIM_UnitaryComputerSystem) SetPropertyInitialLoadInfo(value []string) (err error) { + return instance.SetProperty("InitialLoadInfo", (value)) +} + +// GetInitialLoadInfo gets the value of InitialLoadInfo for the instance +func (instance *CIM_UnitaryComputerSystem) GetPropertyInitialLoadInfo() (value []string, err error) { + retValue, err := instance.GetProperty("InitialLoadInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetLastLoadInfo sets the value of LastLoadInfo for the instance +func (instance *CIM_UnitaryComputerSystem) SetPropertyLastLoadInfo(value string) (err error) { + return instance.SetProperty("LastLoadInfo", (value)) +} + +// GetLastLoadInfo gets the value of LastLoadInfo for the instance +func (instance *CIM_UnitaryComputerSystem) GetPropertyLastLoadInfo() (value string, err error) { + retValue, err := instance.GetProperty("LastLoadInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPowerManagementCapabilities sets the value of PowerManagementCapabilities for the instance +func (instance *CIM_UnitaryComputerSystem) SetPropertyPowerManagementCapabilities(value []uint16) (err error) { + return instance.SetProperty("PowerManagementCapabilities", (value)) +} + +// GetPowerManagementCapabilities gets the value of PowerManagementCapabilities for the instance +func (instance *CIM_UnitaryComputerSystem) GetPropertyPowerManagementCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("PowerManagementCapabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPowerManagementSupported sets the value of PowerManagementSupported for the instance +func (instance *CIM_UnitaryComputerSystem) SetPropertyPowerManagementSupported(value bool) (err error) { + return instance.SetProperty("PowerManagementSupported", (value)) +} + +// GetPowerManagementSupported gets the value of PowerManagementSupported for the instance +func (instance *CIM_UnitaryComputerSystem) GetPropertyPowerManagementSupported() (value bool, err error) { + retValue, err := instance.GetProperty("PowerManagementSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPowerState sets the value of PowerState for the instance +func (instance *CIM_UnitaryComputerSystem) SetPropertyPowerState(value uint16) (err error) { + return instance.SetProperty("PowerState", (value)) +} + +// GetPowerState gets the value of PowerState for the instance +func (instance *CIM_UnitaryComputerSystem) GetPropertyPowerState() (value uint16, err error) { + retValue, err := instance.GetProperty("PowerState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetResetCapability sets the value of ResetCapability for the instance +func (instance *CIM_UnitaryComputerSystem) SetPropertyResetCapability(value uint16) (err error) { + return instance.SetProperty("ResetCapability", (value)) +} + +// GetResetCapability gets the value of ResetCapability for the instance +func (instance *CIM_UnitaryComputerSystem) GetPropertyResetCapability() (value uint16, err error) { + retValue, err := instance.GetProperty("ResetCapability") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// + +// +func (instance *CIM_UnitaryComputerSystem) SetPowerState( /* IN */ PowerState uint16, + /* IN */ Time string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPowerState", PowerState, Time) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UserDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UserDevice.go new file mode 100644 index 00000000..91fef7cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_UserDevice.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_UserDevice struct +type CIM_UserDevice struct { + *CIM_LogicalDevice + + // + IsLocked bool +} + +func NewCIM_UserDeviceEx1(instance *cim.WmiInstance) (newInstance *CIM_UserDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_UserDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewCIM_UserDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_UserDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_UserDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetIsLocked sets the value of IsLocked for the instance +func (instance *CIM_UserDevice) SetPropertyIsLocked(value bool) (err error) { + return instance.SetProperty("IsLocked", (value)) +} + +// GetIsLocked gets the value of IsLocked for the instance +func (instance *CIM_UserDevice) GetPropertyIsLocked() (value bool, err error) { + retValue, err := instance.GetProperty("IsLocked") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VersionCompatibilityCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VersionCompatibilityCheck.go new file mode 100644 index 00000000..10bc2c45 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VersionCompatibilityCheck.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VersionCompatibilityCheck struct +type CIM_VersionCompatibilityCheck struct { + *CIM_Check + + // + AllowDownVersion bool + + // + AllowMultipleVersions bool + + // + Reinstall bool +} + +func NewCIM_VersionCompatibilityCheckEx1(instance *cim.WmiInstance) (newInstance *CIM_VersionCompatibilityCheck, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VersionCompatibilityCheck{ + CIM_Check: tmp, + } + return +} + +func NewCIM_VersionCompatibilityCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VersionCompatibilityCheck, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VersionCompatibilityCheck{ + CIM_Check: tmp, + } + return +} + +// SetAllowDownVersion sets the value of AllowDownVersion for the instance +func (instance *CIM_VersionCompatibilityCheck) SetPropertyAllowDownVersion(value bool) (err error) { + return instance.SetProperty("AllowDownVersion", (value)) +} + +// GetAllowDownVersion gets the value of AllowDownVersion for the instance +func (instance *CIM_VersionCompatibilityCheck) GetPropertyAllowDownVersion() (value bool, err error) { + retValue, err := instance.GetProperty("AllowDownVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAllowMultipleVersions sets the value of AllowMultipleVersions for the instance +func (instance *CIM_VersionCompatibilityCheck) SetPropertyAllowMultipleVersions(value bool) (err error) { + return instance.SetProperty("AllowMultipleVersions", (value)) +} + +// GetAllowMultipleVersions gets the value of AllowMultipleVersions for the instance +func (instance *CIM_VersionCompatibilityCheck) GetPropertyAllowMultipleVersions() (value bool, err error) { + retValue, err := instance.GetProperty("AllowMultipleVersions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReinstall sets the value of Reinstall for the instance +func (instance *CIM_VersionCompatibilityCheck) SetPropertyReinstall(value bool) (err error) { + return instance.SetProperty("Reinstall", (value)) +} + +// GetReinstall gets the value of Reinstall for the instance +func (instance *CIM_VersionCompatibilityCheck) GetPropertyReinstall() (value bool, err error) { + retValue, err := instance.GetProperty("Reinstall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSElement.go new file mode 100644 index 00000000..01ba9187 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSElement.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VideoBIOSElement struct +type CIM_VideoBIOSElement struct { + *CIM_SoftwareElement + + // + IsShadowed bool +} + +func NewCIM_VideoBIOSElementEx1(instance *cim.WmiInstance) (newInstance *CIM_VideoBIOSElement, err error) { + tmp, err := NewCIM_SoftwareElementEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VideoBIOSElement{ + CIM_SoftwareElement: tmp, + } + return +} + +func NewCIM_VideoBIOSElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VideoBIOSElement, err error) { + tmp, err := NewCIM_SoftwareElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VideoBIOSElement{ + CIM_SoftwareElement: tmp, + } + return +} + +// SetIsShadowed sets the value of IsShadowed for the instance +func (instance *CIM_VideoBIOSElement) SetPropertyIsShadowed(value bool) (err error) { + return instance.SetProperty("IsShadowed", (value)) +} + +// GetIsShadowed gets the value of IsShadowed for the instance +func (instance *CIM_VideoBIOSElement) GetPropertyIsShadowed() (value bool, err error) { + retValue, err := instance.GetProperty("IsShadowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeature.go new file mode 100644 index 00000000..2b384d5e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeature.go @@ -0,0 +1,112 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VideoBIOSFeature struct +type CIM_VideoBIOSFeature struct { + *CIM_SoftwareFeature + + // + CharacteristicDescriptions []string + + // + Characteristics []uint16 +} + +func NewCIM_VideoBIOSFeatureEx1(instance *cim.WmiInstance) (newInstance *CIM_VideoBIOSFeature, err error) { + tmp, err := NewCIM_SoftwareFeatureEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VideoBIOSFeature{ + CIM_SoftwareFeature: tmp, + } + return +} + +func NewCIM_VideoBIOSFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VideoBIOSFeature, err error) { + tmp, err := NewCIM_SoftwareFeatureEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VideoBIOSFeature{ + CIM_SoftwareFeature: tmp, + } + return +} + +// SetCharacteristicDescriptions sets the value of CharacteristicDescriptions for the instance +func (instance *CIM_VideoBIOSFeature) SetPropertyCharacteristicDescriptions(value []string) (err error) { + return instance.SetProperty("CharacteristicDescriptions", (value)) +} + +// GetCharacteristicDescriptions gets the value of CharacteristicDescriptions for the instance +func (instance *CIM_VideoBIOSFeature) GetPropertyCharacteristicDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CharacteristicDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCharacteristics sets the value of Characteristics for the instance +func (instance *CIM_VideoBIOSFeature) SetPropertyCharacteristics(value []uint16) (err error) { + return instance.SetProperty("Characteristics", (value)) +} + +// GetCharacteristics gets the value of Characteristics for the instance +func (instance *CIM_VideoBIOSFeature) GetPropertyCharacteristics() (value []uint16, err error) { + retValue, err := instance.GetProperty("Characteristics") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeatureVideoBIOSElements.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeatureVideoBIOSElements.go new file mode 100644 index 00000000..47a3b5b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoBIOSFeatureVideoBIOSElements.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_VideoBIOSFeatureVideoBIOSElements struct +type CIM_VideoBIOSFeatureVideoBIOSElements struct { + *CIM_SoftwareFeatureSoftwareElements +} + +func NewCIM_VideoBIOSFeatureVideoBIOSElementsEx1(instance *cim.WmiInstance) (newInstance *CIM_VideoBIOSFeatureVideoBIOSElements, err error) { + tmp, err := NewCIM_SoftwareFeatureSoftwareElementsEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VideoBIOSFeatureVideoBIOSElements{ + CIM_SoftwareFeatureSoftwareElements: tmp, + } + return +} + +func NewCIM_VideoBIOSFeatureVideoBIOSElementsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VideoBIOSFeatureVideoBIOSElements, err error) { + tmp, err := NewCIM_SoftwareFeatureSoftwareElementsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VideoBIOSFeatureVideoBIOSElements{ + CIM_SoftwareFeatureSoftwareElements: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoController.go new file mode 100644 index 00000000..020f5f8a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoController.go @@ -0,0 +1,532 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VideoController struct +type CIM_VideoController struct { + *CIM_Controller + + // + AcceleratorCapabilities []uint16 + + // + CapabilityDescriptions []string + + // + CurrentBitsPerPixel uint32 + + // + CurrentHorizontalResolution uint32 + + // + CurrentNumberOfColors uint64 + + // + CurrentNumberOfColumns uint32 + + // + CurrentNumberOfRows uint32 + + // + CurrentRefreshRate uint32 + + // + CurrentScanMode uint16 + + // + CurrentVerticalResolution uint32 + + // + MaxMemorySupported uint32 + + // + MaxRefreshRate uint32 + + // + MinRefreshRate uint32 + + // + NumberOfVideoPages uint32 + + // + VideoMemoryType uint16 + + // + VideoProcessor string +} + +func NewCIM_VideoControllerEx1(instance *cim.WmiInstance) (newInstance *CIM_VideoController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VideoController{ + CIM_Controller: tmp, + } + return +} + +func NewCIM_VideoControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VideoController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VideoController{ + CIM_Controller: tmp, + } + return +} + +// SetAcceleratorCapabilities sets the value of AcceleratorCapabilities for the instance +func (instance *CIM_VideoController) SetPropertyAcceleratorCapabilities(value []uint16) (err error) { + return instance.SetProperty("AcceleratorCapabilities", (value)) +} + +// GetAcceleratorCapabilities gets the value of AcceleratorCapabilities for the instance +func (instance *CIM_VideoController) GetPropertyAcceleratorCapabilities() (value []uint16, err error) { + retValue, err := instance.GetProperty("AcceleratorCapabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCapabilityDescriptions sets the value of CapabilityDescriptions for the instance +func (instance *CIM_VideoController) SetPropertyCapabilityDescriptions(value []string) (err error) { + return instance.SetProperty("CapabilityDescriptions", (value)) +} + +// GetCapabilityDescriptions gets the value of CapabilityDescriptions for the instance +func (instance *CIM_VideoController) GetPropertyCapabilityDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("CapabilityDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCurrentBitsPerPixel sets the value of CurrentBitsPerPixel for the instance +func (instance *CIM_VideoController) SetPropertyCurrentBitsPerPixel(value uint32) (err error) { + return instance.SetProperty("CurrentBitsPerPixel", (value)) +} + +// GetCurrentBitsPerPixel gets the value of CurrentBitsPerPixel for the instance +func (instance *CIM_VideoController) GetPropertyCurrentBitsPerPixel() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentBitsPerPixel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentHorizontalResolution sets the value of CurrentHorizontalResolution for the instance +func (instance *CIM_VideoController) SetPropertyCurrentHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("CurrentHorizontalResolution", (value)) +} + +// GetCurrentHorizontalResolution gets the value of CurrentHorizontalResolution for the instance +func (instance *CIM_VideoController) GetPropertyCurrentHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentHorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentNumberOfColors sets the value of CurrentNumberOfColors for the instance +func (instance *CIM_VideoController) SetPropertyCurrentNumberOfColors(value uint64) (err error) { + return instance.SetProperty("CurrentNumberOfColors", (value)) +} + +// GetCurrentNumberOfColors gets the value of CurrentNumberOfColors for the instance +func (instance *CIM_VideoController) GetPropertyCurrentNumberOfColors() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentNumberOfColors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentNumberOfColumns sets the value of CurrentNumberOfColumns for the instance +func (instance *CIM_VideoController) SetPropertyCurrentNumberOfColumns(value uint32) (err error) { + return instance.SetProperty("CurrentNumberOfColumns", (value)) +} + +// GetCurrentNumberOfColumns gets the value of CurrentNumberOfColumns for the instance +func (instance *CIM_VideoController) GetPropertyCurrentNumberOfColumns() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentNumberOfColumns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentNumberOfRows sets the value of CurrentNumberOfRows for the instance +func (instance *CIM_VideoController) SetPropertyCurrentNumberOfRows(value uint32) (err error) { + return instance.SetProperty("CurrentNumberOfRows", (value)) +} + +// GetCurrentNumberOfRows gets the value of CurrentNumberOfRows for the instance +func (instance *CIM_VideoController) GetPropertyCurrentNumberOfRows() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentNumberOfRows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentRefreshRate sets the value of CurrentRefreshRate for the instance +func (instance *CIM_VideoController) SetPropertyCurrentRefreshRate(value uint32) (err error) { + return instance.SetProperty("CurrentRefreshRate", (value)) +} + +// GetCurrentRefreshRate gets the value of CurrentRefreshRate for the instance +func (instance *CIM_VideoController) GetPropertyCurrentRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentScanMode sets the value of CurrentScanMode for the instance +func (instance *CIM_VideoController) SetPropertyCurrentScanMode(value uint16) (err error) { + return instance.SetProperty("CurrentScanMode", (value)) +} + +// GetCurrentScanMode gets the value of CurrentScanMode for the instance +func (instance *CIM_VideoController) GetPropertyCurrentScanMode() (value uint16, err error) { + retValue, err := instance.GetProperty("CurrentScanMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCurrentVerticalResolution sets the value of CurrentVerticalResolution for the instance +func (instance *CIM_VideoController) SetPropertyCurrentVerticalResolution(value uint32) (err error) { + return instance.SetProperty("CurrentVerticalResolution", (value)) +} + +// GetCurrentVerticalResolution gets the value of CurrentVerticalResolution for the instance +func (instance *CIM_VideoController) GetPropertyCurrentVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentVerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxMemorySupported sets the value of MaxMemorySupported for the instance +func (instance *CIM_VideoController) SetPropertyMaxMemorySupported(value uint32) (err error) { + return instance.SetProperty("MaxMemorySupported", (value)) +} + +// GetMaxMemorySupported gets the value of MaxMemorySupported for the instance +func (instance *CIM_VideoController) GetPropertyMaxMemorySupported() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxMemorySupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxRefreshRate sets the value of MaxRefreshRate for the instance +func (instance *CIM_VideoController) SetPropertyMaxRefreshRate(value uint32) (err error) { + return instance.SetProperty("MaxRefreshRate", (value)) +} + +// GetMaxRefreshRate gets the value of MaxRefreshRate for the instance +func (instance *CIM_VideoController) GetPropertyMaxRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinRefreshRate sets the value of MinRefreshRate for the instance +func (instance *CIM_VideoController) SetPropertyMinRefreshRate(value uint32) (err error) { + return instance.SetProperty("MinRefreshRate", (value)) +} + +// GetMinRefreshRate gets the value of MinRefreshRate for the instance +func (instance *CIM_VideoController) GetPropertyMinRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MinRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfVideoPages sets the value of NumberOfVideoPages for the instance +func (instance *CIM_VideoController) SetPropertyNumberOfVideoPages(value uint32) (err error) { + return instance.SetProperty("NumberOfVideoPages", (value)) +} + +// GetNumberOfVideoPages gets the value of NumberOfVideoPages for the instance +func (instance *CIM_VideoController) GetPropertyNumberOfVideoPages() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfVideoPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVideoMemoryType sets the value of VideoMemoryType for the instance +func (instance *CIM_VideoController) SetPropertyVideoMemoryType(value uint16) (err error) { + return instance.SetProperty("VideoMemoryType", (value)) +} + +// GetVideoMemoryType gets the value of VideoMemoryType for the instance +func (instance *CIM_VideoController) GetPropertyVideoMemoryType() (value uint16, err error) { + retValue, err := instance.GetProperty("VideoMemoryType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVideoProcessor sets the value of VideoProcessor for the instance +func (instance *CIM_VideoController) SetPropertyVideoProcessor(value string) (err error) { + return instance.SetProperty("VideoProcessor", (value)) +} + +// GetVideoProcessor gets the value of VideoProcessor for the instance +func (instance *CIM_VideoController) GetPropertyVideoProcessor() (value string, err error) { + retValue, err := instance.GetProperty("VideoProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoControllerResolution.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoControllerResolution.go new file mode 100644 index 00000000..cf4eada2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoControllerResolution.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VideoControllerResolution struct +type CIM_VideoControllerResolution struct { + *CIM_Setting + + // + HorizontalResolution uint32 + + // + MaxRefreshRate uint32 + + // + MinRefreshRate uint32 + + // + NumberOfColors uint64 + + // + RefreshRate uint32 + + // + ScanMode uint16 + + // + VerticalResolution uint32 +} + +func NewCIM_VideoControllerResolutionEx1(instance *cim.WmiInstance) (newInstance *CIM_VideoControllerResolution, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VideoControllerResolution{ + CIM_Setting: tmp, + } + return +} + +func NewCIM_VideoControllerResolutionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VideoControllerResolution, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VideoControllerResolution{ + CIM_Setting: tmp, + } + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxRefreshRate sets the value of MaxRefreshRate for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyMaxRefreshRate(value uint32) (err error) { + return instance.SetProperty("MaxRefreshRate", (value)) +} + +// GetMaxRefreshRate gets the value of MaxRefreshRate for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyMaxRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinRefreshRate sets the value of MinRefreshRate for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyMinRefreshRate(value uint32) (err error) { + return instance.SetProperty("MinRefreshRate", (value)) +} + +// GetMinRefreshRate gets the value of MinRefreshRate for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyMinRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("MinRefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfColors sets the value of NumberOfColors for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyNumberOfColors(value uint64) (err error) { + return instance.SetProperty("NumberOfColors", (value)) +} + +// GetNumberOfColors gets the value of NumberOfColors for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyNumberOfColors() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberOfColors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRefreshRate sets the value of RefreshRate for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyRefreshRate(value uint32) (err error) { + return instance.SetProperty("RefreshRate", (value)) +} + +// GetRefreshRate gets the value of RefreshRate for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("RefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScanMode sets the value of ScanMode for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyScanMode(value uint16) (err error) { + return instance.SetProperty("ScanMode", (value)) +} + +// GetScanMode gets the value of ScanMode for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyScanMode() (value uint16, err error) { + retValue, err := instance.GetProperty("ScanMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *CIM_VideoControllerResolution) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *CIM_VideoControllerResolution) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoSetting.go new file mode 100644 index 00000000..66ebd3f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VideoSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_VideoSetting struct +type CIM_VideoSetting struct { + *CIM_ElementSetting +} + +func NewCIM_VideoSettingEx1(instance *cim.WmiInstance) (newInstance *CIM_VideoSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VideoSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewCIM_VideoSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VideoSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VideoSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolatileStorage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolatileStorage.go new file mode 100644 index 00000000..2d8c54f6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolatileStorage.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VolatileStorage struct +type CIM_VolatileStorage struct { + *CIM_Memory + + // + Cacheable bool + + // + CacheType uint16 +} + +func NewCIM_VolatileStorageEx1(instance *cim.WmiInstance) (newInstance *CIM_VolatileStorage, err error) { + tmp, err := NewCIM_MemoryEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VolatileStorage{ + CIM_Memory: tmp, + } + return +} + +func NewCIM_VolatileStorageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VolatileStorage, err error) { + tmp, err := NewCIM_MemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VolatileStorage{ + CIM_Memory: tmp, + } + return +} + +// SetCacheable sets the value of Cacheable for the instance +func (instance *CIM_VolatileStorage) SetPropertyCacheable(value bool) (err error) { + return instance.SetProperty("Cacheable", (value)) +} + +// GetCacheable gets the value of Cacheable for the instance +func (instance *CIM_VolatileStorage) GetPropertyCacheable() (value bool, err error) { + retValue, err := instance.GetProperty("Cacheable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCacheType sets the value of CacheType for the instance +func (instance *CIM_VolatileStorage) SetPropertyCacheType(value uint16) (err error) { + return instance.SetProperty("CacheType", (value)) +} + +// GetCacheType gets the value of CacheType for the instance +func (instance *CIM_VolatileStorage) GetPropertyCacheType() (value uint16, err error) { + retValue, err := instance.GetProperty("CacheType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VoltageSensor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VoltageSensor.go new file mode 100644 index 00000000..9ef6f321 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VoltageSensor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_VoltageSensor struct +type CIM_VoltageSensor struct { + *CIM_NumericSensor +} + +func NewCIM_VoltageSensorEx1(instance *cim.WmiInstance) (newInstance *CIM_VoltageSensor, err error) { + tmp, err := NewCIM_NumericSensorEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VoltageSensor{ + CIM_NumericSensor: tmp, + } + return +} + +func NewCIM_VoltageSensorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VoltageSensor, err error) { + tmp, err := NewCIM_NumericSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VoltageSensor{ + CIM_NumericSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolumeSet.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolumeSet.go new file mode 100644 index 00000000..9f87b4a1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_VolumeSet.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_VolumeSet struct +type CIM_VolumeSet struct { + *CIM_StorageExtent + + // + PSExtentInterleaveDepth uint64 + + // + PSExtentStripeLength uint64 +} + +func NewCIM_VolumeSetEx1(instance *cim.WmiInstance) (newInstance *CIM_VolumeSet, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_VolumeSet{ + CIM_StorageExtent: tmp, + } + return +} + +func NewCIM_VolumeSetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_VolumeSet, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_VolumeSet{ + CIM_StorageExtent: tmp, + } + return +} + +// SetPSExtentInterleaveDepth sets the value of PSExtentInterleaveDepth for the instance +func (instance *CIM_VolumeSet) SetPropertyPSExtentInterleaveDepth(value uint64) (err error) { + return instance.SetProperty("PSExtentInterleaveDepth", (value)) +} + +// GetPSExtentInterleaveDepth gets the value of PSExtentInterleaveDepth for the instance +func (instance *CIM_VolumeSet) GetPropertyPSExtentInterleaveDepth() (value uint64, err error) { + retValue, err := instance.GetProperty("PSExtentInterleaveDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPSExtentStripeLength sets the value of PSExtentStripeLength for the instance +func (instance *CIM_VolumeSet) SetPropertyPSExtentStripeLength(value uint64) (err error) { + return instance.SetProperty("PSExtentStripeLength", (value)) +} + +// GetPSExtentStripeLength gets the value of PSExtentStripeLength for the instance +func (instance *CIM_VolumeSet) GetPropertyPSExtentStripeLength() (value uint64, err error) { + retValue, err := instance.GetProperty("PSExtentStripeLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_WORMDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_WORMDrive.go new file mode 100644 index 00000000..6e16ea77 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/CIM_WORMDrive.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_WORMDrive struct +type CIM_WORMDrive struct { + *CIM_MediaAccessDevice +} + +func NewCIM_WORMDriveEx1(instance *cim.WmiInstance) (newInstance *CIM_WORMDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_WORMDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} + +func NewCIM_WORMDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_WORMDrive, err error) { + tmp, err := NewCIM_MediaAccessDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_WORMDrive{ + CIM_MediaAccessDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassCreationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassCreationEvent.go new file mode 100644 index 00000000..50f4c9bd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassCreationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __ClassCreationEvent struct +type __ClassCreationEvent struct { + *__ClassOperationEvent +} + +func New__ClassCreationEventEx1(instance *cim.WmiInstance) (newInstance *__ClassCreationEvent, err error) { + tmp, err := New__ClassOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassCreationEvent{ + __ClassOperationEvent: tmp, + } + return +} + +func New__ClassCreationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassCreationEvent, err error) { + tmp, err := New__ClassOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassCreationEvent{ + __ClassOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassDeletionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassDeletionEvent.go new file mode 100644 index 00000000..a8a7d78f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassDeletionEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __ClassDeletionEvent struct +type __ClassDeletionEvent struct { + *__ClassOperationEvent +} + +func New__ClassDeletionEventEx1(instance *cim.WmiInstance) (newInstance *__ClassDeletionEvent, err error) { + tmp, err := New__ClassOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassDeletionEvent{ + __ClassOperationEvent: tmp, + } + return +} + +func New__ClassDeletionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassDeletionEvent, err error) { + tmp, err := New__ClassOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassDeletionEvent{ + __ClassOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassModificationEvent.go new file mode 100644 index 00000000..78ce56e1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassModificationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ClassModificationEvent struct +type __ClassModificationEvent struct { + *__ClassOperationEvent + + // + PreviousClass interface{} +} + +func New__ClassModificationEventEx1(instance *cim.WmiInstance) (newInstance *__ClassModificationEvent, err error) { + tmp, err := New__ClassOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassModificationEvent{ + __ClassOperationEvent: tmp, + } + return +} + +func New__ClassModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassModificationEvent, err error) { + tmp, err := New__ClassOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassModificationEvent{ + __ClassOperationEvent: tmp, + } + return +} + +// SetPreviousClass sets the value of PreviousClass for the instance +func (instance *__ClassModificationEvent) SetPropertyPreviousClass(value interface{}) (err error) { + return instance.SetProperty("PreviousClass", (value)) +} + +// GetPreviousClass gets the value of PreviousClass for the instance +func (instance *__ClassModificationEvent) GetPropertyPreviousClass() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassOperationEvent.go new file mode 100644 index 00000000..44e2ce15 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassOperationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ClassOperationEvent struct +type __ClassOperationEvent struct { + *__Event + + // + TargetClass interface{} +} + +func New__ClassOperationEventEx1(instance *cim.WmiInstance) (newInstance *__ClassOperationEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassOperationEvent{ + __Event: tmp, + } + return +} + +func New__ClassOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassOperationEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassOperationEvent{ + __Event: tmp, + } + return +} + +// SetTargetClass sets the value of TargetClass for the instance +func (instance *__ClassOperationEvent) SetPropertyTargetClass(value interface{}) (err error) { + return instance.SetProperty("TargetClass", (value)) +} + +// GetTargetClass gets the value of TargetClass for the instance +func (instance *__ClassOperationEvent) GetPropertyTargetClass() (value interface{}, err error) { + retValue, err := instance.GetProperty("TargetClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassProviderRegistration.go new file mode 100644 index 00000000..affbcc80 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ClassProviderRegistration.go @@ -0,0 +1,263 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ClassProviderRegistration struct +type __ClassProviderRegistration struct { + *__ObjectProviderRegistration + + // + CacheRefreshInterval string + + // + PerUserSchema bool + + // + ReferencedSetQueries []string + + // + ResultSetQueries []string + + // + ReSynchroniseOnNamespaceOpen bool + + // + UnsupportedQueries []string + + // + Version uint32 +} + +func New__ClassProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__ClassProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} + +func New__ClassProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} + +// SetCacheRefreshInterval sets the value of CacheRefreshInterval for the instance +func (instance *__ClassProviderRegistration) SetPropertyCacheRefreshInterval(value string) (err error) { + return instance.SetProperty("CacheRefreshInterval", (value)) +} + +// GetCacheRefreshInterval gets the value of CacheRefreshInterval for the instance +func (instance *__ClassProviderRegistration) GetPropertyCacheRefreshInterval() (value string, err error) { + retValue, err := instance.GetProperty("CacheRefreshInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerUserSchema sets the value of PerUserSchema for the instance +func (instance *__ClassProviderRegistration) SetPropertyPerUserSchema(value bool) (err error) { + return instance.SetProperty("PerUserSchema", (value)) +} + +// GetPerUserSchema gets the value of PerUserSchema for the instance +func (instance *__ClassProviderRegistration) GetPropertyPerUserSchema() (value bool, err error) { + retValue, err := instance.GetProperty("PerUserSchema") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReferencedSetQueries sets the value of ReferencedSetQueries for the instance +func (instance *__ClassProviderRegistration) SetPropertyReferencedSetQueries(value []string) (err error) { + return instance.SetProperty("ReferencedSetQueries", (value)) +} + +// GetReferencedSetQueries gets the value of ReferencedSetQueries for the instance +func (instance *__ClassProviderRegistration) GetPropertyReferencedSetQueries() (value []string, err error) { + retValue, err := instance.GetProperty("ReferencedSetQueries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetResultSetQueries sets the value of ResultSetQueries for the instance +func (instance *__ClassProviderRegistration) SetPropertyResultSetQueries(value []string) (err error) { + return instance.SetProperty("ResultSetQueries", (value)) +} + +// GetResultSetQueries gets the value of ResultSetQueries for the instance +func (instance *__ClassProviderRegistration) GetPropertyResultSetQueries() (value []string, err error) { + retValue, err := instance.GetProperty("ResultSetQueries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetReSynchroniseOnNamespaceOpen sets the value of ReSynchroniseOnNamespaceOpen for the instance +func (instance *__ClassProviderRegistration) SetPropertyReSynchroniseOnNamespaceOpen(value bool) (err error) { + return instance.SetProperty("ReSynchroniseOnNamespaceOpen", (value)) +} + +// GetReSynchroniseOnNamespaceOpen gets the value of ReSynchroniseOnNamespaceOpen for the instance +func (instance *__ClassProviderRegistration) GetPropertyReSynchroniseOnNamespaceOpen() (value bool, err error) { + retValue, err := instance.GetProperty("ReSynchroniseOnNamespaceOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetUnsupportedQueries sets the value of UnsupportedQueries for the instance +func (instance *__ClassProviderRegistration) SetPropertyUnsupportedQueries(value []string) (err error) { + return instance.SetProperty("UnsupportedQueries", (value)) +} + +// GetUnsupportedQueries gets the value of UnsupportedQueries for the instance +func (instance *__ClassProviderRegistration) GetPropertyUnsupportedQueries() (value []string, err error) { + retValue, err := instance.GetProperty("UnsupportedQueries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *__ClassProviderRegistration) SetPropertyVersion(value uint32) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *__ClassProviderRegistration) GetPropertyVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ConsumerFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ConsumerFailureEvent.go new file mode 100644 index 00000000..f1aded3e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ConsumerFailureEvent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ConsumerFailureEvent struct +type __ConsumerFailureEvent struct { + *__EventDroppedEvent + + // + ErrorCode uint32 + + // + ErrorDescription string + + // + ErrorObject __ExtendedStatus +} + +func New__ConsumerFailureEventEx1(instance *cim.WmiInstance) (newInstance *__ConsumerFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ConsumerFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +func New__ConsumerFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ConsumerFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ConsumerFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +// SetErrorCode sets the value of ErrorCode for the instance +func (instance *__ConsumerFailureEvent) SetPropertyErrorCode(value uint32) (err error) { + return instance.SetProperty("ErrorCode", (value)) +} + +// GetErrorCode gets the value of ErrorCode for the instance +func (instance *__ConsumerFailureEvent) GetPropertyErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *__ConsumerFailureEvent) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *__ConsumerFailureEvent) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorObject sets the value of ErrorObject for the instance +func (instance *__ConsumerFailureEvent) SetPropertyErrorObject(value __ExtendedStatus) (err error) { + return instance.SetProperty("ErrorObject", (value)) +} + +// GetErrorObject gets the value of ErrorObject for the instance +func (instance *__ConsumerFailureEvent) GetPropertyErrorObject() (value __ExtendedStatus, err error) { + retValue, err := instance.GetProperty("ErrorObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__ExtendedStatus) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ExtendedStatus is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __ExtendedStatus(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_CIMStatusCode.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_CIMStatusCode.go new file mode 100644 index 00000000..3afcb470 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_CIMStatusCode.go @@ -0,0 +1,75 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Error_CIMStatusCode +////////////////////////////////////////////// +package cimv2 + +// Error_CIMStatusCode +type Error_CIMStatusCode int + +const ( + // CIM_ERR_FAILED enum + Error_CIMStatusCode_CIM_ERR_FAILED Error_CIMStatusCode = 1 + // CIM_ERR_ACCESS_DENIED enum + Error_CIMStatusCode_CIM_ERR_ACCESS_DENIED Error_CIMStatusCode = 2 + // CIM_ERR_INVALID_NAMESPACE enum + Error_CIMStatusCode_CIM_ERR_INVALID_NAMESPACE Error_CIMStatusCode = 3 + // CIM_ERR_INVALID_PARAMETER enum + Error_CIMStatusCode_CIM_ERR_INVALID_PARAMETER Error_CIMStatusCode = 4 + // CIM_ERR_INVALID_CLASS enum + Error_CIMStatusCode_CIM_ERR_INVALID_CLASS Error_CIMStatusCode = 5 + // CIM_ERR_NOT_FOUND enum + Error_CIMStatusCode_CIM_ERR_NOT_FOUND Error_CIMStatusCode = 6 + // CIM_ERR_NOT_SUPPORTED enum + Error_CIMStatusCode_CIM_ERR_NOT_SUPPORTED Error_CIMStatusCode = 7 + // CIM_ERR_CLASS_HAS_CHILDREN enum + Error_CIMStatusCode_CIM_ERR_CLASS_HAS_CHILDREN Error_CIMStatusCode = 8 + // CIM_ERR_CLASS_HAS_INSTANCES enum + Error_CIMStatusCode_CIM_ERR_CLASS_HAS_INSTANCES Error_CIMStatusCode = 9 + // CIM_ERR_INVALID_SUPERCLASS enum + Error_CIMStatusCode_CIM_ERR_INVALID_SUPERCLASS Error_CIMStatusCode = 10 + // CIM_ERR_ALREADY_EXISTS enum + Error_CIMStatusCode_CIM_ERR_ALREADY_EXISTS Error_CIMStatusCode = 11 + // CIM_ERR_NO_SUCH_PROPERTY enum + Error_CIMStatusCode_CIM_ERR_NO_SUCH_PROPERTY Error_CIMStatusCode = 12 + // CIM_ERR_TYPE_MISMATCH enum + Error_CIMStatusCode_CIM_ERR_TYPE_MISMATCH Error_CIMStatusCode = 13 + // CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED enum + Error_CIMStatusCode_CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED Error_CIMStatusCode = 14 + // CIM_ERR_INVALID_QUERY enum + Error_CIMStatusCode_CIM_ERR_INVALID_QUERY Error_CIMStatusCode = 15 + // CIM_ERR_METHOD_NOT_AVAILABLE enum + Error_CIMStatusCode_CIM_ERR_METHOD_NOT_AVAILABLE Error_CIMStatusCode = 16 + // CIM_ERR_METHOD_NOT_FOUND enum + Error_CIMStatusCode_CIM_ERR_METHOD_NOT_FOUND Error_CIMStatusCode = 17 + // CIM_ERR_UNEXPECTED_RESPONSE enum + Error_CIMStatusCode_CIM_ERR_UNEXPECTED_RESPONSE Error_CIMStatusCode = 18 + // CIM_ERR_INVALID_RESPONSE_DESTINATION enum + Error_CIMStatusCode_CIM_ERR_INVALID_RESPONSE_DESTINATION Error_CIMStatusCode = 19 + // CIM_ERR_NAMESPACE_NOT_EMPTY enum + Error_CIMStatusCode_CIM_ERR_NAMESPACE_NOT_EMPTY Error_CIMStatusCode = 20 + // CIM_ERR_INVALID_ENUMERATION_CONTEXT enum + Error_CIMStatusCode_CIM_ERR_INVALID_ENUMERATION_CONTEXT Error_CIMStatusCode = 21 + // CIM_ERR_INVALID_OPERATION_TIMEOUT enum + Error_CIMStatusCode_CIM_ERR_INVALID_OPERATION_TIMEOUT Error_CIMStatusCode = 22 + // CIM_ERR_PULL_HAS_BEEN_ABANDONED enum + Error_CIMStatusCode_CIM_ERR_PULL_HAS_BEEN_ABANDONED Error_CIMStatusCode = 23 + // CIM_ERR_PULL_CANNOT_BE_ABANDONED enum + Error_CIMStatusCode_CIM_ERR_PULL_CANNOT_BE_ABANDONED Error_CIMStatusCode = 24 + // CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED enum + Error_CIMStatusCode_CIM_ERR_FILTERED_ENUMERATION_NOT_SUPPORTED Error_CIMStatusCode = 25 + // CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED enum + Error_CIMStatusCode_CIM_ERR_CONTINUATION_ON_ERROR_NOT_SUPPORTED Error_CIMStatusCode = 26 + // CIM_ERR_SERVER_LIMITS_EXCEEDED enum + Error_CIMStatusCode_CIM_ERR_SERVER_LIMITS_EXCEEDED Error_CIMStatusCode = 27 + // CIM_ERR_SERVER_IS_SHUTTING_DOWN enum + Error_CIMStatusCode_CIM_ERR_SERVER_IS_SHUTTING_DOWN Error_CIMStatusCode = 28 + // CIM_ERR_QUERY_FEATURE_NOT_SUPPORTED enum + Error_CIMStatusCode_CIM_ERR_QUERY_FEATURE_NOT_SUPPORTED Error_CIMStatusCode = 29 + // DMTF_Reserved enum + Error_CIMStatusCode_DMTF_Reserved Error_CIMStatusCode = 30 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorSourceFormat.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorSourceFormat.go new file mode 100644 index 00000000..312c0ef5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorSourceFormat.go @@ -0,0 +1,23 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Error_ErrorSourceFormat +////////////////////////////////////////////// +package cimv2 + +// Error_ErrorSourceFormat +type Error_ErrorSourceFormat int + +const ( + // Unknown enum + Error_ErrorSourceFormat_Unknown Error_ErrorSourceFormat = 0 + // Other enum + Error_ErrorSourceFormat_Other Error_ErrorSourceFormat = 1 + // CIMObjectPath enum + Error_ErrorSourceFormat_CIMObjectPath Error_ErrorSourceFormat = 2 + // DMTF_Reserved enum + Error_ErrorSourceFormat_DMTF_Reserved Error_ErrorSourceFormat = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorType.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorType.go new file mode 100644 index 00000000..4e272e79 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ErrorType.go @@ -0,0 +1,39 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Error_ErrorType +////////////////////////////////////////////// +package cimv2 + +// Error_ErrorType +type Error_ErrorType int + +const ( + // Unknown enum + Error_ErrorType_Unknown Error_ErrorType = 0 + // Other enum + Error_ErrorType_Other Error_ErrorType = 1 + // Communications_Error enum + Error_ErrorType_Communications_Error Error_ErrorType = 2 + // Quality_of_Service_Error enum + Error_ErrorType_Quality_of_Service_Error Error_ErrorType = 3 + // Software_Error enum + Error_ErrorType_Software_Error Error_ErrorType = 4 + // Hardware_Error enum + Error_ErrorType_Hardware_Error Error_ErrorType = 5 + // Environmental_Error enum + Error_ErrorType_Environmental_Error Error_ErrorType = 6 + // Security_Error enum + Error_ErrorType_Security_Error Error_ErrorType = 7 + // Oversubscription_Error enum + Error_ErrorType_Oversubscription_Error Error_ErrorType = 8 + // Unavailable_Resource_Error enum + Error_ErrorType_Unavailable_Resource_Error Error_ErrorType = 9 + // Unsupported_Operation_Error enum + Error_ErrorType_Unsupported_Operation_Error Error_ErrorType = 10 + // DMTF_Reserved enum + Error_ErrorType_DMTF_Reserved Error_ErrorType = 11 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_PerceivedSeverity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_PerceivedSeverity.go new file mode 100644 index 00000000..52f3e99e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_PerceivedSeverity.go @@ -0,0 +1,33 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Error_PerceivedSeverity +////////////////////////////////////////////// +package cimv2 + +// Error_PerceivedSeverity +type Error_PerceivedSeverity int + +const ( + // Unknown enum + Error_PerceivedSeverity_Unknown Error_PerceivedSeverity = 0 + // Other enum + Error_PerceivedSeverity_Other Error_PerceivedSeverity = 1 + // Information enum + Error_PerceivedSeverity_Information Error_PerceivedSeverity = 2 + // Degraded_Warning enum + Error_PerceivedSeverity_Degraded_Warning Error_PerceivedSeverity = 3 + // Minor enum + Error_PerceivedSeverity_Minor Error_PerceivedSeverity = 4 + // Major enum + Error_PerceivedSeverity_Major Error_PerceivedSeverity = 5 + // Critical enum + Error_PerceivedSeverity_Critical Error_PerceivedSeverity = 6 + // Fatal_NonRecoverable enum + Error_PerceivedSeverity_Fatal_NonRecoverable Error_PerceivedSeverity = 7 + // DMTF_Reserved enum + Error_PerceivedSeverity_DMTF_Reserved Error_PerceivedSeverity = 8 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ProbableCause.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ProbableCause.go new file mode 100644 index 00000000..18d4a802 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Error_ProbableCause.go @@ -0,0 +1,279 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Error_ProbableCause +////////////////////////////////////////////// +package cimv2 + +// Error_ProbableCause +type Error_ProbableCause int + +const ( + // Unknown enum + Error_ProbableCause_Unknown Error_ProbableCause = 0 + // Other enum + Error_ProbableCause_Other Error_ProbableCause = 1 + // Adapter_Card_Error enum + Error_ProbableCause_Adapter_Card_Error Error_ProbableCause = 2 + // Application_Subsystem_Failure enum + Error_ProbableCause_Application_Subsystem_Failure Error_ProbableCause = 3 + // Bandwidth_Reduced enum + Error_ProbableCause_Bandwidth_Reduced Error_ProbableCause = 4 + // Connection_Establishment_Error enum + Error_ProbableCause_Connection_Establishment_Error Error_ProbableCause = 5 + // Communications_Protocol_Error enum + Error_ProbableCause_Communications_Protocol_Error Error_ProbableCause = 6 + // Communications_Subsystem_Failure enum + Error_ProbableCause_Communications_Subsystem_Failure Error_ProbableCause = 7 + // Configuration_Customization_Error enum + Error_ProbableCause_Configuration_Customization_Error Error_ProbableCause = 8 + // Congestion enum + Error_ProbableCause_Congestion Error_ProbableCause = 9 + // Corrupt_Data enum + Error_ProbableCause_Corrupt_Data Error_ProbableCause = 10 + // CPU_Cycles_Limit_Exceeded enum + Error_ProbableCause_CPU_Cycles_Limit_Exceeded Error_ProbableCause = 11 + // Dataset_Modem_Error enum + Error_ProbableCause_Dataset_Modem_Error Error_ProbableCause = 12 + // Degraded_Signal enum + Error_ProbableCause_Degraded_Signal Error_ProbableCause = 13 + // DTE_DCE_Interface_Error enum + Error_ProbableCause_DTE_DCE_Interface_Error Error_ProbableCause = 14 + // Enclosure_Door_Open enum + Error_ProbableCause_Enclosure_Door_Open Error_ProbableCause = 15 + // Equipment_Malfunction enum + Error_ProbableCause_Equipment_Malfunction Error_ProbableCause = 16 + // Excessive_Vibration enum + Error_ProbableCause_Excessive_Vibration Error_ProbableCause = 17 + // File_Format_Error enum + Error_ProbableCause_File_Format_Error Error_ProbableCause = 18 + // Fire_Detected enum + Error_ProbableCause_Fire_Detected Error_ProbableCause = 19 + // Flood_Detected enum + Error_ProbableCause_Flood_Detected Error_ProbableCause = 20 + // Framing_Error enum + Error_ProbableCause_Framing_Error Error_ProbableCause = 21 + // HVAC_Problem enum + Error_ProbableCause_HVAC_Problem Error_ProbableCause = 22 + // Humidity_Unacceptable enum + Error_ProbableCause_Humidity_Unacceptable Error_ProbableCause = 23 + // I_O_Device_Error enum + Error_ProbableCause_I_O_Device_Error Error_ProbableCause = 24 + // Input_Device_Error enum + Error_ProbableCause_Input_Device_Error Error_ProbableCause = 25 + // LAN_Error enum + Error_ProbableCause_LAN_Error Error_ProbableCause = 26 + // Non_Toxic_Leak_Detected enum + Error_ProbableCause_Non_Toxic_Leak_Detected Error_ProbableCause = 27 + // Local_Node_Transmission_Error enum + Error_ProbableCause_Local_Node_Transmission_Error Error_ProbableCause = 28 + // Loss_of_Frame enum + Error_ProbableCause_Loss_of_Frame Error_ProbableCause = 29 + // Loss_of_Signal enum + Error_ProbableCause_Loss_of_Signal Error_ProbableCause = 30 + // Material_Supply_Exhausted enum + Error_ProbableCause_Material_Supply_Exhausted Error_ProbableCause = 31 + // Multiplexer_Problem enum + Error_ProbableCause_Multiplexer_Problem Error_ProbableCause = 32 + // Out_of_Memory enum + Error_ProbableCause_Out_of_Memory Error_ProbableCause = 33 + // Output_Device_Error enum + Error_ProbableCause_Output_Device_Error Error_ProbableCause = 34 + // Performance_Degraded enum + Error_ProbableCause_Performance_Degraded Error_ProbableCause = 35 + // Power_Problem enum + Error_ProbableCause_Power_Problem Error_ProbableCause = 36 + // Pressure_Unacceptable enum + Error_ProbableCause_Pressure_Unacceptable Error_ProbableCause = 37 + // Processor_Problem__Internal_Machine_Error_ enum + Error_ProbableCause_Processor_Problem__Internal_Machine_Error_ Error_ProbableCause = 38 + // Pump_Failure enum + Error_ProbableCause_Pump_Failure Error_ProbableCause = 39 + // Queue_Size_Exceeded enum + Error_ProbableCause_Queue_Size_Exceeded Error_ProbableCause = 40 + // Receive_Failure enum + Error_ProbableCause_Receive_Failure Error_ProbableCause = 41 + // Receiver_Failure enum + Error_ProbableCause_Receiver_Failure Error_ProbableCause = 42 + // Remote_Node_Transmission_Error enum + Error_ProbableCause_Remote_Node_Transmission_Error Error_ProbableCause = 43 + // Resource_at_or_Nearing_Capacity enum + Error_ProbableCause_Resource_at_or_Nearing_Capacity Error_ProbableCause = 44 + // Response_Time_Excessive enum + Error_ProbableCause_Response_Time_Excessive Error_ProbableCause = 45 + // Retransmission_Rate_Excessive enum + Error_ProbableCause_Retransmission_Rate_Excessive Error_ProbableCause = 46 + // Software_Error enum + Error_ProbableCause_Software_Error Error_ProbableCause = 47 + // Software_Program_Abnormally_Terminated enum + Error_ProbableCause_Software_Program_Abnormally_Terminated Error_ProbableCause = 48 + // Software_Program_Error__Incorrect_Results_ enum + Error_ProbableCause_Software_Program_Error__Incorrect_Results_ Error_ProbableCause = 49 + // Storage_Capacity_Problem enum + Error_ProbableCause_Storage_Capacity_Problem Error_ProbableCause = 50 + // Temperature_Unacceptable enum + Error_ProbableCause_Temperature_Unacceptable Error_ProbableCause = 51 + // Threshold_Crossed enum + Error_ProbableCause_Threshold_Crossed Error_ProbableCause = 52 + // Timing_Problem enum + Error_ProbableCause_Timing_Problem Error_ProbableCause = 53 + // Toxic_Leak_Detected enum + Error_ProbableCause_Toxic_Leak_Detected Error_ProbableCause = 54 + // Transmit_Failure enum + Error_ProbableCause_Transmit_Failure Error_ProbableCause = 55 + // Transmitter_Failure enum + Error_ProbableCause_Transmitter_Failure Error_ProbableCause = 56 + // Underlying_Resource_Unavailable enum + Error_ProbableCause_Underlying_Resource_Unavailable Error_ProbableCause = 57 + // Version_Mismatch enum + Error_ProbableCause_Version_Mismatch Error_ProbableCause = 58 + // Previous_Alert_Cleared enum + Error_ProbableCause_Previous_Alert_Cleared Error_ProbableCause = 59 + // Login_Attempts_Failed enum + Error_ProbableCause_Login_Attempts_Failed Error_ProbableCause = 60 + // Software_Virus_Detected enum + Error_ProbableCause_Software_Virus_Detected Error_ProbableCause = 61 + // Hardware_Security_Breached enum + Error_ProbableCause_Hardware_Security_Breached Error_ProbableCause = 62 + // Denial_of_Service_Detected enum + Error_ProbableCause_Denial_of_Service_Detected Error_ProbableCause = 63 + // Security_Credential_Mismatch enum + Error_ProbableCause_Security_Credential_Mismatch Error_ProbableCause = 64 + // Unauthorized_Access enum + Error_ProbableCause_Unauthorized_Access Error_ProbableCause = 65 + // Alarm_Received enum + Error_ProbableCause_Alarm_Received Error_ProbableCause = 66 + // Loss_of_Pointer enum + Error_ProbableCause_Loss_of_Pointer Error_ProbableCause = 67 + // Payload_Mismatch enum + Error_ProbableCause_Payload_Mismatch Error_ProbableCause = 68 + // Transmission_Error enum + Error_ProbableCause_Transmission_Error Error_ProbableCause = 69 + // Excessive_Error_Rate enum + Error_ProbableCause_Excessive_Error_Rate Error_ProbableCause = 70 + // Trace_Problem enum + Error_ProbableCause_Trace_Problem Error_ProbableCause = 71 + // Element_Unavailable enum + Error_ProbableCause_Element_Unavailable Error_ProbableCause = 72 + // Element_Missing enum + Error_ProbableCause_Element_Missing Error_ProbableCause = 73 + // Loss_of_Multi_Frame enum + Error_ProbableCause_Loss_of_Multi_Frame Error_ProbableCause = 74 + // Broadcast_Channel_Failure enum + Error_ProbableCause_Broadcast_Channel_Failure Error_ProbableCause = 75 + // Invalid_Message_Received enum + Error_ProbableCause_Invalid_Message_Received Error_ProbableCause = 76 + // Routing_Failure enum + Error_ProbableCause_Routing_Failure Error_ProbableCause = 77 + // Backplane_Failure enum + Error_ProbableCause_Backplane_Failure Error_ProbableCause = 78 + // Identifier_Duplication enum + Error_ProbableCause_Identifier_Duplication Error_ProbableCause = 79 + // Protection_Path_Failure enum + Error_ProbableCause_Protection_Path_Failure Error_ProbableCause = 80 + // Sync_Loss_or_Mismatch enum + Error_ProbableCause_Sync_Loss_or_Mismatch Error_ProbableCause = 81 + // Terminal_Problem enum + Error_ProbableCause_Terminal_Problem Error_ProbableCause = 82 + // Real_Time_Clock_Failure enum + Error_ProbableCause_Real_Time_Clock_Failure Error_ProbableCause = 83 + // Antenna_Failure enum + Error_ProbableCause_Antenna_Failure Error_ProbableCause = 84 + // Battery_Charging_Failure enum + Error_ProbableCause_Battery_Charging_Failure Error_ProbableCause = 85 + // Disk_Failure enum + Error_ProbableCause_Disk_Failure Error_ProbableCause = 86 + // Frequency_Hopping_Failure enum + Error_ProbableCause_Frequency_Hopping_Failure Error_ProbableCause = 87 + // Loss_of_Redundancy enum + Error_ProbableCause_Loss_of_Redundancy Error_ProbableCause = 88 + // Power_Supply_Failure enum + Error_ProbableCause_Power_Supply_Failure Error_ProbableCause = 89 + // Signal_Quality_Problem enum + Error_ProbableCause_Signal_Quality_Problem Error_ProbableCause = 90 + // Battery_Discharging enum + Error_ProbableCause_Battery_Discharging Error_ProbableCause = 91 + // Battery_Failure enum + Error_ProbableCause_Battery_Failure Error_ProbableCause = 92 + // Commercial_Power_Problem enum + Error_ProbableCause_Commercial_Power_Problem Error_ProbableCause = 93 + // Fan_Failure enum + Error_ProbableCause_Fan_Failure Error_ProbableCause = 94 + // Engine_Failure enum + Error_ProbableCause_Engine_Failure Error_ProbableCause = 95 + // Sensor_Failure enum + Error_ProbableCause_Sensor_Failure Error_ProbableCause = 96 + // Fuse_Failure enum + Error_ProbableCause_Fuse_Failure Error_ProbableCause = 97 + // Generator_Failure enum + Error_ProbableCause_Generator_Failure Error_ProbableCause = 98 + // Low_Battery enum + Error_ProbableCause_Low_Battery Error_ProbableCause = 99 + // Low_Fuel enum + Error_ProbableCause_Low_Fuel Error_ProbableCause = 100 + // Low_Water enum + Error_ProbableCause_Low_Water Error_ProbableCause = 101 + // Explosive_Gas enum + Error_ProbableCause_Explosive_Gas Error_ProbableCause = 102 + // High_Winds enum + Error_ProbableCause_High_Winds Error_ProbableCause = 103 + // Ice_Buildup enum + Error_ProbableCause_Ice_Buildup Error_ProbableCause = 104 + // Smoke enum + Error_ProbableCause_Smoke Error_ProbableCause = 105 + // Memory_Mismatch enum + Error_ProbableCause_Memory_Mismatch Error_ProbableCause = 106 + // Out_of_CPU_Cycles enum + Error_ProbableCause_Out_of_CPU_Cycles Error_ProbableCause = 107 + // Software_Environment_Problem enum + Error_ProbableCause_Software_Environment_Problem Error_ProbableCause = 108 + // Software_Download_Failure enum + Error_ProbableCause_Software_Download_Failure Error_ProbableCause = 109 + // Element_Reinitialized enum + Error_ProbableCause_Element_Reinitialized Error_ProbableCause = 110 + // Timeout enum + Error_ProbableCause_Timeout Error_ProbableCause = 111 + // Logging_Problems enum + Error_ProbableCause_Logging_Problems Error_ProbableCause = 112 + // Leak_Detected enum + Error_ProbableCause_Leak_Detected Error_ProbableCause = 113 + // Protection_Mechanism_Failure enum + Error_ProbableCause_Protection_Mechanism_Failure Error_ProbableCause = 114 + // Protecting_Resource_Failure enum + Error_ProbableCause_Protecting_Resource_Failure Error_ProbableCause = 115 + // Database_Inconsistency enum + Error_ProbableCause_Database_Inconsistency Error_ProbableCause = 116 + // Authentication_Failure enum + Error_ProbableCause_Authentication_Failure Error_ProbableCause = 117 + // Breach_of_Confidentiality enum + Error_ProbableCause_Breach_of_Confidentiality Error_ProbableCause = 118 + // Cable_Tamper enum + Error_ProbableCause_Cable_Tamper Error_ProbableCause = 119 + // Delayed_Information enum + Error_ProbableCause_Delayed_Information Error_ProbableCause = 120 + // Duplicate_Information enum + Error_ProbableCause_Duplicate_Information Error_ProbableCause = 121 + // Information_Missing enum + Error_ProbableCause_Information_Missing Error_ProbableCause = 122 + // Information_Modification enum + Error_ProbableCause_Information_Modification Error_ProbableCause = 123 + // Information_Out_of_Sequence enum + Error_ProbableCause_Information_Out_of_Sequence Error_ProbableCause = 124 + // Key_Expired enum + Error_ProbableCause_Key_Expired Error_ProbableCause = 125 + // Non_Repudiation_Failure enum + Error_ProbableCause_Non_Repudiation_Failure Error_ProbableCause = 126 + // Out_of_Hours_Activity enum + Error_ProbableCause_Out_of_Hours_Activity Error_ProbableCause = 127 + // Out_of_Service enum + Error_ProbableCause_Out_of_Service Error_ProbableCause = 128 + // Procedural_Error enum + Error_ProbableCause_Procedural_Error Error_ProbableCause = 129 + // Unexpected_Information enum + Error_ProbableCause_Unexpected_Information Error_ProbableCause = 130 + // DMTF_Reserved enum + Error_ProbableCause_DMTF_Reserved Error_ProbableCause = 131 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Event.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Event.go new file mode 100644 index 00000000..8b7457d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Event.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Event struct +type __Event struct { + *__IndicationRelated + + // + SECURITY_DESCRIPTOR []uint8 + + // + TIME_CREATED uint64 +} + +func New__EventEx1(instance *cim.WmiInstance) (newInstance *__Event, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__Event{ + __IndicationRelated: tmp, + } + return +} + +func New__EventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Event, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Event{ + __IndicationRelated: tmp, + } + return +} + +// SetSECURITY_DESCRIPTOR sets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__Event) SetPropertySECURITY_DESCRIPTOR(value []uint8) (err error) { + return instance.SetProperty("SECURITY_DESCRIPTOR", (value)) +} + +// GetSECURITY_DESCRIPTOR gets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__Event) GetPropertySECURITY_DESCRIPTOR() (value []uint8, err error) { + retValue, err := instance.GetProperty("SECURITY_DESCRIPTOR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__Event) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__Event) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumer.go new file mode 100644 index 00000000..ee519add --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumer.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventConsumer struct +type __EventConsumer struct { + *__IndicationRelated + + // + CreatorSID []uint8 + + // + MachineName string + + // + MaximumQueueSize uint32 +} + +func New__EventConsumerEx1(instance *cim.WmiInstance) (newInstance *__EventConsumer, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__EventConsumer{ + __IndicationRelated: tmp, + } + return +} + +func New__EventConsumerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventConsumer, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventConsumer{ + __IndicationRelated: tmp, + } + return +} + +// SetCreatorSID sets the value of CreatorSID for the instance +func (instance *__EventConsumer) SetPropertyCreatorSID(value []uint8) (err error) { + return instance.SetProperty("CreatorSID", (value)) +} + +// GetCreatorSID gets the value of CreatorSID for the instance +func (instance *__EventConsumer) GetPropertyCreatorSID() (value []uint8, err error) { + retValue, err := instance.GetProperty("CreatorSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetMachineName sets the value of MachineName for the instance +func (instance *__EventConsumer) SetPropertyMachineName(value string) (err error) { + return instance.SetProperty("MachineName", (value)) +} + +// GetMachineName gets the value of MachineName for the instance +func (instance *__EventConsumer) GetPropertyMachineName() (value string, err error) { + retValue, err := instance.GetProperty("MachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumQueueSize sets the value of MaximumQueueSize for the instance +func (instance *__EventConsumer) SetPropertyMaximumQueueSize(value uint32) (err error) { + return instance.SetProperty("MaximumQueueSize", (value)) +} + +// GetMaximumQueueSize gets the value of MaximumQueueSize for the instance +func (instance *__EventConsumer) GetPropertyMaximumQueueSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumQueueSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumerProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumerProviderRegistration.go new file mode 100644 index 00000000..7a926955 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventConsumerProviderRegistration.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventConsumerProviderRegistration struct +type __EventConsumerProviderRegistration struct { + *__ProviderRegistration + + // + ConsumerClassNames []string +} + +func New__EventConsumerProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__EventConsumerProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__EventConsumerProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__EventConsumerProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventConsumerProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventConsumerProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetConsumerClassNames sets the value of ConsumerClassNames for the instance +func (instance *__EventConsumerProviderRegistration) SetPropertyConsumerClassNames(value []string) (err error) { + return instance.SetProperty("ConsumerClassNames", (value)) +} + +// GetConsumerClassNames gets the value of ConsumerClassNames for the instance +func (instance *__EventConsumerProviderRegistration) GetPropertyConsumerClassNames() (value []string, err error) { + retValue, err := instance.GetProperty("ConsumerClassNames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventDroppedEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventDroppedEvent.go new file mode 100644 index 00000000..23671f05 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventDroppedEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventDroppedEvent struct +type __EventDroppedEvent struct { + *__SystemEvent + + // + Event __Event + + // + IntendedConsumer __EventConsumer +} + +func New__EventDroppedEventEx1(instance *cim.WmiInstance) (newInstance *__EventDroppedEvent, err error) { + tmp, err := New__SystemEventEx1(instance) + + if err != nil { + return + } + newInstance = &__EventDroppedEvent{ + __SystemEvent: tmp, + } + return +} + +func New__EventDroppedEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventDroppedEvent, err error) { + tmp, err := New__SystemEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventDroppedEvent{ + __SystemEvent: tmp, + } + return +} + +// SetEvent sets the value of Event for the instance +func (instance *__EventDroppedEvent) SetPropertyEvent(value __Event) (err error) { + return instance.SetProperty("Event", (value)) +} + +// GetEvent gets the value of Event for the instance +func (instance *__EventDroppedEvent) GetPropertyEvent() (value __Event, err error) { + retValue, err := instance.GetProperty("Event") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Event) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Event is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Event(valuetmp) + + return +} + +// SetIntendedConsumer sets the value of IntendedConsumer for the instance +func (instance *__EventDroppedEvent) SetPropertyIntendedConsumer(value __EventConsumer) (err error) { + return instance.SetProperty("IntendedConsumer", (value)) +} + +// GetIntendedConsumer gets the value of IntendedConsumer for the instance +func (instance *__EventDroppedEvent) GetPropertyIntendedConsumer() (value __EventConsumer, err error) { + retValue, err := instance.GetProperty("IntendedConsumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventConsumer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventConsumer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventConsumer(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventFilter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventFilter.go new file mode 100644 index 00000000..1c16600c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventFilter.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventFilter struct +type __EventFilter struct { + *__IndicationRelated + + // + CreatorSID []uint8 + + // + EventAccess string + + // + EventNamespace string + + // + Name string + + // + Query string + + // + QueryLanguage string +} + +func New__EventFilterEx1(instance *cim.WmiInstance) (newInstance *__EventFilter, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__EventFilter{ + __IndicationRelated: tmp, + } + return +} + +func New__EventFilterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventFilter, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventFilter{ + __IndicationRelated: tmp, + } + return +} + +// SetCreatorSID sets the value of CreatorSID for the instance +func (instance *__EventFilter) SetPropertyCreatorSID(value []uint8) (err error) { + return instance.SetProperty("CreatorSID", (value)) +} + +// GetCreatorSID gets the value of CreatorSID for the instance +func (instance *__EventFilter) GetPropertyCreatorSID() (value []uint8, err error) { + retValue, err := instance.GetProperty("CreatorSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetEventAccess sets the value of EventAccess for the instance +func (instance *__EventFilter) SetPropertyEventAccess(value string) (err error) { + return instance.SetProperty("EventAccess", (value)) +} + +// GetEventAccess gets the value of EventAccess for the instance +func (instance *__EventFilter) GetPropertyEventAccess() (value string, err error) { + retValue, err := instance.GetProperty("EventAccess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEventNamespace sets the value of EventNamespace for the instance +func (instance *__EventFilter) SetPropertyEventNamespace(value string) (err error) { + return instance.SetProperty("EventNamespace", (value)) +} + +// GetEventNamespace gets the value of EventNamespace for the instance +func (instance *__EventFilter) GetPropertyEventNamespace() (value string, err error) { + retValue, err := instance.GetProperty("EventNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *__EventFilter) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__EventFilter) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *__EventFilter) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *__EventFilter) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *__EventFilter) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *__EventFilter) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventGenerator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventGenerator.go new file mode 100644 index 00000000..0a004d3f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventGenerator.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __EventGenerator struct +type __EventGenerator struct { + *__IndicationRelated +} + +func New__EventGeneratorEx1(instance *cim.WmiInstance) (newInstance *__EventGenerator, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__EventGenerator{ + __IndicationRelated: tmp, + } + return +} + +func New__EventGeneratorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventGenerator, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventGenerator{ + __IndicationRelated: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventProviderRegistration.go new file mode 100644 index 00000000..0665aac2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventProviderRegistration.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventProviderRegistration struct +type __EventProviderRegistration struct { + *__ProviderRegistration + + // + EventQueryList []string +} + +func New__EventProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__EventProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__EventProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__EventProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetEventQueryList sets the value of EventQueryList for the instance +func (instance *__EventProviderRegistration) SetPropertyEventQueryList(value []string) (err error) { + return instance.SetProperty("EventQueryList", (value)) +} + +// GetEventQueryList gets the value of EventQueryList for the instance +func (instance *__EventProviderRegistration) GetPropertyEventQueryList() (value []string, err error) { + retValue, err := instance.GetProperty("EventQueryList") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventQueueOverflowEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventQueueOverflowEvent.go new file mode 100644 index 00000000..36eb2cc5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/EventQueueOverflowEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventQueueOverflowEvent struct +type __EventQueueOverflowEvent struct { + *__EventDroppedEvent + + // + CurrentQueueSize uint32 +} + +func New__EventQueueOverflowEventEx1(instance *cim.WmiInstance) (newInstance *__EventQueueOverflowEvent, err error) { + tmp, err := New__EventDroppedEventEx1(instance) + + if err != nil { + return + } + newInstance = &__EventQueueOverflowEvent{ + __EventDroppedEvent: tmp, + } + return +} + +func New__EventQueueOverflowEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventQueueOverflowEvent, err error) { + tmp, err := New__EventDroppedEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventQueueOverflowEvent{ + __EventDroppedEvent: tmp, + } + return +} + +// SetCurrentQueueSize sets the value of CurrentQueueSize for the instance +func (instance *__EventQueueOverflowEvent) SetPropertyCurrentQueueSize(value uint32) (err error) { + return instance.SetProperty("CurrentQueueSize", (value)) +} + +// GetCurrentQueueSize gets the value of CurrentQueueSize for the instance +func (instance *__EventQueueOverflowEvent) GetPropertyCurrentQueueSize() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentQueueSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtendedStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtendedStatus.go new file mode 100644 index 00000000..0da759ea --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtendedStatus.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ExtendedStatus struct +type __ExtendedStatus struct { + *__NotifyStatus + + // + Description string + + // + Operation string + + // + ParameterInfo string + + // + ProviderName string +} + +func New__ExtendedStatusEx1(instance *cim.WmiInstance) (newInstance *__ExtendedStatus, err error) { + tmp, err := New__NotifyStatusEx1(instance) + + if err != nil { + return + } + newInstance = &__ExtendedStatus{ + __NotifyStatus: tmp, + } + return +} + +func New__ExtendedStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ExtendedStatus, err error) { + tmp, err := New__NotifyStatusEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ExtendedStatus{ + __NotifyStatus: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *__ExtendedStatus) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *__ExtendedStatus) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperation sets the value of Operation for the instance +func (instance *__ExtendedStatus) SetPropertyOperation(value string) (err error) { + return instance.SetProperty("Operation", (value)) +} + +// GetOperation gets the value of Operation for the instance +func (instance *__ExtendedStatus) GetPropertyOperation() (value string, err error) { + retValue, err := instance.GetProperty("Operation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParameterInfo sets the value of ParameterInfo for the instance +func (instance *__ExtendedStatus) SetPropertyParameterInfo(value string) (err error) { + return instance.SetProperty("ParameterInfo", (value)) +} + +// GetParameterInfo gets the value of ParameterInfo for the instance +func (instance *__ExtendedStatus) GetPropertyParameterInfo() (value string, err error) { + retValue, err := instance.GetProperty("ParameterInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *__ExtendedStatus) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *__ExtendedStatus) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtrinsicEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtrinsicEvent.go new file mode 100644 index 00000000..3048de66 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ExtrinsicEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __ExtrinsicEvent struct +type __ExtrinsicEvent struct { + *__Event +} + +func New__ExtrinsicEventEx1(instance *cim.WmiInstance) (newInstance *__ExtrinsicEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__ExtrinsicEvent{ + __Event: tmp, + } + return +} + +func New__ExtrinsicEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ExtrinsicEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ExtrinsicEvent{ + __Event: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FilterToConsumerBinding.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FilterToConsumerBinding.go new file mode 100644 index 00000000..3b6da0e0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FilterToConsumerBinding.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __FilterToConsumerBinding struct +type __FilterToConsumerBinding struct { + *__IndicationRelated + + // + Consumer __EventConsumer + + // + CreatorSID []uint8 + + // + DeliverSynchronously bool + + // + DeliveryQoS uint32 + + // + Filter __EventFilter + + // + MaintainSecurityContext bool + + // + SlowDownProviders bool +} + +func New__FilterToConsumerBindingEx1(instance *cim.WmiInstance) (newInstance *__FilterToConsumerBinding, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__FilterToConsumerBinding{ + __IndicationRelated: tmp, + } + return +} + +func New__FilterToConsumerBindingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__FilterToConsumerBinding, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__FilterToConsumerBinding{ + __IndicationRelated: tmp, + } + return +} + +// SetConsumer sets the value of Consumer for the instance +func (instance *__FilterToConsumerBinding) SetPropertyConsumer(value __EventConsumer) (err error) { + return instance.SetProperty("Consumer", (value)) +} + +// GetConsumer gets the value of Consumer for the instance +func (instance *__FilterToConsumerBinding) GetPropertyConsumer() (value __EventConsumer, err error) { + retValue, err := instance.GetProperty("Consumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventConsumer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventConsumer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventConsumer(valuetmp) + + return +} + +// SetCreatorSID sets the value of CreatorSID for the instance +func (instance *__FilterToConsumerBinding) SetPropertyCreatorSID(value []uint8) (err error) { + return instance.SetProperty("CreatorSID", (value)) +} + +// GetCreatorSID gets the value of CreatorSID for the instance +func (instance *__FilterToConsumerBinding) GetPropertyCreatorSID() (value []uint8, err error) { + retValue, err := instance.GetProperty("CreatorSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetDeliverSynchronously sets the value of DeliverSynchronously for the instance +func (instance *__FilterToConsumerBinding) SetPropertyDeliverSynchronously(value bool) (err error) { + return instance.SetProperty("DeliverSynchronously", (value)) +} + +// GetDeliverSynchronously gets the value of DeliverSynchronously for the instance +func (instance *__FilterToConsumerBinding) GetPropertyDeliverSynchronously() (value bool, err error) { + retValue, err := instance.GetProperty("DeliverSynchronously") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDeliveryQoS sets the value of DeliveryQoS for the instance +func (instance *__FilterToConsumerBinding) SetPropertyDeliveryQoS(value uint32) (err error) { + return instance.SetProperty("DeliveryQoS", (value)) +} + +// GetDeliveryQoS gets the value of DeliveryQoS for the instance +func (instance *__FilterToConsumerBinding) GetPropertyDeliveryQoS() (value uint32, err error) { + retValue, err := instance.GetProperty("DeliveryQoS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilter sets the value of Filter for the instance +func (instance *__FilterToConsumerBinding) SetPropertyFilter(value __EventFilter) (err error) { + return instance.SetProperty("Filter", (value)) +} + +// GetFilter gets the value of Filter for the instance +func (instance *__FilterToConsumerBinding) GetPropertyFilter() (value __EventFilter, err error) { + retValue, err := instance.GetProperty("Filter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventFilter) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventFilter is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventFilter(valuetmp) + + return +} + +// SetMaintainSecurityContext sets the value of MaintainSecurityContext for the instance +func (instance *__FilterToConsumerBinding) SetPropertyMaintainSecurityContext(value bool) (err error) { + return instance.SetProperty("MaintainSecurityContext", (value)) +} + +// GetMaintainSecurityContext gets the value of MaintainSecurityContext for the instance +func (instance *__FilterToConsumerBinding) GetPropertyMaintainSecurityContext() (value bool, err error) { + retValue, err := instance.GetProperty("MaintainSecurityContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlowDownProviders sets the value of SlowDownProviders for the instance +func (instance *__FilterToConsumerBinding) SetPropertySlowDownProviders(value bool) (err error) { + return instance.SetProperty("SlowDownProviders", (value)) +} + +// GetSlowDownProviders gets the value of SlowDownProviders for the instance +func (instance *__FilterToConsumerBinding) GetPropertySlowDownProviders() (value bool, err error) { + retValue, err := instance.GetProperty("SlowDownProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_HealthStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_HealthStatus.go new file mode 100644 index 00000000..4ea2f069 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_HealthStatus.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source FolderRedirectionHealth_HealthStatus +////////////////////////////////////////////// +package cimv2 + +// FolderRedirectionHealth_HealthStatus +type FolderRedirectionHealth_HealthStatus int + +const ( + // Healthy enum + FolderRedirectionHealth_HealthStatus_Healthy FolderRedirectionHealth_HealthStatus = 0 + // Caution enum + FolderRedirectionHealth_HealthStatus_Caution FolderRedirectionHealth_HealthStatus = 1 + // Unhealthy enum + FolderRedirectionHealth_HealthStatus_Unhealthy FolderRedirectionHealth_HealthStatus = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_LastSyncStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_LastSyncStatus.go new file mode 100644 index 00000000..d1f93bfd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirectionHealth_LastSyncStatus.go @@ -0,0 +1,23 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source FolderRedirectionHealth_LastSyncStatus +////////////////////////////////////////////// +package cimv2 + +// FolderRedirectionHealth_LastSyncStatus +type FolderRedirectionHealth_LastSyncStatus int + +const ( + // Success enum + FolderRedirectionHealth_LastSyncStatus_Success FolderRedirectionHealth_LastSyncStatus = 0 + // Conflict enum + FolderRedirectionHealth_LastSyncStatus_Conflict FolderRedirectionHealth_LastSyncStatus = 1 + // Warning enum + FolderRedirectionHealth_LastSyncStatus_Warning FolderRedirectionHealth_LastSyncStatus = 2 + // Error enum + FolderRedirectionHealth_LastSyncStatus_Error FolderRedirectionHealth_LastSyncStatus = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirection_RedirectionType.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirection_RedirectionType.go new file mode 100644 index 00000000..95b0fa1a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/FolderRedirection_RedirectionType.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source FolderRedirection_RedirectionType +////////////////////////////////////////////// +package cimv2 + +// FolderRedirection_RedirectionType +type FolderRedirection_RedirectionType int + +const ( + // ToFullPath enum + FolderRedirection_RedirectionType_ToFullPath FolderRedirection_RedirectionType = 0 + // ToLocalUserProfile enum + FolderRedirection_RedirectionType_ToLocalUserProfile FolderRedirection_RedirectionType = 1 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IndicationRelated.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IndicationRelated.go new file mode 100644 index 00000000..615a8b40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IndicationRelated.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __IndicationRelated struct +type __IndicationRelated struct { + *__SystemClass +} + +func New__IndicationRelatedEx1(instance *cim.WmiInstance) (newInstance *__IndicationRelated, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__IndicationRelated{ + __SystemClass: tmp, + } + return +} + +func New__IndicationRelatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__IndicationRelated, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__IndicationRelated{ + __SystemClass: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Indication_PerceivedSeverity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Indication_PerceivedSeverity.go new file mode 100644 index 00000000..ed06889e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Indication_PerceivedSeverity.go @@ -0,0 +1,33 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Indication_PerceivedSeverity +////////////////////////////////////////////// +package cimv2 + +// Indication_PerceivedSeverity +type Indication_PerceivedSeverity int + +const ( + // Unknown enum + Indication_PerceivedSeverity_Unknown Indication_PerceivedSeverity = 0 + // Other enum + Indication_PerceivedSeverity_Other Indication_PerceivedSeverity = 1 + // Information enum + Indication_PerceivedSeverity_Information Indication_PerceivedSeverity = 2 + // Degraded_Warning enum + Indication_PerceivedSeverity_Degraded_Warning Indication_PerceivedSeverity = 3 + // Minor enum + Indication_PerceivedSeverity_Minor Indication_PerceivedSeverity = 4 + // Major enum + Indication_PerceivedSeverity_Major Indication_PerceivedSeverity = 5 + // Critical enum + Indication_PerceivedSeverity_Critical Indication_PerceivedSeverity = 6 + // Fatal_NonRecoverable enum + Indication_PerceivedSeverity_Fatal_NonRecoverable Indication_PerceivedSeverity = 7 + // DMTF_Reserved enum + Indication_PerceivedSeverity_DMTF_Reserved Indication_PerceivedSeverity = 8 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceCreationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceCreationEvent.go new file mode 100644 index 00000000..590621ee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceCreationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __InstanceCreationEvent struct +type __InstanceCreationEvent struct { + *__InstanceOperationEvent +} + +func New__InstanceCreationEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceCreationEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceCreationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__InstanceCreationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceCreationEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceCreationEvent{ + __InstanceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceDeletionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceDeletionEvent.go new file mode 100644 index 00000000..0989bbfb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceDeletionEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __InstanceDeletionEvent struct +type __InstanceDeletionEvent struct { + *__InstanceOperationEvent +} + +func New__InstanceDeletionEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceDeletionEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceDeletionEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__InstanceDeletionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceDeletionEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceDeletionEvent{ + __InstanceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceModificationEvent.go new file mode 100644 index 00000000..0c25a9bc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceModificationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __InstanceModificationEvent struct +type __InstanceModificationEvent struct { + *__InstanceOperationEvent + + // + PreviousInstance interface{} +} + +func New__InstanceModificationEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceModificationEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceModificationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__InstanceModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceModificationEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceModificationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +// SetPreviousInstance sets the value of PreviousInstance for the instance +func (instance *__InstanceModificationEvent) SetPropertyPreviousInstance(value interface{}) (err error) { + return instance.SetProperty("PreviousInstance", (value)) +} + +// GetPreviousInstance gets the value of PreviousInstance for the instance +func (instance *__InstanceModificationEvent) GetPropertyPreviousInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceOperationEvent.go new file mode 100644 index 00000000..429b4bb8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceOperationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __InstanceOperationEvent struct +type __InstanceOperationEvent struct { + *__Event + + // + TargetInstance interface{} +} + +func New__InstanceOperationEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceOperationEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceOperationEvent{ + __Event: tmp, + } + return +} + +func New__InstanceOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceOperationEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceOperationEvent{ + __Event: tmp, + } + return +} + +// SetTargetInstance sets the value of TargetInstance for the instance +func (instance *__InstanceOperationEvent) SetPropertyTargetInstance(value interface{}) (err error) { + return instance.SetProperty("TargetInstance", (value)) +} + +// GetTargetInstance gets the value of TargetInstance for the instance +func (instance *__InstanceOperationEvent) GetPropertyTargetInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("TargetInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceProviderRegistration.go new file mode 100644 index 00000000..5d3d963f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/InstanceProviderRegistration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __InstanceProviderRegistration struct +type __InstanceProviderRegistration struct { + *__ObjectProviderRegistration +} + +func New__InstanceProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__InstanceProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} + +func New__InstanceProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IntervalTimerInstruction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IntervalTimerInstruction.go new file mode 100644 index 00000000..61ec284a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/IntervalTimerInstruction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __IntervalTimerInstruction struct +type __IntervalTimerInstruction struct { + *__TimerInstruction + + // + IntervalBetweenEvents uint32 +} + +func New__IntervalTimerInstructionEx1(instance *cim.WmiInstance) (newInstance *__IntervalTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx1(instance) + + if err != nil { + return + } + newInstance = &__IntervalTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +func New__IntervalTimerInstructionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__IntervalTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__IntervalTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +// SetIntervalBetweenEvents sets the value of IntervalBetweenEvents for the instance +func (instance *__IntervalTimerInstruction) SetPropertyIntervalBetweenEvents(value uint32) (err error) { + return instance.SetProperty("IntervalBetweenEvents", (value)) +} + +// GetIntervalBetweenEvents gets the value of IntervalBetweenEvents for the instance +func (instance *__IntervalTimerInstruction) GetPropertyIntervalBetweenEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("IntervalBetweenEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_ExtendedStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_ExtendedStatus.go new file mode 100644 index 00000000..d5374ac9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_ExtendedStatus.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ExtendedStatus struct +type MSFT_ExtendedStatus struct { + *MSFT_WmiError + + // + original_error interface{} +} + +func NewMSFT_ExtendedStatusEx1(instance *cim.WmiInstance) (newInstance *MSFT_ExtendedStatus, err error) { + tmp, err := NewMSFT_WmiErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ExtendedStatus{ + MSFT_WmiError: tmp, + } + return +} + +func NewMSFT_ExtendedStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ExtendedStatus, err error) { + tmp, err := NewMSFT_WmiErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ExtendedStatus{ + MSFT_WmiError: tmp, + } + return +} + +// Setoriginal_error sets the value of original_error for the instance +func (instance *MSFT_ExtendedStatus) SetPropertyoriginal_error(value interface{}) (err error) { + return instance.SetProperty("original_error", (value)) +} + +// Getoriginal_error gets the value of original_error for the instance +func (instance *MSFT_ExtendedStatus) GetPropertyoriginal_error() (value interface{}, err error) { + retValue, err := instance.GetProperty("original_error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvAccessCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvAccessCheck.go new file mode 100644 index 00000000..d9ff96c9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvAccessCheck.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NCProvAccessCheck struct +type MSFT_NCProvAccessCheck struct { + *MSFT_NCProvEvent + + // + Query string + + // + QueryLanguage string + + // + Sid []uint8 +} + +func NewMSFT_NCProvAccessCheckEx1(instance *cim.WmiInstance) (newInstance *MSFT_NCProvAccessCheck, err error) { + tmp, err := NewMSFT_NCProvEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NCProvAccessCheck{ + MSFT_NCProvEvent: tmp, + } + return +} + +func NewMSFT_NCProvAccessCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NCProvAccessCheck, err error) { + tmp, err := NewMSFT_NCProvEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NCProvAccessCheck{ + MSFT_NCProvEvent: tmp, + } + return +} + +// SetQuery sets the value of Query for the instance +func (instance *MSFT_NCProvAccessCheck) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *MSFT_NCProvAccessCheck) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *MSFT_NCProvAccessCheck) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *MSFT_NCProvAccessCheck) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSid sets the value of Sid for the instance +func (instance *MSFT_NCProvAccessCheck) SetPropertySid(value []uint8) (err error) { + return instance.SetProperty("Sid", (value)) +} + +// GetSid gets the value of Sid for the instance +func (instance *MSFT_NCProvAccessCheck) GetPropertySid() (value []uint8, err error) { + retValue, err := instance.GetProperty("Sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvCancelQuery.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvCancelQuery.go new file mode 100644 index 00000000..3add3742 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvCancelQuery.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NCProvCancelQuery struct +type MSFT_NCProvCancelQuery struct { + *MSFT_NCProvEvent + + // + ID uint32 +} + +func NewMSFT_NCProvCancelQueryEx1(instance *cim.WmiInstance) (newInstance *MSFT_NCProvCancelQuery, err error) { + tmp, err := NewMSFT_NCProvEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NCProvCancelQuery{ + MSFT_NCProvEvent: tmp, + } + return +} + +func NewMSFT_NCProvCancelQueryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NCProvCancelQuery, err error) { + tmp, err := NewMSFT_NCProvEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NCProvCancelQuery{ + MSFT_NCProvEvent: tmp, + } + return +} + +// SetID sets the value of ID for the instance +func (instance *MSFT_NCProvCancelQuery) SetPropertyID(value uint32) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *MSFT_NCProvCancelQuery) GetPropertyID() (value uint32, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvClientConnected.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvClientConnected.go new file mode 100644 index 00000000..a897ffd0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvClientConnected.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NCProvClientConnected struct +type MSFT_NCProvClientConnected struct { + *MSFT_NCProvEvent + + // + Inproc bool +} + +func NewMSFT_NCProvClientConnectedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NCProvClientConnected, err error) { + tmp, err := NewMSFT_NCProvEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NCProvClientConnected{ + MSFT_NCProvEvent: tmp, + } + return +} + +func NewMSFT_NCProvClientConnectedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NCProvClientConnected, err error) { + tmp, err := NewMSFT_NCProvEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NCProvClientConnected{ + MSFT_NCProvEvent: tmp, + } + return +} + +// SetInproc sets the value of Inproc for the instance +func (instance *MSFT_NCProvClientConnected) SetPropertyInproc(value bool) (err error) { + return instance.SetProperty("Inproc", (value)) +} + +// GetInproc gets the value of Inproc for the instance +func (instance *MSFT_NCProvClientConnected) GetPropertyInproc() (value bool, err error) { + retValue, err := instance.GetProperty("Inproc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvEvent.go new file mode 100644 index 00000000..88003bc1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvEvent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NCProvEvent struct +type MSFT_NCProvEvent struct { + *__ExtrinsicEvent + + // + Namespace string + + // + ProviderName string + + // + Result uint32 +} + +func NewMSFT_NCProvEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_NCProvEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NCProvEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewMSFT_NCProvEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NCProvEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NCProvEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *MSFT_NCProvEvent) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *MSFT_NCProvEvent) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *MSFT_NCProvEvent) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *MSFT_NCProvEvent) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResult sets the value of Result for the instance +func (instance *MSFT_NCProvEvent) SetPropertyResult(value uint32) (err error) { + return instance.SetProperty("Result", (value)) +} + +// GetResult gets the value of Result for the instance +func (instance *MSFT_NCProvEvent) GetPropertyResult() (value uint32, err error) { + retValue, err := instance.GetProperty("Result") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvNewQuery.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvNewQuery.go new file mode 100644 index 00000000..dbca9e8a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NCProvNewQuery.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NCProvNewQuery struct +type MSFT_NCProvNewQuery struct { + *MSFT_NCProvEvent + + // + ID uint32 + + // + Query string + + // + QueryLanguage string +} + +func NewMSFT_NCProvNewQueryEx1(instance *cim.WmiInstance) (newInstance *MSFT_NCProvNewQuery, err error) { + tmp, err := NewMSFT_NCProvEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NCProvNewQuery{ + MSFT_NCProvEvent: tmp, + } + return +} + +func NewMSFT_NCProvNewQueryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NCProvNewQuery, err error) { + tmp, err := NewMSFT_NCProvEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NCProvNewQuery{ + MSFT_NCProvEvent: tmp, + } + return +} + +// SetID sets the value of ID for the instance +func (instance *MSFT_NCProvNewQuery) SetPropertyID(value uint32) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *MSFT_NCProvNewQuery) GetPropertyID() (value uint32, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *MSFT_NCProvNewQuery) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *MSFT_NCProvNewQuery) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *MSFT_NCProvNewQuery) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *MSFT_NCProvNewQuery) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadAccount.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadAccount.go new file mode 100644 index 00000000..c4a08781 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadAccount.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_NetBadAccount struct +type MSFT_NetBadAccount struct { + *MSFT_SCMEventLogEvent +} + +func NewMSFT_NetBadAccountEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetBadAccount, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetBadAccount{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetBadAccountEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetBadAccount, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetBadAccount{ + MSFT_SCMEventLogEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadServiceState.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadServiceState.go new file mode 100644 index 00000000..68fff05d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBadServiceState.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetBadServiceState struct +type MSFT_NetBadServiceState struct { + *MSFT_SCMEventLogEvent + + // + Service string + + // + State uint32 +} + +func NewMSFT_NetBadServiceStateEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetBadServiceState, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetBadServiceState{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetBadServiceStateEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetBadServiceState, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetBadServiceState{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetBadServiceState) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetBadServiceState) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *MSFT_NetBadServiceState) SetPropertyState(value uint32) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *MSFT_NetBadServiceState) GetPropertyState() (value uint32, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBootSystemDriversFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBootSystemDriversFailed.go new file mode 100644 index 00000000..b6905ab5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetBootSystemDriversFailed.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetBootSystemDriversFailed struct +type MSFT_NetBootSystemDriversFailed struct { + *MSFT_SCMEventLogEvent + + // + DriverList string +} + +func NewMSFT_NetBootSystemDriversFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetBootSystemDriversFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetBootSystemDriversFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetBootSystemDriversFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetBootSystemDriversFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetBootSystemDriversFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetDriverList sets the value of DriverList for the instance +func (instance *MSFT_NetBootSystemDriversFailed) SetPropertyDriverList(value string) (err error) { + return instance.SetProperty("DriverList", (value)) +} + +// GetDriverList gets the value of DriverList for the instance +func (instance *MSFT_NetBootSystemDriversFailed) GetPropertyDriverList() (value string, err error) { + retValue, err := instance.GetProperty("DriverList") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailed.go new file mode 100644 index 00000000..0cd0ffa2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailed.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetCallToFunctionFailed struct +type MSFT_NetCallToFunctionFailed struct { + *MSFT_SCMEventLogEvent + + // + Error uint32 + + // + FunctionName string +} + +func NewMSFT_NetCallToFunctionFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetCallToFunctionFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetCallToFunctionFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetCallToFunctionFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetCallToFunctionFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetCallToFunctionFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetCallToFunctionFailed) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetCallToFunctionFailed) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFunctionName sets the value of FunctionName for the instance +func (instance *MSFT_NetCallToFunctionFailed) SetPropertyFunctionName(value string) (err error) { + return instance.SetProperty("FunctionName", (value)) +} + +// GetFunctionName gets the value of FunctionName for the instance +func (instance *MSFT_NetCallToFunctionFailed) GetPropertyFunctionName() (value string, err error) { + retValue, err := instance.GetProperty("FunctionName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailedII.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailedII.go new file mode 100644 index 00000000..5a7be17d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCallToFunctionFailedII.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetCallToFunctionFailedII struct +type MSFT_NetCallToFunctionFailedII struct { + *MSFT_SCMEventLogEvent + + // + Argument string + + // + Error uint32 + + // + FunctionName string +} + +func NewMSFT_NetCallToFunctionFailedIIEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetCallToFunctionFailedII, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetCallToFunctionFailedII{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetCallToFunctionFailedIIEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetCallToFunctionFailedII, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetCallToFunctionFailedII{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetArgument sets the value of Argument for the instance +func (instance *MSFT_NetCallToFunctionFailedII) SetPropertyArgument(value string) (err error) { + return instance.SetProperty("Argument", (value)) +} + +// GetArgument gets the value of Argument for the instance +func (instance *MSFT_NetCallToFunctionFailedII) GetPropertyArgument() (value string, err error) { + retValue, err := instance.GetProperty("Argument") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetCallToFunctionFailedII) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetCallToFunctionFailedII) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFunctionName sets the value of FunctionName for the instance +func (instance *MSFT_NetCallToFunctionFailedII) SetPropertyFunctionName(value string) (err error) { + return instance.SetProperty("FunctionName", (value)) +} + +// GetFunctionName gets the value of FunctionName for the instance +func (instance *MSFT_NetCallToFunctionFailedII) GetPropertyFunctionName() (value string, err error) { + retValue, err := instance.GetProperty("FunctionName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyAuto.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyAuto.go new file mode 100644 index 00000000..28877a36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyAuto.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_NetCircularDependencyAuto struct +type MSFT_NetCircularDependencyAuto struct { + *MSFT_SCMEventLogEvent +} + +func NewMSFT_NetCircularDependencyAutoEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetCircularDependencyAuto, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetCircularDependencyAuto{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetCircularDependencyAutoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetCircularDependencyAuto, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetCircularDependencyAuto{ + MSFT_SCMEventLogEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyDemand.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyDemand.go new file mode 100644 index 00000000..fe3d92b8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetCircularDependencyDemand.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetCircularDependencyDemand struct +type MSFT_NetCircularDependencyDemand struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetCircularDependencyDemandEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetCircularDependencyDemand, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetCircularDependencyDemand{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetCircularDependencyDemandEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetCircularDependencyDemand, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetCircularDependencyDemand{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetCircularDependencyDemand) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetCircularDependencyDemand) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetConnectionTimeout.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetConnectionTimeout.go new file mode 100644 index 00000000..88290a4e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetConnectionTimeout.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetConnectionTimeout struct +type MSFT_NetConnectionTimeout struct { + *MSFT_SCMEventLogEvent + + // + Milliseconds uint32 + + // + Service string +} + +func NewMSFT_NetConnectionTimeoutEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetConnectionTimeout, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetConnectionTimeout{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetConnectionTimeoutEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetConnectionTimeout, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetConnectionTimeout{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetMilliseconds sets the value of Milliseconds for the instance +func (instance *MSFT_NetConnectionTimeout) SetPropertyMilliseconds(value uint32) (err error) { + return instance.SetProperty("Milliseconds", (value)) +} + +// GetMilliseconds gets the value of Milliseconds for the instance +func (instance *MSFT_NetConnectionTimeout) GetPropertyMilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Milliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetConnectionTimeout) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetConnectionTimeout) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterGroup.go new file mode 100644 index 00000000..734fe462 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterGroup.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetDependOnLaterGroup struct +type MSFT_NetDependOnLaterGroup struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetDependOnLaterGroupEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetDependOnLaterGroup, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetDependOnLaterGroup{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetDependOnLaterGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetDependOnLaterGroup, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetDependOnLaterGroup{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetDependOnLaterGroup) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetDependOnLaterGroup) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterService.go new file mode 100644 index 00000000..ccdc53d0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetDependOnLaterService.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetDependOnLaterService struct +type MSFT_NetDependOnLaterService struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetDependOnLaterServiceEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetDependOnLaterService, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetDependOnLaterService{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetDependOnLaterServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetDependOnLaterService, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetDependOnLaterService{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetDependOnLaterService) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetDependOnLaterService) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailed.go new file mode 100644 index 00000000..35a3930f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailed.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetFirstLogonFailed struct +type MSFT_NetFirstLogonFailed struct { + *MSFT_SCMEventLogEvent + + // + Error uint32 +} + +func NewMSFT_NetFirstLogonFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetFirstLogonFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetFirstLogonFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetFirstLogonFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetFirstLogonFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetFirstLogonFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetFirstLogonFailed) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetFirstLogonFailed) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailedII.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailedII.go new file mode 100644 index 00000000..a7a61d6a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetFirstLogonFailedII.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetFirstLogonFailedII struct +type MSFT_NetFirstLogonFailedII struct { + *MSFT_SCMEventLogEvent + + // + Account string + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetFirstLogonFailedIIEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetFirstLogonFailedII, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetFirstLogonFailedII{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetFirstLogonFailedIIEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetFirstLogonFailedII, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetFirstLogonFailedII{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetAccount sets the value of Account for the instance +func (instance *MSFT_NetFirstLogonFailedII) SetPropertyAccount(value string) (err error) { + return instance.SetProperty("Account", (value)) +} + +// GetAccount gets the value of Account for the instance +func (instance *MSFT_NetFirstLogonFailedII) GetPropertyAccount() (value string, err error) { + retValue, err := instance.GetProperty("Account") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetFirstLogonFailedII) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetFirstLogonFailedII) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetFirstLogonFailedII) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetFirstLogonFailedII) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetReadfileTimeout.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetReadfileTimeout.go new file mode 100644 index 00000000..358f7558 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetReadfileTimeout.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetReadfileTimeout struct +type MSFT_NetReadfileTimeout struct { + *MSFT_SCMEventLogEvent + + // + Milliseconds uint32 +} + +func NewMSFT_NetReadfileTimeoutEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetReadfileTimeout, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetReadfileTimeout{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetReadfileTimeoutEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetReadfileTimeout, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetReadfileTimeout{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetMilliseconds sets the value of Milliseconds for the instance +func (instance *MSFT_NetReadfileTimeout) SetPropertyMilliseconds(value uint32) (err error) { + return instance.SetProperty("Milliseconds", (value)) +} + +// GetMilliseconds gets the value of Milliseconds for the instance +func (instance *MSFT_NetReadfileTimeout) GetPropertyMilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Milliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetRevertedToLastKnownGood.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetRevertedToLastKnownGood.go new file mode 100644 index 00000000..9fb5abdb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetRevertedToLastKnownGood.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_NetRevertedToLastKnownGood struct +type MSFT_NetRevertedToLastKnownGood struct { + *MSFT_SCMEventLogEvent +} + +func NewMSFT_NetRevertedToLastKnownGoodEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetRevertedToLastKnownGood, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetRevertedToLastKnownGood{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetRevertedToLastKnownGoodEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetRevertedToLastKnownGood, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetRevertedToLastKnownGood{ + MSFT_SCMEventLogEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceConfigBackoutFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceConfigBackoutFailed.go new file mode 100644 index 00000000..737c2f90 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceConfigBackoutFailed.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceConfigBackoutFailed struct +type MSFT_NetServiceConfigBackoutFailed struct { + *MSFT_SCMEventLogEvent + + // + ConfigField string + + // + Service string +} + +func NewMSFT_NetServiceConfigBackoutFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceConfigBackoutFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceConfigBackoutFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceConfigBackoutFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceConfigBackoutFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceConfigBackoutFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetConfigField sets the value of ConfigField for the instance +func (instance *MSFT_NetServiceConfigBackoutFailed) SetPropertyConfigField(value string) (err error) { + return instance.SetProperty("ConfigField", (value)) +} + +// GetConfigField gets the value of ConfigField for the instance +func (instance *MSFT_NetServiceConfigBackoutFailed) GetPropertyConfigField() (value string, err error) { + retValue, err := instance.GetProperty("ConfigField") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceConfigBackoutFailed) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceConfigBackoutFailed) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceControlSuccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceControlSuccess.go new file mode 100644 index 00000000..dda493ab --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceControlSuccess.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceControlSuccess struct +type MSFT_NetServiceControlSuccess struct { + *MSFT_SCMEventLogEvent + + // + Control string + + // + Service string + + // + sid string +} + +func NewMSFT_NetServiceControlSuccessEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceControlSuccess, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceControlSuccess{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceControlSuccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceControlSuccess, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceControlSuccess{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetControl sets the value of Control for the instance +func (instance *MSFT_NetServiceControlSuccess) SetPropertyControl(value string) (err error) { + return instance.SetProperty("Control", (value)) +} + +// GetControl gets the value of Control for the instance +func (instance *MSFT_NetServiceControlSuccess) GetPropertyControl() (value string, err error) { + retValue, err := instance.GetProperty("Control") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceControlSuccess) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceControlSuccess) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setsid sets the value of sid for the instance +func (instance *MSFT_NetServiceControlSuccess) SetPropertysid(value string) (err error) { + return instance.SetProperty("sid", (value)) +} + +// Getsid gets the value of sid for the instance +func (instance *MSFT_NetServiceControlSuccess) GetPropertysid() (value string, err error) { + retValue, err := instance.GetProperty("sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrash.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrash.go new file mode 100644 index 00000000..0717036a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrash.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceCrash struct +type MSFT_NetServiceCrash struct { + *MSFT_SCMEventLogEvent + + // + Action string + + // + ActionDelay uint32 + + // + ActionType uint32 + + // + Service string + + // + TimesFailed uint32 +} + +func NewMSFT_NetServiceCrashEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceCrash, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceCrash{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceCrashEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceCrash, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceCrash{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *MSFT_NetServiceCrash) SetPropertyAction(value string) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *MSFT_NetServiceCrash) GetPropertyAction() (value string, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetActionDelay sets the value of ActionDelay for the instance +func (instance *MSFT_NetServiceCrash) SetPropertyActionDelay(value uint32) (err error) { + return instance.SetProperty("ActionDelay", (value)) +} + +// GetActionDelay gets the value of ActionDelay for the instance +func (instance *MSFT_NetServiceCrash) GetPropertyActionDelay() (value uint32, err error) { + retValue, err := instance.GetProperty("ActionDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActionType sets the value of ActionType for the instance +func (instance *MSFT_NetServiceCrash) SetPropertyActionType(value uint32) (err error) { + return instance.SetProperty("ActionType", (value)) +} + +// GetActionType gets the value of ActionType for the instance +func (instance *MSFT_NetServiceCrash) GetPropertyActionType() (value uint32, err error) { + retValue, err := instance.GetProperty("ActionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceCrash) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceCrash) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimesFailed sets the value of TimesFailed for the instance +func (instance *MSFT_NetServiceCrash) SetPropertyTimesFailed(value uint32) (err error) { + return instance.SetProperty("TimesFailed", (value)) +} + +// GetTimesFailed gets the value of TimesFailed for the instance +func (instance *MSFT_NetServiceCrash) GetPropertyTimesFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("TimesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrashNoAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrashNoAction.go new file mode 100644 index 00000000..e5ddb0b2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceCrashNoAction.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceCrashNoAction struct +type MSFT_NetServiceCrashNoAction struct { + *MSFT_SCMEventLogEvent + + // + Service string + + // + TimesFailed uint32 +} + +func NewMSFT_NetServiceCrashNoActionEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceCrashNoAction, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceCrashNoAction{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceCrashNoActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceCrashNoAction, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceCrashNoAction{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceCrashNoAction) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceCrashNoAction) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimesFailed sets the value of TimesFailed for the instance +func (instance *MSFT_NetServiceCrashNoAction) SetPropertyTimesFailed(value uint32) (err error) { + return instance.SetProperty("TimesFailed", (value)) +} + +// GetTimesFailed gets the value of TimesFailed for the instance +func (instance *MSFT_NetServiceCrashNoAction) GetPropertyTimesFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("TimesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceDifferentPIDConnected.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceDifferentPIDConnected.go new file mode 100644 index 00000000..78c01fdb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceDifferentPIDConnected.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceDifferentPIDConnected struct +type MSFT_NetServiceDifferentPIDConnected struct { + *MSFT_SCMEventLogEvent + + // + ActualPID uint32 + + // + ExpectedPID uint32 + + // + Service string +} + +func NewMSFT_NetServiceDifferentPIDConnectedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceDifferentPIDConnected, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceDifferentPIDConnected{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceDifferentPIDConnectedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceDifferentPIDConnected, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceDifferentPIDConnected{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetActualPID sets the value of ActualPID for the instance +func (instance *MSFT_NetServiceDifferentPIDConnected) SetPropertyActualPID(value uint32) (err error) { + return instance.SetProperty("ActualPID", (value)) +} + +// GetActualPID gets the value of ActualPID for the instance +func (instance *MSFT_NetServiceDifferentPIDConnected) GetPropertyActualPID() (value uint32, err error) { + retValue, err := instance.GetProperty("ActualPID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExpectedPID sets the value of ExpectedPID for the instance +func (instance *MSFT_NetServiceDifferentPIDConnected) SetPropertyExpectedPID(value uint32) (err error) { + return instance.SetProperty("ExpectedPID", (value)) +} + +// GetExpectedPID gets the value of ExpectedPID for the instance +func (instance *MSFT_NetServiceDifferentPIDConnected) GetPropertyExpectedPID() (value uint32, err error) { + retValue, err := instance.GetProperty("ExpectedPID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceDifferentPIDConnected) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceDifferentPIDConnected) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailed.go new file mode 100644 index 00000000..4bd416dd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailed.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceExitFailed struct +type MSFT_NetServiceExitFailed struct { + *MSFT_SCMEventLogEvent + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetServiceExitFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceExitFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceExitFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceExitFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceExitFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceExitFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetServiceExitFailed) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetServiceExitFailed) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceExitFailed) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceExitFailed) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailedSpecific.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailedSpecific.go new file mode 100644 index 00000000..0792b875 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceExitFailedSpecific.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceExitFailedSpecific struct +type MSFT_NetServiceExitFailedSpecific struct { + *MSFT_SCMEventLogEvent + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetServiceExitFailedSpecificEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceExitFailedSpecific, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceExitFailedSpecific{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceExitFailedSpecificEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceExitFailedSpecific, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceExitFailedSpecific{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetServiceExitFailedSpecific) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetServiceExitFailedSpecific) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceExitFailedSpecific) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceExitFailedSpecific) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceLogonTypeNotGranted.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceLogonTypeNotGranted.go new file mode 100644 index 00000000..31185c03 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceLogonTypeNotGranted.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceLogonTypeNotGranted struct +type MSFT_NetServiceLogonTypeNotGranted struct { + *MSFT_SCMEventLogEvent + + // + Account string + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetServiceLogonTypeNotGrantedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceLogonTypeNotGranted, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceLogonTypeNotGranted{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceLogonTypeNotGrantedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceLogonTypeNotGranted, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceLogonTypeNotGranted{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetAccount sets the value of Account for the instance +func (instance *MSFT_NetServiceLogonTypeNotGranted) SetPropertyAccount(value string) (err error) { + return instance.SetProperty("Account", (value)) +} + +// GetAccount gets the value of Account for the instance +func (instance *MSFT_NetServiceLogonTypeNotGranted) GetPropertyAccount() (value string, err error) { + retValue, err := instance.GetProperty("Account") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetServiceLogonTypeNotGranted) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetServiceLogonTypeNotGranted) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceLogonTypeNotGranted) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceLogonTypeNotGranted) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceNotInteractive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceNotInteractive.go new file mode 100644 index 00000000..2820da91 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceNotInteractive.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceNotInteractive struct +type MSFT_NetServiceNotInteractive struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetServiceNotInteractiveEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceNotInteractive, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceNotInteractive{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceNotInteractiveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceNotInteractive, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceNotInteractive{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceNotInteractive) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceNotInteractive) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceRecoveryFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceRecoveryFailed.go new file mode 100644 index 00000000..de56d7f1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceRecoveryFailed.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceRecoveryFailed struct +type MSFT_NetServiceRecoveryFailed struct { + *MSFT_SCMEventLogEvent + + // + Action string + + // + ActionType uint32 + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetServiceRecoveryFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceRecoveryFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceRecoveryFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceRecoveryFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceRecoveryFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceRecoveryFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *MSFT_NetServiceRecoveryFailed) SetPropertyAction(value string) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *MSFT_NetServiceRecoveryFailed) GetPropertyAction() (value string, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetActionType sets the value of ActionType for the instance +func (instance *MSFT_NetServiceRecoveryFailed) SetPropertyActionType(value uint32) (err error) { + return instance.SetProperty("ActionType", (value)) +} + +// GetActionType gets the value of ActionType for the instance +func (instance *MSFT_NetServiceRecoveryFailed) GetPropertyActionType() (value uint32, err error) { + retValue, err := instance.GetProperty("ActionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetServiceRecoveryFailed) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetServiceRecoveryFailed) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceRecoveryFailed) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceRecoveryFailed) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceShutdownFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceShutdownFailed.go new file mode 100644 index 00000000..d37e4c2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceShutdownFailed.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceShutdownFailed struct +type MSFT_NetServiceShutdownFailed struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetServiceShutdownFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceShutdownFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceShutdownFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceShutdownFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceShutdownFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceShutdownFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceShutdownFailed) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceShutdownFailed) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceSlowStartup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceSlowStartup.go new file mode 100644 index 00000000..467eeba0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceSlowStartup.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceSlowStartup struct +type MSFT_NetServiceSlowStartup struct { + *MSFT_SCMEventLogEvent + + // + Service string + + // + StartupTime uint32 +} + +func NewMSFT_NetServiceSlowStartupEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceSlowStartup, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceSlowStartup{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceSlowStartupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceSlowStartup, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceSlowStartup{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceSlowStartup) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceSlowStartup) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartupTime sets the value of StartupTime for the instance +func (instance *MSFT_NetServiceSlowStartup) SetPropertyStartupTime(value uint32) (err error) { + return instance.SetProperty("StartupTime", (value)) +} + +// GetStartupTime gets the value of StartupTime for the instance +func (instance *MSFT_NetServiceSlowStartup) GetPropertyStartupTime() (value uint32, err error) { + retValue, err := instance.GetProperty("StartupTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailed.go new file mode 100644 index 00000000..12a8666c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailed.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStartFailed struct +type MSFT_NetServiceStartFailed struct { + *MSFT_SCMEventLogEvent + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetServiceStartFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStartFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStartFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStartFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetServiceStartFailed) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetServiceStartFailed) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailed) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailed) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedGroup.go new file mode 100644 index 00000000..5cb41f34 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedGroup.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStartFailedGroup struct +type MSFT_NetServiceStartFailedGroup struct { + *MSFT_SCMEventLogEvent + + // + Group string + + // + Service string +} + +func NewMSFT_NetServiceStartFailedGroupEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStartFailedGroup, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailedGroup{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStartFailedGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStartFailedGroup, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailedGroup{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetGroup sets the value of Group for the instance +func (instance *MSFT_NetServiceStartFailedGroup) SetPropertyGroup(value string) (err error) { + return instance.SetProperty("Group", (value)) +} + +// GetGroup gets the value of Group for the instance +func (instance *MSFT_NetServiceStartFailedGroup) GetPropertyGroup() (value string, err error) { + retValue, err := instance.GetProperty("Group") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailedGroup) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailedGroup) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedII.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedII.go new file mode 100644 index 00000000..2957931d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedII.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStartFailedII struct +type MSFT_NetServiceStartFailedII struct { + *MSFT_SCMEventLogEvent + + // + DependedOnService string + + // + Error uint32 + + // + Service string +} + +func NewMSFT_NetServiceStartFailedIIEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStartFailedII, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailedII{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStartFailedIIEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStartFailedII, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailedII{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetDependedOnService sets the value of DependedOnService for the instance +func (instance *MSFT_NetServiceStartFailedII) SetPropertyDependedOnService(value string) (err error) { + return instance.SetProperty("DependedOnService", (value)) +} + +// GetDependedOnService gets the value of DependedOnService for the instance +func (instance *MSFT_NetServiceStartFailedII) GetPropertyDependedOnService() (value string, err error) { + retValue, err := instance.GetProperty("DependedOnService") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetError sets the value of Error for the instance +func (instance *MSFT_NetServiceStartFailedII) SetPropertyError(value uint32) (err error) { + return instance.SetProperty("Error", (value)) +} + +// GetError gets the value of Error for the instance +func (instance *MSFT_NetServiceStartFailedII) GetPropertyError() (value uint32, err error) { + retValue, err := instance.GetProperty("Error") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailedII) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailedII) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedNone.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedNone.go new file mode 100644 index 00000000..30d8bc57 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartFailedNone.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStartFailedNone struct +type MSFT_NetServiceStartFailedNone struct { + *MSFT_SCMEventLogEvent + + // + NonExistingService string + + // + Service string +} + +func NewMSFT_NetServiceStartFailedNoneEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStartFailedNone, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailedNone{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStartFailedNoneEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStartFailedNone, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartFailedNone{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetNonExistingService sets the value of NonExistingService for the instance +func (instance *MSFT_NetServiceStartFailedNone) SetPropertyNonExistingService(value string) (err error) { + return instance.SetProperty("NonExistingService", (value)) +} + +// GetNonExistingService gets the value of NonExistingService for the instance +func (instance *MSFT_NetServiceStartFailedNone) GetPropertyNonExistingService() (value string, err error) { + retValue, err := instance.GetProperty("NonExistingService") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailedNone) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStartFailedNone) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartHung.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartHung.go new file mode 100644 index 00000000..2f53a49d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartHung.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStartHung struct +type MSFT_NetServiceStartHung struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetServiceStartHungEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStartHung, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartHung{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStartHungEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStartHung, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartHung{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStartHung) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStartHung) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartTypeChanged.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartTypeChanged.go new file mode 100644 index 00000000..ec3d5425 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStartTypeChanged.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStartTypeChanged struct +type MSFT_NetServiceStartTypeChanged struct { + *MSFT_SCMEventLogEvent + + // + NewStartType string + + // + OldStartType string + + // + Service string + + // + sid string +} + +func NewMSFT_NetServiceStartTypeChangedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStartTypeChanged, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartTypeChanged{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStartTypeChangedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStartTypeChanged, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStartTypeChanged{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetNewStartType sets the value of NewStartType for the instance +func (instance *MSFT_NetServiceStartTypeChanged) SetPropertyNewStartType(value string) (err error) { + return instance.SetProperty("NewStartType", (value)) +} + +// GetNewStartType gets the value of NewStartType for the instance +func (instance *MSFT_NetServiceStartTypeChanged) GetPropertyNewStartType() (value string, err error) { + retValue, err := instance.GetProperty("NewStartType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOldStartType sets the value of OldStartType for the instance +func (instance *MSFT_NetServiceStartTypeChanged) SetPropertyOldStartType(value string) (err error) { + return instance.SetProperty("OldStartType", (value)) +} + +// GetOldStartType gets the value of OldStartType for the instance +func (instance *MSFT_NetServiceStartTypeChanged) GetPropertyOldStartType() (value string, err error) { + retValue, err := instance.GetProperty("OldStartType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStartTypeChanged) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStartTypeChanged) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setsid sets the value of sid for the instance +func (instance *MSFT_NetServiceStartTypeChanged) SetPropertysid(value string) (err error) { + return instance.SetProperty("sid", (value)) +} + +// Getsid gets the value of sid for the instance +func (instance *MSFT_NetServiceStartTypeChanged) GetPropertysid() (value string, err error) { + retValue, err := instance.GetProperty("sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStatusSuccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStatusSuccess.go new file mode 100644 index 00000000..76a56e80 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStatusSuccess.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStatusSuccess struct +type MSFT_NetServiceStatusSuccess struct { + *MSFT_SCMEventLogEvent + + // + Control string + + // + Service string +} + +func NewMSFT_NetServiceStatusSuccessEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStatusSuccess, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStatusSuccess{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStatusSuccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStatusSuccess, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStatusSuccess{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetControl sets the value of Control for the instance +func (instance *MSFT_NetServiceStatusSuccess) SetPropertyControl(value string) (err error) { + return instance.SetProperty("Control", (value)) +} + +// GetControl gets the value of Control for the instance +func (instance *MSFT_NetServiceStatusSuccess) GetPropertyControl() (value string, err error) { + retValue, err := instance.GetProperty("Control") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStatusSuccess) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStatusSuccess) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStopControlSuccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStopControlSuccess.go new file mode 100644 index 00000000..0351f7c3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetServiceStopControlSuccess.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetServiceStopControlSuccess struct +type MSFT_NetServiceStopControlSuccess struct { + *MSFT_SCMEventLogEvent + + // + Comment string + + // + Control string + + // + Reason string + + // + ReasonText string + + // + Service string + + // + sid string +} + +func NewMSFT_NetServiceStopControlSuccessEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetServiceStopControlSuccess, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStopControlSuccess{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetServiceStopControlSuccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetServiceStopControlSuccess, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetServiceStopControlSuccess{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetComment sets the value of Comment for the instance +func (instance *MSFT_NetServiceStopControlSuccess) SetPropertyComment(value string) (err error) { + return instance.SetProperty("Comment", (value)) +} + +// GetComment gets the value of Comment for the instance +func (instance *MSFT_NetServiceStopControlSuccess) GetPropertyComment() (value string, err error) { + retValue, err := instance.GetProperty("Comment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetControl sets the value of Control for the instance +func (instance *MSFT_NetServiceStopControlSuccess) SetPropertyControl(value string) (err error) { + return instance.SetProperty("Control", (value)) +} + +// GetControl gets the value of Control for the instance +func (instance *MSFT_NetServiceStopControlSuccess) GetPropertyControl() (value string, err error) { + retValue, err := instance.GetProperty("Control") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReason sets the value of Reason for the instance +func (instance *MSFT_NetServiceStopControlSuccess) SetPropertyReason(value string) (err error) { + return instance.SetProperty("Reason", (value)) +} + +// GetReason gets the value of Reason for the instance +func (instance *MSFT_NetServiceStopControlSuccess) GetPropertyReason() (value string, err error) { + retValue, err := instance.GetProperty("Reason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReasonText sets the value of ReasonText for the instance +func (instance *MSFT_NetServiceStopControlSuccess) SetPropertyReasonText(value string) (err error) { + return instance.SetProperty("ReasonText", (value)) +} + +// GetReasonText gets the value of ReasonText for the instance +func (instance *MSFT_NetServiceStopControlSuccess) GetPropertyReasonText() (value string, err error) { + retValue, err := instance.GetProperty("ReasonText") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetServiceStopControlSuccess) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetServiceStopControlSuccess) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setsid sets the value of sid for the instance +func (instance *MSFT_NetServiceStopControlSuccess) SetPropertysid(value string) (err error) { + return instance.SetProperty("sid", (value)) +} + +// Getsid gets the value of sid for the instance +func (instance *MSFT_NetServiceStopControlSuccess) GetPropertysid() (value string, err error) { + retValue, err := instance.GetProperty("sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetSevereServiceFailed.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetSevereServiceFailed.go new file mode 100644 index 00000000..6ed83e73 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetSevereServiceFailed.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetSevereServiceFailed struct +type MSFT_NetSevereServiceFailed struct { + *MSFT_SCMEventLogEvent + + // + Service string +} + +func NewMSFT_NetSevereServiceFailedEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetSevereServiceFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetSevereServiceFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetSevereServiceFailedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetSevereServiceFailed, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetSevereServiceFailed{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetSevereServiceFailed) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetSevereServiceFailed) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTakeOwnership.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTakeOwnership.go new file mode 100644 index 00000000..9b971cf9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTakeOwnership.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetTakeOwnership struct +type MSFT_NetTakeOwnership struct { + *MSFT_SCMEventLogEvent + + // + RegistryKey string +} + +func NewMSFT_NetTakeOwnershipEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetTakeOwnership, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetTakeOwnership{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetTakeOwnershipEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetTakeOwnership, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetTakeOwnership{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetRegistryKey sets the value of RegistryKey for the instance +func (instance *MSFT_NetTakeOwnership) SetPropertyRegistryKey(value string) (err error) { + return instance.SetProperty("RegistryKey", (value)) +} + +// GetRegistryKey gets the value of RegistryKey for the instance +func (instance *MSFT_NetTakeOwnership) GetPropertyRegistryKey() (value string, err error) { + retValue, err := instance.GetProperty("RegistryKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactInvalid.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactInvalid.go new file mode 100644 index 00000000..8faef6d5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactInvalid.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_NetTransactInvalid struct +type MSFT_NetTransactInvalid struct { + *MSFT_SCMEventLogEvent +} + +func NewMSFT_NetTransactInvalidEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetTransactInvalid, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetTransactInvalid{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetTransactInvalidEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetTransactInvalid, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetTransactInvalid{ + MSFT_SCMEventLogEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactTimeout.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactTimeout.go new file mode 100644 index 00000000..36e3ab03 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_NetTransactTimeout.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_NetTransactTimeout struct +type MSFT_NetTransactTimeout struct { + *MSFT_SCMEventLogEvent + + // + Milliseconds uint32 + + // + Service string +} + +func NewMSFT_NetTransactTimeoutEx1(instance *cim.WmiInstance) (newInstance *MSFT_NetTransactTimeout, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_NetTransactTimeout{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +func NewMSFT_NetTransactTimeoutEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_NetTransactTimeout, err error) { + tmp, err := NewMSFT_SCMEventLogEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_NetTransactTimeout{ + MSFT_SCMEventLogEvent: tmp, + } + return +} + +// SetMilliseconds sets the value of Milliseconds for the instance +func (instance *MSFT_NetTransactTimeout) SetPropertyMilliseconds(value uint32) (err error) { + return instance.SetProperty("Milliseconds", (value)) +} + +// GetMilliseconds gets the value of Milliseconds for the instance +func (instance *MSFT_NetTransactTimeout) GetPropertyMilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Milliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *MSFT_NetTransactTimeout) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *MSFT_NetTransactTimeout) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_PlatformIdentifier.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_PlatformIdentifier.go new file mode 100644 index 00000000..f4609e7b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_PlatformIdentifier.go @@ -0,0 +1,67 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_PlatformIdentifier struct +type MSFT_PlatformIdentifier struct { + *cim.WmiInstance +} + +func NewMSFT_PlatformIdentifierEx1(instance *cim.WmiInstance) (newInstance *MSFT_PlatformIdentifier, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_PlatformIdentifier{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_PlatformIdentifierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_PlatformIdentifier, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_PlatformIdentifier{ + WmiInstance: tmp, + } + return +} + +// + +// + +// +// +func (instance *MSFT_PlatformIdentifier) GetPlatformIdentifier( /* IN */ Name string, + /* OUT */ Identifier string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetPlatformIdentifier", Name) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEvent.go new file mode 100644 index 00000000..f08f434f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SCMEvent struct +type MSFT_SCMEvent struct { + *__ExtrinsicEvent +} + +func NewMSFT_SCMEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_SCMEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SCMEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewMSFT_SCMEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SCMEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SCMEvent{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEventLogEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEventLogEvent.go new file mode 100644 index 00000000..7549298a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_SCMEventLogEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SCMEventLogEvent struct +type MSFT_SCMEventLogEvent struct { + *MSFT_SCMEvent +} + +func NewMSFT_SCMEventLogEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_SCMEventLogEvent, err error) { + tmp, err := NewMSFT_SCMEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SCMEventLogEvent{ + MSFT_SCMEvent: tmp, + } + return +} + +func NewMSFT_SCMEventLogEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SCMEventLogEvent, err error) { + tmp, err := NewMSFT_SCMEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SCMEventLogEvent{ + MSFT_SCMEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WMI_GenericNonCOMEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WMI_GenericNonCOMEvent.go new file mode 100644 index 00000000..f1dddfb6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WMI_GenericNonCOMEvent.go @@ -0,0 +1,172 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WMI_GenericNonCOMEvent struct +type MSFT_WMI_GenericNonCOMEvent struct { + *__ExtrinsicEvent + + // + ProcessId uint32 + + // + PropertyNames []string + + // + PropertyValues []string + + // + ProviderName string +} + +func NewMSFT_WMI_GenericNonCOMEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WMI_GenericNonCOMEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WMI_GenericNonCOMEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewMSFT_WMI_GenericNonCOMEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WMI_GenericNonCOMEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WMI_GenericNonCOMEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +// SetProcessId sets the value of ProcessId for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) SetPropertyProcessId(value uint32) (err error) { + return instance.SetProperty("ProcessId", (value)) +} + +// GetProcessId gets the value of ProcessId for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) GetPropertyProcessId() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPropertyNames sets the value of PropertyNames for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) SetPropertyPropertyNames(value []string) (err error) { + return instance.SetProperty("PropertyNames", (value)) +} + +// GetPropertyNames gets the value of PropertyNames for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) GetPropertyPropertyNames() (value []string, err error) { + retValue, err := instance.GetProperty("PropertyNames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPropertyValues sets the value of PropertyValues for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) SetPropertyPropertyValues(value []string) (err error) { + return instance.SetProperty("PropertyValues", (value)) +} + +// GetPropertyValues gets the value of PropertyValues for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) GetPropertyPropertyValues() (value []string, err error) { + retValue, err := instance.GetProperty("PropertyValues") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *MSFT_WMI_GenericNonCOMEvent) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiCancelNotificationSink.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiCancelNotificationSink.go new file mode 100644 index 00000000..9ae693cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiCancelNotificationSink.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiCancelNotificationSink struct +type MSFT_WmiCancelNotificationSink struct { + *MSFT_WmiEssEvent + + // + Namespace string + + // + Query string + + // + QueryLanguage string + + // + Sink uint64 +} + +func NewMSFT_WmiCancelNotificationSinkEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiCancelNotificationSink, err error) { + tmp, err := NewMSFT_WmiEssEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiCancelNotificationSink{ + MSFT_WmiEssEvent: tmp, + } + return +} + +func NewMSFT_WmiCancelNotificationSinkEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiCancelNotificationSink, err error) { + tmp, err := NewMSFT_WmiEssEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiCancelNotificationSink{ + MSFT_WmiEssEvent: tmp, + } + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *MSFT_WmiCancelNotificationSink) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *MSFT_WmiCancelNotificationSink) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *MSFT_WmiCancelNotificationSink) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *MSFT_WmiCancelNotificationSink) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *MSFT_WmiCancelNotificationSink) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *MSFT_WmiCancelNotificationSink) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSink sets the value of Sink for the instance +func (instance *MSFT_WmiCancelNotificationSink) SetPropertySink(value uint64) (err error) { + return instance.SetProperty("Sink", (value)) +} + +// GetSink gets the value of Sink for the instance +func (instance *MSFT_WmiCancelNotificationSink) GetPropertySink() (value uint64, err error) { + retValue, err := instance.GetProperty("Sink") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderEvent.go new file mode 100644 index 00000000..618d099d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiConsumerProviderEvent struct +type MSFT_WmiConsumerProviderEvent struct { + *MSFT_WmiProviderEvent + + // + Machine string +} + +func NewMSFT_WmiConsumerProviderEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiConsumerProviderEvent, err error) { + tmp, err := NewMSFT_WmiProviderEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderEvent{ + MSFT_WmiProviderEvent: tmp, + } + return +} + +func NewMSFT_WmiConsumerProviderEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiConsumerProviderEvent, err error) { + tmp, err := NewMSFT_WmiProviderEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderEvent{ + MSFT_WmiProviderEvent: tmp, + } + return +} + +// SetMachine sets the value of Machine for the instance +func (instance *MSFT_WmiConsumerProviderEvent) SetPropertyMachine(value string) (err error) { + return instance.SetProperty("Machine", (value)) +} + +// GetMachine gets the value of Machine for the instance +func (instance *MSFT_WmiConsumerProviderEvent) GetPropertyMachine() (value string, err error) { + retValue, err := instance.GetProperty("Machine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderLoaded.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderLoaded.go new file mode 100644 index 00000000..608e96b3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderLoaded.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiConsumerProviderLoaded struct +type MSFT_WmiConsumerProviderLoaded struct { + *MSFT_WmiConsumerProviderEvent +} + +func NewMSFT_WmiConsumerProviderLoadedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiConsumerProviderLoaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderLoaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} + +func NewMSFT_WmiConsumerProviderLoadedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiConsumerProviderLoaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderLoaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkLoaded.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkLoaded.go new file mode 100644 index 00000000..2a7bdc25 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkLoaded.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiConsumerProviderSinkLoaded struct +type MSFT_WmiConsumerProviderSinkLoaded struct { + *MSFT_WmiConsumerProviderEvent + + // + Consumer __EventConsumer +} + +func NewMSFT_WmiConsumerProviderSinkLoadedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiConsumerProviderSinkLoaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderSinkLoaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} + +func NewMSFT_WmiConsumerProviderSinkLoadedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiConsumerProviderSinkLoaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderSinkLoaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} + +// SetConsumer sets the value of Consumer for the instance +func (instance *MSFT_WmiConsumerProviderSinkLoaded) SetPropertyConsumer(value __EventConsumer) (err error) { + return instance.SetProperty("Consumer", (value)) +} + +// GetConsumer gets the value of Consumer for the instance +func (instance *MSFT_WmiConsumerProviderSinkLoaded) GetPropertyConsumer() (value __EventConsumer, err error) { + retValue, err := instance.GetProperty("Consumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventConsumer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventConsumer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventConsumer(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkUnloaded.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkUnloaded.go new file mode 100644 index 00000000..2a47a131 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderSinkUnloaded.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiConsumerProviderSinkUnloaded struct +type MSFT_WmiConsumerProviderSinkUnloaded struct { + *MSFT_WmiConsumerProviderEvent + + // + Consumer __EventConsumer +} + +func NewMSFT_WmiConsumerProviderSinkUnloadedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiConsumerProviderSinkUnloaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderSinkUnloaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} + +func NewMSFT_WmiConsumerProviderSinkUnloadedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiConsumerProviderSinkUnloaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderSinkUnloaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} + +// SetConsumer sets the value of Consumer for the instance +func (instance *MSFT_WmiConsumerProviderSinkUnloaded) SetPropertyConsumer(value __EventConsumer) (err error) { + return instance.SetProperty("Consumer", (value)) +} + +// GetConsumer gets the value of Consumer for the instance +func (instance *MSFT_WmiConsumerProviderSinkUnloaded) GetPropertyConsumer() (value __EventConsumer, err error) { + retValue, err := instance.GetProperty("Consumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventConsumer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventConsumer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventConsumer(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderUnloaded.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderUnloaded.go new file mode 100644 index 00000000..dd91c65b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiConsumerProviderUnloaded.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiConsumerProviderUnloaded struct +type MSFT_WmiConsumerProviderUnloaded struct { + *MSFT_WmiConsumerProviderEvent +} + +func NewMSFT_WmiConsumerProviderUnloadedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiConsumerProviderUnloaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderUnloaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} + +func NewMSFT_WmiConsumerProviderUnloadedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiConsumerProviderUnloaded, err error) { + tmp, err := NewMSFT_WmiConsumerProviderEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiConsumerProviderUnloaded{ + MSFT_WmiConsumerProviderEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiError.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiError.go new file mode 100644 index 00000000..fae251c4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiError.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiError struct +type MSFT_WmiError struct { + *CIM_Error + + // Error Category. + error_Category uint16 + + // Error code. + error_Code uint32 + + // Error Type. + error_Type string + + // Windows error message. + error_WindowsErrorMessage string +} + +func NewMSFT_WmiErrorEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiError, err error) { + tmp, err := NewCIM_ErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiError{ + CIM_Error: tmp, + } + return +} + +func NewMSFT_WmiErrorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiError, err error) { + tmp, err := NewCIM_ErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiError{ + CIM_Error: tmp, + } + return +} + +// Seterror_Category sets the value of error_Category for the instance +func (instance *MSFT_WmiError) SetPropertyerror_Category(value uint16) (err error) { + return instance.SetProperty("error_Category", (value)) +} + +// Geterror_Category gets the value of error_Category for the instance +func (instance *MSFT_WmiError) GetPropertyerror_Category() (value uint16, err error) { + retValue, err := instance.GetProperty("error_Category") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// Seterror_Code sets the value of error_Code for the instance +func (instance *MSFT_WmiError) SetPropertyerror_Code(value uint32) (err error) { + return instance.SetProperty("error_Code", (value)) +} + +// Geterror_Code gets the value of error_Code for the instance +func (instance *MSFT_WmiError) GetPropertyerror_Code() (value uint32, err error) { + retValue, err := instance.GetProperty("error_Code") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// Seterror_Type sets the value of error_Type for the instance +func (instance *MSFT_WmiError) SetPropertyerror_Type(value string) (err error) { + return instance.SetProperty("error_Type", (value)) +} + +// Geterror_Type gets the value of error_Type for the instance +func (instance *MSFT_WmiError) GetPropertyerror_Type() (value string, err error) { + retValue, err := instance.GetProperty("error_Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Seterror_WindowsErrorMessage sets the value of error_WindowsErrorMessage for the instance +func (instance *MSFT_WmiError) SetPropertyerror_WindowsErrorMessage(value string) (err error) { + return instance.SetProperty("error_WindowsErrorMessage", (value)) +} + +// Geterror_WindowsErrorMessage gets the value of error_WindowsErrorMessage for the instance +func (instance *MSFT_WmiError) GetPropertyerror_WindowsErrorMessage() (value string, err error) { + retValue, err := instance.GetProperty("error_WindowsErrorMessage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiEssEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiEssEvent.go new file mode 100644 index 00000000..a56f4f9c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiEssEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiEssEvent struct +type MSFT_WmiEssEvent struct { + *MSFT_WmiSelfEvent +} + +func NewMSFT_WmiEssEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiEssEvent, err error) { + tmp, err := NewMSFT_WmiSelfEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiEssEvent{ + MSFT_WmiSelfEvent: tmp, + } + return +} + +func NewMSFT_WmiEssEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiEssEvent, err error) { + tmp, err := NewMSFT_WmiSelfEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiEssEvent{ + MSFT_WmiSelfEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterActivated.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterActivated.go new file mode 100644 index 00000000..9733dca9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterActivated.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiFilterActivated struct +type MSFT_WmiFilterActivated struct { + *MSFT_WmiFilterEvent +} + +func NewMSFT_WmiFilterActivatedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiFilterActivated, err error) { + tmp, err := NewMSFT_WmiFilterEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiFilterActivated{ + MSFT_WmiFilterEvent: tmp, + } + return +} + +func NewMSFT_WmiFilterActivatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiFilterActivated, err error) { + tmp, err := NewMSFT_WmiFilterEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiFilterActivated{ + MSFT_WmiFilterEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterDeactivated.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterDeactivated.go new file mode 100644 index 00000000..9e3e22ad --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterDeactivated.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiFilterDeactivated struct +type MSFT_WmiFilterDeactivated struct { + *MSFT_WmiFilterEvent +} + +func NewMSFT_WmiFilterDeactivatedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiFilterDeactivated, err error) { + tmp, err := NewMSFT_WmiFilterEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiFilterDeactivated{ + MSFT_WmiFilterEvent: tmp, + } + return +} + +func NewMSFT_WmiFilterDeactivatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiFilterDeactivated, err error) { + tmp, err := NewMSFT_WmiFilterEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiFilterDeactivated{ + MSFT_WmiFilterEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterEvent.go new file mode 100644 index 00000000..8981cd9f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiFilterEvent.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiFilterEvent struct +type MSFT_WmiFilterEvent struct { + *MSFT_WmiEssEvent + + // + Name string + + // + Namespace string + + // + Query string + + // + QueryLanguage string +} + +func NewMSFT_WmiFilterEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiFilterEvent, err error) { + tmp, err := NewMSFT_WmiEssEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiFilterEvent{ + MSFT_WmiEssEvent: tmp, + } + return +} + +func NewMSFT_WmiFilterEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiFilterEvent, err error) { + tmp, err := NewMSFT_WmiEssEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiFilterEvent{ + MSFT_WmiEssEvent: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_WmiFilterEvent) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_WmiFilterEvent) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *MSFT_WmiFilterEvent) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *MSFT_WmiFilterEvent) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *MSFT_WmiFilterEvent) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *MSFT_WmiFilterEvent) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *MSFT_WmiFilterEvent) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *MSFT_WmiFilterEvent) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiProviderEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiProviderEvent.go new file mode 100644 index 00000000..66ccc564 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiProviderEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiProviderEvent struct +type MSFT_WmiProviderEvent struct { + *MSFT_WmiEssEvent + + // + Namespace string + + // + ProviderName string +} + +func NewMSFT_WmiProviderEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiProviderEvent, err error) { + tmp, err := NewMSFT_WmiEssEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiProviderEvent{ + MSFT_WmiEssEvent: tmp, + } + return +} + +func NewMSFT_WmiProviderEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiProviderEvent, err error) { + tmp, err := NewMSFT_WmiEssEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiProviderEvent{ + MSFT_WmiEssEvent: tmp, + } + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *MSFT_WmiProviderEvent) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *MSFT_WmiProviderEvent) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *MSFT_WmiProviderEvent) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *MSFT_WmiProviderEvent) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiRegisterNotificationSink.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiRegisterNotificationSink.go new file mode 100644 index 00000000..3b695d2b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiRegisterNotificationSink.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiRegisterNotificationSink struct +type MSFT_WmiRegisterNotificationSink struct { + *MSFT_WmiEssEvent + + // + Namespace string + + // + Query string + + // + QueryLanguage string + + // + Sink uint64 +} + +func NewMSFT_WmiRegisterNotificationSinkEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiRegisterNotificationSink, err error) { + tmp, err := NewMSFT_WmiEssEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiRegisterNotificationSink{ + MSFT_WmiEssEvent: tmp, + } + return +} + +func NewMSFT_WmiRegisterNotificationSinkEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiRegisterNotificationSink, err error) { + tmp, err := NewMSFT_WmiEssEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiRegisterNotificationSink{ + MSFT_WmiEssEvent: tmp, + } + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *MSFT_WmiRegisterNotificationSink) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *MSFT_WmiRegisterNotificationSink) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *MSFT_WmiRegisterNotificationSink) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *MSFT_WmiRegisterNotificationSink) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *MSFT_WmiRegisterNotificationSink) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *MSFT_WmiRegisterNotificationSink) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSink sets the value of Sink for the instance +func (instance *MSFT_WmiRegisterNotificationSink) SetPropertySink(value uint64) (err error) { + return instance.SetProperty("Sink", (value)) +} + +// GetSink gets the value of Sink for the instance +func (instance *MSFT_WmiRegisterNotificationSink) GetPropertySink() (value uint64, err error) { + retValue, err := instance.GetProperty("Sink") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiSelfEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiSelfEvent.go new file mode 100644 index 00000000..81d83217 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiSelfEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiSelfEvent struct +type MSFT_WmiSelfEvent struct { + *__ExtrinsicEvent +} + +func NewMSFT_WmiSelfEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiSelfEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiSelfEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewMSFT_WmiSelfEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiSelfEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiSelfEvent{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolEvent.go new file mode 100644 index 00000000..de7c0346 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiThreadPoolEvent struct +type MSFT_WmiThreadPoolEvent struct { + *MSFT_WmiEssEvent + + // + ThreadId uint32 +} + +func NewMSFT_WmiThreadPoolEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiThreadPoolEvent, err error) { + tmp, err := NewMSFT_WmiEssEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiThreadPoolEvent{ + MSFT_WmiEssEvent: tmp, + } + return +} + +func NewMSFT_WmiThreadPoolEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiThreadPoolEvent, err error) { + tmp, err := NewMSFT_WmiEssEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiThreadPoolEvent{ + MSFT_WmiEssEvent: tmp, + } + return +} + +// SetThreadId sets the value of ThreadId for the instance +func (instance *MSFT_WmiThreadPoolEvent) SetPropertyThreadId(value uint32) (err error) { + return instance.SetProperty("ThreadId", (value)) +} + +// GetThreadId gets the value of ThreadId for the instance +func (instance *MSFT_WmiThreadPoolEvent) GetPropertyThreadId() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadCreated.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadCreated.go new file mode 100644 index 00000000..a9d1ef32 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadCreated.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiThreadPoolThreadCreated struct +type MSFT_WmiThreadPoolThreadCreated struct { + *MSFT_WmiThreadPoolEvent +} + +func NewMSFT_WmiThreadPoolThreadCreatedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiThreadPoolThreadCreated, err error) { + tmp, err := NewMSFT_WmiThreadPoolEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiThreadPoolThreadCreated{ + MSFT_WmiThreadPoolEvent: tmp, + } + return +} + +func NewMSFT_WmiThreadPoolThreadCreatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiThreadPoolThreadCreated, err error) { + tmp, err := NewMSFT_WmiThreadPoolEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiThreadPoolThreadCreated{ + MSFT_WmiThreadPoolEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadDeleted.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadDeleted.go new file mode 100644 index 00000000..9abeb565 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MSFT_WmiThreadPoolThreadDeleted.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_WmiThreadPoolThreadDeleted struct +type MSFT_WmiThreadPoolThreadDeleted struct { + *MSFT_WmiThreadPoolEvent +} + +func NewMSFT_WmiThreadPoolThreadDeletedEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiThreadPoolThreadDeleted, err error) { + tmp, err := NewMSFT_WmiThreadPoolEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiThreadPoolThreadDeleted{ + MSFT_WmiThreadPoolEvent: tmp, + } + return +} + +func NewMSFT_WmiThreadPoolThreadDeletedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiThreadPoolThreadDeleted, err error) { + tmp, err := NewMSFT_WmiThreadPoolEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiThreadPoolThreadDeleted{ + MSFT_WmiThreadPoolEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodInvocationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodInvocationEvent.go new file mode 100644 index 00000000..c948eaa9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodInvocationEvent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __MethodInvocationEvent struct +type __MethodInvocationEvent struct { + *__InstanceOperationEvent + + // + Method string + + // + Parameters interface{} + + // + PreCall bool +} + +func New__MethodInvocationEventEx1(instance *cim.WmiInstance) (newInstance *__MethodInvocationEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__MethodInvocationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__MethodInvocationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__MethodInvocationEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__MethodInvocationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +// SetMethod sets the value of Method for the instance +func (instance *__MethodInvocationEvent) SetPropertyMethod(value string) (err error) { + return instance.SetProperty("Method", (value)) +} + +// GetMethod gets the value of Method for the instance +func (instance *__MethodInvocationEvent) GetPropertyMethod() (value string, err error) { + retValue, err := instance.GetProperty("Method") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParameters sets the value of Parameters for the instance +func (instance *__MethodInvocationEvent) SetPropertyParameters(value interface{}) (err error) { + return instance.SetProperty("Parameters", (value)) +} + +// GetParameters gets the value of Parameters for the instance +func (instance *__MethodInvocationEvent) GetPropertyParameters() (value interface{}, err error) { + retValue, err := instance.GetProperty("Parameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetPreCall sets the value of PreCall for the instance +func (instance *__MethodInvocationEvent) SetPropertyPreCall(value bool) (err error) { + return instance.SetProperty("PreCall", (value)) +} + +// GetPreCall gets the value of PreCall for the instance +func (instance *__MethodInvocationEvent) GetPropertyPreCall() (value bool, err error) { + retValue, err := instance.GetProperty("PreCall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodProviderRegistration.go new file mode 100644 index 00000000..93702b82 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/MethodProviderRegistration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __MethodProviderRegistration struct +type __MethodProviderRegistration struct { + *__ProviderRegistration +} + +func New__MethodProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__MethodProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__MethodProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__MethodProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__MethodProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__MethodProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_Providers.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_Providers.go new file mode 100644 index 00000000..8137fda5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_Providers.go @@ -0,0 +1,1073 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_Providers struct +type Msft_Providers struct { + *cim.WmiInstance + + // + HostingGroup string + + // + HostingSpecification uint32 + + // + HostProcessIdentifier uint32 + + // + Locale string + + // + Namespace string + + // + provider string + + // + ProviderOperation_AccessCheck uint64 + + // + ProviderOperation_CancelQuery uint64 + + // + ProviderOperation_CreateClassEnumAsync uint64 + + // + ProviderOperation_CreateInstanceEnumAsync uint64 + + // + ProviderOperation_CreateRefreshableEnum uint64 + + // + ProviderOperation_CreateRefreshableObject uint64 + + // + ProviderOperation_CreateRefresher uint64 + + // + ProviderOperation_DeleteClassAsync uint64 + + // + ProviderOperation_DeleteInstanceAsync uint64 + + // + ProviderOperation_ExecMethodAsync uint64 + + // + ProviderOperation_ExecQueryAsync uint64 + + // + ProviderOperation_FindConsumer uint64 + + // + ProviderOperation_GetObjectAsync uint64 + + // + ProviderOperation_GetObjects uint64 + + // + ProviderOperation_GetProperty uint64 + + // + ProviderOperation_NewQuery uint64 + + // + ProviderOperation_ProvideEvents uint64 + + // + ProviderOperation_PutClassAsync uint64 + + // + ProviderOperation_PutInstanceAsync uint64 + + // + ProviderOperation_PutProperty uint64 + + // + ProviderOperation_QueryInstances uint64 + + // + ProviderOperation_SetRegistrationObject uint64 + + // + ProviderOperation_StopRefreshing uint64 + + // + ProviderOperation_ValidateSubscription uint64 + + // + TransactionIdentifier string + + // + User string +} + +func NewMsft_ProvidersEx1(instance *cim.WmiInstance) (newInstance *Msft_Providers, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Msft_Providers{ + WmiInstance: tmp, + } + return +} + +func NewMsft_ProvidersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_Providers, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_Providers{ + WmiInstance: tmp, + } + return +} + +// SetHostingGroup sets the value of HostingGroup for the instance +func (instance *Msft_Providers) SetPropertyHostingGroup(value string) (err error) { + return instance.SetProperty("HostingGroup", (value)) +} + +// GetHostingGroup gets the value of HostingGroup for the instance +func (instance *Msft_Providers) GetPropertyHostingGroup() (value string, err error) { + retValue, err := instance.GetProperty("HostingGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHostingSpecification sets the value of HostingSpecification for the instance +func (instance *Msft_Providers) SetPropertyHostingSpecification(value uint32) (err error) { + return instance.SetProperty("HostingSpecification", (value)) +} + +// GetHostingSpecification gets the value of HostingSpecification for the instance +func (instance *Msft_Providers) GetPropertyHostingSpecification() (value uint32, err error) { + retValue, err := instance.GetProperty("HostingSpecification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostProcessIdentifier sets the value of HostProcessIdentifier for the instance +func (instance *Msft_Providers) SetPropertyHostProcessIdentifier(value uint32) (err error) { + return instance.SetProperty("HostProcessIdentifier", (value)) +} + +// GetHostProcessIdentifier gets the value of HostProcessIdentifier for the instance +func (instance *Msft_Providers) GetPropertyHostProcessIdentifier() (value uint32, err error) { + retValue, err := instance.GetProperty("HostProcessIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocale sets the value of Locale for the instance +func (instance *Msft_Providers) SetPropertyLocale(value string) (err error) { + return instance.SetProperty("Locale", (value)) +} + +// GetLocale gets the value of Locale for the instance +func (instance *Msft_Providers) GetPropertyLocale() (value string, err error) { + retValue, err := instance.GetProperty("Locale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *Msft_Providers) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *Msft_Providers) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setprovider sets the value of provider for the instance +func (instance *Msft_Providers) SetPropertyprovider(value string) (err error) { + return instance.SetProperty("provider", (value)) +} + +// Getprovider gets the value of provider for the instance +func (instance *Msft_Providers) GetPropertyprovider() (value string, err error) { + retValue, err := instance.GetProperty("provider") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProviderOperation_AccessCheck sets the value of ProviderOperation_AccessCheck for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_AccessCheck(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_AccessCheck", (value)) +} + +// GetProviderOperation_AccessCheck gets the value of ProviderOperation_AccessCheck for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_AccessCheck() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_AccessCheck") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CancelQuery sets the value of ProviderOperation_CancelQuery for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_CancelQuery(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CancelQuery", (value)) +} + +// GetProviderOperation_CancelQuery gets the value of ProviderOperation_CancelQuery for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_CancelQuery() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CancelQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateClassEnumAsync sets the value of ProviderOperation_CreateClassEnumAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_CreateClassEnumAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateClassEnumAsync", (value)) +} + +// GetProviderOperation_CreateClassEnumAsync gets the value of ProviderOperation_CreateClassEnumAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_CreateClassEnumAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateClassEnumAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateInstanceEnumAsync sets the value of ProviderOperation_CreateInstanceEnumAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_CreateInstanceEnumAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateInstanceEnumAsync", (value)) +} + +// GetProviderOperation_CreateInstanceEnumAsync gets the value of ProviderOperation_CreateInstanceEnumAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_CreateInstanceEnumAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateInstanceEnumAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateRefreshableEnum sets the value of ProviderOperation_CreateRefreshableEnum for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_CreateRefreshableEnum(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateRefreshableEnum", (value)) +} + +// GetProviderOperation_CreateRefreshableEnum gets the value of ProviderOperation_CreateRefreshableEnum for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_CreateRefreshableEnum() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateRefreshableEnum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateRefreshableObject sets the value of ProviderOperation_CreateRefreshableObject for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_CreateRefreshableObject(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateRefreshableObject", (value)) +} + +// GetProviderOperation_CreateRefreshableObject gets the value of ProviderOperation_CreateRefreshableObject for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_CreateRefreshableObject() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateRefreshableObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateRefresher sets the value of ProviderOperation_CreateRefresher for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_CreateRefresher(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateRefresher", (value)) +} + +// GetProviderOperation_CreateRefresher gets the value of ProviderOperation_CreateRefresher for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_CreateRefresher() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateRefresher") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_DeleteClassAsync sets the value of ProviderOperation_DeleteClassAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_DeleteClassAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_DeleteClassAsync", (value)) +} + +// GetProviderOperation_DeleteClassAsync gets the value of ProviderOperation_DeleteClassAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_DeleteClassAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_DeleteClassAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_DeleteInstanceAsync sets the value of ProviderOperation_DeleteInstanceAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_DeleteInstanceAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_DeleteInstanceAsync", (value)) +} + +// GetProviderOperation_DeleteInstanceAsync gets the value of ProviderOperation_DeleteInstanceAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_DeleteInstanceAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_DeleteInstanceAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ExecMethodAsync sets the value of ProviderOperation_ExecMethodAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_ExecMethodAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ExecMethodAsync", (value)) +} + +// GetProviderOperation_ExecMethodAsync gets the value of ProviderOperation_ExecMethodAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_ExecMethodAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ExecMethodAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ExecQueryAsync sets the value of ProviderOperation_ExecQueryAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_ExecQueryAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ExecQueryAsync", (value)) +} + +// GetProviderOperation_ExecQueryAsync gets the value of ProviderOperation_ExecQueryAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_ExecQueryAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ExecQueryAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_FindConsumer sets the value of ProviderOperation_FindConsumer for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_FindConsumer(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_FindConsumer", (value)) +} + +// GetProviderOperation_FindConsumer gets the value of ProviderOperation_FindConsumer for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_FindConsumer() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_FindConsumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_GetObjectAsync sets the value of ProviderOperation_GetObjectAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_GetObjectAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_GetObjectAsync", (value)) +} + +// GetProviderOperation_GetObjectAsync gets the value of ProviderOperation_GetObjectAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_GetObjectAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_GetObjectAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_GetObjects sets the value of ProviderOperation_GetObjects for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_GetObjects(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_GetObjects", (value)) +} + +// GetProviderOperation_GetObjects gets the value of ProviderOperation_GetObjects for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_GetObjects() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_GetObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_GetProperty sets the value of ProviderOperation_GetProperty for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_GetProperty(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_GetProperty", (value)) +} + +// GetProviderOperation_GetProperty gets the value of ProviderOperation_GetProperty for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_GetProperty() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_GetProperty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_NewQuery sets the value of ProviderOperation_NewQuery for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_NewQuery(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_NewQuery", (value)) +} + +// GetProviderOperation_NewQuery gets the value of ProviderOperation_NewQuery for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_NewQuery() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_NewQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ProvideEvents sets the value of ProviderOperation_ProvideEvents for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_ProvideEvents(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ProvideEvents", (value)) +} + +// GetProviderOperation_ProvideEvents gets the value of ProviderOperation_ProvideEvents for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_ProvideEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ProvideEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_PutClassAsync sets the value of ProviderOperation_PutClassAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_PutClassAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_PutClassAsync", (value)) +} + +// GetProviderOperation_PutClassAsync gets the value of ProviderOperation_PutClassAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_PutClassAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_PutClassAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_PutInstanceAsync sets the value of ProviderOperation_PutInstanceAsync for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_PutInstanceAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_PutInstanceAsync", (value)) +} + +// GetProviderOperation_PutInstanceAsync gets the value of ProviderOperation_PutInstanceAsync for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_PutInstanceAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_PutInstanceAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_PutProperty sets the value of ProviderOperation_PutProperty for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_PutProperty(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_PutProperty", (value)) +} + +// GetProviderOperation_PutProperty gets the value of ProviderOperation_PutProperty for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_PutProperty() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_PutProperty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_QueryInstances sets the value of ProviderOperation_QueryInstances for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_QueryInstances(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_QueryInstances", (value)) +} + +// GetProviderOperation_QueryInstances gets the value of ProviderOperation_QueryInstances for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_QueryInstances() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_QueryInstances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_SetRegistrationObject sets the value of ProviderOperation_SetRegistrationObject for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_SetRegistrationObject(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_SetRegistrationObject", (value)) +} + +// GetProviderOperation_SetRegistrationObject gets the value of ProviderOperation_SetRegistrationObject for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_SetRegistrationObject() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_SetRegistrationObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_StopRefreshing sets the value of ProviderOperation_StopRefreshing for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_StopRefreshing(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_StopRefreshing", (value)) +} + +// GetProviderOperation_StopRefreshing gets the value of ProviderOperation_StopRefreshing for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_StopRefreshing() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_StopRefreshing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ValidateSubscription sets the value of ProviderOperation_ValidateSubscription for the instance +func (instance *Msft_Providers) SetPropertyProviderOperation_ValidateSubscription(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ValidateSubscription", (value)) +} + +// GetProviderOperation_ValidateSubscription gets the value of ProviderOperation_ValidateSubscription for the instance +func (instance *Msft_Providers) GetPropertyProviderOperation_ValidateSubscription() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ValidateSubscription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransactionIdentifier sets the value of TransactionIdentifier for the instance +func (instance *Msft_Providers) SetPropertyTransactionIdentifier(value string) (err error) { + return instance.SetProperty("TransactionIdentifier", (value)) +} + +// GetTransactionIdentifier gets the value of TransactionIdentifier for the instance +func (instance *Msft_Providers) GetPropertyTransactionIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("TransactionIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Msft_Providers) SetPropertyUser(value string) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Msft_Providers) GetPropertyUser() (value string, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *Msft_Providers) Suspend() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Suspend") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Msft_Providers) Resume() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Resume") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Msft_Providers) UnLoad() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("UnLoad") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// + +// +func (instance *Msft_Providers) Load( /* IN */ Namespace string, + /* IN */ User string, + /* IN */ Locale string, + /* IN */ provider string, + /* IN */ TransactionIdentifier string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Load", Namespace, User, Locale, provider, TransactionIdentifier) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Post.go new file mode 100644 index 00000000..92554c64 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Post.go @@ -0,0 +1,171 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_AccessCheck_Post struct +type Msft_WmiProvider_AccessCheck_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Query string + + // + QueryLanguage string + + // + Result uint32 + + // + Sid []uint8 +} + +func NewMsft_WmiProvider_AccessCheck_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_AccessCheck_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_AccessCheck_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_AccessCheck_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_AccessCheck_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_AccessCheck_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetQuery sets the value of Query for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResult sets the value of Result for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) SetPropertyResult(value uint32) (err error) { + return instance.SetProperty("Result", (value)) +} + +// GetResult gets the value of Result for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) GetPropertyResult() (value uint32, err error) { + retValue, err := instance.GetProperty("Result") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSid sets the value of Sid for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) SetPropertySid(value []uint8) (err error) { + return instance.SetProperty("Sid", (value)) +} + +// GetSid gets the value of Sid for the instance +func (instance *Msft_WmiProvider_AccessCheck_Post) GetPropertySid() (value []uint8, err error) { + retValue, err := instance.GetProperty("Sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Pre.go new file mode 100644 index 00000000..bb82d328 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_AccessCheck_Pre.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_AccessCheck_Pre struct +type Msft_WmiProvider_AccessCheck_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Query string + + // + QueryLanguage string + + // + Sid []uint8 +} + +func NewMsft_WmiProvider_AccessCheck_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_AccessCheck_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_AccessCheck_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_AccessCheck_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_AccessCheck_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_AccessCheck_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetQuery sets the value of Query for the instance +func (instance *Msft_WmiProvider_AccessCheck_Pre) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *Msft_WmiProvider_AccessCheck_Pre) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_AccessCheck_Pre) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_AccessCheck_Pre) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSid sets the value of Sid for the instance +func (instance *Msft_WmiProvider_AccessCheck_Pre) SetPropertySid(value []uint8) (err error) { + return instance.SetProperty("Sid", (value)) +} + +// GetSid gets the value of Sid for the instance +func (instance *Msft_WmiProvider_AccessCheck_Pre) GetPropertySid() (value []uint8, err error) { + retValue, err := instance.GetProperty("Sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Post.go new file mode 100644 index 00000000..172b7265 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Post.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_CancelQuery_Post struct +type Msft_WmiProvider_CancelQuery_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + QueryId uint32 + + // + Result uint32 +} + +func NewMsft_WmiProvider_CancelQuery_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_CancelQuery_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CancelQuery_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_CancelQuery_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_CancelQuery_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CancelQuery_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetQueryId sets the value of QueryId for the instance +func (instance *Msft_WmiProvider_CancelQuery_Post) SetPropertyQueryId(value uint32) (err error) { + return instance.SetProperty("QueryId", (value)) +} + +// GetQueryId gets the value of QueryId for the instance +func (instance *Msft_WmiProvider_CancelQuery_Post) GetPropertyQueryId() (value uint32, err error) { + retValue, err := instance.GetProperty("QueryId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResult sets the value of Result for the instance +func (instance *Msft_WmiProvider_CancelQuery_Post) SetPropertyResult(value uint32) (err error) { + return instance.SetProperty("Result", (value)) +} + +// GetResult gets the value of Result for the instance +func (instance *Msft_WmiProvider_CancelQuery_Post) GetPropertyResult() (value uint32, err error) { + retValue, err := instance.GetProperty("Result") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Pre.go new file mode 100644 index 00000000..ee4de8f4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CancelQuery_Pre.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_CancelQuery_Pre struct +type Msft_WmiProvider_CancelQuery_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + QueryId uint32 +} + +func NewMsft_WmiProvider_CancelQuery_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_CancelQuery_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CancelQuery_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_CancelQuery_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_CancelQuery_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CancelQuery_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetQueryId sets the value of QueryId for the instance +func (instance *Msft_WmiProvider_CancelQuery_Pre) SetPropertyQueryId(value uint32) (err error) { + return instance.SetProperty("QueryId", (value)) +} + +// GetQueryId gets the value of QueryId for the instance +func (instance *Msft_WmiProvider_CancelQuery_Pre) GetPropertyQueryId() (value uint32, err error) { + retValue, err := instance.GetProperty("QueryId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationEvent.go new file mode 100644 index 00000000..d581e343 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationEvent.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ComServerLoadOperationEvent struct +type Msft_WmiProvider_ComServerLoadOperationEvent struct { + *Msft_WmiProvider_OperationEvent + + // + Clsid string + + // + InProcServer bool + + // + InProcServerPath string + + // + LocalServer bool + + // + LocalServerPath string + + // + ServerName string +} + +func NewMsft_WmiProvider_ComServerLoadOperationEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ComServerLoadOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ComServerLoadOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_ComServerLoadOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ComServerLoadOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ComServerLoadOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +// SetClsid sets the value of Clsid for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) SetPropertyClsid(value string) (err error) { + return instance.SetProperty("Clsid", (value)) +} + +// GetClsid gets the value of Clsid for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) GetPropertyClsid() (value string, err error) { + retValue, err := instance.GetProperty("Clsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInProcServer sets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) SetPropertyInProcServer(value bool) (err error) { + return instance.SetProperty("InProcServer", (value)) +} + +// GetInProcServer gets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) GetPropertyInProcServer() (value bool, err error) { + retValue, err := instance.GetProperty("InProcServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInProcServerPath sets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) SetPropertyInProcServerPath(value string) (err error) { + return instance.SetProperty("InProcServerPath", (value)) +} + +// GetInProcServerPath gets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) GetPropertyInProcServerPath() (value string, err error) { + retValue, err := instance.GetProperty("InProcServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalServer sets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) SetPropertyLocalServer(value bool) (err error) { + return instance.SetProperty("LocalServer", (value)) +} + +// GetLocalServer gets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) GetPropertyLocalServer() (value bool, err error) { + retValue, err := instance.GetProperty("LocalServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalServerPath sets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) SetPropertyLocalServerPath(value string) (err error) { + return instance.SetProperty("LocalServerPath", (value)) +} + +// GetLocalServerPath gets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) GetPropertyLocalServerPath() (value string, err error) { + retValue, err := instance.GetProperty("LocalServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationEvent) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationFailureEvent.go new file mode 100644 index 00000000..b6d149f9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ComServerLoadOperationFailureEvent.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ComServerLoadOperationFailureEvent struct +type Msft_WmiProvider_ComServerLoadOperationFailureEvent struct { + *Msft_WmiProvider_OperationEvent + + // + Clsid string + + // + InProcServer bool + + // + InProcServerPath string + + // + LocalServer bool + + // + LocalServerPath string + + // + ResultCode uint32 + + // + ServerName string +} + +func NewMsft_WmiProvider_ComServerLoadOperationFailureEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ComServerLoadOperationFailureEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ComServerLoadOperationFailureEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_ComServerLoadOperationFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ComServerLoadOperationFailureEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ComServerLoadOperationFailureEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +// SetClsid sets the value of Clsid for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyClsid(value string) (err error) { + return instance.SetProperty("Clsid", (value)) +} + +// GetClsid gets the value of Clsid for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyClsid() (value string, err error) { + retValue, err := instance.GetProperty("Clsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInProcServer sets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyInProcServer(value bool) (err error) { + return instance.SetProperty("InProcServer", (value)) +} + +// GetInProcServer gets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyInProcServer() (value bool, err error) { + retValue, err := instance.GetProperty("InProcServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInProcServerPath sets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyInProcServerPath(value string) (err error) { + return instance.SetProperty("InProcServerPath", (value)) +} + +// GetInProcServerPath gets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyInProcServerPath() (value string, err error) { + retValue, err := instance.GetProperty("InProcServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalServer sets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyLocalServer(value bool) (err error) { + return instance.SetProperty("LocalServer", (value)) +} + +// GetLocalServer gets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyLocalServer() (value bool, err error) { + retValue, err := instance.GetProperty("LocalServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalServerPath sets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyLocalServerPath(value string) (err error) { + return instance.SetProperty("LocalServerPath", (value)) +} + +// GetLocalServerPath gets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyLocalServerPath() (value string, err error) { + retValue, err := instance.GetProperty("LocalServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Msft_WmiProvider_ComServerLoadOperationFailureEvent) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_Counters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_Counters.go new file mode 100644 index 00000000..17995582 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_Counters.go @@ -0,0 +1,771 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_Counters struct +type Msft_WmiProvider_Counters struct { + *cim.WmiInstance + + // + ProviderOperation_AccessCheck uint64 + + // + ProviderOperation_CancelQuery uint64 + + // + ProviderOperation_CreateClassEnumAsync uint64 + + // + ProviderOperation_CreateInstanceEnumAsync uint64 + + // + ProviderOperation_CreateRefreshableEnum uint64 + + // + ProviderOperation_CreateRefreshableObject uint64 + + // + ProviderOperation_CreateRefresher uint64 + + // + ProviderOperation_DeleteClassAsync uint64 + + // + ProviderOperation_DeleteInstanceAsync uint64 + + // + ProviderOperation_ExecMethodAsync uint64 + + // + ProviderOperation_ExecQueryAsync uint64 + + // + ProviderOperation_FindConsumer uint64 + + // + ProviderOperation_GetObjectAsync uint64 + + // + ProviderOperation_GetObjects uint64 + + // + ProviderOperation_GetProperty uint64 + + // + ProviderOperation_NewQuery uint64 + + // + ProviderOperation_ProvideEvents uint64 + + // + ProviderOperation_PutClassAsync uint64 + + // + ProviderOperation_PutInstanceAsync uint64 + + // + ProviderOperation_PutProperty uint64 + + // + ProviderOperation_QueryInstances uint64 + + // + ProviderOperation_SetRegistrationObject uint64 + + // + ProviderOperation_StopRefreshing uint64 + + // + ProviderOperation_ValidateSubscription uint64 +} + +func NewMsft_WmiProvider_CountersEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_Counters, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_Counters{ + WmiInstance: tmp, + } + return +} + +func NewMsft_WmiProvider_CountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_Counters, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_Counters{ + WmiInstance: tmp, + } + return +} + +// SetProviderOperation_AccessCheck sets the value of ProviderOperation_AccessCheck for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_AccessCheck(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_AccessCheck", (value)) +} + +// GetProviderOperation_AccessCheck gets the value of ProviderOperation_AccessCheck for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_AccessCheck() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_AccessCheck") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CancelQuery sets the value of ProviderOperation_CancelQuery for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_CancelQuery(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CancelQuery", (value)) +} + +// GetProviderOperation_CancelQuery gets the value of ProviderOperation_CancelQuery for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_CancelQuery() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CancelQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateClassEnumAsync sets the value of ProviderOperation_CreateClassEnumAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_CreateClassEnumAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateClassEnumAsync", (value)) +} + +// GetProviderOperation_CreateClassEnumAsync gets the value of ProviderOperation_CreateClassEnumAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_CreateClassEnumAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateClassEnumAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateInstanceEnumAsync sets the value of ProviderOperation_CreateInstanceEnumAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_CreateInstanceEnumAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateInstanceEnumAsync", (value)) +} + +// GetProviderOperation_CreateInstanceEnumAsync gets the value of ProviderOperation_CreateInstanceEnumAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_CreateInstanceEnumAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateInstanceEnumAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateRefreshableEnum sets the value of ProviderOperation_CreateRefreshableEnum for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_CreateRefreshableEnum(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateRefreshableEnum", (value)) +} + +// GetProviderOperation_CreateRefreshableEnum gets the value of ProviderOperation_CreateRefreshableEnum for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_CreateRefreshableEnum() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateRefreshableEnum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateRefreshableObject sets the value of ProviderOperation_CreateRefreshableObject for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_CreateRefreshableObject(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateRefreshableObject", (value)) +} + +// GetProviderOperation_CreateRefreshableObject gets the value of ProviderOperation_CreateRefreshableObject for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_CreateRefreshableObject() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateRefreshableObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_CreateRefresher sets the value of ProviderOperation_CreateRefresher for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_CreateRefresher(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_CreateRefresher", (value)) +} + +// GetProviderOperation_CreateRefresher gets the value of ProviderOperation_CreateRefresher for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_CreateRefresher() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_CreateRefresher") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_DeleteClassAsync sets the value of ProviderOperation_DeleteClassAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_DeleteClassAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_DeleteClassAsync", (value)) +} + +// GetProviderOperation_DeleteClassAsync gets the value of ProviderOperation_DeleteClassAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_DeleteClassAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_DeleteClassAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_DeleteInstanceAsync sets the value of ProviderOperation_DeleteInstanceAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_DeleteInstanceAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_DeleteInstanceAsync", (value)) +} + +// GetProviderOperation_DeleteInstanceAsync gets the value of ProviderOperation_DeleteInstanceAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_DeleteInstanceAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_DeleteInstanceAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ExecMethodAsync sets the value of ProviderOperation_ExecMethodAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_ExecMethodAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ExecMethodAsync", (value)) +} + +// GetProviderOperation_ExecMethodAsync gets the value of ProviderOperation_ExecMethodAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_ExecMethodAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ExecMethodAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ExecQueryAsync sets the value of ProviderOperation_ExecQueryAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_ExecQueryAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ExecQueryAsync", (value)) +} + +// GetProviderOperation_ExecQueryAsync gets the value of ProviderOperation_ExecQueryAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_ExecQueryAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ExecQueryAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_FindConsumer sets the value of ProviderOperation_FindConsumer for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_FindConsumer(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_FindConsumer", (value)) +} + +// GetProviderOperation_FindConsumer gets the value of ProviderOperation_FindConsumer for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_FindConsumer() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_FindConsumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_GetObjectAsync sets the value of ProviderOperation_GetObjectAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_GetObjectAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_GetObjectAsync", (value)) +} + +// GetProviderOperation_GetObjectAsync gets the value of ProviderOperation_GetObjectAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_GetObjectAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_GetObjectAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_GetObjects sets the value of ProviderOperation_GetObjects for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_GetObjects(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_GetObjects", (value)) +} + +// GetProviderOperation_GetObjects gets the value of ProviderOperation_GetObjects for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_GetObjects() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_GetObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_GetProperty sets the value of ProviderOperation_GetProperty for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_GetProperty(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_GetProperty", (value)) +} + +// GetProviderOperation_GetProperty gets the value of ProviderOperation_GetProperty for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_GetProperty() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_GetProperty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_NewQuery sets the value of ProviderOperation_NewQuery for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_NewQuery(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_NewQuery", (value)) +} + +// GetProviderOperation_NewQuery gets the value of ProviderOperation_NewQuery for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_NewQuery() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_NewQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ProvideEvents sets the value of ProviderOperation_ProvideEvents for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_ProvideEvents(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ProvideEvents", (value)) +} + +// GetProviderOperation_ProvideEvents gets the value of ProviderOperation_ProvideEvents for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_ProvideEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ProvideEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_PutClassAsync sets the value of ProviderOperation_PutClassAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_PutClassAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_PutClassAsync", (value)) +} + +// GetProviderOperation_PutClassAsync gets the value of ProviderOperation_PutClassAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_PutClassAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_PutClassAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_PutInstanceAsync sets the value of ProviderOperation_PutInstanceAsync for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_PutInstanceAsync(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_PutInstanceAsync", (value)) +} + +// GetProviderOperation_PutInstanceAsync gets the value of ProviderOperation_PutInstanceAsync for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_PutInstanceAsync() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_PutInstanceAsync") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_PutProperty sets the value of ProviderOperation_PutProperty for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_PutProperty(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_PutProperty", (value)) +} + +// GetProviderOperation_PutProperty gets the value of ProviderOperation_PutProperty for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_PutProperty() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_PutProperty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_QueryInstances sets the value of ProviderOperation_QueryInstances for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_QueryInstances(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_QueryInstances", (value)) +} + +// GetProviderOperation_QueryInstances gets the value of ProviderOperation_QueryInstances for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_QueryInstances() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_QueryInstances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_SetRegistrationObject sets the value of ProviderOperation_SetRegistrationObject for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_SetRegistrationObject(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_SetRegistrationObject", (value)) +} + +// GetProviderOperation_SetRegistrationObject gets the value of ProviderOperation_SetRegistrationObject for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_SetRegistrationObject() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_SetRegistrationObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_StopRefreshing sets the value of ProviderOperation_StopRefreshing for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_StopRefreshing(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_StopRefreshing", (value)) +} + +// GetProviderOperation_StopRefreshing gets the value of ProviderOperation_StopRefreshing for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_StopRefreshing() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_StopRefreshing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProviderOperation_ValidateSubscription sets the value of ProviderOperation_ValidateSubscription for the instance +func (instance *Msft_WmiProvider_Counters) SetPropertyProviderOperation_ValidateSubscription(value uint64) (err error) { + return instance.SetProperty("ProviderOperation_ValidateSubscription", (value)) +} + +// GetProviderOperation_ValidateSubscription gets the value of ProviderOperation_ValidateSubscription for the instance +func (instance *Msft_WmiProvider_Counters) GetPropertyProviderOperation_ValidateSubscription() (value uint64, err error) { + retValue, err := instance.GetProperty("ProviderOperation_ValidateSubscription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Post.go new file mode 100644 index 00000000..c60cada1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_CreateClassEnumAsyncEvent_Post struct +type Msft_WmiProvider_CreateClassEnumAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + ResultCode uint32 + + // + StringParameter string + + // + SuperclassName string +} + +func NewMsft_WmiProvider_CreateClassEnumAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateClassEnumAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_CreateClassEnumAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateClassEnumAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSuperclassName sets the value of SuperclassName for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) SetPropertySuperclassName(value string) (err error) { + return instance.SetProperty("SuperclassName", (value)) +} + +// GetSuperclassName gets the value of SuperclassName for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Post) GetPropertySuperclassName() (value string, err error) { + retValue, err := instance.GetProperty("SuperclassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre.go new file mode 100644 index 00000000..4e3d39f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre struct +type Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 + + // + SuperclassName string +} + +func NewMsft_WmiProvider_CreateClassEnumAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_CreateClassEnumAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuperclassName sets the value of SuperclassName for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre) SetPropertySuperclassName(value string) (err error) { + return instance.SetProperty("SuperclassName", (value)) +} + +// GetSuperclassName gets the value of SuperclassName for the instance +func (instance *Msft_WmiProvider_CreateClassEnumAsyncEvent_Pre) GetPropertySuperclassName() (value string, err error) { + retValue, err := instance.GetProperty("SuperclassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post.go new file mode 100644 index 00000000..879fe3f9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post struct +type Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + ClassName string + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_CreateInstanceEnumAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_CreateInstanceEnumAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetClassName sets the value of ClassName for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) SetPropertyClassName(value string) (err error) { + return instance.SetProperty("ClassName", (value)) +} + +// GetClassName gets the value of ClassName for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) GetPropertyClassName() (value string, err error) { + retValue, err := instance.GetProperty("ClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre.go new file mode 100644 index 00000000..3a90fe37 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre struct +type Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + ClassName string + + // + Flags uint32 +} + +func NewMsft_WmiProvider_CreateInstanceEnumAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_CreateInstanceEnumAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetClassName sets the value of ClassName for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre) SetPropertyClassName(value string) (err error) { + return instance.SetProperty("ClassName", (value)) +} + +// GetClassName gets the value of ClassName for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre) GetPropertyClassName() (value string, err error) { + retValue, err := instance.GetProperty("ClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_CreateInstanceEnumAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Post.go new file mode 100644 index 00000000..e50fd67f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_DeleteClassAsyncEvent_Post struct +type Msft_WmiProvider_DeleteClassAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + ClassName string + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_DeleteClassAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_DeleteClassAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteClassAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_DeleteClassAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_DeleteClassAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteClassAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetClassName sets the value of ClassName for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) SetPropertyClassName(value string) (err error) { + return instance.SetProperty("ClassName", (value)) +} + +// GetClassName gets the value of ClassName for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) GetPropertyClassName() (value string, err error) { + retValue, err := instance.GetProperty("ClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Pre.go new file mode 100644 index 00000000..9b37ce2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteClassAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_DeleteClassAsyncEvent_Pre struct +type Msft_WmiProvider_DeleteClassAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + ClassName string + + // + Flags uint32 +} + +func NewMsft_WmiProvider_DeleteClassAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_DeleteClassAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteClassAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_DeleteClassAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_DeleteClassAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteClassAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetClassName sets the value of ClassName for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Pre) SetPropertyClassName(value string) (err error) { + return instance.SetProperty("ClassName", (value)) +} + +// GetClassName gets the value of ClassName for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Pre) GetPropertyClassName() (value string, err error) { + retValue, err := instance.GetProperty("ClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteClassAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Post.go new file mode 100644 index 00000000..17c6c16d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_DeleteInstanceAsyncEvent_Post struct +type Msft_WmiProvider_DeleteInstanceAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + ObjectPath string + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_DeleteInstanceAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteInstanceAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_DeleteInstanceAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteInstanceAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetObjectPath sets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) SetPropertyObjectPath(value string) (err error) { + return instance.SetProperty("ObjectPath", (value)) +} + +// GetObjectPath gets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) GetPropertyObjectPath() (value string, err error) { + retValue, err := instance.GetProperty("ObjectPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre.go new file mode 100644 index 00000000..8f556bce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre struct +type Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 + + // + ObjectPath string +} + +func NewMsft_WmiProvider_DeleteInstanceAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_DeleteInstanceAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectPath sets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre) SetPropertyObjectPath(value string) (err error) { + return instance.SetProperty("ObjectPath", (value)) +} + +// GetObjectPath gets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_DeleteInstanceAsyncEvent_Pre) GetPropertyObjectPath() (value string, err error) { + retValue, err := instance.GetProperty("ObjectPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Post.go new file mode 100644 index 00000000..124ffdba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Post.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ExecMethodAsyncEvent_Post struct +type Msft_WmiProvider_ExecMethodAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + InputParameters interface{} + + // + MethodName string + + // + ObjectParameter interface{} + + // + ObjectPath string + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_ExecMethodAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ExecMethodAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecMethodAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_ExecMethodAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ExecMethodAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecMethodAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInputParameters sets the value of InputParameters for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyInputParameters(value interface{}) (err error) { + return instance.SetProperty("InputParameters", (value)) +} + +// GetInputParameters gets the value of InputParameters for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyInputParameters() (value interface{}, err error) { + retValue, err := instance.GetProperty("InputParameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetMethodName sets the value of MethodName for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyMethodName(value string) (err error) { + return instance.SetProperty("MethodName", (value)) +} + +// GetMethodName gets the value of MethodName for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyMethodName() (value string, err error) { + retValue, err := instance.GetProperty("MethodName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetObjectPath sets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyObjectPath(value string) (err error) { + return instance.SetProperty("ObjectPath", (value)) +} + +// GetObjectPath gets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyObjectPath() (value string, err error) { + retValue, err := instance.GetProperty("ObjectPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Pre.go new file mode 100644 index 00000000..2dafcf39 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecMethodAsyncEvent_Pre.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ExecMethodAsyncEvent_Pre struct +type Msft_WmiProvider_ExecMethodAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 + + // + InputParameters interface{} + + // + MethodName string + + // + ObjectPath string +} + +func NewMsft_WmiProvider_ExecMethodAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecMethodAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_ExecMethodAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecMethodAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInputParameters sets the value of InputParameters for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) SetPropertyInputParameters(value interface{}) (err error) { + return instance.SetProperty("InputParameters", (value)) +} + +// GetInputParameters gets the value of InputParameters for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) GetPropertyInputParameters() (value interface{}, err error) { + retValue, err := instance.GetProperty("InputParameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetMethodName sets the value of MethodName for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) SetPropertyMethodName(value string) (err error) { + return instance.SetProperty("MethodName", (value)) +} + +// GetMethodName gets the value of MethodName for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) GetPropertyMethodName() (value string, err error) { + retValue, err := instance.GetProperty("MethodName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetObjectPath sets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) SetPropertyObjectPath(value string) (err error) { + return instance.SetProperty("ObjectPath", (value)) +} + +// GetObjectPath gets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_ExecMethodAsyncEvent_Pre) GetPropertyObjectPath() (value string, err error) { + retValue, err := instance.GetProperty("ObjectPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Post.go new file mode 100644 index 00000000..0deb05e6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Post.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ExecQueryAsyncEvent_Post struct +type Msft_WmiProvider_ExecQueryAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + Query string + + // + QueryLanguage string + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_ExecQueryAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ExecQueryAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecQueryAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_ExecQueryAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ExecQueryAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecQueryAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Pre.go new file mode 100644 index 00000000..687bcc00 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ExecQueryAsyncEvent_Pre.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ExecQueryAsyncEvent_Pre struct +type Msft_WmiProvider_ExecQueryAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 + + // + Query string + + // + QueryLanguage string +} + +func NewMsft_WmiProvider_ExecQueryAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecQueryAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_ExecQueryAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ExecQueryAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_ExecQueryAsyncEvent_Pre) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Post.go new file mode 100644 index 00000000..72701d6d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_GetObjectAsyncEvent_Post struct +type Msft_WmiProvider_GetObjectAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + ObjectPath string + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_GetObjectAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_GetObjectAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_GetObjectAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_GetObjectAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_GetObjectAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_GetObjectAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetObjectPath sets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) SetPropertyObjectPath(value string) (err error) { + return instance.SetProperty("ObjectPath", (value)) +} + +// GetObjectPath gets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) GetPropertyObjectPath() (value string, err error) { + retValue, err := instance.GetProperty("ObjectPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Pre.go new file mode 100644 index 00000000..413a4881 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_GetObjectAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_GetObjectAsyncEvent_Pre struct +type Msft_WmiProvider_GetObjectAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 + + // + ObjectPath string +} + +func NewMsft_WmiProvider_GetObjectAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_GetObjectAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_GetObjectAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_GetObjectAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_GetObjectAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_GetObjectAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectPath sets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Pre) SetPropertyObjectPath(value string) (err error) { + return instance.SetProperty("ObjectPath", (value)) +} + +// GetObjectPath gets the value of ObjectPath for the instance +func (instance *Msft_WmiProvider_GetObjectAsyncEvent_Pre) GetPropertyObjectPath() (value string, err error) { + retValue, err := instance.GetProperty("ObjectPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationEvent.go new file mode 100644 index 00000000..05b7d539 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Msft_WmiProvider_InitializationOperationEvent struct +type Msft_WmiProvider_InitializationOperationEvent struct { + *Msft_WmiProvider_OperationEvent +} + +func NewMsft_WmiProvider_InitializationOperationEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_InitializationOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_InitializationOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_InitializationOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_InitializationOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_InitializationOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationFailureEvent.go new file mode 100644 index 00000000..a58b21c1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_InitializationOperationFailureEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_InitializationOperationFailureEvent struct +type Msft_WmiProvider_InitializationOperationFailureEvent struct { + *Msft_WmiProvider_OperationEvent + + // + ResultCode uint32 +} + +func NewMsft_WmiProvider_InitializationOperationFailureEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_InitializationOperationFailureEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_InitializationOperationFailureEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_InitializationOperationFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_InitializationOperationFailureEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_InitializationOperationFailureEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_InitializationOperationFailureEvent) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_InitializationOperationFailureEvent) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationEvent.go new file mode 100644 index 00000000..ddc36f71 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationEvent.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_LoadOperationEvent struct +type Msft_WmiProvider_LoadOperationEvent struct { + *Msft_WmiProvider_OperationEvent + + // + Clsid string + + // + InProcServer bool + + // + InProcServerPath string + + // + LocalServer bool + + // + LocalServerPath string + + // + ServerName string + + // + Synchronisation uint32 + + // + ThreadingModel uint32 +} + +func NewMsft_WmiProvider_LoadOperationEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_LoadOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_LoadOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_LoadOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_LoadOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_LoadOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +// SetClsid sets the value of Clsid for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyClsid(value string) (err error) { + return instance.SetProperty("Clsid", (value)) +} + +// GetClsid gets the value of Clsid for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyClsid() (value string, err error) { + retValue, err := instance.GetProperty("Clsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInProcServer sets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyInProcServer(value bool) (err error) { + return instance.SetProperty("InProcServer", (value)) +} + +// GetInProcServer gets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyInProcServer() (value bool, err error) { + retValue, err := instance.GetProperty("InProcServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInProcServerPath sets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyInProcServerPath(value string) (err error) { + return instance.SetProperty("InProcServerPath", (value)) +} + +// GetInProcServerPath gets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyInProcServerPath() (value string, err error) { + retValue, err := instance.GetProperty("InProcServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalServer sets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyLocalServer(value bool) (err error) { + return instance.SetProperty("LocalServer", (value)) +} + +// GetLocalServer gets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyLocalServer() (value bool, err error) { + retValue, err := instance.GetProperty("LocalServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalServerPath sets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyLocalServerPath(value string) (err error) { + return instance.SetProperty("LocalServerPath", (value)) +} + +// GetLocalServerPath gets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyLocalServerPath() (value string, err error) { + retValue, err := instance.GetProperty("LocalServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSynchronisation sets the value of Synchronisation for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertySynchronisation(value uint32) (err error) { + return instance.SetProperty("Synchronisation", (value)) +} + +// GetSynchronisation gets the value of Synchronisation for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertySynchronisation() (value uint32, err error) { + retValue, err := instance.GetProperty("Synchronisation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadingModel sets the value of ThreadingModel for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) SetPropertyThreadingModel(value uint32) (err error) { + return instance.SetProperty("ThreadingModel", (value)) +} + +// GetThreadingModel gets the value of ThreadingModel for the instance +func (instance *Msft_WmiProvider_LoadOperationEvent) GetPropertyThreadingModel() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadingModel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationFailureEvent.go new file mode 100644 index 00000000..b60d17db --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_LoadOperationFailureEvent.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_LoadOperationFailureEvent struct +type Msft_WmiProvider_LoadOperationFailureEvent struct { + *Msft_WmiProvider_OperationEvent + + // + Clsid string + + // + InProcServer bool + + // + InProcServerPath string + + // + LocalServer bool + + // + LocalServerPath string + + // + ResultCode uint32 + + // + ServerName string + + // + Synchronisation uint32 + + // + ThreadingModel uint32 +} + +func NewMsft_WmiProvider_LoadOperationFailureEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_LoadOperationFailureEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_LoadOperationFailureEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_LoadOperationFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_LoadOperationFailureEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_LoadOperationFailureEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +// SetClsid sets the value of Clsid for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyClsid(value string) (err error) { + return instance.SetProperty("Clsid", (value)) +} + +// GetClsid gets the value of Clsid for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyClsid() (value string, err error) { + retValue, err := instance.GetProperty("Clsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInProcServer sets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyInProcServer(value bool) (err error) { + return instance.SetProperty("InProcServer", (value)) +} + +// GetInProcServer gets the value of InProcServer for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyInProcServer() (value bool, err error) { + retValue, err := instance.GetProperty("InProcServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInProcServerPath sets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyInProcServerPath(value string) (err error) { + return instance.SetProperty("InProcServerPath", (value)) +} + +// GetInProcServerPath gets the value of InProcServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyInProcServerPath() (value string, err error) { + retValue, err := instance.GetProperty("InProcServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalServer sets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyLocalServer(value bool) (err error) { + return instance.SetProperty("LocalServer", (value)) +} + +// GetLocalServer gets the value of LocalServer for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyLocalServer() (value bool, err error) { + retValue, err := instance.GetProperty("LocalServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalServerPath sets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyLocalServerPath(value string) (err error) { + return instance.SetProperty("LocalServerPath", (value)) +} + +// GetLocalServerPath gets the value of LocalServerPath for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyLocalServerPath() (value string, err error) { + retValue, err := instance.GetProperty("LocalServerPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSynchronisation sets the value of Synchronisation for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertySynchronisation(value uint32) (err error) { + return instance.SetProperty("Synchronisation", (value)) +} + +// GetSynchronisation gets the value of Synchronisation for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertySynchronisation() (value uint32, err error) { + retValue, err := instance.GetProperty("Synchronisation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadingModel sets the value of ThreadingModel for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) SetPropertyThreadingModel(value uint32) (err error) { + return instance.SetProperty("ThreadingModel", (value)) +} + +// GetThreadingModel gets the value of ThreadingModel for the instance +func (instance *Msft_WmiProvider_LoadOperationFailureEvent) GetPropertyThreadingModel() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadingModel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Post.go new file mode 100644 index 00000000..d3a1fbfd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Post.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_NewQuery_Post struct +type Msft_WmiProvider_NewQuery_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Query string + + // + QueryId uint32 + + // + QueryLanguage string + + // + Result uint32 +} + +func NewMsft_WmiProvider_NewQuery_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_NewQuery_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_NewQuery_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_NewQuery_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_NewQuery_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_NewQuery_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetQuery sets the value of Query for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryId sets the value of QueryId for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) SetPropertyQueryId(value uint32) (err error) { + return instance.SetProperty("QueryId", (value)) +} + +// GetQueryId gets the value of QueryId for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) GetPropertyQueryId() (value uint32, err error) { + retValue, err := instance.GetProperty("QueryId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResult sets the value of Result for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) SetPropertyResult(value uint32) (err error) { + return instance.SetProperty("Result", (value)) +} + +// GetResult gets the value of Result for the instance +func (instance *Msft_WmiProvider_NewQuery_Post) GetPropertyResult() (value uint32, err error) { + retValue, err := instance.GetProperty("Result") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Pre.go new file mode 100644 index 00000000..b25212d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_NewQuery_Pre.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_NewQuery_Pre struct +type Msft_WmiProvider_NewQuery_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Query string + + // + QueryId uint32 + + // + QueryLanguage string +} + +func NewMsft_WmiProvider_NewQuery_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_NewQuery_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_NewQuery_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_NewQuery_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_NewQuery_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_NewQuery_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetQuery sets the value of Query for the instance +func (instance *Msft_WmiProvider_NewQuery_Pre) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *Msft_WmiProvider_NewQuery_Pre) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryId sets the value of QueryId for the instance +func (instance *Msft_WmiProvider_NewQuery_Pre) SetPropertyQueryId(value uint32) (err error) { + return instance.SetProperty("QueryId", (value)) +} + +// GetQueryId gets the value of QueryId for the instance +func (instance *Msft_WmiProvider_NewQuery_Pre) GetPropertyQueryId() (value uint32, err error) { + retValue, err := instance.GetProperty("QueryId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_NewQuery_Pre) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *Msft_WmiProvider_NewQuery_Pre) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent.go new file mode 100644 index 00000000..d424681e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_OperationEvent struct +type Msft_WmiProvider_OperationEvent struct { + *MSFT_WmiSelfEvent + + // + HostingGroup string + + // + HostingSpecification uint32 + + // + Locale string + + // + Namespace string + + // + provider string + + // + TransactionIdentifer string + + // + User string +} + +func NewMsft_WmiProvider_OperationEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_OperationEvent, err error) { + tmp, err := NewMSFT_WmiSelfEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_OperationEvent{ + MSFT_WmiSelfEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_OperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_OperationEvent, err error) { + tmp, err := NewMSFT_WmiSelfEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_OperationEvent{ + MSFT_WmiSelfEvent: tmp, + } + return +} + +// SetHostingGroup sets the value of HostingGroup for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyHostingGroup(value string) (err error) { + return instance.SetProperty("HostingGroup", (value)) +} + +// GetHostingGroup gets the value of HostingGroup for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyHostingGroup() (value string, err error) { + retValue, err := instance.GetProperty("HostingGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHostingSpecification sets the value of HostingSpecification for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyHostingSpecification(value uint32) (err error) { + return instance.SetProperty("HostingSpecification", (value)) +} + +// GetHostingSpecification gets the value of HostingSpecification for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyHostingSpecification() (value uint32, err error) { + retValue, err := instance.GetProperty("HostingSpecification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocale sets the value of Locale for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyLocale(value string) (err error) { + return instance.SetProperty("Locale", (value)) +} + +// GetLocale gets the value of Locale for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyLocale() (value string, err error) { + retValue, err := instance.GetProperty("Locale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNamespace sets the value of Namespace for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyNamespace(value string) (err error) { + return instance.SetProperty("Namespace", (value)) +} + +// GetNamespace gets the value of Namespace for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyNamespace() (value string, err error) { + retValue, err := instance.GetProperty("Namespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setprovider sets the value of provider for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyprovider(value string) (err error) { + return instance.SetProperty("provider", (value)) +} + +// Getprovider gets the value of provider for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyprovider() (value string, err error) { + retValue, err := instance.GetProperty("provider") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTransactionIdentifer sets the value of TransactionIdentifer for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyTransactionIdentifer(value string) (err error) { + return instance.SetProperty("TransactionIdentifer", (value)) +} + +// GetTransactionIdentifer gets the value of TransactionIdentifer for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyTransactionIdentifer() (value string, err error) { + retValue, err := instance.GetProperty("TransactionIdentifer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Msft_WmiProvider_OperationEvent) SetPropertyUser(value string) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Msft_WmiProvider_OperationEvent) GetPropertyUser() (value string, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Post.go new file mode 100644 index 00000000..1b9e2a97 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Post.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Msft_WmiProvider_OperationEvent_Post struct +type Msft_WmiProvider_OperationEvent_Post struct { + *Msft_WmiProvider_OperationEvent +} + +func NewMsft_WmiProvider_OperationEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_OperationEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_OperationEvent_Post{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_OperationEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_OperationEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_OperationEvent_Post{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Pre.go new file mode 100644 index 00000000..fbf837fa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_OperationEvent_Pre.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Msft_WmiProvider_OperationEvent_Pre struct +type Msft_WmiProvider_OperationEvent_Pre struct { + *Msft_WmiProvider_OperationEvent +} + +func NewMsft_WmiProvider_OperationEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_OperationEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_OperationEvent_Pre{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_OperationEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_OperationEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_OperationEvent_Pre{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Post.go new file mode 100644 index 00000000..3eec415a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Post.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ProvideEvents_Post struct +type Msft_WmiProvider_ProvideEvents_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + Result uint32 +} + +func NewMsft_WmiProvider_ProvideEvents_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ProvideEvents_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ProvideEvents_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_ProvideEvents_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ProvideEvents_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ProvideEvents_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_ProvideEvents_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_ProvideEvents_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResult sets the value of Result for the instance +func (instance *Msft_WmiProvider_ProvideEvents_Post) SetPropertyResult(value uint32) (err error) { + return instance.SetProperty("Result", (value)) +} + +// GetResult gets the value of Result for the instance +func (instance *Msft_WmiProvider_ProvideEvents_Post) GetPropertyResult() (value uint32, err error) { + retValue, err := instance.GetProperty("Result") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Pre.go new file mode 100644 index 00000000..561f2948 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_ProvideEvents_Pre.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_ProvideEvents_Pre struct +type Msft_WmiProvider_ProvideEvents_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 +} + +func NewMsft_WmiProvider_ProvideEvents_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_ProvideEvents_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ProvideEvents_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_ProvideEvents_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_ProvideEvents_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_ProvideEvents_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_ProvideEvents_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_ProvideEvents_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Post.go new file mode 100644 index 00000000..4c77c02d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_PutClassAsyncEvent_Post struct +type Msft_WmiProvider_PutClassAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + ClassObject interface{} + + // + Flags uint32 + + // + ObjectParameter interface{} + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_PutClassAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_PutClassAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutClassAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_PutClassAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_PutClassAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutClassAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetClassObject sets the value of ClassObject for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) SetPropertyClassObject(value interface{}) (err error) { + return instance.SetProperty("ClassObject", (value)) +} + +// GetClassObject gets the value of ClassObject for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) GetPropertyClassObject() (value interface{}, err error) { + retValue, err := instance.GetProperty("ClassObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Pre.go new file mode 100644 index 00000000..e1f1b00b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutClassAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_PutClassAsyncEvent_Pre struct +type Msft_WmiProvider_PutClassAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + ClassObject interface{} + + // + Flags uint32 +} + +func NewMsft_WmiProvider_PutClassAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_PutClassAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutClassAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_PutClassAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_PutClassAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutClassAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetClassObject sets the value of ClassObject for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Pre) SetPropertyClassObject(value interface{}) (err error) { + return instance.SetProperty("ClassObject", (value)) +} + +// GetClassObject gets the value of ClassObject for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Pre) GetPropertyClassObject() (value interface{}, err error) { + retValue, err := instance.GetProperty("ClassObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutClassAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Post.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Post.go new file mode 100644 index 00000000..de214a9d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Post.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_PutInstanceAsyncEvent_Post struct +type Msft_WmiProvider_PutInstanceAsyncEvent_Post struct { + *Msft_WmiProvider_OperationEvent_Post + + // + Flags uint32 + + // + InstanceObject interface{} + + // + ObjectParameter interface{} + + // + ResultCode uint32 + + // + StringParameter string +} + +func NewMsft_WmiProvider_PutInstanceAsyncEvent_PostEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_PutInstanceAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutInstanceAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +func NewMsft_WmiProvider_PutInstanceAsyncEvent_PostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_PutInstanceAsyncEvent_Post, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PostEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutInstanceAsyncEvent_Post{ + Msft_WmiProvider_OperationEvent_Post: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstanceObject sets the value of InstanceObject for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) SetPropertyInstanceObject(value interface{}) (err error) { + return instance.SetProperty("InstanceObject", (value)) +} + +// GetInstanceObject gets the value of InstanceObject for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) GetPropertyInstanceObject() (value interface{}, err error) { + retValue, err := instance.GetProperty("InstanceObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetObjectParameter sets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) SetPropertyObjectParameter(value interface{}) (err error) { + return instance.SetProperty("ObjectParameter", (value)) +} + +// GetObjectParameter gets the value of ObjectParameter for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) GetPropertyObjectParameter() (value interface{}, err error) { + retValue, err := instance.GetProperty("ObjectParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetResultCode sets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) SetPropertyResultCode(value uint32) (err error) { + return instance.SetProperty("ResultCode", (value)) +} + +// GetResultCode gets the value of ResultCode for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) GetPropertyResultCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ResultCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStringParameter sets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) SetPropertyStringParameter(value string) (err error) { + return instance.SetProperty("StringParameter", (value)) +} + +// GetStringParameter gets the value of StringParameter for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Post) GetPropertyStringParameter() (value string, err error) { + retValue, err := instance.GetProperty("StringParameter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Pre.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Pre.go new file mode 100644 index 00000000..bc8aa787 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_PutInstanceAsyncEvent_Pre.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Msft_WmiProvider_PutInstanceAsyncEvent_Pre struct +type Msft_WmiProvider_PutInstanceAsyncEvent_Pre struct { + *Msft_WmiProvider_OperationEvent_Pre + + // + Flags uint32 + + // + InstanceObject interface{} +} + +func NewMsft_WmiProvider_PutInstanceAsyncEvent_PreEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_PutInstanceAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutInstanceAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +func NewMsft_WmiProvider_PutInstanceAsyncEvent_PreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_PutInstanceAsyncEvent_Pre, err error) { + tmp, err := NewMsft_WmiProvider_OperationEvent_PreEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_PutInstanceAsyncEvent_Pre{ + Msft_WmiProvider_OperationEvent_Pre: tmp, + } + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Pre) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Pre) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstanceObject sets the value of InstanceObject for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Pre) SetPropertyInstanceObject(value interface{}) (err error) { + return instance.SetProperty("InstanceObject", (value)) +} + +// GetInstanceObject gets the value of InstanceObject for the instance +func (instance *Msft_WmiProvider_PutInstanceAsyncEvent_Pre) GetPropertyInstanceObject() (value interface{}, err error) { + retValue, err := instance.GetProperty("InstanceObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_UnLoadOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_UnLoadOperationEvent.go new file mode 100644 index 00000000..34850d7c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Msft_WmiProvider_UnLoadOperationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Msft_WmiProvider_UnLoadOperationEvent struct +type Msft_WmiProvider_UnLoadOperationEvent struct { + *Msft_WmiProvider_OperationEvent +} + +func NewMsft_WmiProvider_UnLoadOperationEventEx1(instance *cim.WmiInstance) (newInstance *Msft_WmiProvider_UnLoadOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_UnLoadOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} + +func NewMsft_WmiProvider_UnLoadOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Msft_WmiProvider_UnLoadOperationEvent, err error) { + tmp, err := NewMsft_WmiProvider_OperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Msft_WmiProvider_UnLoadOperationEvent{ + Msft_WmiProvider_OperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTEventlogProviderConfig.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTEventlogProviderConfig.go new file mode 100644 index 00000000..9e40ad3c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTEventlogProviderConfig.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// NTEventlogProviderConfig struct +type NTEventlogProviderConfig struct { + *cim.WmiInstance + + // + LastBootUpTime string +} + +func NewNTEventlogProviderConfigEx1(instance *cim.WmiInstance) (newInstance *NTEventlogProviderConfig, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &NTEventlogProviderConfig{ + WmiInstance: tmp, + } + return +} + +func NewNTEventlogProviderConfigEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *NTEventlogProviderConfig, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &NTEventlogProviderConfig{ + WmiInstance: tmp, + } + return +} + +// SetLastBootUpTime sets the value of LastBootUpTime for the instance +func (instance *NTEventlogProviderConfig) SetPropertyLastBootUpTime(value string) (err error) { + return instance.SetProperty("LastBootUpTime", (value)) +} + +// GetLastBootUpTime gets the value of LastBootUpTime for the instance +func (instance *NTEventlogProviderConfig) GetPropertyLastBootUpTime() (value string, err error) { + retValue, err := instance.GetProperty("LastBootUpTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTLMUser9X.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTLMUser9X.go new file mode 100644 index 00000000..701a12df --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NTLMUser9X.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NTLMUser9X struct +type __NTLMUser9X struct { + *__SecurityRelatedClass + + // + Authority string + + // + Flags int32 + + // + Mask int32 + + // + Name string + + // + Type int32 +} + +func New__NTLMUser9XEx1(instance *cim.WmiInstance) (newInstance *__NTLMUser9X, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__NTLMUser9X{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__NTLMUser9XEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NTLMUser9X, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NTLMUser9X{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetAuthority sets the value of Authority for the instance +func (instance *__NTLMUser9X) SetPropertyAuthority(value string) (err error) { + return instance.SetProperty("Authority", (value)) +} + +// GetAuthority gets the value of Authority for the instance +func (instance *__NTLMUser9X) GetPropertyAuthority() (value string, err error) { + retValue, err := instance.GetProperty("Authority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *__NTLMUser9X) SetPropertyFlags(value int32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *__NTLMUser9X) GetPropertyFlags() (value int32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMask sets the value of Mask for the instance +func (instance *__NTLMUser9X) SetPropertyMask(value int32) (err error) { + return instance.SetProperty("Mask", (value)) +} + +// GetMask gets the value of Mask for the instance +func (instance *__NTLMUser9X) GetPropertyMask() (value int32, err error) { + retValue, err := instance.GetProperty("Mask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *__NTLMUser9X) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__NTLMUser9X) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *__NTLMUser9X) SetPropertyType(value int32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *__NTLMUser9X) GetPropertyType() (value int32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Namespace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Namespace.go new file mode 100644 index 00000000..50464ace --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Namespace.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Namespace struct +type __Namespace struct { + *__SystemClass + + // + Name string +} + +func New__NamespaceEx1(instance *cim.WmiInstance) (newInstance *__Namespace, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__Namespace{ + __SystemClass: tmp, + } + return +} + +func New__NamespaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Namespace, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Namespace{ + __SystemClass: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *__Namespace) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__Namespace) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceCreationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceCreationEvent.go new file mode 100644 index 00000000..c71b65fd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceCreationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __NamespaceCreationEvent struct +type __NamespaceCreationEvent struct { + *__NamespaceOperationEvent +} + +func New__NamespaceCreationEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceCreationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceCreationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +func New__NamespaceCreationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceCreationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceCreationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceDeletionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceDeletionEvent.go new file mode 100644 index 00000000..e8520b82 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceDeletionEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __NamespaceDeletionEvent struct +type __NamespaceDeletionEvent struct { + *__NamespaceOperationEvent +} + +func New__NamespaceDeletionEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceDeletionEvent, err error) { + tmp, err := New__NamespaceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceDeletionEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +func New__NamespaceDeletionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceDeletionEvent, err error) { + tmp, err := New__NamespaceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceDeletionEvent{ + __NamespaceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceModificationEvent.go new file mode 100644 index 00000000..1bc28d12 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceModificationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NamespaceModificationEvent struct +type __NamespaceModificationEvent struct { + *__NamespaceOperationEvent + + // + PreviousNamespace __Namespace +} + +func New__NamespaceModificationEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceModificationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceModificationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +func New__NamespaceModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceModificationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceModificationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +// SetPreviousNamespace sets the value of PreviousNamespace for the instance +func (instance *__NamespaceModificationEvent) SetPropertyPreviousNamespace(value __Namespace) (err error) { + return instance.SetProperty("PreviousNamespace", (value)) +} + +// GetPreviousNamespace gets the value of PreviousNamespace for the instance +func (instance *__NamespaceModificationEvent) GetPropertyPreviousNamespace() (value __Namespace, err error) { + retValue, err := instance.GetProperty("PreviousNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Namespace) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Namespace is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Namespace(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceOperationEvent.go new file mode 100644 index 00000000..afe08dd5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NamespaceOperationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NamespaceOperationEvent struct +type __NamespaceOperationEvent struct { + *__Event + + // + TargetNamespace __Namespace +} + +func New__NamespaceOperationEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceOperationEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceOperationEvent{ + __Event: tmp, + } + return +} + +func New__NamespaceOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceOperationEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceOperationEvent{ + __Event: tmp, + } + return +} + +// SetTargetNamespace sets the value of TargetNamespace for the instance +func (instance *__NamespaceOperationEvent) SetPropertyTargetNamespace(value __Namespace) (err error) { + return instance.SetProperty("TargetNamespace", (value)) +} + +// GetTargetNamespace gets the value of TargetNamespace for the instance +func (instance *__NamespaceOperationEvent) GetPropertyTargetNamespace() (value __Namespace, err error) { + retValue, err := instance.GetProperty("TargetNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Namespace) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Namespace is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Namespace(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NotifyStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NotifyStatus.go new file mode 100644 index 00000000..cf663a32 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/NotifyStatus.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NotifyStatus struct +type __NotifyStatus struct { + *cim.WmiInstance + + // + StatusCode uint32 +} + +func New__NotifyStatusEx1(instance *cim.WmiInstance) (newInstance *__NotifyStatus, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__NotifyStatus{ + WmiInstance: tmp, + } + return +} + +func New__NotifyStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NotifyStatus, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NotifyStatus{ + WmiInstance: tmp, + } + return +} + +// SetStatusCode sets the value of StatusCode for the instance +func (instance *__NotifyStatus) SetPropertyStatusCode(value uint32) (err error) { + return instance.SetProperty("StatusCode", (value)) +} + +// GetStatusCode gets the value of StatusCode for the instance +func (instance *__NotifyStatus) GetPropertyStatusCode() (value uint32, err error) { + retValue, err := instance.GetProperty("StatusCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration.go new file mode 100644 index 00000000..c4dc122a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration.go @@ -0,0 +1,291 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ObjectProviderRegistration struct +type __ObjectProviderRegistration struct { + *__ProviderRegistration + + // + InteractionType ObjectProviderRegistration_InteractionType + + // + QuerySupportLevels []string + + // + SupportsBatching bool + + // + SupportsDelete bool + + // + SupportsEnumeration bool + + // + SupportsGet bool + + // + SupportsPut bool + + // + SupportsTransactions bool +} + +func New__ObjectProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__ObjectProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__ObjectProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__ObjectProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ObjectProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ObjectProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetInteractionType sets the value of InteractionType for the instance +func (instance *__ObjectProviderRegistration) SetPropertyInteractionType(value ObjectProviderRegistration_InteractionType) (err error) { + return instance.SetProperty("InteractionType", (value)) +} + +// GetInteractionType gets the value of InteractionType for the instance +func (instance *__ObjectProviderRegistration) GetPropertyInteractionType() (value ObjectProviderRegistration_InteractionType, err error) { + retValue, err := instance.GetProperty("InteractionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = ObjectProviderRegistration_InteractionType(valuetmp) + + return +} + +// SetQuerySupportLevels sets the value of QuerySupportLevels for the instance +func (instance *__ObjectProviderRegistration) SetPropertyQuerySupportLevels(value []string) (err error) { + return instance.SetProperty("QuerySupportLevels", (value)) +} + +// GetQuerySupportLevels gets the value of QuerySupportLevels for the instance +func (instance *__ObjectProviderRegistration) GetPropertyQuerySupportLevels() (value []string, err error) { + retValue, err := instance.GetProperty("QuerySupportLevels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSupportsBatching sets the value of SupportsBatching for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsBatching(value bool) (err error) { + return instance.SetProperty("SupportsBatching", (value)) +} + +// GetSupportsBatching gets the value of SupportsBatching for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsBatching() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsBatching") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsDelete sets the value of SupportsDelete for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsDelete(value bool) (err error) { + return instance.SetProperty("SupportsDelete", (value)) +} + +// GetSupportsDelete gets the value of SupportsDelete for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsDelete() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDelete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsEnumeration sets the value of SupportsEnumeration for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsEnumeration(value bool) (err error) { + return instance.SetProperty("SupportsEnumeration", (value)) +} + +// GetSupportsEnumeration gets the value of SupportsEnumeration for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsEnumeration() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsEnumeration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsGet sets the value of SupportsGet for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsGet(value bool) (err error) { + return instance.SetProperty("SupportsGet", (value)) +} + +// GetSupportsGet gets the value of SupportsGet for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsGet() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsGet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsPut sets the value of SupportsPut for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsPut(value bool) (err error) { + return instance.SetProperty("SupportsPut", (value)) +} + +// GetSupportsPut gets the value of SupportsPut for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsPut() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsPut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsTransactions sets the value of SupportsTransactions for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsTransactions(value bool) (err error) { + return instance.SetProperty("SupportsTransactions", (value)) +} + +// GetSupportsTransactions gets the value of SupportsTransactions for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsTransactions() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration_InteractionType.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration_InteractionType.go new file mode 100644 index 00000000..ecd8817d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ObjectProviderRegistration_InteractionType.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source ObjectProviderRegistration_InteractionType +////////////////////////////////////////////// +package cimv2 + +// ObjectProviderRegistration_InteractionType +type ObjectProviderRegistration_InteractionType int + +const ( + // Pull enum + ObjectProviderRegistration_InteractionType_Pull ObjectProviderRegistration_InteractionType = 0 + // Push enum + ObjectProviderRegistration_InteractionType_Push ObjectProviderRegistration_InteractionType = 1 + // PushVerify enum + ObjectProviderRegistration_InteractionType_PushVerify ObjectProviderRegistration_InteractionType = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PARAMETERS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PARAMETERS.go new file mode 100644 index 00000000..c295cd56 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PARAMETERS.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __PARAMETERS struct +type __PARAMETERS struct { + *cim.WmiInstance +} + +func New__PARAMETERSEx1(instance *cim.WmiInstance) (newInstance *__PARAMETERS, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__PARAMETERS{ + WmiInstance: tmp, + } + return +} + +func New__PARAMETERSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__PARAMETERS, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__PARAMETERS{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Color.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Color.go new file mode 100644 index 00000000..f65041de --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Color.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_Color +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_Color +type PrinterConfiguration_Color int + +const ( + // Monochrome enum + PrinterConfiguration_Color_Monochrome PrinterConfiguration_Color = 1 + // Color enum + PrinterConfiguration_Color_Color PrinterConfiguration_Color = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_DitherType.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_DitherType.go new file mode 100644 index 00000000..8a5aa9d5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_DitherType.go @@ -0,0 +1,25 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_DitherType +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_DitherType +type PrinterConfiguration_DitherType int + +const ( + // No_Dithering enum + PrinterConfiguration_DitherType_No_Dithering PrinterConfiguration_DitherType = 1 + // Coarse_Brush enum + PrinterConfiguration_DitherType_Coarse_Brush PrinterConfiguration_DitherType = 2 + // Fine_Brush enum + PrinterConfiguration_DitherType_Fine_Brush PrinterConfiguration_DitherType = 3 + // Line_Art enum + PrinterConfiguration_DitherType_Line_Art PrinterConfiguration_DitherType = 4 + // Greyscale enum + PrinterConfiguration_DitherType_Greyscale PrinterConfiguration_DitherType = 5 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMIntent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMIntent.go new file mode 100644 index 00000000..a20395b3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMIntent.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_ICMIntent +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_ICMIntent +type PrinterConfiguration_ICMIntent int + +const ( + // Saturation enum + PrinterConfiguration_ICMIntent_Saturation PrinterConfiguration_ICMIntent = 1 + // Contrast enum + PrinterConfiguration_ICMIntent_Contrast PrinterConfiguration_ICMIntent = 2 + // Exact_Color enum + PrinterConfiguration_ICMIntent_Exact_Color PrinterConfiguration_ICMIntent = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMMethod.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMMethod.go new file mode 100644 index 00000000..43543f57 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_ICMMethod.go @@ -0,0 +1,23 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_ICMMethod +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_ICMMethod +type PrinterConfiguration_ICMMethod int + +const ( + // Disabled enum + PrinterConfiguration_ICMMethod_Disabled PrinterConfiguration_ICMMethod = 1 + // Windows enum + PrinterConfiguration_ICMMethod_Windows PrinterConfiguration_ICMMethod = 2 + // Device_Driver enum + PrinterConfiguration_ICMMethod_Device_Driver PrinterConfiguration_ICMMethod = 3 + // Device enum + PrinterConfiguration_ICMMethod_Device PrinterConfiguration_ICMMethod = 4 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_MediaType.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_MediaType.go new file mode 100644 index 00000000..4f76f310 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_MediaType.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_MediaType +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_MediaType +type PrinterConfiguration_MediaType int + +const ( + // Standard enum + PrinterConfiguration_MediaType_Standard PrinterConfiguration_MediaType = 1 + // Transparency enum + PrinterConfiguration_MediaType_Transparency PrinterConfiguration_MediaType = 2 + // Glossy enum + PrinterConfiguration_MediaType_Glossy PrinterConfiguration_MediaType = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Orientation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Orientation.go new file mode 100644 index 00000000..56ac1308 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_Orientation.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_Orientation +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_Orientation +type PrinterConfiguration_Orientation int + +const ( + // Portrait enum + PrinterConfiguration_Orientation_Portrait PrinterConfiguration_Orientation = 1 + // Landscape enum + PrinterConfiguration_Orientation_Landscape PrinterConfiguration_Orientation = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_PrintQuality.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_PrintQuality.go new file mode 100644 index 00000000..ea5d2299 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_PrintQuality.go @@ -0,0 +1,23 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_PrintQuality +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_PrintQuality +type PrinterConfiguration_PrintQuality int + +const ( + // Draft enum + PrinterConfiguration_PrintQuality_Draft PrinterConfiguration_PrintQuality = -1 + // Low enum + PrinterConfiguration_PrintQuality_Low PrinterConfiguration_PrintQuality = -2 + // Medium enum + PrinterConfiguration_PrintQuality_Medium PrinterConfiguration_PrintQuality = -3 + // High enum + PrinterConfiguration_PrintQuality_High PrinterConfiguration_PrintQuality = -4 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_TTOption.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_TTOption.go new file mode 100644 index 00000000..8496258a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterConfiguration_TTOption.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterConfiguration_TTOption +////////////////////////////////////////////// +package cimv2 + +// PrinterConfiguration_TTOption +type PrinterConfiguration_TTOption int + +const ( + // Bitmap enum + PrinterConfiguration_TTOption_Bitmap PrinterConfiguration_TTOption = 1 + // Download enum + PrinterConfiguration_TTOption_Download PrinterConfiguration_TTOption = 2 + // Substitute enum + PrinterConfiguration_TTOption_Substitute PrinterConfiguration_TTOption = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterDriver_Version.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterDriver_Version.go new file mode 100644 index 00000000..6b4728b5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PrinterDriver_Version.go @@ -0,0 +1,23 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source PrinterDriver_Version +////////////////////////////////////////////// +package cimv2 + +// PrinterDriver_Version +type PrinterDriver_Version int + +const ( + // Win9x enum + PrinterDriver_Version_Win9x PrinterDriver_Version = 0 + // Win351 enum + PrinterDriver_Version_Win351 PrinterDriver_Version = 1 + // NT40 enum + PrinterDriver_Version_NT40 PrinterDriver_Version = 2 + // Win2k enum + PrinterDriver_Version_Win2k PrinterDriver_Version = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedDetectedErrorState.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedDetectedErrorState.go new file mode 100644 index 00000000..3d377746 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedDetectedErrorState.go @@ -0,0 +1,47 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Printer_ExtendedDetectedErrorState +////////////////////////////////////////////// +package cimv2 + +// Printer_ExtendedDetectedErrorState +type Printer_ExtendedDetectedErrorState int + +const ( + // Unknown enum + Printer_ExtendedDetectedErrorState_Unknown Printer_ExtendedDetectedErrorState = 0 + // Other enum + Printer_ExtendedDetectedErrorState_Other Printer_ExtendedDetectedErrorState = 1 + // No_Error enum + Printer_ExtendedDetectedErrorState_No_Error Printer_ExtendedDetectedErrorState = 2 + // Low_Paper enum + Printer_ExtendedDetectedErrorState_Low_Paper Printer_ExtendedDetectedErrorState = 3 + // No_Paper enum + Printer_ExtendedDetectedErrorState_No_Paper Printer_ExtendedDetectedErrorState = 4 + // Low_Toner enum + Printer_ExtendedDetectedErrorState_Low_Toner Printer_ExtendedDetectedErrorState = 5 + // No_Toner enum + Printer_ExtendedDetectedErrorState_No_Toner Printer_ExtendedDetectedErrorState = 6 + // Door_Open enum + Printer_ExtendedDetectedErrorState_Door_Open Printer_ExtendedDetectedErrorState = 7 + // Jammed enum + Printer_ExtendedDetectedErrorState_Jammed Printer_ExtendedDetectedErrorState = 8 + // Service_Requested enum + Printer_ExtendedDetectedErrorState_Service_Requested Printer_ExtendedDetectedErrorState = 9 + // Output_Bin_Full enum + Printer_ExtendedDetectedErrorState_Output_Bin_Full Printer_ExtendedDetectedErrorState = 10 + // Paper_Problem enum + Printer_ExtendedDetectedErrorState_Paper_Problem Printer_ExtendedDetectedErrorState = 11 + // Cannot_Print_Page enum + Printer_ExtendedDetectedErrorState_Cannot_Print_Page Printer_ExtendedDetectedErrorState = 12 + // User_Intervention_Required enum + Printer_ExtendedDetectedErrorState_User_Intervention_Required Printer_ExtendedDetectedErrorState = 13 + // Out_of_Memory enum + Printer_ExtendedDetectedErrorState_Out_of_Memory Printer_ExtendedDetectedErrorState = 14 + // Server_Unknown enum + Printer_ExtendedDetectedErrorState_Server_Unknown Printer_ExtendedDetectedErrorState = 15 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedPrinterStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedPrinterStatus.go new file mode 100644 index 00000000..169ae477 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_ExtendedPrinterStatus.go @@ -0,0 +1,51 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Printer_ExtendedPrinterStatus +////////////////////////////////////////////// +package cimv2 + +// Printer_ExtendedPrinterStatus +type Printer_ExtendedPrinterStatus int + +const ( + // Other enum + Printer_ExtendedPrinterStatus_Other Printer_ExtendedPrinterStatus = 1 + // Unknown enum + Printer_ExtendedPrinterStatus_Unknown Printer_ExtendedPrinterStatus = 2 + // Idle enum + Printer_ExtendedPrinterStatus_Idle Printer_ExtendedPrinterStatus = 3 + // Printing enum + Printer_ExtendedPrinterStatus_Printing Printer_ExtendedPrinterStatus = 4 + // Warmup enum + Printer_ExtendedPrinterStatus_Warmup Printer_ExtendedPrinterStatus = 5 + // Stopped_Printing enum + Printer_ExtendedPrinterStatus_Stopped_Printing Printer_ExtendedPrinterStatus = 6 + // Offline enum + Printer_ExtendedPrinterStatus_Offline Printer_ExtendedPrinterStatus = 7 + // Paused enum + Printer_ExtendedPrinterStatus_Paused Printer_ExtendedPrinterStatus = 8 + // Error enum + Printer_ExtendedPrinterStatus_Error Printer_ExtendedPrinterStatus = 9 + // Busy enum + Printer_ExtendedPrinterStatus_Busy Printer_ExtendedPrinterStatus = 10 + // Not_Available enum + Printer_ExtendedPrinterStatus_Not_Available Printer_ExtendedPrinterStatus = 11 + // Waiting enum + Printer_ExtendedPrinterStatus_Waiting Printer_ExtendedPrinterStatus = 12 + // Processing enum + Printer_ExtendedPrinterStatus_Processing Printer_ExtendedPrinterStatus = 13 + // Initialization enum + Printer_ExtendedPrinterStatus_Initialization Printer_ExtendedPrinterStatus = 14 + // Power_Save enum + Printer_ExtendedPrinterStatus_Power_Save Printer_ExtendedPrinterStatus = 15 + // Pending_Deletion enum + Printer_ExtendedPrinterStatus_Pending_Deletion Printer_ExtendedPrinterStatus = 16 + // I_O_Active enum + Printer_ExtendedPrinterStatus_I_O_Active Printer_ExtendedPrinterStatus = 17 + // Manual_Feed enum + Printer_ExtendedPrinterStatus_Manual_Feed Printer_ExtendedPrinterStatus = 18 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_PrinterState.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_PrinterState.go new file mode 100644 index 00000000..c6cd6ee6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Printer_PrinterState.go @@ -0,0 +1,65 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Printer_PrinterState +////////////////////////////////////////////// +package cimv2 + +// Printer_PrinterState +type Printer_PrinterState int + +const ( + // Paused enum + Printer_PrinterState_Paused Printer_PrinterState = 0 + // Error enum + Printer_PrinterState_Error Printer_PrinterState = 1 + // Pending_Deletion enum + Printer_PrinterState_Pending_Deletion Printer_PrinterState = 2 + // Paper_Jam enum + Printer_PrinterState_Paper_Jam Printer_PrinterState = 3 + // Paper_Out enum + Printer_PrinterState_Paper_Out Printer_PrinterState = 4 + // Manual_Feed enum + Printer_PrinterState_Manual_Feed Printer_PrinterState = 5 + // Paper_Problem enum + Printer_PrinterState_Paper_Problem Printer_PrinterState = 6 + // Offline enum + Printer_PrinterState_Offline Printer_PrinterState = 7 + // IO_Active enum + Printer_PrinterState_IO_Active Printer_PrinterState = 8 + // Busy enum + Printer_PrinterState_Busy Printer_PrinterState = 9 + // Printing enum + Printer_PrinterState_Printing Printer_PrinterState = 10 + // Output_Bin_Full enum + Printer_PrinterState_Output_Bin_Full Printer_PrinterState = 11 + // Not_Available enum + Printer_PrinterState_Not_Available Printer_PrinterState = 12 + // Waiting enum + Printer_PrinterState_Waiting Printer_PrinterState = 13 + // Processing enum + Printer_PrinterState_Processing Printer_PrinterState = 14 + // Initialization enum + Printer_PrinterState_Initialization Printer_PrinterState = 15 + // Warming_Up enum + Printer_PrinterState_Warming_Up Printer_PrinterState = 16 + // Toner_Low enum + Printer_PrinterState_Toner_Low Printer_PrinterState = 17 + // No_Toner enum + Printer_PrinterState_No_Toner Printer_PrinterState = 18 + // Page_Punt enum + Printer_PrinterState_Page_Punt Printer_PrinterState = 19 + // User_Intervention_Required enum + Printer_PrinterState_User_Intervention_Required Printer_PrinterState = 20 + // Out_of_Memory enum + Printer_PrinterState_Out_of_Memory Printer_PrinterState = 21 + // Door_Open enum + Printer_PrinterState_Door_Open Printer_PrinterState = 22 + // Server_Unknown enum + Printer_PrinterState_Server_Unknown Printer_PrinterState = 23 + // Power_Save enum + Printer_PrinterState_Power_Save Printer_PrinterState = 24 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PropertyProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PropertyProviderRegistration.go new file mode 100644 index 00000000..dbb039ce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/PropertyProviderRegistration.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __PropertyProviderRegistration struct +type __PropertyProviderRegistration struct { + *__ProviderRegistration + + // + SupportsGet bool + + // + SupportsPut bool +} + +func New__PropertyProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__PropertyProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__PropertyProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__PropertyProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__PropertyProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__PropertyProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetSupportsGet sets the value of SupportsGet for the instance +func (instance *__PropertyProviderRegistration) SetPropertySupportsGet(value bool) (err error) { + return instance.SetProperty("SupportsGet", (value)) +} + +// GetSupportsGet gets the value of SupportsGet for the instance +func (instance *__PropertyProviderRegistration) GetPropertySupportsGet() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsGet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsPut sets the value of SupportsPut for the instance +func (instance *__PropertyProviderRegistration) SetPropertySupportsPut(value bool) (err error) { + return instance.SetProperty("SupportsPut", (value)) +} + +// GetSupportsPut gets the value of SupportsPut for the instance +func (instance *__PropertyProviderRegistration) GetPropertySupportsPut() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsPut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Provider.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Provider.go new file mode 100644 index 00000000..8931f4f1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Provider.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Provider struct +type __Provider struct { + *__SystemClass + + // + Name string +} + +func New__ProviderEx1(instance *cim.WmiInstance) (newInstance *__Provider, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__Provider{ + __SystemClass: tmp, + } + return +} + +func New__ProviderEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Provider, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Provider{ + __SystemClass: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *__Provider) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__Provider) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ProviderRegistration.go new file mode 100644 index 00000000..518e3f7c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ProviderRegistration.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ProviderRegistration struct +type __ProviderRegistration struct { + *__SystemClass + + // + provider __Provider +} + +func New__ProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__ProviderRegistration, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__ProviderRegistration{ + __SystemClass: tmp, + } + return +} + +func New__ProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ProviderRegistration, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ProviderRegistration{ + __SystemClass: tmp, + } + return +} + +// Setprovider sets the value of provider for the instance +func (instance *__ProviderRegistration) SetPropertyprovider(value __Provider) (err error) { + return instance.SetProperty("provider", (value)) +} + +// Getprovider gets the value of provider for the instance +func (instance *__ProviderRegistration) GetPropertyprovider() (value __Provider, err error) { + retValue, err := instance.GetProperty("provider") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Provider) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Provider is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Provider(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/QOSFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/QOSFailureEvent.go new file mode 100644 index 00000000..cdce69fc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/QOSFailureEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __QOSFailureEvent struct +type __QOSFailureEvent struct { + *__EventDroppedEvent + + // + ErrorCode uint32 + + // + ErrorDescription string +} + +func New__QOSFailureEventEx1(instance *cim.WmiInstance) (newInstance *__QOSFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx1(instance) + + if err != nil { + return + } + newInstance = &__QOSFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +func New__QOSFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__QOSFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__QOSFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +// SetErrorCode sets the value of ErrorCode for the instance +func (instance *__QOSFailureEvent) SetPropertyErrorCode(value uint32) (err error) { + return instance.SetProperty("ErrorCode", (value)) +} + +// GetErrorCode gets the value of ErrorCode for the instance +func (instance *__QOSFailureEvent) GetPropertyErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *__QOSFailureEvent) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *__QOSFailureEvent) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryEvent.go new file mode 100644 index 00000000..86c4c1e8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// RegistryEvent struct +type RegistryEvent struct { + *__ExtrinsicEvent +} + +func NewRegistryEventEx1(instance *cim.WmiInstance) (newInstance *RegistryEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &RegistryEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewRegistryEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *RegistryEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &RegistryEvent{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryKeyChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryKeyChangeEvent.go new file mode 100644 index 00000000..beaf4bc8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryKeyChangeEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// RegistryKeyChangeEvent struct +type RegistryKeyChangeEvent struct { + *RegistryEvent + + // + Hive string + + // + KeyPath string +} + +func NewRegistryKeyChangeEventEx1(instance *cim.WmiInstance) (newInstance *RegistryKeyChangeEvent, err error) { + tmp, err := NewRegistryEventEx1(instance) + + if err != nil { + return + } + newInstance = &RegistryKeyChangeEvent{ + RegistryEvent: tmp, + } + return +} + +func NewRegistryKeyChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *RegistryKeyChangeEvent, err error) { + tmp, err := NewRegistryEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &RegistryKeyChangeEvent{ + RegistryEvent: tmp, + } + return +} + +// SetHive sets the value of Hive for the instance +func (instance *RegistryKeyChangeEvent) SetPropertyHive(value string) (err error) { + return instance.SetProperty("Hive", (value)) +} + +// GetHive gets the value of Hive for the instance +func (instance *RegistryKeyChangeEvent) GetPropertyHive() (value string, err error) { + retValue, err := instance.GetProperty("Hive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyPath sets the value of KeyPath for the instance +func (instance *RegistryKeyChangeEvent) SetPropertyKeyPath(value string) (err error) { + return instance.SetProperty("KeyPath", (value)) +} + +// GetKeyPath gets the value of KeyPath for the instance +func (instance *RegistryKeyChangeEvent) GetPropertyKeyPath() (value string, err error) { + retValue, err := instance.GetProperty("KeyPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryTreeChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryTreeChangeEvent.go new file mode 100644 index 00000000..c06250d8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryTreeChangeEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// RegistryTreeChangeEvent struct +type RegistryTreeChangeEvent struct { + *RegistryEvent + + // + Hive string + + // + RootPath string +} + +func NewRegistryTreeChangeEventEx1(instance *cim.WmiInstance) (newInstance *RegistryTreeChangeEvent, err error) { + tmp, err := NewRegistryEventEx1(instance) + + if err != nil { + return + } + newInstance = &RegistryTreeChangeEvent{ + RegistryEvent: tmp, + } + return +} + +func NewRegistryTreeChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *RegistryTreeChangeEvent, err error) { + tmp, err := NewRegistryEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &RegistryTreeChangeEvent{ + RegistryEvent: tmp, + } + return +} + +// SetHive sets the value of Hive for the instance +func (instance *RegistryTreeChangeEvent) SetPropertyHive(value string) (err error) { + return instance.SetProperty("Hive", (value)) +} + +// GetHive gets the value of Hive for the instance +func (instance *RegistryTreeChangeEvent) GetPropertyHive() (value string, err error) { + retValue, err := instance.GetProperty("Hive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRootPath sets the value of RootPath for the instance +func (instance *RegistryTreeChangeEvent) SetPropertyRootPath(value string) (err error) { + return instance.SetProperty("RootPath", (value)) +} + +// GetRootPath gets the value of RootPath for the instance +func (instance *RegistryTreeChangeEvent) GetPropertyRootPath() (value string, err error) { + retValue, err := instance.GetProperty("RootPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryValueChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryValueChangeEvent.go new file mode 100644 index 00000000..9023bb53 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RegistryValueChangeEvent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// RegistryValueChangeEvent struct +type RegistryValueChangeEvent struct { + *RegistryEvent + + // + Hive string + + // + KeyPath string + + // + ValueName string +} + +func NewRegistryValueChangeEventEx1(instance *cim.WmiInstance) (newInstance *RegistryValueChangeEvent, err error) { + tmp, err := NewRegistryEventEx1(instance) + + if err != nil { + return + } + newInstance = &RegistryValueChangeEvent{ + RegistryEvent: tmp, + } + return +} + +func NewRegistryValueChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *RegistryValueChangeEvent, err error) { + tmp, err := NewRegistryEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &RegistryValueChangeEvent{ + RegistryEvent: tmp, + } + return +} + +// SetHive sets the value of Hive for the instance +func (instance *RegistryValueChangeEvent) SetPropertyHive(value string) (err error) { + return instance.SetProperty("Hive", (value)) +} + +// GetHive gets the value of Hive for the instance +func (instance *RegistryValueChangeEvent) GetPropertyHive() (value string, err error) { + retValue, err := instance.GetProperty("Hive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyPath sets the value of KeyPath for the instance +func (instance *RegistryValueChangeEvent) SetPropertyKeyPath(value string) (err error) { + return instance.SetProperty("KeyPath", (value)) +} + +// GetKeyPath gets the value of KeyPath for the instance +func (instance *RegistryValueChangeEvent) GetPropertyKeyPath() (value string, err error) { + retValue, err := instance.GetProperty("KeyPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValueName sets the value of ValueName for the instance +func (instance *RegistryValueChangeEvent) SetPropertyValueName(value string) (err error) { + return instance.SetProperty("ValueName", (value)) +} + +// GetValueName gets the value of ValueName for the instance +func (instance *RegistryValueChangeEvent) GetPropertyValueName() (value string, err error) { + retValue, err := instance.GetProperty("ValueName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingProfileBackgroundUploadParams_SchedulingMethod.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingProfileBackgroundUploadParams_SchedulingMethod.go new file mode 100644 index 00000000..334844f6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingProfileBackgroundUploadParams_SchedulingMethod.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source RoamingProfileBackgroundUploadParams_SchedulingMethod +////////////////////////////////////////////// +package cimv2 + +// RoamingProfileBackgroundUploadParams_SchedulingMethod +type RoamingProfileBackgroundUploadParams_SchedulingMethod int + +const ( + // SpecificTime enum + RoamingProfileBackgroundUploadParams_SchedulingMethod_SpecificTime RoamingProfileBackgroundUploadParams_SchedulingMethod = 1 + // SetInterval enum + RoamingProfileBackgroundUploadParams_SchedulingMethod_SetInterval RoamingProfileBackgroundUploadParams_SchedulingMethod = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingUserHealthConfiguration_HealthStatusForTempProfiles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingUserHealthConfiguration_HealthStatusForTempProfiles.go new file mode 100644 index 00000000..aec81681 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/RoamingUserHealthConfiguration_HealthStatusForTempProfiles.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source RoamingUserHealthConfiguration_HealthStatusForTempProfiles +////////////////////////////////////////////// +package cimv2 + +// RoamingUserHealthConfiguration_HealthStatusForTempProfiles +type RoamingUserHealthConfiguration_HealthStatusForTempProfiles int + +const ( + // Healthy enum + RoamingUserHealthConfiguration_HealthStatusForTempProfiles_Healthy RoamingUserHealthConfiguration_HealthStatusForTempProfiles = 0 + // Unhealthy enum + RoamingUserHealthConfiguration_HealthStatusForTempProfiles_Unhealthy RoamingUserHealthConfiguration_HealthStatusForTempProfiles = 1 + // Caution enum + RoamingUserHealthConfiguration_HealthStatusForTempProfiles_Caution RoamingUserHealthConfiguration_HealthStatusForTempProfiles = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ScriptingStandardConsumerSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ScriptingStandardConsumerSetting.go new file mode 100644 index 00000000..544a42a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/ScriptingStandardConsumerSetting.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// ScriptingStandardConsumerSetting struct +type ScriptingStandardConsumerSetting struct { + *CIM_Setting + + // + MaximumScripts uint32 + + // + Timeout uint32 +} + +func NewScriptingStandardConsumerSettingEx1(instance *cim.WmiInstance) (newInstance *ScriptingStandardConsumerSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &ScriptingStandardConsumerSetting{ + CIM_Setting: tmp, + } + return +} + +func NewScriptingStandardConsumerSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *ScriptingStandardConsumerSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &ScriptingStandardConsumerSetting{ + CIM_Setting: tmp, + } + return +} + +// SetMaximumScripts sets the value of MaximumScripts for the instance +func (instance *ScriptingStandardConsumerSetting) SetPropertyMaximumScripts(value uint32) (err error) { + return instance.SetProperty("MaximumScripts", (value)) +} + +// GetMaximumScripts gets the value of MaximumScripts for the instance +func (instance *ScriptingStandardConsumerSetting) GetPropertyMaximumScripts() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumScripts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeout sets the value of Timeout for the instance +func (instance *ScriptingStandardConsumerSetting) SetPropertyTimeout(value uint32) (err error) { + return instance.SetProperty("Timeout", (value)) +} + +// GetTimeout gets the value of Timeout for the instance +func (instance *ScriptingStandardConsumerSetting) GetPropertyTimeout() (value uint32, err error) { + retValue, err := instance.GetProperty("Timeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityDescriptor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityDescriptor.go new file mode 100644 index 00000000..f5a804dd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityDescriptor.go @@ -0,0 +1,232 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __SecurityDescriptor struct +type __SecurityDescriptor struct { + *__SecurityRelatedClass + + // + ControlFlags uint32 + + // + DACL []__ACE + + // + Group __ACE + + // + Owner __ACE + + // + SACL []__ACE + + // + TIME_CREATED uint64 +} + +func New__SecurityDescriptorEx1(instance *cim.WmiInstance) (newInstance *__SecurityDescriptor, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__SecurityDescriptor{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__SecurityDescriptorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SecurityDescriptor, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SecurityDescriptor{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetControlFlags sets the value of ControlFlags for the instance +func (instance *__SecurityDescriptor) SetPropertyControlFlags(value uint32) (err error) { + return instance.SetProperty("ControlFlags", (value)) +} + +// GetControlFlags gets the value of ControlFlags for the instance +func (instance *__SecurityDescriptor) GetPropertyControlFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("ControlFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDACL sets the value of DACL for the instance +func (instance *__SecurityDescriptor) SetPropertyDACL(value []__ACE) (err error) { + return instance.SetProperty("DACL", (value)) +} + +// GetDACL gets the value of DACL for the instance +func (instance *__SecurityDescriptor) GetPropertyDACL() (value []__ACE, err error) { + retValue, err := instance.GetProperty("DACL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, __ACE(valuetmp)) + } + + return +} + +// SetGroup sets the value of Group for the instance +func (instance *__SecurityDescriptor) SetPropertyGroup(value __ACE) (err error) { + return instance.SetProperty("Group", (value)) +} + +// GetGroup gets the value of Group for the instance +func (instance *__SecurityDescriptor) GetPropertyGroup() (value __ACE, err error) { + retValue, err := instance.GetProperty("Group") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __ACE(valuetmp) + + return +} + +// SetOwner sets the value of Owner for the instance +func (instance *__SecurityDescriptor) SetPropertyOwner(value __ACE) (err error) { + return instance.SetProperty("Owner", (value)) +} + +// GetOwner gets the value of Owner for the instance +func (instance *__SecurityDescriptor) GetPropertyOwner() (value __ACE, err error) { + retValue, err := instance.GetProperty("Owner") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __ACE(valuetmp) + + return +} + +// SetSACL sets the value of SACL for the instance +func (instance *__SecurityDescriptor) SetPropertySACL(value []__ACE) (err error) { + return instance.SetProperty("SACL", (value)) +} + +// GetSACL gets the value of SACL for the instance +func (instance *__SecurityDescriptor) GetPropertySACL() (value []__ACE, err error) { + retValue, err := instance.GetProperty("SACL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, __ACE(valuetmp)) + } + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__SecurityDescriptor) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__SecurityDescriptor) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityRelatedClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityRelatedClass.go new file mode 100644 index 00000000..f1068129 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SecurityRelatedClass.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SecurityRelatedClass struct +type __SecurityRelatedClass struct { + *cim.WmiInstance +} + +func New__SecurityRelatedClassEx1(instance *cim.WmiInstance) (newInstance *__SecurityRelatedClass, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__SecurityRelatedClass{ + WmiInstance: tmp, + } + return +} + +func New__SecurityRelatedClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SecurityRelatedClass, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SecurityRelatedClass{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingProduct.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingProduct.go new file mode 100644 index 00000000..a88bf469 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingProduct.go @@ -0,0 +1,2134 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// SoftwareLicensingProduct struct +type SoftwareLicensingProduct struct { + *cim.WmiInstance + + // + ADActivationCsvlkPid string + + // + ADActivationCsvlkSkuId string + + // + ADActivationObjectDN string + + // + ADActivationObjectName string + + // + ApplicationID string + + // + AutomaticVMActivationHostDigitalPid2 string + + // + AutomaticVMActivationHostMachineName string + + // + AutomaticVMActivationLastActivationTime string + + // + Description string + + // + DiscoveredKeyManagementServiceMachineIpAddress string + + // + DiscoveredKeyManagementServiceMachineName string + + // + DiscoveredKeyManagementServiceMachinePort uint32 + + // + EvaluationEndDate string + + // + ExtendedGrace uint32 + + // + GenuineStatus uint32 + + // + GracePeriodRemaining uint32 + + // + IAID string + + // + ID string + + // + IsKeyManagementServiceMachine uint32 + + // + KeyManagementServiceCurrentCount uint32 + + // + KeyManagementServiceFailedRequests uint32 + + // + KeyManagementServiceLicensedRequests uint32 + + // + KeyManagementServiceLookupDomain string + + // + KeyManagementServiceMachine string + + // + KeyManagementServiceNonGenuineGraceRequests uint32 + + // + KeyManagementServiceNotificationRequests uint32 + + // + KeyManagementServiceOOBGraceRequests uint32 + + // + KeyManagementServiceOOTGraceRequests uint32 + + // + KeyManagementServicePort uint32 + + // + KeyManagementServiceProductKeyID string + + // + KeyManagementServiceTotalRequests uint32 + + // + KeyManagementServiceUnlicensedRequests uint32 + + // + LicenseDependsOn string + + // + LicenseFamily string + + // + LicenseIsAddon bool + + // + LicenseStatus uint32 + + // + LicenseStatusReason uint32 + + // + MachineURL string + + // + Name string + + // + OfflineInstallationId string + + // + PartialProductKey string + + // + ProcessorURL string + + // + ProductKeyChannel string + + // + ProductKeyID string + + // + ProductKeyID2 string + + // + ProductKeyURL string + + // + RemainingAppReArmCount uint32 + + // + RemainingSkuReArmCount uint32 + + // + RequiredClientCount uint32 + + // + TokenActivationAdditionalInfo string + + // + TokenActivationCertificateThumbprint string + + // + TokenActivationGrantNumber uint32 + + // + TokenActivationILID string + + // + TokenActivationILVID uint32 + + // + TrustedTime string + + // + UseLicenseURL string + + // + ValidationURL string + + // + VLActivationInterval uint32 + + // + VLActivationType uint32 + + // + VLActivationTypeEnabled uint32 + + // + VLRenewalInterval uint32 +} + +func NewSoftwareLicensingProductEx1(instance *cim.WmiInstance) (newInstance *SoftwareLicensingProduct, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &SoftwareLicensingProduct{ + WmiInstance: tmp, + } + return +} + +func NewSoftwareLicensingProductEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *SoftwareLicensingProduct, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &SoftwareLicensingProduct{ + WmiInstance: tmp, + } + return +} + +// SetADActivationCsvlkPid sets the value of ADActivationCsvlkPid for the instance +func (instance *SoftwareLicensingProduct) SetPropertyADActivationCsvlkPid(value string) (err error) { + return instance.SetProperty("ADActivationCsvlkPid", (value)) +} + +// GetADActivationCsvlkPid gets the value of ADActivationCsvlkPid for the instance +func (instance *SoftwareLicensingProduct) GetPropertyADActivationCsvlkPid() (value string, err error) { + retValue, err := instance.GetProperty("ADActivationCsvlkPid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetADActivationCsvlkSkuId sets the value of ADActivationCsvlkSkuId for the instance +func (instance *SoftwareLicensingProduct) SetPropertyADActivationCsvlkSkuId(value string) (err error) { + return instance.SetProperty("ADActivationCsvlkSkuId", (value)) +} + +// GetADActivationCsvlkSkuId gets the value of ADActivationCsvlkSkuId for the instance +func (instance *SoftwareLicensingProduct) GetPropertyADActivationCsvlkSkuId() (value string, err error) { + retValue, err := instance.GetProperty("ADActivationCsvlkSkuId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetADActivationObjectDN sets the value of ADActivationObjectDN for the instance +func (instance *SoftwareLicensingProduct) SetPropertyADActivationObjectDN(value string) (err error) { + return instance.SetProperty("ADActivationObjectDN", (value)) +} + +// GetADActivationObjectDN gets the value of ADActivationObjectDN for the instance +func (instance *SoftwareLicensingProduct) GetPropertyADActivationObjectDN() (value string, err error) { + retValue, err := instance.GetProperty("ADActivationObjectDN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetADActivationObjectName sets the value of ADActivationObjectName for the instance +func (instance *SoftwareLicensingProduct) SetPropertyADActivationObjectName(value string) (err error) { + return instance.SetProperty("ADActivationObjectName", (value)) +} + +// GetADActivationObjectName gets the value of ADActivationObjectName for the instance +func (instance *SoftwareLicensingProduct) GetPropertyADActivationObjectName() (value string, err error) { + retValue, err := instance.GetProperty("ADActivationObjectName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetApplicationID sets the value of ApplicationID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyApplicationID(value string) (err error) { + return instance.SetProperty("ApplicationID", (value)) +} + +// GetApplicationID gets the value of ApplicationID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyApplicationID() (value string, err error) { + retValue, err := instance.GetProperty("ApplicationID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAutomaticVMActivationHostDigitalPid2 sets the value of AutomaticVMActivationHostDigitalPid2 for the instance +func (instance *SoftwareLicensingProduct) SetPropertyAutomaticVMActivationHostDigitalPid2(value string) (err error) { + return instance.SetProperty("AutomaticVMActivationHostDigitalPid2", (value)) +} + +// GetAutomaticVMActivationHostDigitalPid2 gets the value of AutomaticVMActivationHostDigitalPid2 for the instance +func (instance *SoftwareLicensingProduct) GetPropertyAutomaticVMActivationHostDigitalPid2() (value string, err error) { + retValue, err := instance.GetProperty("AutomaticVMActivationHostDigitalPid2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAutomaticVMActivationHostMachineName sets the value of AutomaticVMActivationHostMachineName for the instance +func (instance *SoftwareLicensingProduct) SetPropertyAutomaticVMActivationHostMachineName(value string) (err error) { + return instance.SetProperty("AutomaticVMActivationHostMachineName", (value)) +} + +// GetAutomaticVMActivationHostMachineName gets the value of AutomaticVMActivationHostMachineName for the instance +func (instance *SoftwareLicensingProduct) GetPropertyAutomaticVMActivationHostMachineName() (value string, err error) { + retValue, err := instance.GetProperty("AutomaticVMActivationHostMachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAutomaticVMActivationLastActivationTime sets the value of AutomaticVMActivationLastActivationTime for the instance +func (instance *SoftwareLicensingProduct) SetPropertyAutomaticVMActivationLastActivationTime(value string) (err error) { + return instance.SetProperty("AutomaticVMActivationLastActivationTime", (value)) +} + +// GetAutomaticVMActivationLastActivationTime gets the value of AutomaticVMActivationLastActivationTime for the instance +func (instance *SoftwareLicensingProduct) GetPropertyAutomaticVMActivationLastActivationTime() (value string, err error) { + retValue, err := instance.GetProperty("AutomaticVMActivationLastActivationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *SoftwareLicensingProduct) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *SoftwareLicensingProduct) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiscoveredKeyManagementServiceMachineIpAddress sets the value of DiscoveredKeyManagementServiceMachineIpAddress for the instance +func (instance *SoftwareLicensingProduct) SetPropertyDiscoveredKeyManagementServiceMachineIpAddress(value string) (err error) { + return instance.SetProperty("DiscoveredKeyManagementServiceMachineIpAddress", (value)) +} + +// GetDiscoveredKeyManagementServiceMachineIpAddress gets the value of DiscoveredKeyManagementServiceMachineIpAddress for the instance +func (instance *SoftwareLicensingProduct) GetPropertyDiscoveredKeyManagementServiceMachineIpAddress() (value string, err error) { + retValue, err := instance.GetProperty("DiscoveredKeyManagementServiceMachineIpAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiscoveredKeyManagementServiceMachineName sets the value of DiscoveredKeyManagementServiceMachineName for the instance +func (instance *SoftwareLicensingProduct) SetPropertyDiscoveredKeyManagementServiceMachineName(value string) (err error) { + return instance.SetProperty("DiscoveredKeyManagementServiceMachineName", (value)) +} + +// GetDiscoveredKeyManagementServiceMachineName gets the value of DiscoveredKeyManagementServiceMachineName for the instance +func (instance *SoftwareLicensingProduct) GetPropertyDiscoveredKeyManagementServiceMachineName() (value string, err error) { + retValue, err := instance.GetProperty("DiscoveredKeyManagementServiceMachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiscoveredKeyManagementServiceMachinePort sets the value of DiscoveredKeyManagementServiceMachinePort for the instance +func (instance *SoftwareLicensingProduct) SetPropertyDiscoveredKeyManagementServiceMachinePort(value uint32) (err error) { + return instance.SetProperty("DiscoveredKeyManagementServiceMachinePort", (value)) +} + +// GetDiscoveredKeyManagementServiceMachinePort gets the value of DiscoveredKeyManagementServiceMachinePort for the instance +func (instance *SoftwareLicensingProduct) GetPropertyDiscoveredKeyManagementServiceMachinePort() (value uint32, err error) { + retValue, err := instance.GetProperty("DiscoveredKeyManagementServiceMachinePort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEvaluationEndDate sets the value of EvaluationEndDate for the instance +func (instance *SoftwareLicensingProduct) SetPropertyEvaluationEndDate(value string) (err error) { + return instance.SetProperty("EvaluationEndDate", (value)) +} + +// GetEvaluationEndDate gets the value of EvaluationEndDate for the instance +func (instance *SoftwareLicensingProduct) GetPropertyEvaluationEndDate() (value string, err error) { + retValue, err := instance.GetProperty("EvaluationEndDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExtendedGrace sets the value of ExtendedGrace for the instance +func (instance *SoftwareLicensingProduct) SetPropertyExtendedGrace(value uint32) (err error) { + return instance.SetProperty("ExtendedGrace", (value)) +} + +// GetExtendedGrace gets the value of ExtendedGrace for the instance +func (instance *SoftwareLicensingProduct) GetPropertyExtendedGrace() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedGrace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGenuineStatus sets the value of GenuineStatus for the instance +func (instance *SoftwareLicensingProduct) SetPropertyGenuineStatus(value uint32) (err error) { + return instance.SetProperty("GenuineStatus", (value)) +} + +// GetGenuineStatus gets the value of GenuineStatus for the instance +func (instance *SoftwareLicensingProduct) GetPropertyGenuineStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("GenuineStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGracePeriodRemaining sets the value of GracePeriodRemaining for the instance +func (instance *SoftwareLicensingProduct) SetPropertyGracePeriodRemaining(value uint32) (err error) { + return instance.SetProperty("GracePeriodRemaining", (value)) +} + +// GetGracePeriodRemaining gets the value of GracePeriodRemaining for the instance +func (instance *SoftwareLicensingProduct) GetPropertyGracePeriodRemaining() (value uint32, err error) { + retValue, err := instance.GetProperty("GracePeriodRemaining") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIAID sets the value of IAID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyIAID(value string) (err error) { + return instance.SetProperty("IAID", (value)) +} + +// GetIAID gets the value of IAID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyIAID() (value string, err error) { + retValue, err := instance.GetProperty("IAID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetID sets the value of ID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyID(value string) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyID() (value string, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsKeyManagementServiceMachine sets the value of IsKeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingProduct) SetPropertyIsKeyManagementServiceMachine(value uint32) (err error) { + return instance.SetProperty("IsKeyManagementServiceMachine", (value)) +} + +// GetIsKeyManagementServiceMachine gets the value of IsKeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingProduct) GetPropertyIsKeyManagementServiceMachine() (value uint32, err error) { + retValue, err := instance.GetProperty("IsKeyManagementServiceMachine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceCurrentCount sets the value of KeyManagementServiceCurrentCount for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceCurrentCount(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceCurrentCount", (value)) +} + +// GetKeyManagementServiceCurrentCount gets the value of KeyManagementServiceCurrentCount for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceCurrentCount() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceCurrentCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceFailedRequests sets the value of KeyManagementServiceFailedRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceFailedRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceFailedRequests", (value)) +} + +// GetKeyManagementServiceFailedRequests gets the value of KeyManagementServiceFailedRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceFailedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceFailedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceLicensedRequests sets the value of KeyManagementServiceLicensedRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceLicensedRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceLicensedRequests", (value)) +} + +// GetKeyManagementServiceLicensedRequests gets the value of KeyManagementServiceLicensedRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceLicensedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceLicensedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceLookupDomain sets the value of KeyManagementServiceLookupDomain for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceLookupDomain(value string) (err error) { + return instance.SetProperty("KeyManagementServiceLookupDomain", (value)) +} + +// GetKeyManagementServiceLookupDomain gets the value of KeyManagementServiceLookupDomain for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceLookupDomain() (value string, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceLookupDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyManagementServiceMachine sets the value of KeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceMachine(value string) (err error) { + return instance.SetProperty("KeyManagementServiceMachine", (value)) +} + +// GetKeyManagementServiceMachine gets the value of KeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceMachine() (value string, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceMachine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyManagementServiceNonGenuineGraceRequests sets the value of KeyManagementServiceNonGenuineGraceRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceNonGenuineGraceRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceNonGenuineGraceRequests", (value)) +} + +// GetKeyManagementServiceNonGenuineGraceRequests gets the value of KeyManagementServiceNonGenuineGraceRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceNonGenuineGraceRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceNonGenuineGraceRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceNotificationRequests sets the value of KeyManagementServiceNotificationRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceNotificationRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceNotificationRequests", (value)) +} + +// GetKeyManagementServiceNotificationRequests gets the value of KeyManagementServiceNotificationRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceNotificationRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceNotificationRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceOOBGraceRequests sets the value of KeyManagementServiceOOBGraceRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceOOBGraceRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceOOBGraceRequests", (value)) +} + +// GetKeyManagementServiceOOBGraceRequests gets the value of KeyManagementServiceOOBGraceRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceOOBGraceRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceOOBGraceRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceOOTGraceRequests sets the value of KeyManagementServiceOOTGraceRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceOOTGraceRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceOOTGraceRequests", (value)) +} + +// GetKeyManagementServiceOOTGraceRequests gets the value of KeyManagementServiceOOTGraceRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceOOTGraceRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceOOTGraceRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServicePort sets the value of KeyManagementServicePort for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServicePort(value uint32) (err error) { + return instance.SetProperty("KeyManagementServicePort", (value)) +} + +// GetKeyManagementServicePort gets the value of KeyManagementServicePort for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServicePort() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServicePort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceProductKeyID sets the value of KeyManagementServiceProductKeyID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceProductKeyID(value string) (err error) { + return instance.SetProperty("KeyManagementServiceProductKeyID", (value)) +} + +// GetKeyManagementServiceProductKeyID gets the value of KeyManagementServiceProductKeyID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceProductKeyID() (value string, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceProductKeyID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyManagementServiceTotalRequests sets the value of KeyManagementServiceTotalRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceTotalRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceTotalRequests", (value)) +} + +// GetKeyManagementServiceTotalRequests gets the value of KeyManagementServiceTotalRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceTotalRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceTotalRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceUnlicensedRequests sets the value of KeyManagementServiceUnlicensedRequests for the instance +func (instance *SoftwareLicensingProduct) SetPropertyKeyManagementServiceUnlicensedRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceUnlicensedRequests", (value)) +} + +// GetKeyManagementServiceUnlicensedRequests gets the value of KeyManagementServiceUnlicensedRequests for the instance +func (instance *SoftwareLicensingProduct) GetPropertyKeyManagementServiceUnlicensedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceUnlicensedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLicenseDependsOn sets the value of LicenseDependsOn for the instance +func (instance *SoftwareLicensingProduct) SetPropertyLicenseDependsOn(value string) (err error) { + return instance.SetProperty("LicenseDependsOn", (value)) +} + +// GetLicenseDependsOn gets the value of LicenseDependsOn for the instance +func (instance *SoftwareLicensingProduct) GetPropertyLicenseDependsOn() (value string, err error) { + retValue, err := instance.GetProperty("LicenseDependsOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLicenseFamily sets the value of LicenseFamily for the instance +func (instance *SoftwareLicensingProduct) SetPropertyLicenseFamily(value string) (err error) { + return instance.SetProperty("LicenseFamily", (value)) +} + +// GetLicenseFamily gets the value of LicenseFamily for the instance +func (instance *SoftwareLicensingProduct) GetPropertyLicenseFamily() (value string, err error) { + retValue, err := instance.GetProperty("LicenseFamily") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLicenseIsAddon sets the value of LicenseIsAddon for the instance +func (instance *SoftwareLicensingProduct) SetPropertyLicenseIsAddon(value bool) (err error) { + return instance.SetProperty("LicenseIsAddon", (value)) +} + +// GetLicenseIsAddon gets the value of LicenseIsAddon for the instance +func (instance *SoftwareLicensingProduct) GetPropertyLicenseIsAddon() (value bool, err error) { + retValue, err := instance.GetProperty("LicenseIsAddon") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLicenseStatus sets the value of LicenseStatus for the instance +func (instance *SoftwareLicensingProduct) SetPropertyLicenseStatus(value uint32) (err error) { + return instance.SetProperty("LicenseStatus", (value)) +} + +// GetLicenseStatus gets the value of LicenseStatus for the instance +func (instance *SoftwareLicensingProduct) GetPropertyLicenseStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("LicenseStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLicenseStatusReason sets the value of LicenseStatusReason for the instance +func (instance *SoftwareLicensingProduct) SetPropertyLicenseStatusReason(value uint32) (err error) { + return instance.SetProperty("LicenseStatusReason", (value)) +} + +// GetLicenseStatusReason gets the value of LicenseStatusReason for the instance +func (instance *SoftwareLicensingProduct) GetPropertyLicenseStatusReason() (value uint32, err error) { + retValue, err := instance.GetProperty("LicenseStatusReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMachineURL sets the value of MachineURL for the instance +func (instance *SoftwareLicensingProduct) SetPropertyMachineURL(value string) (err error) { + return instance.SetProperty("MachineURL", (value)) +} + +// GetMachineURL gets the value of MachineURL for the instance +func (instance *SoftwareLicensingProduct) GetPropertyMachineURL() (value string, err error) { + retValue, err := instance.GetProperty("MachineURL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *SoftwareLicensingProduct) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *SoftwareLicensingProduct) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOfflineInstallationId sets the value of OfflineInstallationId for the instance +func (instance *SoftwareLicensingProduct) SetPropertyOfflineInstallationId(value string) (err error) { + return instance.SetProperty("OfflineInstallationId", (value)) +} + +// GetOfflineInstallationId gets the value of OfflineInstallationId for the instance +func (instance *SoftwareLicensingProduct) GetPropertyOfflineInstallationId() (value string, err error) { + retValue, err := instance.GetProperty("OfflineInstallationId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPartialProductKey sets the value of PartialProductKey for the instance +func (instance *SoftwareLicensingProduct) SetPropertyPartialProductKey(value string) (err error) { + return instance.SetProperty("PartialProductKey", (value)) +} + +// GetPartialProductKey gets the value of PartialProductKey for the instance +func (instance *SoftwareLicensingProduct) GetPropertyPartialProductKey() (value string, err error) { + retValue, err := instance.GetProperty("PartialProductKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProcessorURL sets the value of ProcessorURL for the instance +func (instance *SoftwareLicensingProduct) SetPropertyProcessorURL(value string) (err error) { + return instance.SetProperty("ProcessorURL", (value)) +} + +// GetProcessorURL gets the value of ProcessorURL for the instance +func (instance *SoftwareLicensingProduct) GetPropertyProcessorURL() (value string, err error) { + retValue, err := instance.GetProperty("ProcessorURL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductKeyChannel sets the value of ProductKeyChannel for the instance +func (instance *SoftwareLicensingProduct) SetPropertyProductKeyChannel(value string) (err error) { + return instance.SetProperty("ProductKeyChannel", (value)) +} + +// GetProductKeyChannel gets the value of ProductKeyChannel for the instance +func (instance *SoftwareLicensingProduct) GetPropertyProductKeyChannel() (value string, err error) { + retValue, err := instance.GetProperty("ProductKeyChannel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductKeyID sets the value of ProductKeyID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyProductKeyID(value string) (err error) { + return instance.SetProperty("ProductKeyID", (value)) +} + +// GetProductKeyID gets the value of ProductKeyID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyProductKeyID() (value string, err error) { + retValue, err := instance.GetProperty("ProductKeyID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductKeyID2 sets the value of ProductKeyID2 for the instance +func (instance *SoftwareLicensingProduct) SetPropertyProductKeyID2(value string) (err error) { + return instance.SetProperty("ProductKeyID2", (value)) +} + +// GetProductKeyID2 gets the value of ProductKeyID2 for the instance +func (instance *SoftwareLicensingProduct) GetPropertyProductKeyID2() (value string, err error) { + retValue, err := instance.GetProperty("ProductKeyID2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductKeyURL sets the value of ProductKeyURL for the instance +func (instance *SoftwareLicensingProduct) SetPropertyProductKeyURL(value string) (err error) { + return instance.SetProperty("ProductKeyURL", (value)) +} + +// GetProductKeyURL gets the value of ProductKeyURL for the instance +func (instance *SoftwareLicensingProduct) GetPropertyProductKeyURL() (value string, err error) { + retValue, err := instance.GetProperty("ProductKeyURL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemainingAppReArmCount sets the value of RemainingAppReArmCount for the instance +func (instance *SoftwareLicensingProduct) SetPropertyRemainingAppReArmCount(value uint32) (err error) { + return instance.SetProperty("RemainingAppReArmCount", (value)) +} + +// GetRemainingAppReArmCount gets the value of RemainingAppReArmCount for the instance +func (instance *SoftwareLicensingProduct) GetPropertyRemainingAppReArmCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RemainingAppReArmCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemainingSkuReArmCount sets the value of RemainingSkuReArmCount for the instance +func (instance *SoftwareLicensingProduct) SetPropertyRemainingSkuReArmCount(value uint32) (err error) { + return instance.SetProperty("RemainingSkuReArmCount", (value)) +} + +// GetRemainingSkuReArmCount gets the value of RemainingSkuReArmCount for the instance +func (instance *SoftwareLicensingProduct) GetPropertyRemainingSkuReArmCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RemainingSkuReArmCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequiredClientCount sets the value of RequiredClientCount for the instance +func (instance *SoftwareLicensingProduct) SetPropertyRequiredClientCount(value uint32) (err error) { + return instance.SetProperty("RequiredClientCount", (value)) +} + +// GetRequiredClientCount gets the value of RequiredClientCount for the instance +func (instance *SoftwareLicensingProduct) GetPropertyRequiredClientCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RequiredClientCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTokenActivationAdditionalInfo sets the value of TokenActivationAdditionalInfo for the instance +func (instance *SoftwareLicensingProduct) SetPropertyTokenActivationAdditionalInfo(value string) (err error) { + return instance.SetProperty("TokenActivationAdditionalInfo", (value)) +} + +// GetTokenActivationAdditionalInfo gets the value of TokenActivationAdditionalInfo for the instance +func (instance *SoftwareLicensingProduct) GetPropertyTokenActivationAdditionalInfo() (value string, err error) { + retValue, err := instance.GetProperty("TokenActivationAdditionalInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTokenActivationCertificateThumbprint sets the value of TokenActivationCertificateThumbprint for the instance +func (instance *SoftwareLicensingProduct) SetPropertyTokenActivationCertificateThumbprint(value string) (err error) { + return instance.SetProperty("TokenActivationCertificateThumbprint", (value)) +} + +// GetTokenActivationCertificateThumbprint gets the value of TokenActivationCertificateThumbprint for the instance +func (instance *SoftwareLicensingProduct) GetPropertyTokenActivationCertificateThumbprint() (value string, err error) { + retValue, err := instance.GetProperty("TokenActivationCertificateThumbprint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTokenActivationGrantNumber sets the value of TokenActivationGrantNumber for the instance +func (instance *SoftwareLicensingProduct) SetPropertyTokenActivationGrantNumber(value uint32) (err error) { + return instance.SetProperty("TokenActivationGrantNumber", (value)) +} + +// GetTokenActivationGrantNumber gets the value of TokenActivationGrantNumber for the instance +func (instance *SoftwareLicensingProduct) GetPropertyTokenActivationGrantNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("TokenActivationGrantNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTokenActivationILID sets the value of TokenActivationILID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyTokenActivationILID(value string) (err error) { + return instance.SetProperty("TokenActivationILID", (value)) +} + +// GetTokenActivationILID gets the value of TokenActivationILID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyTokenActivationILID() (value string, err error) { + retValue, err := instance.GetProperty("TokenActivationILID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTokenActivationILVID sets the value of TokenActivationILVID for the instance +func (instance *SoftwareLicensingProduct) SetPropertyTokenActivationILVID(value uint32) (err error) { + return instance.SetProperty("TokenActivationILVID", (value)) +} + +// GetTokenActivationILVID gets the value of TokenActivationILVID for the instance +func (instance *SoftwareLicensingProduct) GetPropertyTokenActivationILVID() (value uint32, err error) { + retValue, err := instance.GetProperty("TokenActivationILVID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTrustedTime sets the value of TrustedTime for the instance +func (instance *SoftwareLicensingProduct) SetPropertyTrustedTime(value string) (err error) { + return instance.SetProperty("TrustedTime", (value)) +} + +// GetTrustedTime gets the value of TrustedTime for the instance +func (instance *SoftwareLicensingProduct) GetPropertyTrustedTime() (value string, err error) { + retValue, err := instance.GetProperty("TrustedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUseLicenseURL sets the value of UseLicenseURL for the instance +func (instance *SoftwareLicensingProduct) SetPropertyUseLicenseURL(value string) (err error) { + return instance.SetProperty("UseLicenseURL", (value)) +} + +// GetUseLicenseURL gets the value of UseLicenseURL for the instance +func (instance *SoftwareLicensingProduct) GetPropertyUseLicenseURL() (value string, err error) { + retValue, err := instance.GetProperty("UseLicenseURL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValidationURL sets the value of ValidationURL for the instance +func (instance *SoftwareLicensingProduct) SetPropertyValidationURL(value string) (err error) { + return instance.SetProperty("ValidationURL", (value)) +} + +// GetValidationURL gets the value of ValidationURL for the instance +func (instance *SoftwareLicensingProduct) GetPropertyValidationURL() (value string, err error) { + retValue, err := instance.GetProperty("ValidationURL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVLActivationInterval sets the value of VLActivationInterval for the instance +func (instance *SoftwareLicensingProduct) SetPropertyVLActivationInterval(value uint32) (err error) { + return instance.SetProperty("VLActivationInterval", (value)) +} + +// GetVLActivationInterval gets the value of VLActivationInterval for the instance +func (instance *SoftwareLicensingProduct) GetPropertyVLActivationInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("VLActivationInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVLActivationType sets the value of VLActivationType for the instance +func (instance *SoftwareLicensingProduct) SetPropertyVLActivationType(value uint32) (err error) { + return instance.SetProperty("VLActivationType", (value)) +} + +// GetVLActivationType gets the value of VLActivationType for the instance +func (instance *SoftwareLicensingProduct) GetPropertyVLActivationType() (value uint32, err error) { + retValue, err := instance.GetProperty("VLActivationType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVLActivationTypeEnabled sets the value of VLActivationTypeEnabled for the instance +func (instance *SoftwareLicensingProduct) SetPropertyVLActivationTypeEnabled(value uint32) (err error) { + return instance.SetProperty("VLActivationTypeEnabled", (value)) +} + +// GetVLActivationTypeEnabled gets the value of VLActivationTypeEnabled for the instance +func (instance *SoftwareLicensingProduct) GetPropertyVLActivationTypeEnabled() (value uint32, err error) { + retValue, err := instance.GetProperty("VLActivationTypeEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVLRenewalInterval sets the value of VLRenewalInterval for the instance +func (instance *SoftwareLicensingProduct) SetPropertyVLRenewalInterval(value uint32) (err error) { + return instance.SetProperty("VLRenewalInterval", (value)) +} + +// GetVLRenewalInterval gets the value of VLRenewalInterval for the instance +func (instance *SoftwareLicensingProduct) GetPropertyVLRenewalInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("VLRenewalInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +func (instance *SoftwareLicensingProduct) UninstallProductKey() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("UninstallProductKey") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingProduct) Activate() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Activate") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *SoftwareLicensingProduct) DepositOfflineConfirmationId( /* IN */ InstallationId string, + /* IN */ ConfirmationId string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DepositOfflineConfirmationId", InstallationId, ConfirmationId) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +// +func (instance *SoftwareLicensingProduct) GetPolicyInformationDWord( /* IN */ PolicyName string, + /* OUT */ PolicyValue uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetPolicyInformationDWord", PolicyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *SoftwareLicensingProduct) GetPolicyInformationString( /* IN */ PolicyName string, + /* OUT */ PolicyValue string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetPolicyInformationString", PolicyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingProduct) SetKeyManagementServiceMachine( /* IN */ MachineName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServiceMachine", MachineName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingProduct) ClearKeyManagementServiceMachine() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServiceMachine") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingProduct) SetKeyManagementServicePort( /* IN */ PortNumber uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServicePort", PortNumber) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingProduct) ClearKeyManagementServicePort() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServicePort") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingProduct) SetKeyManagementServiceLookupDomain( /* IN */ LookupDomain string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServiceLookupDomain", LookupDomain) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingProduct) ClearKeyManagementServiceLookupDomain() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServiceLookupDomain") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *SoftwareLicensingProduct) GetTokenActivationGrants( /* OUT */ Grants []string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetTokenActivationGrants") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *SoftwareLicensingProduct) GenerateTokenActivationChallenge( /* OUT */ Challenge string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GenerateTokenActivationChallenge") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +func (instance *SoftwareLicensingProduct) DepositTokenActivationResponse( /* IN */ Challenge string, + /* IN */ Response string, + /* IN */ CertChain string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DepositTokenActivationResponse", Challenge, Response, CertChain) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingProduct) SetVLActivationTypeEnabled( /* IN */ ActivationType uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetVLActivationTypeEnabled", ActivationType) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingProduct) ClearVLActivationTypeEnabled() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearVLActivationTypeEnabled") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingProduct) ReArmSku() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ReArmSku") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingService.go new file mode 100644 index 00000000..60e863ca --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingService.go @@ -0,0 +1,1576 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// SoftwareLicensingService struct +type SoftwareLicensingService struct { + *cim.WmiInstance + + // + ClientMachineID string + + // + DiscoveredKeyManagementServiceMachineIpAddress string + + // + DiscoveredKeyManagementServiceMachineName string + + // + DiscoveredKeyManagementServiceMachinePort uint32 + + // + IsKeyManagementServiceMachine uint32 + + // + KeyManagementServiceCurrentCount uint32 + + // + KeyManagementServiceDnsPublishing bool + + // + KeyManagementServiceFailedRequests uint32 + + // + KeyManagementServiceHostCaching bool + + // + KeyManagementServiceLicensedRequests uint32 + + // + KeyManagementServiceListeningPort uint32 + + // + KeyManagementServiceLookupDomain string + + // + KeyManagementServiceLowPriority bool + + // + KeyManagementServiceMachine string + + // + KeyManagementServiceNonGenuineGraceRequests uint32 + + // + KeyManagementServiceNotificationRequests uint32 + + // + KeyManagementServiceOOBGraceRequests uint32 + + // + KeyManagementServiceOOTGraceRequests uint32 + + // + KeyManagementServicePort uint32 + + // + KeyManagementServiceProductKeyID string + + // + KeyManagementServiceTotalRequests uint32 + + // + KeyManagementServiceUnlicensedRequests uint32 + + // + OA2xBiosMarkerMinorVersion uint32 + + // + OA2xBiosMarkerStatus uint32 + + // + OA3xOriginalProductKey string + + // + OA3xOriginalProductKeyDescription string + + // + OA3xOriginalProductKeyPkPn string + + // + PolicyCacheRefreshRequired uint32 + + // + RemainingWindowsReArmCount uint32 + + // + RequiredClientCount uint32 + + // + TokenActivationAdditionalInfo string + + // + TokenActivationCertificateThumbprint string + + // + TokenActivationGrantNumber uint32 + + // + TokenActivationILID string + + // + TokenActivationILVID uint32 + + // + Version string + + // + VLActivationInterval uint32 + + // + VLRenewalInterval uint32 +} + +func NewSoftwareLicensingServiceEx1(instance *cim.WmiInstance) (newInstance *SoftwareLicensingService, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &SoftwareLicensingService{ + WmiInstance: tmp, + } + return +} + +func NewSoftwareLicensingServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *SoftwareLicensingService, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &SoftwareLicensingService{ + WmiInstance: tmp, + } + return +} + +// SetClientMachineID sets the value of ClientMachineID for the instance +func (instance *SoftwareLicensingService) SetPropertyClientMachineID(value string) (err error) { + return instance.SetProperty("ClientMachineID", (value)) +} + +// GetClientMachineID gets the value of ClientMachineID for the instance +func (instance *SoftwareLicensingService) GetPropertyClientMachineID() (value string, err error) { + retValue, err := instance.GetProperty("ClientMachineID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiscoveredKeyManagementServiceMachineIpAddress sets the value of DiscoveredKeyManagementServiceMachineIpAddress for the instance +func (instance *SoftwareLicensingService) SetPropertyDiscoveredKeyManagementServiceMachineIpAddress(value string) (err error) { + return instance.SetProperty("DiscoveredKeyManagementServiceMachineIpAddress", (value)) +} + +// GetDiscoveredKeyManagementServiceMachineIpAddress gets the value of DiscoveredKeyManagementServiceMachineIpAddress for the instance +func (instance *SoftwareLicensingService) GetPropertyDiscoveredKeyManagementServiceMachineIpAddress() (value string, err error) { + retValue, err := instance.GetProperty("DiscoveredKeyManagementServiceMachineIpAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiscoveredKeyManagementServiceMachineName sets the value of DiscoveredKeyManagementServiceMachineName for the instance +func (instance *SoftwareLicensingService) SetPropertyDiscoveredKeyManagementServiceMachineName(value string) (err error) { + return instance.SetProperty("DiscoveredKeyManagementServiceMachineName", (value)) +} + +// GetDiscoveredKeyManagementServiceMachineName gets the value of DiscoveredKeyManagementServiceMachineName for the instance +func (instance *SoftwareLicensingService) GetPropertyDiscoveredKeyManagementServiceMachineName() (value string, err error) { + retValue, err := instance.GetProperty("DiscoveredKeyManagementServiceMachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiscoveredKeyManagementServiceMachinePort sets the value of DiscoveredKeyManagementServiceMachinePort for the instance +func (instance *SoftwareLicensingService) SetPropertyDiscoveredKeyManagementServiceMachinePort(value uint32) (err error) { + return instance.SetProperty("DiscoveredKeyManagementServiceMachinePort", (value)) +} + +// GetDiscoveredKeyManagementServiceMachinePort gets the value of DiscoveredKeyManagementServiceMachinePort for the instance +func (instance *SoftwareLicensingService) GetPropertyDiscoveredKeyManagementServiceMachinePort() (value uint32, err error) { + retValue, err := instance.GetProperty("DiscoveredKeyManagementServiceMachinePort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsKeyManagementServiceMachine sets the value of IsKeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingService) SetPropertyIsKeyManagementServiceMachine(value uint32) (err error) { + return instance.SetProperty("IsKeyManagementServiceMachine", (value)) +} + +// GetIsKeyManagementServiceMachine gets the value of IsKeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingService) GetPropertyIsKeyManagementServiceMachine() (value uint32, err error) { + retValue, err := instance.GetProperty("IsKeyManagementServiceMachine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceCurrentCount sets the value of KeyManagementServiceCurrentCount for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceCurrentCount(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceCurrentCount", (value)) +} + +// GetKeyManagementServiceCurrentCount gets the value of KeyManagementServiceCurrentCount for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceCurrentCount() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceCurrentCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceDnsPublishing sets the value of KeyManagementServiceDnsPublishing for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceDnsPublishing(value bool) (err error) { + return instance.SetProperty("KeyManagementServiceDnsPublishing", (value)) +} + +// GetKeyManagementServiceDnsPublishing gets the value of KeyManagementServiceDnsPublishing for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceDnsPublishing() (value bool, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceDnsPublishing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetKeyManagementServiceFailedRequests sets the value of KeyManagementServiceFailedRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceFailedRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceFailedRequests", (value)) +} + +// GetKeyManagementServiceFailedRequests gets the value of KeyManagementServiceFailedRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceFailedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceFailedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceHostCaching sets the value of KeyManagementServiceHostCaching for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceHostCaching(value bool) (err error) { + return instance.SetProperty("KeyManagementServiceHostCaching", (value)) +} + +// GetKeyManagementServiceHostCaching gets the value of KeyManagementServiceHostCaching for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceHostCaching() (value bool, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceHostCaching") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetKeyManagementServiceLicensedRequests sets the value of KeyManagementServiceLicensedRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceLicensedRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceLicensedRequests", (value)) +} + +// GetKeyManagementServiceLicensedRequests gets the value of KeyManagementServiceLicensedRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceLicensedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceLicensedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceListeningPort sets the value of KeyManagementServiceListeningPort for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceListeningPort(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceListeningPort", (value)) +} + +// GetKeyManagementServiceListeningPort gets the value of KeyManagementServiceListeningPort for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceListeningPort() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceListeningPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceLookupDomain sets the value of KeyManagementServiceLookupDomain for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceLookupDomain(value string) (err error) { + return instance.SetProperty("KeyManagementServiceLookupDomain", (value)) +} + +// GetKeyManagementServiceLookupDomain gets the value of KeyManagementServiceLookupDomain for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceLookupDomain() (value string, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceLookupDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyManagementServiceLowPriority sets the value of KeyManagementServiceLowPriority for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceLowPriority(value bool) (err error) { + return instance.SetProperty("KeyManagementServiceLowPriority", (value)) +} + +// GetKeyManagementServiceLowPriority gets the value of KeyManagementServiceLowPriority for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceLowPriority() (value bool, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceLowPriority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetKeyManagementServiceMachine sets the value of KeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceMachine(value string) (err error) { + return instance.SetProperty("KeyManagementServiceMachine", (value)) +} + +// GetKeyManagementServiceMachine gets the value of KeyManagementServiceMachine for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceMachine() (value string, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceMachine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyManagementServiceNonGenuineGraceRequests sets the value of KeyManagementServiceNonGenuineGraceRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceNonGenuineGraceRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceNonGenuineGraceRequests", (value)) +} + +// GetKeyManagementServiceNonGenuineGraceRequests gets the value of KeyManagementServiceNonGenuineGraceRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceNonGenuineGraceRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceNonGenuineGraceRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceNotificationRequests sets the value of KeyManagementServiceNotificationRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceNotificationRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceNotificationRequests", (value)) +} + +// GetKeyManagementServiceNotificationRequests gets the value of KeyManagementServiceNotificationRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceNotificationRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceNotificationRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceOOBGraceRequests sets the value of KeyManagementServiceOOBGraceRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceOOBGraceRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceOOBGraceRequests", (value)) +} + +// GetKeyManagementServiceOOBGraceRequests gets the value of KeyManagementServiceOOBGraceRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceOOBGraceRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceOOBGraceRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceOOTGraceRequests sets the value of KeyManagementServiceOOTGraceRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceOOTGraceRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceOOTGraceRequests", (value)) +} + +// GetKeyManagementServiceOOTGraceRequests gets the value of KeyManagementServiceOOTGraceRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceOOTGraceRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceOOTGraceRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServicePort sets the value of KeyManagementServicePort for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServicePort(value uint32) (err error) { + return instance.SetProperty("KeyManagementServicePort", (value)) +} + +// GetKeyManagementServicePort gets the value of KeyManagementServicePort for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServicePort() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServicePort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceProductKeyID sets the value of KeyManagementServiceProductKeyID for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceProductKeyID(value string) (err error) { + return instance.SetProperty("KeyManagementServiceProductKeyID", (value)) +} + +// GetKeyManagementServiceProductKeyID gets the value of KeyManagementServiceProductKeyID for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceProductKeyID() (value string, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceProductKeyID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyManagementServiceTotalRequests sets the value of KeyManagementServiceTotalRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceTotalRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceTotalRequests", (value)) +} + +// GetKeyManagementServiceTotalRequests gets the value of KeyManagementServiceTotalRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceTotalRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceTotalRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeyManagementServiceUnlicensedRequests sets the value of KeyManagementServiceUnlicensedRequests for the instance +func (instance *SoftwareLicensingService) SetPropertyKeyManagementServiceUnlicensedRequests(value uint32) (err error) { + return instance.SetProperty("KeyManagementServiceUnlicensedRequests", (value)) +} + +// GetKeyManagementServiceUnlicensedRequests gets the value of KeyManagementServiceUnlicensedRequests for the instance +func (instance *SoftwareLicensingService) GetPropertyKeyManagementServiceUnlicensedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KeyManagementServiceUnlicensedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOA2xBiosMarkerMinorVersion sets the value of OA2xBiosMarkerMinorVersion for the instance +func (instance *SoftwareLicensingService) SetPropertyOA2xBiosMarkerMinorVersion(value uint32) (err error) { + return instance.SetProperty("OA2xBiosMarkerMinorVersion", (value)) +} + +// GetOA2xBiosMarkerMinorVersion gets the value of OA2xBiosMarkerMinorVersion for the instance +func (instance *SoftwareLicensingService) GetPropertyOA2xBiosMarkerMinorVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("OA2xBiosMarkerMinorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOA2xBiosMarkerStatus sets the value of OA2xBiosMarkerStatus for the instance +func (instance *SoftwareLicensingService) SetPropertyOA2xBiosMarkerStatus(value uint32) (err error) { + return instance.SetProperty("OA2xBiosMarkerStatus", (value)) +} + +// GetOA2xBiosMarkerStatus gets the value of OA2xBiosMarkerStatus for the instance +func (instance *SoftwareLicensingService) GetPropertyOA2xBiosMarkerStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("OA2xBiosMarkerStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOA3xOriginalProductKey sets the value of OA3xOriginalProductKey for the instance +func (instance *SoftwareLicensingService) SetPropertyOA3xOriginalProductKey(value string) (err error) { + return instance.SetProperty("OA3xOriginalProductKey", (value)) +} + +// GetOA3xOriginalProductKey gets the value of OA3xOriginalProductKey for the instance +func (instance *SoftwareLicensingService) GetPropertyOA3xOriginalProductKey() (value string, err error) { + retValue, err := instance.GetProperty("OA3xOriginalProductKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOA3xOriginalProductKeyDescription sets the value of OA3xOriginalProductKeyDescription for the instance +func (instance *SoftwareLicensingService) SetPropertyOA3xOriginalProductKeyDescription(value string) (err error) { + return instance.SetProperty("OA3xOriginalProductKeyDescription", (value)) +} + +// GetOA3xOriginalProductKeyDescription gets the value of OA3xOriginalProductKeyDescription for the instance +func (instance *SoftwareLicensingService) GetPropertyOA3xOriginalProductKeyDescription() (value string, err error) { + retValue, err := instance.GetProperty("OA3xOriginalProductKeyDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOA3xOriginalProductKeyPkPn sets the value of OA3xOriginalProductKeyPkPn for the instance +func (instance *SoftwareLicensingService) SetPropertyOA3xOriginalProductKeyPkPn(value string) (err error) { + return instance.SetProperty("OA3xOriginalProductKeyPkPn", (value)) +} + +// GetOA3xOriginalProductKeyPkPn gets the value of OA3xOriginalProductKeyPkPn for the instance +func (instance *SoftwareLicensingService) GetPropertyOA3xOriginalProductKeyPkPn() (value string, err error) { + retValue, err := instance.GetProperty("OA3xOriginalProductKeyPkPn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPolicyCacheRefreshRequired sets the value of PolicyCacheRefreshRequired for the instance +func (instance *SoftwareLicensingService) SetPropertyPolicyCacheRefreshRequired(value uint32) (err error) { + return instance.SetProperty("PolicyCacheRefreshRequired", (value)) +} + +// GetPolicyCacheRefreshRequired gets the value of PolicyCacheRefreshRequired for the instance +func (instance *SoftwareLicensingService) GetPropertyPolicyCacheRefreshRequired() (value uint32, err error) { + retValue, err := instance.GetProperty("PolicyCacheRefreshRequired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemainingWindowsReArmCount sets the value of RemainingWindowsReArmCount for the instance +func (instance *SoftwareLicensingService) SetPropertyRemainingWindowsReArmCount(value uint32) (err error) { + return instance.SetProperty("RemainingWindowsReArmCount", (value)) +} + +// GetRemainingWindowsReArmCount gets the value of RemainingWindowsReArmCount for the instance +func (instance *SoftwareLicensingService) GetPropertyRemainingWindowsReArmCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RemainingWindowsReArmCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequiredClientCount sets the value of RequiredClientCount for the instance +func (instance *SoftwareLicensingService) SetPropertyRequiredClientCount(value uint32) (err error) { + return instance.SetProperty("RequiredClientCount", (value)) +} + +// GetRequiredClientCount gets the value of RequiredClientCount for the instance +func (instance *SoftwareLicensingService) GetPropertyRequiredClientCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RequiredClientCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTokenActivationAdditionalInfo sets the value of TokenActivationAdditionalInfo for the instance +func (instance *SoftwareLicensingService) SetPropertyTokenActivationAdditionalInfo(value string) (err error) { + return instance.SetProperty("TokenActivationAdditionalInfo", (value)) +} + +// GetTokenActivationAdditionalInfo gets the value of TokenActivationAdditionalInfo for the instance +func (instance *SoftwareLicensingService) GetPropertyTokenActivationAdditionalInfo() (value string, err error) { + retValue, err := instance.GetProperty("TokenActivationAdditionalInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTokenActivationCertificateThumbprint sets the value of TokenActivationCertificateThumbprint for the instance +func (instance *SoftwareLicensingService) SetPropertyTokenActivationCertificateThumbprint(value string) (err error) { + return instance.SetProperty("TokenActivationCertificateThumbprint", (value)) +} + +// GetTokenActivationCertificateThumbprint gets the value of TokenActivationCertificateThumbprint for the instance +func (instance *SoftwareLicensingService) GetPropertyTokenActivationCertificateThumbprint() (value string, err error) { + retValue, err := instance.GetProperty("TokenActivationCertificateThumbprint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTokenActivationGrantNumber sets the value of TokenActivationGrantNumber for the instance +func (instance *SoftwareLicensingService) SetPropertyTokenActivationGrantNumber(value uint32) (err error) { + return instance.SetProperty("TokenActivationGrantNumber", (value)) +} + +// GetTokenActivationGrantNumber gets the value of TokenActivationGrantNumber for the instance +func (instance *SoftwareLicensingService) GetPropertyTokenActivationGrantNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("TokenActivationGrantNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTokenActivationILID sets the value of TokenActivationILID for the instance +func (instance *SoftwareLicensingService) SetPropertyTokenActivationILID(value string) (err error) { + return instance.SetProperty("TokenActivationILID", (value)) +} + +// GetTokenActivationILID gets the value of TokenActivationILID for the instance +func (instance *SoftwareLicensingService) GetPropertyTokenActivationILID() (value string, err error) { + retValue, err := instance.GetProperty("TokenActivationILID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTokenActivationILVID sets the value of TokenActivationILVID for the instance +func (instance *SoftwareLicensingService) SetPropertyTokenActivationILVID(value uint32) (err error) { + return instance.SetProperty("TokenActivationILVID", (value)) +} + +// GetTokenActivationILVID gets the value of TokenActivationILVID for the instance +func (instance *SoftwareLicensingService) GetPropertyTokenActivationILVID() (value uint32, err error) { + retValue, err := instance.GetProperty("TokenActivationILVID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *SoftwareLicensingService) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *SoftwareLicensingService) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVLActivationInterval sets the value of VLActivationInterval for the instance +func (instance *SoftwareLicensingService) SetPropertyVLActivationInterval(value uint32) (err error) { + return instance.SetProperty("VLActivationInterval", (value)) +} + +// GetVLActivationInterval gets the value of VLActivationInterval for the instance +func (instance *SoftwareLicensingService) GetPropertyVLActivationInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("VLActivationInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVLRenewalInterval sets the value of VLRenewalInterval for the instance +func (instance *SoftwareLicensingService) SetPropertyVLRenewalInterval(value uint32) (err error) { + return instance.SetProperty("VLRenewalInterval", (value)) +} + +// GetVLRenewalInterval gets the value of VLRenewalInterval for the instance +func (instance *SoftwareLicensingService) GetPropertyVLRenewalInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("VLRenewalInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// + +// +func (instance *SoftwareLicensingService) InstallProductKey( /* IN */ ProductKey string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("InstallProductKey", ProductKey) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) InstallLicense( /* IN */ License string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("InstallLicense", License) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) InstallLicensePackage( /* IN */ LicensePackage string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("InstallLicensePackage", LicensePackage) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetKeyManagementServiceMachine( /* IN */ MachineName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServiceMachine", MachineName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ClearKeyManagementServiceMachine() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServiceMachine") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetKeyManagementServicePort( /* IN */ PortNumber uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServicePort", PortNumber) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ClearKeyManagementServicePort() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServicePort") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetKeyManagementServiceLookupDomain( /* IN */ LookupDomain string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServiceLookupDomain", LookupDomain) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ClearKeyManagementServiceLookupDomain() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServiceLookupDomain") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetVLActivationInterval( /* IN */ ActivationInterval uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetVLActivationInterval", ActivationInterval) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetVLRenewalInterval( /* IN */ RenewalInterval uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetVLRenewalInterval", RenewalInterval) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ClearProductKeyFromRegistry() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearProductKeyFromRegistry") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *SoftwareLicensingService) AcquireGenuineTicket( /* IN */ TemplateId string, + /* IN */ ServerUrl string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AcquireGenuineTicket", TemplateId, ServerUrl) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ReArmWindows() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ReArmWindows") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) ReArmApp( /* IN */ ApplicationId string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ReArmApp", ApplicationId) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) RefreshLicenseStatus() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RefreshLicenseStatus") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetKeyManagementServiceListeningPort( /* IN */ PortNumber uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeyManagementServiceListeningPort", PortNumber) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ClearKeyManagementServiceListeningPort() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearKeyManagementServiceListeningPort") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) DisableKeyManagementServiceDnsPublishing( /* IN */ DisablePublishing bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DisableKeyManagementServiceDnsPublishing", DisablePublishing) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) EnableKeyManagementServiceLowPriority( /* IN */ EnableLowPriority bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableKeyManagementServiceLowPriority", EnableLowPriority) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) DisableKeyManagementServiceHostCaching( /* IN */ DisableCaching bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DisableKeyManagementServiceHostCaching", DisableCaching) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +// +func (instance *SoftwareLicensingService) GenerateActiveDirectoryOfflineActivationId( /* IN */ ProductKey string, + /* OUT */ InstallationID string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GenerateActiveDirectoryOfflineActivationId", ProductKey) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +func (instance *SoftwareLicensingService) DepositActiveDirectoryOfflineActivationConfirmation( /* IN */ ProductKey string, + /* IN */ ConfirmationID string, + /* IN */ ActivationObjectName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DepositActiveDirectoryOfflineActivationConfirmation", ProductKey, ConfirmationID, ActivationObjectName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *SoftwareLicensingService) DoActiveDirectoryOnlineActivation( /* IN */ ProductKey string, + /* IN */ ActivationObjectName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DoActiveDirectoryOnlineActivation", ProductKey, ActivationObjectName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *SoftwareLicensingService) SetVLActivationTypeEnabled( /* IN */ ActivationType uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetVLActivationTypeEnabled", ActivationType) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *SoftwareLicensingService) ClearVLActivationTypeEnabled() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearVLActivationTypeEnabled") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingTokenActivationLicense.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingTokenActivationLicense.go new file mode 100644 index 00000000..2926b529 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SoftwareLicensingTokenActivationLicense.go @@ -0,0 +1,274 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// SoftwareLicensingTokenActivationLicense struct +type SoftwareLicensingTokenActivationLicense struct { + *cim.WmiInstance + + // + AdditionalInfo string + + // + AuthorizationStatus uint32 + + // + Description string + + // + ExpirationDate string + + // + ID string + + // + ILID string + + // + ILVID uint32 +} + +func NewSoftwareLicensingTokenActivationLicenseEx1(instance *cim.WmiInstance) (newInstance *SoftwareLicensingTokenActivationLicense, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &SoftwareLicensingTokenActivationLicense{ + WmiInstance: tmp, + } + return +} + +func NewSoftwareLicensingTokenActivationLicenseEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *SoftwareLicensingTokenActivationLicense, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &SoftwareLicensingTokenActivationLicense{ + WmiInstance: tmp, + } + return +} + +// SetAdditionalInfo sets the value of AdditionalInfo for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyAdditionalInfo(value string) (err error) { + return instance.SetProperty("AdditionalInfo", (value)) +} + +// GetAdditionalInfo gets the value of AdditionalInfo for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyAdditionalInfo() (value string, err error) { + retValue, err := instance.GetProperty("AdditionalInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAuthorizationStatus sets the value of AuthorizationStatus for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyAuthorizationStatus(value uint32) (err error) { + return instance.SetProperty("AuthorizationStatus", (value)) +} + +// GetAuthorizationStatus gets the value of AuthorizationStatus for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyAuthorizationStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthorizationStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExpirationDate sets the value of ExpirationDate for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyExpirationDate(value string) (err error) { + return instance.SetProperty("ExpirationDate", (value)) +} + +// GetExpirationDate gets the value of ExpirationDate for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyExpirationDate() (value string, err error) { + retValue, err := instance.GetProperty("ExpirationDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetID sets the value of ID for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyID(value string) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyID() (value string, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetILID sets the value of ILID for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyILID(value string) (err error) { + return instance.SetProperty("ILID", (value)) +} + +// GetILID gets the value of ILID for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyILID() (value string, err error) { + retValue, err := instance.GetProperty("ILID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetILVID sets the value of ILVID for the instance +func (instance *SoftwareLicensingTokenActivationLicense) SetPropertyILVID(value uint32) (err error) { + return instance.SetProperty("ILVID", (value)) +} + +// GetILVID gets the value of ILVID for the instance +func (instance *SoftwareLicensingTokenActivationLicense) GetPropertyILVID() (value uint32, err error) { + retValue, err := instance.GetProperty("ILVID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +func (instance *SoftwareLicensingTokenActivationLicense) Uninstall() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Uninstall") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/StdRegProv.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/StdRegProv.go new file mode 100644 index 00000000..39f83ec2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/StdRegProv.go @@ -0,0 +1,463 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// StdRegProv struct +type StdRegProv struct { + *cim.WmiInstance +} + +func NewStdRegProvEx1(instance *cim.WmiInstance) (newInstance *StdRegProv, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &StdRegProv{ + WmiInstance: tmp, + } + return +} + +func NewStdRegProvEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *StdRegProv, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &StdRegProv{ + WmiInstance: tmp, + } + return +} + +// + +// +// + +// +func (instance *StdRegProv) CreateKey( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("CreateKey", hDefKey, sSubKeyName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *StdRegProv) DeleteKey( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DeleteKey", hDefKey, sSubKeyName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +// +func (instance *StdRegProv) EnumKey( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* OUT */ sNames []string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("EnumKey", hDefKey, sSubKeyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *StdRegProv) EnumValues( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* OUT */ sNames []string, + /* OUT */ Types []int32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("EnumValues", hDefKey, sSubKeyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +func (instance *StdRegProv) DeleteValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DeleteValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *StdRegProv) SetDWORDValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* IN */ uValue uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDWORDValue", hDefKey, sSubKeyName, sValueName, uValue) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *StdRegProv) SetQWORDValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* IN */ uValue uint64) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetQWORDValue", hDefKey, sSubKeyName, sValueName, uValue) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) GetDWORDValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* OUT */ uValue uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetDWORDValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) GetQWORDValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* OUT */ uValue uint64) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetQWORDValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +func (instance *StdRegProv) SetStringValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* IN */ sValue string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetStringValue", hDefKey, sSubKeyName, sValueName, sValue) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) GetStringValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* OUT */ sValue string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetStringValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +func (instance *StdRegProv) SetMultiStringValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* IN */ sValue []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetMultiStringValue", hDefKey, sSubKeyName, sValueName, sValue) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) GetMultiStringValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* OUT */ sValue []string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetMultiStringValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +func (instance *StdRegProv) SetExpandedStringValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* IN */ sValue string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetExpandedStringValue", hDefKey, sSubKeyName, sValueName, sValue) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) GetExpandedStringValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* OUT */ sValue string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetExpandedStringValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +func (instance *StdRegProv) SetBinaryValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* IN */ uValue []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetBinaryValue", hDefKey, sSubKeyName, sValueName, uValue) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) GetBinaryValue( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ sValueName string, + /* OUT */ uValue []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetBinaryValue", hDefKey, sSubKeyName, sValueName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *StdRegProv) CheckAccess( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ uRequired uint32, + /* OUT */ bGranted bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CheckAccess", hDefKey, sSubKeyName, uRequired) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +func (instance *StdRegProv) SetSecurityDescriptor( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* IN */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSecurityDescriptor", hDefKey, sSubKeyName, Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +// +func (instance *StdRegProv) GetSecurityDescriptor( /* IN */ hDefKey uint32, + /* IN */ sSubKeyName string, + /* OUT */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor", hDefKey, sSubKeyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemClass.go new file mode 100644 index 00000000..4bc8510c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemClass.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SystemClass struct +type __SystemClass struct { + *cim.WmiInstance +} + +func New__SystemClassEx1(instance *cim.WmiInstance) (newInstance *__SystemClass, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__SystemClass{ + WmiInstance: tmp, + } + return +} + +func New__SystemClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SystemClass, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SystemClass{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemEvent.go new file mode 100644 index 00000000..9811f5a6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SystemEvent struct +type __SystemEvent struct { + *__ExtrinsicEvent +} + +func New__SystemEventEx1(instance *cim.WmiInstance) (newInstance *__SystemEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &__SystemEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func New__SystemEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SystemEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SystemEvent{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemSecurity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemSecurity.go new file mode 100644 index 00000000..85aed72b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/SystemSecurity.go @@ -0,0 +1,154 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SystemSecurity struct +type __SystemSecurity struct { + *cim.WmiInstance +} + +func New__SystemSecurityEx1(instance *cim.WmiInstance) (newInstance *__SystemSecurity, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__SystemSecurity{ + WmiInstance: tmp, + } + return +} + +func New__SystemSecurityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SystemSecurity, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SystemSecurity{ + WmiInstance: tmp, + } + return +} + +// + +// +// +func (instance *__SystemSecurity) GetSD( /* OUT */ SD []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSD") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *__SystemSecurity) GetSecurityDescriptor( /* OUT */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *__SystemSecurity) Get9XUserList( /* OUT */ ul []__NTLMUser9X) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Get9XUserList") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *__SystemSecurity) SetSD( /* IN */ SD []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSD", SD) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *__SystemSecurity) SetSecurityDescriptor( /* IN */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *__SystemSecurity) Set9XUserList( /* IN */ ul []__NTLMUser9X) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Set9XUserList", ul) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *__SystemSecurity) GetCallerAccessRights( /* OUT */ rights int32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetCallerAccessRights") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TCPIPPrinterPort_Protocol.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TCPIPPrinterPort_Protocol.go new file mode 100644 index 00000000..f5250fea --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TCPIPPrinterPort_Protocol.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source TCPIPPrinterPort_Protocol +////////////////////////////////////////////// +package cimv2 + +// TCPIPPrinterPort_Protocol +type TCPIPPrinterPort_Protocol int + +const ( + // Raw enum + TCPIPPrinterPort_Protocol_Raw TCPIPPrinterPort_Protocol = 0 + // Lpr enum + TCPIPPrinterPort_Protocol_Lpr TCPIPPrinterPort_Protocol = 1 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerEvent.go new file mode 100644 index 00000000..218cb257 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __TimerEvent struct +type __TimerEvent struct { + *__Event + + // + NumFirings uint32 + + // + TimerId string +} + +func New__TimerEventEx1(instance *cim.WmiInstance) (newInstance *__TimerEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__TimerEvent{ + __Event: tmp, + } + return +} + +func New__TimerEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__TimerEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__TimerEvent{ + __Event: tmp, + } + return +} + +// SetNumFirings sets the value of NumFirings for the instance +func (instance *__TimerEvent) SetPropertyNumFirings(value uint32) (err error) { + return instance.SetProperty("NumFirings", (value)) +} + +// GetNumFirings gets the value of NumFirings for the instance +func (instance *__TimerEvent) GetPropertyNumFirings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumFirings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimerId sets the value of TimerId for the instance +func (instance *__TimerEvent) SetPropertyTimerId(value string) (err error) { + return instance.SetProperty("TimerId", (value)) +} + +// GetTimerId gets the value of TimerId for the instance +func (instance *__TimerEvent) GetPropertyTimerId() (value string, err error) { + retValue, err := instance.GetProperty("TimerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerInstruction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerInstruction.go new file mode 100644 index 00000000..94244cf1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerInstruction.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __TimerInstruction struct +type __TimerInstruction struct { + *__EventGenerator + + // + SkipIfPassed bool + + // + TimerId string +} + +func New__TimerInstructionEx1(instance *cim.WmiInstance) (newInstance *__TimerInstruction, err error) { + tmp, err := New__EventGeneratorEx1(instance) + + if err != nil { + return + } + newInstance = &__TimerInstruction{ + __EventGenerator: tmp, + } + return +} + +func New__TimerInstructionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__TimerInstruction, err error) { + tmp, err := New__EventGeneratorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__TimerInstruction{ + __EventGenerator: tmp, + } + return +} + +// SetSkipIfPassed sets the value of SkipIfPassed for the instance +func (instance *__TimerInstruction) SetPropertySkipIfPassed(value bool) (err error) { + return instance.SetProperty("SkipIfPassed", (value)) +} + +// GetSkipIfPassed gets the value of SkipIfPassed for the instance +func (instance *__TimerInstruction) GetPropertySkipIfPassed() (value bool, err error) { + retValue, err := instance.GetProperty("SkipIfPassed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTimerId sets the value of TimerId for the instance +func (instance *__TimerInstruction) SetPropertyTimerId(value string) (err error) { + return instance.SetProperty("TimerId", (value)) +} + +// GetTimerId gets the value of TimerId for the instance +func (instance *__TimerInstruction) GetPropertyTimerId() (value string, err error) { + retValue, err := instance.GetProperty("TimerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerNextFiring.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerNextFiring.go new file mode 100644 index 00000000..ef161161 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/TimerNextFiring.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __TimerNextFiring struct +type __TimerNextFiring struct { + *__IndicationRelated + + // + NextEvent64BitTime int64 + + // + TimerId string +} + +func New__TimerNextFiringEx1(instance *cim.WmiInstance) (newInstance *__TimerNextFiring, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__TimerNextFiring{ + __IndicationRelated: tmp, + } + return +} + +func New__TimerNextFiringEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__TimerNextFiring, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__TimerNextFiring{ + __IndicationRelated: tmp, + } + return +} + +// SetNextEvent64BitTime sets the value of NextEvent64BitTime for the instance +func (instance *__TimerNextFiring) SetPropertyNextEvent64BitTime(value int64) (err error) { + return instance.SetProperty("NextEvent64BitTime", (value)) +} + +// GetNextEvent64BitTime gets the value of NextEvent64BitTime for the instance +func (instance *__TimerNextFiring) GetPropertyNextEvent64BitTime() (value int64, err error) { + retValue, err := instance.GetProperty("NextEvent64BitTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetTimerId sets the value of TimerId for the instance +func (instance *__TimerNextFiring) SetPropertyTimerId(value string) (err error) { + return instance.SetProperty("TimerId", (value)) +} + +// GetTimerId gets the value of TimerId for the instance +func (instance *__TimerNextFiring) GetPropertyTimerId() (value string, err error) { + retValue, err := instance.GetProperty("TimerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Trustee.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Trustee.go new file mode 100644 index 00000000..75c1d2ac --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Trustee.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Trustee struct +type __Trustee struct { + *__SecurityRelatedClass + + // + Domain string + + // + Name string + + // + SID []uint8 + + // + SidLength uint32 + + // + SIDString string + + // + TIME_CREATED uint64 +} + +func New__TrusteeEx1(instance *cim.WmiInstance) (newInstance *__Trustee, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__Trustee{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__TrusteeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Trustee, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Trustee{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetDomain sets the value of Domain for the instance +func (instance *__Trustee) SetPropertyDomain(value string) (err error) { + return instance.SetProperty("Domain", (value)) +} + +// GetDomain gets the value of Domain for the instance +func (instance *__Trustee) GetPropertyDomain() (value string, err error) { + retValue, err := instance.GetProperty("Domain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *__Trustee) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__Trustee) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSID sets the value of SID for the instance +func (instance *__Trustee) SetPropertySID(value []uint8) (err error) { + return instance.SetProperty("SID", (value)) +} + +// GetSID gets the value of SID for the instance +func (instance *__Trustee) GetPropertySID() (value []uint8, err error) { + retValue, err := instance.GetProperty("SID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetSidLength sets the value of SidLength for the instance +func (instance *__Trustee) SetPropertySidLength(value uint32) (err error) { + return instance.SetProperty("SidLength", (value)) +} + +// GetSidLength gets the value of SidLength for the instance +func (instance *__Trustee) GetPropertySidLength() (value uint32, err error) { + retValue, err := instance.GetProperty("SidLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSIDString sets the value of SIDString for the instance +func (instance *__Trustee) SetPropertySIDString(value string) (err error) { + return instance.SetProperty("SIDString", (value)) +} + +// GetSIDString gets the value of SIDString for the instance +func (instance *__Trustee) GetPropertySIDString() (value string, err error) { + retValue, err := instance.GetProperty("SIDString") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__Trustee) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__Trustee) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserProfile_HealthStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserProfile_HealthStatus.go new file mode 100644 index 00000000..899c0fc5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserProfile_HealthStatus.go @@ -0,0 +1,23 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source UserProfile_HealthStatus +////////////////////////////////////////////// +package cimv2 + +// UserProfile_HealthStatus +type UserProfile_HealthStatus int + +const ( + // Healthy enum + UserProfile_HealthStatus_Healthy UserProfile_HealthStatus = 0 + // Unhealthy enum + UserProfile_HealthStatus_Unhealthy UserProfile_HealthStatus = 1 + // Caution enum + UserProfile_HealthStatus_Caution UserProfile_HealthStatus = 2 + // Not_Applicable enum + UserProfile_HealthStatus_Not_Applicable UserProfile_HealthStatus = 3 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_FolderRedirection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_FolderRedirection.go new file mode 100644 index 00000000..b0ea4812 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_FolderRedirection.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source UserStateConfigurationControls_FolderRedirection +////////////////////////////////////////////// +package cimv2 + +// UserStateConfigurationControls_FolderRedirection +type UserStateConfigurationControls_FolderRedirection int + +const ( + // GroupPolicy enum + UserStateConfigurationControls_FolderRedirection_GroupPolicy UserStateConfigurationControls_FolderRedirection = 0 + // WMI enum + UserStateConfigurationControls_FolderRedirection_WMI UserStateConfigurationControls_FolderRedirection = 1 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_OfflineFiles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_OfflineFiles.go new file mode 100644 index 00000000..3269c1e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_OfflineFiles.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source UserStateConfigurationControls_OfflineFiles +////////////////////////////////////////////// +package cimv2 + +// UserStateConfigurationControls_OfflineFiles +type UserStateConfigurationControls_OfflineFiles int + +const ( + // GroupPolicy enum + UserStateConfigurationControls_OfflineFiles_GroupPolicy UserStateConfigurationControls_OfflineFiles = 0 + // WMI enum + UserStateConfigurationControls_OfflineFiles_WMI UserStateConfigurationControls_OfflineFiles = 1 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_RoamingUserProfile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_RoamingUserProfile.go new file mode 100644 index 00000000..2fa61d0d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/UserStateConfigurationControls_RoamingUserProfile.go @@ -0,0 +1,19 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source UserStateConfigurationControls_RoamingUserProfile +////////////////////////////////////////////// +package cimv2 + +// UserStateConfigurationControls_RoamingUserProfile +type UserStateConfigurationControls_RoamingUserProfile int + +const ( + // GroupPolicy enum + UserStateConfigurationControls_RoamingUserProfile_GroupPolicy UserStateConfigurationControls_RoamingUserProfile = 0 + // WMI enum + UserStateConfigurationControls_RoamingUserProfile_WMI UserStateConfigurationControls_RoamingUserProfile = 1 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider.go new file mode 100644 index 00000000..f4500de7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Win32Provider struct +type __Win32Provider struct { + *__Provider + + // + ClientLoadableCLSID string + + // + CLSID string + + // + Concurrency int32 + + // + DefaultMachineName string + + // + Enabled bool + + // + HostingModel string + + // + ImpersonationLevel Win32Provider_ImpersonationLevel + + // + InitializationReentrancy Win32Provider_InitializationReentrancy + + // + InitializationTimeoutInterval string + + // + InitializeAsAdminFirst bool + + // + OperationTimeoutInterval string + + // + PerLocaleInitialization bool + + // + PerUserInitialization bool + + // + Pure bool + + // + SecurityDescriptor string + + // + SupportsExplicitShutdown bool + + // + SupportsExtendedStatus bool + + // + SupportsQuotas bool + + // + SupportsSendStatus bool + + // + SupportsShutdown bool + + // + SupportsThrottling bool + + // + UnloadTimeout string + + // + Version uint32 +} + +func New__Win32ProviderEx1(instance *cim.WmiInstance) (newInstance *__Win32Provider, err error) { + tmp, err := New__ProviderEx1(instance) + + if err != nil { + return + } + newInstance = &__Win32Provider{ + __Provider: tmp, + } + return +} + +func New__Win32ProviderEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Win32Provider, err error) { + tmp, err := New__ProviderEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Win32Provider{ + __Provider: tmp, + } + return +} + +// SetClientLoadableCLSID sets the value of ClientLoadableCLSID for the instance +func (instance *__Win32Provider) SetPropertyClientLoadableCLSID(value string) (err error) { + return instance.SetProperty("ClientLoadableCLSID", (value)) +} + +// GetClientLoadableCLSID gets the value of ClientLoadableCLSID for the instance +func (instance *__Win32Provider) GetPropertyClientLoadableCLSID() (value string, err error) { + retValue, err := instance.GetProperty("ClientLoadableCLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCLSID sets the value of CLSID for the instance +func (instance *__Win32Provider) SetPropertyCLSID(value string) (err error) { + return instance.SetProperty("CLSID", (value)) +} + +// GetCLSID gets the value of CLSID for the instance +func (instance *__Win32Provider) GetPropertyCLSID() (value string, err error) { + retValue, err := instance.GetProperty("CLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConcurrency sets the value of Concurrency for the instance +func (instance *__Win32Provider) SetPropertyConcurrency(value int32) (err error) { + return instance.SetProperty("Concurrency", (value)) +} + +// GetConcurrency gets the value of Concurrency for the instance +func (instance *__Win32Provider) GetPropertyConcurrency() (value int32, err error) { + retValue, err := instance.GetProperty("Concurrency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetDefaultMachineName sets the value of DefaultMachineName for the instance +func (instance *__Win32Provider) SetPropertyDefaultMachineName(value string) (err error) { + return instance.SetProperty("DefaultMachineName", (value)) +} + +// GetDefaultMachineName gets the value of DefaultMachineName for the instance +func (instance *__Win32Provider) GetPropertyDefaultMachineName() (value string, err error) { + retValue, err := instance.GetProperty("DefaultMachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEnabled sets the value of Enabled for the instance +func (instance *__Win32Provider) SetPropertyEnabled(value bool) (err error) { + return instance.SetProperty("Enabled", (value)) +} + +// GetEnabled gets the value of Enabled for the instance +func (instance *__Win32Provider) GetPropertyEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("Enabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHostingModel sets the value of HostingModel for the instance +func (instance *__Win32Provider) SetPropertyHostingModel(value string) (err error) { + return instance.SetProperty("HostingModel", (value)) +} + +// GetHostingModel gets the value of HostingModel for the instance +func (instance *__Win32Provider) GetPropertyHostingModel() (value string, err error) { + retValue, err := instance.GetProperty("HostingModel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetImpersonationLevel sets the value of ImpersonationLevel for the instance +func (instance *__Win32Provider) SetPropertyImpersonationLevel(value Win32Provider_ImpersonationLevel) (err error) { + return instance.SetProperty("ImpersonationLevel", (value)) +} + +// GetImpersonationLevel gets the value of ImpersonationLevel for the instance +func (instance *__Win32Provider) GetPropertyImpersonationLevel() (value Win32Provider_ImpersonationLevel, err error) { + retValue, err := instance.GetProperty("ImpersonationLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32Provider_ImpersonationLevel(valuetmp) + + return +} + +// SetInitializationReentrancy sets the value of InitializationReentrancy for the instance +func (instance *__Win32Provider) SetPropertyInitializationReentrancy(value Win32Provider_InitializationReentrancy) (err error) { + return instance.SetProperty("InitializationReentrancy", (value)) +} + +// GetInitializationReentrancy gets the value of InitializationReentrancy for the instance +func (instance *__Win32Provider) GetPropertyInitializationReentrancy() (value Win32Provider_InitializationReentrancy, err error) { + retValue, err := instance.GetProperty("InitializationReentrancy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32Provider_InitializationReentrancy(valuetmp) + + return +} + +// SetInitializationTimeoutInterval sets the value of InitializationTimeoutInterval for the instance +func (instance *__Win32Provider) SetPropertyInitializationTimeoutInterval(value string) (err error) { + return instance.SetProperty("InitializationTimeoutInterval", (value)) +} + +// GetInitializationTimeoutInterval gets the value of InitializationTimeoutInterval for the instance +func (instance *__Win32Provider) GetPropertyInitializationTimeoutInterval() (value string, err error) { + retValue, err := instance.GetProperty("InitializationTimeoutInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitializeAsAdminFirst sets the value of InitializeAsAdminFirst for the instance +func (instance *__Win32Provider) SetPropertyInitializeAsAdminFirst(value bool) (err error) { + return instance.SetProperty("InitializeAsAdminFirst", (value)) +} + +// GetInitializeAsAdminFirst gets the value of InitializeAsAdminFirst for the instance +func (instance *__Win32Provider) GetPropertyInitializeAsAdminFirst() (value bool, err error) { + retValue, err := instance.GetProperty("InitializeAsAdminFirst") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOperationTimeoutInterval sets the value of OperationTimeoutInterval for the instance +func (instance *__Win32Provider) SetPropertyOperationTimeoutInterval(value string) (err error) { + return instance.SetProperty("OperationTimeoutInterval", (value)) +} + +// GetOperationTimeoutInterval gets the value of OperationTimeoutInterval for the instance +func (instance *__Win32Provider) GetPropertyOperationTimeoutInterval() (value string, err error) { + retValue, err := instance.GetProperty("OperationTimeoutInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerLocaleInitialization sets the value of PerLocaleInitialization for the instance +func (instance *__Win32Provider) SetPropertyPerLocaleInitialization(value bool) (err error) { + return instance.SetProperty("PerLocaleInitialization", (value)) +} + +// GetPerLocaleInitialization gets the value of PerLocaleInitialization for the instance +func (instance *__Win32Provider) GetPropertyPerLocaleInitialization() (value bool, err error) { + retValue, err := instance.GetProperty("PerLocaleInitialization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPerUserInitialization sets the value of PerUserInitialization for the instance +func (instance *__Win32Provider) SetPropertyPerUserInitialization(value bool) (err error) { + return instance.SetProperty("PerUserInitialization", (value)) +} + +// GetPerUserInitialization gets the value of PerUserInitialization for the instance +func (instance *__Win32Provider) GetPropertyPerUserInitialization() (value bool, err error) { + retValue, err := instance.GetProperty("PerUserInitialization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPure sets the value of Pure for the instance +func (instance *__Win32Provider) SetPropertyPure(value bool) (err error) { + return instance.SetProperty("Pure", (value)) +} + +// GetPure gets the value of Pure for the instance +func (instance *__Win32Provider) GetPropertyPure() (value bool, err error) { + retValue, err := instance.GetProperty("Pure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSecurityDescriptor sets the value of SecurityDescriptor for the instance +func (instance *__Win32Provider) SetPropertySecurityDescriptor(value string) (err error) { + return instance.SetProperty("SecurityDescriptor", (value)) +} + +// GetSecurityDescriptor gets the value of SecurityDescriptor for the instance +func (instance *__Win32Provider) GetPropertySecurityDescriptor() (value string, err error) { + retValue, err := instance.GetProperty("SecurityDescriptor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportsExplicitShutdown sets the value of SupportsExplicitShutdown for the instance +func (instance *__Win32Provider) SetPropertySupportsExplicitShutdown(value bool) (err error) { + return instance.SetProperty("SupportsExplicitShutdown", (value)) +} + +// GetSupportsExplicitShutdown gets the value of SupportsExplicitShutdown for the instance +func (instance *__Win32Provider) GetPropertySupportsExplicitShutdown() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsExplicitShutdown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsExtendedStatus sets the value of SupportsExtendedStatus for the instance +func (instance *__Win32Provider) SetPropertySupportsExtendedStatus(value bool) (err error) { + return instance.SetProperty("SupportsExtendedStatus", (value)) +} + +// GetSupportsExtendedStatus gets the value of SupportsExtendedStatus for the instance +func (instance *__Win32Provider) GetPropertySupportsExtendedStatus() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsExtendedStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsQuotas sets the value of SupportsQuotas for the instance +func (instance *__Win32Provider) SetPropertySupportsQuotas(value bool) (err error) { + return instance.SetProperty("SupportsQuotas", (value)) +} + +// GetSupportsQuotas gets the value of SupportsQuotas for the instance +func (instance *__Win32Provider) GetPropertySupportsQuotas() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsQuotas") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsSendStatus sets the value of SupportsSendStatus for the instance +func (instance *__Win32Provider) SetPropertySupportsSendStatus(value bool) (err error) { + return instance.SetProperty("SupportsSendStatus", (value)) +} + +// GetSupportsSendStatus gets the value of SupportsSendStatus for the instance +func (instance *__Win32Provider) GetPropertySupportsSendStatus() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSendStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsShutdown sets the value of SupportsShutdown for the instance +func (instance *__Win32Provider) SetPropertySupportsShutdown(value bool) (err error) { + return instance.SetProperty("SupportsShutdown", (value)) +} + +// GetSupportsShutdown gets the value of SupportsShutdown for the instance +func (instance *__Win32Provider) GetPropertySupportsShutdown() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsShutdown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsThrottling sets the value of SupportsThrottling for the instance +func (instance *__Win32Provider) SetPropertySupportsThrottling(value bool) (err error) { + return instance.SetProperty("SupportsThrottling", (value)) +} + +// GetSupportsThrottling gets the value of SupportsThrottling for the instance +func (instance *__Win32Provider) GetPropertySupportsThrottling() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsThrottling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetUnloadTimeout sets the value of UnloadTimeout for the instance +func (instance *__Win32Provider) SetPropertyUnloadTimeout(value string) (err error) { + return instance.SetProperty("UnloadTimeout", (value)) +} + +// GetUnloadTimeout gets the value of UnloadTimeout for the instance +func (instance *__Win32Provider) GetPropertyUnloadTimeout() (value string, err error) { + retValue, err := instance.GetProperty("UnloadTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *__Win32Provider) SetPropertyVersion(value uint32) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *__Win32Provider) GetPropertyVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_ImpersonationLevel.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_ImpersonationLevel.go new file mode 100644 index 00000000..b5244485 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_ImpersonationLevel.go @@ -0,0 +1,17 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Win32Provider_ImpersonationLevel +////////////////////////////////////////////// +package cimv2 + +// Win32Provider_ImpersonationLevel +type Win32Provider_ImpersonationLevel int + +const ( + // None enum + Win32Provider_ImpersonationLevel_None Win32Provider_ImpersonationLevel = 0 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_InitializationReentrancy.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_InitializationReentrancy.go new file mode 100644 index 00000000..583d560e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32Provider_InitializationReentrancy.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Win32Provider_InitializationReentrancy +////////////////////////////////////////////// +package cimv2 + +// Win32Provider_InitializationReentrancy +type Win32Provider_InitializationReentrancy int + +const ( + // CLSID enum + Win32Provider_InitializationReentrancy_CLSID Win32Provider_InitializationReentrancy = 0 + // Namespace enum + Win32Provider_InitializationReentrancy_Namespace Win32Provider_InitializationReentrancy = 1 + // COM_Object enum + Win32Provider_InitializationReentrancy_COM_Object Win32Provider_InitializationReentrancy = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394Controller.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394Controller.go new file mode 100644 index 00000000..e76bfb1c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394Controller.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_1394Controller struct +type Win32_1394Controller struct { + *CIM_Controller + + // + Manufacturer string +} + +func NewWin32_1394ControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_1394Controller, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_1394Controller{ + CIM_Controller: tmp, + } + return +} + +func NewWin32_1394ControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_1394Controller, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_1394Controller{ + CIM_Controller: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_1394Controller) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_1394Controller) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394ControllerDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394ControllerDevice.go new file mode 100644 index 00000000..786a5625 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_1394ControllerDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_1394ControllerDevice struct +type Win32_1394ControllerDevice struct { + *CIM_ControlledBy +} + +func NewWin32_1394ControllerDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_1394ControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_1394ControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} + +func NewWin32_1394ControllerDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_1394ControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_1394ControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ACE.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ACE.go new file mode 100644 index 00000000..16e86789 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ACE.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ACE struct +type Win32_ACE struct { + *__ACE +} + +func NewWin32_ACEEx1(instance *cim.WmiInstance) (newInstance *Win32_ACE, err error) { + tmp, err := New__ACEEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ACE{ + __ACE: tmp, + } + return +} + +func NewWin32_ACEEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ACE, err error) { + tmp, err := New__ACEEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ACE{ + __ACE: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Account.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Account.go new file mode 100644 index 00000000..1cb0cdd8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Account.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Account struct +type Win32_Account struct { + *CIM_LogicalElement + + // + Domain string + + // + LocalAccount bool + + // + SID string + + // + SIDType uint8 +} + +func NewWin32_AccountEx1(instance *cim.WmiInstance) (newInstance *Win32_Account, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Account{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_AccountEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Account, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Account{ + CIM_LogicalElement: tmp, + } + return +} + +// SetDomain sets the value of Domain for the instance +func (instance *Win32_Account) SetPropertyDomain(value string) (err error) { + return instance.SetProperty("Domain", (value)) +} + +// GetDomain gets the value of Domain for the instance +func (instance *Win32_Account) GetPropertyDomain() (value string, err error) { + retValue, err := instance.GetProperty("Domain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalAccount sets the value of LocalAccount for the instance +func (instance *Win32_Account) SetPropertyLocalAccount(value bool) (err error) { + return instance.SetProperty("LocalAccount", (value)) +} + +// GetLocalAccount gets the value of LocalAccount for the instance +func (instance *Win32_Account) GetPropertyLocalAccount() (value bool, err error) { + retValue, err := instance.GetProperty("LocalAccount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSID sets the value of SID for the instance +func (instance *Win32_Account) SetPropertySID(value string) (err error) { + return instance.SetProperty("SID", (value)) +} + +// GetSID gets the value of SID for the instance +func (instance *Win32_Account) GetPropertySID() (value string, err error) { + retValue, err := instance.GetProperty("SID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSIDType sets the value of SIDType for the instance +func (instance *Win32_Account) SetPropertySIDType(value uint8) (err error) { + return instance.SetProperty("SIDType", (value)) +} + +// GetSIDType gets the value of SIDType for the instance +func (instance *Win32_Account) GetPropertySIDType() (value uint8, err error) { + retValue, err := instance.GetProperty("SIDType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AccountSID.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AccountSID.go new file mode 100644 index 00000000..693da565 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AccountSID.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_AccountSID struct +type Win32_AccountSID struct { + *cim.WmiInstance + + // + Element Win32_Account + + // + Setting Win32_SID +} + +func NewWin32_AccountSIDEx1(instance *cim.WmiInstance) (newInstance *Win32_AccountSID, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_AccountSID{ + WmiInstance: tmp, + } + return +} + +func NewWin32_AccountSIDEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_AccountSID, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_AccountSID{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_AccountSID) SetPropertyElement(value Win32_Account) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_AccountSID) GetPropertyElement() (value Win32_Account, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Account) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Account is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Account(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *Win32_AccountSID) SetPropertySetting(value Win32_SID) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *Win32_AccountSID) GetPropertySetting() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActionCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActionCheck.go new file mode 100644 index 00000000..0901e77f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActionCheck.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ActionCheck struct +type Win32_ActionCheck struct { + *cim.WmiInstance + + // + Action CIM_Action + + // + Check CIM_Check +} + +func NewWin32_ActionCheckEx1(instance *cim.WmiInstance) (newInstance *Win32_ActionCheck, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ActionCheck{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ActionCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ActionCheck, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ActionCheck{ + WmiInstance: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *Win32_ActionCheck) SetPropertyAction(value CIM_Action) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *Win32_ActionCheck) GetPropertyAction() (value CIM_Action, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Action) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Action is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Action(valuetmp) + + return +} + +// SetCheck sets the value of Check for the instance +func (instance *Win32_ActionCheck) SetPropertyCheck(value CIM_Check) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *Win32_ActionCheck) GetPropertyCheck() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActiveRoute.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActiveRoute.go new file mode 100644 index 00000000..9a4d7a22 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ActiveRoute.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ActiveRoute struct +type Win32_ActiveRoute struct { + *CIM_LogicalIdentity +} + +func NewWin32_ActiveRouteEx1(instance *cim.WmiInstance) (newInstance *Win32_ActiveRoute, err error) { + tmp, err := NewCIM_LogicalIdentityEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ActiveRoute{ + CIM_LogicalIdentity: tmp, + } + return +} + +func NewWin32_ActiveRouteEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ActiveRoute, err error) { + tmp, err := NewCIM_LogicalIdentityEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ActiveRoute{ + CIM_LogicalIdentity: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AllocatedResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AllocatedResource.go new file mode 100644 index 00000000..a5a7244d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AllocatedResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_AllocatedResource struct +type Win32_AllocatedResource struct { + *CIM_Dependency +} + +func NewWin32_AllocatedResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_AllocatedResource, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_AllocatedResource{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_AllocatedResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_AllocatedResource, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_AllocatedResource{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationCommandLine.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationCommandLine.go new file mode 100644 index 00000000..608d96de --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationCommandLine.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ApplicationCommandLine struct +type Win32_ApplicationCommandLine struct { + *CIM_ServiceAccessBySAP +} + +func NewWin32_ApplicationCommandLineEx1(instance *cim.WmiInstance) (newInstance *Win32_ApplicationCommandLine, err error) { + tmp, err := NewCIM_ServiceAccessBySAPEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ApplicationCommandLine{ + CIM_ServiceAccessBySAP: tmp, + } + return +} + +func NewWin32_ApplicationCommandLineEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ApplicationCommandLine, err error) { + tmp, err := NewCIM_ServiceAccessBySAPEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ApplicationCommandLine{ + CIM_ServiceAccessBySAP: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationService.go new file mode 100644 index 00000000..234f2cdb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ApplicationService.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ApplicationService struct +type Win32_ApplicationService struct { + *CIM_Service +} + +func NewWin32_ApplicationServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_ApplicationService, err error) { + tmp, err := NewCIM_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ApplicationService{ + CIM_Service: tmp, + } + return +} + +func NewWin32_ApplicationServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ApplicationService, err error) { + tmp, err := NewCIM_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ApplicationService{ + CIM_Service: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AssociatedProcessorMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AssociatedProcessorMemory.go new file mode 100644 index 00000000..61bd6d2e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AssociatedProcessorMemory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_AssociatedProcessorMemory struct +type Win32_AssociatedProcessorMemory struct { + *CIM_AssociatedProcessorMemory +} + +func NewWin32_AssociatedProcessorMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_AssociatedProcessorMemory, err error) { + tmp, err := NewCIM_AssociatedProcessorMemoryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_AssociatedProcessorMemory{ + CIM_AssociatedProcessorMemory: tmp, + } + return +} + +func NewWin32_AssociatedProcessorMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_AssociatedProcessorMemory, err error) { + tmp, err := NewCIM_AssociatedProcessorMemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_AssociatedProcessorMemory{ + CIM_AssociatedProcessorMemory: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AutochkSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AutochkSetting.go new file mode 100644 index 00000000..c1142ea0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_AutochkSetting.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_AutochkSetting struct +type Win32_AutochkSetting struct { + *CIM_Setting + + // + UserInputDelay uint32 +} + +func NewWin32_AutochkSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_AutochkSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_AutochkSetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_AutochkSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_AutochkSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_AutochkSetting{ + CIM_Setting: tmp, + } + return +} + +// SetUserInputDelay sets the value of UserInputDelay for the instance +func (instance *Win32_AutochkSetting) SetPropertyUserInputDelay(value uint32) (err error) { + return instance.SetProperty("UserInputDelay", (value)) +} + +// GetUserInputDelay gets the value of UserInputDelay for the instance +func (instance *Win32_AutochkSetting) GetPropertyUserInputDelay() (value uint32, err error) { + retValue, err := instance.GetProperty("UserInputDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BIOS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BIOS.go new file mode 100644 index 00000000..af73d71a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BIOS.go @@ -0,0 +1,473 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_BIOS struct +type Win32_BIOS struct { + *CIM_BIOSElement + + // + BiosCharacteristics []uint16 + + // + BIOSVersion []string + + // + CurrentLanguage string + + // + EmbeddedControllerMajorVersion uint8 + + // + EmbeddedControllerMinorVersion uint8 + + // + InstallableLanguages uint16 + + // + ListOfLanguages []string + + // + ReleaseDate string + + // + SMBIOSBIOSVersion string + + // + SMBIOSMajorVersion uint16 + + // + SMBIOSMinorVersion uint16 + + // + SMBIOSPresent bool + + // + SystemBiosMajorVersion uint8 + + // + SystemBiosMinorVersion uint8 +} + +func NewWin32_BIOSEx1(instance *cim.WmiInstance) (newInstance *Win32_BIOS, err error) { + tmp, err := NewCIM_BIOSElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_BIOS{ + CIM_BIOSElement: tmp, + } + return +} + +func NewWin32_BIOSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_BIOS, err error) { + tmp, err := NewCIM_BIOSElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_BIOS{ + CIM_BIOSElement: tmp, + } + return +} + +// SetBiosCharacteristics sets the value of BiosCharacteristics for the instance +func (instance *Win32_BIOS) SetPropertyBiosCharacteristics(value []uint16) (err error) { + return instance.SetProperty("BiosCharacteristics", (value)) +} + +// GetBiosCharacteristics gets the value of BiosCharacteristics for the instance +func (instance *Win32_BIOS) GetPropertyBiosCharacteristics() (value []uint16, err error) { + retValue, err := instance.GetProperty("BiosCharacteristics") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetBIOSVersion sets the value of BIOSVersion for the instance +func (instance *Win32_BIOS) SetPropertyBIOSVersion(value []string) (err error) { + return instance.SetProperty("BIOSVersion", (value)) +} + +// GetBIOSVersion gets the value of BIOSVersion for the instance +func (instance *Win32_BIOS) GetPropertyBIOSVersion() (value []string, err error) { + retValue, err := instance.GetProperty("BIOSVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetCurrentLanguage sets the value of CurrentLanguage for the instance +func (instance *Win32_BIOS) SetPropertyCurrentLanguage(value string) (err error) { + return instance.SetProperty("CurrentLanguage", (value)) +} + +// GetCurrentLanguage gets the value of CurrentLanguage for the instance +func (instance *Win32_BIOS) GetPropertyCurrentLanguage() (value string, err error) { + retValue, err := instance.GetProperty("CurrentLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEmbeddedControllerMajorVersion sets the value of EmbeddedControllerMajorVersion for the instance +func (instance *Win32_BIOS) SetPropertyEmbeddedControllerMajorVersion(value uint8) (err error) { + return instance.SetProperty("EmbeddedControllerMajorVersion", (value)) +} + +// GetEmbeddedControllerMajorVersion gets the value of EmbeddedControllerMajorVersion for the instance +func (instance *Win32_BIOS) GetPropertyEmbeddedControllerMajorVersion() (value uint8, err error) { + retValue, err := instance.GetProperty("EmbeddedControllerMajorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetEmbeddedControllerMinorVersion sets the value of EmbeddedControllerMinorVersion for the instance +func (instance *Win32_BIOS) SetPropertyEmbeddedControllerMinorVersion(value uint8) (err error) { + return instance.SetProperty("EmbeddedControllerMinorVersion", (value)) +} + +// GetEmbeddedControllerMinorVersion gets the value of EmbeddedControllerMinorVersion for the instance +func (instance *Win32_BIOS) GetPropertyEmbeddedControllerMinorVersion() (value uint8, err error) { + retValue, err := instance.GetProperty("EmbeddedControllerMinorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetInstallableLanguages sets the value of InstallableLanguages for the instance +func (instance *Win32_BIOS) SetPropertyInstallableLanguages(value uint16) (err error) { + return instance.SetProperty("InstallableLanguages", (value)) +} + +// GetInstallableLanguages gets the value of InstallableLanguages for the instance +func (instance *Win32_BIOS) GetPropertyInstallableLanguages() (value uint16, err error) { + retValue, err := instance.GetProperty("InstallableLanguages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetListOfLanguages sets the value of ListOfLanguages for the instance +func (instance *Win32_BIOS) SetPropertyListOfLanguages(value []string) (err error) { + return instance.SetProperty("ListOfLanguages", (value)) +} + +// GetListOfLanguages gets the value of ListOfLanguages for the instance +func (instance *Win32_BIOS) GetPropertyListOfLanguages() (value []string, err error) { + retValue, err := instance.GetProperty("ListOfLanguages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetReleaseDate sets the value of ReleaseDate for the instance +func (instance *Win32_BIOS) SetPropertyReleaseDate(value string) (err error) { + return instance.SetProperty("ReleaseDate", (value)) +} + +// GetReleaseDate gets the value of ReleaseDate for the instance +func (instance *Win32_BIOS) GetPropertyReleaseDate() (value string, err error) { + retValue, err := instance.GetProperty("ReleaseDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSMBIOSBIOSVersion sets the value of SMBIOSBIOSVersion for the instance +func (instance *Win32_BIOS) SetPropertySMBIOSBIOSVersion(value string) (err error) { + return instance.SetProperty("SMBIOSBIOSVersion", (value)) +} + +// GetSMBIOSBIOSVersion gets the value of SMBIOSBIOSVersion for the instance +func (instance *Win32_BIOS) GetPropertySMBIOSBIOSVersion() (value string, err error) { + retValue, err := instance.GetProperty("SMBIOSBIOSVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSMBIOSMajorVersion sets the value of SMBIOSMajorVersion for the instance +func (instance *Win32_BIOS) SetPropertySMBIOSMajorVersion(value uint16) (err error) { + return instance.SetProperty("SMBIOSMajorVersion", (value)) +} + +// GetSMBIOSMajorVersion gets the value of SMBIOSMajorVersion for the instance +func (instance *Win32_BIOS) GetPropertySMBIOSMajorVersion() (value uint16, err error) { + retValue, err := instance.GetProperty("SMBIOSMajorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSMBIOSMinorVersion sets the value of SMBIOSMinorVersion for the instance +func (instance *Win32_BIOS) SetPropertySMBIOSMinorVersion(value uint16) (err error) { + return instance.SetProperty("SMBIOSMinorVersion", (value)) +} + +// GetSMBIOSMinorVersion gets the value of SMBIOSMinorVersion for the instance +func (instance *Win32_BIOS) GetPropertySMBIOSMinorVersion() (value uint16, err error) { + retValue, err := instance.GetProperty("SMBIOSMinorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSMBIOSPresent sets the value of SMBIOSPresent for the instance +func (instance *Win32_BIOS) SetPropertySMBIOSPresent(value bool) (err error) { + return instance.SetProperty("SMBIOSPresent", (value)) +} + +// GetSMBIOSPresent gets the value of SMBIOSPresent for the instance +func (instance *Win32_BIOS) GetPropertySMBIOSPresent() (value bool, err error) { + retValue, err := instance.GetProperty("SMBIOSPresent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSystemBiosMajorVersion sets the value of SystemBiosMajorVersion for the instance +func (instance *Win32_BIOS) SetPropertySystemBiosMajorVersion(value uint8) (err error) { + return instance.SetProperty("SystemBiosMajorVersion", (value)) +} + +// GetSystemBiosMajorVersion gets the value of SystemBiosMajorVersion for the instance +func (instance *Win32_BIOS) GetPropertySystemBiosMajorVersion() (value uint8, err error) { + retValue, err := instance.GetProperty("SystemBiosMajorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetSystemBiosMinorVersion sets the value of SystemBiosMinorVersion for the instance +func (instance *Win32_BIOS) SetPropertySystemBiosMinorVersion(value uint8) (err error) { + return instance.SetProperty("SystemBiosMinorVersion", (value)) +} + +// GetSystemBiosMinorVersion gets the value of SystemBiosMinorVersion for the instance +func (instance *Win32_BIOS) GetPropertySystemBiosMinorVersion() (value uint8, err error) { + retValue, err := instance.GetProperty("SystemBiosMinorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseBoard.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseBoard.go new file mode 100644 index 00000000..a8bdd22c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseBoard.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_BaseBoard struct +type Win32_BaseBoard struct { + *CIM_Card + + // + ConfigOptions []string + + // + Product string +} + +func NewWin32_BaseBoardEx1(instance *cim.WmiInstance) (newInstance *Win32_BaseBoard, err error) { + tmp, err := NewCIM_CardEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_BaseBoard{ + CIM_Card: tmp, + } + return +} + +func NewWin32_BaseBoardEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_BaseBoard, err error) { + tmp, err := NewCIM_CardEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_BaseBoard{ + CIM_Card: tmp, + } + return +} + +// SetConfigOptions sets the value of ConfigOptions for the instance +func (instance *Win32_BaseBoard) SetPropertyConfigOptions(value []string) (err error) { + return instance.SetProperty("ConfigOptions", (value)) +} + +// GetConfigOptions gets the value of ConfigOptions for the instance +func (instance *Win32_BaseBoard) GetPropertyConfigOptions() (value []string, err error) { + retValue, err := instance.GetProperty("ConfigOptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetProduct sets the value of Product for the instance +func (instance *Win32_BaseBoard) SetPropertyProduct(value string) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *Win32_BaseBoard) GetPropertyProduct() (value string, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseService.go new file mode 100644 index 00000000..8e7ea45b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BaseService.go @@ -0,0 +1,564 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_BaseService struct +type Win32_BaseService struct { + *CIM_Service + + // + AcceptPause bool + + // + AcceptStop bool + + // + DesktopInteract bool + + // + DisplayName string + + // + ErrorControl string + + // + ExitCode uint32 + + // + PathName string + + // + ServiceSpecificExitCode uint32 + + // + ServiceType string + + // + StartName string + + // + State string + + // + TagId uint32 +} + +func NewWin32_BaseServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_BaseService, err error) { + tmp, err := NewCIM_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_BaseService{ + CIM_Service: tmp, + } + return +} + +func NewWin32_BaseServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_BaseService, err error) { + tmp, err := NewCIM_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_BaseService{ + CIM_Service: tmp, + } + return +} + +// SetAcceptPause sets the value of AcceptPause for the instance +func (instance *Win32_BaseService) SetPropertyAcceptPause(value bool) (err error) { + return instance.SetProperty("AcceptPause", (value)) +} + +// GetAcceptPause gets the value of AcceptPause for the instance +func (instance *Win32_BaseService) GetPropertyAcceptPause() (value bool, err error) { + retValue, err := instance.GetProperty("AcceptPause") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAcceptStop sets the value of AcceptStop for the instance +func (instance *Win32_BaseService) SetPropertyAcceptStop(value bool) (err error) { + return instance.SetProperty("AcceptStop", (value)) +} + +// GetAcceptStop gets the value of AcceptStop for the instance +func (instance *Win32_BaseService) GetPropertyAcceptStop() (value bool, err error) { + retValue, err := instance.GetProperty("AcceptStop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDesktopInteract sets the value of DesktopInteract for the instance +func (instance *Win32_BaseService) SetPropertyDesktopInteract(value bool) (err error) { + return instance.SetProperty("DesktopInteract", (value)) +} + +// GetDesktopInteract gets the value of DesktopInteract for the instance +func (instance *Win32_BaseService) GetPropertyDesktopInteract() (value bool, err error) { + retValue, err := instance.GetProperty("DesktopInteract") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDisplayName sets the value of DisplayName for the instance +func (instance *Win32_BaseService) SetPropertyDisplayName(value string) (err error) { + return instance.SetProperty("DisplayName", (value)) +} + +// GetDisplayName gets the value of DisplayName for the instance +func (instance *Win32_BaseService) GetPropertyDisplayName() (value string, err error) { + retValue, err := instance.GetProperty("DisplayName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorControl sets the value of ErrorControl for the instance +func (instance *Win32_BaseService) SetPropertyErrorControl(value string) (err error) { + return instance.SetProperty("ErrorControl", (value)) +} + +// GetErrorControl gets the value of ErrorControl for the instance +func (instance *Win32_BaseService) GetPropertyErrorControl() (value string, err error) { + retValue, err := instance.GetProperty("ErrorControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExitCode sets the value of ExitCode for the instance +func (instance *Win32_BaseService) SetPropertyExitCode(value uint32) (err error) { + return instance.SetProperty("ExitCode", (value)) +} + +// GetExitCode gets the value of ExitCode for the instance +func (instance *Win32_BaseService) GetPropertyExitCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ExitCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPathName sets the value of PathName for the instance +func (instance *Win32_BaseService) SetPropertyPathName(value string) (err error) { + return instance.SetProperty("PathName", (value)) +} + +// GetPathName gets the value of PathName for the instance +func (instance *Win32_BaseService) GetPropertyPathName() (value string, err error) { + retValue, err := instance.GetProperty("PathName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServiceSpecificExitCode sets the value of ServiceSpecificExitCode for the instance +func (instance *Win32_BaseService) SetPropertyServiceSpecificExitCode(value uint32) (err error) { + return instance.SetProperty("ServiceSpecificExitCode", (value)) +} + +// GetServiceSpecificExitCode gets the value of ServiceSpecificExitCode for the instance +func (instance *Win32_BaseService) GetPropertyServiceSpecificExitCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ServiceSpecificExitCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServiceType sets the value of ServiceType for the instance +func (instance *Win32_BaseService) SetPropertyServiceType(value string) (err error) { + return instance.SetProperty("ServiceType", (value)) +} + +// GetServiceType gets the value of ServiceType for the instance +func (instance *Win32_BaseService) GetPropertyServiceType() (value string, err error) { + retValue, err := instance.GetProperty("ServiceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartName sets the value of StartName for the instance +func (instance *Win32_BaseService) SetPropertyStartName(value string) (err error) { + return instance.SetProperty("StartName", (value)) +} + +// GetStartName gets the value of StartName for the instance +func (instance *Win32_BaseService) GetPropertyStartName() (value string, err error) { + retValue, err := instance.GetProperty("StartName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *Win32_BaseService) SetPropertyState(value string) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *Win32_BaseService) GetPropertyState() (value string, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTagId sets the value of TagId for the instance +func (instance *Win32_BaseService) SetPropertyTagId(value uint32) (err error) { + return instance.SetProperty("TagId", (value)) +} + +// GetTagId gets the value of TagId for the instance +func (instance *Win32_BaseService) GetPropertyTagId() (value uint32, err error) { + retValue, err := instance.GetProperty("TagId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +func (instance *Win32_BaseService) PauseService() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("PauseService") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_BaseService) ResumeService() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ResumeService") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_BaseService) InterrogateService() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("InterrogateService") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_BaseService) UserControlService( /* IN */ ControlCode uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("UserControlService", ControlCode) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// + +// +func (instance *Win32_BaseService) Create( /* IN */ Name string, + /* IN */ DisplayName string, + /* IN */ PathName string, + /* IN */ ServiceType uint8, + /* IN */ ErrorControl uint8, + /* IN */ StartMode string, + /* IN */ DesktopInteract bool, + /* IN */ StartName string, + /* IN */ StartPassword string, + /* IN */ LoadOrderGroup string, + /* IN */ LoadOrderGroupDependencies []string, + /* IN */ ServiceDependencies []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Create", Name, DisplayName, PathName, ServiceType, ErrorControl, StartMode, DesktopInteract, StartName, StartPassword, LoadOrderGroup, LoadOrderGroupDependencies, ServiceDependencies) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// + +// +func (instance *Win32_BaseService) Change( /* IN */ DisplayName string, + /* IN */ PathName string, + /* IN */ ServiceType uint8, + /* IN */ ErrorControl uint8, + /* IN */ StartMode string, + /* IN */ DesktopInteract bool, + /* IN */ StartName string, + /* IN */ StartPassword string, + /* IN */ LoadOrderGroup string, + /* IN */ LoadOrderGroupDependencies []string, + /* IN */ ServiceDependencies []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Change", DisplayName, PathName, ServiceType, ErrorControl, StartMode, DesktopInteract, StartName, StartPassword, LoadOrderGroup, LoadOrderGroupDependencies, ServiceDependencies) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_BaseService) ChangeStartMode( /* IN */ StartMode string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ChangeStartMode", StartMode) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_BaseService) Delete() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Delete") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Battery.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Battery.go new file mode 100644 index 00000000..4df8cabf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Battery.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Battery struct +type Win32_Battery struct { + *CIM_Battery + + // + BatteryRechargeTime uint32 + + // + ExpectedBatteryLife uint32 +} + +func NewWin32_BatteryEx1(instance *cim.WmiInstance) (newInstance *Win32_Battery, err error) { + tmp, err := NewCIM_BatteryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Battery{ + CIM_Battery: tmp, + } + return +} + +func NewWin32_BatteryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Battery, err error) { + tmp, err := NewCIM_BatteryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Battery{ + CIM_Battery: tmp, + } + return +} + +// SetBatteryRechargeTime sets the value of BatteryRechargeTime for the instance +func (instance *Win32_Battery) SetPropertyBatteryRechargeTime(value uint32) (err error) { + return instance.SetProperty("BatteryRechargeTime", (value)) +} + +// GetBatteryRechargeTime gets the value of BatteryRechargeTime for the instance +func (instance *Win32_Battery) GetPropertyBatteryRechargeTime() (value uint32, err error) { + retValue, err := instance.GetProperty("BatteryRechargeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExpectedBatteryLife sets the value of ExpectedBatteryLife for the instance +func (instance *Win32_Battery) SetPropertyExpectedBatteryLife(value uint32) (err error) { + return instance.SetProperty("ExpectedBatteryLife", (value)) +} + +// GetExpectedBatteryLife gets the value of ExpectedBatteryLife for the instance +func (instance *Win32_Battery) GetPropertyExpectedBatteryLife() (value uint32, err error) { + retValue, err := instance.GetProperty("ExpectedBatteryLife") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Binary.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Binary.go new file mode 100644 index 00000000..9229154e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Binary.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Binary struct +type Win32_Binary struct { + *Win32_MSIResource + + // + Data string + + // + Name string + + // + ProductCode string +} + +func NewWin32_BinaryEx1(instance *cim.WmiInstance) (newInstance *Win32_Binary, err error) { + tmp, err := NewWin32_MSIResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Binary{ + Win32_MSIResource: tmp, + } + return +} + +func NewWin32_BinaryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Binary, err error) { + tmp, err := NewWin32_MSIResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Binary{ + Win32_MSIResource: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_Binary) SetPropertyData(value string) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_Binary) GetPropertyData() (value string, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_Binary) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_Binary) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductCode sets the value of ProductCode for the instance +func (instance *Win32_Binary) SetPropertyProductCode(value string) (err error) { + return instance.SetProperty("ProductCode", (value)) +} + +// GetProductCode gets the value of ProductCode for the instance +func (instance *Win32_Binary) GetPropertyProductCode() (value string, err error) { + retValue, err := instance.GetProperty("ProductCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BindImageAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BindImageAction.go new file mode 100644 index 00000000..dcdd0514 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BindImageAction.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_BindImageAction struct +type Win32_BindImageAction struct { + *CIM_Action + + // + File string + + // + Path string +} + +func NewWin32_BindImageActionEx1(instance *cim.WmiInstance) (newInstance *Win32_BindImageAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_BindImageAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_BindImageActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_BindImageAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_BindImageAction{ + CIM_Action: tmp, + } + return +} + +// SetFile sets the value of File for the instance +func (instance *Win32_BindImageAction) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *Win32_BindImageAction) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPath sets the value of Path for the instance +func (instance *Win32_BindImageAction) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *Win32_BindImageAction) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BootConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BootConfiguration.go new file mode 100644 index 00000000..39367c06 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_BootConfiguration.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_BootConfiguration struct +type Win32_BootConfiguration struct { + *CIM_Setting + + // + BootDirectory string + + // + ConfigurationPath string + + // + LastDrive string + + // + Name string + + // + ScratchDirectory string + + // + TempDirectory string +} + +func NewWin32_BootConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_BootConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_BootConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_BootConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_BootConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_BootConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetBootDirectory sets the value of BootDirectory for the instance +func (instance *Win32_BootConfiguration) SetPropertyBootDirectory(value string) (err error) { + return instance.SetProperty("BootDirectory", (value)) +} + +// GetBootDirectory gets the value of BootDirectory for the instance +func (instance *Win32_BootConfiguration) GetPropertyBootDirectory() (value string, err error) { + retValue, err := instance.GetProperty("BootDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConfigurationPath sets the value of ConfigurationPath for the instance +func (instance *Win32_BootConfiguration) SetPropertyConfigurationPath(value string) (err error) { + return instance.SetProperty("ConfigurationPath", (value)) +} + +// GetConfigurationPath gets the value of ConfigurationPath for the instance +func (instance *Win32_BootConfiguration) GetPropertyConfigurationPath() (value string, err error) { + retValue, err := instance.GetProperty("ConfigurationPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastDrive sets the value of LastDrive for the instance +func (instance *Win32_BootConfiguration) SetPropertyLastDrive(value string) (err error) { + return instance.SetProperty("LastDrive", (value)) +} + +// GetLastDrive gets the value of LastDrive for the instance +func (instance *Win32_BootConfiguration) GetPropertyLastDrive() (value string, err error) { + retValue, err := instance.GetProperty("LastDrive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_BootConfiguration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_BootConfiguration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetScratchDirectory sets the value of ScratchDirectory for the instance +func (instance *Win32_BootConfiguration) SetPropertyScratchDirectory(value string) (err error) { + return instance.SetProperty("ScratchDirectory", (value)) +} + +// GetScratchDirectory gets the value of ScratchDirectory for the instance +func (instance *Win32_BootConfiguration) GetPropertyScratchDirectory() (value string, err error) { + retValue, err := instance.GetProperty("ScratchDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTempDirectory sets the value of TempDirectory for the instance +func (instance *Win32_BootConfiguration) SetPropertyTempDirectory(value string) (err error) { + return instance.SetProperty("TempDirectory", (value)) +} + +// GetTempDirectory gets the value of TempDirectory for the instance +func (instance *Win32_BootConfiguration) GetPropertyTempDirectory() (value string, err error) { + retValue, err := instance.GetProperty("TempDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Bus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Bus.go new file mode 100644 index 00000000..fe5e04bb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Bus.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Bus struct +type Win32_Bus struct { + *CIM_LogicalDevice + + // + BusNum uint32 + + // + BusType uint32 +} + +func NewWin32_BusEx1(instance *cim.WmiInstance) (newInstance *Win32_Bus, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Bus{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewWin32_BusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Bus, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Bus{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetBusNum sets the value of BusNum for the instance +func (instance *Win32_Bus) SetPropertyBusNum(value uint32) (err error) { + return instance.SetProperty("BusNum", (value)) +} + +// GetBusNum gets the value of BusNum for the instance +func (instance *Win32_Bus) GetPropertyBusNum() (value uint32, err error) { + retValue, err := instance.GetProperty("BusNum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBusType sets the value of BusType for the instance +func (instance *Win32_Bus) SetPropertyBusType(value uint32) (err error) { + return instance.SetProperty("BusType", (value)) +} + +// GetBusType gets the value of BusType for the instance +func (instance *Win32_Bus) GetPropertyBusType() (value uint32, err error) { + retValue, err := instance.GetProperty("BusType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CDROMDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CDROMDrive.go new file mode 100644 index 00000000..54b4b6ca --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CDROMDrive.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CDROMDrive struct +type Win32_CDROMDrive struct { + *CIM_CDROMDrive + + // + Drive string + + // + DriveIntegrity bool + + // + FileSystemFlags uint16 + + // + FileSystemFlagsEx uint32 + + // + Id string + + // + Manufacturer string + + // + MaximumComponentLength uint32 + + // + MediaLoaded bool + + // + MediaType string + + // + MfrAssignedRevisionLevel string + + // + RevisionLevel string + + // + SCSIBus uint32 + + // + SCSILogicalUnit uint16 + + // + SCSIPort uint16 + + // + SCSITargetId uint16 + + // + SerialNumber string + + // + Size uint64 + + // + TransferRate float64 + + // + VolumeName string + + // + VolumeSerialNumber string +} + +func NewWin32_CDROMDriveEx1(instance *cim.WmiInstance) (newInstance *Win32_CDROMDrive, err error) { + tmp, err := NewCIM_CDROMDriveEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CDROMDrive{ + CIM_CDROMDrive: tmp, + } + return +} + +func NewWin32_CDROMDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CDROMDrive, err error) { + tmp, err := NewCIM_CDROMDriveEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CDROMDrive{ + CIM_CDROMDrive: tmp, + } + return +} + +// SetDrive sets the value of Drive for the instance +func (instance *Win32_CDROMDrive) SetPropertyDrive(value string) (err error) { + return instance.SetProperty("Drive", (value)) +} + +// GetDrive gets the value of Drive for the instance +func (instance *Win32_CDROMDrive) GetPropertyDrive() (value string, err error) { + retValue, err := instance.GetProperty("Drive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriveIntegrity sets the value of DriveIntegrity for the instance +func (instance *Win32_CDROMDrive) SetPropertyDriveIntegrity(value bool) (err error) { + return instance.SetProperty("DriveIntegrity", (value)) +} + +// GetDriveIntegrity gets the value of DriveIntegrity for the instance +func (instance *Win32_CDROMDrive) GetPropertyDriveIntegrity() (value bool, err error) { + retValue, err := instance.GetProperty("DriveIntegrity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFileSystemFlags sets the value of FileSystemFlags for the instance +func (instance *Win32_CDROMDrive) SetPropertyFileSystemFlags(value uint16) (err error) { + return instance.SetProperty("FileSystemFlags", (value)) +} + +// GetFileSystemFlags gets the value of FileSystemFlags for the instance +func (instance *Win32_CDROMDrive) GetPropertyFileSystemFlags() (value uint16, err error) { + retValue, err := instance.GetProperty("FileSystemFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFileSystemFlagsEx sets the value of FileSystemFlagsEx for the instance +func (instance *Win32_CDROMDrive) SetPropertyFileSystemFlagsEx(value uint32) (err error) { + return instance.SetProperty("FileSystemFlagsEx", (value)) +} + +// GetFileSystemFlagsEx gets the value of FileSystemFlagsEx for the instance +func (instance *Win32_CDROMDrive) GetPropertyFileSystemFlagsEx() (value uint32, err error) { + retValue, err := instance.GetProperty("FileSystemFlagsEx") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetId sets the value of Id for the instance +func (instance *Win32_CDROMDrive) SetPropertyId(value string) (err error) { + return instance.SetProperty("Id", (value)) +} + +// GetId gets the value of Id for the instance +func (instance *Win32_CDROMDrive) GetPropertyId() (value string, err error) { + retValue, err := instance.GetProperty("Id") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_CDROMDrive) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_CDROMDrive) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumComponentLength sets the value of MaximumComponentLength for the instance +func (instance *Win32_CDROMDrive) SetPropertyMaximumComponentLength(value uint32) (err error) { + return instance.SetProperty("MaximumComponentLength", (value)) +} + +// GetMaximumComponentLength gets the value of MaximumComponentLength for the instance +func (instance *Win32_CDROMDrive) GetPropertyMaximumComponentLength() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumComponentLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMediaLoaded sets the value of MediaLoaded for the instance +func (instance *Win32_CDROMDrive) SetPropertyMediaLoaded(value bool) (err error) { + return instance.SetProperty("MediaLoaded", (value)) +} + +// GetMediaLoaded gets the value of MediaLoaded for the instance +func (instance *Win32_CDROMDrive) GetPropertyMediaLoaded() (value bool, err error) { + retValue, err := instance.GetProperty("MediaLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *Win32_CDROMDrive) SetPropertyMediaType(value string) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *Win32_CDROMDrive) GetPropertyMediaType() (value string, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMfrAssignedRevisionLevel sets the value of MfrAssignedRevisionLevel for the instance +func (instance *Win32_CDROMDrive) SetPropertyMfrAssignedRevisionLevel(value string) (err error) { + return instance.SetProperty("MfrAssignedRevisionLevel", (value)) +} + +// GetMfrAssignedRevisionLevel gets the value of MfrAssignedRevisionLevel for the instance +func (instance *Win32_CDROMDrive) GetPropertyMfrAssignedRevisionLevel() (value string, err error) { + retValue, err := instance.GetProperty("MfrAssignedRevisionLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRevisionLevel sets the value of RevisionLevel for the instance +func (instance *Win32_CDROMDrive) SetPropertyRevisionLevel(value string) (err error) { + return instance.SetProperty("RevisionLevel", (value)) +} + +// GetRevisionLevel gets the value of RevisionLevel for the instance +func (instance *Win32_CDROMDrive) GetPropertyRevisionLevel() (value string, err error) { + retValue, err := instance.GetProperty("RevisionLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSCSIBus sets the value of SCSIBus for the instance +func (instance *Win32_CDROMDrive) SetPropertySCSIBus(value uint32) (err error) { + return instance.SetProperty("SCSIBus", (value)) +} + +// GetSCSIBus gets the value of SCSIBus for the instance +func (instance *Win32_CDROMDrive) GetPropertySCSIBus() (value uint32, err error) { + retValue, err := instance.GetProperty("SCSIBus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCSILogicalUnit sets the value of SCSILogicalUnit for the instance +func (instance *Win32_CDROMDrive) SetPropertySCSILogicalUnit(value uint16) (err error) { + return instance.SetProperty("SCSILogicalUnit", (value)) +} + +// GetSCSILogicalUnit gets the value of SCSILogicalUnit for the instance +func (instance *Win32_CDROMDrive) GetPropertySCSILogicalUnit() (value uint16, err error) { + retValue, err := instance.GetProperty("SCSILogicalUnit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSCSIPort sets the value of SCSIPort for the instance +func (instance *Win32_CDROMDrive) SetPropertySCSIPort(value uint16) (err error) { + return instance.SetProperty("SCSIPort", (value)) +} + +// GetSCSIPort gets the value of SCSIPort for the instance +func (instance *Win32_CDROMDrive) GetPropertySCSIPort() (value uint16, err error) { + retValue, err := instance.GetProperty("SCSIPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSCSITargetId sets the value of SCSITargetId for the instance +func (instance *Win32_CDROMDrive) SetPropertySCSITargetId(value uint16) (err error) { + return instance.SetProperty("SCSITargetId", (value)) +} + +// GetSCSITargetId gets the value of SCSITargetId for the instance +func (instance *Win32_CDROMDrive) GetPropertySCSITargetId() (value uint16, err error) { + retValue, err := instance.GetProperty("SCSITargetId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *Win32_CDROMDrive) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *Win32_CDROMDrive) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *Win32_CDROMDrive) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *Win32_CDROMDrive) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferRate sets the value of TransferRate for the instance +func (instance *Win32_CDROMDrive) SetPropertyTransferRate(value float64) (err error) { + return instance.SetProperty("TransferRate", (value)) +} + +// GetTransferRate gets the value of TransferRate for the instance +func (instance *Win32_CDROMDrive) GetPropertyTransferRate() (value float64, err error) { + retValue, err := instance.GetProperty("TransferRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} + +// SetVolumeName sets the value of VolumeName for the instance +func (instance *Win32_CDROMDrive) SetPropertyVolumeName(value string) (err error) { + return instance.SetProperty("VolumeName", (value)) +} + +// GetVolumeName gets the value of VolumeName for the instance +func (instance *Win32_CDROMDrive) GetPropertyVolumeName() (value string, err error) { + retValue, err := instance.GetProperty("VolumeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVolumeSerialNumber sets the value of VolumeSerialNumber for the instance +func (instance *Win32_CDROMDrive) SetPropertyVolumeSerialNumber(value string) (err error) { + return instance.SetProperty("VolumeSerialNumber", (value)) +} + +// GetVolumeSerialNumber gets the value of VolumeSerialNumber for the instance +func (instance *Win32_CDROMDrive) GetPropertyVolumeSerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("VolumeSerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CIMLogicalDeviceCIMDataFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CIMLogicalDeviceCIMDataFile.go new file mode 100644 index 00000000..0ce13f2e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CIMLogicalDeviceCIMDataFile.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CIMLogicalDeviceCIMDataFile struct +type Win32_CIMLogicalDeviceCIMDataFile struct { + *CIM_Dependency + + // + Purpose uint16 + + // + PurposeDescription string +} + +func NewWin32_CIMLogicalDeviceCIMDataFileEx1(instance *cim.WmiInstance) (newInstance *Win32_CIMLogicalDeviceCIMDataFile, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CIMLogicalDeviceCIMDataFile{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_CIMLogicalDeviceCIMDataFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CIMLogicalDeviceCIMDataFile, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CIMLogicalDeviceCIMDataFile{ + CIM_Dependency: tmp, + } + return +} + +// SetPurpose sets the value of Purpose for the instance +func (instance *Win32_CIMLogicalDeviceCIMDataFile) SetPropertyPurpose(value uint16) (err error) { + return instance.SetProperty("Purpose", (value)) +} + +// GetPurpose gets the value of Purpose for the instance +func (instance *Win32_CIMLogicalDeviceCIMDataFile) GetPropertyPurpose() (value uint16, err error) { + retValue, err := instance.GetProperty("Purpose") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPurposeDescription sets the value of PurposeDescription for the instance +func (instance *Win32_CIMLogicalDeviceCIMDataFile) SetPropertyPurposeDescription(value string) (err error) { + return instance.SetProperty("PurposeDescription", (value)) +} + +// GetPurposeDescription gets the value of PurposeDescription for the instance +func (instance *Win32_CIMLogicalDeviceCIMDataFile) GetPropertyPurposeDescription() (value string, err error) { + retValue, err := instance.GetProperty("PurposeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplication.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplication.go new file mode 100644 index 00000000..e72d10ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplication.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_COMApplication struct +type Win32_COMApplication struct { + *CIM_LogicalElement +} + +func NewWin32_COMApplicationEx1(instance *cim.WmiInstance) (newInstance *Win32_COMApplication, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_COMApplication{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_COMApplicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_COMApplication, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_COMApplication{ + CIM_LogicalElement: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationClasses.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationClasses.go new file mode 100644 index 00000000..d0dbcdc9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationClasses.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_COMApplicationClasses struct +type Win32_COMApplicationClasses struct { + *CIM_Component +} + +func NewWin32_COMApplicationClassesEx1(instance *cim.WmiInstance) (newInstance *Win32_COMApplicationClasses, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_COMApplicationClasses{ + CIM_Component: tmp, + } + return +} + +func NewWin32_COMApplicationClassesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_COMApplicationClasses, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_COMApplicationClasses{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationSettings.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationSettings.go new file mode 100644 index 00000000..85f9d2f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMApplicationSettings.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_COMApplicationSettings struct +type Win32_COMApplicationSettings struct { + *CIM_ElementSetting +} + +func NewWin32_COMApplicationSettingsEx1(instance *cim.WmiInstance) (newInstance *Win32_COMApplicationSettings, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_COMApplicationSettings{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_COMApplicationSettingsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_COMApplicationSettings, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_COMApplicationSettings{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMClass.go new file mode 100644 index 00000000..bd3e63bc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMClass.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_COMClass struct +type Win32_COMClass struct { + *CIM_LogicalElement +} + +func NewWin32_COMClassEx1(instance *cim.WmiInstance) (newInstance *Win32_COMClass, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_COMClass{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_COMClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_COMClass, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_COMClass{ + CIM_LogicalElement: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMSetting.go new file mode 100644 index 00000000..b746e74e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_COMSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_COMSetting struct +type Win32_COMSetting struct { + *CIM_Setting +} + +func NewWin32_COMSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_COMSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_COMSetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_COMSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_COMSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_COMSetting{ + CIM_Setting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CacheMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CacheMemory.go new file mode 100644 index 00000000..4ab4e147 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CacheMemory.go @@ -0,0 +1,262 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CacheMemory struct +type Win32_CacheMemory struct { + *CIM_CacheMemory + + // + CacheSpeed uint32 + + // + CurrentSRAM []uint16 + + // + ErrorCorrectType uint16 + + // + InstalledSize uint32 + + // + Location uint16 + + // + MaxCacheSize uint32 + + // + SupportedSRAM []uint16 +} + +func NewWin32_CacheMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_CacheMemory, err error) { + tmp, err := NewCIM_CacheMemoryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CacheMemory{ + CIM_CacheMemory: tmp, + } + return +} + +func NewWin32_CacheMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CacheMemory, err error) { + tmp, err := NewCIM_CacheMemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CacheMemory{ + CIM_CacheMemory: tmp, + } + return +} + +// SetCacheSpeed sets the value of CacheSpeed for the instance +func (instance *Win32_CacheMemory) SetPropertyCacheSpeed(value uint32) (err error) { + return instance.SetProperty("CacheSpeed", (value)) +} + +// GetCacheSpeed gets the value of CacheSpeed for the instance +func (instance *Win32_CacheMemory) GetPropertyCacheSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentSRAM sets the value of CurrentSRAM for the instance +func (instance *Win32_CacheMemory) SetPropertyCurrentSRAM(value []uint16) (err error) { + return instance.SetProperty("CurrentSRAM", (value)) +} + +// GetCurrentSRAM gets the value of CurrentSRAM for the instance +func (instance *Win32_CacheMemory) GetPropertyCurrentSRAM() (value []uint16, err error) { + retValue, err := instance.GetProperty("CurrentSRAM") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetErrorCorrectType sets the value of ErrorCorrectType for the instance +func (instance *Win32_CacheMemory) SetPropertyErrorCorrectType(value uint16) (err error) { + return instance.SetProperty("ErrorCorrectType", (value)) +} + +// GetErrorCorrectType gets the value of ErrorCorrectType for the instance +func (instance *Win32_CacheMemory) GetPropertyErrorCorrectType() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorCorrectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInstalledSize sets the value of InstalledSize for the instance +func (instance *Win32_CacheMemory) SetPropertyInstalledSize(value uint32) (err error) { + return instance.SetProperty("InstalledSize", (value)) +} + +// GetInstalledSize gets the value of InstalledSize for the instance +func (instance *Win32_CacheMemory) GetPropertyInstalledSize() (value uint32, err error) { + retValue, err := instance.GetProperty("InstalledSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_CacheMemory) SetPropertyLocation(value uint16) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_CacheMemory) GetPropertyLocation() (value uint16, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxCacheSize sets the value of MaxCacheSize for the instance +func (instance *Win32_CacheMemory) SetPropertyMaxCacheSize(value uint32) (err error) { + return instance.SetProperty("MaxCacheSize", (value)) +} + +// GetMaxCacheSize gets the value of MaxCacheSize for the instance +func (instance *Win32_CacheMemory) GetPropertyMaxCacheSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSupportedSRAM sets the value of SupportedSRAM for the instance +func (instance *Win32_CacheMemory) SetPropertySupportedSRAM(value []uint16) (err error) { + return instance.SetProperty("SupportedSRAM", (value)) +} + +// GetSupportedSRAM gets the value of SupportedSRAM for the instance +func (instance *Win32_CacheMemory) GetPropertySupportedSRAM() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedSRAM") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CheckCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CheckCheck.go new file mode 100644 index 00000000..c8cde642 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CheckCheck.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CheckCheck struct +type Win32_CheckCheck struct { + *cim.WmiInstance + + // + Check CIM_Check + + // + Location CIM_Check +} + +func NewWin32_CheckCheckEx1(instance *cim.WmiInstance) (newInstance *Win32_CheckCheck, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_CheckCheck{ + WmiInstance: tmp, + } + return +} + +func NewWin32_CheckCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CheckCheck, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CheckCheck{ + WmiInstance: tmp, + } + return +} + +// SetCheck sets the value of Check for the instance +func (instance *Win32_CheckCheck) SetPropertyCheck(value CIM_Check) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *Win32_CheckCheck) GetPropertyCheck() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_CheckCheck) SetPropertyLocation(value CIM_Check) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_CheckCheck) GetPropertyLocation() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassInfoAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassInfoAction.go new file mode 100644 index 00000000..fe5cab1d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassInfoAction.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ClassInfoAction struct +type Win32_ClassInfoAction struct { + *CIM_Action + + // + AppID string + + // + Argument string + + // + CLSID string + + // + Context string + + // + DefInprocHandler string + + // + FileTypeMask string + + // + Insertable uint16 + + // + ProgID string + + // + RemoteName string + + // + VIProgID string +} + +func NewWin32_ClassInfoActionEx1(instance *cim.WmiInstance) (newInstance *Win32_ClassInfoAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ClassInfoAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_ClassInfoActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClassInfoAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClassInfoAction{ + CIM_Action: tmp, + } + return +} + +// SetAppID sets the value of AppID for the instance +func (instance *Win32_ClassInfoAction) SetPropertyAppID(value string) (err error) { + return instance.SetProperty("AppID", (value)) +} + +// GetAppID gets the value of AppID for the instance +func (instance *Win32_ClassInfoAction) GetPropertyAppID() (value string, err error) { + retValue, err := instance.GetProperty("AppID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetArgument sets the value of Argument for the instance +func (instance *Win32_ClassInfoAction) SetPropertyArgument(value string) (err error) { + return instance.SetProperty("Argument", (value)) +} + +// GetArgument gets the value of Argument for the instance +func (instance *Win32_ClassInfoAction) GetPropertyArgument() (value string, err error) { + retValue, err := instance.GetProperty("Argument") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCLSID sets the value of CLSID for the instance +func (instance *Win32_ClassInfoAction) SetPropertyCLSID(value string) (err error) { + return instance.SetProperty("CLSID", (value)) +} + +// GetCLSID gets the value of CLSID for the instance +func (instance *Win32_ClassInfoAction) GetPropertyCLSID() (value string, err error) { + retValue, err := instance.GetProperty("CLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetContext sets the value of Context for the instance +func (instance *Win32_ClassInfoAction) SetPropertyContext(value string) (err error) { + return instance.SetProperty("Context", (value)) +} + +// GetContext gets the value of Context for the instance +func (instance *Win32_ClassInfoAction) GetPropertyContext() (value string, err error) { + retValue, err := instance.GetProperty("Context") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDefInprocHandler sets the value of DefInprocHandler for the instance +func (instance *Win32_ClassInfoAction) SetPropertyDefInprocHandler(value string) (err error) { + return instance.SetProperty("DefInprocHandler", (value)) +} + +// GetDefInprocHandler gets the value of DefInprocHandler for the instance +func (instance *Win32_ClassInfoAction) GetPropertyDefInprocHandler() (value string, err error) { + retValue, err := instance.GetProperty("DefInprocHandler") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileTypeMask sets the value of FileTypeMask for the instance +func (instance *Win32_ClassInfoAction) SetPropertyFileTypeMask(value string) (err error) { + return instance.SetProperty("FileTypeMask", (value)) +} + +// GetFileTypeMask gets the value of FileTypeMask for the instance +func (instance *Win32_ClassInfoAction) GetPropertyFileTypeMask() (value string, err error) { + retValue, err := instance.GetProperty("FileTypeMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInsertable sets the value of Insertable for the instance +func (instance *Win32_ClassInfoAction) SetPropertyInsertable(value uint16) (err error) { + return instance.SetProperty("Insertable", (value)) +} + +// GetInsertable gets the value of Insertable for the instance +func (instance *Win32_ClassInfoAction) GetPropertyInsertable() (value uint16, err error) { + retValue, err := instance.GetProperty("Insertable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetProgID sets the value of ProgID for the instance +func (instance *Win32_ClassInfoAction) SetPropertyProgID(value string) (err error) { + return instance.SetProperty("ProgID", (value)) +} + +// GetProgID gets the value of ProgID for the instance +func (instance *Win32_ClassInfoAction) GetPropertyProgID() (value string, err error) { + retValue, err := instance.GetProperty("ProgID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteName sets the value of RemoteName for the instance +func (instance *Win32_ClassInfoAction) SetPropertyRemoteName(value string) (err error) { + return instance.SetProperty("RemoteName", (value)) +} + +// GetRemoteName gets the value of RemoteName for the instance +func (instance *Win32_ClassInfoAction) GetPropertyRemoteName() (value string, err error) { + retValue, err := instance.GetProperty("RemoteName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVIProgID sets the value of VIProgID for the instance +func (instance *Win32_ClassInfoAction) SetPropertyVIProgID(value string) (err error) { + return instance.SetProperty("VIProgID", (value)) +} + +// GetVIProgID gets the value of VIProgID for the instance +func (instance *Win32_ClassInfoAction) GetPropertyVIProgID() (value string, err error) { + retValue, err := instance.GetProperty("VIProgID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMApplicationClasses.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMApplicationClasses.go new file mode 100644 index 00000000..09b774c6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMApplicationClasses.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ClassicCOMApplicationClasses struct +type Win32_ClassicCOMApplicationClasses struct { + *Win32_COMApplicationClasses +} + +func NewWin32_ClassicCOMApplicationClassesEx1(instance *cim.WmiInstance) (newInstance *Win32_ClassicCOMApplicationClasses, err error) { + tmp, err := NewWin32_COMApplicationClassesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMApplicationClasses{ + Win32_COMApplicationClasses: tmp, + } + return +} + +func NewWin32_ClassicCOMApplicationClassesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClassicCOMApplicationClasses, err error) { + tmp, err := NewWin32_COMApplicationClassesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMApplicationClasses{ + Win32_COMApplicationClasses: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClass.go new file mode 100644 index 00000000..cc039885 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClass.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ClassicCOMClass struct +type Win32_ClassicCOMClass struct { + *Win32_COMClass + + // + ComponentId string +} + +func NewWin32_ClassicCOMClassEx1(instance *cim.WmiInstance) (newInstance *Win32_ClassicCOMClass, err error) { + tmp, err := NewWin32_COMClassEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMClass{ + Win32_COMClass: tmp, + } + return +} + +func NewWin32_ClassicCOMClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClassicCOMClass, err error) { + tmp, err := NewWin32_COMClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMClass{ + Win32_COMClass: tmp, + } + return +} + +// SetComponentId sets the value of ComponentId for the instance +func (instance *Win32_ClassicCOMClass) SetPropertyComponentId(value string) (err error) { + return instance.SetProperty("ComponentId", (value)) +} + +// GetComponentId gets the value of ComponentId for the instance +func (instance *Win32_ClassicCOMClass) GetPropertyComponentId() (value string, err error) { + retValue, err := instance.GetProperty("ComponentId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSetting.go new file mode 100644 index 00000000..285cb384 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSetting.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ClassicCOMClassSetting struct +type Win32_ClassicCOMClassSetting struct { + *Win32_COMSetting + + // + AppID string + + // + AutoConvertToClsid string + + // + AutoTreatAsClsid string + + // + ComponentId string + + // + Control bool + + // + DefaultIcon string + + // + InprocHandler string + + // + InprocHandler32 string + + // + InprocServer string + + // + InprocServer32 string + + // + Insertable bool + + // + JavaClass bool + + // + LocalServer string + + // + LocalServer32 string + + // + LongDisplayName string + + // + ProgId string + + // + ShortDisplayName string + + // + ThreadingModel string + + // + ToolBoxBitmap32 string + + // + TreatAsClsid string + + // + TypeLibraryId string + + // + Version string + + // + VersionIndependentProgId string +} + +func NewWin32_ClassicCOMClassSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_ClassicCOMClassSetting, err error) { + tmp, err := NewWin32_COMSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMClassSetting{ + Win32_COMSetting: tmp, + } + return +} + +func NewWin32_ClassicCOMClassSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClassicCOMClassSetting, err error) { + tmp, err := NewWin32_COMSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMClassSetting{ + Win32_COMSetting: tmp, + } + return +} + +// SetAppID sets the value of AppID for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyAppID(value string) (err error) { + return instance.SetProperty("AppID", (value)) +} + +// GetAppID gets the value of AppID for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyAppID() (value string, err error) { + retValue, err := instance.GetProperty("AppID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAutoConvertToClsid sets the value of AutoConvertToClsid for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyAutoConvertToClsid(value string) (err error) { + return instance.SetProperty("AutoConvertToClsid", (value)) +} + +// GetAutoConvertToClsid gets the value of AutoConvertToClsid for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyAutoConvertToClsid() (value string, err error) { + retValue, err := instance.GetProperty("AutoConvertToClsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAutoTreatAsClsid sets the value of AutoTreatAsClsid for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyAutoTreatAsClsid(value string) (err error) { + return instance.SetProperty("AutoTreatAsClsid", (value)) +} + +// GetAutoTreatAsClsid gets the value of AutoTreatAsClsid for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyAutoTreatAsClsid() (value string, err error) { + retValue, err := instance.GetProperty("AutoTreatAsClsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetComponentId sets the value of ComponentId for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyComponentId(value string) (err error) { + return instance.SetProperty("ComponentId", (value)) +} + +// GetComponentId gets the value of ComponentId for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyComponentId() (value string, err error) { + retValue, err := instance.GetProperty("ComponentId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetControl sets the value of Control for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyControl(value bool) (err error) { + return instance.SetProperty("Control", (value)) +} + +// GetControl gets the value of Control for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyControl() (value bool, err error) { + retValue, err := instance.GetProperty("Control") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDefaultIcon sets the value of DefaultIcon for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyDefaultIcon(value string) (err error) { + return instance.SetProperty("DefaultIcon", (value)) +} + +// GetDefaultIcon gets the value of DefaultIcon for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyDefaultIcon() (value string, err error) { + retValue, err := instance.GetProperty("DefaultIcon") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInprocHandler sets the value of InprocHandler for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyInprocHandler(value string) (err error) { + return instance.SetProperty("InprocHandler", (value)) +} + +// GetInprocHandler gets the value of InprocHandler for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyInprocHandler() (value string, err error) { + retValue, err := instance.GetProperty("InprocHandler") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInprocHandler32 sets the value of InprocHandler32 for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyInprocHandler32(value string) (err error) { + return instance.SetProperty("InprocHandler32", (value)) +} + +// GetInprocHandler32 gets the value of InprocHandler32 for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyInprocHandler32() (value string, err error) { + retValue, err := instance.GetProperty("InprocHandler32") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInprocServer sets the value of InprocServer for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyInprocServer(value string) (err error) { + return instance.SetProperty("InprocServer", (value)) +} + +// GetInprocServer gets the value of InprocServer for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyInprocServer() (value string, err error) { + retValue, err := instance.GetProperty("InprocServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInprocServer32 sets the value of InprocServer32 for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyInprocServer32(value string) (err error) { + return instance.SetProperty("InprocServer32", (value)) +} + +// GetInprocServer32 gets the value of InprocServer32 for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyInprocServer32() (value string, err error) { + retValue, err := instance.GetProperty("InprocServer32") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInsertable sets the value of Insertable for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyInsertable(value bool) (err error) { + return instance.SetProperty("Insertable", (value)) +} + +// GetInsertable gets the value of Insertable for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyInsertable() (value bool, err error) { + retValue, err := instance.GetProperty("Insertable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetJavaClass sets the value of JavaClass for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyJavaClass(value bool) (err error) { + return instance.SetProperty("JavaClass", (value)) +} + +// GetJavaClass gets the value of JavaClass for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyJavaClass() (value bool, err error) { + retValue, err := instance.GetProperty("JavaClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalServer sets the value of LocalServer for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyLocalServer(value string) (err error) { + return instance.SetProperty("LocalServer", (value)) +} + +// GetLocalServer gets the value of LocalServer for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyLocalServer() (value string, err error) { + retValue, err := instance.GetProperty("LocalServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalServer32 sets the value of LocalServer32 for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyLocalServer32(value string) (err error) { + return instance.SetProperty("LocalServer32", (value)) +} + +// GetLocalServer32 gets the value of LocalServer32 for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyLocalServer32() (value string, err error) { + retValue, err := instance.GetProperty("LocalServer32") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLongDisplayName sets the value of LongDisplayName for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyLongDisplayName(value string) (err error) { + return instance.SetProperty("LongDisplayName", (value)) +} + +// GetLongDisplayName gets the value of LongDisplayName for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyLongDisplayName() (value string, err error) { + retValue, err := instance.GetProperty("LongDisplayName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProgId sets the value of ProgId for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyProgId(value string) (err error) { + return instance.SetProperty("ProgId", (value)) +} + +// GetProgId gets the value of ProgId for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyProgId() (value string, err error) { + retValue, err := instance.GetProperty("ProgId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShortDisplayName sets the value of ShortDisplayName for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyShortDisplayName(value string) (err error) { + return instance.SetProperty("ShortDisplayName", (value)) +} + +// GetShortDisplayName gets the value of ShortDisplayName for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyShortDisplayName() (value string, err error) { + retValue, err := instance.GetProperty("ShortDisplayName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetThreadingModel sets the value of ThreadingModel for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyThreadingModel(value string) (err error) { + return instance.SetProperty("ThreadingModel", (value)) +} + +// GetThreadingModel gets the value of ThreadingModel for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyThreadingModel() (value string, err error) { + retValue, err := instance.GetProperty("ThreadingModel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetToolBoxBitmap32 sets the value of ToolBoxBitmap32 for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyToolBoxBitmap32(value string) (err error) { + return instance.SetProperty("ToolBoxBitmap32", (value)) +} + +// GetToolBoxBitmap32 gets the value of ToolBoxBitmap32 for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyToolBoxBitmap32() (value string, err error) { + retValue, err := instance.GetProperty("ToolBoxBitmap32") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTreatAsClsid sets the value of TreatAsClsid for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyTreatAsClsid(value string) (err error) { + return instance.SetProperty("TreatAsClsid", (value)) +} + +// GetTreatAsClsid gets the value of TreatAsClsid for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyTreatAsClsid() (value string, err error) { + retValue, err := instance.GetProperty("TreatAsClsid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTypeLibraryId sets the value of TypeLibraryId for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyTypeLibraryId(value string) (err error) { + return instance.SetProperty("TypeLibraryId", (value)) +} + +// GetTypeLibraryId gets the value of TypeLibraryId for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyTypeLibraryId() (value string, err error) { + retValue, err := instance.GetProperty("TypeLibraryId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersionIndependentProgId sets the value of VersionIndependentProgId for the instance +func (instance *Win32_ClassicCOMClassSetting) SetPropertyVersionIndependentProgId(value string) (err error) { + return instance.SetProperty("VersionIndependentProgId", (value)) +} + +// GetVersionIndependentProgId gets the value of VersionIndependentProgId for the instance +func (instance *Win32_ClassicCOMClassSetting) GetPropertyVersionIndependentProgId() (value string, err error) { + retValue, err := instance.GetProperty("VersionIndependentProgId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSettings.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSettings.go new file mode 100644 index 00000000..9fc46366 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClassicCOMClassSettings.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ClassicCOMClassSettings struct +type Win32_ClassicCOMClassSettings struct { + *CIM_ElementSetting +} + +func NewWin32_ClassicCOMClassSettingsEx1(instance *cim.WmiInstance) (newInstance *Win32_ClassicCOMClassSettings, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMClassSettings{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_ClassicCOMClassSettingsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClassicCOMClassSettings, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClassicCOMClassSettings{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClientApplicationSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClientApplicationSetting.go new file mode 100644 index 00000000..6c0e6fa3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClientApplicationSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ClientApplicationSetting struct +type Win32_ClientApplicationSetting struct { + *cim.WmiInstance + + // + Application Win32_DCOMApplication + + // + Client CIM_DataFile +} + +func NewWin32_ClientApplicationSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_ClientApplicationSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ClientApplicationSetting{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ClientApplicationSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClientApplicationSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClientApplicationSetting{ + WmiInstance: tmp, + } + return +} + +// SetApplication sets the value of Application for the instance +func (instance *Win32_ClientApplicationSetting) SetPropertyApplication(value Win32_DCOMApplication) (err error) { + return instance.SetProperty("Application", (value)) +} + +// GetApplication gets the value of Application for the instance +func (instance *Win32_ClientApplicationSetting) GetPropertyApplication() (value Win32_DCOMApplication, err error) { + retValue, err := instance.GetProperty("Application") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_DCOMApplication) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_DCOMApplication is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_DCOMApplication(valuetmp) + + return +} + +// SetClient sets the value of Client for the instance +func (instance *Win32_ClientApplicationSetting) SetPropertyClient(value CIM_DataFile) (err error) { + return instance.SetProperty("Client", (value)) +} + +// GetClient gets the value of Client for the instance +func (instance *Win32_ClientApplicationSetting) GetPropertyClient() (value CIM_DataFile, err error) { + retValue, err := instance.GetProperty("Client") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_DataFile) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_DataFile is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_DataFile(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClusterShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClusterShare.go new file mode 100644 index 00000000..8781972d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ClusterShare.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ClusterShare struct +type Win32_ClusterShare struct { + *Win32_Share + + // + ServerName string +} + +func NewWin32_ClusterShareEx1(instance *cim.WmiInstance) (newInstance *Win32_ClusterShare, err error) { + tmp, err := NewWin32_ShareEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ClusterShare{ + Win32_Share: tmp, + } + return +} + +func NewWin32_ClusterShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ClusterShare, err error) { + tmp, err := NewWin32_ShareEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ClusterShare{ + Win32_Share: tmp, + } + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Win32_ClusterShare) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Win32_ClusterShare) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CodecFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CodecFile.go new file mode 100644 index 00000000..9918743c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CodecFile.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CodecFile struct +type Win32_CodecFile struct { + *CIM_DataFile + + // + Group string +} + +func NewWin32_CodecFileEx1(instance *cim.WmiInstance) (newInstance *Win32_CodecFile, err error) { + tmp, err := NewCIM_DataFileEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CodecFile{ + CIM_DataFile: tmp, + } + return +} + +func NewWin32_CodecFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CodecFile, err error) { + tmp, err := NewCIM_DataFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CodecFile{ + CIM_DataFile: tmp, + } + return +} + +// SetGroup sets the value of Group for the instance +func (instance *Win32_CodecFile) SetPropertyGroup(value string) (err error) { + return instance.SetProperty("Group", (value)) +} + +// GetGroup gets the value of Group for the instance +func (instance *Win32_CodecFile) GetPropertyGroup() (value string, err error) { + retValue, err := instance.GetProperty("Group") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CollectionStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CollectionStatistics.go new file mode 100644 index 00000000..e97e52ad --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CollectionStatistics.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CollectionStatistics struct +type Win32_CollectionStatistics struct { + *cim.WmiInstance + + // + Collection CIM_CollectionOfMSEs + + // + Stats CIM_StatisticalInformation +} + +func NewWin32_CollectionStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_CollectionStatistics, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_CollectionStatistics{ + WmiInstance: tmp, + } + return +} + +func NewWin32_CollectionStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CollectionStatistics, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CollectionStatistics{ + WmiInstance: tmp, + } + return +} + +// SetCollection sets the value of Collection for the instance +func (instance *Win32_CollectionStatistics) SetPropertyCollection(value CIM_CollectionOfMSEs) (err error) { + return instance.SetProperty("Collection", (value)) +} + +// GetCollection gets the value of Collection for the instance +func (instance *Win32_CollectionStatistics) GetPropertyCollection() (value CIM_CollectionOfMSEs, err error) { + retValue, err := instance.GetProperty("Collection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_CollectionOfMSEs) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_CollectionOfMSEs is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_CollectionOfMSEs(valuetmp) + + return +} + +// SetStats sets the value of Stats for the instance +func (instance *Win32_CollectionStatistics) SetPropertyStats(value CIM_StatisticalInformation) (err error) { + return instance.SetProperty("Stats", (value)) +} + +// GetStats gets the value of Stats for the instance +func (instance *Win32_CollectionStatistics) GetPropertyStats() (value CIM_StatisticalInformation, err error) { + retValue, err := instance.GetProperty("Stats") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_StatisticalInformation) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_StatisticalInformation is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_StatisticalInformation(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassAutoEmulator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassAutoEmulator.go new file mode 100644 index 00000000..033f3781 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassAutoEmulator.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComClassAutoEmulator struct +type Win32_ComClassAutoEmulator struct { + *cim.WmiInstance + + // + NewVersion Win32_ClassicCOMClass + + // + OldVersion Win32_ClassicCOMClass +} + +func NewWin32_ComClassAutoEmulatorEx1(instance *cim.WmiInstance) (newInstance *Win32_ComClassAutoEmulator, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ComClassAutoEmulator{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ComClassAutoEmulatorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComClassAutoEmulator, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComClassAutoEmulator{ + WmiInstance: tmp, + } + return +} + +// SetNewVersion sets the value of NewVersion for the instance +func (instance *Win32_ComClassAutoEmulator) SetPropertyNewVersion(value Win32_ClassicCOMClass) (err error) { + return instance.SetProperty("NewVersion", (value)) +} + +// GetNewVersion gets the value of NewVersion for the instance +func (instance *Win32_ComClassAutoEmulator) GetPropertyNewVersion() (value Win32_ClassicCOMClass, err error) { + retValue, err := instance.GetProperty("NewVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ClassicCOMClass) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ClassicCOMClass is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ClassicCOMClass(valuetmp) + + return +} + +// SetOldVersion sets the value of OldVersion for the instance +func (instance *Win32_ComClassAutoEmulator) SetPropertyOldVersion(value Win32_ClassicCOMClass) (err error) { + return instance.SetProperty("OldVersion", (value)) +} + +// GetOldVersion gets the value of OldVersion for the instance +func (instance *Win32_ComClassAutoEmulator) GetPropertyOldVersion() (value Win32_ClassicCOMClass, err error) { + retValue, err := instance.GetProperty("OldVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ClassicCOMClass) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ClassicCOMClass is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ClassicCOMClass(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassEmulator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassEmulator.go new file mode 100644 index 00000000..073ac015 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComClassEmulator.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComClassEmulator struct +type Win32_ComClassEmulator struct { + *cim.WmiInstance + + // + NewVersion Win32_ClassicCOMClass + + // + OldVersion Win32_ClassicCOMClass +} + +func NewWin32_ComClassEmulatorEx1(instance *cim.WmiInstance) (newInstance *Win32_ComClassEmulator, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ComClassEmulator{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ComClassEmulatorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComClassEmulator, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComClassEmulator{ + WmiInstance: tmp, + } + return +} + +// SetNewVersion sets the value of NewVersion for the instance +func (instance *Win32_ComClassEmulator) SetPropertyNewVersion(value Win32_ClassicCOMClass) (err error) { + return instance.SetProperty("NewVersion", (value)) +} + +// GetNewVersion gets the value of NewVersion for the instance +func (instance *Win32_ComClassEmulator) GetPropertyNewVersion() (value Win32_ClassicCOMClass, err error) { + retValue, err := instance.GetProperty("NewVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ClassicCOMClass) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ClassicCOMClass is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ClassicCOMClass(valuetmp) + + return +} + +// SetOldVersion sets the value of OldVersion for the instance +func (instance *Win32_ComClassEmulator) SetPropertyOldVersion(value Win32_ClassicCOMClass) (err error) { + return instance.SetProperty("OldVersion", (value)) +} + +// GetOldVersion gets the value of OldVersion for the instance +func (instance *Win32_ComClassEmulator) GetPropertyOldVersion() (value Win32_ClassicCOMClass, err error) { + retValue, err := instance.GetProperty("OldVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ClassicCOMClass) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ClassicCOMClass is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ClassicCOMClass(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CommandLineAccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CommandLineAccess.go new file mode 100644 index 00000000..58084863 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CommandLineAccess.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CommandLineAccess struct +type Win32_CommandLineAccess struct { + *CIM_ServiceAccessPoint + + // + CommandLine string +} + +func NewWin32_CommandLineAccessEx1(instance *cim.WmiInstance) (newInstance *Win32_CommandLineAccess, err error) { + tmp, err := NewCIM_ServiceAccessPointEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CommandLineAccess{ + CIM_ServiceAccessPoint: tmp, + } + return +} + +func NewWin32_CommandLineAccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CommandLineAccess, err error) { + tmp, err := NewCIM_ServiceAccessPointEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CommandLineAccess{ + CIM_ServiceAccessPoint: tmp, + } + return +} + +// SetCommandLine sets the value of CommandLine for the instance +func (instance *Win32_CommandLineAccess) SetPropertyCommandLine(value string) (err error) { + return instance.SetProperty("CommandLine", (value)) +} + +// GetCommandLine gets the value of CommandLine for the instance +func (instance *Win32_CommandLineAccess) GetPropertyCommandLine() (value string, err error) { + retValue, err := instance.GetProperty("CommandLine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComponentCategory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComponentCategory.go new file mode 100644 index 00000000..c9a1afd8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComponentCategory.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComponentCategory struct +type Win32_ComponentCategory struct { + *CIM_LogicalElement + + // + CategoryId string +} + +func NewWin32_ComponentCategoryEx1(instance *cim.WmiInstance) (newInstance *Win32_ComponentCategory, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ComponentCategory{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ComponentCategoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComponentCategory, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComponentCategory{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCategoryId sets the value of CategoryId for the instance +func (instance *Win32_ComponentCategory) SetPropertyCategoryId(value string) (err error) { + return instance.SetProperty("CategoryId", (value)) +} + +// GetCategoryId gets the value of CategoryId for the instance +func (instance *Win32_ComponentCategory) GetPropertyCategoryId() (value string, err error) { + retValue, err := instance.GetProperty("CategoryId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerShutdownEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerShutdownEvent.go new file mode 100644 index 00000000..56c1ce96 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerShutdownEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComputerShutdownEvent struct +type Win32_ComputerShutdownEvent struct { + *Win32_ComputerSystemEvent + + // + Type uint32 +} + +func NewWin32_ComputerShutdownEventEx1(instance *cim.WmiInstance) (newInstance *Win32_ComputerShutdownEvent, err error) { + tmp, err := NewWin32_ComputerSystemEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ComputerShutdownEvent{ + Win32_ComputerSystemEvent: tmp, + } + return +} + +func NewWin32_ComputerShutdownEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComputerShutdownEvent, err error) { + tmp, err := NewWin32_ComputerSystemEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComputerShutdownEvent{ + Win32_ComputerSystemEvent: tmp, + } + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_ComputerShutdownEvent) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_ComputerShutdownEvent) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystem.go new file mode 100644 index 00000000..78c1164d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystem.go @@ -0,0 +1,1556 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComputerSystem struct +type Win32_ComputerSystem struct { + *CIM_UnitaryComputerSystem + + // + AdminPasswordStatus uint16 + + // + AutomaticManagedPagefile bool + + // + AutomaticResetBootOption bool + + // + AutomaticResetCapability bool + + // + BootOptionOnLimit uint16 + + // + BootOptionOnWatchDog uint16 + + // + BootROMSupported bool + + // + BootStatus []uint16 + + // + BootupState string + + // + ChassisBootupState uint16 + + // + ChassisSKUNumber string + + // + CurrentTimeZone int16 + + // + DaylightInEffect bool + + // + DNSHostName string + + // + Domain string + + // + DomainRole uint16 + + // + EnableDaylightSavingsTime bool + + // + FrontPanelResetStatus uint16 + + // + HypervisorPresent bool + + // + InfraredSupported bool + + // + KeyboardPasswordStatus uint16 + + // + Manufacturer string + + // + Model string + + // + NetworkServerModeEnabled bool + + // + NumberOfLogicalProcessors uint32 + + // + NumberOfProcessors uint32 + + // + OEMLogoBitmap []uint8 + + // + OEMStringArray []string + + // + PartOfDomain bool + + // + PauseAfterReset int64 + + // + PCSystemType uint16 + + // + PCSystemTypeEx uint16 + + // + PowerOnPasswordStatus uint16 + + // + PowerSupplyState uint16 + + // + ResetCount int16 + + // + ResetLimit int16 + + // + SupportContactDescription []string + + // + SystemFamily string + + // + SystemSKUNumber string + + // + SystemStartupDelay uint16 + + // + SystemStartupOptions []string + + // + SystemStartupSetting uint8 + + // + SystemType string + + // + ThermalState uint16 + + // + TotalPhysicalMemory uint64 + + // + UserName string + + // + WakeUpType uint16 + + // + Workgroup string +} + +func NewWin32_ComputerSystemEx1(instance *cim.WmiInstance) (newInstance *Win32_ComputerSystem, err error) { + tmp, err := NewCIM_UnitaryComputerSystemEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystem{ + CIM_UnitaryComputerSystem: tmp, + } + return +} + +func NewWin32_ComputerSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComputerSystem, err error) { + tmp, err := NewCIM_UnitaryComputerSystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystem{ + CIM_UnitaryComputerSystem: tmp, + } + return +} + +// SetAdminPasswordStatus sets the value of AdminPasswordStatus for the instance +func (instance *Win32_ComputerSystem) SetPropertyAdminPasswordStatus(value uint16) (err error) { + return instance.SetProperty("AdminPasswordStatus", (value)) +} + +// GetAdminPasswordStatus gets the value of AdminPasswordStatus for the instance +func (instance *Win32_ComputerSystem) GetPropertyAdminPasswordStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("AdminPasswordStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAutomaticManagedPagefile sets the value of AutomaticManagedPagefile for the instance +func (instance *Win32_ComputerSystem) SetPropertyAutomaticManagedPagefile(value bool) (err error) { + return instance.SetProperty("AutomaticManagedPagefile", (value)) +} + +// GetAutomaticManagedPagefile gets the value of AutomaticManagedPagefile for the instance +func (instance *Win32_ComputerSystem) GetPropertyAutomaticManagedPagefile() (value bool, err error) { + retValue, err := instance.GetProperty("AutomaticManagedPagefile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAutomaticResetBootOption sets the value of AutomaticResetBootOption for the instance +func (instance *Win32_ComputerSystem) SetPropertyAutomaticResetBootOption(value bool) (err error) { + return instance.SetProperty("AutomaticResetBootOption", (value)) +} + +// GetAutomaticResetBootOption gets the value of AutomaticResetBootOption for the instance +func (instance *Win32_ComputerSystem) GetPropertyAutomaticResetBootOption() (value bool, err error) { + retValue, err := instance.GetProperty("AutomaticResetBootOption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAutomaticResetCapability sets the value of AutomaticResetCapability for the instance +func (instance *Win32_ComputerSystem) SetPropertyAutomaticResetCapability(value bool) (err error) { + return instance.SetProperty("AutomaticResetCapability", (value)) +} + +// GetAutomaticResetCapability gets the value of AutomaticResetCapability for the instance +func (instance *Win32_ComputerSystem) GetPropertyAutomaticResetCapability() (value bool, err error) { + retValue, err := instance.GetProperty("AutomaticResetCapability") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBootOptionOnLimit sets the value of BootOptionOnLimit for the instance +func (instance *Win32_ComputerSystem) SetPropertyBootOptionOnLimit(value uint16) (err error) { + return instance.SetProperty("BootOptionOnLimit", (value)) +} + +// GetBootOptionOnLimit gets the value of BootOptionOnLimit for the instance +func (instance *Win32_ComputerSystem) GetPropertyBootOptionOnLimit() (value uint16, err error) { + retValue, err := instance.GetProperty("BootOptionOnLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetBootOptionOnWatchDog sets the value of BootOptionOnWatchDog for the instance +func (instance *Win32_ComputerSystem) SetPropertyBootOptionOnWatchDog(value uint16) (err error) { + return instance.SetProperty("BootOptionOnWatchDog", (value)) +} + +// GetBootOptionOnWatchDog gets the value of BootOptionOnWatchDog for the instance +func (instance *Win32_ComputerSystem) GetPropertyBootOptionOnWatchDog() (value uint16, err error) { + retValue, err := instance.GetProperty("BootOptionOnWatchDog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetBootROMSupported sets the value of BootROMSupported for the instance +func (instance *Win32_ComputerSystem) SetPropertyBootROMSupported(value bool) (err error) { + return instance.SetProperty("BootROMSupported", (value)) +} + +// GetBootROMSupported gets the value of BootROMSupported for the instance +func (instance *Win32_ComputerSystem) GetPropertyBootROMSupported() (value bool, err error) { + retValue, err := instance.GetProperty("BootROMSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBootStatus sets the value of BootStatus for the instance +func (instance *Win32_ComputerSystem) SetPropertyBootStatus(value []uint16) (err error) { + return instance.SetProperty("BootStatus", (value)) +} + +// GetBootStatus gets the value of BootStatus for the instance +func (instance *Win32_ComputerSystem) GetPropertyBootStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("BootStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetBootupState sets the value of BootupState for the instance +func (instance *Win32_ComputerSystem) SetPropertyBootupState(value string) (err error) { + return instance.SetProperty("BootupState", (value)) +} + +// GetBootupState gets the value of BootupState for the instance +func (instance *Win32_ComputerSystem) GetPropertyBootupState() (value string, err error) { + retValue, err := instance.GetProperty("BootupState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetChassisBootupState sets the value of ChassisBootupState for the instance +func (instance *Win32_ComputerSystem) SetPropertyChassisBootupState(value uint16) (err error) { + return instance.SetProperty("ChassisBootupState", (value)) +} + +// GetChassisBootupState gets the value of ChassisBootupState for the instance +func (instance *Win32_ComputerSystem) GetPropertyChassisBootupState() (value uint16, err error) { + retValue, err := instance.GetProperty("ChassisBootupState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetChassisSKUNumber sets the value of ChassisSKUNumber for the instance +func (instance *Win32_ComputerSystem) SetPropertyChassisSKUNumber(value string) (err error) { + return instance.SetProperty("ChassisSKUNumber", (value)) +} + +// GetChassisSKUNumber gets the value of ChassisSKUNumber for the instance +func (instance *Win32_ComputerSystem) GetPropertyChassisSKUNumber() (value string, err error) { + retValue, err := instance.GetProperty("ChassisSKUNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentTimeZone sets the value of CurrentTimeZone for the instance +func (instance *Win32_ComputerSystem) SetPropertyCurrentTimeZone(value int16) (err error) { + return instance.SetProperty("CurrentTimeZone", (value)) +} + +// GetCurrentTimeZone gets the value of CurrentTimeZone for the instance +func (instance *Win32_ComputerSystem) GetPropertyCurrentTimeZone() (value int16, err error) { + retValue, err := instance.GetProperty("CurrentTimeZone") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetDaylightInEffect sets the value of DaylightInEffect for the instance +func (instance *Win32_ComputerSystem) SetPropertyDaylightInEffect(value bool) (err error) { + return instance.SetProperty("DaylightInEffect", (value)) +} + +// GetDaylightInEffect gets the value of DaylightInEffect for the instance +func (instance *Win32_ComputerSystem) GetPropertyDaylightInEffect() (value bool, err error) { + retValue, err := instance.GetProperty("DaylightInEffect") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDNSHostName sets the value of DNSHostName for the instance +func (instance *Win32_ComputerSystem) SetPropertyDNSHostName(value string) (err error) { + return instance.SetProperty("DNSHostName", (value)) +} + +// GetDNSHostName gets the value of DNSHostName for the instance +func (instance *Win32_ComputerSystem) GetPropertyDNSHostName() (value string, err error) { + retValue, err := instance.GetProperty("DNSHostName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDomain sets the value of Domain for the instance +func (instance *Win32_ComputerSystem) SetPropertyDomain(value string) (err error) { + return instance.SetProperty("Domain", (value)) +} + +// GetDomain gets the value of Domain for the instance +func (instance *Win32_ComputerSystem) GetPropertyDomain() (value string, err error) { + retValue, err := instance.GetProperty("Domain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDomainRole sets the value of DomainRole for the instance +func (instance *Win32_ComputerSystem) SetPropertyDomainRole(value uint16) (err error) { + return instance.SetProperty("DomainRole", (value)) +} + +// GetDomainRole gets the value of DomainRole for the instance +func (instance *Win32_ComputerSystem) GetPropertyDomainRole() (value uint16, err error) { + retValue, err := instance.GetProperty("DomainRole") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEnableDaylightSavingsTime sets the value of EnableDaylightSavingsTime for the instance +func (instance *Win32_ComputerSystem) SetPropertyEnableDaylightSavingsTime(value bool) (err error) { + return instance.SetProperty("EnableDaylightSavingsTime", (value)) +} + +// GetEnableDaylightSavingsTime gets the value of EnableDaylightSavingsTime for the instance +func (instance *Win32_ComputerSystem) GetPropertyEnableDaylightSavingsTime() (value bool, err error) { + retValue, err := instance.GetProperty("EnableDaylightSavingsTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFrontPanelResetStatus sets the value of FrontPanelResetStatus for the instance +func (instance *Win32_ComputerSystem) SetPropertyFrontPanelResetStatus(value uint16) (err error) { + return instance.SetProperty("FrontPanelResetStatus", (value)) +} + +// GetFrontPanelResetStatus gets the value of FrontPanelResetStatus for the instance +func (instance *Win32_ComputerSystem) GetPropertyFrontPanelResetStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("FrontPanelResetStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHypervisorPresent sets the value of HypervisorPresent for the instance +func (instance *Win32_ComputerSystem) SetPropertyHypervisorPresent(value bool) (err error) { + return instance.SetProperty("HypervisorPresent", (value)) +} + +// GetHypervisorPresent gets the value of HypervisorPresent for the instance +func (instance *Win32_ComputerSystem) GetPropertyHypervisorPresent() (value bool, err error) { + retValue, err := instance.GetProperty("HypervisorPresent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInfraredSupported sets the value of InfraredSupported for the instance +func (instance *Win32_ComputerSystem) SetPropertyInfraredSupported(value bool) (err error) { + return instance.SetProperty("InfraredSupported", (value)) +} + +// GetInfraredSupported gets the value of InfraredSupported for the instance +func (instance *Win32_ComputerSystem) GetPropertyInfraredSupported() (value bool, err error) { + retValue, err := instance.GetProperty("InfraredSupported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetKeyboardPasswordStatus sets the value of KeyboardPasswordStatus for the instance +func (instance *Win32_ComputerSystem) SetPropertyKeyboardPasswordStatus(value uint16) (err error) { + return instance.SetProperty("KeyboardPasswordStatus", (value)) +} + +// GetKeyboardPasswordStatus gets the value of KeyboardPasswordStatus for the instance +func (instance *Win32_ComputerSystem) GetPropertyKeyboardPasswordStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("KeyboardPasswordStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_ComputerSystem) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_ComputerSystem) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *Win32_ComputerSystem) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *Win32_ComputerSystem) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNetworkServerModeEnabled sets the value of NetworkServerModeEnabled for the instance +func (instance *Win32_ComputerSystem) SetPropertyNetworkServerModeEnabled(value bool) (err error) { + return instance.SetProperty("NetworkServerModeEnabled", (value)) +} + +// GetNetworkServerModeEnabled gets the value of NetworkServerModeEnabled for the instance +func (instance *Win32_ComputerSystem) GetPropertyNetworkServerModeEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("NetworkServerModeEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNumberOfLogicalProcessors sets the value of NumberOfLogicalProcessors for the instance +func (instance *Win32_ComputerSystem) SetPropertyNumberOfLogicalProcessors(value uint32) (err error) { + return instance.SetProperty("NumberOfLogicalProcessors", (value)) +} + +// GetNumberOfLogicalProcessors gets the value of NumberOfLogicalProcessors for the instance +func (instance *Win32_ComputerSystem) GetPropertyNumberOfLogicalProcessors() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfLogicalProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfProcessors sets the value of NumberOfProcessors for the instance +func (instance *Win32_ComputerSystem) SetPropertyNumberOfProcessors(value uint32) (err error) { + return instance.SetProperty("NumberOfProcessors", (value)) +} + +// GetNumberOfProcessors gets the value of NumberOfProcessors for the instance +func (instance *Win32_ComputerSystem) GetPropertyNumberOfProcessors() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOEMLogoBitmap sets the value of OEMLogoBitmap for the instance +func (instance *Win32_ComputerSystem) SetPropertyOEMLogoBitmap(value []uint8) (err error) { + return instance.SetProperty("OEMLogoBitmap", (value)) +} + +// GetOEMLogoBitmap gets the value of OEMLogoBitmap for the instance +func (instance *Win32_ComputerSystem) GetPropertyOEMLogoBitmap() (value []uint8, err error) { + retValue, err := instance.GetProperty("OEMLogoBitmap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetOEMStringArray sets the value of OEMStringArray for the instance +func (instance *Win32_ComputerSystem) SetPropertyOEMStringArray(value []string) (err error) { + return instance.SetProperty("OEMStringArray", (value)) +} + +// GetOEMStringArray gets the value of OEMStringArray for the instance +func (instance *Win32_ComputerSystem) GetPropertyOEMStringArray() (value []string, err error) { + retValue, err := instance.GetProperty("OEMStringArray") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPartOfDomain sets the value of PartOfDomain for the instance +func (instance *Win32_ComputerSystem) SetPropertyPartOfDomain(value bool) (err error) { + return instance.SetProperty("PartOfDomain", (value)) +} + +// GetPartOfDomain gets the value of PartOfDomain for the instance +func (instance *Win32_ComputerSystem) GetPropertyPartOfDomain() (value bool, err error) { + retValue, err := instance.GetProperty("PartOfDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPauseAfterReset sets the value of PauseAfterReset for the instance +func (instance *Win32_ComputerSystem) SetPropertyPauseAfterReset(value int64) (err error) { + return instance.SetProperty("PauseAfterReset", (value)) +} + +// GetPauseAfterReset gets the value of PauseAfterReset for the instance +func (instance *Win32_ComputerSystem) GetPropertyPauseAfterReset() (value int64, err error) { + retValue, err := instance.GetProperty("PauseAfterReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetPCSystemType sets the value of PCSystemType for the instance +func (instance *Win32_ComputerSystem) SetPropertyPCSystemType(value uint16) (err error) { + return instance.SetProperty("PCSystemType", (value)) +} + +// GetPCSystemType gets the value of PCSystemType for the instance +func (instance *Win32_ComputerSystem) GetPropertyPCSystemType() (value uint16, err error) { + retValue, err := instance.GetProperty("PCSystemType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPCSystemTypeEx sets the value of PCSystemTypeEx for the instance +func (instance *Win32_ComputerSystem) SetPropertyPCSystemTypeEx(value uint16) (err error) { + return instance.SetProperty("PCSystemTypeEx", (value)) +} + +// GetPCSystemTypeEx gets the value of PCSystemTypeEx for the instance +func (instance *Win32_ComputerSystem) GetPropertyPCSystemTypeEx() (value uint16, err error) { + retValue, err := instance.GetProperty("PCSystemTypeEx") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPowerOnPasswordStatus sets the value of PowerOnPasswordStatus for the instance +func (instance *Win32_ComputerSystem) SetPropertyPowerOnPasswordStatus(value uint16) (err error) { + return instance.SetProperty("PowerOnPasswordStatus", (value)) +} + +// GetPowerOnPasswordStatus gets the value of PowerOnPasswordStatus for the instance +func (instance *Win32_ComputerSystem) GetPropertyPowerOnPasswordStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("PowerOnPasswordStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPowerSupplyState sets the value of PowerSupplyState for the instance +func (instance *Win32_ComputerSystem) SetPropertyPowerSupplyState(value uint16) (err error) { + return instance.SetProperty("PowerSupplyState", (value)) +} + +// GetPowerSupplyState gets the value of PowerSupplyState for the instance +func (instance *Win32_ComputerSystem) GetPropertyPowerSupplyState() (value uint16, err error) { + retValue, err := instance.GetProperty("PowerSupplyState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetResetCount sets the value of ResetCount for the instance +func (instance *Win32_ComputerSystem) SetPropertyResetCount(value int16) (err error) { + return instance.SetProperty("ResetCount", (value)) +} + +// GetResetCount gets the value of ResetCount for the instance +func (instance *Win32_ComputerSystem) GetPropertyResetCount() (value int16, err error) { + retValue, err := instance.GetProperty("ResetCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetResetLimit sets the value of ResetLimit for the instance +func (instance *Win32_ComputerSystem) SetPropertyResetLimit(value int16) (err error) { + return instance.SetProperty("ResetLimit", (value)) +} + +// GetResetLimit gets the value of ResetLimit for the instance +func (instance *Win32_ComputerSystem) GetPropertyResetLimit() (value int16, err error) { + retValue, err := instance.GetProperty("ResetLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetSupportContactDescription sets the value of SupportContactDescription for the instance +func (instance *Win32_ComputerSystem) SetPropertySupportContactDescription(value []string) (err error) { + return instance.SetProperty("SupportContactDescription", (value)) +} + +// GetSupportContactDescription gets the value of SupportContactDescription for the instance +func (instance *Win32_ComputerSystem) GetPropertySupportContactDescription() (value []string, err error) { + retValue, err := instance.GetProperty("SupportContactDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSystemFamily sets the value of SystemFamily for the instance +func (instance *Win32_ComputerSystem) SetPropertySystemFamily(value string) (err error) { + return instance.SetProperty("SystemFamily", (value)) +} + +// GetSystemFamily gets the value of SystemFamily for the instance +func (instance *Win32_ComputerSystem) GetPropertySystemFamily() (value string, err error) { + retValue, err := instance.GetProperty("SystemFamily") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemSKUNumber sets the value of SystemSKUNumber for the instance +func (instance *Win32_ComputerSystem) SetPropertySystemSKUNumber(value string) (err error) { + return instance.SetProperty("SystemSKUNumber", (value)) +} + +// GetSystemSKUNumber gets the value of SystemSKUNumber for the instance +func (instance *Win32_ComputerSystem) GetPropertySystemSKUNumber() (value string, err error) { + retValue, err := instance.GetProperty("SystemSKUNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemStartupDelay sets the value of SystemStartupDelay for the instance +func (instance *Win32_ComputerSystem) SetPropertySystemStartupDelay(value uint16) (err error) { + return instance.SetProperty("SystemStartupDelay", (value)) +} + +// GetSystemStartupDelay gets the value of SystemStartupDelay for the instance +func (instance *Win32_ComputerSystem) GetPropertySystemStartupDelay() (value uint16, err error) { + retValue, err := instance.GetProperty("SystemStartupDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSystemStartupOptions sets the value of SystemStartupOptions for the instance +func (instance *Win32_ComputerSystem) SetPropertySystemStartupOptions(value []string) (err error) { + return instance.SetProperty("SystemStartupOptions", (value)) +} + +// GetSystemStartupOptions gets the value of SystemStartupOptions for the instance +func (instance *Win32_ComputerSystem) GetPropertySystemStartupOptions() (value []string, err error) { + retValue, err := instance.GetProperty("SystemStartupOptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSystemStartupSetting sets the value of SystemStartupSetting for the instance +func (instance *Win32_ComputerSystem) SetPropertySystemStartupSetting(value uint8) (err error) { + return instance.SetProperty("SystemStartupSetting", (value)) +} + +// GetSystemStartupSetting gets the value of SystemStartupSetting for the instance +func (instance *Win32_ComputerSystem) GetPropertySystemStartupSetting() (value uint8, err error) { + retValue, err := instance.GetProperty("SystemStartupSetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetSystemType sets the value of SystemType for the instance +func (instance *Win32_ComputerSystem) SetPropertySystemType(value string) (err error) { + return instance.SetProperty("SystemType", (value)) +} + +// GetSystemType gets the value of SystemType for the instance +func (instance *Win32_ComputerSystem) GetPropertySystemType() (value string, err error) { + retValue, err := instance.GetProperty("SystemType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetThermalState sets the value of ThermalState for the instance +func (instance *Win32_ComputerSystem) SetPropertyThermalState(value uint16) (err error) { + return instance.SetProperty("ThermalState", (value)) +} + +// GetThermalState gets the value of ThermalState for the instance +func (instance *Win32_ComputerSystem) GetPropertyThermalState() (value uint16, err error) { + retValue, err := instance.GetProperty("ThermalState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTotalPhysicalMemory sets the value of TotalPhysicalMemory for the instance +func (instance *Win32_ComputerSystem) SetPropertyTotalPhysicalMemory(value uint64) (err error) { + return instance.SetProperty("TotalPhysicalMemory", (value)) +} + +// GetTotalPhysicalMemory gets the value of TotalPhysicalMemory for the instance +func (instance *Win32_ComputerSystem) GetPropertyTotalPhysicalMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPhysicalMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUserName sets the value of UserName for the instance +func (instance *Win32_ComputerSystem) SetPropertyUserName(value string) (err error) { + return instance.SetProperty("UserName", (value)) +} + +// GetUserName gets the value of UserName for the instance +func (instance *Win32_ComputerSystem) GetPropertyUserName() (value string, err error) { + retValue, err := instance.GetProperty("UserName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWakeUpType sets the value of WakeUpType for the instance +func (instance *Win32_ComputerSystem) SetPropertyWakeUpType(value uint16) (err error) { + return instance.SetProperty("WakeUpType", (value)) +} + +// GetWakeUpType gets the value of WakeUpType for the instance +func (instance *Win32_ComputerSystem) GetPropertyWakeUpType() (value uint16, err error) { + retValue, err := instance.GetProperty("WakeUpType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWorkgroup sets the value of Workgroup for the instance +func (instance *Win32_ComputerSystem) SetPropertyWorkgroup(value string) (err error) { + return instance.SetProperty("Workgroup", (value)) +} + +// GetWorkgroup gets the value of Workgroup for the instance +func (instance *Win32_ComputerSystem) GetPropertyWorkgroup() (value string, err error) { + retValue, err := instance.GetProperty("Workgroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +// + +// +func (instance *Win32_ComputerSystem) Rename( /* IN */ Name string, + /* IN */ Password string, + /* IN */ UserName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Rename", Name, Password, UserName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// + +// +func (instance *Win32_ComputerSystem) JoinDomainOrWorkgroup( /* IN */ Name string, + /* IN */ Password string, + /* IN */ UserName string, + /* IN */ AccountOU string, + /* IN */ FJoinOptions uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("JoinDomainOrWorkgroup", Name, Password, UserName, AccountOU, FJoinOptions) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_ComputerSystem) UnjoinDomainOrWorkgroup( /* IN */ Password string, + /* IN */ UserName string, + /* IN */ FUnjoinOptions uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("UnjoinDomainOrWorkgroup", Password, UserName, FUnjoinOptions) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemEvent.go new file mode 100644 index 00000000..184b44e8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComputerSystemEvent struct +type Win32_ComputerSystemEvent struct { + *__ExtrinsicEvent + + // + MachineName string +} + +func NewWin32_ComputerSystemEventEx1(instance *cim.WmiInstance) (newInstance *Win32_ComputerSystemEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystemEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewWin32_ComputerSystemEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComputerSystemEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystemEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +// SetMachineName sets the value of MachineName for the instance +func (instance *Win32_ComputerSystemEvent) SetPropertyMachineName(value string) (err error) { + return instance.SetProperty("MachineName", (value)) +} + +// GetMachineName gets the value of MachineName for the instance +func (instance *Win32_ComputerSystemEvent) GetPropertyMachineName() (value string, err error) { + retValue, err := instance.GetProperty("MachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProcessor.go new file mode 100644 index 00000000..60769f9e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProcessor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ComputerSystemProcessor struct +type Win32_ComputerSystemProcessor struct { + *Win32_SystemDevices +} + +func NewWin32_ComputerSystemProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_ComputerSystemProcessor, err error) { + tmp, err := NewWin32_SystemDevicesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystemProcessor{ + Win32_SystemDevices: tmp, + } + return +} + +func NewWin32_ComputerSystemProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComputerSystemProcessor, err error) { + tmp, err := NewWin32_SystemDevicesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystemProcessor{ + Win32_SystemDevices: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProduct.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProduct.go new file mode 100644 index 00000000..82d8760e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ComputerSystemProduct.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ComputerSystemProduct struct +type Win32_ComputerSystemProduct struct { + *CIM_Product + + // + UUID string +} + +func NewWin32_ComputerSystemProductEx1(instance *cim.WmiInstance) (newInstance *Win32_ComputerSystemProduct, err error) { + tmp, err := NewCIM_ProductEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystemProduct{ + CIM_Product: tmp, + } + return +} + +func NewWin32_ComputerSystemProductEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ComputerSystemProduct, err error) { + tmp, err := NewCIM_ProductEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ComputerSystemProduct{ + CIM_Product: tmp, + } + return +} + +// SetUUID sets the value of UUID for the instance +func (instance *Win32_ComputerSystemProduct) SetPropertyUUID(value string) (err error) { + return instance.SetProperty("UUID", (value)) +} + +// GetUUID gets the value of UUID for the instance +func (instance *Win32_ComputerSystemProduct) GetPropertyUUID() (value string, err error) { + retValue, err := instance.GetProperty("UUID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Condition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Condition.go new file mode 100644 index 00000000..3cb2b9d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Condition.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Condition struct +type Win32_Condition struct { + *CIM_Check + + // + Condition string + + // + Feature string + + // + Level uint16 +} + +func NewWin32_ConditionEx1(instance *cim.WmiInstance) (newInstance *Win32_Condition, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Condition{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ConditionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Condition, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Condition{ + CIM_Check: tmp, + } + return +} + +// SetCondition sets the value of Condition for the instance +func (instance *Win32_Condition) SetPropertyCondition(value string) (err error) { + return instance.SetProperty("Condition", (value)) +} + +// GetCondition gets the value of Condition for the instance +func (instance *Win32_Condition) GetPropertyCondition() (value string, err error) { + retValue, err := instance.GetProperty("Condition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFeature sets the value of Feature for the instance +func (instance *Win32_Condition) SetPropertyFeature(value string) (err error) { + return instance.SetProperty("Feature", (value)) +} + +// GetFeature gets the value of Feature for the instance +func (instance *Win32_Condition) GetPropertyFeature() (value string, err error) { + retValue, err := instance.GetProperty("Feature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLevel sets the value of Level for the instance +func (instance *Win32_Condition) SetPropertyLevel(value uint16) (err error) { + return instance.SetProperty("Level", (value)) +} + +// GetLevel gets the value of Level for the instance +func (instance *Win32_Condition) GetPropertyLevel() (value uint16, err error) { + retValue, err := instance.GetProperty("Level") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ConnectionShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ConnectionShare.go new file mode 100644 index 00000000..035fe07c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ConnectionShare.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ConnectionShare struct +type Win32_ConnectionShare struct { + *CIM_Dependency +} + +func NewWin32_ConnectionShareEx1(instance *cim.WmiInstance) (newInstance *Win32_ConnectionShare, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ConnectionShare{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_ConnectionShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ConnectionShare, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ConnectionShare{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ControllerHasHub.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ControllerHasHub.go new file mode 100644 index 00000000..3e91ebce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ControllerHasHub.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ControllerHasHub struct +type Win32_ControllerHasHub struct { + *CIM_USBControllerHasHub +} + +func NewWin32_ControllerHasHubEx1(instance *cim.WmiInstance) (newInstance *Win32_ControllerHasHub, err error) { + tmp, err := NewCIM_USBControllerHasHubEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ControllerHasHub{ + CIM_USBControllerHasHub: tmp, + } + return +} + +func NewWin32_ControllerHasHubEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ControllerHasHub, err error) { + tmp, err := NewCIM_USBControllerHasHubEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ControllerHasHub{ + CIM_USBControllerHasHub: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CreateFolderAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CreateFolderAction.go new file mode 100644 index 00000000..c1323cd1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CreateFolderAction.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_CreateFolderAction struct +type Win32_CreateFolderAction struct { + *CIM_CreateDirectoryAction +} + +func NewWin32_CreateFolderActionEx1(instance *cim.WmiInstance) (newInstance *Win32_CreateFolderAction, err error) { + tmp, err := NewCIM_CreateDirectoryActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CreateFolderAction{ + CIM_CreateDirectoryAction: tmp, + } + return +} + +func NewWin32_CreateFolderActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CreateFolderAction, err error) { + tmp, err := NewCIM_CreateDirectoryActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CreateFolderAction{ + CIM_CreateDirectoryAction: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentProbe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentProbe.go new file mode 100644 index 00000000..f23c77d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentProbe.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_CurrentProbe struct +type Win32_CurrentProbe struct { + *CIM_CurrentSensor +} + +func NewWin32_CurrentProbeEx1(instance *cim.WmiInstance) (newInstance *Win32_CurrentProbe, err error) { + tmp, err := NewCIM_CurrentSensorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_CurrentProbe{ + CIM_CurrentSensor: tmp, + } + return +} + +func NewWin32_CurrentProbeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CurrentProbe, err error) { + tmp, err := NewCIM_CurrentSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CurrentProbe{ + CIM_CurrentSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentTime.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentTime.go new file mode 100644 index 00000000..fd136b76 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_CurrentTime.go @@ -0,0 +1,351 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_CurrentTime struct +type Win32_CurrentTime struct { + *cim.WmiInstance + + // + Day uint32 + + // + DayOfWeek uint32 + + // + Hour uint32 + + // + Milliseconds uint32 + + // + Minute uint32 + + // + Month uint32 + + // + Quarter uint32 + + // + Second uint32 + + // + WeekInMonth uint32 + + // + Year uint32 +} + +func NewWin32_CurrentTimeEx1(instance *cim.WmiInstance) (newInstance *Win32_CurrentTime, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_CurrentTime{ + WmiInstance: tmp, + } + return +} + +func NewWin32_CurrentTimeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_CurrentTime, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_CurrentTime{ + WmiInstance: tmp, + } + return +} + +// SetDay sets the value of Day for the instance +func (instance *Win32_CurrentTime) SetPropertyDay(value uint32) (err error) { + return instance.SetProperty("Day", (value)) +} + +// GetDay gets the value of Day for the instance +func (instance *Win32_CurrentTime) GetPropertyDay() (value uint32, err error) { + retValue, err := instance.GetProperty("Day") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDayOfWeek sets the value of DayOfWeek for the instance +func (instance *Win32_CurrentTime) SetPropertyDayOfWeek(value uint32) (err error) { + return instance.SetProperty("DayOfWeek", (value)) +} + +// GetDayOfWeek gets the value of DayOfWeek for the instance +func (instance *Win32_CurrentTime) GetPropertyDayOfWeek() (value uint32, err error) { + retValue, err := instance.GetProperty("DayOfWeek") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHour sets the value of Hour for the instance +func (instance *Win32_CurrentTime) SetPropertyHour(value uint32) (err error) { + return instance.SetProperty("Hour", (value)) +} + +// GetHour gets the value of Hour for the instance +func (instance *Win32_CurrentTime) GetPropertyHour() (value uint32, err error) { + retValue, err := instance.GetProperty("Hour") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMilliseconds sets the value of Milliseconds for the instance +func (instance *Win32_CurrentTime) SetPropertyMilliseconds(value uint32) (err error) { + return instance.SetProperty("Milliseconds", (value)) +} + +// GetMilliseconds gets the value of Milliseconds for the instance +func (instance *Win32_CurrentTime) GetPropertyMilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Milliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinute sets the value of Minute for the instance +func (instance *Win32_CurrentTime) SetPropertyMinute(value uint32) (err error) { + return instance.SetProperty("Minute", (value)) +} + +// GetMinute gets the value of Minute for the instance +func (instance *Win32_CurrentTime) GetPropertyMinute() (value uint32, err error) { + retValue, err := instance.GetProperty("Minute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMonth sets the value of Month for the instance +func (instance *Win32_CurrentTime) SetPropertyMonth(value uint32) (err error) { + return instance.SetProperty("Month", (value)) +} + +// GetMonth gets the value of Month for the instance +func (instance *Win32_CurrentTime) GetPropertyMonth() (value uint32, err error) { + retValue, err := instance.GetProperty("Month") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuarter sets the value of Quarter for the instance +func (instance *Win32_CurrentTime) SetPropertyQuarter(value uint32) (err error) { + return instance.SetProperty("Quarter", (value)) +} + +// GetQuarter gets the value of Quarter for the instance +func (instance *Win32_CurrentTime) GetPropertyQuarter() (value uint32, err error) { + retValue, err := instance.GetProperty("Quarter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecond sets the value of Second for the instance +func (instance *Win32_CurrentTime) SetPropertySecond(value uint32) (err error) { + return instance.SetProperty("Second", (value)) +} + +// GetSecond gets the value of Second for the instance +func (instance *Win32_CurrentTime) GetPropertySecond() (value uint32, err error) { + retValue, err := instance.GetProperty("Second") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWeekInMonth sets the value of WeekInMonth for the instance +func (instance *Win32_CurrentTime) SetPropertyWeekInMonth(value uint32) (err error) { + return instance.SetProperty("WeekInMonth", (value)) +} + +// GetWeekInMonth gets the value of WeekInMonth for the instance +func (instance *Win32_CurrentTime) GetPropertyWeekInMonth() (value uint32, err error) { + retValue, err := instance.GetProperty("WeekInMonth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetYear sets the value of Year for the instance +func (instance *Win32_CurrentTime) SetPropertyYear(value uint32) (err error) { + return instance.SetProperty("Year", (value)) +} + +// GetYear gets the value of Year for the instance +func (instance *Win32_CurrentTime) GetPropertyYear() (value uint32, err error) { + retValue, err := instance.GetProperty("Year") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplication.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplication.go new file mode 100644 index 00000000..5b761743 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplication.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DCOMApplication struct +type Win32_DCOMApplication struct { + *Win32_COMApplication + + // + AppID string +} + +func NewWin32_DCOMApplicationEx1(instance *cim.WmiInstance) (newInstance *Win32_DCOMApplication, err error) { + tmp, err := NewWin32_COMApplicationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DCOMApplication{ + Win32_COMApplication: tmp, + } + return +} + +func NewWin32_DCOMApplicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DCOMApplication, err error) { + tmp, err := NewWin32_COMApplicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DCOMApplication{ + Win32_COMApplication: tmp, + } + return +} + +// SetAppID sets the value of AppID for the instance +func (instance *Win32_DCOMApplication) SetPropertyAppID(value string) (err error) { + return instance.SetProperty("AppID", (value)) +} + +// GetAppID gets the value of AppID for the instance +func (instance *Win32_DCOMApplication) GetPropertyAppID() (value string, err error) { + retValue, err := instance.GetProperty("AppID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationAccessAllowedSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationAccessAllowedSetting.go new file mode 100644 index 00000000..de79aa5f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationAccessAllowedSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DCOMApplicationAccessAllowedSetting struct +type Win32_DCOMApplicationAccessAllowedSetting struct { + *cim.WmiInstance + + // + Element Win32_DCOMApplication + + // + Setting Win32_SID +} + +func NewWin32_DCOMApplicationAccessAllowedSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_DCOMApplicationAccessAllowedSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_DCOMApplicationAccessAllowedSetting{ + WmiInstance: tmp, + } + return +} + +func NewWin32_DCOMApplicationAccessAllowedSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DCOMApplicationAccessAllowedSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DCOMApplicationAccessAllowedSetting{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_DCOMApplicationAccessAllowedSetting) SetPropertyElement(value Win32_DCOMApplication) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_DCOMApplicationAccessAllowedSetting) GetPropertyElement() (value Win32_DCOMApplication, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_DCOMApplication) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_DCOMApplication is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_DCOMApplication(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *Win32_DCOMApplicationAccessAllowedSetting) SetPropertySetting(value Win32_SID) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *Win32_DCOMApplicationAccessAllowedSetting) GetPropertySetting() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationLaunchAllowedSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationLaunchAllowedSetting.go new file mode 100644 index 00000000..eafee8a3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationLaunchAllowedSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DCOMApplicationLaunchAllowedSetting struct +type Win32_DCOMApplicationLaunchAllowedSetting struct { + *cim.WmiInstance + + // + Element Win32_DCOMApplication + + // + Setting Win32_SID +} + +func NewWin32_DCOMApplicationLaunchAllowedSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_DCOMApplicationLaunchAllowedSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_DCOMApplicationLaunchAllowedSetting{ + WmiInstance: tmp, + } + return +} + +func NewWin32_DCOMApplicationLaunchAllowedSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DCOMApplicationLaunchAllowedSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DCOMApplicationLaunchAllowedSetting{ + WmiInstance: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_DCOMApplicationLaunchAllowedSetting) SetPropertyElement(value Win32_DCOMApplication) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_DCOMApplicationLaunchAllowedSetting) GetPropertyElement() (value Win32_DCOMApplication, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_DCOMApplication) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_DCOMApplication is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_DCOMApplication(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *Win32_DCOMApplicationLaunchAllowedSetting) SetPropertySetting(value Win32_SID) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *Win32_DCOMApplicationLaunchAllowedSetting) GetPropertySetting() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationSetting.go new file mode 100644 index 00000000..0db7becb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DCOMApplicationSetting.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DCOMApplicationSetting struct +type Win32_DCOMApplicationSetting struct { + *Win32_COMSetting + + // + AppID string + + // + AuthenticationLevel uint32 + + // + CustomSurrogate string + + // + EnableAtStorageActivation bool + + // + LocalService string + + // + RemoteServerName string + + // + RunAsUser string + + // + ServiceParameters string + + // + UseSurrogate bool +} + +func NewWin32_DCOMApplicationSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_DCOMApplicationSetting, err error) { + tmp, err := NewWin32_COMSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DCOMApplicationSetting{ + Win32_COMSetting: tmp, + } + return +} + +func NewWin32_DCOMApplicationSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DCOMApplicationSetting, err error) { + tmp, err := NewWin32_COMSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DCOMApplicationSetting{ + Win32_COMSetting: tmp, + } + return +} + +// SetAppID sets the value of AppID for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyAppID(value string) (err error) { + return instance.SetProperty("AppID", (value)) +} + +// GetAppID gets the value of AppID for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyAppID() (value string, err error) { + retValue, err := instance.GetProperty("AppID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAuthenticationLevel sets the value of AuthenticationLevel for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyAuthenticationLevel(value uint32) (err error) { + return instance.SetProperty("AuthenticationLevel", (value)) +} + +// GetAuthenticationLevel gets the value of AuthenticationLevel for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyAuthenticationLevel() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthenticationLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCustomSurrogate sets the value of CustomSurrogate for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyCustomSurrogate(value string) (err error) { + return instance.SetProperty("CustomSurrogate", (value)) +} + +// GetCustomSurrogate gets the value of CustomSurrogate for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyCustomSurrogate() (value string, err error) { + retValue, err := instance.GetProperty("CustomSurrogate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEnableAtStorageActivation sets the value of EnableAtStorageActivation for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyEnableAtStorageActivation(value bool) (err error) { + return instance.SetProperty("EnableAtStorageActivation", (value)) +} + +// GetEnableAtStorageActivation gets the value of EnableAtStorageActivation for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyEnableAtStorageActivation() (value bool, err error) { + retValue, err := instance.GetProperty("EnableAtStorageActivation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalService sets the value of LocalService for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyLocalService(value string) (err error) { + return instance.SetProperty("LocalService", (value)) +} + +// GetLocalService gets the value of LocalService for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyLocalService() (value string, err error) { + retValue, err := instance.GetProperty("LocalService") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteServerName sets the value of RemoteServerName for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyRemoteServerName(value string) (err error) { + return instance.SetProperty("RemoteServerName", (value)) +} + +// GetRemoteServerName gets the value of RemoteServerName for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyRemoteServerName() (value string, err error) { + retValue, err := instance.GetProperty("RemoteServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRunAsUser sets the value of RunAsUser for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyRunAsUser(value string) (err error) { + return instance.SetProperty("RunAsUser", (value)) +} + +// GetRunAsUser gets the value of RunAsUser for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyRunAsUser() (value string, err error) { + retValue, err := instance.GetProperty("RunAsUser") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServiceParameters sets the value of ServiceParameters for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyServiceParameters(value string) (err error) { + return instance.SetProperty("ServiceParameters", (value)) +} + +// GetServiceParameters gets the value of ServiceParameters for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyServiceParameters() (value string, err error) { + retValue, err := instance.GetProperty("ServiceParameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUseSurrogate sets the value of UseSurrogate for the instance +func (instance *Win32_DCOMApplicationSetting) SetPropertyUseSurrogate(value bool) (err error) { + return instance.SetProperty("UseSurrogate", (value)) +} + +// GetUseSurrogate gets the value of UseSurrogate for the instance +func (instance *Win32_DCOMApplicationSetting) GetPropertyUseSurrogate() (value bool, err error) { + retValue, err := instance.GetProperty("UseSurrogate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +// +func (instance *Win32_DCOMApplicationSetting) GetLaunchSecurityDescriptor( /* OUT */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetLaunchSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_DCOMApplicationSetting) SetLaunchSecurityDescriptor( /* IN */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetLaunchSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *Win32_DCOMApplicationSetting) GetAccessSecurityDescriptor( /* OUT */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetAccessSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_DCOMApplicationSetting) SetAccessSecurityDescriptor( /* IN */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetAccessSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *Win32_DCOMApplicationSetting) GetConfigurationSecurityDescriptor( /* OUT */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetConfigurationSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_DCOMApplicationSetting) SetConfigurationSecurityDescriptor( /* IN */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetConfigurationSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DMAChannel.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DMAChannel.go new file mode 100644 index 00000000..96674ec6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DMAChannel.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DMAChannel struct +type Win32_DMAChannel struct { + *CIM_DMA + + // + Port uint32 +} + +func NewWin32_DMAChannelEx1(instance *cim.WmiInstance) (newInstance *Win32_DMAChannel, err error) { + tmp, err := NewCIM_DMAEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DMAChannel{ + CIM_DMA: tmp, + } + return +} + +func NewWin32_DMAChannelEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DMAChannel, err error) { + tmp, err := NewCIM_DMAEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DMAChannel{ + CIM_DMA: tmp, + } + return +} + +// SetPort sets the value of Port for the instance +func (instance *Win32_DMAChannel) SetPropertyPort(value uint32) (err error) { + return instance.SetProperty("Port", (value)) +} + +// GetPort gets the value of Port for the instance +func (instance *Win32_DMAChannel) GetPropertyPort() (value uint32, err error) { + retValue, err := instance.GetProperty("Port") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DefragAnalysis.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DefragAnalysis.go new file mode 100644 index 00000000..7ee3638e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DefragAnalysis.go @@ -0,0 +1,861 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DefragAnalysis struct +type Win32_DefragAnalysis struct { + *cim.WmiInstance + + // + AverageFileSize uint64 + + // + AverageFragmentsPerFile float64 + + // + AverageFreeSpacePerExtent uint64 + + // + ClusterSize uint64 + + // + ExcessFolderFragments uint64 + + // + FilePercentFragmentation uint32 + + // + FragmentedFolders uint64 + + // + FreeSpace uint64 + + // + FreeSpacePercent uint32 + + // + FreeSpacePercentFragmentation uint32 + + // + LargestFreeSpaceExtent uint64 + + // + MFTPercentInUse uint32 + + // + MFTRecordCount uint64 + + // + PageFileSize uint64 + + // + TotalExcessFragments uint64 + + // + TotalFiles uint64 + + // + TotalFolders uint64 + + // + TotalFragmentedFiles uint64 + + // + TotalFreeSpaceExtents uint64 + + // + TotalMFTFragments uint64 + + // + TotalMFTSize uint64 + + // + TotalPageFileFragments uint64 + + // + TotalPercentFragmentation uint32 + + // + TotalUnmovableFiles uint64 + + // + UsedSpace uint64 + + // + VolumeName string + + // + VolumeSize uint64 +} + +func NewWin32_DefragAnalysisEx1(instance *cim.WmiInstance) (newInstance *Win32_DefragAnalysis, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_DefragAnalysis{ + WmiInstance: tmp, + } + return +} + +func NewWin32_DefragAnalysisEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DefragAnalysis, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DefragAnalysis{ + WmiInstance: tmp, + } + return +} + +// SetAverageFileSize sets the value of AverageFileSize for the instance +func (instance *Win32_DefragAnalysis) SetPropertyAverageFileSize(value uint64) (err error) { + return instance.SetProperty("AverageFileSize", (value)) +} + +// GetAverageFileSize gets the value of AverageFileSize for the instance +func (instance *Win32_DefragAnalysis) GetPropertyAverageFileSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageFileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageFragmentsPerFile sets the value of AverageFragmentsPerFile for the instance +func (instance *Win32_DefragAnalysis) SetPropertyAverageFragmentsPerFile(value float64) (err error) { + return instance.SetProperty("AverageFragmentsPerFile", (value)) +} + +// GetAverageFragmentsPerFile gets the value of AverageFragmentsPerFile for the instance +func (instance *Win32_DefragAnalysis) GetPropertyAverageFragmentsPerFile() (value float64, err error) { + retValue, err := instance.GetProperty("AverageFragmentsPerFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} + +// SetAverageFreeSpacePerExtent sets the value of AverageFreeSpacePerExtent for the instance +func (instance *Win32_DefragAnalysis) SetPropertyAverageFreeSpacePerExtent(value uint64) (err error) { + return instance.SetProperty("AverageFreeSpacePerExtent", (value)) +} + +// GetAverageFreeSpacePerExtent gets the value of AverageFreeSpacePerExtent for the instance +func (instance *Win32_DefragAnalysis) GetPropertyAverageFreeSpacePerExtent() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageFreeSpacePerExtent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClusterSize sets the value of ClusterSize for the instance +func (instance *Win32_DefragAnalysis) SetPropertyClusterSize(value uint64) (err error) { + return instance.SetProperty("ClusterSize", (value)) +} + +// GetClusterSize gets the value of ClusterSize for the instance +func (instance *Win32_DefragAnalysis) GetPropertyClusterSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExcessFolderFragments sets the value of ExcessFolderFragments for the instance +func (instance *Win32_DefragAnalysis) SetPropertyExcessFolderFragments(value uint64) (err error) { + return instance.SetProperty("ExcessFolderFragments", (value)) +} + +// GetExcessFolderFragments gets the value of ExcessFolderFragments for the instance +func (instance *Win32_DefragAnalysis) GetPropertyExcessFolderFragments() (value uint64, err error) { + retValue, err := instance.GetProperty("ExcessFolderFragments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilePercentFragmentation sets the value of FilePercentFragmentation for the instance +func (instance *Win32_DefragAnalysis) SetPropertyFilePercentFragmentation(value uint32) (err error) { + return instance.SetProperty("FilePercentFragmentation", (value)) +} + +// GetFilePercentFragmentation gets the value of FilePercentFragmentation for the instance +func (instance *Win32_DefragAnalysis) GetPropertyFilePercentFragmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("FilePercentFragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentedFolders sets the value of FragmentedFolders for the instance +func (instance *Win32_DefragAnalysis) SetPropertyFragmentedFolders(value uint64) (err error) { + return instance.SetProperty("FragmentedFolders", (value)) +} + +// GetFragmentedFolders gets the value of FragmentedFolders for the instance +func (instance *Win32_DefragAnalysis) GetPropertyFragmentedFolders() (value uint64, err error) { + retValue, err := instance.GetProperty("FragmentedFolders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFreeSpace sets the value of FreeSpace for the instance +func (instance *Win32_DefragAnalysis) SetPropertyFreeSpace(value uint64) (err error) { + return instance.SetProperty("FreeSpace", (value)) +} + +// GetFreeSpace gets the value of FreeSpace for the instance +func (instance *Win32_DefragAnalysis) GetPropertyFreeSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFreeSpacePercent sets the value of FreeSpacePercent for the instance +func (instance *Win32_DefragAnalysis) SetPropertyFreeSpacePercent(value uint32) (err error) { + return instance.SetProperty("FreeSpacePercent", (value)) +} + +// GetFreeSpacePercent gets the value of FreeSpacePercent for the instance +func (instance *Win32_DefragAnalysis) GetPropertyFreeSpacePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeSpacePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeSpacePercentFragmentation sets the value of FreeSpacePercentFragmentation for the instance +func (instance *Win32_DefragAnalysis) SetPropertyFreeSpacePercentFragmentation(value uint32) (err error) { + return instance.SetProperty("FreeSpacePercentFragmentation", (value)) +} + +// GetFreeSpacePercentFragmentation gets the value of FreeSpacePercentFragmentation for the instance +func (instance *Win32_DefragAnalysis) GetPropertyFreeSpacePercentFragmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeSpacePercentFragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLargestFreeSpaceExtent sets the value of LargestFreeSpaceExtent for the instance +func (instance *Win32_DefragAnalysis) SetPropertyLargestFreeSpaceExtent(value uint64) (err error) { + return instance.SetProperty("LargestFreeSpaceExtent", (value)) +} + +// GetLargestFreeSpaceExtent gets the value of LargestFreeSpaceExtent for the instance +func (instance *Win32_DefragAnalysis) GetPropertyLargestFreeSpaceExtent() (value uint64, err error) { + retValue, err := instance.GetProperty("LargestFreeSpaceExtent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMFTPercentInUse sets the value of MFTPercentInUse for the instance +func (instance *Win32_DefragAnalysis) SetPropertyMFTPercentInUse(value uint32) (err error) { + return instance.SetProperty("MFTPercentInUse", (value)) +} + +// GetMFTPercentInUse gets the value of MFTPercentInUse for the instance +func (instance *Win32_DefragAnalysis) GetPropertyMFTPercentInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("MFTPercentInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMFTRecordCount sets the value of MFTRecordCount for the instance +func (instance *Win32_DefragAnalysis) SetPropertyMFTRecordCount(value uint64) (err error) { + return instance.SetProperty("MFTRecordCount", (value)) +} + +// GetMFTRecordCount gets the value of MFTRecordCount for the instance +func (instance *Win32_DefragAnalysis) GetPropertyMFTRecordCount() (value uint64, err error) { + retValue, err := instance.GetProperty("MFTRecordCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileSize sets the value of PageFileSize for the instance +func (instance *Win32_DefragAnalysis) SetPropertyPageFileSize(value uint64) (err error) { + return instance.SetProperty("PageFileSize", (value)) +} + +// GetPageFileSize gets the value of PageFileSize for the instance +func (instance *Win32_DefragAnalysis) GetPropertyPageFileSize() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalExcessFragments sets the value of TotalExcessFragments for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalExcessFragments(value uint64) (err error) { + return instance.SetProperty("TotalExcessFragments", (value)) +} + +// GetTotalExcessFragments gets the value of TotalExcessFragments for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalExcessFragments() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalExcessFragments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFiles sets the value of TotalFiles for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalFiles(value uint64) (err error) { + return instance.SetProperty("TotalFiles", (value)) +} + +// GetTotalFiles gets the value of TotalFiles for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalFiles() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFolders sets the value of TotalFolders for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalFolders(value uint64) (err error) { + return instance.SetProperty("TotalFolders", (value)) +} + +// GetTotalFolders gets the value of TotalFolders for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalFolders() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFolders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFragmentedFiles sets the value of TotalFragmentedFiles for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalFragmentedFiles(value uint64) (err error) { + return instance.SetProperty("TotalFragmentedFiles", (value)) +} + +// GetTotalFragmentedFiles gets the value of TotalFragmentedFiles for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalFragmentedFiles() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFragmentedFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFreeSpaceExtents sets the value of TotalFreeSpaceExtents for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalFreeSpaceExtents(value uint64) (err error) { + return instance.SetProperty("TotalFreeSpaceExtents", (value)) +} + +// GetTotalFreeSpaceExtents gets the value of TotalFreeSpaceExtents for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalFreeSpaceExtents() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFreeSpaceExtents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalMFTFragments sets the value of TotalMFTFragments for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalMFTFragments(value uint64) (err error) { + return instance.SetProperty("TotalMFTFragments", (value)) +} + +// GetTotalMFTFragments gets the value of TotalMFTFragments for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalMFTFragments() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalMFTFragments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalMFTSize sets the value of TotalMFTSize for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalMFTSize(value uint64) (err error) { + return instance.SetProperty("TotalMFTSize", (value)) +} + +// GetTotalMFTSize gets the value of TotalMFTSize for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalMFTSize() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalMFTSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPageFileFragments sets the value of TotalPageFileFragments for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalPageFileFragments(value uint64) (err error) { + return instance.SetProperty("TotalPageFileFragments", (value)) +} + +// GetTotalPageFileFragments gets the value of TotalPageFileFragments for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalPageFileFragments() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPageFileFragments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPercentFragmentation sets the value of TotalPercentFragmentation for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalPercentFragmentation(value uint32) (err error) { + return instance.SetProperty("TotalPercentFragmentation", (value)) +} + +// GetTotalPercentFragmentation gets the value of TotalPercentFragmentation for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalPercentFragmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalPercentFragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalUnmovableFiles sets the value of TotalUnmovableFiles for the instance +func (instance *Win32_DefragAnalysis) SetPropertyTotalUnmovableFiles(value uint64) (err error) { + return instance.SetProperty("TotalUnmovableFiles", (value)) +} + +// GetTotalUnmovableFiles gets the value of TotalUnmovableFiles for the instance +func (instance *Win32_DefragAnalysis) GetPropertyTotalUnmovableFiles() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalUnmovableFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUsedSpace sets the value of UsedSpace for the instance +func (instance *Win32_DefragAnalysis) SetPropertyUsedSpace(value uint64) (err error) { + return instance.SetProperty("UsedSpace", (value)) +} + +// GetUsedSpace gets the value of UsedSpace for the instance +func (instance *Win32_DefragAnalysis) GetPropertyUsedSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("UsedSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeName sets the value of VolumeName for the instance +func (instance *Win32_DefragAnalysis) SetPropertyVolumeName(value string) (err error) { + return instance.SetProperty("VolumeName", (value)) +} + +// GetVolumeName gets the value of VolumeName for the instance +func (instance *Win32_DefragAnalysis) GetPropertyVolumeName() (value string, err error) { + retValue, err := instance.GetProperty("VolumeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVolumeSize sets the value of VolumeSize for the instance +func (instance *Win32_DefragAnalysis) SetPropertyVolumeSize(value uint64) (err error) { + return instance.SetProperty("VolumeSize", (value)) +} + +// GetVolumeSize gets the value of VolumeSize for the instance +func (instance *Win32_DefragAnalysis) GetPropertyVolumeSize() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumeSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DependentService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DependentService.go new file mode 100644 index 00000000..e2116fbc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DependentService.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DependentService struct +type Win32_DependentService struct { + *CIM_ServiceServiceDependency +} + +func NewWin32_DependentServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_DependentService, err error) { + tmp, err := NewCIM_ServiceServiceDependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DependentService{ + CIM_ServiceServiceDependency: tmp, + } + return +} + +func NewWin32_DependentServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DependentService, err error) { + tmp, err := NewCIM_ServiceServiceDependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DependentService{ + CIM_ServiceServiceDependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Desktop.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Desktop.go new file mode 100644 index 00000000..3a29e985 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Desktop.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Desktop struct +type Win32_Desktop struct { + *CIM_Setting + + // + BorderWidth uint32 + + // + CoolSwitch bool + + // + CursorBlinkRate uint32 + + // + DragFullWindows bool + + // + GridGranularity uint32 + + // + IconSpacing uint32 + + // + IconTitleFaceName string + + // + IconTitleSize uint32 + + // + IconTitleWrap bool + + // + Name string + + // + Pattern string + + // + ScreenSaverActive bool + + // + ScreenSaverExecutable string + + // + ScreenSaverSecure bool + + // + ScreenSaverTimeout uint32 + + // + Wallpaper string + + // + WallpaperStretched bool + + // + WallpaperTiled bool +} + +func NewWin32_DesktopEx1(instance *cim.WmiInstance) (newInstance *Win32_Desktop, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Desktop{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_DesktopEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Desktop, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Desktop{ + CIM_Setting: tmp, + } + return +} + +// SetBorderWidth sets the value of BorderWidth for the instance +func (instance *Win32_Desktop) SetPropertyBorderWidth(value uint32) (err error) { + return instance.SetProperty("BorderWidth", (value)) +} + +// GetBorderWidth gets the value of BorderWidth for the instance +func (instance *Win32_Desktop) GetPropertyBorderWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("BorderWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCoolSwitch sets the value of CoolSwitch for the instance +func (instance *Win32_Desktop) SetPropertyCoolSwitch(value bool) (err error) { + return instance.SetProperty("CoolSwitch", (value)) +} + +// GetCoolSwitch gets the value of CoolSwitch for the instance +func (instance *Win32_Desktop) GetPropertyCoolSwitch() (value bool, err error) { + retValue, err := instance.GetProperty("CoolSwitch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCursorBlinkRate sets the value of CursorBlinkRate for the instance +func (instance *Win32_Desktop) SetPropertyCursorBlinkRate(value uint32) (err error) { + return instance.SetProperty("CursorBlinkRate", (value)) +} + +// GetCursorBlinkRate gets the value of CursorBlinkRate for the instance +func (instance *Win32_Desktop) GetPropertyCursorBlinkRate() (value uint32, err error) { + retValue, err := instance.GetProperty("CursorBlinkRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDragFullWindows sets the value of DragFullWindows for the instance +func (instance *Win32_Desktop) SetPropertyDragFullWindows(value bool) (err error) { + return instance.SetProperty("DragFullWindows", (value)) +} + +// GetDragFullWindows gets the value of DragFullWindows for the instance +func (instance *Win32_Desktop) GetPropertyDragFullWindows() (value bool, err error) { + retValue, err := instance.GetProperty("DragFullWindows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetGridGranularity sets the value of GridGranularity for the instance +func (instance *Win32_Desktop) SetPropertyGridGranularity(value uint32) (err error) { + return instance.SetProperty("GridGranularity", (value)) +} + +// GetGridGranularity gets the value of GridGranularity for the instance +func (instance *Win32_Desktop) GetPropertyGridGranularity() (value uint32, err error) { + retValue, err := instance.GetProperty("GridGranularity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIconSpacing sets the value of IconSpacing for the instance +func (instance *Win32_Desktop) SetPropertyIconSpacing(value uint32) (err error) { + return instance.SetProperty("IconSpacing", (value)) +} + +// GetIconSpacing gets the value of IconSpacing for the instance +func (instance *Win32_Desktop) GetPropertyIconSpacing() (value uint32, err error) { + retValue, err := instance.GetProperty("IconSpacing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIconTitleFaceName sets the value of IconTitleFaceName for the instance +func (instance *Win32_Desktop) SetPropertyIconTitleFaceName(value string) (err error) { + return instance.SetProperty("IconTitleFaceName", (value)) +} + +// GetIconTitleFaceName gets the value of IconTitleFaceName for the instance +func (instance *Win32_Desktop) GetPropertyIconTitleFaceName() (value string, err error) { + retValue, err := instance.GetProperty("IconTitleFaceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIconTitleSize sets the value of IconTitleSize for the instance +func (instance *Win32_Desktop) SetPropertyIconTitleSize(value uint32) (err error) { + return instance.SetProperty("IconTitleSize", (value)) +} + +// GetIconTitleSize gets the value of IconTitleSize for the instance +func (instance *Win32_Desktop) GetPropertyIconTitleSize() (value uint32, err error) { + retValue, err := instance.GetProperty("IconTitleSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIconTitleWrap sets the value of IconTitleWrap for the instance +func (instance *Win32_Desktop) SetPropertyIconTitleWrap(value bool) (err error) { + return instance.SetProperty("IconTitleWrap", (value)) +} + +// GetIconTitleWrap gets the value of IconTitleWrap for the instance +func (instance *Win32_Desktop) GetPropertyIconTitleWrap() (value bool, err error) { + retValue, err := instance.GetProperty("IconTitleWrap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_Desktop) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_Desktop) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPattern sets the value of Pattern for the instance +func (instance *Win32_Desktop) SetPropertyPattern(value string) (err error) { + return instance.SetProperty("Pattern", (value)) +} + +// GetPattern gets the value of Pattern for the instance +func (instance *Win32_Desktop) GetPropertyPattern() (value string, err error) { + retValue, err := instance.GetProperty("Pattern") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetScreenSaverActive sets the value of ScreenSaverActive for the instance +func (instance *Win32_Desktop) SetPropertyScreenSaverActive(value bool) (err error) { + return instance.SetProperty("ScreenSaverActive", (value)) +} + +// GetScreenSaverActive gets the value of ScreenSaverActive for the instance +func (instance *Win32_Desktop) GetPropertyScreenSaverActive() (value bool, err error) { + retValue, err := instance.GetProperty("ScreenSaverActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetScreenSaverExecutable sets the value of ScreenSaverExecutable for the instance +func (instance *Win32_Desktop) SetPropertyScreenSaverExecutable(value string) (err error) { + return instance.SetProperty("ScreenSaverExecutable", (value)) +} + +// GetScreenSaverExecutable gets the value of ScreenSaverExecutable for the instance +func (instance *Win32_Desktop) GetPropertyScreenSaverExecutable() (value string, err error) { + retValue, err := instance.GetProperty("ScreenSaverExecutable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetScreenSaverSecure sets the value of ScreenSaverSecure for the instance +func (instance *Win32_Desktop) SetPropertyScreenSaverSecure(value bool) (err error) { + return instance.SetProperty("ScreenSaverSecure", (value)) +} + +// GetScreenSaverSecure gets the value of ScreenSaverSecure for the instance +func (instance *Win32_Desktop) GetPropertyScreenSaverSecure() (value bool, err error) { + retValue, err := instance.GetProperty("ScreenSaverSecure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetScreenSaverTimeout sets the value of ScreenSaverTimeout for the instance +func (instance *Win32_Desktop) SetPropertyScreenSaverTimeout(value uint32) (err error) { + return instance.SetProperty("ScreenSaverTimeout", (value)) +} + +// GetScreenSaverTimeout gets the value of ScreenSaverTimeout for the instance +func (instance *Win32_Desktop) GetPropertyScreenSaverTimeout() (value uint32, err error) { + retValue, err := instance.GetProperty("ScreenSaverTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWallpaper sets the value of Wallpaper for the instance +func (instance *Win32_Desktop) SetPropertyWallpaper(value string) (err error) { + return instance.SetProperty("Wallpaper", (value)) +} + +// GetWallpaper gets the value of Wallpaper for the instance +func (instance *Win32_Desktop) GetPropertyWallpaper() (value string, err error) { + retValue, err := instance.GetProperty("Wallpaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWallpaperStretched sets the value of WallpaperStretched for the instance +func (instance *Win32_Desktop) SetPropertyWallpaperStretched(value bool) (err error) { + return instance.SetProperty("WallpaperStretched", (value)) +} + +// GetWallpaperStretched gets the value of WallpaperStretched for the instance +func (instance *Win32_Desktop) GetPropertyWallpaperStretched() (value bool, err error) { + retValue, err := instance.GetProperty("WallpaperStretched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWallpaperTiled sets the value of WallpaperTiled for the instance +func (instance *Win32_Desktop) SetPropertyWallpaperTiled(value bool) (err error) { + return instance.SetProperty("WallpaperTiled", (value)) +} + +// GetWallpaperTiled gets the value of WallpaperTiled for the instance +func (instance *Win32_Desktop) GetPropertyWallpaperTiled() (value bool, err error) { + retValue, err := instance.GetProperty("WallpaperTiled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DesktopMonitor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DesktopMonitor.go new file mode 100644 index 00000000..877fda84 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DesktopMonitor.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DesktopMonitor struct +type Win32_DesktopMonitor struct { + *CIM_DesktopMonitor + + // + MonitorManufacturer string + + // + MonitorType string + + // + PixelsPerXLogicalInch uint32 + + // + PixelsPerYLogicalInch uint32 +} + +func NewWin32_DesktopMonitorEx1(instance *cim.WmiInstance) (newInstance *Win32_DesktopMonitor, err error) { + tmp, err := NewCIM_DesktopMonitorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DesktopMonitor{ + CIM_DesktopMonitor: tmp, + } + return +} + +func NewWin32_DesktopMonitorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DesktopMonitor, err error) { + tmp, err := NewCIM_DesktopMonitorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DesktopMonitor{ + CIM_DesktopMonitor: tmp, + } + return +} + +// SetMonitorManufacturer sets the value of MonitorManufacturer for the instance +func (instance *Win32_DesktopMonitor) SetPropertyMonitorManufacturer(value string) (err error) { + return instance.SetProperty("MonitorManufacturer", (value)) +} + +// GetMonitorManufacturer gets the value of MonitorManufacturer for the instance +func (instance *Win32_DesktopMonitor) GetPropertyMonitorManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("MonitorManufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMonitorType sets the value of MonitorType for the instance +func (instance *Win32_DesktopMonitor) SetPropertyMonitorType(value string) (err error) { + return instance.SetProperty("MonitorType", (value)) +} + +// GetMonitorType gets the value of MonitorType for the instance +func (instance *Win32_DesktopMonitor) GetPropertyMonitorType() (value string, err error) { + retValue, err := instance.GetProperty("MonitorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPixelsPerXLogicalInch sets the value of PixelsPerXLogicalInch for the instance +func (instance *Win32_DesktopMonitor) SetPropertyPixelsPerXLogicalInch(value uint32) (err error) { + return instance.SetProperty("PixelsPerXLogicalInch", (value)) +} + +// GetPixelsPerXLogicalInch gets the value of PixelsPerXLogicalInch for the instance +func (instance *Win32_DesktopMonitor) GetPropertyPixelsPerXLogicalInch() (value uint32, err error) { + retValue, err := instance.GetProperty("PixelsPerXLogicalInch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPixelsPerYLogicalInch sets the value of PixelsPerYLogicalInch for the instance +func (instance *Win32_DesktopMonitor) SetPropertyPixelsPerYLogicalInch(value uint32) (err error) { + return instance.SetProperty("PixelsPerYLogicalInch", (value)) +} + +// GetPixelsPerYLogicalInch gets the value of PixelsPerYLogicalInch for the instance +func (instance *Win32_DesktopMonitor) GetPropertyPixelsPerYLogicalInch() (value uint32, err error) { + retValue, err := instance.GetProperty("PixelsPerYLogicalInch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceBus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceBus.go new file mode 100644 index 00000000..b55bd344 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceBus.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DeviceBus struct +type Win32_DeviceBus struct { + *CIM_Dependency +} + +func NewWin32_DeviceBusEx1(instance *cim.WmiInstance) (newInstance *Win32_DeviceBus, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DeviceBus{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_DeviceBusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DeviceBus, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DeviceBus{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceChangeEvent.go new file mode 100644 index 00000000..c5e7b244 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceChangeEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DeviceChangeEvent struct +type Win32_DeviceChangeEvent struct { + *__ExtrinsicEvent + + // + EventType uint16 +} + +func NewWin32_DeviceChangeEventEx1(instance *cim.WmiInstance) (newInstance *Win32_DeviceChangeEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DeviceChangeEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewWin32_DeviceChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DeviceChangeEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DeviceChangeEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +// SetEventType sets the value of EventType for the instance +func (instance *Win32_DeviceChangeEvent) SetPropertyEventType(value uint16) (err error) { + return instance.SetProperty("EventType", (value)) +} + +// GetEventType gets the value of EventType for the instance +func (instance *Win32_DeviceChangeEvent) GetPropertyEventType() (value uint16, err error) { + retValue, err := instance.GetProperty("EventType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceMemoryAddress.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceMemoryAddress.go new file mode 100644 index 00000000..122ede7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceMemoryAddress.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DeviceMemoryAddress struct +type Win32_DeviceMemoryAddress struct { + *Win32_SystemMemoryResource + + // + MemoryType string +} + +func NewWin32_DeviceMemoryAddressEx1(instance *cim.WmiInstance) (newInstance *Win32_DeviceMemoryAddress, err error) { + tmp, err := NewWin32_SystemMemoryResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DeviceMemoryAddress{ + Win32_SystemMemoryResource: tmp, + } + return +} + +func NewWin32_DeviceMemoryAddressEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DeviceMemoryAddress, err error) { + tmp, err := NewWin32_SystemMemoryResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DeviceMemoryAddress{ + Win32_SystemMemoryResource: tmp, + } + return +} + +// SetMemoryType sets the value of MemoryType for the instance +func (instance *Win32_DeviceMemoryAddress) SetPropertyMemoryType(value string) (err error) { + return instance.SetProperty("MemoryType", (value)) +} + +// GetMemoryType gets the value of MemoryType for the instance +func (instance *Win32_DeviceMemoryAddress) GetPropertyMemoryType() (value string, err error) { + retValue, err := instance.GetProperty("MemoryType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceSettings.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceSettings.go new file mode 100644 index 00000000..61fcf2c2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DeviceSettings.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DeviceSettings struct +type Win32_DeviceSettings struct { + *CIM_ElementSetting +} + +func NewWin32_DeviceSettingsEx1(instance *cim.WmiInstance) (newInstance *Win32_DeviceSettings, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DeviceSettings{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_DeviceSettingsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DeviceSettings, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DeviceSettings{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNode.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNode.go new file mode 100644 index 00000000..b42f6e90 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNode.go @@ -0,0 +1,161 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DfsNode struct +type Win32_DfsNode struct { + *CIM_LogicalElement + + // + Root bool + + // + State uint32 + + // + Timeout uint32 +} + +func NewWin32_DfsNodeEx1(instance *cim.WmiInstance) (newInstance *Win32_DfsNode, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DfsNode{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_DfsNodeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DfsNode, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DfsNode{ + CIM_LogicalElement: tmp, + } + return +} + +// SetRoot sets the value of Root for the instance +func (instance *Win32_DfsNode) SetPropertyRoot(value bool) (err error) { + return instance.SetProperty("Root", (value)) +} + +// GetRoot gets the value of Root for the instance +func (instance *Win32_DfsNode) GetPropertyRoot() (value bool, err error) { + retValue, err := instance.GetProperty("Root") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *Win32_DfsNode) SetPropertyState(value uint32) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *Win32_DfsNode) GetPropertyState() (value uint32, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeout sets the value of Timeout for the instance +func (instance *Win32_DfsNode) SetPropertyTimeout(value uint32) (err error) { + return instance.SetProperty("Timeout", (value)) +} + +// GetTimeout gets the value of Timeout for the instance +func (instance *Win32_DfsNode) GetPropertyTimeout() (value uint32, err error) { + retValue, err := instance.GetProperty("Timeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// +// +// + +// +func (instance *Win32_DfsNode) Create( /* IN */ DfsEntryPath string, + /* IN */ ServerName string, + /* IN */ ShareName string, + /* OPTIONAL IN */ Description string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Create", DfsEntryPath, ServerName, ShareName, Description) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNodeTarget.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNodeTarget.go new file mode 100644 index 00000000..1984e02b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsNodeTarget.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DfsNodeTarget struct +type Win32_DfsNodeTarget struct { + *CIM_Dependency +} + +func NewWin32_DfsNodeTargetEx1(instance *cim.WmiInstance) (newInstance *Win32_DfsNodeTarget, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DfsNodeTarget{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_DfsNodeTargetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DfsNodeTarget, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DfsNodeTarget{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsTarget.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsTarget.go new file mode 100644 index 00000000..64d84eb3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DfsTarget.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DfsTarget struct +type Win32_DfsTarget struct { + *CIM_LogicalElement + + // + LinkName string + + // + ServerName string + + // + ShareName string + + // + State uint32 +} + +func NewWin32_DfsTargetEx1(instance *cim.WmiInstance) (newInstance *Win32_DfsTarget, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DfsTarget{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_DfsTargetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DfsTarget, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DfsTarget{ + CIM_LogicalElement: tmp, + } + return +} + +// SetLinkName sets the value of LinkName for the instance +func (instance *Win32_DfsTarget) SetPropertyLinkName(value string) (err error) { + return instance.SetProperty("LinkName", (value)) +} + +// GetLinkName gets the value of LinkName for the instance +func (instance *Win32_DfsTarget) GetPropertyLinkName() (value string, err error) { + retValue, err := instance.GetProperty("LinkName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Win32_DfsTarget) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Win32_DfsTarget) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShareName sets the value of ShareName for the instance +func (instance *Win32_DfsTarget) SetPropertyShareName(value string) (err error) { + return instance.SetProperty("ShareName", (value)) +} + +// GetShareName gets the value of ShareName for the instance +func (instance *Win32_DfsTarget) GetPropertyShareName() (value string, err error) { + retValue, err := instance.GetProperty("ShareName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *Win32_DfsTarget) SetPropertyState(value uint32) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *Win32_DfsTarget) GetPropertyState() (value uint32, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Directory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Directory.go new file mode 100644 index 00000000..515f876a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Directory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Directory struct +type Win32_Directory struct { + *CIM_Directory +} + +func NewWin32_DirectoryEx1(instance *cim.WmiInstance) (newInstance *Win32_Directory, err error) { + tmp, err := NewCIM_DirectoryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Directory{ + CIM_Directory: tmp, + } + return +} + +func NewWin32_DirectoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Directory, err error) { + tmp, err := NewCIM_DirectoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Directory{ + CIM_Directory: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DirectorySpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DirectorySpecification.go new file mode 100644 index 00000000..b05604c3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DirectorySpecification.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DirectorySpecification struct +type Win32_DirectorySpecification struct { + *CIM_DirectorySpecification + + // + DefaultDir string + + // + Directory string +} + +func NewWin32_DirectorySpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_DirectorySpecification, err error) { + tmp, err := NewCIM_DirectorySpecificationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DirectorySpecification{ + CIM_DirectorySpecification: tmp, + } + return +} + +func NewWin32_DirectorySpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DirectorySpecification, err error) { + tmp, err := NewCIM_DirectorySpecificationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DirectorySpecification{ + CIM_DirectorySpecification: tmp, + } + return +} + +// SetDefaultDir sets the value of DefaultDir for the instance +func (instance *Win32_DirectorySpecification) SetPropertyDefaultDir(value string) (err error) { + return instance.SetProperty("DefaultDir", (value)) +} + +// GetDefaultDir gets the value of DefaultDir for the instance +func (instance *Win32_DirectorySpecification) GetPropertyDefaultDir() (value string, err error) { + retValue, err := instance.GetProperty("DefaultDir") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDirectory sets the value of Directory for the instance +func (instance *Win32_DirectorySpecification) SetPropertyDirectory(value string) (err error) { + return instance.SetProperty("Directory", (value)) +} + +// GetDirectory gets the value of Directory for the instance +func (instance *Win32_DirectorySpecification) GetPropertyDirectory() (value string, err error) { + retValue, err := instance.GetProperty("Directory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrive.go new file mode 100644 index 00000000..bbddf832 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrive.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DiskDrive struct +type Win32_DiskDrive struct { + *CIM_DiskDrive + + // + BytesPerSector uint32 + + // + FirmwareRevision string + + // + Index uint32 + + // + InterfaceType string + + // + Manufacturer string + + // + MediaLoaded bool + + // + MediaType string + + // + Model string + + // + Partitions uint32 + + // + SCSIBus uint32 + + // + SCSILogicalUnit uint16 + + // + SCSIPort uint16 + + // + SCSITargetId uint16 + + // + SectorsPerTrack uint32 + + // + SerialNumber string + + // + Signature uint32 + + // + Size uint64 + + // + TotalCylinders uint64 + + // + TotalHeads uint32 + + // + TotalSectors uint64 + + // + TotalTracks uint64 + + // + TracksPerCylinder uint32 +} + +func NewWin32_DiskDriveEx1(instance *cim.WmiInstance) (newInstance *Win32_DiskDrive, err error) { + tmp, err := NewCIM_DiskDriveEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DiskDrive{ + CIM_DiskDrive: tmp, + } + return +} + +func NewWin32_DiskDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DiskDrive, err error) { + tmp, err := NewCIM_DiskDriveEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DiskDrive{ + CIM_DiskDrive: tmp, + } + return +} + +// SetBytesPerSector sets the value of BytesPerSector for the instance +func (instance *Win32_DiskDrive) SetPropertyBytesPerSector(value uint32) (err error) { + return instance.SetProperty("BytesPerSector", (value)) +} + +// GetBytesPerSector gets the value of BytesPerSector for the instance +func (instance *Win32_DiskDrive) GetPropertyBytesPerSector() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesPerSector") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFirmwareRevision sets the value of FirmwareRevision for the instance +func (instance *Win32_DiskDrive) SetPropertyFirmwareRevision(value string) (err error) { + return instance.SetProperty("FirmwareRevision", (value)) +} + +// GetFirmwareRevision gets the value of FirmwareRevision for the instance +func (instance *Win32_DiskDrive) GetPropertyFirmwareRevision() (value string, err error) { + retValue, err := instance.GetProperty("FirmwareRevision") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndex sets the value of Index for the instance +func (instance *Win32_DiskDrive) SetPropertyIndex(value uint32) (err error) { + return instance.SetProperty("Index", (value)) +} + +// GetIndex gets the value of Index for the instance +func (instance *Win32_DiskDrive) GetPropertyIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("Index") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterfaceType sets the value of InterfaceType for the instance +func (instance *Win32_DiskDrive) SetPropertyInterfaceType(value string) (err error) { + return instance.SetProperty("InterfaceType", (value)) +} + +// GetInterfaceType gets the value of InterfaceType for the instance +func (instance *Win32_DiskDrive) GetPropertyInterfaceType() (value string, err error) { + retValue, err := instance.GetProperty("InterfaceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_DiskDrive) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_DiskDrive) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMediaLoaded sets the value of MediaLoaded for the instance +func (instance *Win32_DiskDrive) SetPropertyMediaLoaded(value bool) (err error) { + return instance.SetProperty("MediaLoaded", (value)) +} + +// GetMediaLoaded gets the value of MediaLoaded for the instance +func (instance *Win32_DiskDrive) GetPropertyMediaLoaded() (value bool, err error) { + retValue, err := instance.GetProperty("MediaLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *Win32_DiskDrive) SetPropertyMediaType(value string) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *Win32_DiskDrive) GetPropertyMediaType() (value string, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *Win32_DiskDrive) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *Win32_DiskDrive) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPartitions sets the value of Partitions for the instance +func (instance *Win32_DiskDrive) SetPropertyPartitions(value uint32) (err error) { + return instance.SetProperty("Partitions", (value)) +} + +// GetPartitions gets the value of Partitions for the instance +func (instance *Win32_DiskDrive) GetPropertyPartitions() (value uint32, err error) { + retValue, err := instance.GetProperty("Partitions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCSIBus sets the value of SCSIBus for the instance +func (instance *Win32_DiskDrive) SetPropertySCSIBus(value uint32) (err error) { + return instance.SetProperty("SCSIBus", (value)) +} + +// GetSCSIBus gets the value of SCSIBus for the instance +func (instance *Win32_DiskDrive) GetPropertySCSIBus() (value uint32, err error) { + retValue, err := instance.GetProperty("SCSIBus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCSILogicalUnit sets the value of SCSILogicalUnit for the instance +func (instance *Win32_DiskDrive) SetPropertySCSILogicalUnit(value uint16) (err error) { + return instance.SetProperty("SCSILogicalUnit", (value)) +} + +// GetSCSILogicalUnit gets the value of SCSILogicalUnit for the instance +func (instance *Win32_DiskDrive) GetPropertySCSILogicalUnit() (value uint16, err error) { + retValue, err := instance.GetProperty("SCSILogicalUnit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSCSIPort sets the value of SCSIPort for the instance +func (instance *Win32_DiskDrive) SetPropertySCSIPort(value uint16) (err error) { + return instance.SetProperty("SCSIPort", (value)) +} + +// GetSCSIPort gets the value of SCSIPort for the instance +func (instance *Win32_DiskDrive) GetPropertySCSIPort() (value uint16, err error) { + retValue, err := instance.GetProperty("SCSIPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSCSITargetId sets the value of SCSITargetId for the instance +func (instance *Win32_DiskDrive) SetPropertySCSITargetId(value uint16) (err error) { + return instance.SetProperty("SCSITargetId", (value)) +} + +// GetSCSITargetId gets the value of SCSITargetId for the instance +func (instance *Win32_DiskDrive) GetPropertySCSITargetId() (value uint16, err error) { + retValue, err := instance.GetProperty("SCSITargetId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSectorsPerTrack sets the value of SectorsPerTrack for the instance +func (instance *Win32_DiskDrive) SetPropertySectorsPerTrack(value uint32) (err error) { + return instance.SetProperty("SectorsPerTrack", (value)) +} + +// GetSectorsPerTrack gets the value of SectorsPerTrack for the instance +func (instance *Win32_DiskDrive) GetPropertySectorsPerTrack() (value uint32, err error) { + retValue, err := instance.GetProperty("SectorsPerTrack") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *Win32_DiskDrive) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *Win32_DiskDrive) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSignature sets the value of Signature for the instance +func (instance *Win32_DiskDrive) SetPropertySignature(value uint32) (err error) { + return instance.SetProperty("Signature", (value)) +} + +// GetSignature gets the value of Signature for the instance +func (instance *Win32_DiskDrive) GetPropertySignature() (value uint32, err error) { + retValue, err := instance.GetProperty("Signature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *Win32_DiskDrive) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *Win32_DiskDrive) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalCylinders sets the value of TotalCylinders for the instance +func (instance *Win32_DiskDrive) SetPropertyTotalCylinders(value uint64) (err error) { + return instance.SetProperty("TotalCylinders", (value)) +} + +// GetTotalCylinders gets the value of TotalCylinders for the instance +func (instance *Win32_DiskDrive) GetPropertyTotalCylinders() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalCylinders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalHeads sets the value of TotalHeads for the instance +func (instance *Win32_DiskDrive) SetPropertyTotalHeads(value uint32) (err error) { + return instance.SetProperty("TotalHeads", (value)) +} + +// GetTotalHeads gets the value of TotalHeads for the instance +func (instance *Win32_DiskDrive) GetPropertyTotalHeads() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalHeads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSectors sets the value of TotalSectors for the instance +func (instance *Win32_DiskDrive) SetPropertyTotalSectors(value uint64) (err error) { + return instance.SetProperty("TotalSectors", (value)) +} + +// GetTotalSectors gets the value of TotalSectors for the instance +func (instance *Win32_DiskDrive) GetPropertyTotalSectors() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSectors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalTracks sets the value of TotalTracks for the instance +func (instance *Win32_DiskDrive) SetPropertyTotalTracks(value uint64) (err error) { + return instance.SetProperty("TotalTracks", (value)) +} + +// GetTotalTracks gets the value of TotalTracks for the instance +func (instance *Win32_DiskDrive) GetPropertyTotalTracks() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalTracks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTracksPerCylinder sets the value of TracksPerCylinder for the instance +func (instance *Win32_DiskDrive) SetPropertyTracksPerCylinder(value uint32) (err error) { + return instance.SetProperty("TracksPerCylinder", (value)) +} + +// GetTracksPerCylinder gets the value of TracksPerCylinder for the instance +func (instance *Win32_DiskDrive) GetPropertyTracksPerCylinder() (value uint32, err error) { + retValue, err := instance.GetProperty("TracksPerCylinder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrivePhysicalMedia.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrivePhysicalMedia.go new file mode 100644 index 00000000..db6671ce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDrivePhysicalMedia.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DiskDrivePhysicalMedia struct +type Win32_DiskDrivePhysicalMedia struct { + *CIM_Realizes +} + +func NewWin32_DiskDrivePhysicalMediaEx1(instance *cim.WmiInstance) (newInstance *Win32_DiskDrivePhysicalMedia, err error) { + tmp, err := NewCIM_RealizesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DiskDrivePhysicalMedia{ + CIM_Realizes: tmp, + } + return +} + +func NewWin32_DiskDrivePhysicalMediaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DiskDrivePhysicalMedia, err error) { + tmp, err := NewCIM_RealizesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DiskDrivePhysicalMedia{ + CIM_Realizes: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDriveToDiskPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDriveToDiskPartition.go new file mode 100644 index 00000000..1f3ca93d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskDriveToDiskPartition.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DiskDriveToDiskPartition struct +type Win32_DiskDriveToDiskPartition struct { + *CIM_MediaPresent +} + +func NewWin32_DiskDriveToDiskPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_DiskDriveToDiskPartition, err error) { + tmp, err := NewCIM_MediaPresentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DiskDriveToDiskPartition{ + CIM_MediaPresent: tmp, + } + return +} + +func NewWin32_DiskDriveToDiskPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DiskDriveToDiskPartition, err error) { + tmp, err := NewCIM_MediaPresentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DiskDriveToDiskPartition{ + CIM_MediaPresent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskPartition.go new file mode 100644 index 00000000..7c800a40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskPartition.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DiskPartition struct +type Win32_DiskPartition struct { + *CIM_DiskPartition + + // + BootPartition bool + + // + DiskIndex uint32 + + // + HiddenSectors uint32 + + // + Index uint32 + + // + RewritePartition bool + + // + Size uint64 + + // + StartingOffset uint64 + + // + Type string +} + +func NewWin32_DiskPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_DiskPartition, err error) { + tmp, err := NewCIM_DiskPartitionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DiskPartition{ + CIM_DiskPartition: tmp, + } + return +} + +func NewWin32_DiskPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DiskPartition, err error) { + tmp, err := NewCIM_DiskPartitionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DiskPartition{ + CIM_DiskPartition: tmp, + } + return +} + +// SetBootPartition sets the value of BootPartition for the instance +func (instance *Win32_DiskPartition) SetPropertyBootPartition(value bool) (err error) { + return instance.SetProperty("BootPartition", (value)) +} + +// GetBootPartition gets the value of BootPartition for the instance +func (instance *Win32_DiskPartition) GetPropertyBootPartition() (value bool, err error) { + retValue, err := instance.GetProperty("BootPartition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDiskIndex sets the value of DiskIndex for the instance +func (instance *Win32_DiskPartition) SetPropertyDiskIndex(value uint32) (err error) { + return instance.SetProperty("DiskIndex", (value)) +} + +// GetDiskIndex gets the value of DiskIndex for the instance +func (instance *Win32_DiskPartition) GetPropertyDiskIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHiddenSectors sets the value of HiddenSectors for the instance +func (instance *Win32_DiskPartition) SetPropertyHiddenSectors(value uint32) (err error) { + return instance.SetProperty("HiddenSectors", (value)) +} + +// GetHiddenSectors gets the value of HiddenSectors for the instance +func (instance *Win32_DiskPartition) GetPropertyHiddenSectors() (value uint32, err error) { + retValue, err := instance.GetProperty("HiddenSectors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIndex sets the value of Index for the instance +func (instance *Win32_DiskPartition) SetPropertyIndex(value uint32) (err error) { + return instance.SetProperty("Index", (value)) +} + +// GetIndex gets the value of Index for the instance +func (instance *Win32_DiskPartition) GetPropertyIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("Index") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRewritePartition sets the value of RewritePartition for the instance +func (instance *Win32_DiskPartition) SetPropertyRewritePartition(value bool) (err error) { + return instance.SetProperty("RewritePartition", (value)) +} + +// GetRewritePartition gets the value of RewritePartition for the instance +func (instance *Win32_DiskPartition) GetPropertyRewritePartition() (value bool, err error) { + retValue, err := instance.GetProperty("RewritePartition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *Win32_DiskPartition) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *Win32_DiskPartition) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartingOffset sets the value of StartingOffset for the instance +func (instance *Win32_DiskPartition) SetPropertyStartingOffset(value uint64) (err error) { + return instance.SetProperty("StartingOffset", (value)) +} + +// GetStartingOffset gets the value of StartingOffset for the instance +func (instance *Win32_DiskPartition) GetPropertyStartingOffset() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingOffset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_DiskPartition) SetPropertyType(value string) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_DiskPartition) GetPropertyType() (value string, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskQuota.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskQuota.go new file mode 100644 index 00000000..250a4016 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DiskQuota.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DiskQuota struct +type Win32_DiskQuota struct { + *cim.WmiInstance + + // + DiskSpaceUsed uint64 + + // + Limit uint64 + + // + QuotaVolume Win32_LogicalDisk + + // + Status uint32 + + // + User Win32_Account + + // + WarningLimit uint64 +} + +func NewWin32_DiskQuotaEx1(instance *cim.WmiInstance) (newInstance *Win32_DiskQuota, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_DiskQuota{ + WmiInstance: tmp, + } + return +} + +func NewWin32_DiskQuotaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DiskQuota, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DiskQuota{ + WmiInstance: tmp, + } + return +} + +// SetDiskSpaceUsed sets the value of DiskSpaceUsed for the instance +func (instance *Win32_DiskQuota) SetPropertyDiskSpaceUsed(value uint64) (err error) { + return instance.SetProperty("DiskSpaceUsed", (value)) +} + +// GetDiskSpaceUsed gets the value of DiskSpaceUsed for the instance +func (instance *Win32_DiskQuota) GetPropertyDiskSpaceUsed() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskSpaceUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLimit sets the value of Limit for the instance +func (instance *Win32_DiskQuota) SetPropertyLimit(value uint64) (err error) { + return instance.SetProperty("Limit", (value)) +} + +// GetLimit gets the value of Limit for the instance +func (instance *Win32_DiskQuota) GetPropertyLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("Limit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetQuotaVolume sets the value of QuotaVolume for the instance +func (instance *Win32_DiskQuota) SetPropertyQuotaVolume(value Win32_LogicalDisk) (err error) { + return instance.SetProperty("QuotaVolume", (value)) +} + +// GetQuotaVolume gets the value of QuotaVolume for the instance +func (instance *Win32_DiskQuota) GetPropertyQuotaVolume() (value Win32_LogicalDisk, err error) { + retValue, err := instance.GetProperty("QuotaVolume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_LogicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_LogicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_LogicalDisk(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *Win32_DiskQuota) SetPropertyStatus(value uint32) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *Win32_DiskQuota) GetPropertyStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Win32_DiskQuota) SetPropertyUser(value Win32_Account) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Win32_DiskQuota) GetPropertyUser() (value Win32_Account, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Account) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Account is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Account(valuetmp) + + return +} + +// SetWarningLimit sets the value of WarningLimit for the instance +func (instance *Win32_DiskQuota) SetPropertyWarningLimit(value uint64) (err error) { + return instance.SetProperty("WarningLimit", (value)) +} + +// GetWarningLimit gets the value of WarningLimit for the instance +func (instance *Win32_DiskQuota) GetPropertyWarningLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("WarningLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayConfiguration.go new file mode 100644 index 00000000..cb4bd917 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayConfiguration.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DisplayConfiguration struct +type Win32_DisplayConfiguration struct { + *CIM_Setting + + // + BitsPerPel uint32 + + // + DeviceName string + + // + DisplayFlags uint32 + + // + DisplayFrequency uint32 + + // + DitherType uint32 + + // + DriverVersion string + + // + ICMIntent uint32 + + // + ICMMethod uint32 + + // + LogPixels uint32 + + // + PelsHeight uint32 + + // + PelsWidth uint32 + + // + SpecificationVersion uint32 +} + +func NewWin32_DisplayConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_DisplayConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DisplayConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_DisplayConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DisplayConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DisplayConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetBitsPerPel sets the value of BitsPerPel for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyBitsPerPel(value uint32) (err error) { + return instance.SetProperty("BitsPerPel", (value)) +} + +// GetBitsPerPel gets the value of BitsPerPel for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyBitsPerPel() (value uint32, err error) { + retValue, err := instance.GetProperty("BitsPerPel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceName sets the value of DeviceName for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyDeviceName(value string) (err error) { + return instance.SetProperty("DeviceName", (value)) +} + +// GetDeviceName gets the value of DeviceName for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyDeviceName() (value string, err error) { + retValue, err := instance.GetProperty("DeviceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDisplayFlags sets the value of DisplayFlags for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyDisplayFlags(value uint32) (err error) { + return instance.SetProperty("DisplayFlags", (value)) +} + +// GetDisplayFlags gets the value of DisplayFlags for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyDisplayFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("DisplayFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDisplayFrequency sets the value of DisplayFrequency for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyDisplayFrequency(value uint32) (err error) { + return instance.SetProperty("DisplayFrequency", (value)) +} + +// GetDisplayFrequency gets the value of DisplayFrequency for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyDisplayFrequency() (value uint32, err error) { + retValue, err := instance.GetProperty("DisplayFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDitherType sets the value of DitherType for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyDitherType(value uint32) (err error) { + return instance.SetProperty("DitherType", (value)) +} + +// GetDitherType gets the value of DitherType for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyDitherType() (value uint32, err error) { + retValue, err := instance.GetProperty("DitherType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDriverVersion sets the value of DriverVersion for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyDriverVersion(value string) (err error) { + return instance.SetProperty("DriverVersion", (value)) +} + +// GetDriverVersion gets the value of DriverVersion for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyDriverVersion() (value string, err error) { + retValue, err := instance.GetProperty("DriverVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetICMIntent sets the value of ICMIntent for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyICMIntent(value uint32) (err error) { + return instance.SetProperty("ICMIntent", (value)) +} + +// GetICMIntent gets the value of ICMIntent for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyICMIntent() (value uint32, err error) { + retValue, err := instance.GetProperty("ICMIntent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetICMMethod sets the value of ICMMethod for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyICMMethod(value uint32) (err error) { + return instance.SetProperty("ICMMethod", (value)) +} + +// GetICMMethod gets the value of ICMMethod for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyICMMethod() (value uint32, err error) { + retValue, err := instance.GetProperty("ICMMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogPixels sets the value of LogPixels for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyLogPixels(value uint32) (err error) { + return instance.SetProperty("LogPixels", (value)) +} + +// GetLogPixels gets the value of LogPixels for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyLogPixels() (value uint32, err error) { + retValue, err := instance.GetProperty("LogPixels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPelsHeight sets the value of PelsHeight for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyPelsHeight(value uint32) (err error) { + return instance.SetProperty("PelsHeight", (value)) +} + +// GetPelsHeight gets the value of PelsHeight for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyPelsHeight() (value uint32, err error) { + retValue, err := instance.GetProperty("PelsHeight") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPelsWidth sets the value of PelsWidth for the instance +func (instance *Win32_DisplayConfiguration) SetPropertyPelsWidth(value uint32) (err error) { + return instance.SetProperty("PelsWidth", (value)) +} + +// GetPelsWidth gets the value of PelsWidth for the instance +func (instance *Win32_DisplayConfiguration) GetPropertyPelsWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("PelsWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpecificationVersion sets the value of SpecificationVersion for the instance +func (instance *Win32_DisplayConfiguration) SetPropertySpecificationVersion(value uint32) (err error) { + return instance.SetProperty("SpecificationVersion", (value)) +} + +// GetSpecificationVersion gets the value of SpecificationVersion for the instance +func (instance *Win32_DisplayConfiguration) GetPropertySpecificationVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("SpecificationVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayControllerConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayControllerConfiguration.go new file mode 100644 index 00000000..a2c97a72 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DisplayControllerConfiguration.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DisplayControllerConfiguration struct +type Win32_DisplayControllerConfiguration struct { + *CIM_Setting + + // + BitsPerPixel uint32 + + // + ColorPlanes uint32 + + // + DeviceEntriesInAColorTable uint32 + + // + DeviceSpecificPens uint32 + + // + HorizontalResolution uint32 + + // + Name string + + // + RefreshRate int32 + + // + ReservedSystemPaletteEntries uint32 + + // + SystemPaletteEntries uint32 + + // + VerticalResolution uint32 + + // + VideoMode string +} + +func NewWin32_DisplayControllerConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_DisplayControllerConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DisplayControllerConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_DisplayControllerConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DisplayControllerConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DisplayControllerConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetBitsPerPixel sets the value of BitsPerPixel for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyBitsPerPixel(value uint32) (err error) { + return instance.SetProperty("BitsPerPixel", (value)) +} + +// GetBitsPerPixel gets the value of BitsPerPixel for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyBitsPerPixel() (value uint32, err error) { + retValue, err := instance.GetProperty("BitsPerPixel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetColorPlanes sets the value of ColorPlanes for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyColorPlanes(value uint32) (err error) { + return instance.SetProperty("ColorPlanes", (value)) +} + +// GetColorPlanes gets the value of ColorPlanes for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyColorPlanes() (value uint32, err error) { + retValue, err := instance.GetProperty("ColorPlanes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceEntriesInAColorTable sets the value of DeviceEntriesInAColorTable for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyDeviceEntriesInAColorTable(value uint32) (err error) { + return instance.SetProperty("DeviceEntriesInAColorTable", (value)) +} + +// GetDeviceEntriesInAColorTable gets the value of DeviceEntriesInAColorTable for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyDeviceEntriesInAColorTable() (value uint32, err error) { + retValue, err := instance.GetProperty("DeviceEntriesInAColorTable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceSpecificPens sets the value of DeviceSpecificPens for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyDeviceSpecificPens(value uint32) (err error) { + return instance.SetProperty("DeviceSpecificPens", (value)) +} + +// GetDeviceSpecificPens gets the value of DeviceSpecificPens for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyDeviceSpecificPens() (value uint32, err error) { + retValue, err := instance.GetProperty("DeviceSpecificPens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRefreshRate sets the value of RefreshRate for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyRefreshRate(value int32) (err error) { + return instance.SetProperty("RefreshRate", (value)) +} + +// GetRefreshRate gets the value of RefreshRate for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyRefreshRate() (value int32, err error) { + retValue, err := instance.GetProperty("RefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetReservedSystemPaletteEntries sets the value of ReservedSystemPaletteEntries for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyReservedSystemPaletteEntries(value uint32) (err error) { + return instance.SetProperty("ReservedSystemPaletteEntries", (value)) +} + +// GetReservedSystemPaletteEntries gets the value of ReservedSystemPaletteEntries for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyReservedSystemPaletteEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ReservedSystemPaletteEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemPaletteEntries sets the value of SystemPaletteEntries for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertySystemPaletteEntries(value uint32) (err error) { + return instance.SetProperty("SystemPaletteEntries", (value)) +} + +// GetSystemPaletteEntries gets the value of SystemPaletteEntries for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertySystemPaletteEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemPaletteEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVideoMode sets the value of VideoMode for the instance +func (instance *Win32_DisplayControllerConfiguration) SetPropertyVideoMode(value string) (err error) { + return instance.SetProperty("VideoMode", (value)) +} + +// GetVideoMode gets the value of VideoMode for the instance +func (instance *Win32_DisplayControllerConfiguration) GetPropertyVideoMode() (value string, err error) { + retValue, err := instance.GetProperty("VideoMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DriverForDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DriverForDevice.go new file mode 100644 index 00000000..3e1b188f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DriverForDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_DriverForDevice struct +type Win32_DriverForDevice struct { + *CIM_Dependency +} + +func NewWin32_DriverForDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_DriverForDevice, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DriverForDevice{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_DriverForDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DriverForDevice, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DriverForDevice{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DuplicateFileAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DuplicateFileAction.go new file mode 100644 index 00000000..a55005f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_DuplicateFileAction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_DuplicateFileAction struct +type Win32_DuplicateFileAction struct { + *CIM_CopyFileAction + + // + FileKey string +} + +func NewWin32_DuplicateFileActionEx1(instance *cim.WmiInstance) (newInstance *Win32_DuplicateFileAction, err error) { + tmp, err := NewCIM_CopyFileActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_DuplicateFileAction{ + CIM_CopyFileAction: tmp, + } + return +} + +func NewWin32_DuplicateFileActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_DuplicateFileAction, err error) { + tmp, err := NewCIM_CopyFileActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_DuplicateFileAction{ + CIM_CopyFileAction: tmp, + } + return +} + +// SetFileKey sets the value of FileKey for the instance +func (instance *Win32_DuplicateFileAction) SetPropertyFileKey(value string) (err error) { + return instance.SetProperty("FileKey", (value)) +} + +// GetFileKey gets the value of FileKey for the instance +func (instance *Win32_DuplicateFileAction) GetPropertyFileKey() (value string, err error) { + retValue, err := instance.GetProperty("FileKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Environment.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Environment.go new file mode 100644 index 00000000..8ad745ef --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Environment.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Environment struct +type Win32_Environment struct { + *CIM_SystemResource + + // + SystemVariable bool + + // + UserName string + + // + VariableValue string +} + +func NewWin32_EnvironmentEx1(instance *cim.WmiInstance) (newInstance *Win32_Environment, err error) { + tmp, err := NewCIM_SystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Environment{ + CIM_SystemResource: tmp, + } + return +} + +func NewWin32_EnvironmentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Environment, err error) { + tmp, err := NewCIM_SystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Environment{ + CIM_SystemResource: tmp, + } + return +} + +// SetSystemVariable sets the value of SystemVariable for the instance +func (instance *Win32_Environment) SetPropertySystemVariable(value bool) (err error) { + return instance.SetProperty("SystemVariable", (value)) +} + +// GetSystemVariable gets the value of SystemVariable for the instance +func (instance *Win32_Environment) GetPropertySystemVariable() (value bool, err error) { + retValue, err := instance.GetProperty("SystemVariable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetUserName sets the value of UserName for the instance +func (instance *Win32_Environment) SetPropertyUserName(value string) (err error) { + return instance.SetProperty("UserName", (value)) +} + +// GetUserName gets the value of UserName for the instance +func (instance *Win32_Environment) GetPropertyUserName() (value string, err error) { + retValue, err := instance.GetProperty("UserName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVariableValue sets the value of VariableValue for the instance +func (instance *Win32_Environment) SetPropertyVariableValue(value string) (err error) { + return instance.SetProperty("VariableValue", (value)) +} + +// GetVariableValue gets the value of VariableValue for the instance +func (instance *Win32_Environment) GetPropertyVariableValue() (value string, err error) { + retValue, err := instance.GetProperty("VariableValue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_EnvironmentSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_EnvironmentSpecification.go new file mode 100644 index 00000000..5060669c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_EnvironmentSpecification.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_EnvironmentSpecification struct +type Win32_EnvironmentSpecification struct { + *CIM_Check + + // + Environment string + + // + Value string +} + +func NewWin32_EnvironmentSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_EnvironmentSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_EnvironmentSpecification{ + CIM_Check: tmp, + } + return +} + +func NewWin32_EnvironmentSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_EnvironmentSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_EnvironmentSpecification{ + CIM_Check: tmp, + } + return +} + +// SetEnvironment sets the value of Environment for the instance +func (instance *Win32_EnvironmentSpecification) SetPropertyEnvironment(value string) (err error) { + return instance.SetProperty("Environment", (value)) +} + +// GetEnvironment gets the value of Environment for the instance +func (instance *Win32_EnvironmentSpecification) GetPropertyEnvironment() (value string, err error) { + retValue, err := instance.GetProperty("Environment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *Win32_EnvironmentSpecification) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *Win32_EnvironmentSpecification) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ExtensionInfoAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ExtensionInfoAction.go new file mode 100644 index 00000000..7d046948 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ExtensionInfoAction.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ExtensionInfoAction struct +type Win32_ExtensionInfoAction struct { + *CIM_Action + + // + Argument string + + // + Command string + + // + Extension string + + // + MIME string + + // + ProgID string + + // + ShellNew string + + // + ShellNewValue string + + // + Verb string +} + +func NewWin32_ExtensionInfoActionEx1(instance *cim.WmiInstance) (newInstance *Win32_ExtensionInfoAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ExtensionInfoAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_ExtensionInfoActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ExtensionInfoAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ExtensionInfoAction{ + CIM_Action: tmp, + } + return +} + +// SetArgument sets the value of Argument for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyArgument(value string) (err error) { + return instance.SetProperty("Argument", (value)) +} + +// GetArgument gets the value of Argument for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyArgument() (value string, err error) { + retValue, err := instance.GetProperty("Argument") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCommand sets the value of Command for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyCommand(value string) (err error) { + return instance.SetProperty("Command", (value)) +} + +// GetCommand gets the value of Command for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyCommand() (value string, err error) { + retValue, err := instance.GetProperty("Command") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExtension sets the value of Extension for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyExtension(value string) (err error) { + return instance.SetProperty("Extension", (value)) +} + +// GetExtension gets the value of Extension for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyExtension() (value string, err error) { + retValue, err := instance.GetProperty("Extension") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMIME sets the value of MIME for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyMIME(value string) (err error) { + return instance.SetProperty("MIME", (value)) +} + +// GetMIME gets the value of MIME for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyMIME() (value string, err error) { + retValue, err := instance.GetProperty("MIME") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProgID sets the value of ProgID for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyProgID(value string) (err error) { + return instance.SetProperty("ProgID", (value)) +} + +// GetProgID gets the value of ProgID for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyProgID() (value string, err error) { + retValue, err := instance.GetProperty("ProgID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShellNew sets the value of ShellNew for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyShellNew(value string) (err error) { + return instance.SetProperty("ShellNew", (value)) +} + +// GetShellNew gets the value of ShellNew for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyShellNew() (value string, err error) { + retValue, err := instance.GetProperty("ShellNew") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShellNewValue sets the value of ShellNewValue for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyShellNewValue(value string) (err error) { + return instance.SetProperty("ShellNewValue", (value)) +} + +// GetShellNewValue gets the value of ShellNewValue for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyShellNewValue() (value string, err error) { + retValue, err := instance.GetProperty("ShellNewValue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVerb sets the value of Verb for the instance +func (instance *Win32_ExtensionInfoAction) SetPropertyVerb(value string) (err error) { + return instance.SetProperty("Verb", (value)) +} + +// GetVerb gets the value of Verb for the instance +func (instance *Win32_ExtensionInfoAction) GetPropertyVerb() (value string, err error) { + retValue, err := instance.GetProperty("Verb") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Fan.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Fan.go new file mode 100644 index 00000000..7368bad6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Fan.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Fan struct +type Win32_Fan struct { + *CIM_Fan +} + +func NewWin32_FanEx1(instance *cim.WmiInstance) (newInstance *Win32_Fan, err error) { + tmp, err := NewCIM_FanEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Fan{ + CIM_Fan: tmp, + } + return +} + +func NewWin32_FanEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Fan, err error) { + tmp, err := NewCIM_FanEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Fan{ + CIM_Fan: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FileSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FileSpecification.go new file mode 100644 index 00000000..f483e518 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FileSpecification.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_FileSpecification struct +type Win32_FileSpecification struct { + *CIM_FileSpecification + + // + Attributes uint16 + + // + FileID string + + // + Language string + + // + Sequence uint16 +} + +func NewWin32_FileSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_FileSpecification, err error) { + tmp, err := NewCIM_FileSpecificationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_FileSpecification{ + CIM_FileSpecification: tmp, + } + return +} + +func NewWin32_FileSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_FileSpecification, err error) { + tmp, err := NewCIM_FileSpecificationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_FileSpecification{ + CIM_FileSpecification: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_FileSpecification) SetPropertyAttributes(value uint16) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_FileSpecification) GetPropertyAttributes() (value uint16, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFileID sets the value of FileID for the instance +func (instance *Win32_FileSpecification) SetPropertyFileID(value string) (err error) { + return instance.SetProperty("FileID", (value)) +} + +// GetFileID gets the value of FileID for the instance +func (instance *Win32_FileSpecification) GetPropertyFileID() (value string, err error) { + retValue, err := instance.GetProperty("FileID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLanguage sets the value of Language for the instance +func (instance *Win32_FileSpecification) SetPropertyLanguage(value string) (err error) { + return instance.SetProperty("Language", (value)) +} + +// GetLanguage gets the value of Language for the instance +func (instance *Win32_FileSpecification) GetPropertyLanguage() (value string, err error) { + retValue, err := instance.GetProperty("Language") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSequence sets the value of Sequence for the instance +func (instance *Win32_FileSpecification) SetPropertySequence(value uint16) (err error) { + return instance.SetProperty("Sequence", (value)) +} + +// GetSequence gets the value of Sequence for the instance +func (instance *Win32_FileSpecification) GetPropertySequence() (value uint16, err error) { + retValue, err := instance.GetProperty("Sequence") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirection.go new file mode 100644 index 00000000..88ff10b5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirection.go @@ -0,0 +1,291 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_FolderRedirection struct +type Win32_FolderRedirection struct { + *cim.WmiInstance + + // Move the contents of local to the new location. This will copy the redirected folder data into the local UNC location. Then this content will be synced with the server share content. Effectively, moving the content from the local location to the share + ContentsMoved bool + + // When the redirection policy is removed, the folder's content will be moved to the local profileIf true, the folder will be moved back to the local user profile location when policy is removed.If false, the folder will remain in the redirected location after the redirection policy is removed. + ContentsMovedOnPolicyRemoval bool + + // Content is renamed from old to new location in Offline Files cache; assumes data on server is moved between names through other means + ContentsRenamedInLocalCache bool + + // Grant the user exclusive rights to + ExclusiveRightsGranted bool + + // known folder unique id (guid) + FolderId string + + // Do not automatically make redirected folders available offline + MakeFolderAvailableOfflineDisabled bool + + // Redirection Path [may be used when RedirectionType == {0,1} + RedirectionPath string + + // The type of folder redirection to be performed. + RedirectionType FolderRedirection_RedirectionType +} + +func NewWin32_FolderRedirectionEx1(instance *cim.WmiInstance) (newInstance *Win32_FolderRedirection, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_FolderRedirection{ + WmiInstance: tmp, + } + return +} + +func NewWin32_FolderRedirectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_FolderRedirection, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_FolderRedirection{ + WmiInstance: tmp, + } + return +} + +// SetContentsMoved sets the value of ContentsMoved for the instance +func (instance *Win32_FolderRedirection) SetPropertyContentsMoved(value bool) (err error) { + return instance.SetProperty("ContentsMoved", (value)) +} + +// GetContentsMoved gets the value of ContentsMoved for the instance +func (instance *Win32_FolderRedirection) GetPropertyContentsMoved() (value bool, err error) { + retValue, err := instance.GetProperty("ContentsMoved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetContentsMovedOnPolicyRemoval sets the value of ContentsMovedOnPolicyRemoval for the instance +func (instance *Win32_FolderRedirection) SetPropertyContentsMovedOnPolicyRemoval(value bool) (err error) { + return instance.SetProperty("ContentsMovedOnPolicyRemoval", (value)) +} + +// GetContentsMovedOnPolicyRemoval gets the value of ContentsMovedOnPolicyRemoval for the instance +func (instance *Win32_FolderRedirection) GetPropertyContentsMovedOnPolicyRemoval() (value bool, err error) { + retValue, err := instance.GetProperty("ContentsMovedOnPolicyRemoval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetContentsRenamedInLocalCache sets the value of ContentsRenamedInLocalCache for the instance +func (instance *Win32_FolderRedirection) SetPropertyContentsRenamedInLocalCache(value bool) (err error) { + return instance.SetProperty("ContentsRenamedInLocalCache", (value)) +} + +// GetContentsRenamedInLocalCache gets the value of ContentsRenamedInLocalCache for the instance +func (instance *Win32_FolderRedirection) GetPropertyContentsRenamedInLocalCache() (value bool, err error) { + retValue, err := instance.GetProperty("ContentsRenamedInLocalCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExclusiveRightsGranted sets the value of ExclusiveRightsGranted for the instance +func (instance *Win32_FolderRedirection) SetPropertyExclusiveRightsGranted(value bool) (err error) { + return instance.SetProperty("ExclusiveRightsGranted", (value)) +} + +// GetExclusiveRightsGranted gets the value of ExclusiveRightsGranted for the instance +func (instance *Win32_FolderRedirection) GetPropertyExclusiveRightsGranted() (value bool, err error) { + retValue, err := instance.GetProperty("ExclusiveRightsGranted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFolderId sets the value of FolderId for the instance +func (instance *Win32_FolderRedirection) SetPropertyFolderId(value string) (err error) { + return instance.SetProperty("FolderId", (value)) +} + +// GetFolderId gets the value of FolderId for the instance +func (instance *Win32_FolderRedirection) GetPropertyFolderId() (value string, err error) { + retValue, err := instance.GetProperty("FolderId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMakeFolderAvailableOfflineDisabled sets the value of MakeFolderAvailableOfflineDisabled for the instance +func (instance *Win32_FolderRedirection) SetPropertyMakeFolderAvailableOfflineDisabled(value bool) (err error) { + return instance.SetProperty("MakeFolderAvailableOfflineDisabled", (value)) +} + +// GetMakeFolderAvailableOfflineDisabled gets the value of MakeFolderAvailableOfflineDisabled for the instance +func (instance *Win32_FolderRedirection) GetPropertyMakeFolderAvailableOfflineDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("MakeFolderAvailableOfflineDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRedirectionPath sets the value of RedirectionPath for the instance +func (instance *Win32_FolderRedirection) SetPropertyRedirectionPath(value string) (err error) { + return instance.SetProperty("RedirectionPath", (value)) +} + +// GetRedirectionPath gets the value of RedirectionPath for the instance +func (instance *Win32_FolderRedirection) GetPropertyRedirectionPath() (value string, err error) { + retValue, err := instance.GetProperty("RedirectionPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRedirectionType sets the value of RedirectionType for the instance +func (instance *Win32_FolderRedirection) SetPropertyRedirectionType(value FolderRedirection_RedirectionType) (err error) { + return instance.SetProperty("RedirectionType", (value)) +} + +// GetRedirectionType gets the value of RedirectionType for the instance +func (instance *Win32_FolderRedirection) GetPropertyRedirectionType() (value FolderRedirection_RedirectionType, err error) { + retValue, err := instance.GetProperty("RedirectionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = FolderRedirection_RedirectionType(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealth.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealth.go new file mode 100644 index 00000000..5f5c016b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealth.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_FolderRedirectionHealth struct +type Win32_FolderRedirectionHealth struct { + *cim.WmiInstance + + // The health status of this folder, based on the values that were set in the Win32_FolderRedirectionHealthConfiguration properties. + HealthStatus FolderRedirectionHealth_HealthStatus + + // The last time this folder was successfully synchronized to the Offline Files cache. + LastSuccessfulSyncTime string + + // The status of the last attempt to synchronize this folder to the Offline Files cache. + LastSyncStatus FolderRedirectionHealth_LastSyncStatus + + // The last time an attempt was made to synchronized this folder to the Offline Files cache, even if it was unsuccessful. + LastSyncTime string + + // If true, the Offline Files feature is enabled for this folder. + OfflineAccessEnabled bool + + // known folder unique id (guid) + OfflineFileNameFolderGUID string + + // If true, indicate if this folder is being redirected. + Redirected bool +} + +func NewWin32_FolderRedirectionHealthEx1(instance *cim.WmiInstance) (newInstance *Win32_FolderRedirectionHealth, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_FolderRedirectionHealth{ + WmiInstance: tmp, + } + return +} + +func NewWin32_FolderRedirectionHealthEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_FolderRedirectionHealth, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_FolderRedirectionHealth{ + WmiInstance: tmp, + } + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyHealthStatus(value FolderRedirectionHealth_HealthStatus) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyHealthStatus() (value FolderRedirectionHealth_HealthStatus, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = FolderRedirectionHealth_HealthStatus(valuetmp) + + return +} + +// SetLastSuccessfulSyncTime sets the value of LastSuccessfulSyncTime for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyLastSuccessfulSyncTime(value string) (err error) { + return instance.SetProperty("LastSuccessfulSyncTime", (value)) +} + +// GetLastSuccessfulSyncTime gets the value of LastSuccessfulSyncTime for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyLastSuccessfulSyncTime() (value string, err error) { + retValue, err := instance.GetProperty("LastSuccessfulSyncTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastSyncStatus sets the value of LastSyncStatus for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyLastSyncStatus(value FolderRedirectionHealth_LastSyncStatus) (err error) { + return instance.SetProperty("LastSyncStatus", (value)) +} + +// GetLastSyncStatus gets the value of LastSyncStatus for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyLastSyncStatus() (value FolderRedirectionHealth_LastSyncStatus, err error) { + retValue, err := instance.GetProperty("LastSyncStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = FolderRedirectionHealth_LastSyncStatus(valuetmp) + + return +} + +// SetLastSyncTime sets the value of LastSyncTime for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyLastSyncTime(value string) (err error) { + return instance.SetProperty("LastSyncTime", (value)) +} + +// GetLastSyncTime gets the value of LastSyncTime for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyLastSyncTime() (value string, err error) { + retValue, err := instance.GetProperty("LastSyncTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOfflineAccessEnabled sets the value of OfflineAccessEnabled for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyOfflineAccessEnabled(value bool) (err error) { + return instance.SetProperty("OfflineAccessEnabled", (value)) +} + +// GetOfflineAccessEnabled gets the value of OfflineAccessEnabled for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyOfflineAccessEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("OfflineAccessEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOfflineFileNameFolderGUID sets the value of OfflineFileNameFolderGUID for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyOfflineFileNameFolderGUID(value string) (err error) { + return instance.SetProperty("OfflineFileNameFolderGUID", (value)) +} + +// GetOfflineFileNameFolderGUID gets the value of OfflineFileNameFolderGUID for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyOfflineFileNameFolderGUID() (value string, err error) { + retValue, err := instance.GetProperty("OfflineFileNameFolderGUID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRedirected sets the value of Redirected for the instance +func (instance *Win32_FolderRedirectionHealth) SetPropertyRedirected(value bool) (err error) { + return instance.SetProperty("Redirected", (value)) +} + +// GetRedirected gets the value of Redirected for the instance +func (instance *Win32_FolderRedirectionHealth) GetPropertyRedirected() (value bool, err error) { + retValue, err := instance.GetProperty("Redirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealthConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealthConfiguration.go new file mode 100644 index 00000000..18a11174 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionHealthConfiguration.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_FolderRedirectionHealthConfiguration struct +type Win32_FolderRedirectionHealthConfiguration struct { + *cim.WmiInstance + + // Cautious threshold, in hours. If the number of hours since the last attempted synchronization is greater than or equal to this threshold, the HealthStatus property of the Win32_FolderRedirectionHealth class is set to Caution. + LastSyncDurationCautionInHours uint32 + + // Unhealthy threshold, in hours. If the number of hours since the last attempted synchronization is greater than or equal to this threshold, the HealthStatus property of the Win32_FolderRedirectionHealth class is set to Unhealthy. + LastSyncDurationUnhealthyInHours uint32 +} + +func NewWin32_FolderRedirectionHealthConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_FolderRedirectionHealthConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_FolderRedirectionHealthConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_FolderRedirectionHealthConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_FolderRedirectionHealthConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_FolderRedirectionHealthConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetLastSyncDurationCautionInHours sets the value of LastSyncDurationCautionInHours for the instance +func (instance *Win32_FolderRedirectionHealthConfiguration) SetPropertyLastSyncDurationCautionInHours(value uint32) (err error) { + return instance.SetProperty("LastSyncDurationCautionInHours", (value)) +} + +// GetLastSyncDurationCautionInHours gets the value of LastSyncDurationCautionInHours for the instance +func (instance *Win32_FolderRedirectionHealthConfiguration) GetPropertyLastSyncDurationCautionInHours() (value uint32, err error) { + retValue, err := instance.GetProperty("LastSyncDurationCautionInHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLastSyncDurationUnhealthyInHours sets the value of LastSyncDurationUnhealthyInHours for the instance +func (instance *Win32_FolderRedirectionHealthConfiguration) SetPropertyLastSyncDurationUnhealthyInHours(value uint32) (err error) { + return instance.SetProperty("LastSyncDurationUnhealthyInHours", (value)) +} + +// GetLastSyncDurationUnhealthyInHours gets the value of LastSyncDurationUnhealthyInHours for the instance +func (instance *Win32_FolderRedirectionHealthConfiguration) GetPropertyLastSyncDurationUnhealthyInHours() (value uint32, err error) { + retValue, err := instance.GetProperty("LastSyncDurationUnhealthyInHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionUserConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionUserConfiguration.go new file mode 100644 index 00000000..9bb1842d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FolderRedirectionUserConfiguration.go @@ -0,0 +1,501 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_FolderRedirectionUserConfiguration struct +type Win32_FolderRedirectionUserConfiguration struct { + *cim.WmiInstance + + // AppData\Roaming folder, GUID is {3EB685DB-65F9-4CF6-A03A-E3EF65729F3D} + AppDataRoaming Win32_FolderRedirection + + // Contacts folder, GUID is {56784854-C6CB-462b-8169-88E350ACB882} + Contacts Win32_FolderRedirection + + // Desktop folder, GUID is {B4BFCC3A-DB2C-424C-B029-7FE99A87C641} + Desktop Win32_FolderRedirection + + // Documents folder, GUID is {FDD39AD0-238F-46AF-ADB4-6C85480369C7} + Documents Win32_FolderRedirection + + // Downloads folder, GUID is {374DE290-123F-4565-9164-39C4925E467B} + Downloads Win32_FolderRedirection + + // Favorites folder, GUID is {1777F761-68AD-4D8A-87BD-30B759FA33DD} + Favorites Win32_FolderRedirection + + // Indicates if the settings configured through this WMI class are taking affect. + IsConfiguredByWMI bool + + // Links folder, GUID is {BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968} + Links Win32_FolderRedirection + + // Music folder, GUID is {4BD8D571-6D19-48D3-BE97-422220080E43} + Music Win32_FolderRedirection + + // Pictures folder, GUID is {33E28130-4E1E-4676-835A-98395C3BC3BB} + Pictures Win32_FolderRedirection + + // The Primary Computer feature is enabled for this user + PrimaryComputerEnabled bool + + // SavedGames folder, GUID is {4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4} + SavedGames Win32_FolderRedirection + + // Searches folder, GUID is {7D1D3A04-DEBB-4115-95CF-2F29DA2920DA} + Searches Win32_FolderRedirection + + // Start Menu folder, GUID is {625B53C3-AB48-4EC1-BA1F-A1EF4146FC19} + StartMenu Win32_FolderRedirection + + // Videos folder, GUID is {18989B1D-99B5-455B-841C-AB7C74E4DDFC} + Videos Win32_FolderRedirection +} + +func NewWin32_FolderRedirectionUserConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_FolderRedirectionUserConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_FolderRedirectionUserConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_FolderRedirectionUserConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_FolderRedirectionUserConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_FolderRedirectionUserConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetAppDataRoaming sets the value of AppDataRoaming for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyAppDataRoaming(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("AppDataRoaming", (value)) +} + +// GetAppDataRoaming gets the value of AppDataRoaming for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyAppDataRoaming() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("AppDataRoaming") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetContacts sets the value of Contacts for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyContacts(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Contacts", (value)) +} + +// GetContacts gets the value of Contacts for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyContacts() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Contacts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetDesktop sets the value of Desktop for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyDesktop(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Desktop", (value)) +} + +// GetDesktop gets the value of Desktop for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyDesktop() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Desktop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetDocuments sets the value of Documents for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyDocuments(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Documents", (value)) +} + +// GetDocuments gets the value of Documents for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyDocuments() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Documents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetDownloads sets the value of Downloads for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyDownloads(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Downloads", (value)) +} + +// GetDownloads gets the value of Downloads for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyDownloads() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Downloads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetFavorites sets the value of Favorites for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyFavorites(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Favorites", (value)) +} + +// GetFavorites gets the value of Favorites for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyFavorites() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Favorites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetIsConfiguredByWMI sets the value of IsConfiguredByWMI for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyIsConfiguredByWMI(value bool) (err error) { + return instance.SetProperty("IsConfiguredByWMI", (value)) +} + +// GetIsConfiguredByWMI gets the value of IsConfiguredByWMI for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyIsConfiguredByWMI() (value bool, err error) { + retValue, err := instance.GetProperty("IsConfiguredByWMI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLinks sets the value of Links for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyLinks(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Links", (value)) +} + +// GetLinks gets the value of Links for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyLinks() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Links") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetMusic sets the value of Music for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyMusic(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Music", (value)) +} + +// GetMusic gets the value of Music for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyMusic() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Music") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetPictures sets the value of Pictures for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyPictures(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Pictures", (value)) +} + +// GetPictures gets the value of Pictures for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyPictures() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Pictures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetPrimaryComputerEnabled sets the value of PrimaryComputerEnabled for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyPrimaryComputerEnabled(value bool) (err error) { + return instance.SetProperty("PrimaryComputerEnabled", (value)) +} + +// GetPrimaryComputerEnabled gets the value of PrimaryComputerEnabled for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyPrimaryComputerEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("PrimaryComputerEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSavedGames sets the value of SavedGames for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertySavedGames(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("SavedGames", (value)) +} + +// GetSavedGames gets the value of SavedGames for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertySavedGames() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("SavedGames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetSearches sets the value of Searches for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertySearches(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Searches", (value)) +} + +// GetSearches gets the value of Searches for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertySearches() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Searches") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetStartMenu sets the value of StartMenu for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyStartMenu(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("StartMenu", (value)) +} + +// GetStartMenu gets the value of StartMenu for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyStartMenu() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("StartMenu") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} + +// SetVideos sets the value of Videos for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) SetPropertyVideos(value Win32_FolderRedirection) (err error) { + return instance.SetProperty("Videos", (value)) +} + +// GetVideos gets the value of Videos for the instance +func (instance *Win32_FolderRedirectionUserConfiguration) GetPropertyVideos() (value Win32_FolderRedirection, err error) { + retValue, err := instance.GetProperty("Videos") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirection(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FontInfoAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FontInfoAction.go new file mode 100644 index 00000000..f39d5131 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_FontInfoAction.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_FontInfoAction struct +type Win32_FontInfoAction struct { + *CIM_Action + + // + File string + + // + FontTitle string +} + +func NewWin32_FontInfoActionEx1(instance *cim.WmiInstance) (newInstance *Win32_FontInfoAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_FontInfoAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_FontInfoActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_FontInfoAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_FontInfoAction{ + CIM_Action: tmp, + } + return +} + +// SetFile sets the value of File for the instance +func (instance *Win32_FontInfoAction) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *Win32_FontInfoAction) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFontTitle sets the value of FontTitle for the instance +func (instance *Win32_FontInfoAction) SetPropertyFontTitle(value string) (err error) { + return instance.SetProperty("FontTitle", (value)) +} + +// GetFontTitle gets the value of FontTitle for the instance +func (instance *Win32_FontInfoAction) GetPropertyFontTitle() (value string, err error) { + retValue, err := instance.GetProperty("FontTitle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Group.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Group.go new file mode 100644 index 00000000..6509216c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Group.go @@ -0,0 +1,63 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Group struct +type Win32_Group struct { + *Win32_Account +} + +func NewWin32_GroupEx1(instance *cim.WmiInstance) (newInstance *Win32_Group, err error) { + tmp, err := NewWin32_AccountEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Group{ + Win32_Account: tmp, + } + return +} + +func NewWin32_GroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Group, err error) { + tmp, err := NewWin32_AccountEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Group{ + Win32_Account: tmp, + } + return +} + +// + +// + +// +func (instance *Win32_Group) Rename( /* IN */ Name string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Rename", Name) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupInDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupInDomain.go new file mode 100644 index 00000000..d00ae9b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupInDomain.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_GroupInDomain struct +type Win32_GroupInDomain struct { + *CIM_Component +} + +func NewWin32_GroupInDomainEx1(instance *cim.WmiInstance) (newInstance *Win32_GroupInDomain, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_GroupInDomain{ + CIM_Component: tmp, + } + return +} + +func NewWin32_GroupInDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_GroupInDomain, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_GroupInDomain{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupUser.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupUser.go new file mode 100644 index 00000000..217cafe7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_GroupUser.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_GroupUser struct +type Win32_GroupUser struct { + *CIM_Component +} + +func NewWin32_GroupUserEx1(instance *cim.WmiInstance) (newInstance *Win32_GroupUser, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_GroupUser{ + CIM_Component: tmp, + } + return +} + +func NewWin32_GroupUserEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_GroupUser, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_GroupUser{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_HeatPipe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_HeatPipe.go new file mode 100644 index 00000000..d18db200 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_HeatPipe.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_HeatPipe struct +type Win32_HeatPipe struct { + *CIM_HeatPipe +} + +func NewWin32_HeatPipeEx1(instance *cim.WmiInstance) (newInstance *Win32_HeatPipe, err error) { + tmp, err := NewCIM_HeatPipeEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_HeatPipe{ + CIM_HeatPipe: tmp, + } + return +} + +func NewWin32_HeatPipeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_HeatPipe, err error) { + tmp, err := NewCIM_HeatPipeEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_HeatPipe{ + CIM_HeatPipe: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEController.go new file mode 100644 index 00000000..7752ba91 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEController.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_IDEController struct +type Win32_IDEController struct { + *CIM_Controller + + // + Manufacturer string +} + +func NewWin32_IDEControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_IDEController, err error) { + tmp, err := NewCIM_ControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IDEController{ + CIM_Controller: tmp, + } + return +} + +func NewWin32_IDEControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IDEController, err error) { + tmp, err := NewCIM_ControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IDEController{ + CIM_Controller: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_IDEController) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_IDEController) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEControllerDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEControllerDevice.go new file mode 100644 index 00000000..0e78407e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IDEControllerDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_IDEControllerDevice struct +type Win32_IDEControllerDevice struct { + *CIM_ControlledBy +} + +func NewWin32_IDEControllerDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_IDEControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IDEControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} + +func NewWin32_IDEControllerDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IDEControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IDEControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4PersistedRouteTable.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4PersistedRouteTable.go new file mode 100644 index 00000000..615053bf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4PersistedRouteTable.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_IP4PersistedRouteTable struct +type Win32_IP4PersistedRouteTable struct { + *CIM_LogicalElement + + // + Destination string + + // + Mask string + + // + Metric1 int32 + + // + NextHop string +} + +func NewWin32_IP4PersistedRouteTableEx1(instance *cim.WmiInstance) (newInstance *Win32_IP4PersistedRouteTable, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IP4PersistedRouteTable{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_IP4PersistedRouteTableEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IP4PersistedRouteTable, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IP4PersistedRouteTable{ + CIM_LogicalElement: tmp, + } + return +} + +// SetDestination sets the value of Destination for the instance +func (instance *Win32_IP4PersistedRouteTable) SetPropertyDestination(value string) (err error) { + return instance.SetProperty("Destination", (value)) +} + +// GetDestination gets the value of Destination for the instance +func (instance *Win32_IP4PersistedRouteTable) GetPropertyDestination() (value string, err error) { + retValue, err := instance.GetProperty("Destination") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMask sets the value of Mask for the instance +func (instance *Win32_IP4PersistedRouteTable) SetPropertyMask(value string) (err error) { + return instance.SetProperty("Mask", (value)) +} + +// GetMask gets the value of Mask for the instance +func (instance *Win32_IP4PersistedRouteTable) GetPropertyMask() (value string, err error) { + retValue, err := instance.GetProperty("Mask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMetric1 sets the value of Metric1 for the instance +func (instance *Win32_IP4PersistedRouteTable) SetPropertyMetric1(value int32) (err error) { + return instance.SetProperty("Metric1", (value)) +} + +// GetMetric1 gets the value of Metric1 for the instance +func (instance *Win32_IP4PersistedRouteTable) GetPropertyMetric1() (value int32, err error) { + retValue, err := instance.GetProperty("Metric1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetNextHop sets the value of NextHop for the instance +func (instance *Win32_IP4PersistedRouteTable) SetPropertyNextHop(value string) (err error) { + return instance.SetProperty("NextHop", (value)) +} + +// GetNextHop gets the value of NextHop for the instance +func (instance *Win32_IP4PersistedRouteTable) GetPropertyNextHop() (value string, err error) { + retValue, err := instance.GetProperty("NextHop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTable.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTable.go new file mode 100644 index 00000000..e451036a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTable.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_IP4RouteTable struct +type Win32_IP4RouteTable struct { + *CIM_LogicalElement + + // + Age uint32 + + // + Destination string + + // + Information string + + // + InterfaceIndex int32 + + // + Mask string + + // + Metric1 int32 + + // + Metric2 int32 + + // + Metric3 int32 + + // + Metric4 int32 + + // + Metric5 int32 + + // + NextHop string + + // + Protocol uint32 + + // + Type uint32 +} + +func NewWin32_IP4RouteTableEx1(instance *cim.WmiInstance) (newInstance *Win32_IP4RouteTable, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IP4RouteTable{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_IP4RouteTableEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IP4RouteTable, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IP4RouteTable{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAge sets the value of Age for the instance +func (instance *Win32_IP4RouteTable) SetPropertyAge(value uint32) (err error) { + return instance.SetProperty("Age", (value)) +} + +// GetAge gets the value of Age for the instance +func (instance *Win32_IP4RouteTable) GetPropertyAge() (value uint32, err error) { + retValue, err := instance.GetProperty("Age") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDestination sets the value of Destination for the instance +func (instance *Win32_IP4RouteTable) SetPropertyDestination(value string) (err error) { + return instance.SetProperty("Destination", (value)) +} + +// GetDestination gets the value of Destination for the instance +func (instance *Win32_IP4RouteTable) GetPropertyDestination() (value string, err error) { + retValue, err := instance.GetProperty("Destination") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInformation sets the value of Information for the instance +func (instance *Win32_IP4RouteTable) SetPropertyInformation(value string) (err error) { + return instance.SetProperty("Information", (value)) +} + +// GetInformation gets the value of Information for the instance +func (instance *Win32_IP4RouteTable) GetPropertyInformation() (value string, err error) { + retValue, err := instance.GetProperty("Information") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInterfaceIndex sets the value of InterfaceIndex for the instance +func (instance *Win32_IP4RouteTable) SetPropertyInterfaceIndex(value int32) (err error) { + return instance.SetProperty("InterfaceIndex", (value)) +} + +// GetInterfaceIndex gets the value of InterfaceIndex for the instance +func (instance *Win32_IP4RouteTable) GetPropertyInterfaceIndex() (value int32, err error) { + retValue, err := instance.GetProperty("InterfaceIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMask sets the value of Mask for the instance +func (instance *Win32_IP4RouteTable) SetPropertyMask(value string) (err error) { + return instance.SetProperty("Mask", (value)) +} + +// GetMask gets the value of Mask for the instance +func (instance *Win32_IP4RouteTable) GetPropertyMask() (value string, err error) { + retValue, err := instance.GetProperty("Mask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMetric1 sets the value of Metric1 for the instance +func (instance *Win32_IP4RouteTable) SetPropertyMetric1(value int32) (err error) { + return instance.SetProperty("Metric1", (value)) +} + +// GetMetric1 gets the value of Metric1 for the instance +func (instance *Win32_IP4RouteTable) GetPropertyMetric1() (value int32, err error) { + retValue, err := instance.GetProperty("Metric1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMetric2 sets the value of Metric2 for the instance +func (instance *Win32_IP4RouteTable) SetPropertyMetric2(value int32) (err error) { + return instance.SetProperty("Metric2", (value)) +} + +// GetMetric2 gets the value of Metric2 for the instance +func (instance *Win32_IP4RouteTable) GetPropertyMetric2() (value int32, err error) { + retValue, err := instance.GetProperty("Metric2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMetric3 sets the value of Metric3 for the instance +func (instance *Win32_IP4RouteTable) SetPropertyMetric3(value int32) (err error) { + return instance.SetProperty("Metric3", (value)) +} + +// GetMetric3 gets the value of Metric3 for the instance +func (instance *Win32_IP4RouteTable) GetPropertyMetric3() (value int32, err error) { + retValue, err := instance.GetProperty("Metric3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMetric4 sets the value of Metric4 for the instance +func (instance *Win32_IP4RouteTable) SetPropertyMetric4(value int32) (err error) { + return instance.SetProperty("Metric4", (value)) +} + +// GetMetric4 gets the value of Metric4 for the instance +func (instance *Win32_IP4RouteTable) GetPropertyMetric4() (value int32, err error) { + retValue, err := instance.GetProperty("Metric4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMetric5 sets the value of Metric5 for the instance +func (instance *Win32_IP4RouteTable) SetPropertyMetric5(value int32) (err error) { + return instance.SetProperty("Metric5", (value)) +} + +// GetMetric5 gets the value of Metric5 for the instance +func (instance *Win32_IP4RouteTable) GetPropertyMetric5() (value int32, err error) { + retValue, err := instance.GetProperty("Metric5") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetNextHop sets the value of NextHop for the instance +func (instance *Win32_IP4RouteTable) SetPropertyNextHop(value string) (err error) { + return instance.SetProperty("NextHop", (value)) +} + +// GetNextHop gets the value of NextHop for the instance +func (instance *Win32_IP4RouteTable) GetPropertyNextHop() (value string, err error) { + retValue, err := instance.GetProperty("NextHop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProtocol sets the value of Protocol for the instance +func (instance *Win32_IP4RouteTable) SetPropertyProtocol(value uint32) (err error) { + return instance.SetProperty("Protocol", (value)) +} + +// GetProtocol gets the value of Protocol for the instance +func (instance *Win32_IP4RouteTable) GetPropertyProtocol() (value uint32, err error) { + retValue, err := instance.GetProperty("Protocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_IP4RouteTable) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_IP4RouteTable) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTableEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTableEvent.go new file mode 100644 index 00000000..aaa2c75d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IP4RouteTableEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_IP4RouteTableEvent struct +type Win32_IP4RouteTableEvent struct { + *__ExtrinsicEvent +} + +func NewWin32_IP4RouteTableEventEx1(instance *cim.WmiInstance) (newInstance *Win32_IP4RouteTableEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IP4RouteTableEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewWin32_IP4RouteTableEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IP4RouteTableEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IP4RouteTableEvent{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IRQResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IRQResource.go new file mode 100644 index 00000000..6d26ab67 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IRQResource.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_IRQResource struct +type Win32_IRQResource struct { + *CIM_IRQ + + // + Hardware bool + + // + Vector uint32 +} + +func NewWin32_IRQResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_IRQResource, err error) { + tmp, err := NewCIM_IRQEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IRQResource{ + CIM_IRQ: tmp, + } + return +} + +func NewWin32_IRQResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IRQResource, err error) { + tmp, err := NewCIM_IRQEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IRQResource{ + CIM_IRQ: tmp, + } + return +} + +// SetHardware sets the value of Hardware for the instance +func (instance *Win32_IRQResource) SetPropertyHardware(value bool) (err error) { + return instance.SetProperty("Hardware", (value)) +} + +// GetHardware gets the value of Hardware for the instance +func (instance *Win32_IRQResource) GetPropertyHardware() (value bool, err error) { + retValue, err := instance.GetProperty("Hardware") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVector sets the value of Vector for the instance +func (instance *Win32_IRQResource) SetPropertyVector(value uint32) (err error) { + return instance.SetProperty("Vector", (value)) +} + +// GetVector gets the value of Vector for the instance +func (instance *Win32_IRQResource) GetPropertyVector() (value uint32, err error) { + retValue, err := instance.GetProperty("Vector") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ImplementedCategory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ImplementedCategory.go new file mode 100644 index 00000000..b4bee6ea --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ImplementedCategory.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ImplementedCategory struct +type Win32_ImplementedCategory struct { + *cim.WmiInstance + + // + Category Win32_ComponentCategory + + // + Component Win32_ClassicCOMClass +} + +func NewWin32_ImplementedCategoryEx1(instance *cim.WmiInstance) (newInstance *Win32_ImplementedCategory, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ImplementedCategory{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ImplementedCategoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ImplementedCategory, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ImplementedCategory{ + WmiInstance: tmp, + } + return +} + +// SetCategory sets the value of Category for the instance +func (instance *Win32_ImplementedCategory) SetPropertyCategory(value Win32_ComponentCategory) (err error) { + return instance.SetProperty("Category", (value)) +} + +// GetCategory gets the value of Category for the instance +func (instance *Win32_ImplementedCategory) GetPropertyCategory() (value Win32_ComponentCategory, err error) { + retValue, err := instance.GetProperty("Category") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ComponentCategory) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ComponentCategory is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ComponentCategory(valuetmp) + + return +} + +// SetComponent sets the value of Component for the instance +func (instance *Win32_ImplementedCategory) SetPropertyComponent(value Win32_ClassicCOMClass) (err error) { + return instance.SetProperty("Component", (value)) +} + +// GetComponent gets the value of Component for the instance +func (instance *Win32_ImplementedCategory) GetPropertyComponent() (value Win32_ClassicCOMClass, err error) { + retValue, err := instance.GetProperty("Component") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ClassicCOMClass) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ClassicCOMClass is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ClassicCOMClass(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InfraredDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InfraredDevice.go new file mode 100644 index 00000000..308bc5d7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InfraredDevice.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_InfraredDevice struct +type Win32_InfraredDevice struct { + *CIM_InfraredController + + // + Manufacturer string +} + +func NewWin32_InfraredDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_InfraredDevice, err error) { + tmp, err := NewCIM_InfraredControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_InfraredDevice{ + CIM_InfraredController: tmp, + } + return +} + +func NewWin32_InfraredDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_InfraredDevice, err error) { + tmp, err := NewCIM_InfraredControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_InfraredDevice{ + CIM_InfraredController: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_InfraredDevice) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_InfraredDevice) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IniFileSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IniFileSpecification.go new file mode 100644 index 00000000..8efba915 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_IniFileSpecification.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_IniFileSpecification struct +type Win32_IniFileSpecification struct { + *CIM_FileSpecification + + // + Action uint16 + + // + IniFile string + + // + key string + + // + Section string + + // + Value string +} + +func NewWin32_IniFileSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_IniFileSpecification, err error) { + tmp, err := NewCIM_FileSpecificationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_IniFileSpecification{ + CIM_FileSpecification: tmp, + } + return +} + +func NewWin32_IniFileSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_IniFileSpecification, err error) { + tmp, err := NewCIM_FileSpecificationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_IniFileSpecification{ + CIM_FileSpecification: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *Win32_IniFileSpecification) SetPropertyAction(value uint16) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *Win32_IniFileSpecification) GetPropertyAction() (value uint16, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIniFile sets the value of IniFile for the instance +func (instance *Win32_IniFileSpecification) SetPropertyIniFile(value string) (err error) { + return instance.SetProperty("IniFile", (value)) +} + +// GetIniFile gets the value of IniFile for the instance +func (instance *Win32_IniFileSpecification) GetPropertyIniFile() (value string, err error) { + retValue, err := instance.GetProperty("IniFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setkey sets the value of key for the instance +func (instance *Win32_IniFileSpecification) SetPropertykey(value string) (err error) { + return instance.SetProperty("key", (value)) +} + +// Getkey gets the value of key for the instance +func (instance *Win32_IniFileSpecification) GetPropertykey() (value string, err error) { + retValue, err := instance.GetProperty("key") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSection sets the value of Section for the instance +func (instance *Win32_IniFileSpecification) SetPropertySection(value string) (err error) { + return instance.SetProperty("Section", (value)) +} + +// GetSection gets the value of Section for the instance +func (instance *Win32_IniFileSpecification) GetPropertySection() (value string, err error) { + retValue, err := instance.GetProperty("Section") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *Win32_IniFileSpecification) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *Win32_IniFileSpecification) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledProgramFramework.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledProgramFramework.go new file mode 100644 index 00000000..4fae8ad1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledProgramFramework.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_InstalledProgramFramework struct +type Win32_InstalledProgramFramework struct { + *cim.WmiInstance + + // + FrameworkName string + + // + FrameworkPublisher string + + // + FrameworkVersion string + + // + FrameworkVersionActual string + + // + IsPrivate bool + + // + ProgramId string +} + +func NewWin32_InstalledProgramFrameworkEx1(instance *cim.WmiInstance) (newInstance *Win32_InstalledProgramFramework, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_InstalledProgramFramework{ + WmiInstance: tmp, + } + return +} + +func NewWin32_InstalledProgramFrameworkEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_InstalledProgramFramework, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_InstalledProgramFramework{ + WmiInstance: tmp, + } + return +} + +// SetFrameworkName sets the value of FrameworkName for the instance +func (instance *Win32_InstalledProgramFramework) SetPropertyFrameworkName(value string) (err error) { + return instance.SetProperty("FrameworkName", (value)) +} + +// GetFrameworkName gets the value of FrameworkName for the instance +func (instance *Win32_InstalledProgramFramework) GetPropertyFrameworkName() (value string, err error) { + retValue, err := instance.GetProperty("FrameworkName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFrameworkPublisher sets the value of FrameworkPublisher for the instance +func (instance *Win32_InstalledProgramFramework) SetPropertyFrameworkPublisher(value string) (err error) { + return instance.SetProperty("FrameworkPublisher", (value)) +} + +// GetFrameworkPublisher gets the value of FrameworkPublisher for the instance +func (instance *Win32_InstalledProgramFramework) GetPropertyFrameworkPublisher() (value string, err error) { + retValue, err := instance.GetProperty("FrameworkPublisher") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFrameworkVersion sets the value of FrameworkVersion for the instance +func (instance *Win32_InstalledProgramFramework) SetPropertyFrameworkVersion(value string) (err error) { + return instance.SetProperty("FrameworkVersion", (value)) +} + +// GetFrameworkVersion gets the value of FrameworkVersion for the instance +func (instance *Win32_InstalledProgramFramework) GetPropertyFrameworkVersion() (value string, err error) { + retValue, err := instance.GetProperty("FrameworkVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFrameworkVersionActual sets the value of FrameworkVersionActual for the instance +func (instance *Win32_InstalledProgramFramework) SetPropertyFrameworkVersionActual(value string) (err error) { + return instance.SetProperty("FrameworkVersionActual", (value)) +} + +// GetFrameworkVersionActual gets the value of FrameworkVersionActual for the instance +func (instance *Win32_InstalledProgramFramework) GetPropertyFrameworkVersionActual() (value string, err error) { + retValue, err := instance.GetProperty("FrameworkVersionActual") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsPrivate sets the value of IsPrivate for the instance +func (instance *Win32_InstalledProgramFramework) SetPropertyIsPrivate(value bool) (err error) { + return instance.SetProperty("IsPrivate", (value)) +} + +// GetIsPrivate gets the value of IsPrivate for the instance +func (instance *Win32_InstalledProgramFramework) GetPropertyIsPrivate() (value bool, err error) { + retValue, err := instance.GetProperty("IsPrivate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProgramId sets the value of ProgramId for the instance +func (instance *Win32_InstalledProgramFramework) SetPropertyProgramId(value string) (err error) { + return instance.SetProperty("ProgramId", (value)) +} + +// GetProgramId gets the value of ProgramId for the instance +func (instance *Win32_InstalledProgramFramework) GetPropertyProgramId() (value string, err error) { + retValue, err := instance.GetProperty("ProgramId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledSoftwareElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledSoftwareElement.go new file mode 100644 index 00000000..fc8e43dd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledSoftwareElement.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_InstalledSoftwareElement struct +type Win32_InstalledSoftwareElement struct { + *CIM_InstalledSoftwareElement +} + +func NewWin32_InstalledSoftwareElementEx1(instance *cim.WmiInstance) (newInstance *Win32_InstalledSoftwareElement, err error) { + tmp, err := NewCIM_InstalledSoftwareElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_InstalledSoftwareElement{ + CIM_InstalledSoftwareElement: tmp, + } + return +} + +func NewWin32_InstalledSoftwareElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_InstalledSoftwareElement, err error) { + tmp, err := NewCIM_InstalledSoftwareElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_InstalledSoftwareElement{ + CIM_InstalledSoftwareElement: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledStoreProgram.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledStoreProgram.go new file mode 100644 index 00000000..1e3e5427 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledStoreProgram.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_InstalledStoreProgram struct +type Win32_InstalledStoreProgram struct { + *cim.WmiInstance + + // + Architecture string + + // + Language string + + // + Name string + + // + ProgramId string + + // + Vendor string + + // + Version string +} + +func NewWin32_InstalledStoreProgramEx1(instance *cim.WmiInstance) (newInstance *Win32_InstalledStoreProgram, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_InstalledStoreProgram{ + WmiInstance: tmp, + } + return +} + +func NewWin32_InstalledStoreProgramEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_InstalledStoreProgram, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_InstalledStoreProgram{ + WmiInstance: tmp, + } + return +} + +// SetArchitecture sets the value of Architecture for the instance +func (instance *Win32_InstalledStoreProgram) SetPropertyArchitecture(value string) (err error) { + return instance.SetProperty("Architecture", (value)) +} + +// GetArchitecture gets the value of Architecture for the instance +func (instance *Win32_InstalledStoreProgram) GetPropertyArchitecture() (value string, err error) { + retValue, err := instance.GetProperty("Architecture") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLanguage sets the value of Language for the instance +func (instance *Win32_InstalledStoreProgram) SetPropertyLanguage(value string) (err error) { + return instance.SetProperty("Language", (value)) +} + +// GetLanguage gets the value of Language for the instance +func (instance *Win32_InstalledStoreProgram) GetPropertyLanguage() (value string, err error) { + retValue, err := instance.GetProperty("Language") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_InstalledStoreProgram) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_InstalledStoreProgram) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProgramId sets the value of ProgramId for the instance +func (instance *Win32_InstalledStoreProgram) SetPropertyProgramId(value string) (err error) { + return instance.SetProperty("ProgramId", (value)) +} + +// GetProgramId gets the value of ProgramId for the instance +func (instance *Win32_InstalledStoreProgram) GetPropertyProgramId() (value string, err error) { + retValue, err := instance.GetProperty("ProgramId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVendor sets the value of Vendor for the instance +func (instance *Win32_InstalledStoreProgram) SetPropertyVendor(value string) (err error) { + return instance.SetProperty("Vendor", (value)) +} + +// GetVendor gets the value of Vendor for the instance +func (instance *Win32_InstalledStoreProgram) GetPropertyVendor() (value string, err error) { + retValue, err := instance.GetProperty("Vendor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *Win32_InstalledStoreProgram) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *Win32_InstalledStoreProgram) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledWin32Program.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledWin32Program.go new file mode 100644 index 00000000..075dfc40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_InstalledWin32Program.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_InstalledWin32Program struct +type Win32_InstalledWin32Program struct { + *cim.WmiInstance + + // + Language string + + // + MsiPackageCode string + + // + MsiProductCode string + + // + Name string + + // + ProgramId string + + // + Vendor string + + // + Version string +} + +func NewWin32_InstalledWin32ProgramEx1(instance *cim.WmiInstance) (newInstance *Win32_InstalledWin32Program, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_InstalledWin32Program{ + WmiInstance: tmp, + } + return +} + +func NewWin32_InstalledWin32ProgramEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_InstalledWin32Program, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_InstalledWin32Program{ + WmiInstance: tmp, + } + return +} + +// SetLanguage sets the value of Language for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyLanguage(value string) (err error) { + return instance.SetProperty("Language", (value)) +} + +// GetLanguage gets the value of Language for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyLanguage() (value string, err error) { + retValue, err := instance.GetProperty("Language") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMsiPackageCode sets the value of MsiPackageCode for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyMsiPackageCode(value string) (err error) { + return instance.SetProperty("MsiPackageCode", (value)) +} + +// GetMsiPackageCode gets the value of MsiPackageCode for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyMsiPackageCode() (value string, err error) { + retValue, err := instance.GetProperty("MsiPackageCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMsiProductCode sets the value of MsiProductCode for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyMsiProductCode(value string) (err error) { + return instance.SetProperty("MsiProductCode", (value)) +} + +// GetMsiProductCode gets the value of MsiProductCode for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyMsiProductCode() (value string, err error) { + retValue, err := instance.GetProperty("MsiProductCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProgramId sets the value of ProgramId for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyProgramId(value string) (err error) { + return instance.SetProperty("ProgramId", (value)) +} + +// GetProgramId gets the value of ProgramId for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyProgramId() (value string, err error) { + retValue, err := instance.GetProperty("ProgramId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVendor sets the value of Vendor for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyVendor(value string) (err error) { + return instance.SetProperty("Vendor", (value)) +} + +// GetVendor gets the value of Vendor for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyVendor() (value string, err error) { + retValue, err := instance.GetProperty("Vendor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *Win32_InstalledWin32Program) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *Win32_InstalledWin32Program) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_JobObjectStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_JobObjectStatus.go new file mode 100644 index 00000000..254f7fbc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_JobObjectStatus.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_JobObjectStatus struct +type Win32_JobObjectStatus struct { + *__ExtendedStatus + + // + AdditionalDescription string + + // + Win32ErrorCode uint32 +} + +func NewWin32_JobObjectStatusEx1(instance *cim.WmiInstance) (newInstance *Win32_JobObjectStatus, err error) { + tmp, err := New__ExtendedStatusEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_JobObjectStatus{ + __ExtendedStatus: tmp, + } + return +} + +func NewWin32_JobObjectStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_JobObjectStatus, err error) { + tmp, err := New__ExtendedStatusEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_JobObjectStatus{ + __ExtendedStatus: tmp, + } + return +} + +// SetAdditionalDescription sets the value of AdditionalDescription for the instance +func (instance *Win32_JobObjectStatus) SetPropertyAdditionalDescription(value string) (err error) { + return instance.SetProperty("AdditionalDescription", (value)) +} + +// GetAdditionalDescription gets the value of AdditionalDescription for the instance +func (instance *Win32_JobObjectStatus) GetPropertyAdditionalDescription() (value string, err error) { + retValue, err := instance.GetProperty("AdditionalDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWin32ErrorCode sets the value of Win32ErrorCode for the instance +func (instance *Win32_JobObjectStatus) SetPropertyWin32ErrorCode(value uint32) (err error) { + return instance.SetProperty("Win32ErrorCode", (value)) +} + +// GetWin32ErrorCode gets the value of Win32ErrorCode for the instance +func (instance *Win32_JobObjectStatus) GetPropertyWin32ErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("Win32ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Keyboard.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Keyboard.go new file mode 100644 index 00000000..105701c7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Keyboard.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Keyboard struct +type Win32_Keyboard struct { + *CIM_Keyboard +} + +func NewWin32_KeyboardEx1(instance *cim.WmiInstance) (newInstance *Win32_Keyboard, err error) { + tmp, err := NewCIM_KeyboardEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Keyboard{ + CIM_Keyboard: tmp, + } + return +} + +func NewWin32_KeyboardEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Keyboard, err error) { + tmp, err := NewCIM_KeyboardEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Keyboard{ + CIM_Keyboard: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUID.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUID.go new file mode 100644 index 00000000..d6d37a40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUID.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LUID struct +type Win32_LUID struct { + *cim.WmiInstance + + // + HighPart uint32 + + // + LowPart uint32 +} + +func NewWin32_LUIDEx1(instance *cim.WmiInstance) (newInstance *Win32_LUID, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_LUID{ + WmiInstance: tmp, + } + return +} + +func NewWin32_LUIDEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LUID, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LUID{ + WmiInstance: tmp, + } + return +} + +// SetHighPart sets the value of HighPart for the instance +func (instance *Win32_LUID) SetPropertyHighPart(value uint32) (err error) { + return instance.SetProperty("HighPart", (value)) +} + +// GetHighPart gets the value of HighPart for the instance +func (instance *Win32_LUID) GetPropertyHighPart() (value uint32, err error) { + retValue, err := instance.GetProperty("HighPart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowPart sets the value of LowPart for the instance +func (instance *Win32_LUID) SetPropertyLowPart(value uint32) (err error) { + return instance.SetProperty("LowPart", (value)) +} + +// GetLowPart gets the value of LowPart for the instance +func (instance *Win32_LUID) GetPropertyLowPart() (value uint32, err error) { + retValue, err := instance.GetProperty("LowPart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUIDandAttributes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUIDandAttributes.go new file mode 100644 index 00000000..cb1bd8d5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LUIDandAttributes.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LUIDandAttributes struct +type Win32_LUIDandAttributes struct { + *cim.WmiInstance + + // + Attributes uint32 + + // + LUID Win32_LUID +} + +func NewWin32_LUIDandAttributesEx1(instance *cim.WmiInstance) (newInstance *Win32_LUIDandAttributes, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_LUIDandAttributes{ + WmiInstance: tmp, + } + return +} + +func NewWin32_LUIDandAttributesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LUIDandAttributes, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LUIDandAttributes{ + WmiInstance: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_LUIDandAttributes) SetPropertyAttributes(value uint32) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_LUIDandAttributes) GetPropertyAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLUID sets the value of LUID for the instance +func (instance *Win32_LUIDandAttributes) SetPropertyLUID(value Win32_LUID) (err error) { + return instance.SetProperty("LUID", (value)) +} + +// GetLUID gets the value of LUID for the instance +func (instance *Win32_LUIDandAttributes) GetPropertyLUID() (value Win32_LUID, err error) { + retValue, err := instance.GetProperty("LUID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_LUID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_LUID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_LUID(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LaunchCondition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LaunchCondition.go new file mode 100644 index 00000000..2ceb4fbe --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LaunchCondition.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LaunchCondition struct +type Win32_LaunchCondition struct { + *CIM_Check + + // + Condition string +} + +func NewWin32_LaunchConditionEx1(instance *cim.WmiInstance) (newInstance *Win32_LaunchCondition, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LaunchCondition{ + CIM_Check: tmp, + } + return +} + +func NewWin32_LaunchConditionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LaunchCondition, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LaunchCondition{ + CIM_Check: tmp, + } + return +} + +// SetCondition sets the value of Condition for the instance +func (instance *Win32_LaunchCondition) SetPropertyCondition(value string) (err error) { + return instance.SetProperty("Condition", (value)) +} + +// GetCondition gets the value of Condition for the instance +func (instance *Win32_LaunchCondition) GetPropertyCondition() (value string, err error) { + retValue, err := instance.GetProperty("Condition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroup.go new file mode 100644 index 00000000..61577ed6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroup.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LoadOrderGroup struct +type Win32_LoadOrderGroup struct { + *CIM_LogicalElement + + // + DriverEnabled bool + + // + GroupOrder uint32 +} + +func NewWin32_LoadOrderGroupEx1(instance *cim.WmiInstance) (newInstance *Win32_LoadOrderGroup, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LoadOrderGroup{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_LoadOrderGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LoadOrderGroup, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LoadOrderGroup{ + CIM_LogicalElement: tmp, + } + return +} + +// SetDriverEnabled sets the value of DriverEnabled for the instance +func (instance *Win32_LoadOrderGroup) SetPropertyDriverEnabled(value bool) (err error) { + return instance.SetProperty("DriverEnabled", (value)) +} + +// GetDriverEnabled gets the value of DriverEnabled for the instance +func (instance *Win32_LoadOrderGroup) GetPropertyDriverEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("DriverEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetGroupOrder sets the value of GroupOrder for the instance +func (instance *Win32_LoadOrderGroup) SetPropertyGroupOrder(value uint32) (err error) { + return instance.SetProperty("GroupOrder", (value)) +} + +// GetGroupOrder gets the value of GroupOrder for the instance +func (instance *Win32_LoadOrderGroup) GetPropertyGroupOrder() (value uint32, err error) { + retValue, err := instance.GetProperty("GroupOrder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceDependencies.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceDependencies.go new file mode 100644 index 00000000..ff9533a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceDependencies.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LoadOrderGroupServiceDependencies struct +type Win32_LoadOrderGroupServiceDependencies struct { + *CIM_Dependency +} + +func NewWin32_LoadOrderGroupServiceDependenciesEx1(instance *cim.WmiInstance) (newInstance *Win32_LoadOrderGroupServiceDependencies, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LoadOrderGroupServiceDependencies{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_LoadOrderGroupServiceDependenciesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LoadOrderGroupServiceDependencies, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LoadOrderGroupServiceDependencies{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceMembers.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceMembers.go new file mode 100644 index 00000000..be46729f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoadOrderGroupServiceMembers.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LoadOrderGroupServiceMembers struct +type Win32_LoadOrderGroupServiceMembers struct { + *CIM_Component +} + +func NewWin32_LoadOrderGroupServiceMembersEx1(instance *cim.WmiInstance) (newInstance *Win32_LoadOrderGroupServiceMembers, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LoadOrderGroupServiceMembers{ + CIM_Component: tmp, + } + return +} + +func NewWin32_LoadOrderGroupServiceMembersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LoadOrderGroupServiceMembers, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LoadOrderGroupServiceMembers{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LocalTime.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LocalTime.go new file mode 100644 index 00000000..1834560f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LocalTime.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LocalTime struct +type Win32_LocalTime struct { + *Win32_CurrentTime +} + +func NewWin32_LocalTimeEx1(instance *cim.WmiInstance) (newInstance *Win32_LocalTime, err error) { + tmp, err := NewWin32_CurrentTimeEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LocalTime{ + Win32_CurrentTime: tmp, + } + return +} + +func NewWin32_LocalTimeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LocalTime, err error) { + tmp, err := NewWin32_CurrentTimeEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LocalTime{ + Win32_CurrentTime: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoggedOnUser.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoggedOnUser.go new file mode 100644 index 00000000..584c8745 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LoggedOnUser.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LoggedOnUser struct +type Win32_LoggedOnUser struct { + *CIM_Dependency +} + +func NewWin32_LoggedOnUserEx1(instance *cim.WmiInstance) (newInstance *Win32_LoggedOnUser, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LoggedOnUser{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_LoggedOnUserEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LoggedOnUser, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LoggedOnUser{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDisk.go new file mode 100644 index 00000000..47c96bce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDisk.go @@ -0,0 +1,525 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LogicalDisk struct +type Win32_LogicalDisk struct { + *CIM_LogicalDisk + + // + Compressed bool + + // + DriveType uint32 + + // + FileSystem string + + // + MaximumComponentLength uint32 + + // + MediaType uint32 + + // + ProviderName string + + // + QuotasDisabled bool + + // + QuotasIncomplete bool + + // + QuotasRebuilding bool + + // + SupportsDiskQuotas bool + + // + SupportsFileBasedCompression bool + + // + VolumeDirty bool + + // + VolumeName string + + // + VolumeSerialNumber string +} + +func NewWin32_LogicalDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalDisk, err error) { + tmp, err := NewCIM_LogicalDiskEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalDisk{ + CIM_LogicalDisk: tmp, + } + return +} + +func NewWin32_LogicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalDisk, err error) { + tmp, err := NewCIM_LogicalDiskEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalDisk{ + CIM_LogicalDisk: tmp, + } + return +} + +// SetCompressed sets the value of Compressed for the instance +func (instance *Win32_LogicalDisk) SetPropertyCompressed(value bool) (err error) { + return instance.SetProperty("Compressed", (value)) +} + +// GetCompressed gets the value of Compressed for the instance +func (instance *Win32_LogicalDisk) GetPropertyCompressed() (value bool, err error) { + retValue, err := instance.GetProperty("Compressed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDriveType sets the value of DriveType for the instance +func (instance *Win32_LogicalDisk) SetPropertyDriveType(value uint32) (err error) { + return instance.SetProperty("DriveType", (value)) +} + +// GetDriveType gets the value of DriveType for the instance +func (instance *Win32_LogicalDisk) GetPropertyDriveType() (value uint32, err error) { + retValue, err := instance.GetProperty("DriveType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileSystem sets the value of FileSystem for the instance +func (instance *Win32_LogicalDisk) SetPropertyFileSystem(value string) (err error) { + return instance.SetProperty("FileSystem", (value)) +} + +// GetFileSystem gets the value of FileSystem for the instance +func (instance *Win32_LogicalDisk) GetPropertyFileSystem() (value string, err error) { + retValue, err := instance.GetProperty("FileSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumComponentLength sets the value of MaximumComponentLength for the instance +func (instance *Win32_LogicalDisk) SetPropertyMaximumComponentLength(value uint32) (err error) { + return instance.SetProperty("MaximumComponentLength", (value)) +} + +// GetMaximumComponentLength gets the value of MaximumComponentLength for the instance +func (instance *Win32_LogicalDisk) GetPropertyMaximumComponentLength() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumComponentLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *Win32_LogicalDisk) SetPropertyMediaType(value uint32) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *Win32_LogicalDisk) GetPropertyMediaType() (value uint32, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *Win32_LogicalDisk) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *Win32_LogicalDisk) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuotasDisabled sets the value of QuotasDisabled for the instance +func (instance *Win32_LogicalDisk) SetPropertyQuotasDisabled(value bool) (err error) { + return instance.SetProperty("QuotasDisabled", (value)) +} + +// GetQuotasDisabled gets the value of QuotasDisabled for the instance +func (instance *Win32_LogicalDisk) GetPropertyQuotasDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasIncomplete sets the value of QuotasIncomplete for the instance +func (instance *Win32_LogicalDisk) SetPropertyQuotasIncomplete(value bool) (err error) { + return instance.SetProperty("QuotasIncomplete", (value)) +} + +// GetQuotasIncomplete gets the value of QuotasIncomplete for the instance +func (instance *Win32_LogicalDisk) GetPropertyQuotasIncomplete() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasIncomplete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasRebuilding sets the value of QuotasRebuilding for the instance +func (instance *Win32_LogicalDisk) SetPropertyQuotasRebuilding(value bool) (err error) { + return instance.SetProperty("QuotasRebuilding", (value)) +} + +// GetQuotasRebuilding gets the value of QuotasRebuilding for the instance +func (instance *Win32_LogicalDisk) GetPropertyQuotasRebuilding() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasRebuilding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsDiskQuotas sets the value of SupportsDiskQuotas for the instance +func (instance *Win32_LogicalDisk) SetPropertySupportsDiskQuotas(value bool) (err error) { + return instance.SetProperty("SupportsDiskQuotas", (value)) +} + +// GetSupportsDiskQuotas gets the value of SupportsDiskQuotas for the instance +func (instance *Win32_LogicalDisk) GetPropertySupportsDiskQuotas() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDiskQuotas") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFileBasedCompression sets the value of SupportsFileBasedCompression for the instance +func (instance *Win32_LogicalDisk) SetPropertySupportsFileBasedCompression(value bool) (err error) { + return instance.SetProperty("SupportsFileBasedCompression", (value)) +} + +// GetSupportsFileBasedCompression gets the value of SupportsFileBasedCompression for the instance +func (instance *Win32_LogicalDisk) GetPropertySupportsFileBasedCompression() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFileBasedCompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVolumeDirty sets the value of VolumeDirty for the instance +func (instance *Win32_LogicalDisk) SetPropertyVolumeDirty(value bool) (err error) { + return instance.SetProperty("VolumeDirty", (value)) +} + +// GetVolumeDirty gets the value of VolumeDirty for the instance +func (instance *Win32_LogicalDisk) GetPropertyVolumeDirty() (value bool, err error) { + retValue, err := instance.GetProperty("VolumeDirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVolumeName sets the value of VolumeName for the instance +func (instance *Win32_LogicalDisk) SetPropertyVolumeName(value string) (err error) { + return instance.SetProperty("VolumeName", (value)) +} + +// GetVolumeName gets the value of VolumeName for the instance +func (instance *Win32_LogicalDisk) GetPropertyVolumeName() (value string, err error) { + retValue, err := instance.GetProperty("VolumeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVolumeSerialNumber sets the value of VolumeSerialNumber for the instance +func (instance *Win32_LogicalDisk) SetPropertyVolumeSerialNumber(value string) (err error) { + return instance.SetProperty("VolumeSerialNumber", (value)) +} + +// GetVolumeSerialNumber gets the value of VolumeSerialNumber for the instance +func (instance *Win32_LogicalDisk) GetPropertyVolumeSerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("VolumeSerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +// +// +// +// + +// +func (instance *Win32_LogicalDisk) Chkdsk( /* IN */ FixErrors bool, + /* IN */ VigorousIndexCheck bool, + /* IN */ SkipFolderCycle bool, + /* IN */ ForceDismount bool, + /* IN */ RecoverBadSectors bool, + /* IN */ OkToRunAtBootUp bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Chkdsk", FixErrors, VigorousIndexCheck, SkipFolderCycle, ForceDismount, RecoverBadSectors, OkToRunAtBootUp) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_LogicalDisk) ScheduleAutoChk( /* IN */ LogicalDisk []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ScheduleAutoChk", LogicalDisk) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_LogicalDisk) ExcludeFromAutochk( /* IN */ LogicalDisk []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ExcludeFromAutochk", LogicalDisk) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskRootDirectory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskRootDirectory.go new file mode 100644 index 00000000..80fe49fd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskRootDirectory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalDiskRootDirectory struct +type Win32_LogicalDiskRootDirectory struct { + *CIM_Component +} + +func NewWin32_LogicalDiskRootDirectoryEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalDiskRootDirectory, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalDiskRootDirectory{ + CIM_Component: tmp, + } + return +} + +func NewWin32_LogicalDiskRootDirectoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalDiskRootDirectory, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalDiskRootDirectory{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskToPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskToPartition.go new file mode 100644 index 00000000..d14cbb1d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalDiskToPartition.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalDiskToPartition struct +type Win32_LogicalDiskToPartition struct { + *CIM_LogicalDiskBasedOnPartition +} + +func NewWin32_LogicalDiskToPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalDiskToPartition, err error) { + tmp, err := NewCIM_LogicalDiskBasedOnPartitionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalDiskToPartition{ + CIM_LogicalDiskBasedOnPartition: tmp, + } + return +} + +func NewWin32_LogicalDiskToPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalDiskToPartition, err error) { + tmp, err := NewCIM_LogicalDiskBasedOnPartitionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalDiskToPartition{ + CIM_LogicalDiskBasedOnPartition: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAccess.go new file mode 100644 index 00000000..71299bb5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAccess.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalFileAccess struct +type Win32_LogicalFileAccess struct { + *Win32_SecuritySettingAccess +} + +func NewWin32_LogicalFileAccessEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalFileAccess, err error) { + tmp, err := NewWin32_SecuritySettingAccessEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileAccess{ + Win32_SecuritySettingAccess: tmp, + } + return +} + +func NewWin32_LogicalFileAccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalFileAccess, err error) { + tmp, err := NewWin32_SecuritySettingAccessEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileAccess{ + Win32_SecuritySettingAccess: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAuditing.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAuditing.go new file mode 100644 index 00000000..3b563749 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileAuditing.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalFileAuditing struct +type Win32_LogicalFileAuditing struct { + *Win32_SecuritySettingAuditing +} + +func NewWin32_LogicalFileAuditingEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalFileAuditing, err error) { + tmp, err := NewWin32_SecuritySettingAuditingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileAuditing{ + Win32_SecuritySettingAuditing: tmp, + } + return +} + +func NewWin32_LogicalFileAuditingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalFileAuditing, err error) { + tmp, err := NewWin32_SecuritySettingAuditingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileAuditing{ + Win32_SecuritySettingAuditing: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileGroup.go new file mode 100644 index 00000000..f5275df8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileGroup.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalFileGroup struct +type Win32_LogicalFileGroup struct { + *Win32_SecuritySettingGroup +} + +func NewWin32_LogicalFileGroupEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalFileGroup, err error) { + tmp, err := NewWin32_SecuritySettingGroupEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileGroup{ + Win32_SecuritySettingGroup: tmp, + } + return +} + +func NewWin32_LogicalFileGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalFileGroup, err error) { + tmp, err := NewWin32_SecuritySettingGroupEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileGroup{ + Win32_SecuritySettingGroup: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileOwner.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileOwner.go new file mode 100644 index 00000000..57fe23f4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileOwner.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalFileOwner struct +type Win32_LogicalFileOwner struct { + *Win32_SecuritySettingOwner +} + +func NewWin32_LogicalFileOwnerEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalFileOwner, err error) { + tmp, err := NewWin32_SecuritySettingOwnerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileOwner{ + Win32_SecuritySettingOwner: tmp, + } + return +} + +func NewWin32_LogicalFileOwnerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalFileOwner, err error) { + tmp, err := NewWin32_SecuritySettingOwnerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileOwner{ + Win32_SecuritySettingOwner: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileSecuritySetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileSecuritySetting.go new file mode 100644 index 00000000..c475a1d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalFileSecuritySetting.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LogicalFileSecuritySetting struct +type Win32_LogicalFileSecuritySetting struct { + *Win32_SecuritySetting + + // + OwnerPermissions bool + + // + Path string +} + +func NewWin32_LogicalFileSecuritySettingEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalFileSecuritySetting, err error) { + tmp, err := NewWin32_SecuritySettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileSecuritySetting{ + Win32_SecuritySetting: tmp, + } + return +} + +func NewWin32_LogicalFileSecuritySettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalFileSecuritySetting, err error) { + tmp, err := NewWin32_SecuritySettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalFileSecuritySetting{ + Win32_SecuritySetting: tmp, + } + return +} + +// SetOwnerPermissions sets the value of OwnerPermissions for the instance +func (instance *Win32_LogicalFileSecuritySetting) SetPropertyOwnerPermissions(value bool) (err error) { + return instance.SetProperty("OwnerPermissions", (value)) +} + +// GetOwnerPermissions gets the value of OwnerPermissions for the instance +func (instance *Win32_LogicalFileSecuritySetting) GetPropertyOwnerPermissions() (value bool, err error) { + retValue, err := instance.GetProperty("OwnerPermissions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPath sets the value of Path for the instance +func (instance *Win32_LogicalFileSecuritySetting) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *Win32_LogicalFileSecuritySetting) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroup.go new file mode 100644 index 00000000..b486b23c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroup.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LogicalProgramGroup struct +type Win32_LogicalProgramGroup struct { + *Win32_ProgramGroupOrItem + + // + GroupName string + + // + UserName string +} + +func NewWin32_LogicalProgramGroupEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalProgramGroup, err error) { + tmp, err := NewWin32_ProgramGroupOrItemEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroup{ + Win32_ProgramGroupOrItem: tmp, + } + return +} + +func NewWin32_LogicalProgramGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalProgramGroup, err error) { + tmp, err := NewWin32_ProgramGroupOrItemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroup{ + Win32_ProgramGroupOrItem: tmp, + } + return +} + +// SetGroupName sets the value of GroupName for the instance +func (instance *Win32_LogicalProgramGroup) SetPropertyGroupName(value string) (err error) { + return instance.SetProperty("GroupName", (value)) +} + +// GetGroupName gets the value of GroupName for the instance +func (instance *Win32_LogicalProgramGroup) GetPropertyGroupName() (value string, err error) { + retValue, err := instance.GetProperty("GroupName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserName sets the value of UserName for the instance +func (instance *Win32_LogicalProgramGroup) SetPropertyUserName(value string) (err error) { + return instance.SetProperty("UserName", (value)) +} + +// GetUserName gets the value of UserName for the instance +func (instance *Win32_LogicalProgramGroup) GetPropertyUserName() (value string, err error) { + retValue, err := instance.GetProperty("UserName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupDirectory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupDirectory.go new file mode 100644 index 00000000..7fb3a8f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupDirectory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalProgramGroupDirectory struct +type Win32_LogicalProgramGroupDirectory struct { + *CIM_Dependency +} + +func NewWin32_LogicalProgramGroupDirectoryEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalProgramGroupDirectory, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroupDirectory{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_LogicalProgramGroupDirectoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalProgramGroupDirectory, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroupDirectory{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItem.go new file mode 100644 index 00000000..df99e89b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalProgramGroupItem struct +type Win32_LogicalProgramGroupItem struct { + *Win32_ProgramGroupOrItem +} + +func NewWin32_LogicalProgramGroupItemEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalProgramGroupItem, err error) { + tmp, err := NewWin32_ProgramGroupOrItemEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroupItem{ + Win32_ProgramGroupOrItem: tmp, + } + return +} + +func NewWin32_LogicalProgramGroupItemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalProgramGroupItem, err error) { + tmp, err := NewWin32_ProgramGroupOrItemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroupItem{ + Win32_ProgramGroupOrItem: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItemDataFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItemDataFile.go new file mode 100644 index 00000000..53815def --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalProgramGroupItemDataFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalProgramGroupItemDataFile struct +type Win32_LogicalProgramGroupItemDataFile struct { + *CIM_Dependency +} + +func NewWin32_LogicalProgramGroupItemDataFileEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalProgramGroupItemDataFile, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroupItemDataFile{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_LogicalProgramGroupItemDataFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalProgramGroupItemDataFile, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalProgramGroupItemDataFile{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAccess.go new file mode 100644 index 00000000..2b7400fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAccess.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalShareAccess struct +type Win32_LogicalShareAccess struct { + *Win32_SecuritySettingAccess +} + +func NewWin32_LogicalShareAccessEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalShareAccess, err error) { + tmp, err := NewWin32_SecuritySettingAccessEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalShareAccess{ + Win32_SecuritySettingAccess: tmp, + } + return +} + +func NewWin32_LogicalShareAccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalShareAccess, err error) { + tmp, err := NewWin32_SecuritySettingAccessEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalShareAccess{ + Win32_SecuritySettingAccess: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAuditing.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAuditing.go new file mode 100644 index 00000000..5f1e24f2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareAuditing.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogicalShareAuditing struct +type Win32_LogicalShareAuditing struct { + *Win32_SecuritySettingAuditing +} + +func NewWin32_LogicalShareAuditingEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalShareAuditing, err error) { + tmp, err := NewWin32_SecuritySettingAuditingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalShareAuditing{ + Win32_SecuritySettingAuditing: tmp, + } + return +} + +func NewWin32_LogicalShareAuditingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalShareAuditing, err error) { + tmp, err := NewWin32_SecuritySettingAuditingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalShareAuditing{ + Win32_SecuritySettingAuditing: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareSecuritySetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareSecuritySetting.go new file mode 100644 index 00000000..b644b0fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogicalShareSecuritySetting.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LogicalShareSecuritySetting struct +type Win32_LogicalShareSecuritySetting struct { + *Win32_SecuritySetting + + // + Name string +} + +func NewWin32_LogicalShareSecuritySettingEx1(instance *cim.WmiInstance) (newInstance *Win32_LogicalShareSecuritySetting, err error) { + tmp, err := NewWin32_SecuritySettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogicalShareSecuritySetting{ + Win32_SecuritySetting: tmp, + } + return +} + +func NewWin32_LogicalShareSecuritySettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogicalShareSecuritySetting, err error) { + tmp, err := NewWin32_SecuritySettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogicalShareSecuritySetting{ + Win32_SecuritySetting: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_LogicalShareSecuritySetting) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_LogicalShareSecuritySetting) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSession.go new file mode 100644 index 00000000..92991da6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSession.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_LogonSession struct +type Win32_LogonSession struct { + *Win32_Session + + // + AuthenticationPackage string + + // + LogonId string + + // + LogonType uint32 +} + +func NewWin32_LogonSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_LogonSession, err error) { + tmp, err := NewWin32_SessionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogonSession{ + Win32_Session: tmp, + } + return +} + +func NewWin32_LogonSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogonSession, err error) { + tmp, err := NewWin32_SessionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogonSession{ + Win32_Session: tmp, + } + return +} + +// SetAuthenticationPackage sets the value of AuthenticationPackage for the instance +func (instance *Win32_LogonSession) SetPropertyAuthenticationPackage(value string) (err error) { + return instance.SetProperty("AuthenticationPackage", (value)) +} + +// GetAuthenticationPackage gets the value of AuthenticationPackage for the instance +func (instance *Win32_LogonSession) GetPropertyAuthenticationPackage() (value string, err error) { + retValue, err := instance.GetProperty("AuthenticationPackage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLogonId sets the value of LogonId for the instance +func (instance *Win32_LogonSession) SetPropertyLogonId(value string) (err error) { + return instance.SetProperty("LogonId", (value)) +} + +// GetLogonId gets the value of LogonId for the instance +func (instance *Win32_LogonSession) GetPropertyLogonId() (value string, err error) { + retValue, err := instance.GetProperty("LogonId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLogonType sets the value of LogonType for the instance +func (instance *Win32_LogonSession) SetPropertyLogonType(value uint32) (err error) { + return instance.SetProperty("LogonType", (value)) +} + +// GetLogonType gets the value of LogonType for the instance +func (instance *Win32_LogonSession) GetPropertyLogonType() (value uint32, err error) { + retValue, err := instance.GetProperty("LogonType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSessionMappedDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSessionMappedDisk.go new file mode 100644 index 00000000..3ac01416 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_LogonSessionMappedDisk.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_LogonSessionMappedDisk struct +type Win32_LogonSessionMappedDisk struct { + *CIM_Dependency +} + +func NewWin32_LogonSessionMappedDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_LogonSessionMappedDisk, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_LogonSessionMappedDisk{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_LogonSessionMappedDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_LogonSessionMappedDisk, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_LogonSessionMappedDisk{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MIMEInfoAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MIMEInfoAction.go new file mode 100644 index 00000000..4b38205f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MIMEInfoAction.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MIMEInfoAction struct +type Win32_MIMEInfoAction struct { + *CIM_Action + + // + CLSID string + + // + ContentType string + + // + Extension string +} + +func NewWin32_MIMEInfoActionEx1(instance *cim.WmiInstance) (newInstance *Win32_MIMEInfoAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MIMEInfoAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_MIMEInfoActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MIMEInfoAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MIMEInfoAction{ + CIM_Action: tmp, + } + return +} + +// SetCLSID sets the value of CLSID for the instance +func (instance *Win32_MIMEInfoAction) SetPropertyCLSID(value string) (err error) { + return instance.SetProperty("CLSID", (value)) +} + +// GetCLSID gets the value of CLSID for the instance +func (instance *Win32_MIMEInfoAction) GetPropertyCLSID() (value string, err error) { + retValue, err := instance.GetProperty("CLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetContentType sets the value of ContentType for the instance +func (instance *Win32_MIMEInfoAction) SetPropertyContentType(value string) (err error) { + return instance.SetProperty("ContentType", (value)) +} + +// GetContentType gets the value of ContentType for the instance +func (instance *Win32_MIMEInfoAction) GetPropertyContentType() (value string, err error) { + retValue, err := instance.GetProperty("ContentType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExtension sets the value of Extension for the instance +func (instance *Win32_MIMEInfoAction) SetPropertyExtension(value string) (err error) { + return instance.SetProperty("Extension", (value)) +} + +// GetExtension gets the value of Extension for the instance +func (instance *Win32_MIMEInfoAction) GetPropertyExtension() (value string, err error) { + retValue, err := instance.GetProperty("Extension") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MSIResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MSIResource.go new file mode 100644 index 00000000..da034a96 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MSIResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_MSIResource struct +type Win32_MSIResource struct { + *CIM_Setting +} + +func NewWin32_MSIResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_MSIResource, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MSIResource{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_MSIResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MSIResource, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MSIResource{ + CIM_Setting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ManagedSystemElementResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ManagedSystemElementResource.go new file mode 100644 index 00000000..e1fc6c5e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ManagedSystemElementResource.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ManagedSystemElementResource struct +type Win32_ManagedSystemElementResource struct { + *cim.WmiInstance +} + +func NewWin32_ManagedSystemElementResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_ManagedSystemElementResource, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ManagedSystemElementResource{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ManagedSystemElementResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ManagedSystemElementResource, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ManagedSystemElementResource{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MappedLogicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MappedLogicalDisk.go new file mode 100644 index 00000000..f956b6ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MappedLogicalDisk.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MappedLogicalDisk struct +type Win32_MappedLogicalDisk struct { + *CIM_LogicalDisk + + // + Compressed bool + + // + FileSystem string + + // + MaximumComponentLength uint32 + + // + ProviderName string + + // + QuotasDisabled bool + + // + QuotasIncomplete bool + + // + QuotasRebuilding bool + + // + SessionID string + + // + SupportsDiskQuotas bool + + // + SupportsFileBasedCompression bool + + // + VolumeName string + + // + VolumeSerialNumber string +} + +func NewWin32_MappedLogicalDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_MappedLogicalDisk, err error) { + tmp, err := NewCIM_LogicalDiskEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MappedLogicalDisk{ + CIM_LogicalDisk: tmp, + } + return +} + +func NewWin32_MappedLogicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MappedLogicalDisk, err error) { + tmp, err := NewCIM_LogicalDiskEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MappedLogicalDisk{ + CIM_LogicalDisk: tmp, + } + return +} + +// SetCompressed sets the value of Compressed for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyCompressed(value bool) (err error) { + return instance.SetProperty("Compressed", (value)) +} + +// GetCompressed gets the value of Compressed for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyCompressed() (value bool, err error) { + retValue, err := instance.GetProperty("Compressed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFileSystem sets the value of FileSystem for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyFileSystem(value string) (err error) { + return instance.SetProperty("FileSystem", (value)) +} + +// GetFileSystem gets the value of FileSystem for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyFileSystem() (value string, err error) { + retValue, err := instance.GetProperty("FileSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumComponentLength sets the value of MaximumComponentLength for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyMaximumComponentLength(value uint32) (err error) { + return instance.SetProperty("MaximumComponentLength", (value)) +} + +// GetMaximumComponentLength gets the value of MaximumComponentLength for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyMaximumComponentLength() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumComponentLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuotasDisabled sets the value of QuotasDisabled for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyQuotasDisabled(value bool) (err error) { + return instance.SetProperty("QuotasDisabled", (value)) +} + +// GetQuotasDisabled gets the value of QuotasDisabled for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyQuotasDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasIncomplete sets the value of QuotasIncomplete for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyQuotasIncomplete(value bool) (err error) { + return instance.SetProperty("QuotasIncomplete", (value)) +} + +// GetQuotasIncomplete gets the value of QuotasIncomplete for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyQuotasIncomplete() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasIncomplete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasRebuilding sets the value of QuotasRebuilding for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyQuotasRebuilding(value bool) (err error) { + return instance.SetProperty("QuotasRebuilding", (value)) +} + +// GetQuotasRebuilding gets the value of QuotasRebuilding for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyQuotasRebuilding() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasRebuilding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSessionID sets the value of SessionID for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertySessionID(value string) (err error) { + return instance.SetProperty("SessionID", (value)) +} + +// GetSessionID gets the value of SessionID for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertySessionID() (value string, err error) { + retValue, err := instance.GetProperty("SessionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportsDiskQuotas sets the value of SupportsDiskQuotas for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertySupportsDiskQuotas(value bool) (err error) { + return instance.SetProperty("SupportsDiskQuotas", (value)) +} + +// GetSupportsDiskQuotas gets the value of SupportsDiskQuotas for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertySupportsDiskQuotas() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDiskQuotas") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFileBasedCompression sets the value of SupportsFileBasedCompression for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertySupportsFileBasedCompression(value bool) (err error) { + return instance.SetProperty("SupportsFileBasedCompression", (value)) +} + +// GetSupportsFileBasedCompression gets the value of SupportsFileBasedCompression for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertySupportsFileBasedCompression() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFileBasedCompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVolumeName sets the value of VolumeName for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyVolumeName(value string) (err error) { + return instance.SetProperty("VolumeName", (value)) +} + +// GetVolumeName gets the value of VolumeName for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyVolumeName() (value string, err error) { + retValue, err := instance.GetProperty("VolumeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVolumeSerialNumber sets the value of VolumeSerialNumber for the instance +func (instance *Win32_MappedLogicalDisk) SetPropertyVolumeSerialNumber(value string) (err error) { + return instance.SetProperty("VolumeSerialNumber", (value)) +} + +// GetVolumeSerialNumber gets the value of VolumeSerialNumber for the instance +func (instance *Win32_MappedLogicalDisk) GetPropertyVolumeSerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("VolumeSerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArray.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArray.go new file mode 100644 index 00000000..7ce3f22e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArray.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MemoryArray struct +type Win32_MemoryArray struct { + *Win32_SMBIOSMemory + + // + ErrorGranularity uint16 +} + +func NewWin32_MemoryArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_MemoryArray, err error) { + tmp, err := NewWin32_SMBIOSMemoryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MemoryArray{ + Win32_SMBIOSMemory: tmp, + } + return +} + +func NewWin32_MemoryArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MemoryArray, err error) { + tmp, err := NewWin32_SMBIOSMemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MemoryArray{ + Win32_SMBIOSMemory: tmp, + } + return +} + +// SetErrorGranularity sets the value of ErrorGranularity for the instance +func (instance *Win32_MemoryArray) SetPropertyErrorGranularity(value uint16) (err error) { + return instance.SetProperty("ErrorGranularity", (value)) +} + +// GetErrorGranularity gets the value of ErrorGranularity for the instance +func (instance *Win32_MemoryArray) GetPropertyErrorGranularity() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorGranularity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArrayLocation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArrayLocation.go new file mode 100644 index 00000000..8ff55aa9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryArrayLocation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_MemoryArrayLocation struct +type Win32_MemoryArrayLocation struct { + *CIM_Realizes +} + +func NewWin32_MemoryArrayLocationEx1(instance *cim.WmiInstance) (newInstance *Win32_MemoryArrayLocation, err error) { + tmp, err := NewCIM_RealizesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MemoryArrayLocation{ + CIM_Realizes: tmp, + } + return +} + +func NewWin32_MemoryArrayLocationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MemoryArrayLocation, err error) { + tmp, err := NewCIM_RealizesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MemoryArrayLocation{ + CIM_Realizes: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDevice.go new file mode 100644 index 00000000..888ad782 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDevice.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MemoryDevice struct +type Win32_MemoryDevice struct { + *Win32_SMBIOSMemory + + // + ErrorGranularity uint16 +} + +func NewWin32_MemoryDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_MemoryDevice, err error) { + tmp, err := NewWin32_SMBIOSMemoryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MemoryDevice{ + Win32_SMBIOSMemory: tmp, + } + return +} + +func NewWin32_MemoryDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MemoryDevice, err error) { + tmp, err := NewWin32_SMBIOSMemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MemoryDevice{ + Win32_SMBIOSMemory: tmp, + } + return +} + +// SetErrorGranularity sets the value of ErrorGranularity for the instance +func (instance *Win32_MemoryDevice) SetPropertyErrorGranularity(value uint16) (err error) { + return instance.SetProperty("ErrorGranularity", (value)) +} + +// GetErrorGranularity gets the value of ErrorGranularity for the instance +func (instance *Win32_MemoryDevice) GetPropertyErrorGranularity() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorGranularity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceArray.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceArray.go new file mode 100644 index 00000000..e317f6b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceArray.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_MemoryDeviceArray struct +type Win32_MemoryDeviceArray struct { + *CIM_Component +} + +func NewWin32_MemoryDeviceArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_MemoryDeviceArray, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MemoryDeviceArray{ + CIM_Component: tmp, + } + return +} + +func NewWin32_MemoryDeviceArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MemoryDeviceArray, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MemoryDeviceArray{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceLocation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceLocation.go new file mode 100644 index 00000000..007df67c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MemoryDeviceLocation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_MemoryDeviceLocation struct +type Win32_MemoryDeviceLocation struct { + *CIM_Realizes +} + +func NewWin32_MemoryDeviceLocationEx1(instance *cim.WmiInstance) (newInstance *Win32_MemoryDeviceLocation, err error) { + tmp, err := NewCIM_RealizesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MemoryDeviceLocation{ + CIM_Realizes: tmp, + } + return +} + +func NewWin32_MemoryDeviceLocationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MemoryDeviceLocation, err error) { + tmp, err := NewCIM_RealizesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MemoryDeviceLocation{ + CIM_Realizes: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MethodParameterClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MethodParameterClass.go new file mode 100644 index 00000000..271dfafa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MethodParameterClass.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_MethodParameterClass struct +type Win32_MethodParameterClass struct { + *cim.WmiInstance +} + +func NewWin32_MethodParameterClassEx1(instance *cim.WmiInstance) (newInstance *Win32_MethodParameterClass, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_MethodParameterClass{ + WmiInstance: tmp, + } + return +} + +func NewWin32_MethodParameterClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MethodParameterClass, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MethodParameterClass{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleLoadTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleLoadTrace.go new file mode 100644 index 00000000..406fba5e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleLoadTrace.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ModuleLoadTrace struct +type Win32_ModuleLoadTrace struct { + *Win32_ModuleTrace + + // + DefaultBase uint64 + + // + FileName string + + // + ImageBase uint64 + + // + ImageChecksum uint32 + + // + ImageSize uint64 + + // + ProcessID uint32 + + // + TimeDateStamp uint32 +} + +func NewWin32_ModuleLoadTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ModuleLoadTrace, err error) { + tmp, err := NewWin32_ModuleTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ModuleLoadTrace{ + Win32_ModuleTrace: tmp, + } + return +} + +func NewWin32_ModuleLoadTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ModuleLoadTrace, err error) { + tmp, err := NewWin32_ModuleTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ModuleLoadTrace{ + Win32_ModuleTrace: tmp, + } + return +} + +// SetDefaultBase sets the value of DefaultBase for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyDefaultBase(value uint64) (err error) { + return instance.SetProperty("DefaultBase", (value)) +} + +// GetDefaultBase gets the value of DefaultBase for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyDefaultBase() (value uint64, err error) { + retValue, err := instance.GetProperty("DefaultBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyFileName(value string) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyFileName() (value string, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetImageBase sets the value of ImageBase for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyImageBase(value uint64) (err error) { + return instance.SetProperty("ImageBase", (value)) +} + +// GetImageBase gets the value of ImageBase for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyImageBase() (value uint64, err error) { + retValue, err := instance.GetProperty("ImageBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetImageChecksum sets the value of ImageChecksum for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyImageChecksum(value uint32) (err error) { + return instance.SetProperty("ImageChecksum", (value)) +} + +// GetImageChecksum gets the value of ImageChecksum for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyImageChecksum() (value uint32, err error) { + retValue, err := instance.GetProperty("ImageChecksum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetImageSize sets the value of ImageSize for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyImageSize(value uint64) (err error) { + return instance.SetProperty("ImageSize", (value)) +} + +// GetImageSize gets the value of ImageSize for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyImageSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ImageSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeDateStamp sets the value of TimeDateStamp for the instance +func (instance *Win32_ModuleLoadTrace) SetPropertyTimeDateStamp(value uint32) (err error) { + return instance.SetProperty("TimeDateStamp", (value)) +} + +// GetTimeDateStamp gets the value of TimeDateStamp for the instance +func (instance *Win32_ModuleLoadTrace) GetPropertyTimeDateStamp() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeDateStamp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleTrace.go new file mode 100644 index 00000000..494bdd5c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ModuleTrace.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ModuleTrace struct +type Win32_ModuleTrace struct { + *Win32_SystemTrace +} + +func NewWin32_ModuleTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ModuleTrace, err error) { + tmp, err := NewWin32_SystemTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ModuleTrace{ + Win32_SystemTrace: tmp, + } + return +} + +func NewWin32_ModuleTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ModuleTrace, err error) { + tmp, err := NewWin32_SystemTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ModuleTrace{ + Win32_SystemTrace: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MotherboardDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MotherboardDevice.go new file mode 100644 index 00000000..2f58e244 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MotherboardDevice.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MotherboardDevice struct +type Win32_MotherboardDevice struct { + *CIM_LogicalDevice + + // + PrimaryBusType string + + // + RevisionNumber string + + // + SecondaryBusType string +} + +func NewWin32_MotherboardDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_MotherboardDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MotherboardDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewWin32_MotherboardDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MotherboardDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MotherboardDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetPrimaryBusType sets the value of PrimaryBusType for the instance +func (instance *Win32_MotherboardDevice) SetPropertyPrimaryBusType(value string) (err error) { + return instance.SetProperty("PrimaryBusType", (value)) +} + +// GetPrimaryBusType gets the value of PrimaryBusType for the instance +func (instance *Win32_MotherboardDevice) GetPropertyPrimaryBusType() (value string, err error) { + retValue, err := instance.GetProperty("PrimaryBusType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRevisionNumber sets the value of RevisionNumber for the instance +func (instance *Win32_MotherboardDevice) SetPropertyRevisionNumber(value string) (err error) { + return instance.SetProperty("RevisionNumber", (value)) +} + +// GetRevisionNumber gets the value of RevisionNumber for the instance +func (instance *Win32_MotherboardDevice) GetPropertyRevisionNumber() (value string, err error) { + retValue, err := instance.GetProperty("RevisionNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSecondaryBusType sets the value of SecondaryBusType for the instance +func (instance *Win32_MotherboardDevice) SetPropertySecondaryBusType(value string) (err error) { + return instance.SetProperty("SecondaryBusType", (value)) +} + +// GetSecondaryBusType gets the value of SecondaryBusType for the instance +func (instance *Win32_MotherboardDevice) GetPropertySecondaryBusType() (value string, err error) { + retValue, err := instance.GetProperty("SecondaryBusType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MountPoint.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MountPoint.go new file mode 100644 index 00000000..1a448a5b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MountPoint.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MountPoint struct +type Win32_MountPoint struct { + *cim.WmiInstance + + // + Directory Win32_Directory + + // + Volume Win32_Volume +} + +func NewWin32_MountPointEx1(instance *cim.WmiInstance) (newInstance *Win32_MountPoint, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_MountPoint{ + WmiInstance: tmp, + } + return +} + +func NewWin32_MountPointEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MountPoint, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MountPoint{ + WmiInstance: tmp, + } + return +} + +// SetDirectory sets the value of Directory for the instance +func (instance *Win32_MountPoint) SetPropertyDirectory(value Win32_Directory) (err error) { + return instance.SetProperty("Directory", (value)) +} + +// GetDirectory gets the value of Directory for the instance +func (instance *Win32_MountPoint) GetPropertyDirectory() (value Win32_Directory, err error) { + retValue, err := instance.GetProperty("Directory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Directory) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Directory is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Directory(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *Win32_MountPoint) SetPropertyVolume(value Win32_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *Win32_MountPoint) GetPropertyVolume() (value Win32_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MoveFileAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MoveFileAction.go new file mode 100644 index 00000000..f3ae98a8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_MoveFileAction.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_MoveFileAction struct +type Win32_MoveFileAction struct { + *CIM_FileAction + + // + DestFolder string + + // + DestName string + + // + FileKey string + + // + Options uint16 + + // + SourceFolder string + + // + SourceName string +} + +func NewWin32_MoveFileActionEx1(instance *cim.WmiInstance) (newInstance *Win32_MoveFileAction, err error) { + tmp, err := NewCIM_FileActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_MoveFileAction{ + CIM_FileAction: tmp, + } + return +} + +func NewWin32_MoveFileActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_MoveFileAction, err error) { + tmp, err := NewCIM_FileActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_MoveFileAction{ + CIM_FileAction: tmp, + } + return +} + +// SetDestFolder sets the value of DestFolder for the instance +func (instance *Win32_MoveFileAction) SetPropertyDestFolder(value string) (err error) { + return instance.SetProperty("DestFolder", (value)) +} + +// GetDestFolder gets the value of DestFolder for the instance +func (instance *Win32_MoveFileAction) GetPropertyDestFolder() (value string, err error) { + retValue, err := instance.GetProperty("DestFolder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDestName sets the value of DestName for the instance +func (instance *Win32_MoveFileAction) SetPropertyDestName(value string) (err error) { + return instance.SetProperty("DestName", (value)) +} + +// GetDestName gets the value of DestName for the instance +func (instance *Win32_MoveFileAction) GetPropertyDestName() (value string, err error) { + retValue, err := instance.GetProperty("DestName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileKey sets the value of FileKey for the instance +func (instance *Win32_MoveFileAction) SetPropertyFileKey(value string) (err error) { + return instance.SetProperty("FileKey", (value)) +} + +// GetFileKey gets the value of FileKey for the instance +func (instance *Win32_MoveFileAction) GetPropertyFileKey() (value string, err error) { + retValue, err := instance.GetProperty("FileKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOptions sets the value of Options for the instance +func (instance *Win32_MoveFileAction) SetPropertyOptions(value uint16) (err error) { + return instance.SetProperty("Options", (value)) +} + +// GetOptions gets the value of Options for the instance +func (instance *Win32_MoveFileAction) GetPropertyOptions() (value uint16, err error) { + retValue, err := instance.GetProperty("Options") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSourceFolder sets the value of SourceFolder for the instance +func (instance *Win32_MoveFileAction) SetPropertySourceFolder(value string) (err error) { + return instance.SetProperty("SourceFolder", (value)) +} + +// GetSourceFolder gets the value of SourceFolder for the instance +func (instance *Win32_MoveFileAction) GetPropertySourceFolder() (value string, err error) { + retValue, err := instance.GetProperty("SourceFolder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceName sets the value of SourceName for the instance +func (instance *Win32_MoveFileAction) SetPropertySourceName(value string) (err error) { + return instance.SetProperty("SourceName", (value)) +} + +// GetSourceName gets the value of SourceName for the instance +func (instance *Win32_MoveFileAction) GetPropertySourceName() (value string, err error) { + retValue, err := instance.GetProperty("SourceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTDomain.go new file mode 100644 index 00000000..c1789220 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTDomain.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NTDomain struct +type Win32_NTDomain struct { + *CIM_System + + // + ClientSiteName string + + // + DcSiteName string + + // + DnsForestName string + + // + DomainControllerAddress string + + // + DomainControllerAddressType int32 + + // + DomainControllerName string + + // + DomainGuid string + + // + DomainName string + + // + DSDirectoryServiceFlag bool + + // + DSDnsControllerFlag bool + + // + DSDnsDomainFlag bool + + // + DSDnsForestFlag bool + + // + DSGlobalCatalogFlag bool + + // + DSKerberosDistributionCenterFlag bool + + // + DSPrimaryDomainControllerFlag bool + + // + DSTimeServiceFlag bool + + // + DSWritableFlag bool +} + +func NewWin32_NTDomainEx1(instance *cim.WmiInstance) (newInstance *Win32_NTDomain, err error) { + tmp, err := NewCIM_SystemEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NTDomain{ + CIM_System: tmp, + } + return +} + +func NewWin32_NTDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NTDomain, err error) { + tmp, err := NewCIM_SystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NTDomain{ + CIM_System: tmp, + } + return +} + +// SetClientSiteName sets the value of ClientSiteName for the instance +func (instance *Win32_NTDomain) SetPropertyClientSiteName(value string) (err error) { + return instance.SetProperty("ClientSiteName", (value)) +} + +// GetClientSiteName gets the value of ClientSiteName for the instance +func (instance *Win32_NTDomain) GetPropertyClientSiteName() (value string, err error) { + retValue, err := instance.GetProperty("ClientSiteName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDcSiteName sets the value of DcSiteName for the instance +func (instance *Win32_NTDomain) SetPropertyDcSiteName(value string) (err error) { + return instance.SetProperty("DcSiteName", (value)) +} + +// GetDcSiteName gets the value of DcSiteName for the instance +func (instance *Win32_NTDomain) GetPropertyDcSiteName() (value string, err error) { + retValue, err := instance.GetProperty("DcSiteName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDnsForestName sets the value of DnsForestName for the instance +func (instance *Win32_NTDomain) SetPropertyDnsForestName(value string) (err error) { + return instance.SetProperty("DnsForestName", (value)) +} + +// GetDnsForestName gets the value of DnsForestName for the instance +func (instance *Win32_NTDomain) GetPropertyDnsForestName() (value string, err error) { + retValue, err := instance.GetProperty("DnsForestName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDomainControllerAddress sets the value of DomainControllerAddress for the instance +func (instance *Win32_NTDomain) SetPropertyDomainControllerAddress(value string) (err error) { + return instance.SetProperty("DomainControllerAddress", (value)) +} + +// GetDomainControllerAddress gets the value of DomainControllerAddress for the instance +func (instance *Win32_NTDomain) GetPropertyDomainControllerAddress() (value string, err error) { + retValue, err := instance.GetProperty("DomainControllerAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDomainControllerAddressType sets the value of DomainControllerAddressType for the instance +func (instance *Win32_NTDomain) SetPropertyDomainControllerAddressType(value int32) (err error) { + return instance.SetProperty("DomainControllerAddressType", (value)) +} + +// GetDomainControllerAddressType gets the value of DomainControllerAddressType for the instance +func (instance *Win32_NTDomain) GetPropertyDomainControllerAddressType() (value int32, err error) { + retValue, err := instance.GetProperty("DomainControllerAddressType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetDomainControllerName sets the value of DomainControllerName for the instance +func (instance *Win32_NTDomain) SetPropertyDomainControllerName(value string) (err error) { + return instance.SetProperty("DomainControllerName", (value)) +} + +// GetDomainControllerName gets the value of DomainControllerName for the instance +func (instance *Win32_NTDomain) GetPropertyDomainControllerName() (value string, err error) { + retValue, err := instance.GetProperty("DomainControllerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDomainGuid sets the value of DomainGuid for the instance +func (instance *Win32_NTDomain) SetPropertyDomainGuid(value string) (err error) { + return instance.SetProperty("DomainGuid", (value)) +} + +// GetDomainGuid gets the value of DomainGuid for the instance +func (instance *Win32_NTDomain) GetPropertyDomainGuid() (value string, err error) { + retValue, err := instance.GetProperty("DomainGuid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDomainName sets the value of DomainName for the instance +func (instance *Win32_NTDomain) SetPropertyDomainName(value string) (err error) { + return instance.SetProperty("DomainName", (value)) +} + +// GetDomainName gets the value of DomainName for the instance +func (instance *Win32_NTDomain) GetPropertyDomainName() (value string, err error) { + retValue, err := instance.GetProperty("DomainName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDSDirectoryServiceFlag sets the value of DSDirectoryServiceFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSDirectoryServiceFlag(value bool) (err error) { + return instance.SetProperty("DSDirectoryServiceFlag", (value)) +} + +// GetDSDirectoryServiceFlag gets the value of DSDirectoryServiceFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSDirectoryServiceFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSDirectoryServiceFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSDnsControllerFlag sets the value of DSDnsControllerFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSDnsControllerFlag(value bool) (err error) { + return instance.SetProperty("DSDnsControllerFlag", (value)) +} + +// GetDSDnsControllerFlag gets the value of DSDnsControllerFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSDnsControllerFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSDnsControllerFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSDnsDomainFlag sets the value of DSDnsDomainFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSDnsDomainFlag(value bool) (err error) { + return instance.SetProperty("DSDnsDomainFlag", (value)) +} + +// GetDSDnsDomainFlag gets the value of DSDnsDomainFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSDnsDomainFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSDnsDomainFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSDnsForestFlag sets the value of DSDnsForestFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSDnsForestFlag(value bool) (err error) { + return instance.SetProperty("DSDnsForestFlag", (value)) +} + +// GetDSDnsForestFlag gets the value of DSDnsForestFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSDnsForestFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSDnsForestFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSGlobalCatalogFlag sets the value of DSGlobalCatalogFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSGlobalCatalogFlag(value bool) (err error) { + return instance.SetProperty("DSGlobalCatalogFlag", (value)) +} + +// GetDSGlobalCatalogFlag gets the value of DSGlobalCatalogFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSGlobalCatalogFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSGlobalCatalogFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSKerberosDistributionCenterFlag sets the value of DSKerberosDistributionCenterFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSKerberosDistributionCenterFlag(value bool) (err error) { + return instance.SetProperty("DSKerberosDistributionCenterFlag", (value)) +} + +// GetDSKerberosDistributionCenterFlag gets the value of DSKerberosDistributionCenterFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSKerberosDistributionCenterFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSKerberosDistributionCenterFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSPrimaryDomainControllerFlag sets the value of DSPrimaryDomainControllerFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSPrimaryDomainControllerFlag(value bool) (err error) { + return instance.SetProperty("DSPrimaryDomainControllerFlag", (value)) +} + +// GetDSPrimaryDomainControllerFlag gets the value of DSPrimaryDomainControllerFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSPrimaryDomainControllerFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSPrimaryDomainControllerFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSTimeServiceFlag sets the value of DSTimeServiceFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSTimeServiceFlag(value bool) (err error) { + return instance.SetProperty("DSTimeServiceFlag", (value)) +} + +// GetDSTimeServiceFlag gets the value of DSTimeServiceFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSTimeServiceFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSTimeServiceFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSWritableFlag sets the value of DSWritableFlag for the instance +func (instance *Win32_NTDomain) SetPropertyDSWritableFlag(value bool) (err error) { + return instance.SetProperty("DSWritableFlag", (value)) +} + +// GetDSWritableFlag gets the value of DSWritableFlag for the instance +func (instance *Win32_NTDomain) GetPropertyDSWritableFlag() (value bool, err error) { + retValue, err := instance.GetProperty("DSWritableFlag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTEventlogFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTEventlogFile.go new file mode 100644 index 00000000..aee553d8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTEventlogFile.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NTEventlogFile struct +type Win32_NTEventlogFile struct { + *CIM_DataFile + + // + LogfileName string + + // + MaxFileSize uint32 + + // + NumberOfRecords uint32 + + // + OverwriteOutDated uint32 + + // + OverWritePolicy string + + // + Sources []string +} + +func NewWin32_NTEventlogFileEx1(instance *cim.WmiInstance) (newInstance *Win32_NTEventlogFile, err error) { + tmp, err := NewCIM_DataFileEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NTEventlogFile{ + CIM_DataFile: tmp, + } + return +} + +func NewWin32_NTEventlogFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NTEventlogFile, err error) { + tmp, err := NewCIM_DataFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NTEventlogFile{ + CIM_DataFile: tmp, + } + return +} + +// SetLogfileName sets the value of LogfileName for the instance +func (instance *Win32_NTEventlogFile) SetPropertyLogfileName(value string) (err error) { + return instance.SetProperty("LogfileName", (value)) +} + +// GetLogfileName gets the value of LogfileName for the instance +func (instance *Win32_NTEventlogFile) GetPropertyLogfileName() (value string, err error) { + retValue, err := instance.GetProperty("LogfileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaxFileSize sets the value of MaxFileSize for the instance +func (instance *Win32_NTEventlogFile) SetPropertyMaxFileSize(value uint32) (err error) { + return instance.SetProperty("MaxFileSize", (value)) +} + +// GetMaxFileSize gets the value of MaxFileSize for the instance +func (instance *Win32_NTEventlogFile) GetPropertyMaxFileSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxFileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfRecords sets the value of NumberOfRecords for the instance +func (instance *Win32_NTEventlogFile) SetPropertyNumberOfRecords(value uint32) (err error) { + return instance.SetProperty("NumberOfRecords", (value)) +} + +// GetNumberOfRecords gets the value of NumberOfRecords for the instance +func (instance *Win32_NTEventlogFile) GetPropertyNumberOfRecords() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfRecords") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOverwriteOutDated sets the value of OverwriteOutDated for the instance +func (instance *Win32_NTEventlogFile) SetPropertyOverwriteOutDated(value uint32) (err error) { + return instance.SetProperty("OverwriteOutDated", (value)) +} + +// GetOverwriteOutDated gets the value of OverwriteOutDated for the instance +func (instance *Win32_NTEventlogFile) GetPropertyOverwriteOutDated() (value uint32, err error) { + retValue, err := instance.GetProperty("OverwriteOutDated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOverWritePolicy sets the value of OverWritePolicy for the instance +func (instance *Win32_NTEventlogFile) SetPropertyOverWritePolicy(value string) (err error) { + return instance.SetProperty("OverWritePolicy", (value)) +} + +// GetOverWritePolicy gets the value of OverWritePolicy for the instance +func (instance *Win32_NTEventlogFile) GetPropertyOverWritePolicy() (value string, err error) { + retValue, err := instance.GetProperty("OverWritePolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSources sets the value of Sources for the instance +func (instance *Win32_NTEventlogFile) SetPropertySources(value []string) (err error) { + return instance.SetProperty("Sources", (value)) +} + +// GetSources gets the value of Sources for the instance +func (instance *Win32_NTEventlogFile) GetPropertySources() (value []string, err error) { + retValue, err := instance.GetProperty("Sources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// + +// + +// +func (instance *Win32_NTEventlogFile) ClearEventlog( /* IN */ ArchiveFileName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ClearEventlog", ArchiveFileName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NTEventlogFile) BackupEventlog( /* IN */ ArchiveFileName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("BackupEventlog", ArchiveFileName) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEvent.go new file mode 100644 index 00000000..df5ba1ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEvent.go @@ -0,0 +1,533 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NTLogEvent struct +type Win32_NTLogEvent struct { + *cim.WmiInstance + + // + Category uint16 + + // + CategoryString string + + // + ComputerName string + + // + Data []uint8 + + // + EventCode uint16 + + // + EventIdentifier uint32 + + // + EventType uint8 + + // + InsertionStrings []string + + // + Logfile string + + // + Message string + + // + RecordNumber uint32 + + // + SourceName string + + // + TimeGenerated string + + // + TimeWritten string + + // + Type string + + // + User string +} + +func NewWin32_NTLogEventEx1(instance *cim.WmiInstance) (newInstance *Win32_NTLogEvent, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_NTLogEvent{ + WmiInstance: tmp, + } + return +} + +func NewWin32_NTLogEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NTLogEvent, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NTLogEvent{ + WmiInstance: tmp, + } + return +} + +// SetCategory sets the value of Category for the instance +func (instance *Win32_NTLogEvent) SetPropertyCategory(value uint16) (err error) { + return instance.SetProperty("Category", (value)) +} + +// GetCategory gets the value of Category for the instance +func (instance *Win32_NTLogEvent) GetPropertyCategory() (value uint16, err error) { + retValue, err := instance.GetProperty("Category") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCategoryString sets the value of CategoryString for the instance +func (instance *Win32_NTLogEvent) SetPropertyCategoryString(value string) (err error) { + return instance.SetProperty("CategoryString", (value)) +} + +// GetCategoryString gets the value of CategoryString for the instance +func (instance *Win32_NTLogEvent) GetPropertyCategoryString() (value string, err error) { + retValue, err := instance.GetProperty("CategoryString") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetComputerName sets the value of ComputerName for the instance +func (instance *Win32_NTLogEvent) SetPropertyComputerName(value string) (err error) { + return instance.SetProperty("ComputerName", (value)) +} + +// GetComputerName gets the value of ComputerName for the instance +func (instance *Win32_NTLogEvent) GetPropertyComputerName() (value string, err error) { + retValue, err := instance.GetProperty("ComputerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_NTLogEvent) SetPropertyData(value []uint8) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_NTLogEvent) GetPropertyData() (value []uint8, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetEventCode sets the value of EventCode for the instance +func (instance *Win32_NTLogEvent) SetPropertyEventCode(value uint16) (err error) { + return instance.SetProperty("EventCode", (value)) +} + +// GetEventCode gets the value of EventCode for the instance +func (instance *Win32_NTLogEvent) GetPropertyEventCode() (value uint16, err error) { + retValue, err := instance.GetProperty("EventCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEventIdentifier sets the value of EventIdentifier for the instance +func (instance *Win32_NTLogEvent) SetPropertyEventIdentifier(value uint32) (err error) { + return instance.SetProperty("EventIdentifier", (value)) +} + +// GetEventIdentifier gets the value of EventIdentifier for the instance +func (instance *Win32_NTLogEvent) GetPropertyEventIdentifier() (value uint32, err error) { + retValue, err := instance.GetProperty("EventIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventType sets the value of EventType for the instance +func (instance *Win32_NTLogEvent) SetPropertyEventType(value uint8) (err error) { + return instance.SetProperty("EventType", (value)) +} + +// GetEventType gets the value of EventType for the instance +func (instance *Win32_NTLogEvent) GetPropertyEventType() (value uint8, err error) { + retValue, err := instance.GetProperty("EventType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetInsertionStrings sets the value of InsertionStrings for the instance +func (instance *Win32_NTLogEvent) SetPropertyInsertionStrings(value []string) (err error) { + return instance.SetProperty("InsertionStrings", (value)) +} + +// GetInsertionStrings gets the value of InsertionStrings for the instance +func (instance *Win32_NTLogEvent) GetPropertyInsertionStrings() (value []string, err error) { + retValue, err := instance.GetProperty("InsertionStrings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetLogfile sets the value of Logfile for the instance +func (instance *Win32_NTLogEvent) SetPropertyLogfile(value string) (err error) { + return instance.SetProperty("Logfile", (value)) +} + +// GetLogfile gets the value of Logfile for the instance +func (instance *Win32_NTLogEvent) GetPropertyLogfile() (value string, err error) { + retValue, err := instance.GetProperty("Logfile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMessage sets the value of Message for the instance +func (instance *Win32_NTLogEvent) SetPropertyMessage(value string) (err error) { + return instance.SetProperty("Message", (value)) +} + +// GetMessage gets the value of Message for the instance +func (instance *Win32_NTLogEvent) GetPropertyMessage() (value string, err error) { + retValue, err := instance.GetProperty("Message") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecordNumber sets the value of RecordNumber for the instance +func (instance *Win32_NTLogEvent) SetPropertyRecordNumber(value uint32) (err error) { + return instance.SetProperty("RecordNumber", (value)) +} + +// GetRecordNumber gets the value of RecordNumber for the instance +func (instance *Win32_NTLogEvent) GetPropertyRecordNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("RecordNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSourceName sets the value of SourceName for the instance +func (instance *Win32_NTLogEvent) SetPropertySourceName(value string) (err error) { + return instance.SetProperty("SourceName", (value)) +} + +// GetSourceName gets the value of SourceName for the instance +func (instance *Win32_NTLogEvent) GetPropertySourceName() (value string, err error) { + retValue, err := instance.GetProperty("SourceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeGenerated sets the value of TimeGenerated for the instance +func (instance *Win32_NTLogEvent) SetPropertyTimeGenerated(value string) (err error) { + return instance.SetProperty("TimeGenerated", (value)) +} + +// GetTimeGenerated gets the value of TimeGenerated for the instance +func (instance *Win32_NTLogEvent) GetPropertyTimeGenerated() (value string, err error) { + retValue, err := instance.GetProperty("TimeGenerated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeWritten sets the value of TimeWritten for the instance +func (instance *Win32_NTLogEvent) SetPropertyTimeWritten(value string) (err error) { + return instance.SetProperty("TimeWritten", (value)) +} + +// GetTimeWritten gets the value of TimeWritten for the instance +func (instance *Win32_NTLogEvent) GetPropertyTimeWritten() (value string, err error) { + retValue, err := instance.GetProperty("TimeWritten") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_NTLogEvent) SetPropertyType(value string) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_NTLogEvent) GetPropertyType() (value string, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Win32_NTLogEvent) SetPropertyUser(value string) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Win32_NTLogEvent) GetPropertyUser() (value string, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventComputer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventComputer.go new file mode 100644 index 00000000..5e3622f8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventComputer.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NTLogEventComputer struct +type Win32_NTLogEventComputer struct { + *cim.WmiInstance + + // + Computer Win32_ComputerSystem + + // + Record Win32_NTLogEvent +} + +func NewWin32_NTLogEventComputerEx1(instance *cim.WmiInstance) (newInstance *Win32_NTLogEventComputer, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_NTLogEventComputer{ + WmiInstance: tmp, + } + return +} + +func NewWin32_NTLogEventComputerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NTLogEventComputer, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NTLogEventComputer{ + WmiInstance: tmp, + } + return +} + +// SetComputer sets the value of Computer for the instance +func (instance *Win32_NTLogEventComputer) SetPropertyComputer(value Win32_ComputerSystem) (err error) { + return instance.SetProperty("Computer", (value)) +} + +// GetComputer gets the value of Computer for the instance +func (instance *Win32_NTLogEventComputer) GetPropertyComputer() (value Win32_ComputerSystem, err error) { + retValue, err := instance.GetProperty("Computer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ComputerSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ComputerSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ComputerSystem(valuetmp) + + return +} + +// SetRecord sets the value of Record for the instance +func (instance *Win32_NTLogEventComputer) SetPropertyRecord(value Win32_NTLogEvent) (err error) { + return instance.SetProperty("Record", (value)) +} + +// GetRecord gets the value of Record for the instance +func (instance *Win32_NTLogEventComputer) GetPropertyRecord() (value Win32_NTLogEvent, err error) { + retValue, err := instance.GetProperty("Record") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_NTLogEvent) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_NTLogEvent is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_NTLogEvent(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventLog.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventLog.go new file mode 100644 index 00000000..c2412726 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventLog.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NTLogEventLog struct +type Win32_NTLogEventLog struct { + *cim.WmiInstance + + // + Log Win32_NTEventlogFile + + // + Record Win32_NTLogEvent +} + +func NewWin32_NTLogEventLogEx1(instance *cim.WmiInstance) (newInstance *Win32_NTLogEventLog, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_NTLogEventLog{ + WmiInstance: tmp, + } + return +} + +func NewWin32_NTLogEventLogEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NTLogEventLog, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NTLogEventLog{ + WmiInstance: tmp, + } + return +} + +// SetLog sets the value of Log for the instance +func (instance *Win32_NTLogEventLog) SetPropertyLog(value Win32_NTEventlogFile) (err error) { + return instance.SetProperty("Log", (value)) +} + +// GetLog gets the value of Log for the instance +func (instance *Win32_NTLogEventLog) GetPropertyLog() (value Win32_NTEventlogFile, err error) { + retValue, err := instance.GetProperty("Log") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_NTEventlogFile) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_NTEventlogFile is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_NTEventlogFile(valuetmp) + + return +} + +// SetRecord sets the value of Record for the instance +func (instance *Win32_NTLogEventLog) SetPropertyRecord(value Win32_NTLogEvent) (err error) { + return instance.SetProperty("Record", (value)) +} + +// GetRecord gets the value of Record for the instance +func (instance *Win32_NTLogEventLog) GetPropertyRecord() (value Win32_NTLogEvent, err error) { + retValue, err := instance.GetProperty("Record") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_NTLogEvent) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_NTLogEvent is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_NTLogEvent(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventUser.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventUser.go new file mode 100644 index 00000000..c7e4f744 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NTLogEventUser.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NTLogEventUser struct +type Win32_NTLogEventUser struct { + *cim.WmiInstance + + // + Record Win32_NTLogEvent + + // + User Win32_UserAccount +} + +func NewWin32_NTLogEventUserEx1(instance *cim.WmiInstance) (newInstance *Win32_NTLogEventUser, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_NTLogEventUser{ + WmiInstance: tmp, + } + return +} + +func NewWin32_NTLogEventUserEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NTLogEventUser, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NTLogEventUser{ + WmiInstance: tmp, + } + return +} + +// SetRecord sets the value of Record for the instance +func (instance *Win32_NTLogEventUser) SetPropertyRecord(value Win32_NTLogEvent) (err error) { + return instance.SetProperty("Record", (value)) +} + +// GetRecord gets the value of Record for the instance +func (instance *Win32_NTLogEventUser) GetPropertyRecord() (value Win32_NTLogEvent, err error) { + retValue, err := instance.GetProperty("Record") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_NTLogEvent) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_NTLogEvent is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_NTLogEvent(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Win32_NTLogEventUser) SetPropertyUser(value Win32_UserAccount) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Win32_NTLogEventUser) GetPropertyUser() (value Win32_UserAccount, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_UserAccount) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_UserAccount is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_UserAccount(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObject.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObject.go new file mode 100644 index 00000000..5127ef6a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObject.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NamedJobObject struct +type Win32_NamedJobObject struct { + *CIM_CollectionOfMSEs + + // + BasicUIRestrictions uint32 +} + +func NewWin32_NamedJobObjectEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObject, err error) { + tmp, err := NewCIM_CollectionOfMSEsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObject{ + CIM_CollectionOfMSEs: tmp, + } + return +} + +func NewWin32_NamedJobObjectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObject, err error) { + tmp, err := NewCIM_CollectionOfMSEsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObject{ + CIM_CollectionOfMSEs: tmp, + } + return +} + +// SetBasicUIRestrictions sets the value of BasicUIRestrictions for the instance +func (instance *Win32_NamedJobObject) SetPropertyBasicUIRestrictions(value uint32) (err error) { + return instance.SetProperty("BasicUIRestrictions", (value)) +} + +// GetBasicUIRestrictions gets the value of BasicUIRestrictions for the instance +func (instance *Win32_NamedJobObject) GetPropertyBasicUIRestrictions() (value uint32, err error) { + retValue, err := instance.GetProperty("BasicUIRestrictions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectActgInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectActgInfo.go new file mode 100644 index 00000000..420e1ad8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectActgInfo.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NamedJobObjectActgInfo struct +type Win32_NamedJobObjectActgInfo struct { + *CIM_StatisticalInformation + + // + ActiveProcesses uint32 + + // + OtherOperationCount uint64 + + // + OtherTransferCount uint64 + + // + PeakJobMemoryUsed uint32 + + // + PeakProcessMemoryUsed uint32 + + // + ReadOperationCount uint64 + + // + ReadTransferCount uint64 + + // + ThisPeriodTotalKernelTime uint64 + + // + ThisPeriodTotalUserTime uint64 + + // + TotalKernelTime uint64 + + // + TotalPageFaultCount uint32 + + // + TotalProcesses uint32 + + // + TotalTerminatedProcesses uint32 + + // + TotalUserTime uint64 + + // + WriteOperationCount uint64 + + // + WriteTransferCount uint64 +} + +func NewWin32_NamedJobObjectActgInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectActgInfo, err error) { + tmp, err := NewCIM_StatisticalInformationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectActgInfo{ + CIM_StatisticalInformation: tmp, + } + return +} + +func NewWin32_NamedJobObjectActgInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectActgInfo, err error) { + tmp, err := NewCIM_StatisticalInformationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectActgInfo{ + CIM_StatisticalInformation: tmp, + } + return +} + +// SetActiveProcesses sets the value of ActiveProcesses for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyActiveProcesses(value uint32) (err error) { + return instance.SetProperty("ActiveProcesses", (value)) +} + +// GetActiveProcesses gets the value of ActiveProcesses for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyActiveProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOtherOperationCount sets the value of OtherOperationCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyOtherOperationCount(value uint64) (err error) { + return instance.SetProperty("OtherOperationCount", (value)) +} + +// GetOtherOperationCount gets the value of OtherOperationCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyOtherOperationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherOperationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherTransferCount sets the value of OtherTransferCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyOtherTransferCount(value uint64) (err error) { + return instance.SetProperty("OtherTransferCount", (value)) +} + +// GetOtherTransferCount gets the value of OtherTransferCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyOtherTransferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPeakJobMemoryUsed sets the value of PeakJobMemoryUsed for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyPeakJobMemoryUsed(value uint32) (err error) { + return instance.SetProperty("PeakJobMemoryUsed", (value)) +} + +// GetPeakJobMemoryUsed gets the value of PeakJobMemoryUsed for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyPeakJobMemoryUsed() (value uint32, err error) { + retValue, err := instance.GetProperty("PeakJobMemoryUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPeakProcessMemoryUsed sets the value of PeakProcessMemoryUsed for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyPeakProcessMemoryUsed(value uint32) (err error) { + return instance.SetProperty("PeakProcessMemoryUsed", (value)) +} + +// GetPeakProcessMemoryUsed gets the value of PeakProcessMemoryUsed for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyPeakProcessMemoryUsed() (value uint32, err error) { + retValue, err := instance.GetProperty("PeakProcessMemoryUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadOperationCount sets the value of ReadOperationCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyReadOperationCount(value uint64) (err error) { + return instance.SetProperty("ReadOperationCount", (value)) +} + +// GetReadOperationCount gets the value of ReadOperationCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyReadOperationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadOperationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadTransferCount sets the value of ReadTransferCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyReadTransferCount(value uint64) (err error) { + return instance.SetProperty("ReadTransferCount", (value)) +} + +// GetReadTransferCount gets the value of ReadTransferCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyReadTransferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThisPeriodTotalKernelTime sets the value of ThisPeriodTotalKernelTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyThisPeriodTotalKernelTime(value uint64) (err error) { + return instance.SetProperty("ThisPeriodTotalKernelTime", (value)) +} + +// GetThisPeriodTotalKernelTime gets the value of ThisPeriodTotalKernelTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyThisPeriodTotalKernelTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodTotalKernelTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThisPeriodTotalUserTime sets the value of ThisPeriodTotalUserTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyThisPeriodTotalUserTime(value uint64) (err error) { + return instance.SetProperty("ThisPeriodTotalUserTime", (value)) +} + +// GetThisPeriodTotalUserTime gets the value of ThisPeriodTotalUserTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyThisPeriodTotalUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodTotalUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalKernelTime sets the value of TotalKernelTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyTotalKernelTime(value uint64) (err error) { + return instance.SetProperty("TotalKernelTime", (value)) +} + +// GetTotalKernelTime gets the value of TotalKernelTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyTotalKernelTime() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalKernelTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPageFaultCount sets the value of TotalPageFaultCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyTotalPageFaultCount(value uint32) (err error) { + return instance.SetProperty("TotalPageFaultCount", (value)) +} + +// GetTotalPageFaultCount gets the value of TotalPageFaultCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyTotalPageFaultCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalPageFaultCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalProcesses sets the value of TotalProcesses for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyTotalProcesses(value uint32) (err error) { + return instance.SetProperty("TotalProcesses", (value)) +} + +// GetTotalProcesses gets the value of TotalProcesses for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyTotalProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalTerminatedProcesses sets the value of TotalTerminatedProcesses for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyTotalTerminatedProcesses(value uint32) (err error) { + return instance.SetProperty("TotalTerminatedProcesses", (value)) +} + +// GetTotalTerminatedProcesses gets the value of TotalTerminatedProcesses for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyTotalTerminatedProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalTerminatedProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalUserTime sets the value of TotalUserTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyTotalUserTime(value uint64) (err error) { + return instance.SetProperty("TotalUserTime", (value)) +} + +// GetTotalUserTime gets the value of TotalUserTime for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyTotalUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteOperationCount sets the value of WriteOperationCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyWriteOperationCount(value uint64) (err error) { + return instance.SetProperty("WriteOperationCount", (value)) +} + +// GetWriteOperationCount gets the value of WriteOperationCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyWriteOperationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteOperationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteTransferCount sets the value of WriteTransferCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) SetPropertyWriteTransferCount(value uint64) (err error) { + return instance.SetProperty("WriteTransferCount", (value)) +} + +// GetWriteTransferCount gets the value of WriteTransferCount for the instance +func (instance *Win32_NamedJobObjectActgInfo) GetPropertyWriteTransferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimit.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimit.go new file mode 100644 index 00000000..3ed9cf9c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimit.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_NamedJobObjectLimit struct +type Win32_NamedJobObjectLimit struct { + *CIM_CollectionSetting +} + +func NewWin32_NamedJobObjectLimitEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectLimit, err error) { + tmp, err := NewCIM_CollectionSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectLimit{ + CIM_CollectionSetting: tmp, + } + return +} + +func NewWin32_NamedJobObjectLimitEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectLimit, err error) { + tmp, err := NewCIM_CollectionSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectLimit{ + CIM_CollectionSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimitSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimitSetting.go new file mode 100644 index 00000000..acdaa908 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectLimitSetting.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NamedJobObjectLimitSetting struct +type Win32_NamedJobObjectLimitSetting struct { + *CIM_Setting + + // + ActiveProcessLimit uint32 + + // + Affinity uint32 + + // + JobMemoryLimit uint32 + + // + LimitFlags uint32 + + // + MaximumWorkingSetSize uint32 + + // + MinimumWorkingSetSize uint32 + + // + PerJobUserTimeLimit uint64 + + // + PerProcessUserTimeLimit uint64 + + // + PriorityClass uint32 + + // + ProcessMemoryLimit uint32 + + // + SchedulingClass uint32 +} + +func NewWin32_NamedJobObjectLimitSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectLimitSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectLimitSetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_NamedJobObjectLimitSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectLimitSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectLimitSetting{ + CIM_Setting: tmp, + } + return +} + +// SetActiveProcessLimit sets the value of ActiveProcessLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyActiveProcessLimit(value uint32) (err error) { + return instance.SetProperty("ActiveProcessLimit", (value)) +} + +// GetActiveProcessLimit gets the value of ActiveProcessLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyActiveProcessLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveProcessLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAffinity sets the value of Affinity for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyAffinity(value uint32) (err error) { + return instance.SetProperty("Affinity", (value)) +} + +// GetAffinity gets the value of Affinity for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyAffinity() (value uint32, err error) { + retValue, err := instance.GetProperty("Affinity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobMemoryLimit sets the value of JobMemoryLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyJobMemoryLimit(value uint32) (err error) { + return instance.SetProperty("JobMemoryLimit", (value)) +} + +// GetJobMemoryLimit gets the value of JobMemoryLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyJobMemoryLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("JobMemoryLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLimitFlags sets the value of LimitFlags for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyLimitFlags(value uint32) (err error) { + return instance.SetProperty("LimitFlags", (value)) +} + +// GetLimitFlags gets the value of LimitFlags for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyLimitFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("LimitFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumWorkingSetSize sets the value of MaximumWorkingSetSize for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyMaximumWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("MaximumWorkingSetSize", (value)) +} + +// GetMaximumWorkingSetSize gets the value of MaximumWorkingSetSize for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyMaximumWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinimumWorkingSetSize sets the value of MinimumWorkingSetSize for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyMinimumWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("MinimumWorkingSetSize", (value)) +} + +// GetMinimumWorkingSetSize gets the value of MinimumWorkingSetSize for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyMinimumWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MinimumWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPerJobUserTimeLimit sets the value of PerJobUserTimeLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyPerJobUserTimeLimit(value uint64) (err error) { + return instance.SetProperty("PerJobUserTimeLimit", (value)) +} + +// GetPerJobUserTimeLimit gets the value of PerJobUserTimeLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyPerJobUserTimeLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("PerJobUserTimeLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPerProcessUserTimeLimit sets the value of PerProcessUserTimeLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyPerProcessUserTimeLimit(value uint64) (err error) { + return instance.SetProperty("PerProcessUserTimeLimit", (value)) +} + +// GetPerProcessUserTimeLimit gets the value of PerProcessUserTimeLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyPerProcessUserTimeLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("PerProcessUserTimeLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPriorityClass sets the value of PriorityClass for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyPriorityClass(value uint32) (err error) { + return instance.SetProperty("PriorityClass", (value)) +} + +// GetPriorityClass gets the value of PriorityClass for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyPriorityClass() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessMemoryLimit sets the value of ProcessMemoryLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertyProcessMemoryLimit(value uint32) (err error) { + return instance.SetProperty("ProcessMemoryLimit", (value)) +} + +// GetProcessMemoryLimit gets the value of ProcessMemoryLimit for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertyProcessMemoryLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessMemoryLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSchedulingClass sets the value of SchedulingClass for the instance +func (instance *Win32_NamedJobObjectLimitSetting) SetPropertySchedulingClass(value uint32) (err error) { + return instance.SetProperty("SchedulingClass", (value)) +} + +// GetSchedulingClass gets the value of SchedulingClass for the instance +func (instance *Win32_NamedJobObjectLimitSetting) GetPropertySchedulingClass() (value uint32, err error) { + retValue, err := instance.GetProperty("SchedulingClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectProcess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectProcess.go new file mode 100644 index 00000000..aa374bee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectProcess.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_NamedJobObjectProcess struct +type Win32_NamedJobObjectProcess struct { + *CIM_CollectedMSEs +} + +func NewWin32_NamedJobObjectProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectProcess, err error) { + tmp, err := NewCIM_CollectedMSEsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectProcess{ + CIM_CollectedMSEs: tmp, + } + return +} + +func NewWin32_NamedJobObjectProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectProcess, err error) { + tmp, err := NewCIM_CollectedMSEsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectProcess{ + CIM_CollectedMSEs: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimit.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimit.go new file mode 100644 index 00000000..4873cba8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimit.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_NamedJobObjectSecLimit struct +type Win32_NamedJobObjectSecLimit struct { + *CIM_CollectionSetting +} + +func NewWin32_NamedJobObjectSecLimitEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectSecLimit, err error) { + tmp, err := NewCIM_CollectionSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectSecLimit{ + CIM_CollectionSetting: tmp, + } + return +} + +func NewWin32_NamedJobObjectSecLimitEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectSecLimit, err error) { + tmp, err := NewCIM_CollectionSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectSecLimit{ + CIM_CollectionSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimitSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimitSetting.go new file mode 100644 index 00000000..cd9e8637 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectSecLimitSetting.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NamedJobObjectSecLimitSetting struct +type Win32_NamedJobObjectSecLimitSetting struct { + *CIM_Setting + + // + PrivilegesToDelete Win32_TokenPrivileges + + // + RestrictedSIDs Win32_TokenGroups + + // + SecurityLimitFlags uint32 + + // + SIDsToDisable Win32_TokenGroups +} + +func NewWin32_NamedJobObjectSecLimitSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectSecLimitSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectSecLimitSetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_NamedJobObjectSecLimitSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectSecLimitSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectSecLimitSetting{ + CIM_Setting: tmp, + } + return +} + +// SetPrivilegesToDelete sets the value of PrivilegesToDelete for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) SetPropertyPrivilegesToDelete(value Win32_TokenPrivileges) (err error) { + return instance.SetProperty("PrivilegesToDelete", (value)) +} + +// GetPrivilegesToDelete gets the value of PrivilegesToDelete for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) GetPropertyPrivilegesToDelete() (value Win32_TokenPrivileges, err error) { + retValue, err := instance.GetProperty("PrivilegesToDelete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_TokenPrivileges) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_TokenPrivileges is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_TokenPrivileges(valuetmp) + + return +} + +// SetRestrictedSIDs sets the value of RestrictedSIDs for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) SetPropertyRestrictedSIDs(value Win32_TokenGroups) (err error) { + return instance.SetProperty("RestrictedSIDs", (value)) +} + +// GetRestrictedSIDs gets the value of RestrictedSIDs for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) GetPropertyRestrictedSIDs() (value Win32_TokenGroups, err error) { + retValue, err := instance.GetProperty("RestrictedSIDs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_TokenGroups) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_TokenGroups is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_TokenGroups(valuetmp) + + return +} + +// SetSecurityLimitFlags sets the value of SecurityLimitFlags for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) SetPropertySecurityLimitFlags(value uint32) (err error) { + return instance.SetProperty("SecurityLimitFlags", (value)) +} + +// GetSecurityLimitFlags gets the value of SecurityLimitFlags for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) GetPropertySecurityLimitFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityLimitFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSIDsToDisable sets the value of SIDsToDisable for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) SetPropertySIDsToDisable(value Win32_TokenGroups) (err error) { + return instance.SetProperty("SIDsToDisable", (value)) +} + +// GetSIDsToDisable gets the value of SIDsToDisable for the instance +func (instance *Win32_NamedJobObjectSecLimitSetting) GetPropertySIDsToDisable() (value Win32_TokenGroups, err error) { + retValue, err := instance.GetProperty("SIDsToDisable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_TokenGroups) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_TokenGroups is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_TokenGroups(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectStatistics.go new file mode 100644 index 00000000..59a76e2f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NamedJobObjectStatistics.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_NamedJobObjectStatistics struct +type Win32_NamedJobObjectStatistics struct { + *Win32_CollectionStatistics +} + +func NewWin32_NamedJobObjectStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_NamedJobObjectStatistics, err error) { + tmp, err := NewWin32_CollectionStatisticsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectStatistics{ + Win32_CollectionStatistics: tmp, + } + return +} + +func NewWin32_NamedJobObjectStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NamedJobObjectStatistics, err error) { + tmp, err := NewWin32_CollectionStatisticsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NamedJobObjectStatistics{ + Win32_CollectionStatistics: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapter.go new file mode 100644 index 00000000..246a0d0c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapter.go @@ -0,0 +1,556 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NetworkAdapter struct +type Win32_NetworkAdapter struct { + *CIM_NetworkAdapter + + // + AdapterType string + + // + AdapterTypeId uint16 + + // + GUID string + + // + Index uint32 + + // + Installed bool + + // + InterfaceIndex uint32 + + // + MACAddress string + + // + Manufacturer string + + // + MaxNumberControlled uint32 + + // + NetConnectionID string + + // + NetConnectionStatus uint16 + + // + NetEnabled bool + + // + PhysicalAdapter bool + + // + ProductName string + + // + ServiceName string + + // + TimeOfLastReset string +} + +func NewWin32_NetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkAdapter, err error) { + tmp, err := NewCIM_NetworkAdapterEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkAdapter{ + CIM_NetworkAdapter: tmp, + } + return +} + +func NewWin32_NetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkAdapter, err error) { + tmp, err := NewCIM_NetworkAdapterEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkAdapter{ + CIM_NetworkAdapter: tmp, + } + return +} + +// SetAdapterType sets the value of AdapterType for the instance +func (instance *Win32_NetworkAdapter) SetPropertyAdapterType(value string) (err error) { + return instance.SetProperty("AdapterType", (value)) +} + +// GetAdapterType gets the value of AdapterType for the instance +func (instance *Win32_NetworkAdapter) GetPropertyAdapterType() (value string, err error) { + retValue, err := instance.GetProperty("AdapterType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterTypeId sets the value of AdapterTypeId for the instance +func (instance *Win32_NetworkAdapter) SetPropertyAdapterTypeId(value uint16) (err error) { + return instance.SetProperty("AdapterTypeId", (value)) +} + +// GetAdapterTypeId gets the value of AdapterTypeId for the instance +func (instance *Win32_NetworkAdapter) GetPropertyAdapterTypeId() (value uint16, err error) { + retValue, err := instance.GetProperty("AdapterTypeId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetGUID sets the value of GUID for the instance +func (instance *Win32_NetworkAdapter) SetPropertyGUID(value string) (err error) { + return instance.SetProperty("GUID", (value)) +} + +// GetGUID gets the value of GUID for the instance +func (instance *Win32_NetworkAdapter) GetPropertyGUID() (value string, err error) { + retValue, err := instance.GetProperty("GUID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndex sets the value of Index for the instance +func (instance *Win32_NetworkAdapter) SetPropertyIndex(value uint32) (err error) { + return instance.SetProperty("Index", (value)) +} + +// GetIndex gets the value of Index for the instance +func (instance *Win32_NetworkAdapter) GetPropertyIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("Index") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstalled sets the value of Installed for the instance +func (instance *Win32_NetworkAdapter) SetPropertyInstalled(value bool) (err error) { + return instance.SetProperty("Installed", (value)) +} + +// GetInstalled gets the value of Installed for the instance +func (instance *Win32_NetworkAdapter) GetPropertyInstalled() (value bool, err error) { + retValue, err := instance.GetProperty("Installed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetInterfaceIndex sets the value of InterfaceIndex for the instance +func (instance *Win32_NetworkAdapter) SetPropertyInterfaceIndex(value uint32) (err error) { + return instance.SetProperty("InterfaceIndex", (value)) +} + +// GetInterfaceIndex gets the value of InterfaceIndex for the instance +func (instance *Win32_NetworkAdapter) GetPropertyInterfaceIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("InterfaceIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMACAddress sets the value of MACAddress for the instance +func (instance *Win32_NetworkAdapter) SetPropertyMACAddress(value string) (err error) { + return instance.SetProperty("MACAddress", (value)) +} + +// GetMACAddress gets the value of MACAddress for the instance +func (instance *Win32_NetworkAdapter) GetPropertyMACAddress() (value string, err error) { + retValue, err := instance.GetProperty("MACAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_NetworkAdapter) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_NetworkAdapter) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaxNumberControlled sets the value of MaxNumberControlled for the instance +func (instance *Win32_NetworkAdapter) SetPropertyMaxNumberControlled(value uint32) (err error) { + return instance.SetProperty("MaxNumberControlled", (value)) +} + +// GetMaxNumberControlled gets the value of MaxNumberControlled for the instance +func (instance *Win32_NetworkAdapter) GetPropertyMaxNumberControlled() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxNumberControlled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNetConnectionID sets the value of NetConnectionID for the instance +func (instance *Win32_NetworkAdapter) SetPropertyNetConnectionID(value string) (err error) { + return instance.SetProperty("NetConnectionID", (value)) +} + +// GetNetConnectionID gets the value of NetConnectionID for the instance +func (instance *Win32_NetworkAdapter) GetPropertyNetConnectionID() (value string, err error) { + retValue, err := instance.GetProperty("NetConnectionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNetConnectionStatus sets the value of NetConnectionStatus for the instance +func (instance *Win32_NetworkAdapter) SetPropertyNetConnectionStatus(value uint16) (err error) { + return instance.SetProperty("NetConnectionStatus", (value)) +} + +// GetNetConnectionStatus gets the value of NetConnectionStatus for the instance +func (instance *Win32_NetworkAdapter) GetPropertyNetConnectionStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("NetConnectionStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNetEnabled sets the value of NetEnabled for the instance +func (instance *Win32_NetworkAdapter) SetPropertyNetEnabled(value bool) (err error) { + return instance.SetProperty("NetEnabled", (value)) +} + +// GetNetEnabled gets the value of NetEnabled for the instance +func (instance *Win32_NetworkAdapter) GetPropertyNetEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("NetEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPhysicalAdapter sets the value of PhysicalAdapter for the instance +func (instance *Win32_NetworkAdapter) SetPropertyPhysicalAdapter(value bool) (err error) { + return instance.SetProperty("PhysicalAdapter", (value)) +} + +// GetPhysicalAdapter gets the value of PhysicalAdapter for the instance +func (instance *Win32_NetworkAdapter) GetPropertyPhysicalAdapter() (value bool, err error) { + retValue, err := instance.GetProperty("PhysicalAdapter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProductName sets the value of ProductName for the instance +func (instance *Win32_NetworkAdapter) SetPropertyProductName(value string) (err error) { + return instance.SetProperty("ProductName", (value)) +} + +// GetProductName gets the value of ProductName for the instance +func (instance *Win32_NetworkAdapter) GetPropertyProductName() (value string, err error) { + retValue, err := instance.GetProperty("ProductName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServiceName sets the value of ServiceName for the instance +func (instance *Win32_NetworkAdapter) SetPropertyServiceName(value string) (err error) { + return instance.SetProperty("ServiceName", (value)) +} + +// GetServiceName gets the value of ServiceName for the instance +func (instance *Win32_NetworkAdapter) GetPropertyServiceName() (value string, err error) { + retValue, err := instance.GetProperty("ServiceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeOfLastReset sets the value of TimeOfLastReset for the instance +func (instance *Win32_NetworkAdapter) SetPropertyTimeOfLastReset(value string) (err error) { + return instance.SetProperty("TimeOfLastReset", (value)) +} + +// GetTimeOfLastReset gets the value of TimeOfLastReset for the instance +func (instance *Win32_NetworkAdapter) GetPropertyTimeOfLastReset() (value string, err error) { + retValue, err := instance.GetProperty("TimeOfLastReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *Win32_NetworkAdapter) Enable() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Enable") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_NetworkAdapter) Disable() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Disable") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterConfiguration.go new file mode 100644 index 00000000..1c2234bf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterConfiguration.go @@ -0,0 +1,2430 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NetworkAdapterConfiguration struct +type Win32_NetworkAdapterConfiguration struct { + *CIM_Setting + + // + ArpAlwaysSourceRoute bool + + // + ArpUseEtherSNAP bool + + // + DatabasePath string + + // + DeadGWDetectEnabled bool + + // + DefaultIPGateway []string + + // + DefaultTOS uint8 + + // + DefaultTTL uint8 + + // + DHCPEnabled bool + + // + DHCPLeaseExpires string + + // + DHCPLeaseObtained string + + // + DHCPServer string + + // + DNSDomain string + + // + DNSDomainSuffixSearchOrder []string + + // + DNSEnabledForWINSResolution bool + + // + DNSHostName string + + // + DNSServerSearchOrder []string + + // + DomainDNSRegistrationEnabled bool + + // + ForwardBufferMemory uint32 + + // + FullDNSRegistrationEnabled bool + + // + GatewayCostMetric []uint16 + + // + IGMPLevel uint8 + + // + Index uint32 + + // + InterfaceIndex uint32 + + // + IPAddress []string + + // + IPConnectionMetric uint32 + + // + IPEnabled bool + + // + IPFilterSecurityEnabled bool + + // + IPPortSecurityEnabled bool + + // + IPSecPermitIPProtocols []string + + // + IPSecPermitTCPPorts []string + + // + IPSecPermitUDPPorts []string + + // + IPSubnet []string + + // + IPUseZeroBroadcast bool + + // + IPXAddress string + + // + IPXEnabled bool + + // + IPXFrameType []uint32 + + // + IPXMediaType uint32 + + // + IPXNetworkNumber []string + + // + IPXVirtualNetNumber string + + // + KeepAliveInterval uint32 + + // + KeepAliveTime uint32 + + // + MACAddress string + + // + MTU uint32 + + // + NumForwardPackets uint32 + + // + PMTUBHDetectEnabled bool + + // + PMTUDiscoveryEnabled bool + + // + ServiceName string + + // + TcpipNetbiosOptions uint32 + + // + TcpMaxConnectRetransmissions uint32 + + // + TcpMaxDataRetransmissions uint32 + + // + TcpNumConnections uint32 + + // + TcpUseRFC1122UrgentPointer bool + + // + TcpWindowSize uint16 + + // + WINSEnableLMHostsLookup bool + + // + WINSHostLookupFile string + + // + WINSPrimaryServer string + + // + WINSScopeID string + + // + WINSSecondaryServer string +} + +func NewWin32_NetworkAdapterConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkAdapterConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkAdapterConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_NetworkAdapterConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkAdapterConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkAdapterConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetArpAlwaysSourceRoute sets the value of ArpAlwaysSourceRoute for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyArpAlwaysSourceRoute(value bool) (err error) { + return instance.SetProperty("ArpAlwaysSourceRoute", (value)) +} + +// GetArpAlwaysSourceRoute gets the value of ArpAlwaysSourceRoute for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyArpAlwaysSourceRoute() (value bool, err error) { + retValue, err := instance.GetProperty("ArpAlwaysSourceRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetArpUseEtherSNAP sets the value of ArpUseEtherSNAP for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyArpUseEtherSNAP(value bool) (err error) { + return instance.SetProperty("ArpUseEtherSNAP", (value)) +} + +// GetArpUseEtherSNAP gets the value of ArpUseEtherSNAP for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyArpUseEtherSNAP() (value bool, err error) { + retValue, err := instance.GetProperty("ArpUseEtherSNAP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDatabasePath sets the value of DatabasePath for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDatabasePath(value string) (err error) { + return instance.SetProperty("DatabasePath", (value)) +} + +// GetDatabasePath gets the value of DatabasePath for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDatabasePath() (value string, err error) { + retValue, err := instance.GetProperty("DatabasePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeadGWDetectEnabled sets the value of DeadGWDetectEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDeadGWDetectEnabled(value bool) (err error) { + return instance.SetProperty("DeadGWDetectEnabled", (value)) +} + +// GetDeadGWDetectEnabled gets the value of DeadGWDetectEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDeadGWDetectEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("DeadGWDetectEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDefaultIPGateway sets the value of DefaultIPGateway for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDefaultIPGateway(value []string) (err error) { + return instance.SetProperty("DefaultIPGateway", (value)) +} + +// GetDefaultIPGateway gets the value of DefaultIPGateway for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDefaultIPGateway() (value []string, err error) { + retValue, err := instance.GetProperty("DefaultIPGateway") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDefaultTOS sets the value of DefaultTOS for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDefaultTOS(value uint8) (err error) { + return instance.SetProperty("DefaultTOS", (value)) +} + +// GetDefaultTOS gets the value of DefaultTOS for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDefaultTOS() (value uint8, err error) { + retValue, err := instance.GetProperty("DefaultTOS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetDefaultTTL sets the value of DefaultTTL for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDefaultTTL(value uint8) (err error) { + return instance.SetProperty("DefaultTTL", (value)) +} + +// GetDefaultTTL gets the value of DefaultTTL for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDefaultTTL() (value uint8, err error) { + retValue, err := instance.GetProperty("DefaultTTL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetDHCPEnabled sets the value of DHCPEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDHCPEnabled(value bool) (err error) { + return instance.SetProperty("DHCPEnabled", (value)) +} + +// GetDHCPEnabled gets the value of DHCPEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDHCPEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("DHCPEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDHCPLeaseExpires sets the value of DHCPLeaseExpires for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDHCPLeaseExpires(value string) (err error) { + return instance.SetProperty("DHCPLeaseExpires", (value)) +} + +// GetDHCPLeaseExpires gets the value of DHCPLeaseExpires for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDHCPLeaseExpires() (value string, err error) { + retValue, err := instance.GetProperty("DHCPLeaseExpires") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDHCPLeaseObtained sets the value of DHCPLeaseObtained for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDHCPLeaseObtained(value string) (err error) { + return instance.SetProperty("DHCPLeaseObtained", (value)) +} + +// GetDHCPLeaseObtained gets the value of DHCPLeaseObtained for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDHCPLeaseObtained() (value string, err error) { + retValue, err := instance.GetProperty("DHCPLeaseObtained") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDHCPServer sets the value of DHCPServer for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDHCPServer(value string) (err error) { + return instance.SetProperty("DHCPServer", (value)) +} + +// GetDHCPServer gets the value of DHCPServer for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDHCPServer() (value string, err error) { + retValue, err := instance.GetProperty("DHCPServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDNSDomain sets the value of DNSDomain for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDNSDomain(value string) (err error) { + return instance.SetProperty("DNSDomain", (value)) +} + +// GetDNSDomain gets the value of DNSDomain for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDNSDomain() (value string, err error) { + retValue, err := instance.GetProperty("DNSDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDNSDomainSuffixSearchOrder sets the value of DNSDomainSuffixSearchOrder for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDNSDomainSuffixSearchOrder(value []string) (err error) { + return instance.SetProperty("DNSDomainSuffixSearchOrder", (value)) +} + +// GetDNSDomainSuffixSearchOrder gets the value of DNSDomainSuffixSearchOrder for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDNSDomainSuffixSearchOrder() (value []string, err error) { + retValue, err := instance.GetProperty("DNSDomainSuffixSearchOrder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDNSEnabledForWINSResolution sets the value of DNSEnabledForWINSResolution for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDNSEnabledForWINSResolution(value bool) (err error) { + return instance.SetProperty("DNSEnabledForWINSResolution", (value)) +} + +// GetDNSEnabledForWINSResolution gets the value of DNSEnabledForWINSResolution for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDNSEnabledForWINSResolution() (value bool, err error) { + retValue, err := instance.GetProperty("DNSEnabledForWINSResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDNSHostName sets the value of DNSHostName for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDNSHostName(value string) (err error) { + return instance.SetProperty("DNSHostName", (value)) +} + +// GetDNSHostName gets the value of DNSHostName for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDNSHostName() (value string, err error) { + retValue, err := instance.GetProperty("DNSHostName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDNSServerSearchOrder sets the value of DNSServerSearchOrder for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDNSServerSearchOrder(value []string) (err error) { + return instance.SetProperty("DNSServerSearchOrder", (value)) +} + +// GetDNSServerSearchOrder gets the value of DNSServerSearchOrder for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDNSServerSearchOrder() (value []string, err error) { + retValue, err := instance.GetProperty("DNSServerSearchOrder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDomainDNSRegistrationEnabled sets the value of DomainDNSRegistrationEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyDomainDNSRegistrationEnabled(value bool) (err error) { + return instance.SetProperty("DomainDNSRegistrationEnabled", (value)) +} + +// GetDomainDNSRegistrationEnabled gets the value of DomainDNSRegistrationEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyDomainDNSRegistrationEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("DomainDNSRegistrationEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetForwardBufferMemory sets the value of ForwardBufferMemory for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyForwardBufferMemory(value uint32) (err error) { + return instance.SetProperty("ForwardBufferMemory", (value)) +} + +// GetForwardBufferMemory gets the value of ForwardBufferMemory for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyForwardBufferMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("ForwardBufferMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFullDNSRegistrationEnabled sets the value of FullDNSRegistrationEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyFullDNSRegistrationEnabled(value bool) (err error) { + return instance.SetProperty("FullDNSRegistrationEnabled", (value)) +} + +// GetFullDNSRegistrationEnabled gets the value of FullDNSRegistrationEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyFullDNSRegistrationEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("FullDNSRegistrationEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetGatewayCostMetric sets the value of GatewayCostMetric for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyGatewayCostMetric(value []uint16) (err error) { + return instance.SetProperty("GatewayCostMetric", (value)) +} + +// GetGatewayCostMetric gets the value of GatewayCostMetric for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyGatewayCostMetric() (value []uint16, err error) { + retValue, err := instance.GetProperty("GatewayCostMetric") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetIGMPLevel sets the value of IGMPLevel for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIGMPLevel(value uint8) (err error) { + return instance.SetProperty("IGMPLevel", (value)) +} + +// GetIGMPLevel gets the value of IGMPLevel for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIGMPLevel() (value uint8, err error) { + retValue, err := instance.GetProperty("IGMPLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetIndex sets the value of Index for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIndex(value uint32) (err error) { + return instance.SetProperty("Index", (value)) +} + +// GetIndex gets the value of Index for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("Index") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterfaceIndex sets the value of InterfaceIndex for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyInterfaceIndex(value uint32) (err error) { + return instance.SetProperty("InterfaceIndex", (value)) +} + +// GetInterfaceIndex gets the value of InterfaceIndex for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyInterfaceIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("InterfaceIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPAddress sets the value of IPAddress for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPAddress(value []string) (err error) { + return instance.SetProperty("IPAddress", (value)) +} + +// GetIPAddress gets the value of IPAddress for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPAddress() (value []string, err error) { + retValue, err := instance.GetProperty("IPAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIPConnectionMetric sets the value of IPConnectionMetric for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPConnectionMetric(value uint32) (err error) { + return instance.SetProperty("IPConnectionMetric", (value)) +} + +// GetIPConnectionMetric gets the value of IPConnectionMetric for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPConnectionMetric() (value uint32, err error) { + retValue, err := instance.GetProperty("IPConnectionMetric") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPEnabled sets the value of IPEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPEnabled(value bool) (err error) { + return instance.SetProperty("IPEnabled", (value)) +} + +// GetIPEnabled gets the value of IPEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IPEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIPFilterSecurityEnabled sets the value of IPFilterSecurityEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPFilterSecurityEnabled(value bool) (err error) { + return instance.SetProperty("IPFilterSecurityEnabled", (value)) +} + +// GetIPFilterSecurityEnabled gets the value of IPFilterSecurityEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPFilterSecurityEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IPFilterSecurityEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIPPortSecurityEnabled sets the value of IPPortSecurityEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPPortSecurityEnabled(value bool) (err error) { + return instance.SetProperty("IPPortSecurityEnabled", (value)) +} + +// GetIPPortSecurityEnabled gets the value of IPPortSecurityEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPPortSecurityEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IPPortSecurityEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIPSecPermitIPProtocols sets the value of IPSecPermitIPProtocols for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPSecPermitIPProtocols(value []string) (err error) { + return instance.SetProperty("IPSecPermitIPProtocols", (value)) +} + +// GetIPSecPermitIPProtocols gets the value of IPSecPermitIPProtocols for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPSecPermitIPProtocols() (value []string, err error) { + retValue, err := instance.GetProperty("IPSecPermitIPProtocols") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIPSecPermitTCPPorts sets the value of IPSecPermitTCPPorts for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPSecPermitTCPPorts(value []string) (err error) { + return instance.SetProperty("IPSecPermitTCPPorts", (value)) +} + +// GetIPSecPermitTCPPorts gets the value of IPSecPermitTCPPorts for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPSecPermitTCPPorts() (value []string, err error) { + retValue, err := instance.GetProperty("IPSecPermitTCPPorts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIPSecPermitUDPPorts sets the value of IPSecPermitUDPPorts for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPSecPermitUDPPorts(value []string) (err error) { + return instance.SetProperty("IPSecPermitUDPPorts", (value)) +} + +// GetIPSecPermitUDPPorts gets the value of IPSecPermitUDPPorts for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPSecPermitUDPPorts() (value []string, err error) { + retValue, err := instance.GetProperty("IPSecPermitUDPPorts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIPSubnet sets the value of IPSubnet for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPSubnet(value []string) (err error) { + return instance.SetProperty("IPSubnet", (value)) +} + +// GetIPSubnet gets the value of IPSubnet for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPSubnet() (value []string, err error) { + retValue, err := instance.GetProperty("IPSubnet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIPUseZeroBroadcast sets the value of IPUseZeroBroadcast for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPUseZeroBroadcast(value bool) (err error) { + return instance.SetProperty("IPUseZeroBroadcast", (value)) +} + +// GetIPUseZeroBroadcast gets the value of IPUseZeroBroadcast for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPUseZeroBroadcast() (value bool, err error) { + retValue, err := instance.GetProperty("IPUseZeroBroadcast") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIPXAddress sets the value of IPXAddress for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPXAddress(value string) (err error) { + return instance.SetProperty("IPXAddress", (value)) +} + +// GetIPXAddress gets the value of IPXAddress for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPXAddress() (value string, err error) { + retValue, err := instance.GetProperty("IPXAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIPXEnabled sets the value of IPXEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPXEnabled(value bool) (err error) { + return instance.SetProperty("IPXEnabled", (value)) +} + +// GetIPXEnabled gets the value of IPXEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPXEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IPXEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIPXFrameType sets the value of IPXFrameType for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPXFrameType(value []uint32) (err error) { + return instance.SetProperty("IPXFrameType", (value)) +} + +// GetIPXFrameType gets the value of IPXFrameType for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPXFrameType() (value []uint32, err error) { + retValue, err := instance.GetProperty("IPXFrameType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint32(valuetmp)) + } + + return +} + +// SetIPXMediaType sets the value of IPXMediaType for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPXMediaType(value uint32) (err error) { + return instance.SetProperty("IPXMediaType", (value)) +} + +// GetIPXMediaType gets the value of IPXMediaType for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPXMediaType() (value uint32, err error) { + retValue, err := instance.GetProperty("IPXMediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPXNetworkNumber sets the value of IPXNetworkNumber for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPXNetworkNumber(value []string) (err error) { + return instance.SetProperty("IPXNetworkNumber", (value)) +} + +// GetIPXNetworkNumber gets the value of IPXNetworkNumber for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPXNetworkNumber() (value []string, err error) { + retValue, err := instance.GetProperty("IPXNetworkNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIPXVirtualNetNumber sets the value of IPXVirtualNetNumber for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyIPXVirtualNetNumber(value string) (err error) { + return instance.SetProperty("IPXVirtualNetNumber", (value)) +} + +// GetIPXVirtualNetNumber gets the value of IPXVirtualNetNumber for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyIPXVirtualNetNumber() (value string, err error) { + retValue, err := instance.GetProperty("IPXVirtualNetNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeepAliveInterval sets the value of KeepAliveInterval for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyKeepAliveInterval(value uint32) (err error) { + return instance.SetProperty("KeepAliveInterval", (value)) +} + +// GetKeepAliveInterval gets the value of KeepAliveInterval for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyKeepAliveInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("KeepAliveInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKeepAliveTime sets the value of KeepAliveTime for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyKeepAliveTime(value uint32) (err error) { + return instance.SetProperty("KeepAliveTime", (value)) +} + +// GetKeepAliveTime gets the value of KeepAliveTime for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyKeepAliveTime() (value uint32, err error) { + retValue, err := instance.GetProperty("KeepAliveTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMACAddress sets the value of MACAddress for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyMACAddress(value string) (err error) { + return instance.SetProperty("MACAddress", (value)) +} + +// GetMACAddress gets the value of MACAddress for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyMACAddress() (value string, err error) { + retValue, err := instance.GetProperty("MACAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMTU sets the value of MTU for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyMTU(value uint32) (err error) { + return instance.SetProperty("MTU", (value)) +} + +// GetMTU gets the value of MTU for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyMTU() (value uint32, err error) { + retValue, err := instance.GetProperty("MTU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumForwardPackets sets the value of NumForwardPackets for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyNumForwardPackets(value uint32) (err error) { + return instance.SetProperty("NumForwardPackets", (value)) +} + +// GetNumForwardPackets gets the value of NumForwardPackets for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyNumForwardPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("NumForwardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPMTUBHDetectEnabled sets the value of PMTUBHDetectEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyPMTUBHDetectEnabled(value bool) (err error) { + return instance.SetProperty("PMTUBHDetectEnabled", (value)) +} + +// GetPMTUBHDetectEnabled gets the value of PMTUBHDetectEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyPMTUBHDetectEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("PMTUBHDetectEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPMTUDiscoveryEnabled sets the value of PMTUDiscoveryEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyPMTUDiscoveryEnabled(value bool) (err error) { + return instance.SetProperty("PMTUDiscoveryEnabled", (value)) +} + +// GetPMTUDiscoveryEnabled gets the value of PMTUDiscoveryEnabled for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyPMTUDiscoveryEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("PMTUDiscoveryEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetServiceName sets the value of ServiceName for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyServiceName(value string) (err error) { + return instance.SetProperty("ServiceName", (value)) +} + +// GetServiceName gets the value of ServiceName for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyServiceName() (value string, err error) { + retValue, err := instance.GetProperty("ServiceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTcpipNetbiosOptions sets the value of TcpipNetbiosOptions for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyTcpipNetbiosOptions(value uint32) (err error) { + return instance.SetProperty("TcpipNetbiosOptions", (value)) +} + +// GetTcpipNetbiosOptions gets the value of TcpipNetbiosOptions for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyTcpipNetbiosOptions() (value uint32, err error) { + retValue, err := instance.GetProperty("TcpipNetbiosOptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTcpMaxConnectRetransmissions sets the value of TcpMaxConnectRetransmissions for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyTcpMaxConnectRetransmissions(value uint32) (err error) { + return instance.SetProperty("TcpMaxConnectRetransmissions", (value)) +} + +// GetTcpMaxConnectRetransmissions gets the value of TcpMaxConnectRetransmissions for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyTcpMaxConnectRetransmissions() (value uint32, err error) { + retValue, err := instance.GetProperty("TcpMaxConnectRetransmissions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTcpMaxDataRetransmissions sets the value of TcpMaxDataRetransmissions for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyTcpMaxDataRetransmissions(value uint32) (err error) { + return instance.SetProperty("TcpMaxDataRetransmissions", (value)) +} + +// GetTcpMaxDataRetransmissions gets the value of TcpMaxDataRetransmissions for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyTcpMaxDataRetransmissions() (value uint32, err error) { + retValue, err := instance.GetProperty("TcpMaxDataRetransmissions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTcpNumConnections sets the value of TcpNumConnections for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyTcpNumConnections(value uint32) (err error) { + return instance.SetProperty("TcpNumConnections", (value)) +} + +// GetTcpNumConnections gets the value of TcpNumConnections for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyTcpNumConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TcpNumConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTcpUseRFC1122UrgentPointer sets the value of TcpUseRFC1122UrgentPointer for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyTcpUseRFC1122UrgentPointer(value bool) (err error) { + return instance.SetProperty("TcpUseRFC1122UrgentPointer", (value)) +} + +// GetTcpUseRFC1122UrgentPointer gets the value of TcpUseRFC1122UrgentPointer for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyTcpUseRFC1122UrgentPointer() (value bool, err error) { + retValue, err := instance.GetProperty("TcpUseRFC1122UrgentPointer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTcpWindowSize sets the value of TcpWindowSize for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyTcpWindowSize(value uint16) (err error) { + return instance.SetProperty("TcpWindowSize", (value)) +} + +// GetTcpWindowSize gets the value of TcpWindowSize for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyTcpWindowSize() (value uint16, err error) { + retValue, err := instance.GetProperty("TcpWindowSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWINSEnableLMHostsLookup sets the value of WINSEnableLMHostsLookup for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyWINSEnableLMHostsLookup(value bool) (err error) { + return instance.SetProperty("WINSEnableLMHostsLookup", (value)) +} + +// GetWINSEnableLMHostsLookup gets the value of WINSEnableLMHostsLookup for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyWINSEnableLMHostsLookup() (value bool, err error) { + retValue, err := instance.GetProperty("WINSEnableLMHostsLookup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWINSHostLookupFile sets the value of WINSHostLookupFile for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyWINSHostLookupFile(value string) (err error) { + return instance.SetProperty("WINSHostLookupFile", (value)) +} + +// GetWINSHostLookupFile gets the value of WINSHostLookupFile for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyWINSHostLookupFile() (value string, err error) { + retValue, err := instance.GetProperty("WINSHostLookupFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWINSPrimaryServer sets the value of WINSPrimaryServer for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyWINSPrimaryServer(value string) (err error) { + return instance.SetProperty("WINSPrimaryServer", (value)) +} + +// GetWINSPrimaryServer gets the value of WINSPrimaryServer for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyWINSPrimaryServer() (value string, err error) { + retValue, err := instance.GetProperty("WINSPrimaryServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWINSScopeID sets the value of WINSScopeID for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyWINSScopeID(value string) (err error) { + return instance.SetProperty("WINSScopeID", (value)) +} + +// GetWINSScopeID gets the value of WINSScopeID for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyWINSScopeID() (value string, err error) { + retValue, err := instance.GetProperty("WINSScopeID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWINSSecondaryServer sets the value of WINSSecondaryServer for the instance +func (instance *Win32_NetworkAdapterConfiguration) SetPropertyWINSSecondaryServer(value string) (err error) { + return instance.SetProperty("WINSSecondaryServer", (value)) +} + +// GetWINSSecondaryServer gets the value of WINSSecondaryServer for the instance +func (instance *Win32_NetworkAdapterConfiguration) GetPropertyWINSSecondaryServer() (value string, err error) { + retValue, err := instance.GetProperty("WINSSecondaryServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) EnableDHCP() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableDHCP") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) RenewDHCPLease() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RenewDHCPLease") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) RenewDHCPLeaseAll() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RenewDHCPLeaseAll") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) ReleaseDHCPLease() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ReleaseDHCPLease") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) ReleaseDHCPLeaseAll() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ReleaseDHCPLeaseAll") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) EnableStatic( /* IN */ IPAddress []string, + /* IN */ SubnetMask []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableStatic", IPAddress, SubnetMask) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetGateways( /* IN */ DefaultIPGateway []string, + /* OPTIONAL IN */ GatewayCostMetric []uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetGateways", DefaultIPGateway, GatewayCostMetric) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) EnableDNS( /* OPTIONAL IN */ DNSHostName string, + /* OPTIONAL IN */ DNSDomain string, + /* OPTIONAL IN */ DNSServerSearchOrder []string, + /* OPTIONAL IN */ DNSDomainSuffixSearchOrder []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableDNS", DNSHostName, DNSDomain, DNSServerSearchOrder, DNSDomainSuffixSearchOrder) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDNSDomain( /* IN */ DNSDomain string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDNSDomain", DNSDomain) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDNSServerSearchOrder( /* IN */ DNSServerSearchOrder []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDNSServerSearchOrder", DNSServerSearchOrder) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDNSSuffixSearchOrder( /* IN */ DNSDomainSuffixSearchOrder []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDNSSuffixSearchOrder", DNSDomainSuffixSearchOrder) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDynamicDNSRegistration( /* IN */ FullDNSRegistrationEnabled bool, + /* OPTIONAL IN */ DomainDNSRegistrationEnabled bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDynamicDNSRegistration", FullDNSRegistrationEnabled, DomainDNSRegistrationEnabled) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetIPConnectionMetric( /* IN */ IPConnectionMetric uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetIPConnectionMetric", IPConnectionMetric) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetWINSServer( /* IN */ WINSPrimaryServer string, + /* IN */ WINSSecondaryServer string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetWINSServer", WINSPrimaryServer, WINSSecondaryServer) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) EnableWINS( /* IN */ DNSEnabledForWINSResolution bool, + /* IN */ WINSEnableLMHostsLookup bool, + /* OPTIONAL IN */ WINSHostLookupFile string, + /* OPTIONAL IN */ WINSScopeID string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableWINS", DNSEnabledForWINSResolution, WINSEnableLMHostsLookup, WINSHostLookupFile, WINSScopeID) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetTcpipNetbios( /* IN */ TcpipNetbiosOptions uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetTcpipNetbios", TcpipNetbiosOptions) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) EnableIPSec( /* IN */ IPSecPermitTCPPorts []string, + /* IN */ IPSecPermitUDPPorts []string, + /* IN */ IPSecPermitIPProtocols []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableIPSec", IPSecPermitTCPPorts, IPSecPermitUDPPorts, IPSecPermitIPProtocols) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) DisableIPSec() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DisableIPSec") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetIPXVirtualNetworkNumber( /* IN */ IPXVirtualNetNumber string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetIPXVirtualNetworkNumber", IPXVirtualNetNumber) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetIPXFrameTypeNetworkPairs( /* IN */ IPXNetworkNumber []string, + /* IN */ IPXFrameType []uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetIPXFrameTypeNetworkPairs", IPXNetworkNumber, IPXFrameType) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDatabasePath( /* IN */ DatabasePath string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDatabasePath", DatabasePath) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetIPUseZeroBroadcast( /* IN */ IPUseZeroBroadcast bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetIPUseZeroBroadcast", IPUseZeroBroadcast) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetArpAlwaysSourceRoute( /* IN */ ArpAlwaysSourceRoute bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetArpAlwaysSourceRoute", ArpAlwaysSourceRoute) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetArpUseEtherSNAP( /* IN */ ArpUseEtherSNAP bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetArpUseEtherSNAP", ArpUseEtherSNAP) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDefaultTOS( /* IN */ DefaultTOS uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDefaultTOS", DefaultTOS) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDefaultTTL( /* IN */ DefaultTTL uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDefaultTTL", DefaultTTL) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetDeadGWDetect( /* IN */ DeadGWDetectEnabled bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDeadGWDetect", DeadGWDetectEnabled) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetPMTUBHDetect( /* IN */ PMTUBHDetectEnabled bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPMTUBHDetect", PMTUBHDetectEnabled) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetPMTUDiscovery( /* IN */ PMTUDiscoveryEnabled bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPMTUDiscovery", PMTUDiscoveryEnabled) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetForwardBufferMemory( /* IN */ ForwardBufferMemory uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetForwardBufferMemory", ForwardBufferMemory) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetIGMPLevel( /* IN */ IGMPLevel uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetIGMPLevel", IGMPLevel) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetKeepAliveInterval( /* IN */ KeepAliveInterval uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeepAliveInterval", KeepAliveInterval) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetKeepAliveTime( /* IN */ KeepAliveTime uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetKeepAliveTime", KeepAliveTime) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetMTU( /* IN */ MTU uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetMTU", MTU) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetNumForwardPackets( /* IN */ NumForwardPackets uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetNumForwardPackets", NumForwardPackets) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetTcpMaxConnectRetransmissions( /* IN */ TcpMaxConnectRetransmissions uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetTcpMaxConnectRetransmissions", TcpMaxConnectRetransmissions) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetTcpMaxDataRetransmissions( /* IN */ TcpMaxDataRetransmissions uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetTcpMaxDataRetransmissions", TcpMaxDataRetransmissions) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetTcpNumConnections( /* IN */ TcpNumConnections uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetTcpNumConnections", TcpNumConnections) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetTcpUseRFC1122UrgentPointer( /* IN */ TcpUseRFC1122UrgentPointer bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetTcpUseRFC1122UrgentPointer", TcpUseRFC1122UrgentPointer) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) SetTcpWindowSize( /* IN */ TcpWindowSize uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetTcpWindowSize", TcpWindowSize) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_NetworkAdapterConfiguration) EnableIPFilterSec( /* IN */ IPFilterSecurityEnabled bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("EnableIPFilterSec", IPFilterSecurityEnabled) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterSetting.go new file mode 100644 index 00000000..7786007f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkAdapterSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_NetworkAdapterSetting struct +type Win32_NetworkAdapterSetting struct { + *Win32_DeviceSettings +} + +func NewWin32_NetworkAdapterSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkAdapterSetting, err error) { + tmp, err := NewWin32_DeviceSettingsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkAdapterSetting{ + Win32_DeviceSettings: tmp, + } + return +} + +func NewWin32_NetworkAdapterSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkAdapterSetting, err error) { + tmp, err := NewWin32_DeviceSettingsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkAdapterSetting{ + Win32_DeviceSettings: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkClient.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkClient.go new file mode 100644 index 00000000..74856c2c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkClient.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NetworkClient struct +type Win32_NetworkClient struct { + *CIM_LogicalElement + + // + Manufacturer string +} + +func NewWin32_NetworkClientEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkClient, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkClient{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_NetworkClientEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkClient, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkClient{ + CIM_LogicalElement: tmp, + } + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_NetworkClient) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_NetworkClient) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkConnection.go new file mode 100644 index 00000000..9368f6df --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkConnection.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NetworkConnection struct +type Win32_NetworkConnection struct { + *CIM_LogicalElement + + // + AccessMask uint32 + + // + Comment string + + // + ConnectionState string + + // + ConnectionType string + + // + DisplayType string + + // + LocalName string + + // + Persistent bool + + // + ProviderName string + + // + RemoteName string + + // + RemotePath string + + // + ResourceType string + + // + UserName string +} + +func NewWin32_NetworkConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkConnection, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkConnection{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_NetworkConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkConnection, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkConnection{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAccessMask sets the value of AccessMask for the instance +func (instance *Win32_NetworkConnection) SetPropertyAccessMask(value uint32) (err error) { + return instance.SetProperty("AccessMask", (value)) +} + +// GetAccessMask gets the value of AccessMask for the instance +func (instance *Win32_NetworkConnection) GetPropertyAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetComment sets the value of Comment for the instance +func (instance *Win32_NetworkConnection) SetPropertyComment(value string) (err error) { + return instance.SetProperty("Comment", (value)) +} + +// GetComment gets the value of Comment for the instance +func (instance *Win32_NetworkConnection) GetPropertyComment() (value string, err error) { + retValue, err := instance.GetProperty("Comment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConnectionState sets the value of ConnectionState for the instance +func (instance *Win32_NetworkConnection) SetPropertyConnectionState(value string) (err error) { + return instance.SetProperty("ConnectionState", (value)) +} + +// GetConnectionState gets the value of ConnectionState for the instance +func (instance *Win32_NetworkConnection) GetPropertyConnectionState() (value string, err error) { + retValue, err := instance.GetProperty("ConnectionState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConnectionType sets the value of ConnectionType for the instance +func (instance *Win32_NetworkConnection) SetPropertyConnectionType(value string) (err error) { + return instance.SetProperty("ConnectionType", (value)) +} + +// GetConnectionType gets the value of ConnectionType for the instance +func (instance *Win32_NetworkConnection) GetPropertyConnectionType() (value string, err error) { + retValue, err := instance.GetProperty("ConnectionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDisplayType sets the value of DisplayType for the instance +func (instance *Win32_NetworkConnection) SetPropertyDisplayType(value string) (err error) { + return instance.SetProperty("DisplayType", (value)) +} + +// GetDisplayType gets the value of DisplayType for the instance +func (instance *Win32_NetworkConnection) GetPropertyDisplayType() (value string, err error) { + retValue, err := instance.GetProperty("DisplayType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalName sets the value of LocalName for the instance +func (instance *Win32_NetworkConnection) SetPropertyLocalName(value string) (err error) { + return instance.SetProperty("LocalName", (value)) +} + +// GetLocalName gets the value of LocalName for the instance +func (instance *Win32_NetworkConnection) GetPropertyLocalName() (value string, err error) { + retValue, err := instance.GetProperty("LocalName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPersistent sets the value of Persistent for the instance +func (instance *Win32_NetworkConnection) SetPropertyPersistent(value bool) (err error) { + return instance.SetProperty("Persistent", (value)) +} + +// GetPersistent gets the value of Persistent for the instance +func (instance *Win32_NetworkConnection) GetPropertyPersistent() (value bool, err error) { + retValue, err := instance.GetProperty("Persistent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *Win32_NetworkConnection) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *Win32_NetworkConnection) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteName sets the value of RemoteName for the instance +func (instance *Win32_NetworkConnection) SetPropertyRemoteName(value string) (err error) { + return instance.SetProperty("RemoteName", (value)) +} + +// GetRemoteName gets the value of RemoteName for the instance +func (instance *Win32_NetworkConnection) GetPropertyRemoteName() (value string, err error) { + retValue, err := instance.GetProperty("RemoteName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemotePath sets the value of RemotePath for the instance +func (instance *Win32_NetworkConnection) SetPropertyRemotePath(value string) (err error) { + return instance.SetProperty("RemotePath", (value)) +} + +// GetRemotePath gets the value of RemotePath for the instance +func (instance *Win32_NetworkConnection) GetPropertyRemotePath() (value string, err error) { + retValue, err := instance.GetProperty("RemotePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResourceType sets the value of ResourceType for the instance +func (instance *Win32_NetworkConnection) SetPropertyResourceType(value string) (err error) { + return instance.SetProperty("ResourceType", (value)) +} + +// GetResourceType gets the value of ResourceType for the instance +func (instance *Win32_NetworkConnection) GetPropertyResourceType() (value string, err error) { + retValue, err := instance.GetProperty("ResourceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserName sets the value of UserName for the instance +func (instance *Win32_NetworkConnection) SetPropertyUserName(value string) (err error) { + return instance.SetProperty("UserName", (value)) +} + +// GetUserName gets the value of UserName for the instance +func (instance *Win32_NetworkConnection) GetPropertyUserName() (value string, err error) { + retValue, err := instance.GetProperty("UserName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkLoginProfile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkLoginProfile.go new file mode 100644 index 00000000..c26ec5a1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkLoginProfile.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NetworkLoginProfile struct +type Win32_NetworkLoginProfile struct { + *CIM_Setting + + // + AccountExpires string + + // + AuthorizationFlags uint32 + + // + BadPasswordCount uint32 + + // + CodePage uint32 + + // + Comment string + + // + CountryCode uint32 + + // + Flags uint32 + + // + FullName string + + // + HomeDirectory string + + // + HomeDirectoryDrive string + + // + LastLogoff string + + // + LastLogon string + + // + LogonHours string + + // + LogonServer string + + // + MaximumStorage uint64 + + // + Name string + + // + NumberOfLogons uint32 + + // + Parameters string + + // + PasswordAge string + + // + PasswordExpires string + + // + PrimaryGroupId uint32 + + // + Privileges uint32 + + // + Profile string + + // + ScriptPath string + + // + UnitsPerWeek uint32 + + // + UserComment string + + // + UserId uint32 + + // + UserType string + + // + Workstations string +} + +func NewWin32_NetworkLoginProfileEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkLoginProfile, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkLoginProfile{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_NetworkLoginProfileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkLoginProfile, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkLoginProfile{ + CIM_Setting: tmp, + } + return +} + +// SetAccountExpires sets the value of AccountExpires for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyAccountExpires(value string) (err error) { + return instance.SetProperty("AccountExpires", (value)) +} + +// GetAccountExpires gets the value of AccountExpires for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyAccountExpires() (value string, err error) { + retValue, err := instance.GetProperty("AccountExpires") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAuthorizationFlags sets the value of AuthorizationFlags for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyAuthorizationFlags(value uint32) (err error) { + return instance.SetProperty("AuthorizationFlags", (value)) +} + +// GetAuthorizationFlags gets the value of AuthorizationFlags for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyAuthorizationFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthorizationFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBadPasswordCount sets the value of BadPasswordCount for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyBadPasswordCount(value uint32) (err error) { + return instance.SetProperty("BadPasswordCount", (value)) +} + +// GetBadPasswordCount gets the value of BadPasswordCount for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyBadPasswordCount() (value uint32, err error) { + retValue, err := instance.GetProperty("BadPasswordCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCodePage sets the value of CodePage for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyCodePage(value uint32) (err error) { + return instance.SetProperty("CodePage", (value)) +} + +// GetCodePage gets the value of CodePage for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyCodePage() (value uint32, err error) { + retValue, err := instance.GetProperty("CodePage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetComment sets the value of Comment for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyComment(value string) (err error) { + return instance.SetProperty("Comment", (value)) +} + +// GetComment gets the value of Comment for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyComment() (value string, err error) { + retValue, err := instance.GetProperty("Comment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCountryCode sets the value of CountryCode for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyCountryCode(value uint32) (err error) { + return instance.SetProperty("CountryCode", (value)) +} + +// GetCountryCode gets the value of CountryCode for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyCountryCode() (value uint32, err error) { + retValue, err := instance.GetProperty("CountryCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyFlags(value uint32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFullName sets the value of FullName for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyFullName(value string) (err error) { + return instance.SetProperty("FullName", (value)) +} + +// GetFullName gets the value of FullName for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyFullName() (value string, err error) { + retValue, err := instance.GetProperty("FullName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHomeDirectory sets the value of HomeDirectory for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyHomeDirectory(value string) (err error) { + return instance.SetProperty("HomeDirectory", (value)) +} + +// GetHomeDirectory gets the value of HomeDirectory for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyHomeDirectory() (value string, err error) { + retValue, err := instance.GetProperty("HomeDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHomeDirectoryDrive sets the value of HomeDirectoryDrive for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyHomeDirectoryDrive(value string) (err error) { + return instance.SetProperty("HomeDirectoryDrive", (value)) +} + +// GetHomeDirectoryDrive gets the value of HomeDirectoryDrive for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyHomeDirectoryDrive() (value string, err error) { + retValue, err := instance.GetProperty("HomeDirectoryDrive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastLogoff sets the value of LastLogoff for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyLastLogoff(value string) (err error) { + return instance.SetProperty("LastLogoff", (value)) +} + +// GetLastLogoff gets the value of LastLogoff for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyLastLogoff() (value string, err error) { + retValue, err := instance.GetProperty("LastLogoff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastLogon sets the value of LastLogon for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyLastLogon(value string) (err error) { + return instance.SetProperty("LastLogon", (value)) +} + +// GetLastLogon gets the value of LastLogon for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyLastLogon() (value string, err error) { + retValue, err := instance.GetProperty("LastLogon") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLogonHours sets the value of LogonHours for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyLogonHours(value string) (err error) { + return instance.SetProperty("LogonHours", (value)) +} + +// GetLogonHours gets the value of LogonHours for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyLogonHours() (value string, err error) { + retValue, err := instance.GetProperty("LogonHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLogonServer sets the value of LogonServer for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyLogonServer(value string) (err error) { + return instance.SetProperty("LogonServer", (value)) +} + +// GetLogonServer gets the value of LogonServer for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyLogonServer() (value string, err error) { + retValue, err := instance.GetProperty("LogonServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumStorage sets the value of MaximumStorage for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyMaximumStorage(value uint64) (err error) { + return instance.SetProperty("MaximumStorage", (value)) +} + +// GetMaximumStorage gets the value of MaximumStorage for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyMaximumStorage() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumStorage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNumberOfLogons sets the value of NumberOfLogons for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyNumberOfLogons(value uint32) (err error) { + return instance.SetProperty("NumberOfLogons", (value)) +} + +// GetNumberOfLogons gets the value of NumberOfLogons for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyNumberOfLogons() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfLogons") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetParameters sets the value of Parameters for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyParameters(value string) (err error) { + return instance.SetProperty("Parameters", (value)) +} + +// GetParameters gets the value of Parameters for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyParameters() (value string, err error) { + retValue, err := instance.GetProperty("Parameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPasswordAge sets the value of PasswordAge for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyPasswordAge(value string) (err error) { + return instance.SetProperty("PasswordAge", (value)) +} + +// GetPasswordAge gets the value of PasswordAge for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyPasswordAge() (value string, err error) { + retValue, err := instance.GetProperty("PasswordAge") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPasswordExpires sets the value of PasswordExpires for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyPasswordExpires(value string) (err error) { + return instance.SetProperty("PasswordExpires", (value)) +} + +// GetPasswordExpires gets the value of PasswordExpires for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyPasswordExpires() (value string, err error) { + retValue, err := instance.GetProperty("PasswordExpires") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrimaryGroupId sets the value of PrimaryGroupId for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyPrimaryGroupId(value uint32) (err error) { + return instance.SetProperty("PrimaryGroupId", (value)) +} + +// GetPrimaryGroupId gets the value of PrimaryGroupId for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyPrimaryGroupId() (value uint32, err error) { + retValue, err := instance.GetProperty("PrimaryGroupId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivileges sets the value of Privileges for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyPrivileges(value uint32) (err error) { + return instance.SetProperty("Privileges", (value)) +} + +// GetPrivileges gets the value of Privileges for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyPrivileges() (value uint32, err error) { + retValue, err := instance.GetProperty("Privileges") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProfile sets the value of Profile for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyProfile(value string) (err error) { + return instance.SetProperty("Profile", (value)) +} + +// GetProfile gets the value of Profile for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyProfile() (value string, err error) { + retValue, err := instance.GetProperty("Profile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetScriptPath sets the value of ScriptPath for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyScriptPath(value string) (err error) { + return instance.SetProperty("ScriptPath", (value)) +} + +// GetScriptPath gets the value of ScriptPath for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyScriptPath() (value string, err error) { + retValue, err := instance.GetProperty("ScriptPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUnitsPerWeek sets the value of UnitsPerWeek for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyUnitsPerWeek(value uint32) (err error) { + return instance.SetProperty("UnitsPerWeek", (value)) +} + +// GetUnitsPerWeek gets the value of UnitsPerWeek for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyUnitsPerWeek() (value uint32, err error) { + retValue, err := instance.GetProperty("UnitsPerWeek") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUserComment sets the value of UserComment for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyUserComment(value string) (err error) { + return instance.SetProperty("UserComment", (value)) +} + +// GetUserComment gets the value of UserComment for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyUserComment() (value string, err error) { + retValue, err := instance.GetProperty("UserComment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserId sets the value of UserId for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyUserId(value uint32) (err error) { + return instance.SetProperty("UserId", (value)) +} + +// GetUserId gets the value of UserId for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyUserId() (value uint32, err error) { + retValue, err := instance.GetProperty("UserId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUserType sets the value of UserType for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyUserType(value string) (err error) { + return instance.SetProperty("UserType", (value)) +} + +// GetUserType gets the value of UserType for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyUserType() (value string, err error) { + retValue, err := instance.GetProperty("UserType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWorkstations sets the value of Workstations for the instance +func (instance *Win32_NetworkLoginProfile) SetPropertyWorkstations(value string) (err error) { + return instance.SetProperty("Workstations", (value)) +} + +// GetWorkstations gets the value of Workstations for the instance +func (instance *Win32_NetworkLoginProfile) GetPropertyWorkstations() (value string, err error) { + retValue, err := instance.GetProperty("Workstations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkProtocol.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkProtocol.go new file mode 100644 index 00000000..89bf344f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_NetworkProtocol.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_NetworkProtocol struct +type Win32_NetworkProtocol struct { + *CIM_LogicalElement + + // + ConnectionlessService bool + + // + GuaranteesDelivery bool + + // + GuaranteesSequencing bool + + // + MaximumAddressSize uint32 + + // + MaximumMessageSize uint32 + + // + MessageOriented bool + + // + MinimumAddressSize uint32 + + // + PseudoStreamOriented bool + + // + SupportsBroadcasting bool + + // + SupportsConnectData bool + + // + SupportsDisconnectData bool + + // + SupportsEncryption bool + + // + SupportsExpeditedData bool + + // + SupportsFragmentation bool + + // + SupportsGracefulClosing bool + + // + SupportsGuaranteedBandwidth bool + + // + SupportsMulticasting bool + + // + SupportsQualityofService bool +} + +func NewWin32_NetworkProtocolEx1(instance *cim.WmiInstance) (newInstance *Win32_NetworkProtocol, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_NetworkProtocol{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_NetworkProtocolEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_NetworkProtocol, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_NetworkProtocol{ + CIM_LogicalElement: tmp, + } + return +} + +// SetConnectionlessService sets the value of ConnectionlessService for the instance +func (instance *Win32_NetworkProtocol) SetPropertyConnectionlessService(value bool) (err error) { + return instance.SetProperty("ConnectionlessService", (value)) +} + +// GetConnectionlessService gets the value of ConnectionlessService for the instance +func (instance *Win32_NetworkProtocol) GetPropertyConnectionlessService() (value bool, err error) { + retValue, err := instance.GetProperty("ConnectionlessService") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetGuaranteesDelivery sets the value of GuaranteesDelivery for the instance +func (instance *Win32_NetworkProtocol) SetPropertyGuaranteesDelivery(value bool) (err error) { + return instance.SetProperty("GuaranteesDelivery", (value)) +} + +// GetGuaranteesDelivery gets the value of GuaranteesDelivery for the instance +func (instance *Win32_NetworkProtocol) GetPropertyGuaranteesDelivery() (value bool, err error) { + retValue, err := instance.GetProperty("GuaranteesDelivery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetGuaranteesSequencing sets the value of GuaranteesSequencing for the instance +func (instance *Win32_NetworkProtocol) SetPropertyGuaranteesSequencing(value bool) (err error) { + return instance.SetProperty("GuaranteesSequencing", (value)) +} + +// GetGuaranteesSequencing gets the value of GuaranteesSequencing for the instance +func (instance *Win32_NetworkProtocol) GetPropertyGuaranteesSequencing() (value bool, err error) { + retValue, err := instance.GetProperty("GuaranteesSequencing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMaximumAddressSize sets the value of MaximumAddressSize for the instance +func (instance *Win32_NetworkProtocol) SetPropertyMaximumAddressSize(value uint32) (err error) { + return instance.SetProperty("MaximumAddressSize", (value)) +} + +// GetMaximumAddressSize gets the value of MaximumAddressSize for the instance +func (instance *Win32_NetworkProtocol) GetPropertyMaximumAddressSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumAddressSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumMessageSize sets the value of MaximumMessageSize for the instance +func (instance *Win32_NetworkProtocol) SetPropertyMaximumMessageSize(value uint32) (err error) { + return instance.SetProperty("MaximumMessageSize", (value)) +} + +// GetMaximumMessageSize gets the value of MaximumMessageSize for the instance +func (instance *Win32_NetworkProtocol) GetPropertyMaximumMessageSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumMessageSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessageOriented sets the value of MessageOriented for the instance +func (instance *Win32_NetworkProtocol) SetPropertyMessageOriented(value bool) (err error) { + return instance.SetProperty("MessageOriented", (value)) +} + +// GetMessageOriented gets the value of MessageOriented for the instance +func (instance *Win32_NetworkProtocol) GetPropertyMessageOriented() (value bool, err error) { + retValue, err := instance.GetProperty("MessageOriented") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMinimumAddressSize sets the value of MinimumAddressSize for the instance +func (instance *Win32_NetworkProtocol) SetPropertyMinimumAddressSize(value uint32) (err error) { + return instance.SetProperty("MinimumAddressSize", (value)) +} + +// GetMinimumAddressSize gets the value of MinimumAddressSize for the instance +func (instance *Win32_NetworkProtocol) GetPropertyMinimumAddressSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MinimumAddressSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPseudoStreamOriented sets the value of PseudoStreamOriented for the instance +func (instance *Win32_NetworkProtocol) SetPropertyPseudoStreamOriented(value bool) (err error) { + return instance.SetProperty("PseudoStreamOriented", (value)) +} + +// GetPseudoStreamOriented gets the value of PseudoStreamOriented for the instance +func (instance *Win32_NetworkProtocol) GetPropertyPseudoStreamOriented() (value bool, err error) { + retValue, err := instance.GetProperty("PseudoStreamOriented") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsBroadcasting sets the value of SupportsBroadcasting for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsBroadcasting(value bool) (err error) { + return instance.SetProperty("SupportsBroadcasting", (value)) +} + +// GetSupportsBroadcasting gets the value of SupportsBroadcasting for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsBroadcasting() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsBroadcasting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsConnectData sets the value of SupportsConnectData for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsConnectData(value bool) (err error) { + return instance.SetProperty("SupportsConnectData", (value)) +} + +// GetSupportsConnectData gets the value of SupportsConnectData for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsConnectData() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsConnectData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsDisconnectData sets the value of SupportsDisconnectData for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsDisconnectData(value bool) (err error) { + return instance.SetProperty("SupportsDisconnectData", (value)) +} + +// GetSupportsDisconnectData gets the value of SupportsDisconnectData for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsDisconnectData() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDisconnectData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsEncryption sets the value of SupportsEncryption for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsEncryption(value bool) (err error) { + return instance.SetProperty("SupportsEncryption", (value)) +} + +// GetSupportsEncryption gets the value of SupportsEncryption for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsEncryption() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsEncryption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsExpeditedData sets the value of SupportsExpeditedData for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsExpeditedData(value bool) (err error) { + return instance.SetProperty("SupportsExpeditedData", (value)) +} + +// GetSupportsExpeditedData gets the value of SupportsExpeditedData for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsExpeditedData() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsExpeditedData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFragmentation sets the value of SupportsFragmentation for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsFragmentation(value bool) (err error) { + return instance.SetProperty("SupportsFragmentation", (value)) +} + +// GetSupportsFragmentation gets the value of SupportsFragmentation for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsFragmentation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsGracefulClosing sets the value of SupportsGracefulClosing for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsGracefulClosing(value bool) (err error) { + return instance.SetProperty("SupportsGracefulClosing", (value)) +} + +// GetSupportsGracefulClosing gets the value of SupportsGracefulClosing for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsGracefulClosing() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsGracefulClosing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsGuaranteedBandwidth sets the value of SupportsGuaranteedBandwidth for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsGuaranteedBandwidth(value bool) (err error) { + return instance.SetProperty("SupportsGuaranteedBandwidth", (value)) +} + +// GetSupportsGuaranteedBandwidth gets the value of SupportsGuaranteedBandwidth for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsGuaranteedBandwidth() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsGuaranteedBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsMulticasting sets the value of SupportsMulticasting for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsMulticasting(value bool) (err error) { + return instance.SetProperty("SupportsMulticasting", (value)) +} + +// GetSupportsMulticasting gets the value of SupportsMulticasting for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsMulticasting() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsMulticasting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsQualityofService sets the value of SupportsQualityofService for the instance +func (instance *Win32_NetworkProtocol) SetPropertySupportsQualityofService(value bool) (err error) { + return instance.SetProperty("SupportsQualityofService", (value)) +} + +// GetSupportsQualityofService gets the value of SupportsQualityofService for the instance +func (instance *Win32_NetworkProtocol) GetPropertySupportsQualityofService() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsQualityofService") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCAttribute.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCAttribute.go new file mode 100644 index 00000000..d612ebb5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCAttribute.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ODBCAttribute struct +type Win32_ODBCAttribute struct { + *CIM_Setting + + // + Attribute string + + // + Driver string + + // + Value string +} + +func NewWin32_ODBCAttributeEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCAttribute, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCAttribute{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_ODBCAttributeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCAttribute, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCAttribute{ + CIM_Setting: tmp, + } + return +} + +// SetAttribute sets the value of Attribute for the instance +func (instance *Win32_ODBCAttribute) SetPropertyAttribute(value string) (err error) { + return instance.SetProperty("Attribute", (value)) +} + +// GetAttribute gets the value of Attribute for the instance +func (instance *Win32_ODBCAttribute) GetPropertyAttribute() (value string, err error) { + retValue, err := instance.GetProperty("Attribute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriver sets the value of Driver for the instance +func (instance *Win32_ODBCAttribute) SetPropertyDriver(value string) (err error) { + return instance.SetProperty("Driver", (value)) +} + +// GetDriver gets the value of Driver for the instance +func (instance *Win32_ODBCAttribute) GetPropertyDriver() (value string, err error) { + retValue, err := instance.GetProperty("Driver") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *Win32_ODBCAttribute) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *Win32_ODBCAttribute) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceAttribute.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceAttribute.go new file mode 100644 index 00000000..d1d56a17 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceAttribute.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ODBCDataSourceAttribute struct +type Win32_ODBCDataSourceAttribute struct { + *Win32_SettingCheck +} + +func NewWin32_ODBCDataSourceAttributeEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCDataSourceAttribute, err error) { + tmp, err := NewWin32_SettingCheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCDataSourceAttribute{ + Win32_SettingCheck: tmp, + } + return +} + +func NewWin32_ODBCDataSourceAttributeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCDataSourceAttribute, err error) { + tmp, err := NewWin32_SettingCheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCDataSourceAttribute{ + Win32_SettingCheck: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceSpecification.go new file mode 100644 index 00000000..20e302a7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDataSourceSpecification.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ODBCDataSourceSpecification struct +type Win32_ODBCDataSourceSpecification struct { + *CIM_Check + + // + DataSource string + + // + DriverDescription string + + // + Registration string +} + +func NewWin32_ODBCDataSourceSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCDataSourceSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCDataSourceSpecification{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ODBCDataSourceSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCDataSourceSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCDataSourceSpecification{ + CIM_Check: tmp, + } + return +} + +// SetDataSource sets the value of DataSource for the instance +func (instance *Win32_ODBCDataSourceSpecification) SetPropertyDataSource(value string) (err error) { + return instance.SetProperty("DataSource", (value)) +} + +// GetDataSource gets the value of DataSource for the instance +func (instance *Win32_ODBCDataSourceSpecification) GetPropertyDataSource() (value string, err error) { + retValue, err := instance.GetProperty("DataSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverDescription sets the value of DriverDescription for the instance +func (instance *Win32_ODBCDataSourceSpecification) SetPropertyDriverDescription(value string) (err error) { + return instance.SetProperty("DriverDescription", (value)) +} + +// GetDriverDescription gets the value of DriverDescription for the instance +func (instance *Win32_ODBCDataSourceSpecification) GetPropertyDriverDescription() (value string, err error) { + retValue, err := instance.GetProperty("DriverDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRegistration sets the value of Registration for the instance +func (instance *Win32_ODBCDataSourceSpecification) SetPropertyRegistration(value string) (err error) { + return instance.SetProperty("Registration", (value)) +} + +// GetRegistration gets the value of Registration for the instance +func (instance *Win32_ODBCDataSourceSpecification) GetPropertyRegistration() (value string, err error) { + retValue, err := instance.GetProperty("Registration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverAttribute.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverAttribute.go new file mode 100644 index 00000000..66235e86 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverAttribute.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ODBCDriverAttribute struct +type Win32_ODBCDriverAttribute struct { + *Win32_SettingCheck +} + +func NewWin32_ODBCDriverAttributeEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCDriverAttribute, err error) { + tmp, err := NewWin32_SettingCheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCDriverAttribute{ + Win32_SettingCheck: tmp, + } + return +} + +func NewWin32_ODBCDriverAttributeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCDriverAttribute, err error) { + tmp, err := NewWin32_SettingCheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCDriverAttribute{ + Win32_SettingCheck: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSoftwareElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSoftwareElement.go new file mode 100644 index 00000000..e9288b88 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSoftwareElement.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ODBCDriverSoftwareElement struct +type Win32_ODBCDriverSoftwareElement struct { + *CIM_SoftwareElementChecks +} + +func NewWin32_ODBCDriverSoftwareElementEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCDriverSoftwareElement, err error) { + tmp, err := NewCIM_SoftwareElementChecksEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCDriverSoftwareElement{ + CIM_SoftwareElementChecks: tmp, + } + return +} + +func NewWin32_ODBCDriverSoftwareElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCDriverSoftwareElement, err error) { + tmp, err := NewCIM_SoftwareElementChecksEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCDriverSoftwareElement{ + CIM_SoftwareElementChecks: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSpecification.go new file mode 100644 index 00000000..68abeed2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCDriverSpecification.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ODBCDriverSpecification struct +type Win32_ODBCDriverSpecification struct { + *CIM_Check + + // + Driver string + + // + File string + + // + SetupFile string +} + +func NewWin32_ODBCDriverSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCDriverSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCDriverSpecification{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ODBCDriverSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCDriverSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCDriverSpecification{ + CIM_Check: tmp, + } + return +} + +// SetDriver sets the value of Driver for the instance +func (instance *Win32_ODBCDriverSpecification) SetPropertyDriver(value string) (err error) { + return instance.SetProperty("Driver", (value)) +} + +// GetDriver gets the value of Driver for the instance +func (instance *Win32_ODBCDriverSpecification) GetPropertyDriver() (value string, err error) { + retValue, err := instance.GetProperty("Driver") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFile sets the value of File for the instance +func (instance *Win32_ODBCDriverSpecification) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *Win32_ODBCDriverSpecification) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSetupFile sets the value of SetupFile for the instance +func (instance *Win32_ODBCDriverSpecification) SetPropertySetupFile(value string) (err error) { + return instance.SetProperty("SetupFile", (value)) +} + +// GetSetupFile gets the value of SetupFile for the instance +func (instance *Win32_ODBCDriverSpecification) GetPropertySetupFile() (value string, err error) { + retValue, err := instance.GetProperty("SetupFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCSourceAttribute.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCSourceAttribute.go new file mode 100644 index 00000000..b3a78adb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCSourceAttribute.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ODBCSourceAttribute struct +type Win32_ODBCSourceAttribute struct { + *CIM_Setting + + // + Attribute string + + // + DataSource string + + // + Value string +} + +func NewWin32_ODBCSourceAttributeEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCSourceAttribute, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCSourceAttribute{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_ODBCSourceAttributeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCSourceAttribute, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCSourceAttribute{ + CIM_Setting: tmp, + } + return +} + +// SetAttribute sets the value of Attribute for the instance +func (instance *Win32_ODBCSourceAttribute) SetPropertyAttribute(value string) (err error) { + return instance.SetProperty("Attribute", (value)) +} + +// GetAttribute gets the value of Attribute for the instance +func (instance *Win32_ODBCSourceAttribute) GetPropertyAttribute() (value string, err error) { + retValue, err := instance.GetProperty("Attribute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDataSource sets the value of DataSource for the instance +func (instance *Win32_ODBCSourceAttribute) SetPropertyDataSource(value string) (err error) { + return instance.SetProperty("DataSource", (value)) +} + +// GetDataSource gets the value of DataSource for the instance +func (instance *Win32_ODBCSourceAttribute) GetPropertyDataSource() (value string, err error) { + retValue, err := instance.GetProperty("DataSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *Win32_ODBCSourceAttribute) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *Win32_ODBCSourceAttribute) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCTranslatorSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCTranslatorSpecification.go new file mode 100644 index 00000000..b89560e6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ODBCTranslatorSpecification.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ODBCTranslatorSpecification struct +type Win32_ODBCTranslatorSpecification struct { + *CIM_Check + + // + File string + + // + SetupFile string + + // + Translator string +} + +func NewWin32_ODBCTranslatorSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_ODBCTranslatorSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ODBCTranslatorSpecification{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ODBCTranslatorSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ODBCTranslatorSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ODBCTranslatorSpecification{ + CIM_Check: tmp, + } + return +} + +// SetFile sets the value of File for the instance +func (instance *Win32_ODBCTranslatorSpecification) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *Win32_ODBCTranslatorSpecification) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSetupFile sets the value of SetupFile for the instance +func (instance *Win32_ODBCTranslatorSpecification) SetPropertySetupFile(value string) (err error) { + return instance.SetProperty("SetupFile", (value)) +} + +// GetSetupFile gets the value of SetupFile for the instance +func (instance *Win32_ODBCTranslatorSpecification) GetPropertySetupFile() (value string, err error) { + retValue, err := instance.GetProperty("SetupFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTranslator sets the value of Translator for the instance +func (instance *Win32_ODBCTranslatorSpecification) SetPropertyTranslator(value string) (err error) { + return instance.SetProperty("Translator", (value)) +} + +// GetTranslator gets the value of Translator for the instance +func (instance *Win32_ODBCTranslatorSpecification) GetPropertyTranslator() (value string, err error) { + retValue, err := instance.GetProperty("Translator") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OSRecoveryConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OSRecoveryConfiguration.go new file mode 100644 index 00000000..4839e3e2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OSRecoveryConfiguration.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OSRecoveryConfiguration struct +type Win32_OSRecoveryConfiguration struct { + *CIM_Setting + + // + AutoReboot bool + + // + DebugFilePath string + + // + DebugInfoType uint32 + + // + ExpandedDebugFilePath string + + // + ExpandedMiniDumpDirectory string + + // + KernelDumpOnly bool + + // + MiniDumpDirectory string + + // + Name string + + // + OverwriteExistingDebugFile bool + + // + SendAdminAlert bool + + // + WriteDebugInfo bool + + // + WriteToSystemLog bool +} + +func NewWin32_OSRecoveryConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_OSRecoveryConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_OSRecoveryConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_OSRecoveryConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OSRecoveryConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OSRecoveryConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetAutoReboot sets the value of AutoReboot for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyAutoReboot(value bool) (err error) { + return instance.SetProperty("AutoReboot", (value)) +} + +// GetAutoReboot gets the value of AutoReboot for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyAutoReboot() (value bool, err error) { + retValue, err := instance.GetProperty("AutoReboot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDebugFilePath sets the value of DebugFilePath for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyDebugFilePath(value string) (err error) { + return instance.SetProperty("DebugFilePath", (value)) +} + +// GetDebugFilePath gets the value of DebugFilePath for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyDebugFilePath() (value string, err error) { + retValue, err := instance.GetProperty("DebugFilePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDebugInfoType sets the value of DebugInfoType for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyDebugInfoType(value uint32) (err error) { + return instance.SetProperty("DebugInfoType", (value)) +} + +// GetDebugInfoType gets the value of DebugInfoType for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyDebugInfoType() (value uint32, err error) { + retValue, err := instance.GetProperty("DebugInfoType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExpandedDebugFilePath sets the value of ExpandedDebugFilePath for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyExpandedDebugFilePath(value string) (err error) { + return instance.SetProperty("ExpandedDebugFilePath", (value)) +} + +// GetExpandedDebugFilePath gets the value of ExpandedDebugFilePath for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyExpandedDebugFilePath() (value string, err error) { + retValue, err := instance.GetProperty("ExpandedDebugFilePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExpandedMiniDumpDirectory sets the value of ExpandedMiniDumpDirectory for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyExpandedMiniDumpDirectory(value string) (err error) { + return instance.SetProperty("ExpandedMiniDumpDirectory", (value)) +} + +// GetExpandedMiniDumpDirectory gets the value of ExpandedMiniDumpDirectory for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyExpandedMiniDumpDirectory() (value string, err error) { + retValue, err := instance.GetProperty("ExpandedMiniDumpDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKernelDumpOnly sets the value of KernelDumpOnly for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyKernelDumpOnly(value bool) (err error) { + return instance.SetProperty("KernelDumpOnly", (value)) +} + +// GetKernelDumpOnly gets the value of KernelDumpOnly for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyKernelDumpOnly() (value bool, err error) { + retValue, err := instance.GetProperty("KernelDumpOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMiniDumpDirectory sets the value of MiniDumpDirectory for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyMiniDumpDirectory(value string) (err error) { + return instance.SetProperty("MiniDumpDirectory", (value)) +} + +// GetMiniDumpDirectory gets the value of MiniDumpDirectory for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyMiniDumpDirectory() (value string, err error) { + retValue, err := instance.GetProperty("MiniDumpDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOverwriteExistingDebugFile sets the value of OverwriteExistingDebugFile for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyOverwriteExistingDebugFile(value bool) (err error) { + return instance.SetProperty("OverwriteExistingDebugFile", (value)) +} + +// GetOverwriteExistingDebugFile gets the value of OverwriteExistingDebugFile for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyOverwriteExistingDebugFile() (value bool, err error) { + retValue, err := instance.GetProperty("OverwriteExistingDebugFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSendAdminAlert sets the value of SendAdminAlert for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertySendAdminAlert(value bool) (err error) { + return instance.SetProperty("SendAdminAlert", (value)) +} + +// GetSendAdminAlert gets the value of SendAdminAlert for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertySendAdminAlert() (value bool, err error) { + retValue, err := instance.GetProperty("SendAdminAlert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWriteDebugInfo sets the value of WriteDebugInfo for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyWriteDebugInfo(value bool) (err error) { + return instance.SetProperty("WriteDebugInfo", (value)) +} + +// GetWriteDebugInfo gets the value of WriteDebugInfo for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyWriteDebugInfo() (value bool, err error) { + retValue, err := instance.GetProperty("WriteDebugInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWriteToSystemLog sets the value of WriteToSystemLog for the instance +func (instance *Win32_OSRecoveryConfiguration) SetPropertyWriteToSystemLog(value bool) (err error) { + return instance.SetProperty("WriteToSystemLog", (value)) +} + +// GetWriteToSystemLog gets the value of WriteToSystemLog for the instance +func (instance *Win32_OSRecoveryConfiguration) GetPropertyWriteToSystemLog() (value bool, err error) { + retValue, err := instance.GetProperty("WriteToSystemLog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesAssociatedItems.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesAssociatedItems.go new file mode 100644 index 00000000..48d34bc7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesAssociatedItems.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesAssociatedItems struct +type Win32_OfflineFilesAssociatedItems struct { + *cim.WmiInstance + + // + Antecedent Win32_OfflineFilesCache + + // + Dependent Win32_OfflineFilesItem +} + +func NewWin32_OfflineFilesAssociatedItemsEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesAssociatedItems, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesAssociatedItems{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesAssociatedItemsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesAssociatedItems, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesAssociatedItems{ + WmiInstance: tmp, + } + return +} + +// SetAntecedent sets the value of Antecedent for the instance +func (instance *Win32_OfflineFilesAssociatedItems) SetPropertyAntecedent(value Win32_OfflineFilesCache) (err error) { + return instance.SetProperty("Antecedent", (value)) +} + +// GetAntecedent gets the value of Antecedent for the instance +func (instance *Win32_OfflineFilesAssociatedItems) GetPropertyAntecedent() (value Win32_OfflineFilesCache, err error) { + retValue, err := instance.GetProperty("Antecedent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesCache) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesCache is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesCache(valuetmp) + + return +} + +// SetDependent sets the value of Dependent for the instance +func (instance *Win32_OfflineFilesAssociatedItems) SetPropertyDependent(value Win32_OfflineFilesItem) (err error) { + return instance.SetProperty("Dependent", (value)) +} + +// GetDependent gets the value of Dependent for the instance +func (instance *Win32_OfflineFilesAssociatedItems) GetPropertyDependent() (value Win32_OfflineFilesItem, err error) { + retValue, err := instance.GetProperty("Dependent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesItem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesItem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesItem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesBackgroundSync.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesBackgroundSync.go new file mode 100644 index 00000000..98330b6a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesBackgroundSync.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesBackgroundSync struct +type Win32_OfflineFilesBackgroundSync struct { + *cim.WmiInstance + + // + BackgroundSyncWorkOfflineSharesEnabled bool + + // + BlockOutDurationMin uint16 + + // + BlockOutStartTimeHoursMinutes uint16 + + // + MaxTimeBetweenSyncs uint16 + + // + SyncInterval uint16 + + // + SyncVariance uint16 +} + +func NewWin32_OfflineFilesBackgroundSyncEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesBackgroundSync, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesBackgroundSync{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesBackgroundSyncEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesBackgroundSync, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesBackgroundSync{ + WmiInstance: tmp, + } + return +} + +// SetBackgroundSyncWorkOfflineSharesEnabled sets the value of BackgroundSyncWorkOfflineSharesEnabled for the instance +func (instance *Win32_OfflineFilesBackgroundSync) SetPropertyBackgroundSyncWorkOfflineSharesEnabled(value bool) (err error) { + return instance.SetProperty("BackgroundSyncWorkOfflineSharesEnabled", (value)) +} + +// GetBackgroundSyncWorkOfflineSharesEnabled gets the value of BackgroundSyncWorkOfflineSharesEnabled for the instance +func (instance *Win32_OfflineFilesBackgroundSync) GetPropertyBackgroundSyncWorkOfflineSharesEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("BackgroundSyncWorkOfflineSharesEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBlockOutDurationMin sets the value of BlockOutDurationMin for the instance +func (instance *Win32_OfflineFilesBackgroundSync) SetPropertyBlockOutDurationMin(value uint16) (err error) { + return instance.SetProperty("BlockOutDurationMin", (value)) +} + +// GetBlockOutDurationMin gets the value of BlockOutDurationMin for the instance +func (instance *Win32_OfflineFilesBackgroundSync) GetPropertyBlockOutDurationMin() (value uint16, err error) { + retValue, err := instance.GetProperty("BlockOutDurationMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetBlockOutStartTimeHoursMinutes sets the value of BlockOutStartTimeHoursMinutes for the instance +func (instance *Win32_OfflineFilesBackgroundSync) SetPropertyBlockOutStartTimeHoursMinutes(value uint16) (err error) { + return instance.SetProperty("BlockOutStartTimeHoursMinutes", (value)) +} + +// GetBlockOutStartTimeHoursMinutes gets the value of BlockOutStartTimeHoursMinutes for the instance +func (instance *Win32_OfflineFilesBackgroundSync) GetPropertyBlockOutStartTimeHoursMinutes() (value uint16, err error) { + retValue, err := instance.GetProperty("BlockOutStartTimeHoursMinutes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxTimeBetweenSyncs sets the value of MaxTimeBetweenSyncs for the instance +func (instance *Win32_OfflineFilesBackgroundSync) SetPropertyMaxTimeBetweenSyncs(value uint16) (err error) { + return instance.SetProperty("MaxTimeBetweenSyncs", (value)) +} + +// GetMaxTimeBetweenSyncs gets the value of MaxTimeBetweenSyncs for the instance +func (instance *Win32_OfflineFilesBackgroundSync) GetPropertyMaxTimeBetweenSyncs() (value uint16, err error) { + retValue, err := instance.GetProperty("MaxTimeBetweenSyncs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSyncInterval sets the value of SyncInterval for the instance +func (instance *Win32_OfflineFilesBackgroundSync) SetPropertySyncInterval(value uint16) (err error) { + return instance.SetProperty("SyncInterval", (value)) +} + +// GetSyncInterval gets the value of SyncInterval for the instance +func (instance *Win32_OfflineFilesBackgroundSync) GetPropertySyncInterval() (value uint16, err error) { + retValue, err := instance.GetProperty("SyncInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSyncVariance sets the value of SyncVariance for the instance +func (instance *Win32_OfflineFilesBackgroundSync) SetPropertySyncVariance(value uint16) (err error) { + return instance.SetProperty("SyncVariance", (value)) +} + +// GetSyncVariance gets the value of SyncVariance for the instance +func (instance *Win32_OfflineFilesBackgroundSync) GetPropertySyncVariance() (value uint16, err error) { + retValue, err := instance.GetProperty("SyncVariance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesCache.go new file mode 100644 index 00000000..3c171bfa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesCache.go @@ -0,0 +1,342 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesCache struct +type Win32_OfflineFilesCache struct { + *cim.WmiInstance + + // + Active bool + + // + Enabled bool + + // + Location string +} + +func NewWin32_OfflineFilesCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesCache, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesCache{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesCache, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesCache{ + WmiInstance: tmp, + } + return +} + +// SetActive sets the value of Active for the instance +func (instance *Win32_OfflineFilesCache) SetPropertyActive(value bool) (err error) { + return instance.SetProperty("Active", (value)) +} + +// GetActive gets the value of Active for the instance +func (instance *Win32_OfflineFilesCache) GetPropertyActive() (value bool, err error) { + retValue, err := instance.GetProperty("Active") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnabled sets the value of Enabled for the instance +func (instance *Win32_OfflineFilesCache) SetPropertyEnabled(value bool) (err error) { + return instance.SetProperty("Enabled", (value)) +} + +// GetEnabled gets the value of Enabled for the instance +func (instance *Win32_OfflineFilesCache) GetPropertyEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("Enabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_OfflineFilesCache) SetPropertyLocation(value string) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_OfflineFilesCache) GetPropertyLocation() (value string, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// + +// +// +func (instance *Win32_OfflineFilesCache) Enable( /* IN */ Enable bool, + /* OUT */ RebootRequired bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Enable", Enable) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +func (instance *Win32_OfflineFilesCache) RenameItem( /* IN */ OriginalPath string, + /* IN */ NewPath string, + /* IN */ ReplaceIfExists bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RenameItem", OriginalPath, NewPath, ReplaceIfExists) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_OfflineFilesCache) RenameItemEx( /* IN */ OriginalPath string, + /* IN */ NewPath string, + /* IN */ ReplaceIfExists bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RenameItemEx", OriginalPath, NewPath, ReplaceIfExists) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_OfflineFilesCache) Synchronize( /* IN */ Paths []string, + /* IN */ Flags uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Synchronize", Paths, Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_OfflineFilesCache) Pin( /* IN */ Paths []string, + /* IN */ Flags uint32, + /* IN */ Deep bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Pin", Paths, Flags, Deep) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_OfflineFilesCache) Unpin( /* IN */ Paths []string, + /* IN */ Flags uint32, + /* IN */ Deep bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Unpin", Paths, Flags, Deep) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_OfflineFilesCache) DeleteItems( /* IN */ Paths []string, + /* IN */ Flags uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DeleteItems", Paths, Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_OfflineFilesCache) Encrypt( /* IN */ Encrypt bool, + /* IN */ Flags uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Encrypt", Encrypt, Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_OfflineFilesCache) SuspendRoot( /* IN */ Path string, + /* IN */ Suspend bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SuspendRoot", Path, Suspend) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +// +func (instance *Win32_OfflineFilesCache) TransitionOffline( /* IN */ Path string, + /* IN */ Force bool, + /* IN */ Flags uint32, + /* OUT */ OpenFiles bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("TransitionOffline", Path, Force, Flags) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +func (instance *Win32_OfflineFilesCache) TransitionOnline( /* IN */ Path string, + /* IN */ Flags uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("TransitionOnline", Path, Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesChangeInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesChangeInfo.go new file mode 100644 index 00000000..d8152665 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesChangeInfo.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesChangeInfo struct +type Win32_OfflineFilesChangeInfo struct { + *cim.WmiInstance + + // + CreatedOffline bool + + // + DeletedOffline bool + + // + Dirty bool + + // + ModifiedAttributes bool + + // + ModifiedData bool + + // + ModifiedTime bool +} + +func NewWin32_OfflineFilesChangeInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesChangeInfo, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesChangeInfo{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesChangeInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesChangeInfo, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesChangeInfo{ + WmiInstance: tmp, + } + return +} + +// SetCreatedOffline sets the value of CreatedOffline for the instance +func (instance *Win32_OfflineFilesChangeInfo) SetPropertyCreatedOffline(value bool) (err error) { + return instance.SetProperty("CreatedOffline", (value)) +} + +// GetCreatedOffline gets the value of CreatedOffline for the instance +func (instance *Win32_OfflineFilesChangeInfo) GetPropertyCreatedOffline() (value bool, err error) { + retValue, err := instance.GetProperty("CreatedOffline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDeletedOffline sets the value of DeletedOffline for the instance +func (instance *Win32_OfflineFilesChangeInfo) SetPropertyDeletedOffline(value bool) (err error) { + return instance.SetProperty("DeletedOffline", (value)) +} + +// GetDeletedOffline gets the value of DeletedOffline for the instance +func (instance *Win32_OfflineFilesChangeInfo) GetPropertyDeletedOffline() (value bool, err error) { + retValue, err := instance.GetProperty("DeletedOffline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDirty sets the value of Dirty for the instance +func (instance *Win32_OfflineFilesChangeInfo) SetPropertyDirty(value bool) (err error) { + return instance.SetProperty("Dirty", (value)) +} + +// GetDirty gets the value of Dirty for the instance +func (instance *Win32_OfflineFilesChangeInfo) GetPropertyDirty() (value bool, err error) { + retValue, err := instance.GetProperty("Dirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetModifiedAttributes sets the value of ModifiedAttributes for the instance +func (instance *Win32_OfflineFilesChangeInfo) SetPropertyModifiedAttributes(value bool) (err error) { + return instance.SetProperty("ModifiedAttributes", (value)) +} + +// GetModifiedAttributes gets the value of ModifiedAttributes for the instance +func (instance *Win32_OfflineFilesChangeInfo) GetPropertyModifiedAttributes() (value bool, err error) { + retValue, err := instance.GetProperty("ModifiedAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetModifiedData sets the value of ModifiedData for the instance +func (instance *Win32_OfflineFilesChangeInfo) SetPropertyModifiedData(value bool) (err error) { + return instance.SetProperty("ModifiedData", (value)) +} + +// GetModifiedData gets the value of ModifiedData for the instance +func (instance *Win32_OfflineFilesChangeInfo) GetPropertyModifiedData() (value bool, err error) { + retValue, err := instance.GetProperty("ModifiedData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetModifiedTime sets the value of ModifiedTime for the instance +func (instance *Win32_OfflineFilesChangeInfo) SetPropertyModifiedTime(value bool) (err error) { + return instance.SetProperty("ModifiedTime", (value)) +} + +// GetModifiedTime gets the value of ModifiedTime for the instance +func (instance *Win32_OfflineFilesChangeInfo) GetPropertyModifiedTime() (value bool, err error) { + retValue, err := instance.GetProperty("ModifiedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesConnectionInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesConnectionInfo.go new file mode 100644 index 00000000..fdde4ccd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesConnectionInfo.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesConnectionInfo struct +type Win32_OfflineFilesConnectionInfo struct { + *cim.WmiInstance + + // + ConnectState uint32 + + // + OfflineReason uint32 +} + +func NewWin32_OfflineFilesConnectionInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesConnectionInfo, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesConnectionInfo{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesConnectionInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesConnectionInfo, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesConnectionInfo{ + WmiInstance: tmp, + } + return +} + +// SetConnectState sets the value of ConnectState for the instance +func (instance *Win32_OfflineFilesConnectionInfo) SetPropertyConnectState(value uint32) (err error) { + return instance.SetProperty("ConnectState", (value)) +} + +// GetConnectState gets the value of ConnectState for the instance +func (instance *Win32_OfflineFilesConnectionInfo) GetPropertyConnectState() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOfflineReason sets the value of OfflineReason for the instance +func (instance *Win32_OfflineFilesConnectionInfo) SetPropertyOfflineReason(value uint32) (err error) { + return instance.SetProperty("OfflineReason", (value)) +} + +// GetOfflineReason gets the value of OfflineReason for the instance +func (instance *Win32_OfflineFilesConnectionInfo) GetPropertyOfflineReason() (value uint32, err error) { + retValue, err := instance.GetProperty("OfflineReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDirtyInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDirtyInfo.go new file mode 100644 index 00000000..173397b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDirtyInfo.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesDirtyInfo struct +type Win32_OfflineFilesDirtyInfo struct { + *cim.WmiInstance + + // + LocalDirtyByteCount int64 + + // + RemoteDirtyByteCount int64 +} + +func NewWin32_OfflineFilesDirtyInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesDirtyInfo, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesDirtyInfo{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesDirtyInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesDirtyInfo, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesDirtyInfo{ + WmiInstance: tmp, + } + return +} + +// SetLocalDirtyByteCount sets the value of LocalDirtyByteCount for the instance +func (instance *Win32_OfflineFilesDirtyInfo) SetPropertyLocalDirtyByteCount(value int64) (err error) { + return instance.SetProperty("LocalDirtyByteCount", (value)) +} + +// GetLocalDirtyByteCount gets the value of LocalDirtyByteCount for the instance +func (instance *Win32_OfflineFilesDirtyInfo) GetPropertyLocalDirtyByteCount() (value int64, err error) { + retValue, err := instance.GetProperty("LocalDirtyByteCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetRemoteDirtyByteCount sets the value of RemoteDirtyByteCount for the instance +func (instance *Win32_OfflineFilesDirtyInfo) SetPropertyRemoteDirtyByteCount(value int64) (err error) { + return instance.SetProperty("RemoteDirtyByteCount", (value)) +} + +// GetRemoteDirtyByteCount gets the value of RemoteDirtyByteCount for the instance +func (instance *Win32_OfflineFilesDirtyInfo) GetPropertyRemoteDirtyByteCount() (value int64, err error) { + retValue, err := instance.GetProperty("RemoteDirtyByteCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDiskSpaceLimit.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDiskSpaceLimit.go new file mode 100644 index 00000000..c4427aa9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesDiskSpaceLimit.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesDiskSpaceLimit struct +type Win32_OfflineFilesDiskSpaceLimit struct { + *cim.WmiInstance + + // + AutoCacheSizeInMB uint32 + + // + TotalSizeInMB uint32 +} + +func NewWin32_OfflineFilesDiskSpaceLimitEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesDiskSpaceLimit, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesDiskSpaceLimit{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesDiskSpaceLimitEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesDiskSpaceLimit, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesDiskSpaceLimit{ + WmiInstance: tmp, + } + return +} + +// SetAutoCacheSizeInMB sets the value of AutoCacheSizeInMB for the instance +func (instance *Win32_OfflineFilesDiskSpaceLimit) SetPropertyAutoCacheSizeInMB(value uint32) (err error) { + return instance.SetProperty("AutoCacheSizeInMB", (value)) +} + +// GetAutoCacheSizeInMB gets the value of AutoCacheSizeInMB for the instance +func (instance *Win32_OfflineFilesDiskSpaceLimit) GetPropertyAutoCacheSizeInMB() (value uint32, err error) { + retValue, err := instance.GetProperty("AutoCacheSizeInMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSizeInMB sets the value of TotalSizeInMB for the instance +func (instance *Win32_OfflineFilesDiskSpaceLimit) SetPropertyTotalSizeInMB(value uint32) (err error) { + return instance.SetProperty("TotalSizeInMB", (value)) +} + +// GetTotalSizeInMB gets the value of TotalSizeInMB for the instance +func (instance *Win32_OfflineFilesDiskSpaceLimit) GetPropertyTotalSizeInMB() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSizeInMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesFileSysInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesFileSysInfo.go new file mode 100644 index 00000000..cb1bda02 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesFileSysInfo.go @@ -0,0 +1,591 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesFileSysInfo struct +type Win32_OfflineFilesFileSysInfo struct { + *cim.WmiInstance + + // + LocalAttributes uint32 + + // + LocalChangeTime string + + // + LocalCreationTime string + + // + LocalLastAccessTime string + + // + LocalLastWriteTime string + + // + LocalSize int64 + + // + OriginalAttributes uint32 + + // + OriginalChangeTime string + + // + OriginalCreationTime string + + // + OriginalLastAccessTime string + + // + OriginalLastWriteTime string + + // + OriginalSize int64 + + // + RemoteAttributes uint32 + + // + RemoteChangeTime string + + // + RemoteCreationTime string + + // + RemoteLastAccessTime string + + // + RemoteLastWriteTime string + + // + RemoteSize int64 +} + +func NewWin32_OfflineFilesFileSysInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesFileSysInfo, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesFileSysInfo{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesFileSysInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesFileSysInfo, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesFileSysInfo{ + WmiInstance: tmp, + } + return +} + +// SetLocalAttributes sets the value of LocalAttributes for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyLocalAttributes(value uint32) (err error) { + return instance.SetProperty("LocalAttributes", (value)) +} + +// GetLocalAttributes gets the value of LocalAttributes for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyLocalAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalChangeTime sets the value of LocalChangeTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyLocalChangeTime(value string) (err error) { + return instance.SetProperty("LocalChangeTime", (value)) +} + +// GetLocalChangeTime gets the value of LocalChangeTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyLocalChangeTime() (value string, err error) { + retValue, err := instance.GetProperty("LocalChangeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalCreationTime sets the value of LocalCreationTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyLocalCreationTime(value string) (err error) { + return instance.SetProperty("LocalCreationTime", (value)) +} + +// GetLocalCreationTime gets the value of LocalCreationTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyLocalCreationTime() (value string, err error) { + retValue, err := instance.GetProperty("LocalCreationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalLastAccessTime sets the value of LocalLastAccessTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyLocalLastAccessTime(value string) (err error) { + return instance.SetProperty("LocalLastAccessTime", (value)) +} + +// GetLocalLastAccessTime gets the value of LocalLastAccessTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyLocalLastAccessTime() (value string, err error) { + retValue, err := instance.GetProperty("LocalLastAccessTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalLastWriteTime sets the value of LocalLastWriteTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyLocalLastWriteTime(value string) (err error) { + return instance.SetProperty("LocalLastWriteTime", (value)) +} + +// GetLocalLastWriteTime gets the value of LocalLastWriteTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyLocalLastWriteTime() (value string, err error) { + retValue, err := instance.GetProperty("LocalLastWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalSize sets the value of LocalSize for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyLocalSize(value int64) (err error) { + return instance.SetProperty("LocalSize", (value)) +} + +// GetLocalSize gets the value of LocalSize for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyLocalSize() (value int64, err error) { + retValue, err := instance.GetProperty("LocalSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetOriginalAttributes sets the value of OriginalAttributes for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyOriginalAttributes(value uint32) (err error) { + return instance.SetProperty("OriginalAttributes", (value)) +} + +// GetOriginalAttributes gets the value of OriginalAttributes for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyOriginalAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("OriginalAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOriginalChangeTime sets the value of OriginalChangeTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyOriginalChangeTime(value string) (err error) { + return instance.SetProperty("OriginalChangeTime", (value)) +} + +// GetOriginalChangeTime gets the value of OriginalChangeTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyOriginalChangeTime() (value string, err error) { + retValue, err := instance.GetProperty("OriginalChangeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOriginalCreationTime sets the value of OriginalCreationTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyOriginalCreationTime(value string) (err error) { + return instance.SetProperty("OriginalCreationTime", (value)) +} + +// GetOriginalCreationTime gets the value of OriginalCreationTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyOriginalCreationTime() (value string, err error) { + retValue, err := instance.GetProperty("OriginalCreationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOriginalLastAccessTime sets the value of OriginalLastAccessTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyOriginalLastAccessTime(value string) (err error) { + return instance.SetProperty("OriginalLastAccessTime", (value)) +} + +// GetOriginalLastAccessTime gets the value of OriginalLastAccessTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyOriginalLastAccessTime() (value string, err error) { + retValue, err := instance.GetProperty("OriginalLastAccessTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOriginalLastWriteTime sets the value of OriginalLastWriteTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyOriginalLastWriteTime(value string) (err error) { + return instance.SetProperty("OriginalLastWriteTime", (value)) +} + +// GetOriginalLastWriteTime gets the value of OriginalLastWriteTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyOriginalLastWriteTime() (value string, err error) { + retValue, err := instance.GetProperty("OriginalLastWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOriginalSize sets the value of OriginalSize for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyOriginalSize(value int64) (err error) { + return instance.SetProperty("OriginalSize", (value)) +} + +// GetOriginalSize gets the value of OriginalSize for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyOriginalSize() (value int64, err error) { + retValue, err := instance.GetProperty("OriginalSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetRemoteAttributes sets the value of RemoteAttributes for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyRemoteAttributes(value uint32) (err error) { + return instance.SetProperty("RemoteAttributes", (value)) +} + +// GetRemoteAttributes gets the value of RemoteAttributes for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyRemoteAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteChangeTime sets the value of RemoteChangeTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyRemoteChangeTime(value string) (err error) { + return instance.SetProperty("RemoteChangeTime", (value)) +} + +// GetRemoteChangeTime gets the value of RemoteChangeTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyRemoteChangeTime() (value string, err error) { + retValue, err := instance.GetProperty("RemoteChangeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteCreationTime sets the value of RemoteCreationTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyRemoteCreationTime(value string) (err error) { + return instance.SetProperty("RemoteCreationTime", (value)) +} + +// GetRemoteCreationTime gets the value of RemoteCreationTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyRemoteCreationTime() (value string, err error) { + retValue, err := instance.GetProperty("RemoteCreationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteLastAccessTime sets the value of RemoteLastAccessTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyRemoteLastAccessTime(value string) (err error) { + return instance.SetProperty("RemoteLastAccessTime", (value)) +} + +// GetRemoteLastAccessTime gets the value of RemoteLastAccessTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyRemoteLastAccessTime() (value string, err error) { + retValue, err := instance.GetProperty("RemoteLastAccessTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteLastWriteTime sets the value of RemoteLastWriteTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyRemoteLastWriteTime(value string) (err error) { + return instance.SetProperty("RemoteLastWriteTime", (value)) +} + +// GetRemoteLastWriteTime gets the value of RemoteLastWriteTime for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyRemoteLastWriteTime() (value string, err error) { + retValue, err := instance.GetProperty("RemoteLastWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteSize sets the value of RemoteSize for the instance +func (instance *Win32_OfflineFilesFileSysInfo) SetPropertyRemoteSize(value int64) (err error) { + return instance.SetProperty("RemoteSize", (value)) +} + +// GetRemoteSize gets the value of RemoteSize for the instance +func (instance *Win32_OfflineFilesFileSysInfo) GetPropertyRemoteSize() (value int64, err error) { + retValue, err := instance.GetProperty("RemoteSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesHealth.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesHealth.go new file mode 100644 index 00000000..473a3606 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesHealth.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesHealth struct +type Win32_OfflineFilesHealth struct { + *cim.WmiInstance + + // A DATETIME value, in string format, that represents the last time this folder was successfully synchronized to the Offline Files cache. + LastSuccessfulSyncTime string + + // The status of the last attempt to synchronize this folder to the Offline Files cache. + LastSyncStatus uint8 + + // A DATETIME value, in string format, that represents the last time an attempt was made to synchronized this folder to the Offline Files cache, even if it was unsuccessful. + LastSyncTime string + + // If true, the Offline Files feature is enabled for this folder. + OfflineAccessEnabled bool + + // If true, the share is working in Online mode + OnlineMode bool +} + +func NewWin32_OfflineFilesHealthEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesHealth, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesHealth{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesHealthEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesHealth, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesHealth{ + WmiInstance: tmp, + } + return +} + +// SetLastSuccessfulSyncTime sets the value of LastSuccessfulSyncTime for the instance +func (instance *Win32_OfflineFilesHealth) SetPropertyLastSuccessfulSyncTime(value string) (err error) { + return instance.SetProperty("LastSuccessfulSyncTime", (value)) +} + +// GetLastSuccessfulSyncTime gets the value of LastSuccessfulSyncTime for the instance +func (instance *Win32_OfflineFilesHealth) GetPropertyLastSuccessfulSyncTime() (value string, err error) { + retValue, err := instance.GetProperty("LastSuccessfulSyncTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastSyncStatus sets the value of LastSyncStatus for the instance +func (instance *Win32_OfflineFilesHealth) SetPropertyLastSyncStatus(value uint8) (err error) { + return instance.SetProperty("LastSyncStatus", (value)) +} + +// GetLastSyncStatus gets the value of LastSyncStatus for the instance +func (instance *Win32_OfflineFilesHealth) GetPropertyLastSyncStatus() (value uint8, err error) { + retValue, err := instance.GetProperty("LastSyncStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetLastSyncTime sets the value of LastSyncTime for the instance +func (instance *Win32_OfflineFilesHealth) SetPropertyLastSyncTime(value string) (err error) { + return instance.SetProperty("LastSyncTime", (value)) +} + +// GetLastSyncTime gets the value of LastSyncTime for the instance +func (instance *Win32_OfflineFilesHealth) GetPropertyLastSyncTime() (value string, err error) { + retValue, err := instance.GetProperty("LastSyncTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOfflineAccessEnabled sets the value of OfflineAccessEnabled for the instance +func (instance *Win32_OfflineFilesHealth) SetPropertyOfflineAccessEnabled(value bool) (err error) { + return instance.SetProperty("OfflineAccessEnabled", (value)) +} + +// GetOfflineAccessEnabled gets the value of OfflineAccessEnabled for the instance +func (instance *Win32_OfflineFilesHealth) GetPropertyOfflineAccessEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("OfflineAccessEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOnlineMode sets the value of OnlineMode for the instance +func (instance *Win32_OfflineFilesHealth) SetPropertyOnlineMode(value bool) (err error) { + return instance.SetProperty("OnlineMode", (value)) +} + +// GetOnlineMode gets the value of OnlineMode for the instance +func (instance *Win32_OfflineFilesHealth) GetPropertyOnlineMode() (value bool, err error) { + retValue, err := instance.GetProperty("OnlineMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesItem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesItem.go new file mode 100644 index 00000000..59f29aa4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesItem.go @@ -0,0 +1,411 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesItem struct +type Win32_OfflineFilesItem struct { + *cim.WmiInstance + + // + ChangeInfo Win32_OfflineFilesChangeInfo + + // + ConnectionInfo Win32_OfflineFilesConnectionInfo + + // + DirtyInfo Win32_OfflineFilesDirtyInfo + + // + Encrypted bool + + // + FileSysInfo Win32_OfflineFilesFileSysInfo + + // + ItemName string + + // + ItemPath string + + // + ItemType uint32 + + // + ParentItemPath string + + // + PinInfo Win32_OfflineFilesPinInfo + + // + Sparse bool + + // + SuspendInfo Win32_OfflineFilesSuspendInfo +} + +func NewWin32_OfflineFilesItemEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesItem, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesItem{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesItemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesItem, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesItem{ + WmiInstance: tmp, + } + return +} + +// SetChangeInfo sets the value of ChangeInfo for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyChangeInfo(value Win32_OfflineFilesChangeInfo) (err error) { + return instance.SetProperty("ChangeInfo", (value)) +} + +// GetChangeInfo gets the value of ChangeInfo for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyChangeInfo() (value Win32_OfflineFilesChangeInfo, err error) { + retValue, err := instance.GetProperty("ChangeInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesChangeInfo) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesChangeInfo is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesChangeInfo(valuetmp) + + return +} + +// SetConnectionInfo sets the value of ConnectionInfo for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyConnectionInfo(value Win32_OfflineFilesConnectionInfo) (err error) { + return instance.SetProperty("ConnectionInfo", (value)) +} + +// GetConnectionInfo gets the value of ConnectionInfo for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyConnectionInfo() (value Win32_OfflineFilesConnectionInfo, err error) { + retValue, err := instance.GetProperty("ConnectionInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesConnectionInfo) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesConnectionInfo is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesConnectionInfo(valuetmp) + + return +} + +// SetDirtyInfo sets the value of DirtyInfo for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyDirtyInfo(value Win32_OfflineFilesDirtyInfo) (err error) { + return instance.SetProperty("DirtyInfo", (value)) +} + +// GetDirtyInfo gets the value of DirtyInfo for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyDirtyInfo() (value Win32_OfflineFilesDirtyInfo, err error) { + retValue, err := instance.GetProperty("DirtyInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesDirtyInfo) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesDirtyInfo is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesDirtyInfo(valuetmp) + + return +} + +// SetEncrypted sets the value of Encrypted for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyEncrypted(value bool) (err error) { + return instance.SetProperty("Encrypted", (value)) +} + +// GetEncrypted gets the value of Encrypted for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyEncrypted() (value bool, err error) { + retValue, err := instance.GetProperty("Encrypted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFileSysInfo sets the value of FileSysInfo for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyFileSysInfo(value Win32_OfflineFilesFileSysInfo) (err error) { + return instance.SetProperty("FileSysInfo", (value)) +} + +// GetFileSysInfo gets the value of FileSysInfo for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyFileSysInfo() (value Win32_OfflineFilesFileSysInfo, err error) { + retValue, err := instance.GetProperty("FileSysInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesFileSysInfo) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesFileSysInfo is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesFileSysInfo(valuetmp) + + return +} + +// SetItemName sets the value of ItemName for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyItemName(value string) (err error) { + return instance.SetProperty("ItemName", (value)) +} + +// GetItemName gets the value of ItemName for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyItemName() (value string, err error) { + retValue, err := instance.GetProperty("ItemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetItemPath sets the value of ItemPath for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyItemPath(value string) (err error) { + return instance.SetProperty("ItemPath", (value)) +} + +// GetItemPath gets the value of ItemPath for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyItemPath() (value string, err error) { + retValue, err := instance.GetProperty("ItemPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetItemType sets the value of ItemType for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyItemType(value uint32) (err error) { + return instance.SetProperty("ItemType", (value)) +} + +// GetItemType gets the value of ItemType for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyItemType() (value uint32, err error) { + retValue, err := instance.GetProperty("ItemType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetParentItemPath sets the value of ParentItemPath for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyParentItemPath(value string) (err error) { + return instance.SetProperty("ParentItemPath", (value)) +} + +// GetParentItemPath gets the value of ParentItemPath for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyParentItemPath() (value string, err error) { + retValue, err := instance.GetProperty("ParentItemPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPinInfo sets the value of PinInfo for the instance +func (instance *Win32_OfflineFilesItem) SetPropertyPinInfo(value Win32_OfflineFilesPinInfo) (err error) { + return instance.SetProperty("PinInfo", (value)) +} + +// GetPinInfo gets the value of PinInfo for the instance +func (instance *Win32_OfflineFilesItem) GetPropertyPinInfo() (value Win32_OfflineFilesPinInfo, err error) { + retValue, err := instance.GetProperty("PinInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesPinInfo) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesPinInfo is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesPinInfo(valuetmp) + + return +} + +// SetSparse sets the value of Sparse for the instance +func (instance *Win32_OfflineFilesItem) SetPropertySparse(value bool) (err error) { + return instance.SetProperty("Sparse", (value)) +} + +// GetSparse gets the value of Sparse for the instance +func (instance *Win32_OfflineFilesItem) GetPropertySparse() (value bool, err error) { + retValue, err := instance.GetProperty("Sparse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSuspendInfo sets the value of SuspendInfo for the instance +func (instance *Win32_OfflineFilesItem) SetPropertySuspendInfo(value Win32_OfflineFilesSuspendInfo) (err error) { + return instance.SetProperty("SuspendInfo", (value)) +} + +// GetSuspendInfo gets the value of SuspendInfo for the instance +func (instance *Win32_OfflineFilesItem) GetPropertySuspendInfo() (value Win32_OfflineFilesSuspendInfo, err error) { + retValue, err := instance.GetProperty("SuspendInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesSuspendInfo) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesSuspendInfo is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesSuspendInfo(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesMachineConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesMachineConfiguration.go new file mode 100644 index 00000000..9b75dca5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesMachineConfiguration.go @@ -0,0 +1,503 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesMachineConfiguration struct +type Win32_OfflineFilesMachineConfiguration struct { + *cim.WmiInstance + + // + BackgroundSyncEnabled bool + + // + BackgroundSyncParams Win32_OfflineFilesBackgroundSync + + // + DiskSpaceLimitEnabled bool + + // + DiskSpaceLimitParams Win32_OfflineFilesDiskSpaceLimit + + // + EconomicalAdminPinningEnabled bool + + // + Enabled bool + + // + ExcludedFileTypes []string + + // + IsConfiguredByWMI bool + + // + MakeAvailableOfflineButtonRemoved bool + + // + OfflineFilesCacheEncrypted bool + + // + SlowLinkEnabled bool + + // + SlowLinkParams []string + + // + SyncOnCostedNetworkEnabled bool + + // + TransparentCachingLatencyThreshold uint32 + + // + WorkOfflineButtonRemoved bool +} + +func NewWin32_OfflineFilesMachineConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesMachineConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesMachineConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesMachineConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesMachineConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesMachineConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetBackgroundSyncEnabled sets the value of BackgroundSyncEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyBackgroundSyncEnabled(value bool) (err error) { + return instance.SetProperty("BackgroundSyncEnabled", (value)) +} + +// GetBackgroundSyncEnabled gets the value of BackgroundSyncEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyBackgroundSyncEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("BackgroundSyncEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBackgroundSyncParams sets the value of BackgroundSyncParams for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyBackgroundSyncParams(value Win32_OfflineFilesBackgroundSync) (err error) { + return instance.SetProperty("BackgroundSyncParams", (value)) +} + +// GetBackgroundSyncParams gets the value of BackgroundSyncParams for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyBackgroundSyncParams() (value Win32_OfflineFilesBackgroundSync, err error) { + retValue, err := instance.GetProperty("BackgroundSyncParams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesBackgroundSync) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesBackgroundSync is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesBackgroundSync(valuetmp) + + return +} + +// SetDiskSpaceLimitEnabled sets the value of DiskSpaceLimitEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyDiskSpaceLimitEnabled(value bool) (err error) { + return instance.SetProperty("DiskSpaceLimitEnabled", (value)) +} + +// GetDiskSpaceLimitEnabled gets the value of DiskSpaceLimitEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyDiskSpaceLimitEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("DiskSpaceLimitEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDiskSpaceLimitParams sets the value of DiskSpaceLimitParams for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyDiskSpaceLimitParams(value Win32_OfflineFilesDiskSpaceLimit) (err error) { + return instance.SetProperty("DiskSpaceLimitParams", (value)) +} + +// GetDiskSpaceLimitParams gets the value of DiskSpaceLimitParams for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyDiskSpaceLimitParams() (value Win32_OfflineFilesDiskSpaceLimit, err error) { + retValue, err := instance.GetProperty("DiskSpaceLimitParams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_OfflineFilesDiskSpaceLimit) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_OfflineFilesDiskSpaceLimit is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_OfflineFilesDiskSpaceLimit(valuetmp) + + return +} + +// SetEconomicalAdminPinningEnabled sets the value of EconomicalAdminPinningEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyEconomicalAdminPinningEnabled(value bool) (err error) { + return instance.SetProperty("EconomicalAdminPinningEnabled", (value)) +} + +// GetEconomicalAdminPinningEnabled gets the value of EconomicalAdminPinningEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyEconomicalAdminPinningEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("EconomicalAdminPinningEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnabled sets the value of Enabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyEnabled(value bool) (err error) { + return instance.SetProperty("Enabled", (value)) +} + +// GetEnabled gets the value of Enabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("Enabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExcludedFileTypes sets the value of ExcludedFileTypes for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyExcludedFileTypes(value []string) (err error) { + return instance.SetProperty("ExcludedFileTypes", (value)) +} + +// GetExcludedFileTypes gets the value of ExcludedFileTypes for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyExcludedFileTypes() (value []string, err error) { + retValue, err := instance.GetProperty("ExcludedFileTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIsConfiguredByWMI sets the value of IsConfiguredByWMI for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyIsConfiguredByWMI(value bool) (err error) { + return instance.SetProperty("IsConfiguredByWMI", (value)) +} + +// GetIsConfiguredByWMI gets the value of IsConfiguredByWMI for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyIsConfiguredByWMI() (value bool, err error) { + retValue, err := instance.GetProperty("IsConfiguredByWMI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMakeAvailableOfflineButtonRemoved sets the value of MakeAvailableOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyMakeAvailableOfflineButtonRemoved(value bool) (err error) { + return instance.SetProperty("MakeAvailableOfflineButtonRemoved", (value)) +} + +// GetMakeAvailableOfflineButtonRemoved gets the value of MakeAvailableOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyMakeAvailableOfflineButtonRemoved() (value bool, err error) { + retValue, err := instance.GetProperty("MakeAvailableOfflineButtonRemoved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOfflineFilesCacheEncrypted sets the value of OfflineFilesCacheEncrypted for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyOfflineFilesCacheEncrypted(value bool) (err error) { + return instance.SetProperty("OfflineFilesCacheEncrypted", (value)) +} + +// GetOfflineFilesCacheEncrypted gets the value of OfflineFilesCacheEncrypted for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyOfflineFilesCacheEncrypted() (value bool, err error) { + retValue, err := instance.GetProperty("OfflineFilesCacheEncrypted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlowLinkEnabled sets the value of SlowLinkEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertySlowLinkEnabled(value bool) (err error) { + return instance.SetProperty("SlowLinkEnabled", (value)) +} + +// GetSlowLinkEnabled gets the value of SlowLinkEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertySlowLinkEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("SlowLinkEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlowLinkParams sets the value of SlowLinkParams for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertySlowLinkParams(value []string) (err error) { + return instance.SetProperty("SlowLinkParams", (value)) +} + +// GetSlowLinkParams gets the value of SlowLinkParams for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertySlowLinkParams() (value []string, err error) { + retValue, err := instance.GetProperty("SlowLinkParams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSyncOnCostedNetworkEnabled sets the value of SyncOnCostedNetworkEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertySyncOnCostedNetworkEnabled(value bool) (err error) { + return instance.SetProperty("SyncOnCostedNetworkEnabled", (value)) +} + +// GetSyncOnCostedNetworkEnabled gets the value of SyncOnCostedNetworkEnabled for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertySyncOnCostedNetworkEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("SyncOnCostedNetworkEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTransparentCachingLatencyThreshold sets the value of TransparentCachingLatencyThreshold for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyTransparentCachingLatencyThreshold(value uint32) (err error) { + return instance.SetProperty("TransparentCachingLatencyThreshold", (value)) +} + +// GetTransparentCachingLatencyThreshold gets the value of TransparentCachingLatencyThreshold for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyTransparentCachingLatencyThreshold() (value uint32, err error) { + retValue, err := instance.GetProperty("TransparentCachingLatencyThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkOfflineButtonRemoved sets the value of WorkOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) SetPropertyWorkOfflineButtonRemoved(value bool) (err error) { + return instance.SetProperty("WorkOfflineButtonRemoved", (value)) +} + +// GetWorkOfflineButtonRemoved gets the value of WorkOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesMachineConfiguration) GetPropertyWorkOfflineButtonRemoved() (value bool, err error) { + retValue, err := instance.GetProperty("WorkOfflineButtonRemoved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesPinInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesPinInfo.go new file mode 100644 index 00000000..573f739c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesPinInfo.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesPinInfo struct +type Win32_OfflineFilesPinInfo struct { + *cim.WmiInstance + + // + Pinned bool + + // + PinnedForComputer uint32 + + // + PinnedForFolderRedirection uint32 + + // + PinnedForUser uint32 + + // + PinnedForUserByPolicy uint32 +} + +func NewWin32_OfflineFilesPinInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesPinInfo, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesPinInfo{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesPinInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesPinInfo, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesPinInfo{ + WmiInstance: tmp, + } + return +} + +// SetPinned sets the value of Pinned for the instance +func (instance *Win32_OfflineFilesPinInfo) SetPropertyPinned(value bool) (err error) { + return instance.SetProperty("Pinned", (value)) +} + +// GetPinned gets the value of Pinned for the instance +func (instance *Win32_OfflineFilesPinInfo) GetPropertyPinned() (value bool, err error) { + retValue, err := instance.GetProperty("Pinned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPinnedForComputer sets the value of PinnedForComputer for the instance +func (instance *Win32_OfflineFilesPinInfo) SetPropertyPinnedForComputer(value uint32) (err error) { + return instance.SetProperty("PinnedForComputer", (value)) +} + +// GetPinnedForComputer gets the value of PinnedForComputer for the instance +func (instance *Win32_OfflineFilesPinInfo) GetPropertyPinnedForComputer() (value uint32, err error) { + retValue, err := instance.GetProperty("PinnedForComputer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinnedForFolderRedirection sets the value of PinnedForFolderRedirection for the instance +func (instance *Win32_OfflineFilesPinInfo) SetPropertyPinnedForFolderRedirection(value uint32) (err error) { + return instance.SetProperty("PinnedForFolderRedirection", (value)) +} + +// GetPinnedForFolderRedirection gets the value of PinnedForFolderRedirection for the instance +func (instance *Win32_OfflineFilesPinInfo) GetPropertyPinnedForFolderRedirection() (value uint32, err error) { + retValue, err := instance.GetProperty("PinnedForFolderRedirection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinnedForUser sets the value of PinnedForUser for the instance +func (instance *Win32_OfflineFilesPinInfo) SetPropertyPinnedForUser(value uint32) (err error) { + return instance.SetProperty("PinnedForUser", (value)) +} + +// GetPinnedForUser gets the value of PinnedForUser for the instance +func (instance *Win32_OfflineFilesPinInfo) GetPropertyPinnedForUser() (value uint32, err error) { + retValue, err := instance.GetProperty("PinnedForUser") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinnedForUserByPolicy sets the value of PinnedForUserByPolicy for the instance +func (instance *Win32_OfflineFilesPinInfo) SetPropertyPinnedForUserByPolicy(value uint32) (err error) { + return instance.SetProperty("PinnedForUserByPolicy", (value)) +} + +// GetPinnedForUserByPolicy gets the value of PinnedForUserByPolicy for the instance +func (instance *Win32_OfflineFilesPinInfo) GetPropertyPinnedForUserByPolicy() (value uint32, err error) { + retValue, err := instance.GetProperty("PinnedForUserByPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesSuspendInfo.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesSuspendInfo.go new file mode 100644 index 00000000..81004168 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesSuspendInfo.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesSuspendInfo struct +type Win32_OfflineFilesSuspendInfo struct { + *cim.WmiInstance + + // + Suspended bool + + // + SuspendedRoot bool +} + +func NewWin32_OfflineFilesSuspendInfoEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesSuspendInfo, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesSuspendInfo{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesSuspendInfoEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesSuspendInfo, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesSuspendInfo{ + WmiInstance: tmp, + } + return +} + +// SetSuspended sets the value of Suspended for the instance +func (instance *Win32_OfflineFilesSuspendInfo) SetPropertySuspended(value bool) (err error) { + return instance.SetProperty("Suspended", (value)) +} + +// GetSuspended gets the value of Suspended for the instance +func (instance *Win32_OfflineFilesSuspendInfo) GetPropertySuspended() (value bool, err error) { + retValue, err := instance.GetProperty("Suspended") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSuspendedRoot sets the value of SuspendedRoot for the instance +func (instance *Win32_OfflineFilesSuspendInfo) SetPropertySuspendedRoot(value bool) (err error) { + return instance.SetProperty("SuspendedRoot", (value)) +} + +// GetSuspendedRoot gets the value of SuspendedRoot for the instance +func (instance *Win32_OfflineFilesSuspendInfo) GetPropertySuspendedRoot() (value bool, err error) { + retValue, err := instance.GetProperty("SuspendedRoot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesUserConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesUserConfiguration.go new file mode 100644 index 00000000..2fc6c41a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OfflineFilesUserConfiguration.go @@ -0,0 +1,172 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OfflineFilesUserConfiguration struct +type Win32_OfflineFilesUserConfiguration struct { + *cim.WmiInstance + + // + AssignedOfflineFiles []string + + // + IsConfiguredByWMI bool + + // + MakeAvailableOfflineButtonRemoved bool + + // + WorkOfflineButtonRemoved bool +} + +func NewWin32_OfflineFilesUserConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_OfflineFilesUserConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesUserConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_OfflineFilesUserConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OfflineFilesUserConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OfflineFilesUserConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetAssignedOfflineFiles sets the value of AssignedOfflineFiles for the instance +func (instance *Win32_OfflineFilesUserConfiguration) SetPropertyAssignedOfflineFiles(value []string) (err error) { + return instance.SetProperty("AssignedOfflineFiles", (value)) +} + +// GetAssignedOfflineFiles gets the value of AssignedOfflineFiles for the instance +func (instance *Win32_OfflineFilesUserConfiguration) GetPropertyAssignedOfflineFiles() (value []string, err error) { + retValue, err := instance.GetProperty("AssignedOfflineFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIsConfiguredByWMI sets the value of IsConfiguredByWMI for the instance +func (instance *Win32_OfflineFilesUserConfiguration) SetPropertyIsConfiguredByWMI(value bool) (err error) { + return instance.SetProperty("IsConfiguredByWMI", (value)) +} + +// GetIsConfiguredByWMI gets the value of IsConfiguredByWMI for the instance +func (instance *Win32_OfflineFilesUserConfiguration) GetPropertyIsConfiguredByWMI() (value bool, err error) { + retValue, err := instance.GetProperty("IsConfiguredByWMI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMakeAvailableOfflineButtonRemoved sets the value of MakeAvailableOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesUserConfiguration) SetPropertyMakeAvailableOfflineButtonRemoved(value bool) (err error) { + return instance.SetProperty("MakeAvailableOfflineButtonRemoved", (value)) +} + +// GetMakeAvailableOfflineButtonRemoved gets the value of MakeAvailableOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesUserConfiguration) GetPropertyMakeAvailableOfflineButtonRemoved() (value bool, err error) { + retValue, err := instance.GetProperty("MakeAvailableOfflineButtonRemoved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWorkOfflineButtonRemoved sets the value of WorkOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesUserConfiguration) SetPropertyWorkOfflineButtonRemoved(value bool) (err error) { + return instance.SetProperty("WorkOfflineButtonRemoved", (value)) +} + +// GetWorkOfflineButtonRemoved gets the value of WorkOfflineButtonRemoved for the instance +func (instance *Win32_OfflineFilesUserConfiguration) GetPropertyWorkOfflineButtonRemoved() (value bool, err error) { + retValue, err := instance.GetProperty("WorkOfflineButtonRemoved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OnBoardDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OnBoardDevice.go new file mode 100644 index 00000000..20d4a821 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OnBoardDevice.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OnBoardDevice struct +type Win32_OnBoardDevice struct { + *CIM_PhysicalComponent + + // + DeviceType uint16 + + // + Enabled bool +} + +func NewWin32_OnBoardDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_OnBoardDevice, err error) { + tmp, err := NewCIM_PhysicalComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_OnBoardDevice{ + CIM_PhysicalComponent: tmp, + } + return +} + +func NewWin32_OnBoardDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OnBoardDevice, err error) { + tmp, err := NewCIM_PhysicalComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OnBoardDevice{ + CIM_PhysicalComponent: tmp, + } + return +} + +// SetDeviceType sets the value of DeviceType for the instance +func (instance *Win32_OnBoardDevice) SetPropertyDeviceType(value uint16) (err error) { + return instance.SetProperty("DeviceType", (value)) +} + +// GetDeviceType gets the value of DeviceType for the instance +func (instance *Win32_OnBoardDevice) GetPropertyDeviceType() (value uint16, err error) { + retValue, err := instance.GetProperty("DeviceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetEnabled sets the value of Enabled for the instance +func (instance *Win32_OnBoardDevice) SetPropertyEnabled(value bool) (err error) { + return instance.SetProperty("Enabled", (value)) +} + +// GetEnabled gets the value of Enabled for the instance +func (instance *Win32_OnBoardDevice) GetPropertyEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("Enabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystem.go new file mode 100644 index 00000000..fbb76109 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystem.go @@ -0,0 +1,1214 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OperatingSystem struct +type Win32_OperatingSystem struct { + *CIM_OperatingSystem + + // + BootDevice string + + // + BuildNumber string + + // + BuildType string + + // + CodeSet string + + // + CountryCode string + + // + CSDVersion string + + // + DataExecutionPrevention_32BitApplications bool + + // + DataExecutionPrevention_Available bool + + // + DataExecutionPrevention_Drivers bool + + // + DataExecutionPrevention_SupportPolicy uint8 + + // + Debug bool + + // + EncryptionLevel uint32 + + // + ForegroundApplicationBoost uint8 + + // + LargeSystemCache uint32 + + // + Locale string + + // + Manufacturer string + + // + MUILanguages []string + + // + OperatingSystemSKU uint32 + + // + Organization string + + // + OSArchitecture string + + // + OSLanguage uint32 + + // + OSProductSuite uint32 + + // + PAEEnabled bool + + // + PlusProductID string + + // + PlusVersionNumber string + + // + PortableOperatingSystem bool + + // + Primary bool + + // + ProductType uint32 + + // + RegisteredUser string + + // + SerialNumber string + + // + ServicePackMajorVersion uint16 + + // + ServicePackMinorVersion uint16 + + // + SuiteMask uint32 + + // + SystemDevice string + + // + SystemDirectory string + + // + SystemDrive string + + // + WindowsDirectory string +} + +func NewWin32_OperatingSystemEx1(instance *cim.WmiInstance) (newInstance *Win32_OperatingSystem, err error) { + tmp, err := NewCIM_OperatingSystemEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_OperatingSystem{ + CIM_OperatingSystem: tmp, + } + return +} + +func NewWin32_OperatingSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OperatingSystem, err error) { + tmp, err := NewCIM_OperatingSystemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OperatingSystem{ + CIM_OperatingSystem: tmp, + } + return +} + +// SetBootDevice sets the value of BootDevice for the instance +func (instance *Win32_OperatingSystem) SetPropertyBootDevice(value string) (err error) { + return instance.SetProperty("BootDevice", (value)) +} + +// GetBootDevice gets the value of BootDevice for the instance +func (instance *Win32_OperatingSystem) GetPropertyBootDevice() (value string, err error) { + retValue, err := instance.GetProperty("BootDevice") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBuildNumber sets the value of BuildNumber for the instance +func (instance *Win32_OperatingSystem) SetPropertyBuildNumber(value string) (err error) { + return instance.SetProperty("BuildNumber", (value)) +} + +// GetBuildNumber gets the value of BuildNumber for the instance +func (instance *Win32_OperatingSystem) GetPropertyBuildNumber() (value string, err error) { + retValue, err := instance.GetProperty("BuildNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBuildType sets the value of BuildType for the instance +func (instance *Win32_OperatingSystem) SetPropertyBuildType(value string) (err error) { + return instance.SetProperty("BuildType", (value)) +} + +// GetBuildType gets the value of BuildType for the instance +func (instance *Win32_OperatingSystem) GetPropertyBuildType() (value string, err error) { + retValue, err := instance.GetProperty("BuildType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCodeSet sets the value of CodeSet for the instance +func (instance *Win32_OperatingSystem) SetPropertyCodeSet(value string) (err error) { + return instance.SetProperty("CodeSet", (value)) +} + +// GetCodeSet gets the value of CodeSet for the instance +func (instance *Win32_OperatingSystem) GetPropertyCodeSet() (value string, err error) { + retValue, err := instance.GetProperty("CodeSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCountryCode sets the value of CountryCode for the instance +func (instance *Win32_OperatingSystem) SetPropertyCountryCode(value string) (err error) { + return instance.SetProperty("CountryCode", (value)) +} + +// GetCountryCode gets the value of CountryCode for the instance +func (instance *Win32_OperatingSystem) GetPropertyCountryCode() (value string, err error) { + retValue, err := instance.GetProperty("CountryCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCSDVersion sets the value of CSDVersion for the instance +func (instance *Win32_OperatingSystem) SetPropertyCSDVersion(value string) (err error) { + return instance.SetProperty("CSDVersion", (value)) +} + +// GetCSDVersion gets the value of CSDVersion for the instance +func (instance *Win32_OperatingSystem) GetPropertyCSDVersion() (value string, err error) { + retValue, err := instance.GetProperty("CSDVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDataExecutionPrevention_32BitApplications sets the value of DataExecutionPrevention_32BitApplications for the instance +func (instance *Win32_OperatingSystem) SetPropertyDataExecutionPrevention_32BitApplications(value bool) (err error) { + return instance.SetProperty("DataExecutionPrevention_32BitApplications", (value)) +} + +// GetDataExecutionPrevention_32BitApplications gets the value of DataExecutionPrevention_32BitApplications for the instance +func (instance *Win32_OperatingSystem) GetPropertyDataExecutionPrevention_32BitApplications() (value bool, err error) { + retValue, err := instance.GetProperty("DataExecutionPrevention_32BitApplications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDataExecutionPrevention_Available sets the value of DataExecutionPrevention_Available for the instance +func (instance *Win32_OperatingSystem) SetPropertyDataExecutionPrevention_Available(value bool) (err error) { + return instance.SetProperty("DataExecutionPrevention_Available", (value)) +} + +// GetDataExecutionPrevention_Available gets the value of DataExecutionPrevention_Available for the instance +func (instance *Win32_OperatingSystem) GetPropertyDataExecutionPrevention_Available() (value bool, err error) { + retValue, err := instance.GetProperty("DataExecutionPrevention_Available") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDataExecutionPrevention_Drivers sets the value of DataExecutionPrevention_Drivers for the instance +func (instance *Win32_OperatingSystem) SetPropertyDataExecutionPrevention_Drivers(value bool) (err error) { + return instance.SetProperty("DataExecutionPrevention_Drivers", (value)) +} + +// GetDataExecutionPrevention_Drivers gets the value of DataExecutionPrevention_Drivers for the instance +func (instance *Win32_OperatingSystem) GetPropertyDataExecutionPrevention_Drivers() (value bool, err error) { + retValue, err := instance.GetProperty("DataExecutionPrevention_Drivers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDataExecutionPrevention_SupportPolicy sets the value of DataExecutionPrevention_SupportPolicy for the instance +func (instance *Win32_OperatingSystem) SetPropertyDataExecutionPrevention_SupportPolicy(value uint8) (err error) { + return instance.SetProperty("DataExecutionPrevention_SupportPolicy", (value)) +} + +// GetDataExecutionPrevention_SupportPolicy gets the value of DataExecutionPrevention_SupportPolicy for the instance +func (instance *Win32_OperatingSystem) GetPropertyDataExecutionPrevention_SupportPolicy() (value uint8, err error) { + retValue, err := instance.GetProperty("DataExecutionPrevention_SupportPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetDebug sets the value of Debug for the instance +func (instance *Win32_OperatingSystem) SetPropertyDebug(value bool) (err error) { + return instance.SetProperty("Debug", (value)) +} + +// GetDebug gets the value of Debug for the instance +func (instance *Win32_OperatingSystem) GetPropertyDebug() (value bool, err error) { + retValue, err := instance.GetProperty("Debug") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEncryptionLevel sets the value of EncryptionLevel for the instance +func (instance *Win32_OperatingSystem) SetPropertyEncryptionLevel(value uint32) (err error) { + return instance.SetProperty("EncryptionLevel", (value)) +} + +// GetEncryptionLevel gets the value of EncryptionLevel for the instance +func (instance *Win32_OperatingSystem) GetPropertyEncryptionLevel() (value uint32, err error) { + retValue, err := instance.GetProperty("EncryptionLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForegroundApplicationBoost sets the value of ForegroundApplicationBoost for the instance +func (instance *Win32_OperatingSystem) SetPropertyForegroundApplicationBoost(value uint8) (err error) { + return instance.SetProperty("ForegroundApplicationBoost", (value)) +} + +// GetForegroundApplicationBoost gets the value of ForegroundApplicationBoost for the instance +func (instance *Win32_OperatingSystem) GetPropertyForegroundApplicationBoost() (value uint8, err error) { + retValue, err := instance.GetProperty("ForegroundApplicationBoost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetLargeSystemCache sets the value of LargeSystemCache for the instance +func (instance *Win32_OperatingSystem) SetPropertyLargeSystemCache(value uint32) (err error) { + return instance.SetProperty("LargeSystemCache", (value)) +} + +// GetLargeSystemCache gets the value of LargeSystemCache for the instance +func (instance *Win32_OperatingSystem) GetPropertyLargeSystemCache() (value uint32, err error) { + retValue, err := instance.GetProperty("LargeSystemCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocale sets the value of Locale for the instance +func (instance *Win32_OperatingSystem) SetPropertyLocale(value string) (err error) { + return instance.SetProperty("Locale", (value)) +} + +// GetLocale gets the value of Locale for the instance +func (instance *Win32_OperatingSystem) GetPropertyLocale() (value string, err error) { + retValue, err := instance.GetProperty("Locale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_OperatingSystem) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_OperatingSystem) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMUILanguages sets the value of MUILanguages for the instance +func (instance *Win32_OperatingSystem) SetPropertyMUILanguages(value []string) (err error) { + return instance.SetProperty("MUILanguages", (value)) +} + +// GetMUILanguages gets the value of MUILanguages for the instance +func (instance *Win32_OperatingSystem) GetPropertyMUILanguages() (value []string, err error) { + retValue, err := instance.GetProperty("MUILanguages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOperatingSystemSKU sets the value of OperatingSystemSKU for the instance +func (instance *Win32_OperatingSystem) SetPropertyOperatingSystemSKU(value uint32) (err error) { + return instance.SetProperty("OperatingSystemSKU", (value)) +} + +// GetOperatingSystemSKU gets the value of OperatingSystemSKU for the instance +func (instance *Win32_OperatingSystem) GetPropertyOperatingSystemSKU() (value uint32, err error) { + retValue, err := instance.GetProperty("OperatingSystemSKU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOrganization sets the value of Organization for the instance +func (instance *Win32_OperatingSystem) SetPropertyOrganization(value string) (err error) { + return instance.SetProperty("Organization", (value)) +} + +// GetOrganization gets the value of Organization for the instance +func (instance *Win32_OperatingSystem) GetPropertyOrganization() (value string, err error) { + retValue, err := instance.GetProperty("Organization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOSArchitecture sets the value of OSArchitecture for the instance +func (instance *Win32_OperatingSystem) SetPropertyOSArchitecture(value string) (err error) { + return instance.SetProperty("OSArchitecture", (value)) +} + +// GetOSArchitecture gets the value of OSArchitecture for the instance +func (instance *Win32_OperatingSystem) GetPropertyOSArchitecture() (value string, err error) { + retValue, err := instance.GetProperty("OSArchitecture") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOSLanguage sets the value of OSLanguage for the instance +func (instance *Win32_OperatingSystem) SetPropertyOSLanguage(value uint32) (err error) { + return instance.SetProperty("OSLanguage", (value)) +} + +// GetOSLanguage gets the value of OSLanguage for the instance +func (instance *Win32_OperatingSystem) GetPropertyOSLanguage() (value uint32, err error) { + retValue, err := instance.GetProperty("OSLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOSProductSuite sets the value of OSProductSuite for the instance +func (instance *Win32_OperatingSystem) SetPropertyOSProductSuite(value uint32) (err error) { + return instance.SetProperty("OSProductSuite", (value)) +} + +// GetOSProductSuite gets the value of OSProductSuite for the instance +func (instance *Win32_OperatingSystem) GetPropertyOSProductSuite() (value uint32, err error) { + retValue, err := instance.GetProperty("OSProductSuite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPAEEnabled sets the value of PAEEnabled for the instance +func (instance *Win32_OperatingSystem) SetPropertyPAEEnabled(value bool) (err error) { + return instance.SetProperty("PAEEnabled", (value)) +} + +// GetPAEEnabled gets the value of PAEEnabled for the instance +func (instance *Win32_OperatingSystem) GetPropertyPAEEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("PAEEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPlusProductID sets the value of PlusProductID for the instance +func (instance *Win32_OperatingSystem) SetPropertyPlusProductID(value string) (err error) { + return instance.SetProperty("PlusProductID", (value)) +} + +// GetPlusProductID gets the value of PlusProductID for the instance +func (instance *Win32_OperatingSystem) GetPropertyPlusProductID() (value string, err error) { + retValue, err := instance.GetProperty("PlusProductID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPlusVersionNumber sets the value of PlusVersionNumber for the instance +func (instance *Win32_OperatingSystem) SetPropertyPlusVersionNumber(value string) (err error) { + return instance.SetProperty("PlusVersionNumber", (value)) +} + +// GetPlusVersionNumber gets the value of PlusVersionNumber for the instance +func (instance *Win32_OperatingSystem) GetPropertyPlusVersionNumber() (value string, err error) { + retValue, err := instance.GetProperty("PlusVersionNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortableOperatingSystem sets the value of PortableOperatingSystem for the instance +func (instance *Win32_OperatingSystem) SetPropertyPortableOperatingSystem(value bool) (err error) { + return instance.SetProperty("PortableOperatingSystem", (value)) +} + +// GetPortableOperatingSystem gets the value of PortableOperatingSystem for the instance +func (instance *Win32_OperatingSystem) GetPropertyPortableOperatingSystem() (value bool, err error) { + retValue, err := instance.GetProperty("PortableOperatingSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPrimary sets the value of Primary for the instance +func (instance *Win32_OperatingSystem) SetPropertyPrimary(value bool) (err error) { + return instance.SetProperty("Primary", (value)) +} + +// GetPrimary gets the value of Primary for the instance +func (instance *Win32_OperatingSystem) GetPropertyPrimary() (value bool, err error) { + retValue, err := instance.GetProperty("Primary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProductType sets the value of ProductType for the instance +func (instance *Win32_OperatingSystem) SetPropertyProductType(value uint32) (err error) { + return instance.SetProperty("ProductType", (value)) +} + +// GetProductType gets the value of ProductType for the instance +func (instance *Win32_OperatingSystem) GetPropertyProductType() (value uint32, err error) { + retValue, err := instance.GetProperty("ProductType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRegisteredUser sets the value of RegisteredUser for the instance +func (instance *Win32_OperatingSystem) SetPropertyRegisteredUser(value string) (err error) { + return instance.SetProperty("RegisteredUser", (value)) +} + +// GetRegisteredUser gets the value of RegisteredUser for the instance +func (instance *Win32_OperatingSystem) GetPropertyRegisteredUser() (value string, err error) { + retValue, err := instance.GetProperty("RegisteredUser") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *Win32_OperatingSystem) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *Win32_OperatingSystem) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServicePackMajorVersion sets the value of ServicePackMajorVersion for the instance +func (instance *Win32_OperatingSystem) SetPropertyServicePackMajorVersion(value uint16) (err error) { + return instance.SetProperty("ServicePackMajorVersion", (value)) +} + +// GetServicePackMajorVersion gets the value of ServicePackMajorVersion for the instance +func (instance *Win32_OperatingSystem) GetPropertyServicePackMajorVersion() (value uint16, err error) { + retValue, err := instance.GetProperty("ServicePackMajorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetServicePackMinorVersion sets the value of ServicePackMinorVersion for the instance +func (instance *Win32_OperatingSystem) SetPropertyServicePackMinorVersion(value uint16) (err error) { + return instance.SetProperty("ServicePackMinorVersion", (value)) +} + +// GetServicePackMinorVersion gets the value of ServicePackMinorVersion for the instance +func (instance *Win32_OperatingSystem) GetPropertyServicePackMinorVersion() (value uint16, err error) { + retValue, err := instance.GetProperty("ServicePackMinorVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSuiteMask sets the value of SuiteMask for the instance +func (instance *Win32_OperatingSystem) SetPropertySuiteMask(value uint32) (err error) { + return instance.SetProperty("SuiteMask", (value)) +} + +// GetSuiteMask gets the value of SuiteMask for the instance +func (instance *Win32_OperatingSystem) GetPropertySuiteMask() (value uint32, err error) { + retValue, err := instance.GetProperty("SuiteMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemDevice sets the value of SystemDevice for the instance +func (instance *Win32_OperatingSystem) SetPropertySystemDevice(value string) (err error) { + return instance.SetProperty("SystemDevice", (value)) +} + +// GetSystemDevice gets the value of SystemDevice for the instance +func (instance *Win32_OperatingSystem) GetPropertySystemDevice() (value string, err error) { + retValue, err := instance.GetProperty("SystemDevice") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemDirectory sets the value of SystemDirectory for the instance +func (instance *Win32_OperatingSystem) SetPropertySystemDirectory(value string) (err error) { + return instance.SetProperty("SystemDirectory", (value)) +} + +// GetSystemDirectory gets the value of SystemDirectory for the instance +func (instance *Win32_OperatingSystem) GetPropertySystemDirectory() (value string, err error) { + retValue, err := instance.GetProperty("SystemDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemDrive sets the value of SystemDrive for the instance +func (instance *Win32_OperatingSystem) SetPropertySystemDrive(value string) (err error) { + return instance.SetProperty("SystemDrive", (value)) +} + +// GetSystemDrive gets the value of SystemDrive for the instance +func (instance *Win32_OperatingSystem) GetPropertySystemDrive() (value string, err error) { + retValue, err := instance.GetProperty("SystemDrive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWindowsDirectory sets the value of WindowsDirectory for the instance +func (instance *Win32_OperatingSystem) SetPropertyWindowsDirectory(value string) (err error) { + return instance.SetProperty("WindowsDirectory", (value)) +} + +// GetWindowsDirectory gets the value of WindowsDirectory for the instance +func (instance *Win32_OperatingSystem) GetPropertyWindowsDirectory() (value string, err error) { + retValue, err := instance.GetProperty("WindowsDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// + +// +func (instance *Win32_OperatingSystem) Win32Shutdown( /* IN */ Flags int32, + /* IN */ Reserved int32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Win32Shutdown", Flags, Reserved) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *Win32_OperatingSystem) Win32ShutdownTracker( /* IN */ Timeout uint32, + /* IN */ Comment string, + /* IN */ ReasonCode uint32, + /* IN */ Flags int32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Win32ShutdownTracker", Timeout, Comment, ReasonCode, Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_OperatingSystem) SetDateTime( /* IN */ LocalDateTime string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDateTime", LocalDateTime) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemAutochkSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemAutochkSetting.go new file mode 100644 index 00000000..3fbbbc77 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemAutochkSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_OperatingSystemAutochkSetting struct +type Win32_OperatingSystemAutochkSetting struct { + *CIM_ElementSetting +} + +func NewWin32_OperatingSystemAutochkSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_OperatingSystemAutochkSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_OperatingSystemAutochkSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_OperatingSystemAutochkSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OperatingSystemAutochkSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OperatingSystemAutochkSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemQFE.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemQFE.go new file mode 100644 index 00000000..78ef6c04 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OperatingSystemQFE.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_OperatingSystemQFE struct +type Win32_OperatingSystemQFE struct { + *CIM_Dependency +} + +func NewWin32_OperatingSystemQFEEx1(instance *cim.WmiInstance) (newInstance *Win32_OperatingSystemQFE, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_OperatingSystemQFE{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_OperatingSystemQFEEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OperatingSystemQFE, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OperatingSystemQFE{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OptionalFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OptionalFeature.go new file mode 100644 index 00000000..29bb68a5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_OptionalFeature.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_OptionalFeature struct +type Win32_OptionalFeature struct { + *CIM_LogicalElement + + // + InstallState uint32 +} + +func NewWin32_OptionalFeatureEx1(instance *cim.WmiInstance) (newInstance *Win32_OptionalFeature, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_OptionalFeature{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_OptionalFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_OptionalFeature, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_OptionalFeature{ + CIM_LogicalElement: tmp, + } + return +} + +// SetInstallState sets the value of InstallState for the instance +func (instance *Win32_OptionalFeature) SetPropertyInstallState(value uint32) (err error) { + return instance.SetProperty("InstallState", (value)) +} + +// GetInstallState gets the value of InstallState for the instance +func (instance *Win32_OptionalFeature) GetPropertyInstallState() (value uint32, err error) { + retValue, err := instance.GetProperty("InstallState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PCMCIAController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PCMCIAController.go new file mode 100644 index 00000000..3c09bccf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PCMCIAController.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PCMCIAController struct +type Win32_PCMCIAController struct { + *CIM_PCMCIAController +} + +func NewWin32_PCMCIAControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_PCMCIAController, err error) { + tmp, err := NewCIM_PCMCIAControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PCMCIAController{ + CIM_PCMCIAController: tmp, + } + return +} + +func NewWin32_PCMCIAControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PCMCIAController, err error) { + tmp, err := NewCIM_PCMCIAControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PCMCIAController{ + CIM_PCMCIAController: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PNPAllocatedResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PNPAllocatedResource.go new file mode 100644 index 00000000..4bfd6a3a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PNPAllocatedResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PNPAllocatedResource struct +type Win32_PNPAllocatedResource struct { + *CIM_AllocatedResource +} + +func NewWin32_PNPAllocatedResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_PNPAllocatedResource, err error) { + tmp, err := NewCIM_AllocatedResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PNPAllocatedResource{ + CIM_AllocatedResource: tmp, + } + return +} + +func NewWin32_PNPAllocatedResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PNPAllocatedResource, err error) { + tmp, err := NewCIM_AllocatedResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PNPAllocatedResource{ + CIM_AllocatedResource: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModem.go new file mode 100644 index 00000000..f710db1c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModem.go @@ -0,0 +1,1373 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_POTSModem struct +type Win32_POTSModem struct { + *CIM_PotsModem + + // + AttachedTo string + + // + BlindOff string + + // + BlindOn string + + // + CompatibilityFlags string + + // + CompressionOff string + + // + CompressionOn string + + // + ConfigurationDialog string + + // + DCB []uint8 + + // + Default []uint8 + + // + DeviceLoader string + + // + DeviceType string + + // + DriverDate string + + // + ErrorControlForced string + + // + ErrorControlOff string + + // + ErrorControlOn string + + // + FlowControlHard string + + // + FlowControlOff string + + // + FlowControlSoft string + + // + InactivityScale string + + // + Index uint32 + + // + IndexEx string + + // + Model string + + // + ModemInfPath string + + // + ModemInfSection string + + // + ModulationBell string + + // + ModulationCCITT string + + // + PortSubClass string + + // + Prefix string + + // + Properties []uint8 + + // + ProviderName string + + // + Pulse string + + // + Resetstring string + + // + ResponsesKeyName string + + // + SpeakerModeDial string + + // + SpeakerModeOff string + + // + SpeakerModeOn string + + // + SpeakerModeSetup string + + // + SpeakerVolumeHigh string + + // + SpeakerVolumeLow string + + // + SpeakerVolumeMed string + + // + StringFormat string + + // + Terminator string + + // + Tone string + + // + VoiceSwitchFeature string +} + +func NewWin32_POTSModemEx1(instance *cim.WmiInstance) (newInstance *Win32_POTSModem, err error) { + tmp, err := NewCIM_PotsModemEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_POTSModem{ + CIM_PotsModem: tmp, + } + return +} + +func NewWin32_POTSModemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_POTSModem, err error) { + tmp, err := NewCIM_PotsModemEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_POTSModem{ + CIM_PotsModem: tmp, + } + return +} + +// SetAttachedTo sets the value of AttachedTo for the instance +func (instance *Win32_POTSModem) SetPropertyAttachedTo(value string) (err error) { + return instance.SetProperty("AttachedTo", (value)) +} + +// GetAttachedTo gets the value of AttachedTo for the instance +func (instance *Win32_POTSModem) GetPropertyAttachedTo() (value string, err error) { + retValue, err := instance.GetProperty("AttachedTo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBlindOff sets the value of BlindOff for the instance +func (instance *Win32_POTSModem) SetPropertyBlindOff(value string) (err error) { + return instance.SetProperty("BlindOff", (value)) +} + +// GetBlindOff gets the value of BlindOff for the instance +func (instance *Win32_POTSModem) GetPropertyBlindOff() (value string, err error) { + retValue, err := instance.GetProperty("BlindOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBlindOn sets the value of BlindOn for the instance +func (instance *Win32_POTSModem) SetPropertyBlindOn(value string) (err error) { + return instance.SetProperty("BlindOn", (value)) +} + +// GetBlindOn gets the value of BlindOn for the instance +func (instance *Win32_POTSModem) GetPropertyBlindOn() (value string, err error) { + retValue, err := instance.GetProperty("BlindOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCompatibilityFlags sets the value of CompatibilityFlags for the instance +func (instance *Win32_POTSModem) SetPropertyCompatibilityFlags(value string) (err error) { + return instance.SetProperty("CompatibilityFlags", (value)) +} + +// GetCompatibilityFlags gets the value of CompatibilityFlags for the instance +func (instance *Win32_POTSModem) GetPropertyCompatibilityFlags() (value string, err error) { + retValue, err := instance.GetProperty("CompatibilityFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCompressionOff sets the value of CompressionOff for the instance +func (instance *Win32_POTSModem) SetPropertyCompressionOff(value string) (err error) { + return instance.SetProperty("CompressionOff", (value)) +} + +// GetCompressionOff gets the value of CompressionOff for the instance +func (instance *Win32_POTSModem) GetPropertyCompressionOff() (value string, err error) { + retValue, err := instance.GetProperty("CompressionOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCompressionOn sets the value of CompressionOn for the instance +func (instance *Win32_POTSModem) SetPropertyCompressionOn(value string) (err error) { + return instance.SetProperty("CompressionOn", (value)) +} + +// GetCompressionOn gets the value of CompressionOn for the instance +func (instance *Win32_POTSModem) GetPropertyCompressionOn() (value string, err error) { + retValue, err := instance.GetProperty("CompressionOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConfigurationDialog sets the value of ConfigurationDialog for the instance +func (instance *Win32_POTSModem) SetPropertyConfigurationDialog(value string) (err error) { + return instance.SetProperty("ConfigurationDialog", (value)) +} + +// GetConfigurationDialog gets the value of ConfigurationDialog for the instance +func (instance *Win32_POTSModem) GetPropertyConfigurationDialog() (value string, err error) { + retValue, err := instance.GetProperty("ConfigurationDialog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDCB sets the value of DCB for the instance +func (instance *Win32_POTSModem) SetPropertyDCB(value []uint8) (err error) { + return instance.SetProperty("DCB", (value)) +} + +// GetDCB gets the value of DCB for the instance +func (instance *Win32_POTSModem) GetPropertyDCB() (value []uint8, err error) { + retValue, err := instance.GetProperty("DCB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetDefault sets the value of Default for the instance +func (instance *Win32_POTSModem) SetPropertyDefault(value []uint8) (err error) { + return instance.SetProperty("Default", (value)) +} + +// GetDefault gets the value of Default for the instance +func (instance *Win32_POTSModem) GetPropertyDefault() (value []uint8, err error) { + retValue, err := instance.GetProperty("Default") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetDeviceLoader sets the value of DeviceLoader for the instance +func (instance *Win32_POTSModem) SetPropertyDeviceLoader(value string) (err error) { + return instance.SetProperty("DeviceLoader", (value)) +} + +// GetDeviceLoader gets the value of DeviceLoader for the instance +func (instance *Win32_POTSModem) GetPropertyDeviceLoader() (value string, err error) { + retValue, err := instance.GetProperty("DeviceLoader") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceType sets the value of DeviceType for the instance +func (instance *Win32_POTSModem) SetPropertyDeviceType(value string) (err error) { + return instance.SetProperty("DeviceType", (value)) +} + +// GetDeviceType gets the value of DeviceType for the instance +func (instance *Win32_POTSModem) GetPropertyDeviceType() (value string, err error) { + retValue, err := instance.GetProperty("DeviceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverDate sets the value of DriverDate for the instance +func (instance *Win32_POTSModem) SetPropertyDriverDate(value string) (err error) { + return instance.SetProperty("DriverDate", (value)) +} + +// GetDriverDate gets the value of DriverDate for the instance +func (instance *Win32_POTSModem) GetPropertyDriverDate() (value string, err error) { + retValue, err := instance.GetProperty("DriverDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorControlForced sets the value of ErrorControlForced for the instance +func (instance *Win32_POTSModem) SetPropertyErrorControlForced(value string) (err error) { + return instance.SetProperty("ErrorControlForced", (value)) +} + +// GetErrorControlForced gets the value of ErrorControlForced for the instance +func (instance *Win32_POTSModem) GetPropertyErrorControlForced() (value string, err error) { + retValue, err := instance.GetProperty("ErrorControlForced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorControlOff sets the value of ErrorControlOff for the instance +func (instance *Win32_POTSModem) SetPropertyErrorControlOff(value string) (err error) { + return instance.SetProperty("ErrorControlOff", (value)) +} + +// GetErrorControlOff gets the value of ErrorControlOff for the instance +func (instance *Win32_POTSModem) GetPropertyErrorControlOff() (value string, err error) { + retValue, err := instance.GetProperty("ErrorControlOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorControlOn sets the value of ErrorControlOn for the instance +func (instance *Win32_POTSModem) SetPropertyErrorControlOn(value string) (err error) { + return instance.SetProperty("ErrorControlOn", (value)) +} + +// GetErrorControlOn gets the value of ErrorControlOn for the instance +func (instance *Win32_POTSModem) GetPropertyErrorControlOn() (value string, err error) { + retValue, err := instance.GetProperty("ErrorControlOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlowControlHard sets the value of FlowControlHard for the instance +func (instance *Win32_POTSModem) SetPropertyFlowControlHard(value string) (err error) { + return instance.SetProperty("FlowControlHard", (value)) +} + +// GetFlowControlHard gets the value of FlowControlHard for the instance +func (instance *Win32_POTSModem) GetPropertyFlowControlHard() (value string, err error) { + retValue, err := instance.GetProperty("FlowControlHard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlowControlOff sets the value of FlowControlOff for the instance +func (instance *Win32_POTSModem) SetPropertyFlowControlOff(value string) (err error) { + return instance.SetProperty("FlowControlOff", (value)) +} + +// GetFlowControlOff gets the value of FlowControlOff for the instance +func (instance *Win32_POTSModem) GetPropertyFlowControlOff() (value string, err error) { + retValue, err := instance.GetProperty("FlowControlOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlowControlSoft sets the value of FlowControlSoft for the instance +func (instance *Win32_POTSModem) SetPropertyFlowControlSoft(value string) (err error) { + return instance.SetProperty("FlowControlSoft", (value)) +} + +// GetFlowControlSoft gets the value of FlowControlSoft for the instance +func (instance *Win32_POTSModem) GetPropertyFlowControlSoft() (value string, err error) { + retValue, err := instance.GetProperty("FlowControlSoft") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInactivityScale sets the value of InactivityScale for the instance +func (instance *Win32_POTSModem) SetPropertyInactivityScale(value string) (err error) { + return instance.SetProperty("InactivityScale", (value)) +} + +// GetInactivityScale gets the value of InactivityScale for the instance +func (instance *Win32_POTSModem) GetPropertyInactivityScale() (value string, err error) { + retValue, err := instance.GetProperty("InactivityScale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndex sets the value of Index for the instance +func (instance *Win32_POTSModem) SetPropertyIndex(value uint32) (err error) { + return instance.SetProperty("Index", (value)) +} + +// GetIndex gets the value of Index for the instance +func (instance *Win32_POTSModem) GetPropertyIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("Index") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIndexEx sets the value of IndexEx for the instance +func (instance *Win32_POTSModem) SetPropertyIndexEx(value string) (err error) { + return instance.SetProperty("IndexEx", (value)) +} + +// GetIndexEx gets the value of IndexEx for the instance +func (instance *Win32_POTSModem) GetPropertyIndexEx() (value string, err error) { + retValue, err := instance.GetProperty("IndexEx") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *Win32_POTSModem) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *Win32_POTSModem) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModemInfPath sets the value of ModemInfPath for the instance +func (instance *Win32_POTSModem) SetPropertyModemInfPath(value string) (err error) { + return instance.SetProperty("ModemInfPath", (value)) +} + +// GetModemInfPath gets the value of ModemInfPath for the instance +func (instance *Win32_POTSModem) GetPropertyModemInfPath() (value string, err error) { + retValue, err := instance.GetProperty("ModemInfPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModemInfSection sets the value of ModemInfSection for the instance +func (instance *Win32_POTSModem) SetPropertyModemInfSection(value string) (err error) { + return instance.SetProperty("ModemInfSection", (value)) +} + +// GetModemInfSection gets the value of ModemInfSection for the instance +func (instance *Win32_POTSModem) GetPropertyModemInfSection() (value string, err error) { + retValue, err := instance.GetProperty("ModemInfSection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModulationBell sets the value of ModulationBell for the instance +func (instance *Win32_POTSModem) SetPropertyModulationBell(value string) (err error) { + return instance.SetProperty("ModulationBell", (value)) +} + +// GetModulationBell gets the value of ModulationBell for the instance +func (instance *Win32_POTSModem) GetPropertyModulationBell() (value string, err error) { + retValue, err := instance.GetProperty("ModulationBell") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModulationCCITT sets the value of ModulationCCITT for the instance +func (instance *Win32_POTSModem) SetPropertyModulationCCITT(value string) (err error) { + return instance.SetProperty("ModulationCCITT", (value)) +} + +// GetModulationCCITT gets the value of ModulationCCITT for the instance +func (instance *Win32_POTSModem) GetPropertyModulationCCITT() (value string, err error) { + retValue, err := instance.GetProperty("ModulationCCITT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortSubClass sets the value of PortSubClass for the instance +func (instance *Win32_POTSModem) SetPropertyPortSubClass(value string) (err error) { + return instance.SetProperty("PortSubClass", (value)) +} + +// GetPortSubClass gets the value of PortSubClass for the instance +func (instance *Win32_POTSModem) GetPropertyPortSubClass() (value string, err error) { + retValue, err := instance.GetProperty("PortSubClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrefix sets the value of Prefix for the instance +func (instance *Win32_POTSModem) SetPropertyPrefix(value string) (err error) { + return instance.SetProperty("Prefix", (value)) +} + +// GetPrefix gets the value of Prefix for the instance +func (instance *Win32_POTSModem) GetPropertyPrefix() (value string, err error) { + retValue, err := instance.GetProperty("Prefix") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProperties sets the value of Properties for the instance +func (instance *Win32_POTSModem) SetPropertyProperties(value []uint8) (err error) { + return instance.SetProperty("Properties", (value)) +} + +// GetProperties gets the value of Properties for the instance +func (instance *Win32_POTSModem) GetPropertyProperties() (value []uint8, err error) { + retValue, err := instance.GetProperty("Properties") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *Win32_POTSModem) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *Win32_POTSModem) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPulse sets the value of Pulse for the instance +func (instance *Win32_POTSModem) SetPropertyPulse(value string) (err error) { + return instance.SetProperty("Pulse", (value)) +} + +// GetPulse gets the value of Pulse for the instance +func (instance *Win32_POTSModem) GetPropertyPulse() (value string, err error) { + retValue, err := instance.GetProperty("Pulse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReset sets the value of Reset for the instance +func (instance *Win32_POTSModem) SetPropertyReset(value string) (err error) { + return instance.SetProperty("Reset", (value)) +} + +// GetReset gets the value of Reset for the instance +func (instance *Win32_POTSModem) GetPropertyReset() (value string, err error) { + retValue, err := instance.GetProperty("Reset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetResponsesKeyName sets the value of ResponsesKeyName for the instance +func (instance *Win32_POTSModem) SetPropertyResponsesKeyName(value string) (err error) { + return instance.SetProperty("ResponsesKeyName", (value)) +} + +// GetResponsesKeyName gets the value of ResponsesKeyName for the instance +func (instance *Win32_POTSModem) GetPropertyResponsesKeyName() (value string, err error) { + retValue, err := instance.GetProperty("ResponsesKeyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerModeDial sets the value of SpeakerModeDial for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerModeDial(value string) (err error) { + return instance.SetProperty("SpeakerModeDial", (value)) +} + +// GetSpeakerModeDial gets the value of SpeakerModeDial for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerModeDial() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerModeDial") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerModeOff sets the value of SpeakerModeOff for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerModeOff(value string) (err error) { + return instance.SetProperty("SpeakerModeOff", (value)) +} + +// GetSpeakerModeOff gets the value of SpeakerModeOff for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerModeOff() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerModeOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerModeOn sets the value of SpeakerModeOn for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerModeOn(value string) (err error) { + return instance.SetProperty("SpeakerModeOn", (value)) +} + +// GetSpeakerModeOn gets the value of SpeakerModeOn for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerModeOn() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerModeOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerModeSetup sets the value of SpeakerModeSetup for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerModeSetup(value string) (err error) { + return instance.SetProperty("SpeakerModeSetup", (value)) +} + +// GetSpeakerModeSetup gets the value of SpeakerModeSetup for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerModeSetup() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerModeSetup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerVolumeHigh sets the value of SpeakerVolumeHigh for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerVolumeHigh(value string) (err error) { + return instance.SetProperty("SpeakerVolumeHigh", (value)) +} + +// GetSpeakerVolumeHigh gets the value of SpeakerVolumeHigh for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerVolumeHigh() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerVolumeHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerVolumeLow sets the value of SpeakerVolumeLow for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerVolumeLow(value string) (err error) { + return instance.SetProperty("SpeakerVolumeLow", (value)) +} + +// GetSpeakerVolumeLow gets the value of SpeakerVolumeLow for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerVolumeLow() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerVolumeLow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpeakerVolumeMed sets the value of SpeakerVolumeMed for the instance +func (instance *Win32_POTSModem) SetPropertySpeakerVolumeMed(value string) (err error) { + return instance.SetProperty("SpeakerVolumeMed", (value)) +} + +// GetSpeakerVolumeMed gets the value of SpeakerVolumeMed for the instance +func (instance *Win32_POTSModem) GetPropertySpeakerVolumeMed() (value string, err error) { + retValue, err := instance.GetProperty("SpeakerVolumeMed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStringFormat sets the value of StringFormat for the instance +func (instance *Win32_POTSModem) SetPropertyStringFormat(value string) (err error) { + return instance.SetProperty("StringFormat", (value)) +} + +// GetStringFormat gets the value of StringFormat for the instance +func (instance *Win32_POTSModem) GetPropertyStringFormat() (value string, err error) { + retValue, err := instance.GetProperty("StringFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTerminator sets the value of Terminator for the instance +func (instance *Win32_POTSModem) SetPropertyTerminator(value string) (err error) { + return instance.SetProperty("Terminator", (value)) +} + +// GetTerminator gets the value of Terminator for the instance +func (instance *Win32_POTSModem) GetPropertyTerminator() (value string, err error) { + retValue, err := instance.GetProperty("Terminator") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTone sets the value of Tone for the instance +func (instance *Win32_POTSModem) SetPropertyTone(value string) (err error) { + return instance.SetProperty("Tone", (value)) +} + +// GetTone gets the value of Tone for the instance +func (instance *Win32_POTSModem) GetPropertyTone() (value string, err error) { + retValue, err := instance.GetProperty("Tone") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVoiceSwitchFeature sets the value of VoiceSwitchFeature for the instance +func (instance *Win32_POTSModem) SetPropertyVoiceSwitchFeature(value string) (err error) { + return instance.SetProperty("VoiceSwitchFeature", (value)) +} + +// GetVoiceSwitchFeature gets the value of VoiceSwitchFeature for the instance +func (instance *Win32_POTSModem) GetPropertyVoiceSwitchFeature() (value string, err error) { + retValue, err := instance.GetProperty("VoiceSwitchFeature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModemToSerialPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModemToSerialPort.go new file mode 100644 index 00000000..e7a04d48 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_POTSModemToSerialPort.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_POTSModemToSerialPort struct +type Win32_POTSModemToSerialPort struct { + *CIM_ControlledBy +} + +func NewWin32_POTSModemToSerialPortEx1(instance *cim.WmiInstance) (newInstance *Win32_POTSModemToSerialPort, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_POTSModemToSerialPort{ + CIM_ControlledBy: tmp, + } + return +} + +func NewWin32_POTSModemToSerialPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_POTSModemToSerialPort, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_POTSModemToSerialPort{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFile.go new file mode 100644 index 00000000..da788549 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFile.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PageFile struct +type Win32_PageFile struct { + *CIM_DataFile + + // + FreeSpace uint32 + + // + InitialSize uint32 + + // + MaximumSize uint32 +} + +func NewWin32_PageFileEx1(instance *cim.WmiInstance) (newInstance *Win32_PageFile, err error) { + tmp, err := NewCIM_DataFileEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PageFile{ + CIM_DataFile: tmp, + } + return +} + +func NewWin32_PageFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PageFile, err error) { + tmp, err := NewCIM_DataFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PageFile{ + CIM_DataFile: tmp, + } + return +} + +// SetFreeSpace sets the value of FreeSpace for the instance +func (instance *Win32_PageFile) SetPropertyFreeSpace(value uint32) (err error) { + return instance.SetProperty("FreeSpace", (value)) +} + +// GetFreeSpace gets the value of FreeSpace for the instance +func (instance *Win32_PageFile) GetPropertyFreeSpace() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInitialSize sets the value of InitialSize for the instance +func (instance *Win32_PageFile) SetPropertyInitialSize(value uint32) (err error) { + return instance.SetProperty("InitialSize", (value)) +} + +// GetInitialSize gets the value of InitialSize for the instance +func (instance *Win32_PageFile) GetPropertyInitialSize() (value uint32, err error) { + retValue, err := instance.GetProperty("InitialSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumSize sets the value of MaximumSize for the instance +func (instance *Win32_PageFile) SetPropertyMaximumSize(value uint32) (err error) { + return instance.SetProperty("MaximumSize", (value)) +} + +// GetMaximumSize gets the value of MaximumSize for the instance +func (instance *Win32_PageFile) GetPropertyMaximumSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileElementSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileElementSetting.go new file mode 100644 index 00000000..bac621fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileElementSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PageFileElementSetting struct +type Win32_PageFileElementSetting struct { + *CIM_ElementSetting +} + +func NewWin32_PageFileElementSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_PageFileElementSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PageFileElementSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_PageFileElementSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PageFileElementSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PageFileElementSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileSetting.go new file mode 100644 index 00000000..fafb279e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileSetting.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PageFileSetting struct +type Win32_PageFileSetting struct { + *CIM_Setting + + // + InitialSize uint32 + + // + MaximumSize uint32 + + // + Name string +} + +func NewWin32_PageFileSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_PageFileSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PageFileSetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_PageFileSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PageFileSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PageFileSetting{ + CIM_Setting: tmp, + } + return +} + +// SetInitialSize sets the value of InitialSize for the instance +func (instance *Win32_PageFileSetting) SetPropertyInitialSize(value uint32) (err error) { + return instance.SetProperty("InitialSize", (value)) +} + +// GetInitialSize gets the value of InitialSize for the instance +func (instance *Win32_PageFileSetting) GetPropertyInitialSize() (value uint32, err error) { + retValue, err := instance.GetProperty("InitialSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumSize sets the value of MaximumSize for the instance +func (instance *Win32_PageFileSetting) SetPropertyMaximumSize(value uint32) (err error) { + return instance.SetProperty("MaximumSize", (value)) +} + +// GetMaximumSize gets the value of MaximumSize for the instance +func (instance *Win32_PageFileSetting) GetPropertyMaximumSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_PageFileSetting) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_PageFileSetting) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileUsage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileUsage.go new file mode 100644 index 00000000..8c312262 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PageFileUsage.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PageFileUsage struct +type Win32_PageFileUsage struct { + *CIM_LogicalElement + + // + AllocatedBaseSize uint32 + + // + CurrentUsage uint32 + + // + PeakUsage uint32 + + // + TempPageFile bool +} + +func NewWin32_PageFileUsageEx1(instance *cim.WmiInstance) (newInstance *Win32_PageFileUsage, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PageFileUsage{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_PageFileUsageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PageFileUsage, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PageFileUsage{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAllocatedBaseSize sets the value of AllocatedBaseSize for the instance +func (instance *Win32_PageFileUsage) SetPropertyAllocatedBaseSize(value uint32) (err error) { + return instance.SetProperty("AllocatedBaseSize", (value)) +} + +// GetAllocatedBaseSize gets the value of AllocatedBaseSize for the instance +func (instance *Win32_PageFileUsage) GetPropertyAllocatedBaseSize() (value uint32, err error) { + retValue, err := instance.GetProperty("AllocatedBaseSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUsage sets the value of CurrentUsage for the instance +func (instance *Win32_PageFileUsage) SetPropertyCurrentUsage(value uint32) (err error) { + return instance.SetProperty("CurrentUsage", (value)) +} + +// GetCurrentUsage gets the value of CurrentUsage for the instance +func (instance *Win32_PageFileUsage) GetPropertyCurrentUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPeakUsage sets the value of PeakUsage for the instance +func (instance *Win32_PageFileUsage) SetPropertyPeakUsage(value uint32) (err error) { + return instance.SetProperty("PeakUsage", (value)) +} + +// GetPeakUsage gets the value of PeakUsage for the instance +func (instance *Win32_PageFileUsage) GetPropertyPeakUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("PeakUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTempPageFile sets the value of TempPageFile for the instance +func (instance *Win32_PageFileUsage) SetPropertyTempPageFile(value bool) (err error) { + return instance.SetProperty("TempPageFile", (value)) +} + +// GetTempPageFile gets the value of TempPageFile for the instance +func (instance *Win32_PageFileUsage) GetPropertyTempPageFile() (value bool, err error) { + retValue, err := instance.GetProperty("TempPageFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ParallelPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ParallelPort.go new file mode 100644 index 00000000..5456c286 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ParallelPort.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ParallelPort struct +type Win32_ParallelPort struct { + *CIM_ParallelController + + // + OSAutoDiscovered bool +} + +func NewWin32_ParallelPortEx1(instance *cim.WmiInstance) (newInstance *Win32_ParallelPort, err error) { + tmp, err := NewCIM_ParallelControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ParallelPort{ + CIM_ParallelController: tmp, + } + return +} + +func NewWin32_ParallelPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ParallelPort, err error) { + tmp, err := NewCIM_ParallelControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ParallelPort{ + CIM_ParallelController: tmp, + } + return +} + +// SetOSAutoDiscovered sets the value of OSAutoDiscovered for the instance +func (instance *Win32_ParallelPort) SetPropertyOSAutoDiscovered(value bool) (err error) { + return instance.SetProperty("OSAutoDiscovered", (value)) +} + +// GetOSAutoDiscovered gets the value of OSAutoDiscovered for the instance +func (instance *Win32_ParallelPort) GetPropertyOSAutoDiscovered() (value bool, err error) { + retValue, err := instance.GetProperty("OSAutoDiscovered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Patch.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Patch.go new file mode 100644 index 00000000..e764897e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Patch.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Patch struct +type Win32_Patch struct { + *Win32_MSIResource + + // + Attributes uint16 + + // + File string + + // + PatchSize uint32 + + // + ProductCode string + + // + Sequence int16 +} + +func NewWin32_PatchEx1(instance *cim.WmiInstance) (newInstance *Win32_Patch, err error) { + tmp, err := NewWin32_MSIResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Patch{ + Win32_MSIResource: tmp, + } + return +} + +func NewWin32_PatchEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Patch, err error) { + tmp, err := NewWin32_MSIResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Patch{ + Win32_MSIResource: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_Patch) SetPropertyAttributes(value uint16) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_Patch) GetPropertyAttributes() (value uint16, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFile sets the value of File for the instance +func (instance *Win32_Patch) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *Win32_Patch) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPatchSize sets the value of PatchSize for the instance +func (instance *Win32_Patch) SetPropertyPatchSize(value uint32) (err error) { + return instance.SetProperty("PatchSize", (value)) +} + +// GetPatchSize gets the value of PatchSize for the instance +func (instance *Win32_Patch) GetPropertyPatchSize() (value uint32, err error) { + retValue, err := instance.GetProperty("PatchSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProductCode sets the value of ProductCode for the instance +func (instance *Win32_Patch) SetPropertyProductCode(value string) (err error) { + return instance.SetProperty("ProductCode", (value)) +} + +// GetProductCode gets the value of ProductCode for the instance +func (instance *Win32_Patch) GetPropertyProductCode() (value string, err error) { + retValue, err := instance.GetProperty("ProductCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSequence sets the value of Sequence for the instance +func (instance *Win32_Patch) SetPropertySequence(value int16) (err error) { + return instance.SetProperty("Sequence", (value)) +} + +// GetSequence gets the value of Sequence for the instance +func (instance *Win32_Patch) GetPropertySequence() (value int16, err error) { + retValue, err := instance.GetProperty("Sequence") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchFile.go new file mode 100644 index 00000000..f0292cdf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PatchFile struct +type Win32_PatchFile struct { + *Win32_SettingCheck +} + +func NewWin32_PatchFileEx1(instance *cim.WmiInstance) (newInstance *Win32_PatchFile, err error) { + tmp, err := NewWin32_SettingCheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PatchFile{ + Win32_SettingCheck: tmp, + } + return +} + +func NewWin32_PatchFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PatchFile, err error) { + tmp, err := NewWin32_SettingCheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PatchFile{ + Win32_SettingCheck: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchPackage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchPackage.go new file mode 100644 index 00000000..e48154fd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PatchPackage.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PatchPackage struct +type Win32_PatchPackage struct { + *Win32_MSIResource + + // + PatchID string + + // + ProductCode string +} + +func NewWin32_PatchPackageEx1(instance *cim.WmiInstance) (newInstance *Win32_PatchPackage, err error) { + tmp, err := NewWin32_MSIResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PatchPackage{ + Win32_MSIResource: tmp, + } + return +} + +func NewWin32_PatchPackageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PatchPackage, err error) { + tmp, err := NewWin32_MSIResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PatchPackage{ + Win32_MSIResource: tmp, + } + return +} + +// SetPatchID sets the value of PatchID for the instance +func (instance *Win32_PatchPackage) SetPropertyPatchID(value string) (err error) { + return instance.SetProperty("PatchID", (value)) +} + +// GetPatchID gets the value of PatchID for the instance +func (instance *Win32_PatchPackage) GetPropertyPatchID() (value string, err error) { + retValue, err := instance.GetProperty("PatchID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductCode sets the value of ProductCode for the instance +func (instance *Win32_PatchPackage) SetPropertyProductCode(value string) (err error) { + return instance.SetProperty("ProductCode", (value)) +} + +// GetProductCode gets the value of ProductCode for the instance +func (instance *Win32_PatchPackage) GetPropertyProductCode() (value string, err error) { + retValue, err := instance.GetProperty("ProductCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Perf.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Perf.go new file mode 100644 index 00000000..32346feb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Perf.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Perf struct +type Win32_Perf struct { + *CIM_StatisticalInformation + + // + Frequency_Object uint64 + + // + Frequency_PerfTime uint64 + + // + Frequency_Sys100NS uint64 + + // + Timestamp_Object uint64 + + // + Timestamp_PerfTime uint64 + + // + Timestamp_Sys100NS uint64 +} + +func NewWin32_PerfEx1(instance *cim.WmiInstance) (newInstance *Win32_Perf, err error) { + tmp, err := NewCIM_StatisticalInformationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Perf{ + CIM_StatisticalInformation: tmp, + } + return +} + +func NewWin32_PerfEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Perf, err error) { + tmp, err := NewCIM_StatisticalInformationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Perf{ + CIM_StatisticalInformation: tmp, + } + return +} + +// SetFrequency_Object sets the value of Frequency_Object for the instance +func (instance *Win32_Perf) SetPropertyFrequency_Object(value uint64) (err error) { + return instance.SetProperty("Frequency_Object", (value)) +} + +// GetFrequency_Object gets the value of Frequency_Object for the instance +func (instance *Win32_Perf) GetPropertyFrequency_Object() (value uint64, err error) { + retValue, err := instance.GetProperty("Frequency_Object") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFrequency_PerfTime sets the value of Frequency_PerfTime for the instance +func (instance *Win32_Perf) SetPropertyFrequency_PerfTime(value uint64) (err error) { + return instance.SetProperty("Frequency_PerfTime", (value)) +} + +// GetFrequency_PerfTime gets the value of Frequency_PerfTime for the instance +func (instance *Win32_Perf) GetPropertyFrequency_PerfTime() (value uint64, err error) { + retValue, err := instance.GetProperty("Frequency_PerfTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFrequency_Sys100NS sets the value of Frequency_Sys100NS for the instance +func (instance *Win32_Perf) SetPropertyFrequency_Sys100NS(value uint64) (err error) { + return instance.SetProperty("Frequency_Sys100NS", (value)) +} + +// GetFrequency_Sys100NS gets the value of Frequency_Sys100NS for the instance +func (instance *Win32_Perf) GetPropertyFrequency_Sys100NS() (value uint64, err error) { + retValue, err := instance.GetProperty("Frequency_Sys100NS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTimestamp_Object sets the value of Timestamp_Object for the instance +func (instance *Win32_Perf) SetPropertyTimestamp_Object(value uint64) (err error) { + return instance.SetProperty("Timestamp_Object", (value)) +} + +// GetTimestamp_Object gets the value of Timestamp_Object for the instance +func (instance *Win32_Perf) GetPropertyTimestamp_Object() (value uint64, err error) { + retValue, err := instance.GetProperty("Timestamp_Object") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTimestamp_PerfTime sets the value of Timestamp_PerfTime for the instance +func (instance *Win32_Perf) SetPropertyTimestamp_PerfTime(value uint64) (err error) { + return instance.SetProperty("Timestamp_PerfTime", (value)) +} + +// GetTimestamp_PerfTime gets the value of Timestamp_PerfTime for the instance +func (instance *Win32_Perf) GetPropertyTimestamp_PerfTime() (value uint64, err error) { + retValue, err := instance.GetProperty("Timestamp_PerfTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTimestamp_Sys100NS sets the value of Timestamp_Sys100NS for the instance +func (instance *Win32_Perf) SetPropertyTimestamp_Sys100NS(value uint64) (err error) { + return instance.SetProperty("Timestamp_Sys100NS", (value)) +} + +// GetTimestamp_Sys100NS gets the value of Timestamp_Sys100NS for the instance +func (instance *Win32_Perf) GetPropertyTimestamp_Sys100NS() (value uint64, err error) { + retValue, err := instance.GetProperty("Timestamp_Sys100NS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData.go new file mode 100644 index 00000000..8a5b47a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData struct +type Win32_PerfFormattedData struct { + *Win32_Perf +} + +func NewWin32_PerfFormattedDataEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData, err error) { + tmp, err := NewWin32_PerfEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData{ + Win32_Perf: tmp, + } + return +} + +func NewWin32_PerfFormattedDataEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData, err error) { + tmp, err := NewWin32_PerfEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData{ + Win32_Perf: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP.go new file mode 100644 index 00000000..ba3ba0da --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP struct +type Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP struct { + *Win32_PerfFormattedData + + // + DroppedDatagrams uint32 + + // + DroppedDatagramsPersec uint32 + + // + RejectedConnections uint32 + + // + RejectedConnectionsPersec uint32 +} + +func NewWin32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDroppedDatagrams sets the value of DroppedDatagrams for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) SetPropertyDroppedDatagrams(value uint32) (err error) { + return instance.SetProperty("DroppedDatagrams", (value)) +} + +// GetDroppedDatagrams gets the value of DroppedDatagrams for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) GetPropertyDroppedDatagrams() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedDatagrams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedDatagramsPersec sets the value of DroppedDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) SetPropertyDroppedDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DroppedDatagramsPersec", (value)) +} + +// GetDroppedDatagramsPersec gets the value of DroppedDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) GetPropertyDroppedDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRejectedConnections sets the value of RejectedConnections for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) SetPropertyRejectedConnections(value uint32) (err error) { + return instance.SetProperty("RejectedConnections", (value)) +} + +// GetRejectedConnections gets the value of RejectedConnections for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) GetPropertyRejectedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RejectedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRejectedConnectionsPersec sets the value of RejectedConnectionsPersec for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) SetPropertyRejectedConnectionsPersec(value uint32) (err error) { + return instance.SetProperty("RejectedConnectionsPersec", (value)) +} + +// GetRejectedConnectionsPersec gets the value of RejectedConnectionsPersec for the instance +func (instance *Win32_PerfFormattedData_AFDCounters_MicrosoftWinsockBSP) GetPropertyRejectedConnectionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RejectedConnectionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications.go new file mode 100644 index 00000000..50b46d2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications struct +type Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications struct { + *Win32_PerfFormattedData + + // + NumberofScopesloadedinmemory uint32 + + // + Totalnumberofscopes uint32 +} + +func NewWin32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplicationsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplicationsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberofScopesloadedinmemory sets the value of NumberofScopesloadedinmemory for the instance +func (instance *Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications) SetPropertyNumberofScopesloadedinmemory(value uint32) (err error) { + return instance.SetProperty("NumberofScopesloadedinmemory", (value)) +} + +// GetNumberofScopesloadedinmemory gets the value of NumberofScopesloadedinmemory for the instance +func (instance *Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications) GetPropertyNumberofScopesloadedinmemory() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofScopesloadedinmemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalnumberofscopes sets the value of Totalnumberofscopes for the instance +func (instance *Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications) SetPropertyTotalnumberofscopes(value uint32) (err error) { + return instance.SetProperty("Totalnumberofscopes", (value)) +} + +// GetTotalnumberofscopes gets the value of Totalnumberofscopes for the instance +func (instance *Win32_PerfFormattedData_AuthorizationManager_AuthorizationManagerApplications) GetPropertyTotalnumberofscopes() (value uint32, err error) { + retValue, err := instance.GetProperty("Totalnumberofscopes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer.go new file mode 100644 index 00000000..f2809b19 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer struct +type Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer struct { + *Win32_PerfFormattedData + + // + AvailableMemory uint32 + + // + AvailableMemoryForBalancing uint32 + + // + AveragePressure uint32 + + // + SystemCurrentPressure uint32 +} + +func NewWin32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvailableMemory sets the value of AvailableMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertyAvailableMemory(value uint32) (err error) { + return instance.SetProperty("AvailableMemory", (value)) +} + +// GetAvailableMemory gets the value of AvailableMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertyAvailableMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvailableMemoryForBalancing sets the value of AvailableMemoryForBalancing for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertyAvailableMemoryForBalancing(value uint32) (err error) { + return instance.SetProperty("AvailableMemoryForBalancing", (value)) +} + +// GetAvailableMemoryForBalancing gets the value of AvailableMemoryForBalancing for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertyAvailableMemoryForBalancing() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableMemoryForBalancing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragePressure sets the value of AveragePressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertyAveragePressure(value uint32) (err error) { + return instance.SetProperty("AveragePressure", (value)) +} + +// GetAveragePressure gets the value of AveragePressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertyAveragePressure() (value uint32, err error) { + retValue, err := instance.GetProperty("AveragePressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemCurrentPressure sets the value of SystemCurrentPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertySystemCurrentPressure(value uint32) (err error) { + return instance.SetProperty("SystemCurrentPressure", (value)) +} + +// GetSystemCurrentPressure gets the value of SystemCurrentPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertySystemCurrentPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemCurrentPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM.go new file mode 100644 index 00000000..0514d315 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM struct +type Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM struct { + *Win32_PerfFormattedData + + // + AddedMemory uint64 + + // + AveragePressure uint32 + + // + CurrentPressure uint32 + + // + GuestVisiblePhysicalMemory uint32 + + // + MaximumPressure uint32 + + // + MemoryAddOperations uint64 + + // + MemoryRemoveOperations uint64 + + // + MinimumPressure uint32 + + // + PhysicalMemory uint32 + + // + RemovedMemory uint64 + + // + SmartPagingWorkingSetSize uint32 +} + +func NewWin32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVMEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVMEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAddedMemory sets the value of AddedMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyAddedMemory(value uint64) (err error) { + return instance.SetProperty("AddedMemory", (value)) +} + +// GetAddedMemory gets the value of AddedMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyAddedMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("AddedMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragePressure sets the value of AveragePressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyAveragePressure(value uint32) (err error) { + return instance.SetProperty("AveragePressure", (value)) +} + +// GetAveragePressure gets the value of AveragePressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyAveragePressure() (value uint32, err error) { + retValue, err := instance.GetProperty("AveragePressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentPressure sets the value of CurrentPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyCurrentPressure(value uint32) (err error) { + return instance.SetProperty("CurrentPressure", (value)) +} + +// GetCurrentPressure gets the value of CurrentPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyCurrentPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGuestVisiblePhysicalMemory sets the value of GuestVisiblePhysicalMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyGuestVisiblePhysicalMemory(value uint32) (err error) { + return instance.SetProperty("GuestVisiblePhysicalMemory", (value)) +} + +// GetGuestVisiblePhysicalMemory gets the value of GuestVisiblePhysicalMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyGuestVisiblePhysicalMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("GuestVisiblePhysicalMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumPressure sets the value of MaximumPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMaximumPressure(value uint32) (err error) { + return instance.SetProperty("MaximumPressure", (value)) +} + +// GetMaximumPressure gets the value of MaximumPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMaximumPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMemoryAddOperations sets the value of MemoryAddOperations for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMemoryAddOperations(value uint64) (err error) { + return instance.SetProperty("MemoryAddOperations", (value)) +} + +// GetMemoryAddOperations gets the value of MemoryAddOperations for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMemoryAddOperations() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryAddOperations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryRemoveOperations sets the value of MemoryRemoveOperations for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMemoryRemoveOperations(value uint64) (err error) { + return instance.SetProperty("MemoryRemoveOperations", (value)) +} + +// GetMemoryRemoveOperations gets the value of MemoryRemoveOperations for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMemoryRemoveOperations() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryRemoveOperations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMinimumPressure sets the value of MinimumPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMinimumPressure(value uint32) (err error) { + return instance.SetProperty("MinimumPressure", (value)) +} + +// GetMinimumPressure gets the value of MinimumPressure for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMinimumPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("MinimumPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPhysicalMemory sets the value of PhysicalMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyPhysicalMemory(value uint32) (err error) { + return instance.SetProperty("PhysicalMemory", (value)) +} + +// GetPhysicalMemory gets the value of PhysicalMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyPhysicalMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("PhysicalMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemovedMemory sets the value of RemovedMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyRemovedMemory(value uint64) (err error) { + return instance.SetProperty("RemovedMemory", (value)) +} + +// GetRemovedMemory gets the value of RemovedMemory for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyRemovedMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("RemovedMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSmartPagingWorkingSetSize sets the value of SmartPagingWorkingSetSize for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) SetPropertySmartPagingWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("SmartPagingWorkingSetSize", (value)) +} + +// GetSmartPagingWorkingSetSize gets the value of SmartPagingWorkingSetSize for the instance +func (instance *Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM) GetPropertySmartPagingWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("SmartPagingWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores.go new file mode 100644 index 00000000..d973e615 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores.go @@ -0,0 +1,1520 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores struct +type Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores struct { + *Win32_PerfFormattedData + + // + BindingsActive uint64 + + // + BindingsEnabled uint64 + + // + CachePages uint64 + + // + CachePagesBytes uint64 + + // + CachePagesDirty uint64 + + // + CachePagesFree uint64 + + // + CachePagesStandBy uint64 + + // + CachePagesStandByL0 uint64 + + // + CachePagesStandByL1 uint64 + + // + CachePagesStandByL2 uint64 + + // + CachePagesStandByOldestL1 uint64 + + // + CacheStores uint64 + + // + CacheUsageEfficiencyPercent uint64 + + // + CacheUsagePercent uint64 + + // + DestageBytes uint64 + + // + DestageBytesPersec uint64 + + // + DestagedAtLowPriPercent uint64 + + // + DestagedAtNormalPriPercent uint64 + + // + DestageTransfers uint64 + + // + DestageTransfersPersec uint64 + + // + DevicesBlocked uint64 + + // + DevicesHybrid uint64 + + // + DevicesMaintenance uint64 + + // + DevicesNotConfigured uint64 + + // + DevicesOrphan uint64 + + // + MultiPageFragments uint64 + + // + MultiPageFragmentsRate uint64 + + // + MultiPageReMap uint64 + + // + PageHit uint64 + + // + PageHitPersec uint64 + + // + PageReMap uint64 + + // + PageReMapPersec uint64 + + // + ReadErrorsMedia uint64 + + // + ReadErrorsTimeout uint64 + + // + ReadErrorsTotal uint64 + + // + UpdateBytes uint64 + + // + UpdateBytesPersec uint64 + + // + UpdatesCritical uint64 + + // + UpdatesCriticalLogFull uint64 + + // + UpdatesCriticalPersec uint64 + + // + UpdatesNonCritical uint64 + + // + UpdatesNonCriticalLogFull uint64 + + // + UpdatesNonCriticalPersec uint64 + + // + UpdatesNotCommitted uint64 + + // + UpdateTransfers uint64 + + // + UpdateTransfersPersec uint64 + + // + WriteErrorsMedia uint64 + + // + WriteErrorsTimeout uint64 + + // + WriteErrorsTotal uint64 +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStoresEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStoresEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBindingsActive sets the value of BindingsActive for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyBindingsActive(value uint64) (err error) { + return instance.SetProperty("BindingsActive", (value)) +} + +// GetBindingsActive gets the value of BindingsActive for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyBindingsActive() (value uint64, err error) { + retValue, err := instance.GetProperty("BindingsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBindingsEnabled sets the value of BindingsEnabled for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyBindingsEnabled(value uint64) (err error) { + return instance.SetProperty("BindingsEnabled", (value)) +} + +// GetBindingsEnabled gets the value of BindingsEnabled for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyBindingsEnabled() (value uint64, err error) { + retValue, err := instance.GetProperty("BindingsEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePages sets the value of CachePages for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePages(value uint64) (err error) { + return instance.SetProperty("CachePages", (value)) +} + +// GetCachePages gets the value of CachePages for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePages() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesBytes sets the value of CachePagesBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesBytes(value uint64) (err error) { + return instance.SetProperty("CachePagesBytes", (value)) +} + +// GetCachePagesBytes gets the value of CachePagesBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDirty sets the value of CachePagesDirty for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesDirty(value uint64) (err error) { + return instance.SetProperty("CachePagesDirty", (value)) +} + +// GetCachePagesDirty gets the value of CachePagesDirty for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesDirty() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesFree sets the value of CachePagesFree for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesFree(value uint64) (err error) { + return instance.SetProperty("CachePagesFree", (value)) +} + +// GetCachePagesFree gets the value of CachePagesFree for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesFree() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesFree") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandBy sets the value of CachePagesStandBy for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandBy(value uint64) (err error) { + return instance.SetProperty("CachePagesStandBy", (value)) +} + +// GetCachePagesStandBy gets the value of CachePagesStandBy for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandBy() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandBy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByL0 sets the value of CachePagesStandByL0 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByL0(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByL0", (value)) +} + +// GetCachePagesStandByL0 gets the value of CachePagesStandByL0 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByL0() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByL0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByL1 sets the value of CachePagesStandByL1 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByL1(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByL1", (value)) +} + +// GetCachePagesStandByL1 gets the value of CachePagesStandByL1 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByL1() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByL1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByL2 sets the value of CachePagesStandByL2 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByL2(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByL2", (value)) +} + +// GetCachePagesStandByL2 gets the value of CachePagesStandByL2 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByL2() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByL2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByOldestL1 sets the value of CachePagesStandByOldestL1 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByOldestL1(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByOldestL1", (value)) +} + +// GetCachePagesStandByOldestL1 gets the value of CachePagesStandByOldestL1 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByOldestL1() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByOldestL1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheStores sets the value of CacheStores for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheStores(value uint64) (err error) { + return instance.SetProperty("CacheStores", (value)) +} + +// GetCacheStores gets the value of CacheStores for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheStores() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheStores") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsageEfficiencyPercent sets the value of CacheUsageEfficiencyPercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheUsageEfficiencyPercent(value uint64) (err error) { + return instance.SetProperty("CacheUsageEfficiencyPercent", (value)) +} + +// GetCacheUsageEfficiencyPercent gets the value of CacheUsageEfficiencyPercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheUsageEfficiencyPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsageEfficiencyPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsagePercent sets the value of CacheUsagePercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheUsagePercent(value uint64) (err error) { + return instance.SetProperty("CacheUsagePercent", (value)) +} + +// GetCacheUsagePercent gets the value of CacheUsagePercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheUsagePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsagePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytes sets the value of DestageBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageBytes(value uint64) (err error) { + return instance.SetProperty("DestageBytes", (value)) +} + +// GetDestageBytes gets the value of DestageBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytesPersec sets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageBytesPersec(value uint64) (err error) { + return instance.SetProperty("DestageBytesPersec", (value)) +} + +// GetDestageBytesPersec gets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestagedAtLowPriPercent sets the value of DestagedAtLowPriPercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestagedAtLowPriPercent(value uint64) (err error) { + return instance.SetProperty("DestagedAtLowPriPercent", (value)) +} + +// GetDestagedAtLowPriPercent gets the value of DestagedAtLowPriPercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestagedAtLowPriPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("DestagedAtLowPriPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestagedAtNormalPriPercent sets the value of DestagedAtNormalPriPercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestagedAtNormalPriPercent(value uint64) (err error) { + return instance.SetProperty("DestagedAtNormalPriPercent", (value)) +} + +// GetDestagedAtNormalPriPercent gets the value of DestagedAtNormalPriPercent for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestagedAtNormalPriPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("DestagedAtNormalPriPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfers sets the value of DestageTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageTransfers(value uint64) (err error) { + return instance.SetProperty("DestageTransfers", (value)) +} + +// GetDestageTransfers gets the value of DestageTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfersPersec sets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageTransfersPersec(value uint64) (err error) { + return instance.SetProperty("DestageTransfersPersec", (value)) +} + +// GetDestageTransfersPersec gets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesBlocked sets the value of DevicesBlocked for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesBlocked(value uint64) (err error) { + return instance.SetProperty("DevicesBlocked", (value)) +} + +// GetDevicesBlocked gets the value of DevicesBlocked for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesBlocked() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesBlocked") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesHybrid sets the value of DevicesHybrid for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesHybrid(value uint64) (err error) { + return instance.SetProperty("DevicesHybrid", (value)) +} + +// GetDevicesHybrid gets the value of DevicesHybrid for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesHybrid() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesHybrid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesMaintenance sets the value of DevicesMaintenance for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesMaintenance(value uint64) (err error) { + return instance.SetProperty("DevicesMaintenance", (value)) +} + +// GetDevicesMaintenance gets the value of DevicesMaintenance for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesMaintenance() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesMaintenance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesNotConfigured sets the value of DevicesNotConfigured for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesNotConfigured(value uint64) (err error) { + return instance.SetProperty("DevicesNotConfigured", (value)) +} + +// GetDevicesNotConfigured gets the value of DevicesNotConfigured for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesNotConfigured() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesNotConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesOrphan sets the value of DevicesOrphan for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesOrphan(value uint64) (err error) { + return instance.SetProperty("DevicesOrphan", (value)) +} + +// GetDevicesOrphan gets the value of DevicesOrphan for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesOrphan() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesOrphan") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMultiPageFragments sets the value of MultiPageFragments for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageFragments(value uint64) (err error) { + return instance.SetProperty("MultiPageFragments", (value)) +} + +// GetMultiPageFragments gets the value of MultiPageFragments for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageFragments() (value uint64, err error) { + retValue, err := instance.GetProperty("MultiPageFragments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMultiPageFragmentsRate sets the value of MultiPageFragmentsRate for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageFragmentsRate(value uint64) (err error) { + return instance.SetProperty("MultiPageFragmentsRate", (value)) +} + +// GetMultiPageFragmentsRate gets the value of MultiPageFragmentsRate for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageFragmentsRate() (value uint64, err error) { + retValue, err := instance.GetProperty("MultiPageFragmentsRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMultiPageReMap sets the value of MultiPageReMap for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageReMap(value uint64) (err error) { + return instance.SetProperty("MultiPageReMap", (value)) +} + +// GetMultiPageReMap gets the value of MultiPageReMap for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageReMap() (value uint64, err error) { + retValue, err := instance.GetProperty("MultiPageReMap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageHit sets the value of PageHit for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageHit(value uint64) (err error) { + return instance.SetProperty("PageHit", (value)) +} + +// GetPageHit gets the value of PageHit for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageHit() (value uint64, err error) { + retValue, err := instance.GetProperty("PageHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageHitPersec sets the value of PageHitPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageHitPersec(value uint64) (err error) { + return instance.SetProperty("PageHitPersec", (value)) +} + +// GetPageHitPersec gets the value of PageHitPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageHitPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageHitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageReMap sets the value of PageReMap for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageReMap(value uint64) (err error) { + return instance.SetProperty("PageReMap", (value)) +} + +// GetPageReMap gets the value of PageReMap for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageReMap() (value uint64, err error) { + retValue, err := instance.GetProperty("PageReMap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageReMapPersec sets the value of PageReMapPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageReMapPersec(value uint64) (err error) { + return instance.SetProperty("PageReMapPersec", (value)) +} + +// GetPageReMapPersec gets the value of PageReMapPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageReMapPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageReMapPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsMedia sets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyReadErrorsMedia(value uint64) (err error) { + return instance.SetProperty("ReadErrorsMedia", (value)) +} + +// GetReadErrorsMedia gets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyReadErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTimeout sets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyReadErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTimeout", (value)) +} + +// GetReadErrorsTimeout gets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyReadErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTotal sets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyReadErrorsTotal(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTotal", (value)) +} + +// GetReadErrorsTotal gets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyReadErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateBytes sets the value of UpdateBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateBytes(value uint64) (err error) { + return instance.SetProperty("UpdateBytes", (value)) +} + +// GetUpdateBytes gets the value of UpdateBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateBytesPersec sets the value of UpdateBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateBytesPersec(value uint64) (err error) { + return instance.SetProperty("UpdateBytesPersec", (value)) +} + +// GetUpdateBytesPersec gets the value of UpdateBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesCritical sets the value of UpdatesCritical for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesCritical(value uint64) (err error) { + return instance.SetProperty("UpdatesCritical", (value)) +} + +// GetUpdatesCritical gets the value of UpdatesCritical for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesCritical() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesCriticalLogFull sets the value of UpdatesCriticalLogFull for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesCriticalLogFull(value uint64) (err error) { + return instance.SetProperty("UpdatesCriticalLogFull", (value)) +} + +// GetUpdatesCriticalLogFull gets the value of UpdatesCriticalLogFull for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesCriticalLogFull() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesCriticalLogFull") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesCriticalPersec sets the value of UpdatesCriticalPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesCriticalPersec(value uint64) (err error) { + return instance.SetProperty("UpdatesCriticalPersec", (value)) +} + +// GetUpdatesCriticalPersec gets the value of UpdatesCriticalPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesCriticalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesCriticalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNonCritical sets the value of UpdatesNonCritical for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNonCritical(value uint64) (err error) { + return instance.SetProperty("UpdatesNonCritical", (value)) +} + +// GetUpdatesNonCritical gets the value of UpdatesNonCritical for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNonCritical() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNonCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNonCriticalLogFull sets the value of UpdatesNonCriticalLogFull for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNonCriticalLogFull(value uint64) (err error) { + return instance.SetProperty("UpdatesNonCriticalLogFull", (value)) +} + +// GetUpdatesNonCriticalLogFull gets the value of UpdatesNonCriticalLogFull for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNonCriticalLogFull() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNonCriticalLogFull") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNonCriticalPersec sets the value of UpdatesNonCriticalPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNonCriticalPersec(value uint64) (err error) { + return instance.SetProperty("UpdatesNonCriticalPersec", (value)) +} + +// GetUpdatesNonCriticalPersec gets the value of UpdatesNonCriticalPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNonCriticalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNonCriticalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNotCommitted sets the value of UpdatesNotCommitted for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNotCommitted(value uint64) (err error) { + return instance.SetProperty("UpdatesNotCommitted", (value)) +} + +// GetUpdatesNotCommitted gets the value of UpdatesNotCommitted for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNotCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNotCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateTransfers sets the value of UpdateTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateTransfers(value uint64) (err error) { + return instance.SetProperty("UpdateTransfers", (value)) +} + +// GetUpdateTransfers gets the value of UpdateTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateTransfersPersec sets the value of UpdateTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateTransfersPersec(value uint64) (err error) { + return instance.SetProperty("UpdateTransfersPersec", (value)) +} + +// GetUpdateTransfersPersec gets the value of UpdateTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsMedia sets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyWriteErrorsMedia(value uint64) (err error) { + return instance.SetProperty("WriteErrorsMedia", (value)) +} + +// GetWriteErrorsMedia gets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyWriteErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTimeout sets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyWriteErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTimeout", (value)) +} + +// GetWriteErrorsTimeout gets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyWriteErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTotal sets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyWriteErrorsTotal(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTotal", (value)) +} + +// GetWriteErrorsTotal gets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyWriteErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go new file mode 100644 index 00000000..af1fee74 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go @@ -0,0 +1,1140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler struct +type Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler struct { + *Win32_PerfFormattedData + + // + DspPerSysAvgQueueLength uint64 + + // + DspPerSysHighAvgQueueLength uint64 + + // + DspPerSysHighAvgsecPerDataRequest uint32 + + // + DspPerSysHighCurrentQueueLength uint64 + + // + DspPerSysIdlePerLowAvgQueueLength uint64 + + // + DspPerSysIdlePerLowAvgsecPerDataRequest uint32 + + // + DspPerSysIdlePerLowCurrentQueueLength uint64 + + // + DspPerSysNormalAvgQueueLength uint64 + + // + DspPerSysNormalAvgsecPerDataRequest uint32 + + // + DspPerSysNormalCurrentQueueLength uint64 + + // + DspPerUsrAvgQueueLength uint64 + + // + DspPerUsrHighAvgQueueLength uint64 + + // + DspPerUsrHighAvgsecPerDataRequest uint32 + + // + DspPerUsrHighCurrentQueueLength uint64 + + // + DspPerUsrIdlePerLowAvgQueueLength uint64 + + // + DspPerUsrIdlePerLowAvgsecPerDataRequest uint32 + + // + DspPerUsrIdlePerLowCurrentQueueLength uint64 + + // + DspPerUsrNormalAvgQueueLength uint64 + + // + DspPerUsrNormalAvgsecPerDataRequest uint32 + + // + DspPerUsrNormalCurrentQueueLength uint64 + + // + QuePerSysAvgQueueLength uint64 + + // + QuePerSysHighAvgQueueLength uint64 + + // + QuePerSysHighAvgsecPerDataRequest uint32 + + // + QuePerSysHighBytesPersec uint64 + + // + QuePerSysHighCurrentQueueLength uint64 + + // + QuePerSysHighDataRequestsPersec uint64 + + // + QuePerSysIdlePerLowAvgQueueLength uint64 + + // + QuePerSysIdlePerLowAvgsecPerDataRequest uint32 + + // + QuePerSysIdlePerLowBytesPersec uint64 + + // + QuePerSysIdlePerLowCurrentQueueLength uint64 + + // + QuePerSysIdlePerLowDataRequestsPersec uint64 + + // + QuePerSysNormalAvgQueueLength uint64 + + // + QuePerSysNormalAvgsecPerDataRequest uint32 + + // + QuePerSysNormalBytesPersec uint64 + + // + QuePerSysNormalCurrentQueueLength uint64 + + // + QuePerSysNormalDataRequestsPersec uint64 + + // + QuePerUsrAvgQueueLength uint64 + + // + QuePerUsrHighAvgQueueLength uint64 + + // + QuePerUsrHighAvgsecPerDataRequest uint32 + + // + QuePerUsrHighBytesPersec uint64 + + // + QuePerUsrHighCurrentQueueLength uint64 + + // + QuePerUsrHighDataRequestsPersec uint64 + + // + QuePerUsrIdlePerLowAvgQueueLength uint64 + + // + QuePerUsrIdlePerLowAvgsecPerDataRequest uint32 + + // + QuePerUsrIdlePerLowBytesPersec uint64 + + // + QuePerUsrIdlePerLowCurrentQueueLength uint64 + + // + QuePerUsrIdlePerLowDataRequestsPersec uint64 + + // + QuePerUsrNormalAvgQueueLength uint64 + + // + QuePerUsrNormalAvgsecPerDataRequest uint32 + + // + QuePerUsrNormalBytesPersec uint64 + + // + QuePerUsrNormalCurrentQueueLength uint64 + + // + QuePerUsrNormalDataRequestsPersec uint64 +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskSchedulerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskSchedulerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDspPerSysAvgQueueLength sets the value of DspPerSysAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysAvgQueueLength", value) +} + +// GetDspPerSysAvgQueueLength gets the value of DspPerSysAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighAvgQueueLength sets the value of DspPerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysHighAvgQueueLength", value) +} + +// GetDspPerSysHighAvgQueueLength gets the value of DspPerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighAvgsecPerDataRequest sets the value of DspPerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerSysHighAvgsecPerDataRequest", value) +} + +// GetDspPerSysHighAvgsecPerDataRequest gets the value of DspPerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighCurrentQueueLength sets the value of DspPerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysHighCurrentQueueLength", value) +} + +// GetDspPerSysHighCurrentQueueLength gets the value of DspPerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowAvgQueueLength sets the value of DspPerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowAvgQueueLength", value) +} + +// GetDspPerSysIdlePerLowAvgQueueLength gets the value of DspPerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowAvgsecPerDataRequest sets the value of DspPerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowAvgsecPerDataRequest", value) +} + +// GetDspPerSysIdlePerLowAvgsecPerDataRequest gets the value of DspPerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowCurrentQueueLength sets the value of DspPerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowCurrentQueueLength", value) +} + +// GetDspPerSysIdlePerLowCurrentQueueLength gets the value of DspPerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalAvgQueueLength sets the value of DspPerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysNormalAvgQueueLength", value) +} + +// GetDspPerSysNormalAvgQueueLength gets the value of DspPerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalAvgsecPerDataRequest sets the value of DspPerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerSysNormalAvgsecPerDataRequest", value) +} + +// GetDspPerSysNormalAvgsecPerDataRequest gets the value of DspPerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalCurrentQueueLength sets the value of DspPerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysNormalCurrentQueueLength", value) +} + +// GetDspPerSysNormalCurrentQueueLength gets the value of DspPerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrAvgQueueLength sets the value of DspPerUsrAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrAvgQueueLength", value) +} + +// GetDspPerUsrAvgQueueLength gets the value of DspPerUsrAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighAvgQueueLength sets the value of DspPerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrHighAvgQueueLength", value) +} + +// GetDspPerUsrHighAvgQueueLength gets the value of DspPerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighAvgsecPerDataRequest sets the value of DspPerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerUsrHighAvgsecPerDataRequest", value) +} + +// GetDspPerUsrHighAvgsecPerDataRequest gets the value of DspPerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighCurrentQueueLength sets the value of DspPerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrHighCurrentQueueLength", value) +} + +// GetDspPerUsrHighCurrentQueueLength gets the value of DspPerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowAvgQueueLength sets the value of DspPerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowAvgQueueLength", value) +} + +// GetDspPerUsrIdlePerLowAvgQueueLength gets the value of DspPerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowAvgsecPerDataRequest sets the value of DspPerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowAvgsecPerDataRequest", value) +} + +// GetDspPerUsrIdlePerLowAvgsecPerDataRequest gets the value of DspPerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowCurrentQueueLength sets the value of DspPerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowCurrentQueueLength", value) +} + +// GetDspPerUsrIdlePerLowCurrentQueueLength gets the value of DspPerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalAvgQueueLength sets the value of DspPerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrNormalAvgQueueLength", value) +} + +// GetDspPerUsrNormalAvgQueueLength gets the value of DspPerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalAvgsecPerDataRequest sets the value of DspPerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerUsrNormalAvgsecPerDataRequest", value) +} + +// GetDspPerUsrNormalAvgsecPerDataRequest gets the value of DspPerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalCurrentQueueLength sets the value of DspPerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrNormalCurrentQueueLength", value) +} + +// GetDspPerUsrNormalCurrentQueueLength gets the value of DspPerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysAvgQueueLength sets the value of QuePerSysAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysAvgQueueLength", value) +} + +// GetQuePerSysAvgQueueLength gets the value of QuePerSysAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighAvgQueueLength sets the value of QuePerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighAvgQueueLength", value) +} + +// GetQuePerSysHighAvgQueueLength gets the value of QuePerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighAvgsecPerDataRequest sets the value of QuePerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerSysHighAvgsecPerDataRequest", value) +} + +// GetQuePerSysHighAvgsecPerDataRequest gets the value of QuePerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighBytesPersec sets the value of QuePerSysHighBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighBytesPersec", value) +} + +// GetQuePerSysHighBytesPersec gets the value of QuePerSysHighBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighCurrentQueueLength sets the value of QuePerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighCurrentQueueLength", value) +} + +// GetQuePerSysHighCurrentQueueLength gets the value of QuePerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighDataRequestsPersec sets the value of QuePerSysHighDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighDataRequestsPersec", value) +} + +// GetQuePerSysHighDataRequestsPersec gets the value of QuePerSysHighDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowAvgQueueLength sets the value of QuePerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowAvgQueueLength", value) +} + +// GetQuePerSysIdlePerLowAvgQueueLength gets the value of QuePerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowAvgsecPerDataRequest sets the value of QuePerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowAvgsecPerDataRequest", value) +} + +// GetQuePerSysIdlePerLowAvgsecPerDataRequest gets the value of QuePerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowBytesPersec sets the value of QuePerSysIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowBytesPersec", value) +} + +// GetQuePerSysIdlePerLowBytesPersec gets the value of QuePerSysIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowCurrentQueueLength sets the value of QuePerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowCurrentQueueLength", value) +} + +// GetQuePerSysIdlePerLowCurrentQueueLength gets the value of QuePerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowDataRequestsPersec sets the value of QuePerSysIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowDataRequestsPersec", value) +} + +// GetQuePerSysIdlePerLowDataRequestsPersec gets the value of QuePerSysIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalAvgQueueLength sets the value of QuePerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalAvgQueueLength", value) +} + +// GetQuePerSysNormalAvgQueueLength gets the value of QuePerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalAvgsecPerDataRequest sets the value of QuePerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerSysNormalAvgsecPerDataRequest", value) +} + +// GetQuePerSysNormalAvgsecPerDataRequest gets the value of QuePerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalBytesPersec sets the value of QuePerSysNormalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalBytesPersec", value) +} + +// GetQuePerSysNormalBytesPersec gets the value of QuePerSysNormalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalCurrentQueueLength sets the value of QuePerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalCurrentQueueLength", value) +} + +// GetQuePerSysNormalCurrentQueueLength gets the value of QuePerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalDataRequestsPersec sets the value of QuePerSysNormalDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalDataRequestsPersec", value) +} + +// GetQuePerSysNormalDataRequestsPersec gets the value of QuePerSysNormalDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrAvgQueueLength sets the value of QuePerUsrAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrAvgQueueLength", value) +} + +// GetQuePerUsrAvgQueueLength gets the value of QuePerUsrAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighAvgQueueLength sets the value of QuePerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighAvgQueueLength", value) +} + +// GetQuePerUsrHighAvgQueueLength gets the value of QuePerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighAvgsecPerDataRequest sets the value of QuePerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerUsrHighAvgsecPerDataRequest", value) +} + +// GetQuePerUsrHighAvgsecPerDataRequest gets the value of QuePerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighBytesPersec sets the value of QuePerUsrHighBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighBytesPersec", value) +} + +// GetQuePerUsrHighBytesPersec gets the value of QuePerUsrHighBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighCurrentQueueLength sets the value of QuePerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighCurrentQueueLength", value) +} + +// GetQuePerUsrHighCurrentQueueLength gets the value of QuePerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighDataRequestsPersec sets the value of QuePerUsrHighDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighDataRequestsPersec", value) +} + +// GetQuePerUsrHighDataRequestsPersec gets the value of QuePerUsrHighDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowAvgQueueLength sets the value of QuePerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowAvgQueueLength", value) +} + +// GetQuePerUsrIdlePerLowAvgQueueLength gets the value of QuePerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowAvgsecPerDataRequest sets the value of QuePerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowAvgsecPerDataRequest", value) +} + +// GetQuePerUsrIdlePerLowAvgsecPerDataRequest gets the value of QuePerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowBytesPersec sets the value of QuePerUsrIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowBytesPersec", value) +} + +// GetQuePerUsrIdlePerLowBytesPersec gets the value of QuePerUsrIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowCurrentQueueLength sets the value of QuePerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowCurrentQueueLength", value) +} + +// GetQuePerUsrIdlePerLowCurrentQueueLength gets the value of QuePerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowDataRequestsPersec sets the value of QuePerUsrIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowDataRequestsPersec", value) +} + +// GetQuePerUsrIdlePerLowDataRequestsPersec gets the value of QuePerUsrIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalAvgQueueLength sets the value of QuePerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalAvgQueueLength", value) +} + +// GetQuePerUsrNormalAvgQueueLength gets the value of QuePerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalAvgsecPerDataRequest sets the value of QuePerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerUsrNormalAvgsecPerDataRequest", value) +} + +// GetQuePerUsrNormalAvgsecPerDataRequest gets the value of QuePerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalBytesPersec sets the value of QuePerUsrNormalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalBytesPersec", value) +} + +// GetQuePerUsrNormalBytesPersec gets the value of QuePerUsrNormalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalCurrentQueueLength sets the value of QuePerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalCurrentQueueLength", value) +} + +// GetQuePerUsrNormalCurrentQueueLength gets the value of QuePerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalDataRequestsPersec sets the value of QuePerUsrNormalDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalDataRequestsPersec", value) +} + +// GetQuePerUsrNormalDataRequestsPersec gets the value of QuePerUsrNormalDataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go new file mode 100644 index 00000000..4efa320b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go @@ -0,0 +1,1910 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks struct +type Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks struct { + *Win32_PerfFormattedData + + // + BindingAttributes uint64 + + // + CacheFirstHitPopulatedBytes uint64 + + // + CacheFirstHitPopulatedBytesPersec uint64 + + // + CacheFirstHitWrittenBytes uint64 + + // + CacheFirstHitWrittenBytesPersec uint64 + + // + CacheHitReadBytes uint64 + + // + CacheHitReadBytesPersec uint64 + + // + CacheHitReads uint64 + + // + CacheHitReadsPersec uint64 + + // + CacheMissReadBytes uint64 + + // + CacheMissReadBytesPersec uint64 + + // + CacheMissReads uint64 + + // + CacheMissReadsPersec uint64 + + // + CachePages uint64 + + // + CachePagesDirty uint64 + + // + CachePagesDirtyHot uint64 + + // + CachePagesDiscardIgnored uint64 + + // + CachePagesL2 uint64 + + // + CachePopulateBytes uint64 + + // + CachePopulateBytesPersec uint64 + + // + CacheWriteBytes uint64 + + // + CacheWriteBytesPersec uint64 + + // + CacheWrites uint64 + + // + CacheWritesPersec uint64 + + // + DestageBytes uint64 + + // + DestageBytesPersec uint64 + + // + DestageTransfers uint64 + + // + DestageTransfersPersec uint64 + + // + DirectReadBytes uint64 + + // + DirectReadBytesPersec uint64 + + // + DirectReads uint64 + + // + DirectReadsPersec uint64 + + // + DirectWriteBytes uint64 + + // + DirectWriteBytesPersec uint64 + + // + DirectWrites uint64 + + // + DirectWritesPersec uint64 + + // + DirtyReadBytes uint64 + + // + DirtyReadBytesPersec uint64 + + // + DirtySlots uint64 + + // + DirtySlotsExpands uint64 + + // + DirtySlotsExpandsPersec uint64 + + // + DiskBytes uint64 + + // + DiskBytesPersec uint64 + + // + DiskReadBytes uint64 + + // + DiskReadBytesPersec uint64 + + // + DiskReads uint64 + + // + DiskReadsPersec uint64 + + // + DiskTransfers uint64 + + // + DiskTransfersPersec uint64 + + // + DiskWriteBytes uint64 + + // + DiskWriteBytesPersec uint64 + + // + DiskWrites uint64 + + // + DiskWritesPersec uint64 + + // + MissingSlots uint64 + + // + RateDiskCacheReads uint64 + + // + RateDiskCacheWrites uint64 + + // + ReadErrorsMedia uint64 + + // + ReadErrorsTimeout uint64 + + // + ReadErrorsTotal uint64 + + // + WriteErrorsMedia uint64 + + // + WriteErrorsTimeout uint64 + + // + WriteErrorsTotal uint64 +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBindingAttributes sets the value of BindingAttributes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyBindingAttributes(value uint64) (err error) { + return instance.SetProperty("BindingAttributes", (value)) +} + +// GetBindingAttributes gets the value of BindingAttributes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyBindingAttributes() (value uint64, err error) { + retValue, err := instance.GetProperty("BindingAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitPopulatedBytes sets the value of CacheFirstHitPopulatedBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitPopulatedBytes(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitPopulatedBytes", (value)) +} + +// GetCacheFirstHitPopulatedBytes gets the value of CacheFirstHitPopulatedBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitPopulatedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitPopulatedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitPopulatedBytesPersec sets the value of CacheFirstHitPopulatedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitPopulatedBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitPopulatedBytesPersec", (value)) +} + +// GetCacheFirstHitPopulatedBytesPersec gets the value of CacheFirstHitPopulatedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitPopulatedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitPopulatedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitWrittenBytes sets the value of CacheFirstHitWrittenBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitWrittenBytes(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitWrittenBytes", (value)) +} + +// GetCacheFirstHitWrittenBytes gets the value of CacheFirstHitWrittenBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitWrittenBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitWrittenBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitWrittenBytesPersec sets the value of CacheFirstHitWrittenBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitWrittenBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitWrittenBytesPersec", (value)) +} + +// GetCacheFirstHitWrittenBytesPersec gets the value of CacheFirstHitWrittenBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitWrittenBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitWrittenBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReadBytes sets the value of CacheHitReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheHitReadBytes", (value)) +} + +// GetCacheHitReadBytes gets the value of CacheHitReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReadBytesPersec sets the value of CacheHitReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheHitReadBytesPersec", (value)) +} + +// GetCacheHitReadBytesPersec gets the value of CacheHitReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReads sets the value of CacheHitReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReads(value uint64) (err error) { + return instance.SetProperty("CacheHitReads", (value)) +} + +// GetCacheHitReads gets the value of CacheHitReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReadsPersec sets the value of CacheHitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReadsPersec(value uint64) (err error) { + return instance.SetProperty("CacheHitReadsPersec", (value)) +} + +// GetCacheHitReadsPersec gets the value of CacheHitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReadBytes sets the value of CacheMissReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheMissReadBytes", (value)) +} + +// GetCacheMissReadBytes gets the value of CacheMissReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReadBytesPersec sets the value of CacheMissReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheMissReadBytesPersec", (value)) +} + +// GetCacheMissReadBytesPersec gets the value of CacheMissReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReads sets the value of CacheMissReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReads(value uint64) (err error) { + return instance.SetProperty("CacheMissReads", (value)) +} + +// GetCacheMissReads gets the value of CacheMissReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReads() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReadsPersec sets the value of CacheMissReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReadsPersec(value uint64) (err error) { + return instance.SetProperty("CacheMissReadsPersec", (value)) +} + +// GetCacheMissReadsPersec gets the value of CacheMissReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePages sets the value of CachePages for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePages(value uint64) (err error) { + return instance.SetProperty("CachePages", (value)) +} + +// GetCachePages gets the value of CachePages for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePages() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDirty sets the value of CachePagesDirty for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesDirty(value uint64) (err error) { + return instance.SetProperty("CachePagesDirty", (value)) +} + +// GetCachePagesDirty gets the value of CachePagesDirty for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesDirty() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDirtyHot sets the value of CachePagesDirtyHot for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesDirtyHot(value uint64) (err error) { + return instance.SetProperty("CachePagesDirtyHot", (value)) +} + +// GetCachePagesDirtyHot gets the value of CachePagesDirtyHot for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesDirtyHot() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDirtyHot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDiscardIgnored sets the value of CachePagesDiscardIgnored for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesDiscardIgnored(value uint64) (err error) { + return instance.SetProperty("CachePagesDiscardIgnored", (value)) +} + +// GetCachePagesDiscardIgnored gets the value of CachePagesDiscardIgnored for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesDiscardIgnored() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDiscardIgnored") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesL2 sets the value of CachePagesL2 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesL2(value uint64) (err error) { + return instance.SetProperty("CachePagesL2", (value)) +} + +// GetCachePagesL2 gets the value of CachePagesL2 for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesL2() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesL2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePopulateBytes sets the value of CachePopulateBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePopulateBytes(value uint64) (err error) { + return instance.SetProperty("CachePopulateBytes", (value)) +} + +// GetCachePopulateBytes gets the value of CachePopulateBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePopulateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePopulateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePopulateBytesPersec sets the value of CachePopulateBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePopulateBytesPersec(value uint64) (err error) { + return instance.SetProperty("CachePopulateBytesPersec", (value)) +} + +// GetCachePopulateBytesPersec gets the value of CachePopulateBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePopulateBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePopulateBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBytes sets the value of CacheWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWriteBytes(value uint64) (err error) { + return instance.SetProperty("CacheWriteBytes", (value)) +} + +// GetCacheWriteBytes gets the value of CacheWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBytesPersec sets the value of CacheWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheWriteBytesPersec", (value)) +} + +// GetCacheWriteBytesPersec gets the value of CacheWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWrites sets the value of CacheWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWrites(value uint64) (err error) { + return instance.SetProperty("CacheWrites", (value)) +} + +// GetCacheWrites gets the value of CacheWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWritesPersec sets the value of CacheWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWritesPersec(value uint64) (err error) { + return instance.SetProperty("CacheWritesPersec", (value)) +} + +// GetCacheWritesPersec gets the value of CacheWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytes sets the value of DestageBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageBytes(value uint64) (err error) { + return instance.SetProperty("DestageBytes", (value)) +} + +// GetDestageBytes gets the value of DestageBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytesPersec sets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageBytesPersec(value uint64) (err error) { + return instance.SetProperty("DestageBytesPersec", (value)) +} + +// GetDestageBytesPersec gets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfers sets the value of DestageTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageTransfers(value uint64) (err error) { + return instance.SetProperty("DestageTransfers", (value)) +} + +// GetDestageTransfers gets the value of DestageTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfersPersec sets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageTransfersPersec(value uint64) (err error) { + return instance.SetProperty("DestageTransfersPersec", (value)) +} + +// GetDestageTransfersPersec gets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReadBytes sets the value of DirectReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReadBytes(value uint64) (err error) { + return instance.SetProperty("DirectReadBytes", (value)) +} + +// GetDirectReadBytes gets the value of DirectReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReadBytesPersec sets the value of DirectReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DirectReadBytesPersec", (value)) +} + +// GetDirectReadBytesPersec gets the value of DirectReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReads sets the value of DirectReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReads(value uint64) (err error) { + return instance.SetProperty("DirectReads", (value)) +} + +// GetDirectReads gets the value of DirectReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReadsPersec sets the value of DirectReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReadsPersec(value uint64) (err error) { + return instance.SetProperty("DirectReadsPersec", (value)) +} + +// GetDirectReadsPersec gets the value of DirectReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWriteBytes sets the value of DirectWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWriteBytes(value uint64) (err error) { + return instance.SetProperty("DirectWriteBytes", (value)) +} + +// GetDirectWriteBytes gets the value of DirectWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWriteBytesPersec sets the value of DirectWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DirectWriteBytesPersec", (value)) +} + +// GetDirectWriteBytesPersec gets the value of DirectWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWrites sets the value of DirectWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWrites(value uint64) (err error) { + return instance.SetProperty("DirectWrites", (value)) +} + +// GetDirectWrites gets the value of DirectWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWritesPersec sets the value of DirectWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWritesPersec(value uint64) (err error) { + return instance.SetProperty("DirectWritesPersec", (value)) +} + +// GetDirectWritesPersec gets the value of DirectWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyReadBytes sets the value of DirtyReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtyReadBytes(value uint64) (err error) { + return instance.SetProperty("DirtyReadBytes", (value)) +} + +// GetDirtyReadBytes gets the value of DirtyReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyReadBytesPersec sets the value of DirtyReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DirtyReadBytesPersec", (value)) +} + +// GetDirtyReadBytesPersec gets the value of DirtyReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtySlots sets the value of DirtySlots for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtySlots(value uint64) (err error) { + return instance.SetProperty("DirtySlots", (value)) +} + +// GetDirtySlots gets the value of DirtySlots for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtySlots() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtySlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtySlotsExpands sets the value of DirtySlotsExpands for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtySlotsExpands(value uint64) (err error) { + return instance.SetProperty("DirtySlotsExpands", (value)) +} + +// GetDirtySlotsExpands gets the value of DirtySlotsExpands for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtySlotsExpands() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtySlotsExpands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtySlotsExpandsPersec sets the value of DirtySlotsExpandsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtySlotsExpandsPersec(value uint64) (err error) { + return instance.SetProperty("DirtySlotsExpandsPersec", (value)) +} + +// GetDirtySlotsExpandsPersec gets the value of DirtySlotsExpandsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtySlotsExpandsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtySlotsExpandsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskBytes sets the value of DiskBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskBytes(value uint64) (err error) { + return instance.SetProperty("DiskBytes", (value)) +} + +// GetDiskBytes gets the value of DiskBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskBytesPersec sets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskBytesPersec", (value)) +} + +// GetDiskBytesPersec gets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytes sets the value of DiskReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReadBytes(value uint64) (err error) { + return instance.SetProperty("DiskReadBytes", (value)) +} + +// GetDiskReadBytes gets the value of DiskReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytesPersec sets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadBytesPersec", (value)) +} + +// GetDiskReadBytesPersec gets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReads sets the value of DiskReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReads(value uint64) (err error) { + return instance.SetProperty("DiskReads", (value)) +} + +// GetDiskReads gets the value of DiskReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadsPersec sets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReadsPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadsPersec", (value)) +} + +// GetDiskReadsPersec gets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskTransfers sets the value of DiskTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskTransfers(value uint64) (err error) { + return instance.SetProperty("DiskTransfers", (value)) +} + +// GetDiskTransfers gets the value of DiskTransfers for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskTransfersPersec sets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskTransfersPersec(value uint64) (err error) { + return instance.SetProperty("DiskTransfersPersec", (value)) +} + +// GetDiskTransfersPersec gets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWriteBytes sets the value of DiskWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWriteBytes(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytes", (value)) +} + +// GetDiskWriteBytes gets the value of DiskWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWriteBytesPersec sets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytesPersec", (value)) +} + +// GetDiskWriteBytesPersec gets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWrites sets the value of DiskWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWrites(value uint64) (err error) { + return instance.SetProperty("DiskWrites", (value)) +} + +// GetDiskWrites gets the value of DiskWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWritesPersec sets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWritesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWritesPersec", (value)) +} + +// GetDiskWritesPersec gets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingSlots sets the value of MissingSlots for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyMissingSlots(value uint64) (err error) { + return instance.SetProperty("MissingSlots", (value)) +} + +// GetMissingSlots gets the value of MissingSlots for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyMissingSlots() (value uint64, err error) { + retValue, err := instance.GetProperty("MissingSlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateDiskCacheReads sets the value of RateDiskCacheReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyRateDiskCacheReads(value uint64) (err error) { + return instance.SetProperty("RateDiskCacheReads", (value)) +} + +// GetRateDiskCacheReads gets the value of RateDiskCacheReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyRateDiskCacheReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RateDiskCacheReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateDiskCacheWrites sets the value of RateDiskCacheWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyRateDiskCacheWrites(value uint64) (err error) { + return instance.SetProperty("RateDiskCacheWrites", (value)) +} + +// GetRateDiskCacheWrites gets the value of RateDiskCacheWrites for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyRateDiskCacheWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("RateDiskCacheWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsMedia sets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyReadErrorsMedia(value uint64) (err error) { + return instance.SetProperty("ReadErrorsMedia", (value)) +} + +// GetReadErrorsMedia gets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyReadErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTimeout sets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyReadErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTimeout", (value)) +} + +// GetReadErrorsTimeout gets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyReadErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTotal sets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyReadErrorsTotal(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTotal", (value)) +} + +// GetReadErrorsTotal gets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyReadErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsMedia sets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyWriteErrorsMedia(value uint64) (err error) { + return instance.SetProperty("WriteErrorsMedia", (value)) +} + +// GetWriteErrorsMedia gets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyWriteErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTimeout sets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyWriteErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTimeout", (value)) +} + +// GetWriteErrorsTimeout gets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyWriteErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTotal sets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyWriteErrorsTotal(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTotal", (value)) +} + +// GetWriteErrorsTotal gets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyWriteErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go new file mode 100644 index 00000000..f99c594f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go @@ -0,0 +1,279 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2 struct +type Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2 struct { + *Win32_PerfFormattedData + + // + HeatMapFreeMemory uint64 + + // + HeatMapWindow uint64 + + // + RateDiskVRCReads uint64 + + // + VRCHitReadBytes uint64 + + // + VRCHitReadBytesPersec uint64 + + // + VRCHitReads uint64 + + // + VRCHitReadsPersec uint64 + + // + VRCPopulateBytes uint64 + + // + VRCPopulateBytesPersec uint64 + + // + VRCPopulates uint64 + + // + VRCPopulatesPersec uint64 +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHeatMapFreeMemory sets the value of HeatMapFreeMemory for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyHeatMapFreeMemory(value uint64) (err error) { + return instance.SetProperty("HeatMapFreeMemory", value) +} + +// GetHeatMapFreeMemory gets the value of HeatMapFreeMemory for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyHeatMapFreeMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("HeatMapFreeMemory") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetHeatMapWindow sets the value of HeatMapWindow for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyHeatMapWindow(value uint64) (err error) { + return instance.SetProperty("HeatMapWindow", value) +} + +// GetHeatMapWindow gets the value of HeatMapWindow for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyHeatMapWindow() (value uint64, err error) { + retValue, err := instance.GetProperty("HeatMapWindow") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetRateDiskVRCReads sets the value of RateDiskVRCReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyRateDiskVRCReads(value uint64) (err error) { + return instance.SetProperty("RateDiskVRCReads", value) +} + +// GetRateDiskVRCReads gets the value of RateDiskVRCReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyRateDiskVRCReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RateDiskVRCReads") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReadBytes sets the value of VRCHitReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReadBytes(value uint64) (err error) { + return instance.SetProperty("VRCHitReadBytes", value) +} + +// GetVRCHitReadBytes gets the value of VRCHitReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReadBytes") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReadBytesPersec sets the value of VRCHitReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("VRCHitReadBytesPersec", value) +} + +// GetVRCHitReadBytesPersec gets the value of VRCHitReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReadBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReads sets the value of VRCHitReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReads(value uint64) (err error) { + return instance.SetProperty("VRCHitReads", value) +} + +// GetVRCHitReads gets the value of VRCHitReads for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReads") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReadsPersec sets the value of VRCHitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReadsPersec(value uint64) (err error) { + return instance.SetProperty("VRCHitReadsPersec", value) +} + +// GetVRCHitReadsPersec gets the value of VRCHitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReadsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulateBytes sets the value of VRCPopulateBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulateBytes(value uint64) (err error) { + return instance.SetProperty("VRCPopulateBytes", value) +} + +// GetVRCPopulateBytes gets the value of VRCPopulateBytes for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulateBytes") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulateBytesPersec sets the value of VRCPopulateBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulateBytesPersec(value uint64) (err error) { + return instance.SetProperty("VRCPopulateBytesPersec", value) +} + +// GetVRCPopulateBytesPersec gets the value of VRCPopulateBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulateBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulateBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulates sets the value of VRCPopulates for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulates(value uint64) (err error) { + return instance.SetProperty("VRCPopulates", value) +} + +// GetVRCPopulates gets the value of VRCPopulates for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulates() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulates") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulatesPersec sets the value of VRCPopulatesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulatesPersec(value uint64) (err error) { + return instance.SetProperty("VRCPopulatesPersec", value) +} + +// GetVRCPopulatesPersec gets the value of VRCPopulatesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulatesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulatesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go new file mode 100644 index 00000000..626ceb28 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go @@ -0,0 +1,1970 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile struct +type Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile struct { + *Win32_PerfFormattedData + + // + CacheWriteBoosts uint64 + + // + CacheWriteBoostsPersec uint64 + + // + CacheWriteBoostsVeto uint64 + + // + CacheWriteBoostsVetoPersec uint64 + + // + Reads0K4K uint64 + + // + Reads1024K2048K uint64 + + // + Reads128K256K uint64 + + // + Reads16K32K uint64 + + // + Reads2048K4096K uint64 + + // + Reads256K512K uint64 + + // + Reads32K64K uint64 + + // + Reads4096Koo uint64 + + // + Reads4K8K uint64 + + // + Reads512K1024K uint64 + + // + Reads64K128K uint64 + + // + Reads8K16K uint64 + + // + Readsnotaligned uint64 + + // + ReadsPagingIO uint64 + + // + ReadsPersec0K4K uint64 + + // + ReadsPersec1024K2048K uint64 + + // + ReadsPersec128K256K uint64 + + // + ReadsPersec16K32K uint64 + + // + ReadsPersec2048K4096K uint64 + + // + ReadsPersec256K512K uint64 + + // + ReadsPersec32K64K uint64 + + // + ReadsPersec4096Koo uint64 + + // + ReadsPersec4K8K uint64 + + // + ReadsPersec512K1024K uint64 + + // + ReadsPersec64K128K uint64 + + // + ReadsPersec8K16K uint64 + + // + ReadsPersecnotaligned uint64 + + // + ReadsPersecPagingIO uint64 + + // + ReadsPersecTotal uint64 + + // + ReadsTotal uint64 + + // + Writes0K4K uint64 + + // + Writes1024K2048K uint64 + + // + Writes128K256K uint64 + + // + Writes16K32K uint64 + + // + Writes2048K4096K uint64 + + // + Writes256K512K uint64 + + // + Writes32K64K uint64 + + // + Writes4096Koo uint64 + + // + Writes4K8K uint64 + + // + Writes512K1024K uint64 + + // + Writes64K128K uint64 + + // + Writes8K16K uint64 + + // + Writesnotaligned uint64 + + // + WritesPagingIO uint64 + + // + WritesPersec0K4K uint64 + + // + WritesPersec1024K2048K uint64 + + // + WritesPersec128K256K uint64 + + // + WritesPersec16K32K uint64 + + // + WritesPersec2048K4096K uint64 + + // + WritesPersec256K512K uint64 + + // + WritesPersec32K64K uint64 + + // + WritesPersec4096Koo uint64 + + // + WritesPersec4K8K uint64 + + // + WritesPersec512K1024K uint64 + + // + WritesPersec64K128K uint64 + + // + WritesPersec8K16K uint64 + + // + WritesPersecnotaligned uint64 + + // + WritesPersecPagingIO uint64 + + // + WritesPersecTotal uint64 + + // + WritesTotal uint64 +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfileEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCacheWriteBoosts sets the value of CacheWriteBoosts for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoosts(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoosts", (value)) +} + +// GetCacheWriteBoosts gets the value of CacheWriteBoosts for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoosts() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoosts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBoostsPersec sets the value of CacheWriteBoostsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoostsPersec(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoostsPersec", (value)) +} + +// GetCacheWriteBoostsPersec gets the value of CacheWriteBoostsPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoostsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoostsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBoostsVeto sets the value of CacheWriteBoostsVeto for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoostsVeto(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoostsVeto", (value)) +} + +// GetCacheWriteBoostsVeto gets the value of CacheWriteBoostsVeto for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoostsVeto() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoostsVeto") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBoostsVetoPersec sets the value of CacheWriteBoostsVetoPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoostsVetoPersec(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoostsVetoPersec", (value)) +} + +// GetCacheWriteBoostsVetoPersec gets the value of CacheWriteBoostsVetoPersec for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoostsVetoPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoostsVetoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads0K4K sets the value of Reads0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads0K4K(value uint64) (err error) { + return instance.SetProperty("Reads0K4K", (value)) +} + +// GetReads0K4K gets the value of Reads0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads1024K2048K sets the value of Reads1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads1024K2048K(value uint64) (err error) { + return instance.SetProperty("Reads1024K2048K", (value)) +} + +// GetReads1024K2048K gets the value of Reads1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads128K256K sets the value of Reads128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads128K256K(value uint64) (err error) { + return instance.SetProperty("Reads128K256K", (value)) +} + +// GetReads128K256K gets the value of Reads128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads16K32K sets the value of Reads16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads16K32K(value uint64) (err error) { + return instance.SetProperty("Reads16K32K", (value)) +} + +// GetReads16K32K gets the value of Reads16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads2048K4096K sets the value of Reads2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads2048K4096K(value uint64) (err error) { + return instance.SetProperty("Reads2048K4096K", (value)) +} + +// GetReads2048K4096K gets the value of Reads2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads256K512K sets the value of Reads256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads256K512K(value uint64) (err error) { + return instance.SetProperty("Reads256K512K", (value)) +} + +// GetReads256K512K gets the value of Reads256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads32K64K sets the value of Reads32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads32K64K(value uint64) (err error) { + return instance.SetProperty("Reads32K64K", (value)) +} + +// GetReads32K64K gets the value of Reads32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads4096Koo sets the value of Reads4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads4096Koo(value uint64) (err error) { + return instance.SetProperty("Reads4096Koo", (value)) +} + +// GetReads4096Koo gets the value of Reads4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads4K8K sets the value of Reads4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads4K8K(value uint64) (err error) { + return instance.SetProperty("Reads4K8K", (value)) +} + +// GetReads4K8K gets the value of Reads4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads512K1024K sets the value of Reads512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads512K1024K(value uint64) (err error) { + return instance.SetProperty("Reads512K1024K", (value)) +} + +// GetReads512K1024K gets the value of Reads512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads64K128K sets the value of Reads64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads64K128K(value uint64) (err error) { + return instance.SetProperty("Reads64K128K", (value)) +} + +// GetReads64K128K gets the value of Reads64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads8K16K sets the value of Reads8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads8K16K(value uint64) (err error) { + return instance.SetProperty("Reads8K16K", (value)) +} + +// GetReads8K16K gets the value of Reads8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsnotaligned sets the value of Readsnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsnotaligned(value uint64) (err error) { + return instance.SetProperty("Readsnotaligned", (value)) +} + +// GetReadsnotaligned gets the value of Readsnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("Readsnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPagingIO sets the value of ReadsPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPagingIO(value uint64) (err error) { + return instance.SetProperty("ReadsPagingIO", (value)) +} + +// GetReadsPagingIO gets the value of ReadsPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec0K4K sets the value of ReadsPersec0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec0K4K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec0K4K", (value)) +} + +// GetReadsPersec0K4K gets the value of ReadsPersec0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec1024K2048K sets the value of ReadsPersec1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec1024K2048K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec1024K2048K", (value)) +} + +// GetReadsPersec1024K2048K gets the value of ReadsPersec1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec128K256K sets the value of ReadsPersec128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec128K256K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec128K256K", (value)) +} + +// GetReadsPersec128K256K gets the value of ReadsPersec128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec16K32K sets the value of ReadsPersec16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec16K32K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec16K32K", (value)) +} + +// GetReadsPersec16K32K gets the value of ReadsPersec16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec2048K4096K sets the value of ReadsPersec2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec2048K4096K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec2048K4096K", (value)) +} + +// GetReadsPersec2048K4096K gets the value of ReadsPersec2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec256K512K sets the value of ReadsPersec256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec256K512K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec256K512K", (value)) +} + +// GetReadsPersec256K512K gets the value of ReadsPersec256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec32K64K sets the value of ReadsPersec32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec32K64K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec32K64K", (value)) +} + +// GetReadsPersec32K64K gets the value of ReadsPersec32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec4096Koo sets the value of ReadsPersec4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec4096Koo(value uint64) (err error) { + return instance.SetProperty("ReadsPersec4096Koo", (value)) +} + +// GetReadsPersec4096Koo gets the value of ReadsPersec4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec4K8K sets the value of ReadsPersec4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec4K8K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec4K8K", (value)) +} + +// GetReadsPersec4K8K gets the value of ReadsPersec4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec512K1024K sets the value of ReadsPersec512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec512K1024K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec512K1024K", (value)) +} + +// GetReadsPersec512K1024K gets the value of ReadsPersec512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec64K128K sets the value of ReadsPersec64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec64K128K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec64K128K", (value)) +} + +// GetReadsPersec64K128K gets the value of ReadsPersec64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec8K16K sets the value of ReadsPersec8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec8K16K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec8K16K", (value)) +} + +// GetReadsPersec8K16K gets the value of ReadsPersec8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersecnotaligned sets the value of ReadsPersecnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersecnotaligned(value uint64) (err error) { + return instance.SetProperty("ReadsPersecnotaligned", (value)) +} + +// GetReadsPersecnotaligned gets the value of ReadsPersecnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersecnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersecnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersecPagingIO sets the value of ReadsPersecPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersecPagingIO(value uint64) (err error) { + return instance.SetProperty("ReadsPersecPagingIO", (value)) +} + +// GetReadsPersecPagingIO gets the value of ReadsPersecPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersecPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersecPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersecTotal sets the value of ReadsPersecTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersecTotal(value uint64) (err error) { + return instance.SetProperty("ReadsPersecTotal", (value)) +} + +// GetReadsPersecTotal gets the value of ReadsPersecTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersecTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersecTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsTotal sets the value of ReadsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsTotal(value uint64) (err error) { + return instance.SetProperty("ReadsTotal", (value)) +} + +// GetReadsTotal gets the value of ReadsTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites0K4K sets the value of Writes0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites0K4K(value uint64) (err error) { + return instance.SetProperty("Writes0K4K", (value)) +} + +// GetWrites0K4K gets the value of Writes0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites1024K2048K sets the value of Writes1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites1024K2048K(value uint64) (err error) { + return instance.SetProperty("Writes1024K2048K", (value)) +} + +// GetWrites1024K2048K gets the value of Writes1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites128K256K sets the value of Writes128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites128K256K(value uint64) (err error) { + return instance.SetProperty("Writes128K256K", (value)) +} + +// GetWrites128K256K gets the value of Writes128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites16K32K sets the value of Writes16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites16K32K(value uint64) (err error) { + return instance.SetProperty("Writes16K32K", (value)) +} + +// GetWrites16K32K gets the value of Writes16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites2048K4096K sets the value of Writes2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites2048K4096K(value uint64) (err error) { + return instance.SetProperty("Writes2048K4096K", (value)) +} + +// GetWrites2048K4096K gets the value of Writes2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites256K512K sets the value of Writes256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites256K512K(value uint64) (err error) { + return instance.SetProperty("Writes256K512K", (value)) +} + +// GetWrites256K512K gets the value of Writes256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites32K64K sets the value of Writes32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites32K64K(value uint64) (err error) { + return instance.SetProperty("Writes32K64K", (value)) +} + +// GetWrites32K64K gets the value of Writes32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites4096Koo sets the value of Writes4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites4096Koo(value uint64) (err error) { + return instance.SetProperty("Writes4096Koo", (value)) +} + +// GetWrites4096Koo gets the value of Writes4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites4K8K sets the value of Writes4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites4K8K(value uint64) (err error) { + return instance.SetProperty("Writes4K8K", (value)) +} + +// GetWrites4K8K gets the value of Writes4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites512K1024K sets the value of Writes512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites512K1024K(value uint64) (err error) { + return instance.SetProperty("Writes512K1024K", (value)) +} + +// GetWrites512K1024K gets the value of Writes512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites64K128K sets the value of Writes64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites64K128K(value uint64) (err error) { + return instance.SetProperty("Writes64K128K", (value)) +} + +// GetWrites64K128K gets the value of Writes64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites8K16K sets the value of Writes8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites8K16K(value uint64) (err error) { + return instance.SetProperty("Writes8K16K", (value)) +} + +// GetWrites8K16K gets the value of Writes8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesnotaligned sets the value of Writesnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesnotaligned(value uint64) (err error) { + return instance.SetProperty("Writesnotaligned", (value)) +} + +// GetWritesnotaligned gets the value of Writesnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("Writesnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPagingIO sets the value of WritesPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPagingIO(value uint64) (err error) { + return instance.SetProperty("WritesPagingIO", (value)) +} + +// GetWritesPagingIO gets the value of WritesPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec0K4K sets the value of WritesPersec0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec0K4K(value uint64) (err error) { + return instance.SetProperty("WritesPersec0K4K", (value)) +} + +// GetWritesPersec0K4K gets the value of WritesPersec0K4K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec1024K2048K sets the value of WritesPersec1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec1024K2048K(value uint64) (err error) { + return instance.SetProperty("WritesPersec1024K2048K", (value)) +} + +// GetWritesPersec1024K2048K gets the value of WritesPersec1024K2048K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec128K256K sets the value of WritesPersec128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec128K256K(value uint64) (err error) { + return instance.SetProperty("WritesPersec128K256K", (value)) +} + +// GetWritesPersec128K256K gets the value of WritesPersec128K256K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec16K32K sets the value of WritesPersec16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec16K32K(value uint64) (err error) { + return instance.SetProperty("WritesPersec16K32K", (value)) +} + +// GetWritesPersec16K32K gets the value of WritesPersec16K32K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec2048K4096K sets the value of WritesPersec2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec2048K4096K(value uint64) (err error) { + return instance.SetProperty("WritesPersec2048K4096K", (value)) +} + +// GetWritesPersec2048K4096K gets the value of WritesPersec2048K4096K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec256K512K sets the value of WritesPersec256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec256K512K(value uint64) (err error) { + return instance.SetProperty("WritesPersec256K512K", (value)) +} + +// GetWritesPersec256K512K gets the value of WritesPersec256K512K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec32K64K sets the value of WritesPersec32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec32K64K(value uint64) (err error) { + return instance.SetProperty("WritesPersec32K64K", (value)) +} + +// GetWritesPersec32K64K gets the value of WritesPersec32K64K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec4096Koo sets the value of WritesPersec4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec4096Koo(value uint64) (err error) { + return instance.SetProperty("WritesPersec4096Koo", (value)) +} + +// GetWritesPersec4096Koo gets the value of WritesPersec4096Koo for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec4K8K sets the value of WritesPersec4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec4K8K(value uint64) (err error) { + return instance.SetProperty("WritesPersec4K8K", (value)) +} + +// GetWritesPersec4K8K gets the value of WritesPersec4K8K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec512K1024K sets the value of WritesPersec512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec512K1024K(value uint64) (err error) { + return instance.SetProperty("WritesPersec512K1024K", (value)) +} + +// GetWritesPersec512K1024K gets the value of WritesPersec512K1024K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec64K128K sets the value of WritesPersec64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec64K128K(value uint64) (err error) { + return instance.SetProperty("WritesPersec64K128K", (value)) +} + +// GetWritesPersec64K128K gets the value of WritesPersec64K128K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec8K16K sets the value of WritesPersec8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec8K16K(value uint64) (err error) { + return instance.SetProperty("WritesPersec8K16K", (value)) +} + +// GetWritesPersec8K16K gets the value of WritesPersec8K16K for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersecnotaligned sets the value of WritesPersecnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersecnotaligned(value uint64) (err error) { + return instance.SetProperty("WritesPersecnotaligned", (value)) +} + +// GetWritesPersecnotaligned gets the value of WritesPersecnotaligned for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersecnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersecnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersecPagingIO sets the value of WritesPersecPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersecPagingIO(value uint64) (err error) { + return instance.SetProperty("WritesPersecPagingIO", (value)) +} + +// GetWritesPersecPagingIO gets the value of WritesPersecPagingIO for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersecPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersecPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersecTotal sets the value of WritesPersecTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersecTotal(value uint64) (err error) { + return instance.SetProperty("WritesPersecTotal", (value)) +} + +// GetWritesPersecTotal gets the value of WritesPersecTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersecTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersecTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesTotal sets the value of WritesTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesTotal(value uint64) (err error) { + return instance.SetProperty("WritesTotal", (value)) +} + +// GetWritesTotal gets the value of WritesTotal for the instance +func (instance *Win32_PerfFormattedData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters.go new file mode 100644 index 00000000..68e2f895 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters.go @@ -0,0 +1,1550 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters struct +type Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters struct { + *Win32_PerfFormattedData + + // + ExceededLatencyLimit uint64 + + // + ExceededLatencyLimitPersec uint32 + + // + IO10000msPersec uint32 + + // + IO1000msPersec uint32 + + // + IO100msPersec uint32 + + // + IO10msPersec uint32 + + // + IO1msPersec uint32 + + // + IO5msPersec uint32 + + // + LocalReadAvgQueueLength uint64 + + // + LocalReadBytes uint64 + + // + LocalReadBytesPersec uint64 + + // + LocalReadLatency uint32 + + // + LocalReadPersec uint32 + + // + LocalReadQueueLength uint64 + + // + LocalReads uint64 + + // + LocalWriteAvgQueueLength uint64 + + // + LocalWriteBytes uint64 + + // + LocalWriteBytesPersec uint64 + + // + LocalWriteLatency uint32 + + // + LocalWriteQueueLength uint64 + + // + LocalWrites uint64 + + // + LocalWritesPersec uint32 + + // + ReadAvgQueueLength uint64 + + // + ReadBytes uint64 + + // + ReadBytesPersec uint64 + + // + ReadLatency uint32 + + // + ReadPersec uint32 + + // + ReadQueueLength uint64 + + // + Reads uint64 + + // + RemoteReadAvgQueueLength uint64 + + // + RemoteReadBytes uint64 + + // + RemoteReadBytesPersec uint64 + + // + RemoteReadLatency uint32 + + // + RemoteReadPersec uint32 + + // + RemoteReadQueueLength uint64 + + // + RemoteReads uint64 + + // + RemoteWriteAvgQueueLength uint64 + + // + RemoteWriteBytes uint64 + + // + RemoteWriteBytesPersec uint64 + + // + RemoteWriteLatency uint32 + + // + RemoteWriteQueueLength uint64 + + // + RemoteWrites uint64 + + // + RemoteWritesPersec uint32 + + // + WriteAvgQueueLength uint64 + + // + WriteBytes uint64 + + // + WriteBytesPersec uint32 + + // + WriteLatency uint32 + + // + WriteQueueLength uint64 + + // + Writes uint64 + + // + WritesPersec uint32 +} + +func NewWin32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetExceededLatencyLimit sets the value of ExceededLatencyLimit for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyExceededLatencyLimit(value uint64) (err error) { + return instance.SetProperty("ExceededLatencyLimit", (value)) +} + +// GetExceededLatencyLimit gets the value of ExceededLatencyLimit for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyExceededLatencyLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("ExceededLatencyLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExceededLatencyLimitPersec sets the value of ExceededLatencyLimitPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyExceededLatencyLimitPersec(value uint32) (err error) { + return instance.SetProperty("ExceededLatencyLimitPersec", (value)) +} + +// GetExceededLatencyLimitPersec gets the value of ExceededLatencyLimitPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyExceededLatencyLimitPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExceededLatencyLimitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO10000msPersec sets the value of IO10000msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO10000msPersec(value uint32) (err error) { + return instance.SetProperty("IO10000msPersec", (value)) +} + +// GetIO10000msPersec gets the value of IO10000msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO10000msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO10000msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO1000msPersec sets the value of IO1000msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO1000msPersec(value uint32) (err error) { + return instance.SetProperty("IO1000msPersec", (value)) +} + +// GetIO1000msPersec gets the value of IO1000msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO1000msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO1000msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO100msPersec sets the value of IO100msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO100msPersec(value uint32) (err error) { + return instance.SetProperty("IO100msPersec", (value)) +} + +// GetIO100msPersec gets the value of IO100msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO100msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO100msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO10msPersec sets the value of IO10msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO10msPersec(value uint32) (err error) { + return instance.SetProperty("IO10msPersec", (value)) +} + +// GetIO10msPersec gets the value of IO10msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO10msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO10msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO1msPersec sets the value of IO1msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO1msPersec(value uint32) (err error) { + return instance.SetProperty("IO1msPersec", (value)) +} + +// GetIO1msPersec gets the value of IO1msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO1msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO1msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO5msPersec sets the value of IO5msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO5msPersec(value uint32) (err error) { + return instance.SetProperty("IO5msPersec", (value)) +} + +// GetIO5msPersec gets the value of IO5msPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO5msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO5msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadAvgQueueLength sets the value of LocalReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalReadAvgQueueLength", (value)) +} + +// GetLocalReadAvgQueueLength gets the value of LocalReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReadBytes sets the value of LocalReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadBytes(value uint64) (err error) { + return instance.SetProperty("LocalReadBytes", (value)) +} + +// GetLocalReadBytes gets the value of LocalReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReadBytesPersec sets the value of LocalReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("LocalReadBytesPersec", (value)) +} + +// GetLocalReadBytesPersec gets the value of LocalReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReadLatency sets the value of LocalReadLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadLatency(value uint32) (err error) { + return instance.SetProperty("LocalReadLatency", (value)) +} + +// GetLocalReadLatency gets the value of LocalReadLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadPersec sets the value of LocalReadPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadPersec(value uint32) (err error) { + return instance.SetProperty("LocalReadPersec", (value)) +} + +// GetLocalReadPersec gets the value of LocalReadPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadQueueLength sets the value of LocalReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalReadQueueLength", (value)) +} + +// GetLocalReadQueueLength gets the value of LocalReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReads sets the value of LocalReads for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReads(value uint64) (err error) { + return instance.SetProperty("LocalReads", (value)) +} + +// GetLocalReads gets the value of LocalReads for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReads() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteAvgQueueLength sets the value of LocalWriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalWriteAvgQueueLength", (value)) +} + +// GetLocalWriteAvgQueueLength gets the value of LocalWriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteBytes sets the value of LocalWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteBytes(value uint64) (err error) { + return instance.SetProperty("LocalWriteBytes", (value)) +} + +// GetLocalWriteBytes gets the value of LocalWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteBytesPersec sets the value of LocalWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("LocalWriteBytesPersec", (value)) +} + +// GetLocalWriteBytesPersec gets the value of LocalWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteLatency sets the value of LocalWriteLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteLatency(value uint32) (err error) { + return instance.SetProperty("LocalWriteLatency", (value)) +} + +// GetLocalWriteLatency gets the value of LocalWriteLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalWriteQueueLength sets the value of LocalWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalWriteQueueLength", (value)) +} + +// GetLocalWriteQueueLength gets the value of LocalWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWrites sets the value of LocalWrites for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWrites(value uint64) (err error) { + return instance.SetProperty("LocalWrites", (value)) +} + +// GetLocalWrites gets the value of LocalWrites for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWritesPersec sets the value of LocalWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWritesPersec(value uint32) (err error) { + return instance.SetProperty("LocalWritesPersec", (value)) +} + +// GetLocalWritesPersec gets the value of LocalWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadAvgQueueLength sets the value of ReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("ReadAvgQueueLength", (value)) +} + +// GetReadAvgQueueLength gets the value of ReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytes sets the value of ReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadBytes(value uint64) (err error) { + return instance.SetProperty("ReadBytes", (value)) +} + +// GetReadBytes gets the value of ReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadLatency sets the value of ReadLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadLatency(value uint32) (err error) { + return instance.SetProperty("ReadLatency", (value)) +} + +// GetReadLatency gets the value of ReadLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPersec sets the value of ReadPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadPersec(value uint32) (err error) { + return instance.SetProperty("ReadPersec", (value)) +} + +// GetReadPersec gets the value of ReadPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadQueueLength sets the value of ReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadQueueLength(value uint64) (err error) { + return instance.SetProperty("ReadQueueLength", (value)) +} + +// GetReadQueueLength gets the value of ReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadAvgQueueLength sets the value of RemoteReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteReadAvgQueueLength", (value)) +} + +// GetRemoteReadAvgQueueLength gets the value of RemoteReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadBytes sets the value of RemoteReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadBytes(value uint64) (err error) { + return instance.SetProperty("RemoteReadBytes", (value)) +} + +// GetRemoteReadBytes gets the value of RemoteReadBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadBytesPersec sets the value of RemoteReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("RemoteReadBytesPersec", (value)) +} + +// GetRemoteReadBytesPersec gets the value of RemoteReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadLatency sets the value of RemoteReadLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadLatency(value uint32) (err error) { + return instance.SetProperty("RemoteReadLatency", (value)) +} + +// GetRemoteReadLatency gets the value of RemoteReadLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteReadPersec sets the value of RemoteReadPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadPersec(value uint32) (err error) { + return instance.SetProperty("RemoteReadPersec", (value)) +} + +// GetRemoteReadPersec gets the value of RemoteReadPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteReadQueueLength sets the value of RemoteReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteReadQueueLength", (value)) +} + +// GetRemoteReadQueueLength gets the value of RemoteReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReads sets the value of RemoteReads for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReads(value uint64) (err error) { + return instance.SetProperty("RemoteReads", (value)) +} + +// GetRemoteReads gets the value of RemoteReads for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteAvgQueueLength sets the value of RemoteWriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteWriteAvgQueueLength", (value)) +} + +// GetRemoteWriteAvgQueueLength gets the value of RemoteWriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteBytes sets the value of RemoteWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteBytes(value uint64) (err error) { + return instance.SetProperty("RemoteWriteBytes", (value)) +} + +// GetRemoteWriteBytes gets the value of RemoteWriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteBytesPersec sets the value of RemoteWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("RemoteWriteBytesPersec", (value)) +} + +// GetRemoteWriteBytesPersec gets the value of RemoteWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteLatency sets the value of RemoteWriteLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteLatency(value uint32) (err error) { + return instance.SetProperty("RemoteWriteLatency", (value)) +} + +// GetRemoteWriteLatency gets the value of RemoteWriteLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteWriteQueueLength sets the value of RemoteWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteWriteQueueLength", (value)) +} + +// GetRemoteWriteQueueLength gets the value of RemoteWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWrites sets the value of RemoteWrites for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWrites(value uint64) (err error) { + return instance.SetProperty("RemoteWrites", (value)) +} + +// GetRemoteWrites gets the value of RemoteWrites for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWritesPersec sets the value of RemoteWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWritesPersec(value uint32) (err error) { + return instance.SetProperty("RemoteWritesPersec", (value)) +} + +// GetRemoteWritesPersec gets the value of RemoteWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteAvgQueueLength sets the value of WriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("WriteAvgQueueLength", (value)) +} + +// GetWriteAvgQueueLength gets the value of WriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytes sets the value of WriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteBytes(value uint64) (err error) { + return instance.SetProperty("WriteBytes", (value)) +} + +// GetWriteBytes gets the value of WriteBytes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteBytesPersec(value uint32) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteBytesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteLatency sets the value of WriteLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteLatency(value uint32) (err error) { + return instance.SetProperty("WriteLatency", (value)) +} + +// GetWriteLatency gets the value of WriteLatency for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteQueueLength sets the value of WriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("WriteQueueLength", (value)) +} + +// GetWriteQueueLength gets the value of WriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWritesPersec(value uint32) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls.go new file mode 100644 index 00000000..59b82580 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls struct { + *Win32_PerfFormattedData + + // + ClusterAPICallsPersec uint64 + + // + GroupAPICallsPersec uint64 + + // + KeyAPICallsPersec uint64 + + // + NetworkAPICallsPersec uint64 + + // + NetworkInterfaceAPICallsPersec uint64 + + // + NodeAPICallsPersec uint64 + + // + NotificationAPICallsPersec uint64 + + // + NotificationBatchAPICallsPersec uint64 + + // + ResourceAPICallsPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICallsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICallsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetClusterAPICallsPersec sets the value of ClusterAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyClusterAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("ClusterAPICallsPersec", (value)) +} + +// GetClusterAPICallsPersec gets the value of ClusterAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyClusterAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGroupAPICallsPersec sets the value of GroupAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyGroupAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("GroupAPICallsPersec", (value)) +} + +// GetGroupAPICallsPersec gets the value of GroupAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyGroupAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKeyAPICallsPersec sets the value of KeyAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyKeyAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("KeyAPICallsPersec", (value)) +} + +// GetKeyAPICallsPersec gets the value of KeyAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyKeyAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("KeyAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkAPICallsPersec sets the value of NetworkAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNetworkAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NetworkAPICallsPersec", (value)) +} + +// GetNetworkAPICallsPersec gets the value of NetworkAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNetworkAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkInterfaceAPICallsPersec sets the value of NetworkInterfaceAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNetworkInterfaceAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NetworkInterfaceAPICallsPersec", (value)) +} + +// GetNetworkInterfaceAPICallsPersec gets the value of NetworkInterfaceAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNetworkInterfaceAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkInterfaceAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNodeAPICallsPersec sets the value of NodeAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNodeAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NodeAPICallsPersec", (value)) +} + +// GetNodeAPICallsPersec gets the value of NodeAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNodeAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NodeAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationAPICallsPersec sets the value of NotificationAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNotificationAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NotificationAPICallsPersec", (value)) +} + +// GetNotificationAPICallsPersec gets the value of NotificationAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNotificationAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationBatchAPICallsPersec sets the value of NotificationBatchAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNotificationBatchAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NotificationBatchAPICallsPersec", (value)) +} + +// GetNotificationBatchAPICallsPersec gets the value of NotificationBatchAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNotificationBatchAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationBatchAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceAPICallsPersec sets the value of ResourceAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyResourceAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("ResourceAPICallsPersec", (value)) +} + +// GetResourceAPICallsPersec gets the value of ResourceAPICallsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyResourceAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles.go new file mode 100644 index 00000000..bdf6f7fa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles struct { + *Win32_PerfFormattedData + + // + BatchHandles uint64 + + // + BatchHandlesPersec uint64 + + // + ClusterHandles uint64 + + // + ClusterHandlesPersec uint64 + + // + GroupHandles uint64 + + // + GroupHandlesPersec uint64 + + // + KeyHandles uint64 + + // + KeyHandlesPersec uint64 + + // + NetworkHandles uint64 + + // + NetworkHandlesPersec uint64 + + // + NetworkInterfaceHandles uint64 + + // + NetworkInterfaceHandlesPersec uint64 + + // + NodeHandles uint64 + + // + NodeHandlesPersec uint64 + + // + NotificationHandles uint64 + + // + NotificationHandlesPersec uint64 + + // + ResourceHandles uint64 + + // + ResourceHandlesPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandlesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandlesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBatchHandles sets the value of BatchHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyBatchHandles(value uint64) (err error) { + return instance.SetProperty("BatchHandles", (value)) +} + +// GetBatchHandles gets the value of BatchHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyBatchHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("BatchHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBatchHandlesPersec sets the value of BatchHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyBatchHandlesPersec(value uint64) (err error) { + return instance.SetProperty("BatchHandlesPersec", (value)) +} + +// GetBatchHandlesPersec gets the value of BatchHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyBatchHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BatchHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClusterHandles sets the value of ClusterHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyClusterHandles(value uint64) (err error) { + return instance.SetProperty("ClusterHandles", (value)) +} + +// GetClusterHandles gets the value of ClusterHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyClusterHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClusterHandlesPersec sets the value of ClusterHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyClusterHandlesPersec(value uint64) (err error) { + return instance.SetProperty("ClusterHandlesPersec", (value)) +} + +// GetClusterHandlesPersec gets the value of ClusterHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyClusterHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGroupHandles sets the value of GroupHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyGroupHandles(value uint64) (err error) { + return instance.SetProperty("GroupHandles", (value)) +} + +// GetGroupHandles gets the value of GroupHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyGroupHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGroupHandlesPersec sets the value of GroupHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyGroupHandlesPersec(value uint64) (err error) { + return instance.SetProperty("GroupHandlesPersec", (value)) +} + +// GetGroupHandlesPersec gets the value of GroupHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyGroupHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKeyHandles sets the value of KeyHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyKeyHandles(value uint64) (err error) { + return instance.SetProperty("KeyHandles", (value)) +} + +// GetKeyHandles gets the value of KeyHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyKeyHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("KeyHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKeyHandlesPersec sets the value of KeyHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyKeyHandlesPersec(value uint64) (err error) { + return instance.SetProperty("KeyHandlesPersec", (value)) +} + +// GetKeyHandlesPersec gets the value of KeyHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyKeyHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("KeyHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkHandles sets the value of NetworkHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkHandles(value uint64) (err error) { + return instance.SetProperty("NetworkHandles", (value)) +} + +// GetNetworkHandles gets the value of NetworkHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkHandlesPersec sets the value of NetworkHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NetworkHandlesPersec", (value)) +} + +// GetNetworkHandlesPersec gets the value of NetworkHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkInterfaceHandles sets the value of NetworkInterfaceHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkInterfaceHandles(value uint64) (err error) { + return instance.SetProperty("NetworkInterfaceHandles", (value)) +} + +// GetNetworkInterfaceHandles gets the value of NetworkInterfaceHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkInterfaceHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkInterfaceHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkInterfaceHandlesPersec sets the value of NetworkInterfaceHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkInterfaceHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NetworkInterfaceHandlesPersec", (value)) +} + +// GetNetworkInterfaceHandlesPersec gets the value of NetworkInterfaceHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkInterfaceHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkInterfaceHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNodeHandles sets the value of NodeHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNodeHandles(value uint64) (err error) { + return instance.SetProperty("NodeHandles", (value)) +} + +// GetNodeHandles gets the value of NodeHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNodeHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NodeHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNodeHandlesPersec sets the value of NodeHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNodeHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NodeHandlesPersec", (value)) +} + +// GetNodeHandlesPersec gets the value of NodeHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNodeHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NodeHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationHandles sets the value of NotificationHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNotificationHandles(value uint64) (err error) { + return instance.SetProperty("NotificationHandles", (value)) +} + +// GetNotificationHandles gets the value of NotificationHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNotificationHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationHandlesPersec sets the value of NotificationHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNotificationHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NotificationHandlesPersec", (value)) +} + +// GetNotificationHandlesPersec gets the value of NotificationHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNotificationHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceHandles sets the value of ResourceHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyResourceHandles(value uint64) (err error) { + return instance.SetProperty("ResourceHandles", (value)) +} + +// GetResourceHandles gets the value of ResourceHandles for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyResourceHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceHandlesPersec sets the value of ResourceHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyResourceHandlesPersec(value uint64) (err error) { + return instance.SetProperty("ResourceHandlesPersec", (value)) +} + +// GetResourceHandlesPersec gets the value of ResourceHandlesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyResourceHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager.go new file mode 100644 index 00000000..8d7181b1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager struct { + *Win32_PerfFormattedData + + // + CryptoCheckpointsRestored uint64 + + // + CryptoCheckpointsRestoredPersec uint64 + + // + CryptoCheckpointsSaved uint64 + + // + CryptoCheckpointsSavedPersec uint64 + + // + RegistryCheckpointsRestored uint64 + + // + RegistryCheckpointsRestoredPersec uint64 + + // + RegistryCheckpointsSaved uint64 + + // + RegistryCheckpointsSavedPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCryptoCheckpointsRestored sets the value of CryptoCheckpointsRestored for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsRestored(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsRestored", (value)) +} + +// GetCryptoCheckpointsRestored gets the value of CryptoCheckpointsRestored for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsRestored() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsRestored") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCryptoCheckpointsRestoredPersec sets the value of CryptoCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsRestoredPersec(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsRestoredPersec", (value)) +} + +// GetCryptoCheckpointsRestoredPersec gets the value of CryptoCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsRestoredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsRestoredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCryptoCheckpointsSaved sets the value of CryptoCheckpointsSaved for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsSaved(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsSaved", (value)) +} + +// GetCryptoCheckpointsSaved gets the value of CryptoCheckpointsSaved for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsSaved() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsSaved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCryptoCheckpointsSavedPersec sets the value of CryptoCheckpointsSavedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsSavedPersec(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsSavedPersec", (value)) +} + +// GetCryptoCheckpointsSavedPersec gets the value of CryptoCheckpointsSavedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsSavedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsSavedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsRestored sets the value of RegistryCheckpointsRestored for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsRestored(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsRestored", (value)) +} + +// GetRegistryCheckpointsRestored gets the value of RegistryCheckpointsRestored for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsRestored() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsRestored") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsRestoredPersec sets the value of RegistryCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsRestoredPersec(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsRestoredPersec", (value)) +} + +// GetRegistryCheckpointsRestoredPersec gets the value of RegistryCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsRestoredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsRestoredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsSaved sets the value of RegistryCheckpointsSaved for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsSaved(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsSaved", (value)) +} + +// GetRegistryCheckpointsSaved gets the value of RegistryCheckpointsSaved for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsSaved() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsSaved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsSavedPersec sets the value of RegistryCheckpointsSavedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsSavedPersec(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsSavedPersec", (value)) +} + +// GetRegistryCheckpointsSavedPersec gets the value of RegistryCheckpointsSavedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsSavedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsSavedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase.go new file mode 100644 index 00000000..cd1f85be --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase struct { + *Win32_PerfFormattedData + + // + Flushes uint64 + + // + FlushesPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabaseEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabaseEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetFlushes sets the value of Flushes for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase) SetPropertyFlushes(value uint64) (err error) { + return instance.SetProperty("Flushes", (value)) +} + +// GetFlushes gets the value of Flushes for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase) GetPropertyFlushes() (value uint64, err error) { + retValue, err := instance.GetProperty("Flushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushesPersec sets the value of FlushesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase) SetPropertyFlushesPersec(value uint64) (err error) { + return instance.SetProperty("FlushesPersec", (value)) +} + +// GetFlushesPersec gets the value of FlushesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterDatabase) GetPropertyFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go new file mode 100644 index 00000000..123e8886 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages struct { + *Win32_PerfFormattedData + + // + AverageDatabaseMessagesExecutionTime uint32 + + // + AverageMessagesExecutionTime uint32 + + // + AverageWaitingTimeToExecuteDatabaseMessages uint32 + + // + AverageWaitingTimeToExecuteMessages uint32 + + // + DatabaseMessagesQueueLength uint64 + + // + DatabaseUpdateMessages uint64 + + // + DatabaseUpdateMessagesPersec uint64 + + // + MessagesExecutionQueueLength uint64 + + // + MessagesQueueLength uint64 + + // + UpdateMessages uint64 + + // + UpdateMessagesPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageDatabaseMessagesExecutionTime sets the value of AverageDatabaseMessagesExecutionTime for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageDatabaseMessagesExecutionTime(value uint32) (err error) { + return instance.SetProperty("AverageDatabaseMessagesExecutionTime", (value)) +} + +// GetAverageDatabaseMessagesExecutionTime gets the value of AverageDatabaseMessagesExecutionTime for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageDatabaseMessagesExecutionTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageDatabaseMessagesExecutionTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageMessagesExecutionTime sets the value of AverageMessagesExecutionTime for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageMessagesExecutionTime(value uint32) (err error) { + return instance.SetProperty("AverageMessagesExecutionTime", (value)) +} + +// GetAverageMessagesExecutionTime gets the value of AverageMessagesExecutionTime for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageMessagesExecutionTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageMessagesExecutionTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWaitingTimeToExecuteDatabaseMessages sets the value of AverageWaitingTimeToExecuteDatabaseMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageWaitingTimeToExecuteDatabaseMessages(value uint32) (err error) { + return instance.SetProperty("AverageWaitingTimeToExecuteDatabaseMessages", (value)) +} + +// GetAverageWaitingTimeToExecuteDatabaseMessages gets the value of AverageWaitingTimeToExecuteDatabaseMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageWaitingTimeToExecuteDatabaseMessages() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWaitingTimeToExecuteDatabaseMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWaitingTimeToExecuteMessages sets the value of AverageWaitingTimeToExecuteMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageWaitingTimeToExecuteMessages(value uint32) (err error) { + return instance.SetProperty("AverageWaitingTimeToExecuteMessages", (value)) +} + +// GetAverageWaitingTimeToExecuteMessages gets the value of AverageWaitingTimeToExecuteMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageWaitingTimeToExecuteMessages() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWaitingTimeToExecuteMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseMessagesQueueLength sets the value of DatabaseMessagesQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyDatabaseMessagesQueueLength(value uint64) (err error) { + return instance.SetProperty("DatabaseMessagesQueueLength", (value)) +} + +// GetDatabaseMessagesQueueLength gets the value of DatabaseMessagesQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyDatabaseMessagesQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseMessagesQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseUpdateMessages sets the value of DatabaseUpdateMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyDatabaseUpdateMessages(value uint64) (err error) { + return instance.SetProperty("DatabaseUpdateMessages", (value)) +} + +// GetDatabaseUpdateMessages gets the value of DatabaseUpdateMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyDatabaseUpdateMessages() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseUpdateMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseUpdateMessagesPersec sets the value of DatabaseUpdateMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyDatabaseUpdateMessagesPersec(value uint64) (err error) { + return instance.SetProperty("DatabaseUpdateMessagesPersec", (value)) +} + +// GetDatabaseUpdateMessagesPersec gets the value of DatabaseUpdateMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyDatabaseUpdateMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseUpdateMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesExecutionQueueLength sets the value of MessagesExecutionQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyMessagesExecutionQueueLength(value uint64) (err error) { + return instance.SetProperty("MessagesExecutionQueueLength", (value)) +} + +// GetMessagesExecutionQueueLength gets the value of MessagesExecutionQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyMessagesExecutionQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesExecutionQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesQueueLength sets the value of MessagesQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyMessagesQueueLength(value uint64) (err error) { + return instance.SetProperty("MessagesQueueLength", (value)) +} + +// GetMessagesQueueLength gets the value of MessagesQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyMessagesQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateMessages sets the value of UpdateMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyUpdateMessages(value uint64) (err error) { + return instance.SetProperty("UpdateMessages", (value)) +} + +// GetUpdateMessages gets the value of UpdateMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyUpdateMessages() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateMessagesPersec sets the value of UpdateMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyUpdateMessagesPersec(value uint64) (err error) { + return instance.SetProperty("UpdateMessagesPersec", (value)) +} + +// GetUpdateMessagesPersec gets the value of UpdateMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyUpdateMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go new file mode 100644 index 00000000..cd810291 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages struct { + *Win32_PerfFormattedData + + // + MessageQueueLength uint64 + + // + UnacknowledgedMessages uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMessageQueueLength sets the value of MessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) SetPropertyMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("MessageQueueLength", (value)) +} + +// GetMessageQueueLength gets the value of MessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) GetPropertyMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("MessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnacknowledgedMessages sets the value of UnacknowledgedMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) SetPropertyUnacknowledgedMessages(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessages", (value)) +} + +// GetUnacknowledgedMessages gets the value of UnacknowledgedMessages for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) GetPropertyUnacknowledgedMessages() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go new file mode 100644 index 00000000..efdaf3e6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2 struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2 struct { + *Win32_PerfFormattedData + + // + UnacknowledgedMessageCount uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetUnacknowledgedMessageCount sets the value of UnacknowledgedMessageCount for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2) SetPropertyUnacknowledgedMessageCount(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessageCount", (value)) +} + +// GetUnacknowledgedMessageCount gets the value of UnacknowledgedMessageCount for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2) GetPropertyUnacknowledgedMessageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go new file mode 100644 index 00000000..2d9199ae --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages struct { + *Win32_PerfFormattedData + + // + MessagesOutstanding uint64 + + // + MessagesSent uint64 + + // + MessagesSentPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMessagesOutstanding sets the value of MessagesOutstanding for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) SetPropertyMessagesOutstanding(value uint64) (err error) { + return instance.SetProperty("MessagesOutstanding", (value)) +} + +// GetMessagesOutstanding gets the value of MessagesOutstanding for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) GetPropertyMessagesOutstanding() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSent sets the value of MessagesSent for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) SetPropertyMessagesSent(value uint64) (err error) { + return instance.SetProperty("MessagesSent", (value)) +} + +// GetMessagesSent gets the value of MessagesSent for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) GetPropertyMessagesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) SetPropertyMessagesSentPersec(value uint64) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) GetPropertyMessagesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages.go new file mode 100644 index 00000000..574745a0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSent uint64 + + // + BytesSentPersec uint64 + + // + MessagesReceived uint64 + + // + MessagesReceivedPersec uint64 + + // + MessagesSent uint64 + + // + MessagesSentPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesReceived sets the value of MessagesReceived for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesReceived(value uint64) (err error) { + return instance.SetProperty("MessagesReceived", (value)) +} + +// GetMessagesReceived gets the value of MessagesReceived for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesReceivedPersec sets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MessagesReceivedPersec", (value)) +} + +// GetMessagesReceivedPersec gets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSent sets the value of MessagesSent for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesSent(value uint64) (err error) { + return instance.SetProperty("MessagesSent", (value)) +} + +// GetMessagesSent gets the value of MessagesSent for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesSentPersec(value uint64) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections.go new file mode 100644 index 00000000..7fae8287 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections struct { + *Win32_PerfFormattedData + + // + NormalMessageQueueLength uint64 + + // + NormalMessageQueueLengthPersec uint64 + + // + ReconnectCount uint64 + + // + UnacknowledgedMessageQueueLength uint64 + + // + UnacknowledgedMessageQueueLengthPersec uint64 + + // + UrgentMessageQueueLength uint64 + + // + UrgentMessageQueueLengthPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnectionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnectionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNormalMessageQueueLength sets the value of NormalMessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyNormalMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("NormalMessageQueueLength", (value)) +} + +// GetNormalMessageQueueLength gets the value of NormalMessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyNormalMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalMessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalMessageQueueLengthPersec sets the value of NormalMessageQueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyNormalMessageQueueLengthPersec(value uint64) (err error) { + return instance.SetProperty("NormalMessageQueueLengthPersec", (value)) +} + +// GetNormalMessageQueueLengthPersec gets the value of NormalMessageQueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyNormalMessageQueueLengthPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalMessageQueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReconnectCount sets the value of ReconnectCount for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyReconnectCount(value uint64) (err error) { + return instance.SetProperty("ReconnectCount", (value)) +} + +// GetReconnectCount gets the value of ReconnectCount for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyReconnectCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReconnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnacknowledgedMessageQueueLength sets the value of UnacknowledgedMessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUnacknowledgedMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessageQueueLength", (value)) +} + +// GetUnacknowledgedMessageQueueLength gets the value of UnacknowledgedMessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUnacknowledgedMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnacknowledgedMessageQueueLengthPersec sets the value of UnacknowledgedMessageQueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUnacknowledgedMessageQueueLengthPersec(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessageQueueLengthPersec", (value)) +} + +// GetUnacknowledgedMessageQueueLengthPersec gets the value of UnacknowledgedMessageQueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUnacknowledgedMessageQueueLengthPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessageQueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUrgentMessageQueueLength sets the value of UrgentMessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUrgentMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("UrgentMessageQueueLength", (value)) +} + +// GetUrgentMessageQueueLength gets the value of UrgentMessageQueueLength for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUrgentMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("UrgentMessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUrgentMessageQueueLengthPersec sets the value of UrgentMessageQueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUrgentMessageQueueLengthPersec(value uint64) (err error) { + return instance.SetProperty("UrgentMessageQueueLengthPersec", (value)) +} + +// GetUrgentMessageQueueLengthPersec gets the value of UrgentMessageQueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUrgentMessageQueueLengthPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UrgentMessageQueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager.go new file mode 100644 index 00000000..238e1f28 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager struct { + *Win32_PerfFormattedData + + // + GroupsOnline uint64 + + // + RHSProcesses uint64 + + // + RHSRestarts uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetGroupsOnline sets the value of GroupsOnline for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager) SetPropertyGroupsOnline(value uint64) (err error) { + return instance.SetProperty("GroupsOnline", (value)) +} + +// GetGroupsOnline gets the value of GroupsOnline for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager) GetPropertyGroupsOnline() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupsOnline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRHSProcesses sets the value of RHSProcesses for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager) SetPropertyRHSProcesses(value uint64) (err error) { + return instance.SetProperty("RHSProcesses", (value)) +} + +// GetRHSProcesses gets the value of RHSProcesses for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager) GetPropertyRHSProcesses() (value uint64, err error) { + retValue, err := instance.GetProperty("RHSProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRHSRestarts sets the value of RHSRestarts for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager) SetPropertyRHSRestarts(value uint64) (err error) { + return instance.SetProperty("RHSRestarts", (value)) +} + +// GetRHSRestarts gets the value of RHSRestarts for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResourceControlManager) GetPropertyRHSRestarts() (value uint64, err error) { + retValue, err := instance.GetProperty("RHSRestarts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources.go new file mode 100644 index 00000000..69b04061 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources struct +type Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources struct { + *Win32_PerfFormattedData + + // + ResourceControls uint64 + + // + ResourceControlsPersec uint64 + + // + ResourceFailure uint64 + + // + ResourceFailureAccessViolation uint64 + + // + ResourceFailureDeadlock uint64 + + // + ResourcesOnline uint64 + + // + ResourceTypeControls uint64 + + // + ResourceTypeControlsPersec uint64 +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterResourcesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ClussvcPerfProvider_ClusterResourcesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetResourceControls sets the value of ResourceControls for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceControls(value uint64) (err error) { + return instance.SetProperty("ResourceControls", (value)) +} + +// GetResourceControls gets the value of ResourceControls for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceControls() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceControls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceControlsPersec sets the value of ResourceControlsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceControlsPersec(value uint64) (err error) { + return instance.SetProperty("ResourceControlsPersec", (value)) +} + +// GetResourceControlsPersec gets the value of ResourceControlsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceControlsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceControlsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceFailure sets the value of ResourceFailure for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceFailure(value uint64) (err error) { + return instance.SetProperty("ResourceFailure", (value)) +} + +// GetResourceFailure gets the value of ResourceFailure for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceFailure() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceFailure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceFailureAccessViolation sets the value of ResourceFailureAccessViolation for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceFailureAccessViolation(value uint64) (err error) { + return instance.SetProperty("ResourceFailureAccessViolation", (value)) +} + +// GetResourceFailureAccessViolation gets the value of ResourceFailureAccessViolation for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceFailureAccessViolation() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceFailureAccessViolation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceFailureDeadlock sets the value of ResourceFailureDeadlock for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceFailureDeadlock(value uint64) (err error) { + return instance.SetProperty("ResourceFailureDeadlock", (value)) +} + +// GetResourceFailureDeadlock gets the value of ResourceFailureDeadlock for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceFailureDeadlock() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceFailureDeadlock") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourcesOnline sets the value of ResourcesOnline for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourcesOnline(value uint64) (err error) { + return instance.SetProperty("ResourcesOnline", (value)) +} + +// GetResourcesOnline gets the value of ResourcesOnline for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourcesOnline() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourcesOnline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceTypeControls sets the value of ResourceTypeControls for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceTypeControls(value uint64) (err error) { + return instance.SetProperty("ResourceTypeControls", (value)) +} + +// GetResourceTypeControls gets the value of ResourceTypeControls for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceTypeControls() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceTypeControls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceTypeControlsPersec sets the value of ResourceTypeControlsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceTypeControlsPersec(value uint64) (err error) { + return instance.SetProperty("ResourceTypeControlsPersec", (value)) +} + +// GetResourceTypeControlsPersec gets the value of ResourceTypeControlsPersec for the instance +func (instance *Win32_PerfFormattedData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceTypeControlsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceTypeControlsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage.go new file mode 100644 index 00000000..65b7341d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage struct +type Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage struct { + *Win32_PerfFormattedData + + // + PrimaryFeaturePercentStreamed uint32 +} + +func NewWin32_PerfFormattedData_Counters_AppVClientStreamedDataPercentageEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_AppVClientStreamedDataPercentageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetPrimaryFeaturePercentStreamed sets the value of PrimaryFeaturePercentStreamed for the instance +func (instance *Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage) SetPropertyPrimaryFeaturePercentStreamed(value uint32) (err error) { + return instance.SetProperty("PrimaryFeaturePercentStreamed", (value)) +} + +// GetPrimaryFeaturePercentStreamed gets the value of PrimaryFeaturePercentStreamed for the instance +func (instance *Win32_PerfFormattedData_Counters_AppVClientStreamedDataPercentage) GetPropertyPrimaryFeaturePercentStreamed() (value uint32, err error) { + retValue, err := instance.GetProperty("PrimaryFeaturePercentStreamed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothDevice.go new file mode 100644 index 00000000..b389c038 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothDevice.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_BluetoothDevice struct +type Win32_PerfFormattedData_Counters_BluetoothDevice struct { + *Win32_PerfFormattedData + + // + ClassicACLbytesreadPersec uint32 + + // + ClassicACLbyteswrittenPersec uint32 + + // + LEACLbytesreadPersec uint32 + + // + LEACLbyteswrittenPersec uint32 + + // + SCObytesreadPersec uint32 + + // + SCObyteswrittenPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_BluetoothDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_BluetoothDevice, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_BluetoothDevice{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_BluetoothDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_BluetoothDevice, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_BluetoothDevice{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetClassicACLbytesreadPersec sets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) SetPropertyClassicACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbytesreadPersec", (value)) +} + +// GetClassicACLbytesreadPersec gets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) GetPropertyClassicACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLbyteswrittenPersec sets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) SetPropertyClassicACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbyteswrittenPersec", (value)) +} + +// GetClassicACLbyteswrittenPersec gets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) GetPropertyClassicACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbytesreadPersec sets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) SetPropertyLEACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbytesreadPersec", (value)) +} + +// GetLEACLbytesreadPersec gets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) GetPropertyLEACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbyteswrittenPersec sets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) SetPropertyLEACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbyteswrittenPersec", (value)) +} + +// GetLEACLbyteswrittenPersec gets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) GetPropertyLEACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObytesreadPersec sets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) SetPropertySCObytesreadPersec(value uint32) (err error) { + return instance.SetProperty("SCObytesreadPersec", (value)) +} + +// GetSCObytesreadPersec gets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) GetPropertySCObytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObyteswrittenPersec sets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) SetPropertySCObyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("SCObyteswrittenPersec", (value)) +} + +// GetSCObyteswrittenPersec gets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothDevice) GetPropertySCObyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothRadio.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothRadio.go new file mode 100644 index 00000000..62e68db5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_BluetoothRadio.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_BluetoothRadio struct +type Win32_PerfFormattedData_Counters_BluetoothRadio struct { + *Win32_PerfFormattedData + + // + ACLflusheventsPersec uint32 + + // + ClassicACLbytesreadPersec uint32 + + // + ClassicACLbyteswrittenPersec uint32 + + // + ClassicACLConnections uint32 + + // + ClassicACLwritecredits uint32 + + // + InquiryScanDutyCyclePercent uint32 + + // + InquiryScanInterval uint32 + + // + InquiryScanWindow uint32 + + // + LEACLbytesreadPersec uint32 + + // + LEACLbyteswrittenPersec uint32 + + // + LEACLConnections uint32 + + // + LEACLwritecredits uint32 + + // + LEScanDutyCyclePercent uint32 + + // + LEScanInterval uint32 + + // + LEScanWindow uint32 + + // + PageScanDutyCyclePercent uint32 + + // + PageScanInterval uint32 + + // + PageScanWindow uint32 + + // + SCObytesreadPersec uint32 + + // + SCObyteswrittenPersec uint32 + + // + SCOConnections uint32 + + // + SidebandSCOConnections uint32 +} + +func NewWin32_PerfFormattedData_Counters_BluetoothRadioEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_BluetoothRadio, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_BluetoothRadio{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_BluetoothRadioEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_BluetoothRadio, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_BluetoothRadio{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetACLflusheventsPersec sets the value of ACLflusheventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyACLflusheventsPersec(value uint32) (err error) { + return instance.SetProperty("ACLflusheventsPersec", (value)) +} + +// GetACLflusheventsPersec gets the value of ACLflusheventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyACLflusheventsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ACLflusheventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLbytesreadPersec sets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyClassicACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbytesreadPersec", (value)) +} + +// GetClassicACLbytesreadPersec gets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyClassicACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLbyteswrittenPersec sets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyClassicACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbyteswrittenPersec", (value)) +} + +// GetClassicACLbyteswrittenPersec gets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyClassicACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLConnections sets the value of ClassicACLConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyClassicACLConnections(value uint32) (err error) { + return instance.SetProperty("ClassicACLConnections", (value)) +} + +// GetClassicACLConnections gets the value of ClassicACLConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyClassicACLConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLwritecredits sets the value of ClassicACLwritecredits for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyClassicACLwritecredits(value uint32) (err error) { + return instance.SetProperty("ClassicACLwritecredits", (value)) +} + +// GetClassicACLwritecredits gets the value of ClassicACLwritecredits for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyClassicACLwritecredits() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLwritecredits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInquiryScanDutyCyclePercent sets the value of InquiryScanDutyCyclePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyInquiryScanDutyCyclePercent(value uint32) (err error) { + return instance.SetProperty("InquiryScanDutyCyclePercent", (value)) +} + +// GetInquiryScanDutyCyclePercent gets the value of InquiryScanDutyCyclePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyInquiryScanDutyCyclePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("InquiryScanDutyCyclePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInquiryScanInterval sets the value of InquiryScanInterval for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyInquiryScanInterval(value uint32) (err error) { + return instance.SetProperty("InquiryScanInterval", (value)) +} + +// GetInquiryScanInterval gets the value of InquiryScanInterval for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyInquiryScanInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("InquiryScanInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInquiryScanWindow sets the value of InquiryScanWindow for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyInquiryScanWindow(value uint32) (err error) { + return instance.SetProperty("InquiryScanWindow", (value)) +} + +// GetInquiryScanWindow gets the value of InquiryScanWindow for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyInquiryScanWindow() (value uint32, err error) { + retValue, err := instance.GetProperty("InquiryScanWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbytesreadPersec sets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbytesreadPersec", (value)) +} + +// GetLEACLbytesreadPersec gets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbyteswrittenPersec sets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbyteswrittenPersec", (value)) +} + +// GetLEACLbyteswrittenPersec gets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLConnections sets the value of LEACLConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEACLConnections(value uint32) (err error) { + return instance.SetProperty("LEACLConnections", (value)) +} + +// GetLEACLConnections gets the value of LEACLConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEACLConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLwritecredits sets the value of LEACLwritecredits for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEACLwritecredits(value uint32) (err error) { + return instance.SetProperty("LEACLwritecredits", (value)) +} + +// GetLEACLwritecredits gets the value of LEACLwritecredits for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEACLwritecredits() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLwritecredits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEScanDutyCyclePercent sets the value of LEScanDutyCyclePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEScanDutyCyclePercent(value uint32) (err error) { + return instance.SetProperty("LEScanDutyCyclePercent", (value)) +} + +// GetLEScanDutyCyclePercent gets the value of LEScanDutyCyclePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEScanDutyCyclePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("LEScanDutyCyclePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEScanInterval sets the value of LEScanInterval for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEScanInterval(value uint32) (err error) { + return instance.SetProperty("LEScanInterval", (value)) +} + +// GetLEScanInterval gets the value of LEScanInterval for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEScanInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("LEScanInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEScanWindow sets the value of LEScanWindow for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyLEScanWindow(value uint32) (err error) { + return instance.SetProperty("LEScanWindow", (value)) +} + +// GetLEScanWindow gets the value of LEScanWindow for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyLEScanWindow() (value uint32, err error) { + retValue, err := instance.GetProperty("LEScanWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageScanDutyCyclePercent sets the value of PageScanDutyCyclePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyPageScanDutyCyclePercent(value uint32) (err error) { + return instance.SetProperty("PageScanDutyCyclePercent", (value)) +} + +// GetPageScanDutyCyclePercent gets the value of PageScanDutyCyclePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyPageScanDutyCyclePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("PageScanDutyCyclePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageScanInterval sets the value of PageScanInterval for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyPageScanInterval(value uint32) (err error) { + return instance.SetProperty("PageScanInterval", (value)) +} + +// GetPageScanInterval gets the value of PageScanInterval for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyPageScanInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("PageScanInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageScanWindow sets the value of PageScanWindow for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertyPageScanWindow(value uint32) (err error) { + return instance.SetProperty("PageScanWindow", (value)) +} + +// GetPageScanWindow gets the value of PageScanWindow for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertyPageScanWindow() (value uint32, err error) { + retValue, err := instance.GetProperty("PageScanWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObytesreadPersec sets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertySCObytesreadPersec(value uint32) (err error) { + return instance.SetProperty("SCObytesreadPersec", (value)) +} + +// GetSCObytesreadPersec gets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertySCObytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObyteswrittenPersec sets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertySCObyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("SCObyteswrittenPersec", (value)) +} + +// GetSCObyteswrittenPersec gets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertySCObyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCOConnections sets the value of SCOConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertySCOConnections(value uint32) (err error) { + return instance.SetProperty("SCOConnections", (value)) +} + +// GetSCOConnections gets the value of SCOConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertySCOConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SCOConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSidebandSCOConnections sets the value of SidebandSCOConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) SetPropertySidebandSCOConnections(value uint32) (err error) { + return instance.SetProperty("SidebandSCOConnections", (value)) +} + +// GetSidebandSCOConnections gets the value of SidebandSCOConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_BluetoothRadio) GetPropertySidebandSCOConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SidebandSCOConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_DNS64Global.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_DNS64Global.go new file mode 100644 index 00000000..2c872bc9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_DNS64Global.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_DNS64Global struct +type Win32_PerfFormattedData_Counters_DNS64Global struct { + *Win32_PerfFormattedData + + // + AAAAqueriesFailed uint64 + + // + AAAAqueriesSuccessful uint64 + + // + AAAASynthesizedrecords uint64 + + // + IP6ARPAqueriesMatched uint64 + + // + OtherqueriesFailed uint64 + + // + OtherqueriesSuccessful uint64 +} + +func NewWin32_PerfFormattedData_Counters_DNS64GlobalEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_DNS64Global, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_DNS64Global{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_DNS64GlobalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_DNS64Global, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_DNS64Global{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAAAAqueriesFailed sets the value of AAAAqueriesFailed for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) SetPropertyAAAAqueriesFailed(value uint64) (err error) { + return instance.SetProperty("AAAAqueriesFailed", (value)) +} + +// GetAAAAqueriesFailed gets the value of AAAAqueriesFailed for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) GetPropertyAAAAqueriesFailed() (value uint64, err error) { + retValue, err := instance.GetProperty("AAAAqueriesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAAAAqueriesSuccessful sets the value of AAAAqueriesSuccessful for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) SetPropertyAAAAqueriesSuccessful(value uint64) (err error) { + return instance.SetProperty("AAAAqueriesSuccessful", (value)) +} + +// GetAAAAqueriesSuccessful gets the value of AAAAqueriesSuccessful for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) GetPropertyAAAAqueriesSuccessful() (value uint64, err error) { + retValue, err := instance.GetProperty("AAAAqueriesSuccessful") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAAAASynthesizedrecords sets the value of AAAASynthesizedrecords for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) SetPropertyAAAASynthesizedrecords(value uint64) (err error) { + return instance.SetProperty("AAAASynthesizedrecords", (value)) +} + +// GetAAAASynthesizedrecords gets the value of AAAASynthesizedrecords for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) GetPropertyAAAASynthesizedrecords() (value uint64, err error) { + retValue, err := instance.GetProperty("AAAASynthesizedrecords") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIP6ARPAqueriesMatched sets the value of IP6ARPAqueriesMatched for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) SetPropertyIP6ARPAqueriesMatched(value uint64) (err error) { + return instance.SetProperty("IP6ARPAqueriesMatched", (value)) +} + +// GetIP6ARPAqueriesMatched gets the value of IP6ARPAqueriesMatched for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) GetPropertyIP6ARPAqueriesMatched() (value uint64, err error) { + retValue, err := instance.GetProperty("IP6ARPAqueriesMatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherqueriesFailed sets the value of OtherqueriesFailed for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) SetPropertyOtherqueriesFailed(value uint64) (err error) { + return instance.SetProperty("OtherqueriesFailed", (value)) +} + +// GetOtherqueriesFailed gets the value of OtherqueriesFailed for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) GetPropertyOtherqueriesFailed() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherqueriesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherqueriesSuccessful sets the value of OtherqueriesSuccessful for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) SetPropertyOtherqueriesSuccessful(value uint64) (err error) { + return instance.SetProperty("OtherqueriesSuccessful", (value)) +} + +// GetOtherqueriesSuccessful gets the value of OtherqueriesSuccessful for the instance +func (instance *Win32_PerfFormattedData_Counters_DNS64Global) GetPropertyOtherqueriesSuccessful() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherqueriesSuccessful") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventLog.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventLog.go new file mode 100644 index 00000000..505a49ce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventLog.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_Counters_EventLog struct +type Win32_PerfFormattedData_Counters_EventLog struct { + *Win32_PerfFormattedData + + // + Activesubscriptions uint32 + + // + ELFRPCcallsPersec uint64 + + // + EnabledChannels uint32 + + // + EventfilteroperationsPersec uint64 + + // + EventsPersec uint64 + + // + WEVTRPCcallsPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_EventLogEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_EventLog, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_EventLog{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_EventLogEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_EventLog, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_EventLog{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActivesubscriptions sets the value of Activesubscriptions for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) SetPropertyActivesubscriptions(value uint32) (err error) { + return instance.SetProperty("Activesubscriptions", value) +} + +// GetActivesubscriptions gets the value of Activesubscriptions for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) GetPropertyActivesubscriptions() (value uint32, err error) { + retValue, err := instance.GetProperty("Activesubscriptions") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetELFRPCcallsPersec sets the value of ELFRPCcallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) SetPropertyELFRPCcallsPersec(value uint64) (err error) { + return instance.SetProperty("ELFRPCcallsPersec", value) +} + +// GetELFRPCcallsPersec gets the value of ELFRPCcallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) GetPropertyELFRPCcallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ELFRPCcallsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetEnabledChannels sets the value of EnabledChannels for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) SetPropertyEnabledChannels(value uint32) (err error) { + return instance.SetProperty("EnabledChannels", value) +} + +// GetEnabledChannels gets the value of EnabledChannels for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) GetPropertyEnabledChannels() (value uint32, err error) { + retValue, err := instance.GetProperty("EnabledChannels") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetEventfilteroperationsPersec sets the value of EventfilteroperationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) SetPropertyEventfilteroperationsPersec(value uint64) (err error) { + return instance.SetProperty("EventfilteroperationsPersec", value) +} + +// GetEventfilteroperationsPersec gets the value of EventfilteroperationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) GetPropertyEventfilteroperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EventfilteroperationsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetEventsPersec sets the value of EventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) SetPropertyEventsPersec(value uint64) (err error) { + return instance.SetProperty("EventsPersec", value) +} + +// GetEventsPersec gets the value of EventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) GetPropertyEventsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EventsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetWEVTRPCcallsPersec sets the value of WEVTRPCcallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) SetPropertyWEVTRPCcallsPersec(value uint64) (err error) { + return instance.SetProperty("WEVTRPCcallsPersec", value) +} + +// GetWEVTRPCcallsPersec gets the value of WEVTRPCcallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventLog) GetPropertyWEVTRPCcallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WEVTRPCcallsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindows.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindows.go new file mode 100644 index 00000000..0913298f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindows.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_EventTracingforWindows struct +type Win32_PerfFormattedData_Counters_EventTracingforWindows struct { + *Win32_PerfFormattedData + + // + TotalMemoryUsageNonPagedPool uint32 + + // + TotalMemoryUsagePagedPool uint32 + + // + TotalNumberofActiveSessions uint32 + + // + TotalNumberofDistinctDisabledProviders uint32 + + // + TotalNumberofDistinctEnabledProviders uint32 + + // + TotalNumberofDistinctPreEnabledProviders uint32 +} + +func NewWin32_PerfFormattedData_Counters_EventTracingforWindowsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_EventTracingforWindows, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_EventTracingforWindows{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_EventTracingforWindowsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_EventTracingforWindows, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_EventTracingforWindows{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalMemoryUsageNonPagedPool sets the value of TotalMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) SetPropertyTotalMemoryUsageNonPagedPool(value uint32) (err error) { + return instance.SetProperty("TotalMemoryUsageNonPagedPool", (value)) +} + +// GetTotalMemoryUsageNonPagedPool gets the value of TotalMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) GetPropertyTotalMemoryUsageNonPagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalMemoryUsageNonPagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalMemoryUsagePagedPool sets the value of TotalMemoryUsagePagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) SetPropertyTotalMemoryUsagePagedPool(value uint32) (err error) { + return instance.SetProperty("TotalMemoryUsagePagedPool", (value)) +} + +// GetTotalMemoryUsagePagedPool gets the value of TotalMemoryUsagePagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) GetPropertyTotalMemoryUsagePagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalMemoryUsagePagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofActiveSessions sets the value of TotalNumberofActiveSessions for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) SetPropertyTotalNumberofActiveSessions(value uint32) (err error) { + return instance.SetProperty("TotalNumberofActiveSessions", (value)) +} + +// GetTotalNumberofActiveSessions gets the value of TotalNumberofActiveSessions for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) GetPropertyTotalNumberofActiveSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofActiveSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofDistinctDisabledProviders sets the value of TotalNumberofDistinctDisabledProviders for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) SetPropertyTotalNumberofDistinctDisabledProviders(value uint32) (err error) { + return instance.SetProperty("TotalNumberofDistinctDisabledProviders", (value)) +} + +// GetTotalNumberofDistinctDisabledProviders gets the value of TotalNumberofDistinctDisabledProviders for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) GetPropertyTotalNumberofDistinctDisabledProviders() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofDistinctDisabledProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofDistinctEnabledProviders sets the value of TotalNumberofDistinctEnabledProviders for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) SetPropertyTotalNumberofDistinctEnabledProviders(value uint32) (err error) { + return instance.SetProperty("TotalNumberofDistinctEnabledProviders", (value)) +} + +// GetTotalNumberofDistinctEnabledProviders gets the value of TotalNumberofDistinctEnabledProviders for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) GetPropertyTotalNumberofDistinctEnabledProviders() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofDistinctEnabledProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofDistinctPreEnabledProviders sets the value of TotalNumberofDistinctPreEnabledProviders for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) SetPropertyTotalNumberofDistinctPreEnabledProviders(value uint32) (err error) { + return instance.SetProperty("TotalNumberofDistinctPreEnabledProviders", (value)) +} + +// GetTotalNumberofDistinctPreEnabledProviders gets the value of TotalNumberofDistinctPreEnabledProviders for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindows) GetPropertyTotalNumberofDistinctPreEnabledProviders() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofDistinctPreEnabledProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindowsSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindowsSession.go new file mode 100644 index 00000000..c4ac6e80 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_EventTracingforWindowsSession.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_EventTracingforWindowsSession struct +type Win32_PerfFormattedData_Counters_EventTracingforWindowsSession struct { + *Win32_PerfFormattedData + + // + BufferMemoryUsageNonPagedPool uint32 + + // + BufferMemoryUsagePagedPool uint32 + + // + EventsLoggedpersec uint64 + + // + EventsLost uint32 + + // + NumberofRealTimeConsumers uint32 +} + +func NewWin32_PerfFormattedData_Counters_EventTracingforWindowsSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_EventTracingforWindowsSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_EventTracingforWindowsSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_EventTracingforWindowsSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBufferMemoryUsageNonPagedPool sets the value of BufferMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) SetPropertyBufferMemoryUsageNonPagedPool(value uint32) (err error) { + return instance.SetProperty("BufferMemoryUsageNonPagedPool", (value)) +} + +// GetBufferMemoryUsageNonPagedPool gets the value of BufferMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) GetPropertyBufferMemoryUsageNonPagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferMemoryUsageNonPagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBufferMemoryUsagePagedPool sets the value of BufferMemoryUsagePagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) SetPropertyBufferMemoryUsagePagedPool(value uint32) (err error) { + return instance.SetProperty("BufferMemoryUsagePagedPool", (value)) +} + +// GetBufferMemoryUsagePagedPool gets the value of BufferMemoryUsagePagedPool for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) GetPropertyBufferMemoryUsagePagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferMemoryUsagePagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventsLoggedpersec sets the value of EventsLoggedpersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) SetPropertyEventsLoggedpersec(value uint64) (err error) { + return instance.SetProperty("EventsLoggedpersec", (value)) +} + +// GetEventsLoggedpersec gets the value of EventsLoggedpersec for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) GetPropertyEventsLoggedpersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EventsLoggedpersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEventsLost sets the value of EventsLost for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) SetPropertyEventsLost(value uint32) (err error) { + return instance.SetProperty("EventsLost", (value)) +} + +// GetEventsLost gets the value of EventsLost for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) GetPropertyEventsLost() (value uint32, err error) { + retValue, err := instance.GetProperty("EventsLost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofRealTimeConsumers sets the value of NumberofRealTimeConsumers for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) SetPropertyNumberofRealTimeConsumers(value uint32) (err error) { + return instance.SetProperty("NumberofRealTimeConsumers", (value)) +} + +// GetNumberofRealTimeConsumers gets the value of NumberofRealTimeConsumers for the instance +func (instance *Win32_PerfFormattedData_Counters_EventTracingforWindowsSession) GetPropertyNumberofRealTimeConsumers() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofRealTimeConsumers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_FileSystemDiskActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_FileSystemDiskActivity.go new file mode 100644 index 00000000..abe96b63 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_FileSystemDiskActivity.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_FileSystemDiskActivity struct +type Win32_PerfFormattedData_Counters_FileSystemDiskActivity struct { + *Win32_PerfFormattedData + + // + FileSystemBytesRead uint64 + + // + FileSystemBytesWritten uint64 +} + +func NewWin32_PerfFormattedData_Counters_FileSystemDiskActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_FileSystemDiskActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_FileSystemDiskActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_FileSystemDiskActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_FileSystemDiskActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_FileSystemDiskActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetFileSystemBytesRead sets the value of FileSystemBytesRead for the instance +func (instance *Win32_PerfFormattedData_Counters_FileSystemDiskActivity) SetPropertyFileSystemBytesRead(value uint64) (err error) { + return instance.SetProperty("FileSystemBytesRead", (value)) +} + +// GetFileSystemBytesRead gets the value of FileSystemBytesRead for the instance +func (instance *Win32_PerfFormattedData_Counters_FileSystemDiskActivity) GetPropertyFileSystemBytesRead() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSystemBytesRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileSystemBytesWritten sets the value of FileSystemBytesWritten for the instance +func (instance *Win32_PerfFormattedData_Counters_FileSystemDiskActivity) SetPropertyFileSystemBytesWritten(value uint64) (err error) { + return instance.SetProperty("FileSystemBytesWritten", (value)) +} + +// GetFileSystemBytesWritten gets the value of FileSystemBytesWritten for the instance +func (instance *Win32_PerfFormattedData_Counters_FileSystemDiskActivity) GetPropertyFileSystemBytesWritten() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSystemBytesWritten") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2.go new file mode 100644 index 00000000..08284696 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2 struct +type Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2 struct { + *Win32_PerfFormattedData + + // + AuthIPMainModeNegotiationTime uint32 + + // + AuthIPQuickModeNegotiationTime uint32 + + // + ExtendedModeNegotiationTime uint32 + + // + FailedNegotiations uint32 + + // + FailedNegotiationsPersec uint32 + + // + IKEv1MainModeNegotiationTime uint32 + + // + IKEv1QuickModeNegotiationTime uint32 + + // + IKEv2MainModeNegotiationTime uint32 + + // + IKEv2QuickModeNegotiationTime uint32 + + // + InvalidPacketsReceivedPersec uint32 + + // + PacketsReceivedPersec uint32 + + // + SuccessfulNegotiations uint32 + + // + SuccessfulNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAuthIPMainModeNegotiationTime sets the value of AuthIPMainModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyAuthIPMainModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("AuthIPMainModeNegotiationTime", (value)) +} + +// GetAuthIPMainModeNegotiationTime gets the value of AuthIPMainModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyAuthIPMainModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthIPMainModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAuthIPQuickModeNegotiationTime sets the value of AuthIPQuickModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyAuthIPQuickModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("AuthIPQuickModeNegotiationTime", (value)) +} + +// GetAuthIPQuickModeNegotiationTime gets the value of AuthIPQuickModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyAuthIPQuickModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthIPQuickModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiationTime sets the value of ExtendedModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyExtendedModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiationTime", (value)) +} + +// GetExtendedModeNegotiationTime gets the value of ExtendedModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyExtendedModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedNegotiations sets the value of FailedNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyFailedNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedNegotiations", (value)) +} + +// GetFailedNegotiations gets the value of FailedNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyFailedNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedNegotiationsPersec sets the value of FailedNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyFailedNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedNegotiationsPersec", (value)) +} + +// GetFailedNegotiationsPersec gets the value of FailedNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyFailedNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv1MainModeNegotiationTime sets the value of IKEv1MainModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv1MainModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv1MainModeNegotiationTime", (value)) +} + +// GetIKEv1MainModeNegotiationTime gets the value of IKEv1MainModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv1MainModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv1MainModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv1QuickModeNegotiationTime sets the value of IKEv1QuickModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv1QuickModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv1QuickModeNegotiationTime", (value)) +} + +// GetIKEv1QuickModeNegotiationTime gets the value of IKEv1QuickModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv1QuickModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv1QuickModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv2MainModeNegotiationTime sets the value of IKEv2MainModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv2MainModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv2MainModeNegotiationTime", (value)) +} + +// GetIKEv2MainModeNegotiationTime gets the value of IKEv2MainModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv2MainModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv2MainModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv2QuickModeNegotiationTime sets the value of IKEv2QuickModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv2QuickModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv2QuickModeNegotiationTime", (value)) +} + +// GetIKEv2QuickModeNegotiationTime gets the value of IKEv2QuickModeNegotiationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv2QuickModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv2QuickModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInvalidPacketsReceivedPersec sets the value of InvalidPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyInvalidPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("InvalidPacketsReceivedPersec", (value)) +} + +// GetInvalidPacketsReceivedPersec gets the value of InvalidPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyInvalidPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InvalidPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulNegotiations sets the value of SuccessfulNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertySuccessfulNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulNegotiations", (value)) +} + +// GetSuccessfulNegotiations gets the value of SuccessfulNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertySuccessfulNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulNegotiationsPersec sets the value of SuccessfulNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertySuccessfulNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulNegotiationsPersec", (value)) +} + +// GetSuccessfulNegotiationsPersec gets the value of SuccessfulNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertySuccessfulNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPService.go new file mode 100644 index 00000000..f421bed2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPService.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HTTPService struct +type Win32_PerfFormattedData_Counters_HTTPService struct { + *Win32_PerfFormattedData + + // + CurrentUrisCached uint32 + + // + TotalFlushedUris uint32 + + // + TotalUrisCached uint32 + + // + UriCacheFlushes uint32 + + // + UriCacheHits uint32 + + // + UriCacheMisses uint32 +} + +func NewWin32_PerfFormattedData_Counters_HTTPServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HTTPService, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HTTPService{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HTTPServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HTTPService, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HTTPService{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCurrentUrisCached sets the value of CurrentUrisCached for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) SetPropertyCurrentUrisCached(value uint32) (err error) { + return instance.SetProperty("CurrentUrisCached", (value)) +} + +// GetCurrentUrisCached gets the value of CurrentUrisCached for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) GetPropertyCurrentUrisCached() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUrisCached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalFlushedUris sets the value of TotalFlushedUris for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) SetPropertyTotalFlushedUris(value uint32) (err error) { + return instance.SetProperty("TotalFlushedUris", (value)) +} + +// GetTotalFlushedUris gets the value of TotalFlushedUris for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) GetPropertyTotalFlushedUris() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalFlushedUris") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalUrisCached sets the value of TotalUrisCached for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) SetPropertyTotalUrisCached(value uint32) (err error) { + return instance.SetProperty("TotalUrisCached", (value)) +} + +// GetTotalUrisCached gets the value of TotalUrisCached for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) GetPropertyTotalUrisCached() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalUrisCached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUriCacheFlushes sets the value of UriCacheFlushes for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) SetPropertyUriCacheFlushes(value uint32) (err error) { + return instance.SetProperty("UriCacheFlushes", (value)) +} + +// GetUriCacheFlushes gets the value of UriCacheFlushes for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) GetPropertyUriCacheFlushes() (value uint32, err error) { + retValue, err := instance.GetProperty("UriCacheFlushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUriCacheHits sets the value of UriCacheHits for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) SetPropertyUriCacheHits(value uint32) (err error) { + return instance.SetProperty("UriCacheHits", (value)) +} + +// GetUriCacheHits gets the value of UriCacheHits for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) GetPropertyUriCacheHits() (value uint32, err error) { + retValue, err := instance.GetProperty("UriCacheHits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUriCacheMisses sets the value of UriCacheMisses for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) SetPropertyUriCacheMisses(value uint32) (err error) { + return instance.SetProperty("UriCacheMisses", (value)) +} + +// GetUriCacheMisses gets the value of UriCacheMisses for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPService) GetPropertyUriCacheMisses() (value uint32, err error) { + retValue, err := instance.GetProperty("UriCacheMisses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues.go new file mode 100644 index 00000000..dfc29be0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues struct +type Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues struct { + *Win32_PerfFormattedData + + // + ArrivalRate uint64 + + // + CacheHitRate uint64 + + // + CurrentQueueSize uint32 + + // + MaxQueueItemAge uint64 + + // + RejectedRequests uint64 + + // + RejectionRate uint64 +} + +func NewWin32_PerfFormattedData_Counters_HTTPServiceRequestQueuesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HTTPServiceRequestQueuesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetArrivalRate sets the value of ArrivalRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) SetPropertyArrivalRate(value uint64) (err error) { + return instance.SetProperty("ArrivalRate", (value)) +} + +// GetArrivalRate gets the value of ArrivalRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) GetPropertyArrivalRate() (value uint64, err error) { + retValue, err := instance.GetProperty("ArrivalRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitRate sets the value of CacheHitRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) SetPropertyCacheHitRate(value uint64) (err error) { + return instance.SetProperty("CacheHitRate", (value)) +} + +// GetCacheHitRate gets the value of CacheHitRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) GetPropertyCacheHitRate() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentQueueSize sets the value of CurrentQueueSize for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) SetPropertyCurrentQueueSize(value uint32) (err error) { + return instance.SetProperty("CurrentQueueSize", (value)) +} + +// GetCurrentQueueSize gets the value of CurrentQueueSize for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) GetPropertyCurrentQueueSize() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentQueueSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxQueueItemAge sets the value of MaxQueueItemAge for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) SetPropertyMaxQueueItemAge(value uint64) (err error) { + return instance.SetProperty("MaxQueueItemAge", (value)) +} + +// GetMaxQueueItemAge gets the value of MaxQueueItemAge for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) GetPropertyMaxQueueItemAge() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxQueueItemAge") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRejectedRequests sets the value of RejectedRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) SetPropertyRejectedRequests(value uint64) (err error) { + return instance.SetProperty("RejectedRequests", (value)) +} + +// GetRejectedRequests gets the value of RejectedRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) GetPropertyRejectedRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("RejectedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRejectionRate sets the value of RejectionRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) SetPropertyRejectionRate(value uint64) (err error) { + return instance.SetProperty("RejectionRate", (value)) +} + +// GetRejectionRate gets the value of RejectionRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceRequestQueues) GetPropertyRejectionRate() (value uint64, err error) { + retValue, err := instance.GetProperty("RejectionRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups.go new file mode 100644 index 00000000..a898f127 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups struct +type Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups struct { + *Win32_PerfFormattedData + + // + AllRequests uint32 + + // + BytesReceivedRate uint64 + + // + BytesSentRate uint64 + + // + BytesTransferredRate uint64 + + // + ConnectionAttempts uint32 + + // + CurrentConnections uint32 + + // + GetRequests uint32 + + // + HeadRequests uint32 + + // + MaxConnections uint32 +} + +func NewWin32_PerfFormattedData_Counters_HTTPServiceUrlGroupsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HTTPServiceUrlGroupsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAllRequests sets the value of AllRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyAllRequests(value uint32) (err error) { + return instance.SetProperty("AllRequests", (value)) +} + +// GetAllRequests gets the value of AllRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyAllRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("AllRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedRate sets the value of BytesReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyBytesReceivedRate(value uint64) (err error) { + return instance.SetProperty("BytesReceivedRate", (value)) +} + +// GetBytesReceivedRate gets the value of BytesReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyBytesReceivedRate() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentRate sets the value of BytesSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyBytesSentRate(value uint64) (err error) { + return instance.SetProperty("BytesSentRate", (value)) +} + +// GetBytesSentRate gets the value of BytesSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyBytesSentRate() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransferredRate sets the value of BytesTransferredRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyBytesTransferredRate(value uint64) (err error) { + return instance.SetProperty("BytesTransferredRate", (value)) +} + +// GetBytesTransferredRate gets the value of BytesTransferredRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyBytesTransferredRate() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransferredRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectionAttempts sets the value of ConnectionAttempts for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyConnectionAttempts(value uint32) (err error) { + return instance.SetProperty("ConnectionAttempts", (value)) +} + +// GetConnectionAttempts gets the value of ConnectionAttempts for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyConnectionAttempts() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionAttempts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentConnections sets the value of CurrentConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyCurrentConnections(value uint32) (err error) { + return instance.SetProperty("CurrentConnections", (value)) +} + +// GetCurrentConnections gets the value of CurrentConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyCurrentConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGetRequests sets the value of GetRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyGetRequests(value uint32) (err error) { + return instance.SetProperty("GetRequests", (value)) +} + +// GetGetRequests gets the value of GetRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyGetRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("GetRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHeadRequests sets the value of HeadRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyHeadRequests(value uint32) (err error) { + return instance.SetProperty("HeadRequests", (value)) +} + +// GetHeadRequests gets the value of HeadRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyHeadRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("HeadRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxConnections sets the value of MaxConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) SetPropertyMaxConnections(value uint32) (err error) { + return instance.SetProperty("MaxConnections", (value)) +} + +// GetMaxConnections gets the value of MaxConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_HTTPServiceUrlGroups) GetPropertyMaxConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService.go new file mode 100644 index 00000000..1f79324c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService struct +type Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService struct { + *Win32_PerfFormattedData + + // + MaximumMemoryMbytes uint64 +} + +func NewWin32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMaximumMemoryMbytes sets the value of MaximumMemoryMbytes for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService) SetPropertyMaximumMemoryMbytes(value uint64) (err error) { + return instance.SetProperty("MaximumMemoryMbytes", (value)) +} + +// GetMaximumMemoryMbytes gets the value of MaximumMemoryMbytes for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVDynamicMemoryIntegrationService) GetPropertyMaximumMemoryMbytes() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumMemoryMbytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus.go new file mode 100644 index 00000000..fa2a39e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus struct +type Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus struct { + *Win32_PerfFormattedData + + // + InterruptsReceivedPersec uint64 + + // + InterruptsSentPersec uint64 + + // + ThrottleEvents uint64 +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualMachineBusEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualMachineBusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetInterruptsReceivedPersec sets the value of InterruptsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus) SetPropertyInterruptsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("InterruptsReceivedPersec", (value)) +} + +// GetInterruptsReceivedPersec gets the value of InterruptsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus) GetPropertyInterruptsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsSentPersec sets the value of InterruptsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus) SetPropertyInterruptsSentPersec(value uint64) (err error) { + return instance.SetProperty("InterruptsSentPersec", (value)) +} + +// GetInterruptsSentPersec gets the value of InterruptsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus) GetPropertyInterruptsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThrottleEvents sets the value of ThrottleEvents for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus) SetPropertyThrottleEvents(value uint64) (err error) { + return instance.SetProperty("ThrottleEvents", (value)) +} + +// GetThrottleEvents gets the value of ThrottleEvents for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBus) GetPropertyThrottleEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("ThrottleEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes.go new file mode 100644 index 00000000..33dcb6c5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes struct +type Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes struct { + *Win32_PerfFormattedData + + // + BytesReadPersec uint64 + + // + BytesWrittenPersec uint64 + + // + ReadsPersec uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReadPersec sets the value of BytesReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) SetPropertyBytesReadPersec(value uint64) (err error) { + return instance.SetProperty("BytesReadPersec", (value)) +} + +// GetBytesReadPersec gets the value of BytesReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) GetPropertyBytesReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesWrittenPersec sets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) SetPropertyBytesWrittenPersec(value uint64) (err error) { + return instance.SetProperty("BytesWrittenPersec", (value)) +} + +// GetBytesWrittenPersec gets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) GetPropertyBytesWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusPipes) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes.go new file mode 100644 index 00000000..8c882d1b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes struct +type Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes struct { + *Win32_PerfFormattedData + + // + BytesReadPersec uint64 + + // + BytesWrittenPersec uint64 + + // + ReadsPersec uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReadPersec sets the value of BytesReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyBytesReadPersec(value uint64) (err error) { + return instance.SetProperty("BytesReadPersec", (value)) +} + +// GetBytesReadPersec gets the value of BytesReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyBytesReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesWrittenPersec sets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyBytesWrittenPersec(value uint64) (err error) { + return instance.SetProperty("BytesWrittenPersec", (value)) +} + +// GetBytesWrittenPersec gets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyBytesWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice.go new file mode 100644 index 00000000..90744769 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice struct +type Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice struct { + *Win32_PerfFormattedData + + // + AdapterOpenChannelCount uint32 + + // + ByteQuotaReplenishmentRate uint64 + + // + ErrorCount uint32 + + // + FlushCount uint32 + + // + IoQuotaReplenishmentRate uint64 + + // + Latency uint32 + + // + LowerLatency uint32 + + // + LowerQueueLength uint64 + + // + MaximumAdapterWorkerCount uint32 + + // + MaximumBandwidth uint64 + + // + MaximumIORate uint64 + + // + MinimumIORate uint64 + + // + NormalizedThroughput uint64 + + // + QueueLength uint64 + + // + ReadBytesPersec uint64 + + // + ReadCount uint32 + + // + ReadOperationsPerSec uint32 + + // + Throughput uint32 + + // + WriteBytesPersec uint64 + + // + WriteCount uint32 + + // + WriteOperationsPerSec uint32 +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualStorageDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_HyperVVirtualStorageDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAdapterOpenChannelCount sets the value of AdapterOpenChannelCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyAdapterOpenChannelCount(value uint32) (err error) { + return instance.SetProperty("AdapterOpenChannelCount", (value)) +} + +// GetAdapterOpenChannelCount gets the value of AdapterOpenChannelCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyAdapterOpenChannelCount() (value uint32, err error) { + retValue, err := instance.GetProperty("AdapterOpenChannelCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetByteQuotaReplenishmentRate sets the value of ByteQuotaReplenishmentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyByteQuotaReplenishmentRate(value uint64) (err error) { + return instance.SetProperty("ByteQuotaReplenishmentRate", (value)) +} + +// GetByteQuotaReplenishmentRate gets the value of ByteQuotaReplenishmentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyByteQuotaReplenishmentRate() (value uint64, err error) { + retValue, err := instance.GetProperty("ByteQuotaReplenishmentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorCount sets the value of ErrorCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyErrorCount(value uint32) (err error) { + return instance.SetProperty("ErrorCount", (value)) +} + +// GetErrorCount gets the value of ErrorCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyErrorCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushCount sets the value of FlushCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyFlushCount(value uint32) (err error) { + return instance.SetProperty("FlushCount", (value)) +} + +// GetFlushCount gets the value of FlushCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyFlushCount() (value uint32, err error) { + retValue, err := instance.GetProperty("FlushCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIoQuotaReplenishmentRate sets the value of IoQuotaReplenishmentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyIoQuotaReplenishmentRate(value uint64) (err error) { + return instance.SetProperty("IoQuotaReplenishmentRate", (value)) +} + +// GetIoQuotaReplenishmentRate gets the value of IoQuotaReplenishmentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyIoQuotaReplenishmentRate() (value uint64, err error) { + retValue, err := instance.GetProperty("IoQuotaReplenishmentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLatency sets the value of Latency for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyLatency(value uint32) (err error) { + return instance.SetProperty("Latency", (value)) +} + +// GetLatency gets the value of Latency for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("Latency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowerLatency sets the value of LowerLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyLowerLatency(value uint32) (err error) { + return instance.SetProperty("LowerLatency", (value)) +} + +// GetLowerLatency gets the value of LowerLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyLowerLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("LowerLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowerQueueLength sets the value of LowerQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyLowerQueueLength(value uint64) (err error) { + return instance.SetProperty("LowerQueueLength", (value)) +} + +// GetLowerQueueLength gets the value of LowerQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyLowerQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LowerQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumAdapterWorkerCount sets the value of MaximumAdapterWorkerCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyMaximumAdapterWorkerCount(value uint32) (err error) { + return instance.SetProperty("MaximumAdapterWorkerCount", (value)) +} + +// GetMaximumAdapterWorkerCount gets the value of MaximumAdapterWorkerCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyMaximumAdapterWorkerCount() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumAdapterWorkerCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumBandwidth sets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyMaximumBandwidth(value uint64) (err error) { + return instance.SetProperty("MaximumBandwidth", (value)) +} + +// GetMaximumBandwidth gets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyMaximumBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumIORate sets the value of MaximumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyMaximumIORate(value uint64) (err error) { + return instance.SetProperty("MaximumIORate", (value)) +} + +// GetMaximumIORate gets the value of MaximumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyMaximumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMinimumIORate sets the value of MinimumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyMinimumIORate(value uint64) (err error) { + return instance.SetProperty("MinimumIORate", (value)) +} + +// GetMinimumIORate gets the value of MinimumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyMinimumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("MinimumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedThroughput sets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyNormalizedThroughput(value uint64) (err error) { + return instance.SetProperty("NormalizedThroughput", (value)) +} + +// GetNormalizedThroughput gets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyNormalizedThroughput() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedThroughput") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetQueueLength sets the value of QueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyQueueLength(value uint64) (err error) { + return instance.SetProperty("QueueLength", (value)) +} + +// GetQueueLength gets the value of QueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCount sets the value of ReadCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyReadCount(value uint32) (err error) { + return instance.SetProperty("ReadCount", (value)) +} + +// GetReadCount gets the value of ReadCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyReadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadOperationsPerSec sets the value of ReadOperationsPerSec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyReadOperationsPerSec(value uint32) (err error) { + return instance.SetProperty("ReadOperationsPerSec", (value)) +} + +// GetReadOperationsPerSec gets the value of ReadOperationsPerSec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyReadOperationsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadOperationsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThroughput sets the value of Throughput for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyThroughput(value uint32) (err error) { + return instance.SetProperty("Throughput", (value)) +} + +// GetThroughput gets the value of Throughput for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyThroughput() (value uint32, err error) { + retValue, err := instance.GetProperty("Throughput") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCount sets the value of WriteCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyWriteCount(value uint32) (err error) { + return instance.SetProperty("WriteCount", (value)) +} + +// GetWriteCount gets the value of WriteCount for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyWriteCount() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteOperationsPerSec sets the value of WriteOperationsPerSec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) SetPropertyWriteOperationsPerSec(value uint32) (err error) { + return instance.SetProperty("WriteOperationsPerSec", (value)) +} + +// GetWriteOperationsPerSec gets the value of WriteOperationsPerSec for the instance +func (instance *Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice) GetPropertyWriteOperationsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteOperationsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSGlobal.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSGlobal.go new file mode 100644 index 00000000..e88bc7e2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSGlobal.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPHTTPSGlobal struct +type Win32_PerfFormattedData_Counters_IPHTTPSGlobal struct { + *Win32_PerfFormattedData + + // + DropsNeighborresolutiontimeouts uint64 + + // + ErrorsAuthenticationErrors uint64 + + // + ErrorsReceiveerrorsontheserver uint64 + + // + ErrorsTransmiterrorsontheserver uint64 + + // + InTotalbytesreceived uint64 + + // + InTotalpacketsreceived uint64 + + // + OutTotalbytesforwarded uint64 + + // + OutTotalbytessent uint64 + + // + OutTotalpacketssent uint64 + + // + SessionsTotalsessions uint64 +} + +func NewWin32_PerfFormattedData_Counters_IPHTTPSGlobalEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPHTTPSGlobal{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPHTTPSGlobalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPHTTPSGlobal{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDropsNeighborresolutiontimeouts sets the value of DropsNeighborresolutiontimeouts for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyDropsNeighborresolutiontimeouts(value uint64) (err error) { + return instance.SetProperty("DropsNeighborresolutiontimeouts", (value)) +} + +// GetDropsNeighborresolutiontimeouts gets the value of DropsNeighborresolutiontimeouts for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyDropsNeighborresolutiontimeouts() (value uint64, err error) { + retValue, err := instance.GetProperty("DropsNeighborresolutiontimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsAuthenticationErrors sets the value of ErrorsAuthenticationErrors for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyErrorsAuthenticationErrors(value uint64) (err error) { + return instance.SetProperty("ErrorsAuthenticationErrors", (value)) +} + +// GetErrorsAuthenticationErrors gets the value of ErrorsAuthenticationErrors for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyErrorsAuthenticationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsAuthenticationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsReceiveerrorsontheserver sets the value of ErrorsReceiveerrorsontheserver for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyErrorsReceiveerrorsontheserver(value uint64) (err error) { + return instance.SetProperty("ErrorsReceiveerrorsontheserver", (value)) +} + +// GetErrorsReceiveerrorsontheserver gets the value of ErrorsReceiveerrorsontheserver for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyErrorsReceiveerrorsontheserver() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsReceiveerrorsontheserver") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsTransmiterrorsontheserver sets the value of ErrorsTransmiterrorsontheserver for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyErrorsTransmiterrorsontheserver(value uint64) (err error) { + return instance.SetProperty("ErrorsTransmiterrorsontheserver", (value)) +} + +// GetErrorsTransmiterrorsontheserver gets the value of ErrorsTransmiterrorsontheserver for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyErrorsTransmiterrorsontheserver() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsTransmiterrorsontheserver") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTotalbytesreceived sets the value of InTotalbytesreceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyInTotalbytesreceived(value uint64) (err error) { + return instance.SetProperty("InTotalbytesreceived", (value)) +} + +// GetInTotalbytesreceived gets the value of InTotalbytesreceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyInTotalbytesreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("InTotalbytesreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTotalpacketsreceived sets the value of InTotalpacketsreceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyInTotalpacketsreceived(value uint64) (err error) { + return instance.SetProperty("InTotalpacketsreceived", (value)) +} + +// GetInTotalpacketsreceived gets the value of InTotalpacketsreceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyInTotalpacketsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("InTotalpacketsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTotalbytesforwarded sets the value of OutTotalbytesforwarded for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyOutTotalbytesforwarded(value uint64) (err error) { + return instance.SetProperty("OutTotalbytesforwarded", (value)) +} + +// GetOutTotalbytesforwarded gets the value of OutTotalbytesforwarded for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyOutTotalbytesforwarded() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTotalbytesforwarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTotalbytessent sets the value of OutTotalbytessent for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyOutTotalbytessent(value uint64) (err error) { + return instance.SetProperty("OutTotalbytessent", (value)) +} + +// GetOutTotalbytessent gets the value of OutTotalbytessent for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyOutTotalbytessent() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTotalbytessent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTotalpacketssent sets the value of OutTotalpacketssent for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertyOutTotalpacketssent(value uint64) (err error) { + return instance.SetProperty("OutTotalpacketssent", (value)) +} + +// GetOutTotalpacketssent gets the value of OutTotalpacketssent for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertyOutTotalpacketssent() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTotalpacketssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSessionsTotalsessions sets the value of SessionsTotalsessions for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) SetPropertySessionsTotalsessions(value uint64) (err error) { + return instance.SetProperty("SessionsTotalsessions", (value)) +} + +// GetSessionsTotalsessions gets the value of SessionsTotalsessions for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSGlobal) GetPropertySessionsTotalsessions() (value uint64, err error) { + retValue, err := instance.GetProperty("SessionsTotalsessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSSession.go new file mode 100644 index 00000000..d32cce70 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPHTTPSSession.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPHTTPSSession struct +type Win32_PerfFormattedData_Counters_IPHTTPSSession struct { + *Win32_PerfFormattedData + + // + Bytesreceivedonthissession uint64 + + // + Bytessentonthissession uint64 + + // + DurationDurationofthesessionSeconds uint64 + + // + ErrorsReceiveerrorsonthissession uint64 + + // + ErrorsTransmiterrorsonthissession uint64 + + // + Packetsreceivedonthissession uint64 + + // + Packetssentonthissession uint64 +} + +func NewWin32_PerfFormattedData_Counters_IPHTTPSSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPHTTPSSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPHTTPSSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPHTTPSSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPHTTPSSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPHTTPSSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesreceivedonthissession sets the value of Bytesreceivedonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyBytesreceivedonthissession(value uint64) (err error) { + return instance.SetProperty("Bytesreceivedonthissession", (value)) +} + +// GetBytesreceivedonthissession gets the value of Bytesreceivedonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyBytesreceivedonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytesreceivedonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytessentonthissession sets the value of Bytessentonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyBytessentonthissession(value uint64) (err error) { + return instance.SetProperty("Bytessentonthissession", (value)) +} + +// GetBytessentonthissession gets the value of Bytessentonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyBytessentonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytessentonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDurationDurationofthesessionSeconds sets the value of DurationDurationofthesessionSeconds for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyDurationDurationofthesessionSeconds(value uint64) (err error) { + return instance.SetProperty("DurationDurationofthesessionSeconds", (value)) +} + +// GetDurationDurationofthesessionSeconds gets the value of DurationDurationofthesessionSeconds for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyDurationDurationofthesessionSeconds() (value uint64, err error) { + retValue, err := instance.GetProperty("DurationDurationofthesessionSeconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsReceiveerrorsonthissession sets the value of ErrorsReceiveerrorsonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyErrorsReceiveerrorsonthissession(value uint64) (err error) { + return instance.SetProperty("ErrorsReceiveerrorsonthissession", (value)) +} + +// GetErrorsReceiveerrorsonthissession gets the value of ErrorsReceiveerrorsonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyErrorsReceiveerrorsonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsReceiveerrorsonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsTransmiterrorsonthissession sets the value of ErrorsTransmiterrorsonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyErrorsTransmiterrorsonthissession(value uint64) (err error) { + return instance.SetProperty("ErrorsTransmiterrorsonthissession", (value)) +} + +// GetErrorsTransmiterrorsonthissession gets the value of ErrorsTransmiterrorsonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyErrorsTransmiterrorsonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsTransmiterrorsonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsreceivedonthissession sets the value of Packetsreceivedonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyPacketsreceivedonthissession(value uint64) (err error) { + return instance.SetProperty("Packetsreceivedonthissession", (value)) +} + +// GetPacketsreceivedonthissession gets the value of Packetsreceivedonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyPacketsreceivedonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsreceivedonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketssentonthissession sets the value of Packetssentonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) SetPropertyPacketssentonthissession(value uint64) (err error) { + return instance.SetProperty("Packetssentonthissession", (value)) +} + +// GetPacketssentonthissession gets the value of Packetssentonthissession for the instance +func (instance *Win32_PerfFormattedData_Counters_IPHTTPSSession) GetPropertyPacketssentonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetssentonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4.go new file mode 100644 index 00000000..9871896d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4 struct +type Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4 struct { + *Win32_PerfFormattedData + + // + ActiveExtendedModeSAs uint32 + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + ExtendedModeNegotiations uint32 + + // + ExtendedModeNegotiationsPersec uint32 + + // + ExtendedModeSAsThatUsedImpersonation uint32 + + // + FailedExtendedModeNegotiations uint32 + + // + FailedExtendedModeNegotiationsPersec uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + MainModeSAsThatUsedImpersonation uint32 + + // + MainModeSAsThatUsedImpersonationPersec uint32 + + // + PendingExtendedModeNegotiations uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulExtendedModeNegotiations uint32 + + // + SuccessfulExtendedModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecAuthIPIPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecAuthIPIPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveExtendedModeSAs sets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyActiveExtendedModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveExtendedModeSAs", (value)) +} + +// GetActiveExtendedModeSAs gets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyActiveExtendedModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveExtendedModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiations sets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiations", (value)) +} + +// GetExtendedModeNegotiations gets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiationsPersec sets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiationsPersec", (value)) +} + +// GetExtendedModeNegotiationsPersec gets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeSAsThatUsedImpersonation sets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyExtendedModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("ExtendedModeSAsThatUsedImpersonation", (value)) +} + +// GetExtendedModeSAsThatUsedImpersonation gets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyExtendedModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiations sets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyFailedExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiations", (value)) +} + +// GetFailedExtendedModeNegotiations gets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyFailedExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiationsPersec sets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyFailedExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiationsPersec", (value)) +} + +// GetFailedExtendedModeNegotiationsPersec gets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyFailedExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonation sets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonation", (value)) +} + +// GetMainModeSAsThatUsedImpersonation gets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonationPersec sets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeSAsThatUsedImpersonationPersec(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonationPersec", (value)) +} + +// GetMainModeSAsThatUsedImpersonationPersec gets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeSAsThatUsedImpersonationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingExtendedModeNegotiations sets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyPendingExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingExtendedModeNegotiations", (value)) +} + +// GetPendingExtendedModeNegotiations gets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyPendingExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiations sets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiations", (value)) +} + +// GetSuccessfulExtendedModeNegotiations gets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiationsPersec sets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiationsPersec", (value)) +} + +// GetSuccessfulExtendedModeNegotiationsPersec gets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6.go new file mode 100644 index 00000000..bdb490ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6 struct +type Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6 struct { + *Win32_PerfFormattedData + + // + ActiveExtendedModeSAs uint32 + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + ExtendedModeNegotiations uint32 + + // + ExtendedModeNegotiationsPersec uint32 + + // + ExtendedModeSAsThatUsedImpersonation uint32 + + // + FailedExtendedModeNegotiations uint32 + + // + FailedExtendedModeNegotiationsPersec uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + MainModeSAsThatUsedImpersonation uint32 + + // + MainModeSAsThatUsedImpersonationPersec uint32 + + // + PendingExtendedModeNegotiations uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulExtendedModeNegotiations uint32 + + // + SuccessfulExtendedModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecAuthIPIPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecAuthIPIPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveExtendedModeSAs sets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyActiveExtendedModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveExtendedModeSAs", (value)) +} + +// GetActiveExtendedModeSAs gets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyActiveExtendedModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveExtendedModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiations sets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiations", (value)) +} + +// GetExtendedModeNegotiations gets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiationsPersec sets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiationsPersec", (value)) +} + +// GetExtendedModeNegotiationsPersec gets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeSAsThatUsedImpersonation sets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyExtendedModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("ExtendedModeSAsThatUsedImpersonation", (value)) +} + +// GetExtendedModeSAsThatUsedImpersonation gets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyExtendedModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiations sets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyFailedExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiations", (value)) +} + +// GetFailedExtendedModeNegotiations gets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyFailedExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiationsPersec sets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyFailedExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiationsPersec", (value)) +} + +// GetFailedExtendedModeNegotiationsPersec gets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyFailedExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonation sets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonation", (value)) +} + +// GetMainModeSAsThatUsedImpersonation gets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonationPersec sets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeSAsThatUsedImpersonationPersec(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonationPersec", (value)) +} + +// GetMainModeSAsThatUsedImpersonationPersec gets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeSAsThatUsedImpersonationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingExtendedModeNegotiations sets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyPendingExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingExtendedModeNegotiations", (value)) +} + +// GetPendingExtendedModeNegotiations gets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyPendingExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiations sets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiations", (value)) +} + +// GetSuccessfulExtendedModeNegotiations gets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiationsPersec sets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiationsPersec", (value)) +} + +// GetSuccessfulExtendedModeNegotiationsPersec gets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecConnections.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecConnections.go new file mode 100644 index 00000000..40242e90 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecConnections.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecConnections struct +type Win32_PerfFormattedData_Counters_IPsecConnections struct { + *Win32_PerfFormattedData + + // + Maxnumberofconnectionssinceboot uint32 + + // + Numberoffailedauthentications uint64 + + // + TotalBytesInsincestart uint64 + + // + TotalBytesOutsincestart uint64 + + // + TotalNumbercurrentConnections uint32 + + // + Totalnumberofcumulativeconnectionssinceboot uint64 +} + +func NewWin32_PerfFormattedData_Counters_IPsecConnectionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecConnections, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecConnections{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecConnectionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecConnections, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecConnections{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMaxnumberofconnectionssinceboot sets the value of Maxnumberofconnectionssinceboot for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) SetPropertyMaxnumberofconnectionssinceboot(value uint32) (err error) { + return instance.SetProperty("Maxnumberofconnectionssinceboot", (value)) +} + +// GetMaxnumberofconnectionssinceboot gets the value of Maxnumberofconnectionssinceboot for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) GetPropertyMaxnumberofconnectionssinceboot() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxnumberofconnectionssinceboot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoffailedauthentications sets the value of Numberoffailedauthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) SetPropertyNumberoffailedauthentications(value uint64) (err error) { + return instance.SetProperty("Numberoffailedauthentications", (value)) +} + +// GetNumberoffailedauthentications gets the value of Numberoffailedauthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) GetPropertyNumberoffailedauthentications() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberoffailedauthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBytesInsincestart sets the value of TotalBytesInsincestart for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) SetPropertyTotalBytesInsincestart(value uint64) (err error) { + return instance.SetProperty("TotalBytesInsincestart", (value)) +} + +// GetTotalBytesInsincestart gets the value of TotalBytesInsincestart for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) GetPropertyTotalBytesInsincestart() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesInsincestart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBytesOutsincestart sets the value of TotalBytesOutsincestart for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) SetPropertyTotalBytesOutsincestart(value uint64) (err error) { + return instance.SetProperty("TotalBytesOutsincestart", (value)) +} + +// GetTotalBytesOutsincestart gets the value of TotalBytesOutsincestart for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) GetPropertyTotalBytesOutsincestart() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesOutsincestart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalNumbercurrentConnections sets the value of TotalNumbercurrentConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) SetPropertyTotalNumbercurrentConnections(value uint32) (err error) { + return instance.SetProperty("TotalNumbercurrentConnections", (value)) +} + +// GetTotalNumbercurrentConnections gets the value of TotalNumbercurrentConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) GetPropertyTotalNumbercurrentConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumbercurrentConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalnumberofcumulativeconnectionssinceboot sets the value of Totalnumberofcumulativeconnectionssinceboot for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) SetPropertyTotalnumberofcumulativeconnectionssinceboot(value uint64) (err error) { + return instance.SetProperty("Totalnumberofcumulativeconnectionssinceboot", (value)) +} + +// GetTotalnumberofcumulativeconnectionssinceboot gets the value of Totalnumberofcumulativeconnectionssinceboot for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecConnections) GetPropertyTotalnumberofcumulativeconnectionssinceboot() (value uint64, err error) { + retValue, err := instance.GetProperty("Totalnumberofcumulativeconnectionssinceboot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDoSProtection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDoSProtection.go new file mode 100644 index 00000000..e4a231bb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDoSProtection.go @@ -0,0 +1,1130 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecDoSProtection struct +type Win32_PerfFormattedData_Counters_IPsecDoSProtection struct { + *Win32_PerfFormattedData + + // + CurrentStateEntries uint64 + + // + InboundAllowedDefaultBlockExemptPackets uint64 + + // + InboundAllowedDefaultBlockExemptPacketsPersec uint32 + + // + InboundAllowedFilterExemptIPv6Packets uint64 + + // + InboundAllowedFilterExemptIPv6PacketsPersec uint32 + + // + InboundAllowedICMPv6Packets uint64 + + // + InboundAllowedICMPv6PacketsPersec uint32 + + // + InboundAllowedIPv6IPsecAuthenticatedPackets uint64 + + // + InboundAllowedIPv6IPsecAuthenticatedPacketsPersec uint32 + + // + InboundAllowedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + InboundDiscardedDefaultBlockPackets uint64 + + // + InboundDiscardedDefaultBlockPacketsPersec uint32 + + // + InboundDiscardedFilterBlockIPv6Packets uint64 + + // + InboundDiscardedFilterBlockIPv6PacketsPersec uint32 + + // + InboundDiscardedPackets uint64 + + // + InboundDiscardedPacketsPersec uint32 + + // + InboundOtherDiscardedIPv6IPsecAuthenticatedPackets uint64 + + // + InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec uint32 + + // + InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + InboundRateLimitDiscardedDefaultBlockExemptPackets uint64 + + // + InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec uint32 + + // + InboundRateLimitDiscardedFilterExemptIPv6Packets uint64 + + // + InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec uint32 + + // + InboundRateLimitDiscardedICMPv6Packets uint64 + + // + InboundRateLimitDiscardedICMPv6PacketsPersec uint32 + + // + InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets uint64 + + // + InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec uint32 + + // + InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + PerIPRateLimitQueues uint64 + + // + StateEntries uint64 + + // + StateEntriesPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecDoSProtectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecDoSProtection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecDoSProtection{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecDoSProtectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecDoSProtection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecDoSProtection{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCurrentStateEntries sets the value of CurrentStateEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyCurrentStateEntries(value uint64) (err error) { + return instance.SetProperty("CurrentStateEntries", (value)) +} + +// GetCurrentStateEntries gets the value of CurrentStateEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyCurrentStateEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentStateEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedDefaultBlockExemptPackets sets the value of InboundAllowedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedDefaultBlockExemptPackets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedDefaultBlockExemptPackets", (value)) +} + +// GetInboundAllowedDefaultBlockExemptPackets gets the value of InboundAllowedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedDefaultBlockExemptPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedDefaultBlockExemptPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedDefaultBlockExemptPacketsPersec sets the value of InboundAllowedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedDefaultBlockExemptPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedDefaultBlockExemptPacketsPersec", (value)) +} + +// GetInboundAllowedDefaultBlockExemptPacketsPersec gets the value of InboundAllowedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedDefaultBlockExemptPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedDefaultBlockExemptPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedFilterExemptIPv6Packets sets the value of InboundAllowedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedFilterExemptIPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedFilterExemptIPv6Packets", (value)) +} + +// GetInboundAllowedFilterExemptIPv6Packets gets the value of InboundAllowedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedFilterExemptIPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedFilterExemptIPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedFilterExemptIPv6PacketsPersec sets the value of InboundAllowedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedFilterExemptIPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedFilterExemptIPv6PacketsPersec", (value)) +} + +// GetInboundAllowedFilterExemptIPv6PacketsPersec gets the value of InboundAllowedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedFilterExemptIPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedFilterExemptIPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedICMPv6Packets sets the value of InboundAllowedICMPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedICMPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedICMPv6Packets", (value)) +} + +// GetInboundAllowedICMPv6Packets gets the value of InboundAllowedICMPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedICMPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedICMPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedICMPv6PacketsPersec sets the value of InboundAllowedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedICMPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedICMPv6PacketsPersec", (value)) +} + +// GetInboundAllowedICMPv6PacketsPersec gets the value of InboundAllowedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedICMPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedICMPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecAuthenticatedPackets sets the value of InboundAllowedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecAuthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecAuthenticatedPackets", (value)) +} + +// GetInboundAllowedIPv6IPsecAuthenticatedPackets gets the value of InboundAllowedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecAuthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecAuthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecAuthenticatedPacketsPersec sets the value of InboundAllowedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecAuthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecAuthenticatedPacketsPersec", (value)) +} + +// GetInboundAllowedIPv6IPsecAuthenticatedPacketsPersec gets the value of InboundAllowedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecAuthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecAuthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecUnauthenticatedPackets sets the value of InboundAllowedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundAllowedIPv6IPsecUnauthenticatedPackets gets the value of InboundAllowedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundDiscardedDefaultBlockPackets sets the value of InboundDiscardedDefaultBlockPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedDefaultBlockPackets(value uint64) (err error) { + return instance.SetProperty("InboundDiscardedDefaultBlockPackets", (value)) +} + +// GetInboundDiscardedDefaultBlockPackets gets the value of InboundDiscardedDefaultBlockPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedDefaultBlockPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundDiscardedDefaultBlockPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundDiscardedDefaultBlockPacketsPersec sets the value of InboundDiscardedDefaultBlockPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedDefaultBlockPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundDiscardedDefaultBlockPacketsPersec", (value)) +} + +// GetInboundDiscardedDefaultBlockPacketsPersec gets the value of InboundDiscardedDefaultBlockPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedDefaultBlockPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundDiscardedDefaultBlockPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundDiscardedFilterBlockIPv6Packets sets the value of InboundDiscardedFilterBlockIPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedFilterBlockIPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundDiscardedFilterBlockIPv6Packets", (value)) +} + +// GetInboundDiscardedFilterBlockIPv6Packets gets the value of InboundDiscardedFilterBlockIPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedFilterBlockIPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundDiscardedFilterBlockIPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundDiscardedFilterBlockIPv6PacketsPersec sets the value of InboundDiscardedFilterBlockIPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedFilterBlockIPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundDiscardedFilterBlockIPv6PacketsPersec", (value)) +} + +// GetInboundDiscardedFilterBlockIPv6PacketsPersec gets the value of InboundDiscardedFilterBlockIPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedFilterBlockIPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundDiscardedFilterBlockIPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundDiscardedPackets sets the value of InboundDiscardedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedPackets(value uint64) (err error) { + return instance.SetProperty("InboundDiscardedPackets", (value)) +} + +// GetInboundDiscardedPackets gets the value of InboundDiscardedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundDiscardedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundDiscardedPacketsPersec sets the value of InboundDiscardedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundDiscardedPacketsPersec", (value)) +} + +// GetInboundDiscardedPacketsPersec gets the value of InboundDiscardedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundDiscardedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecAuthenticatedPackets sets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPackets", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecAuthenticatedPackets gets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec sets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec gets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets sets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets gets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets sets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets gets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedDefaultBlockExemptPackets sets the value of InboundRateLimitDiscardedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedDefaultBlockExemptPackets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedDefaultBlockExemptPackets", (value)) +} + +// GetInboundRateLimitDiscardedDefaultBlockExemptPackets gets the value of InboundRateLimitDiscardedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedDefaultBlockExemptPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedDefaultBlockExemptPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec sets the value of InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec gets the value of InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedFilterExemptIPv6Packets sets the value of InboundRateLimitDiscardedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedFilterExemptIPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedFilterExemptIPv6Packets", (value)) +} + +// GetInboundRateLimitDiscardedFilterExemptIPv6Packets gets the value of InboundRateLimitDiscardedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedFilterExemptIPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedFilterExemptIPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec sets the value of InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec gets the value of InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedICMPv6Packets sets the value of InboundRateLimitDiscardedICMPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedICMPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedICMPv6Packets", (value)) +} + +// GetInboundRateLimitDiscardedICMPv6Packets gets the value of InboundRateLimitDiscardedICMPv6Packets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedICMPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedICMPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedICMPv6PacketsPersec sets the value of InboundRateLimitDiscardedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedICMPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedICMPv6PacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedICMPv6PacketsPersec gets the value of InboundRateLimitDiscardedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedICMPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedICMPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets sets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets gets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec sets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec gets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets sets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets gets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPerIPRateLimitQueues sets the value of PerIPRateLimitQueues for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyPerIPRateLimitQueues(value uint64) (err error) { + return instance.SetProperty("PerIPRateLimitQueues", (value)) +} + +// GetPerIPRateLimitQueues gets the value of PerIPRateLimitQueues for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyPerIPRateLimitQueues() (value uint64, err error) { + retValue, err := instance.GetProperty("PerIPRateLimitQueues") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStateEntries sets the value of StateEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyStateEntries(value uint64) (err error) { + return instance.SetProperty("StateEntries", (value)) +} + +// GetStateEntries gets the value of StateEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyStateEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("StateEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStateEntriesPersec sets the value of StateEntriesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) SetPropertyStateEntriesPersec(value uint32) (err error) { + return instance.SetProperty("StateEntriesPersec", (value)) +} + +// GetStateEntriesPersec gets the value of StateEntriesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDoSProtection) GetPropertyStateEntriesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StateEntriesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDriver.go new file mode 100644 index 00000000..8588d229 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecDriver.go @@ -0,0 +1,980 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecDriver struct +type Win32_PerfFormattedData_Counters_IPsecDriver struct { + *Win32_PerfFormattedData + + // + ActiveSecurityAssociations uint32 + + // + BytesReceivedinTransportModePersec uint32 + + // + BytesReceivedinTunnelModePersec uint32 + + // + BytesSentinTransportModePersec uint32 + + // + BytesSentinTunnelModePersec uint32 + + // + InboundPacketsDroppedPersec uint32 + + // + InboundPacketsReceivedPersec uint32 + + // + IncorrectSPIPackets uint32 + + // + IncorrectSPIPacketsPersec uint32 + + // + OffloadedBytesReceivedPersec uint32 + + // + OffloadedBytesSentPersec uint32 + + // + OffloadedSecurityAssociations uint32 + + // + PacketsNotAuthenticated uint32 + + // + PacketsNotAuthenticatedPersec uint32 + + // + PacketsNotDecrypted uint32 + + // + PacketsNotDecryptedPersec uint32 + + // + PacketsReceivedOverWrongSA uint32 + + // + PacketsReceivedOverWrongSAPersec uint32 + + // + PacketsThatFailedESPValidation uint32 + + // + PacketsThatFailedESPValidationPersec uint32 + + // + PacketsThatFailedReplayDetection uint32 + + // + PacketsThatFailedReplayDetectionPersec uint32 + + // + PacketsThatFailedUDPESPValidation uint32 + + // + PacketsThatFailedUDPESPValidationPersec uint32 + + // + PendingSecurityAssociations uint32 + + // + PlaintextPacketsReceived uint32 + + // + PlaintextPacketsReceivedPersec uint32 + + // + SARekeys uint32 + + // + SecurityAssociationsAdded uint32 + + // + TotalInboundPacketsDropped uint32 + + // + TotalInboundPacketsReceived uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecDriver, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecDriver{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecDriver, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecDriver{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveSecurityAssociations sets the value of ActiveSecurityAssociations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyActiveSecurityAssociations(value uint32) (err error) { + return instance.SetProperty("ActiveSecurityAssociations", (value)) +} + +// GetActiveSecurityAssociations gets the value of ActiveSecurityAssociations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyActiveSecurityAssociations() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSecurityAssociations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedinTransportModePersec sets the value of BytesReceivedinTransportModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyBytesReceivedinTransportModePersec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedinTransportModePersec", (value)) +} + +// GetBytesReceivedinTransportModePersec gets the value of BytesReceivedinTransportModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyBytesReceivedinTransportModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedinTransportModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedinTunnelModePersec sets the value of BytesReceivedinTunnelModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyBytesReceivedinTunnelModePersec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedinTunnelModePersec", (value)) +} + +// GetBytesReceivedinTunnelModePersec gets the value of BytesReceivedinTunnelModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyBytesReceivedinTunnelModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedinTunnelModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesSentinTransportModePersec sets the value of BytesSentinTransportModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyBytesSentinTransportModePersec(value uint32) (err error) { + return instance.SetProperty("BytesSentinTransportModePersec", (value)) +} + +// GetBytesSentinTransportModePersec gets the value of BytesSentinTransportModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyBytesSentinTransportModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesSentinTransportModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesSentinTunnelModePersec sets the value of BytesSentinTunnelModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyBytesSentinTunnelModePersec(value uint32) (err error) { + return instance.SetProperty("BytesSentinTunnelModePersec", (value)) +} + +// GetBytesSentinTunnelModePersec gets the value of BytesSentinTunnelModePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyBytesSentinTunnelModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesSentinTunnelModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsDroppedPersec sets the value of InboundPacketsDroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyInboundPacketsDroppedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsDroppedPersec", (value)) +} + +// GetInboundPacketsDroppedPersec gets the value of InboundPacketsDroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyInboundPacketsDroppedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsDroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsReceivedPersec sets the value of InboundPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyInboundPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsReceivedPersec", (value)) +} + +// GetInboundPacketsReceivedPersec gets the value of InboundPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyInboundPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncorrectSPIPackets sets the value of IncorrectSPIPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyIncorrectSPIPackets(value uint32) (err error) { + return instance.SetProperty("IncorrectSPIPackets", (value)) +} + +// GetIncorrectSPIPackets gets the value of IncorrectSPIPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyIncorrectSPIPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("IncorrectSPIPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncorrectSPIPacketsPersec sets the value of IncorrectSPIPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyIncorrectSPIPacketsPersec(value uint32) (err error) { + return instance.SetProperty("IncorrectSPIPacketsPersec", (value)) +} + +// GetIncorrectSPIPacketsPersec gets the value of IncorrectSPIPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyIncorrectSPIPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IncorrectSPIPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOffloadedBytesReceivedPersec sets the value of OffloadedBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyOffloadedBytesReceivedPersec(value uint32) (err error) { + return instance.SetProperty("OffloadedBytesReceivedPersec", (value)) +} + +// GetOffloadedBytesReceivedPersec gets the value of OffloadedBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyOffloadedBytesReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OffloadedBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOffloadedBytesSentPersec sets the value of OffloadedBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyOffloadedBytesSentPersec(value uint32) (err error) { + return instance.SetProperty("OffloadedBytesSentPersec", (value)) +} + +// GetOffloadedBytesSentPersec gets the value of OffloadedBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyOffloadedBytesSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OffloadedBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOffloadedSecurityAssociations sets the value of OffloadedSecurityAssociations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyOffloadedSecurityAssociations(value uint32) (err error) { + return instance.SetProperty("OffloadedSecurityAssociations", (value)) +} + +// GetOffloadedSecurityAssociations gets the value of OffloadedSecurityAssociations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyOffloadedSecurityAssociations() (value uint32, err error) { + retValue, err := instance.GetProperty("OffloadedSecurityAssociations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotAuthenticated sets the value of PacketsNotAuthenticated for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsNotAuthenticated(value uint32) (err error) { + return instance.SetProperty("PacketsNotAuthenticated", (value)) +} + +// GetPacketsNotAuthenticated gets the value of PacketsNotAuthenticated for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsNotAuthenticated() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotAuthenticated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotAuthenticatedPersec sets the value of PacketsNotAuthenticatedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsNotAuthenticatedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsNotAuthenticatedPersec", (value)) +} + +// GetPacketsNotAuthenticatedPersec gets the value of PacketsNotAuthenticatedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsNotAuthenticatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotAuthenticatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotDecrypted sets the value of PacketsNotDecrypted for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsNotDecrypted(value uint32) (err error) { + return instance.SetProperty("PacketsNotDecrypted", (value)) +} + +// GetPacketsNotDecrypted gets the value of PacketsNotDecrypted for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsNotDecrypted() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotDecrypted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotDecryptedPersec sets the value of PacketsNotDecryptedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsNotDecryptedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsNotDecryptedPersec", (value)) +} + +// GetPacketsNotDecryptedPersec gets the value of PacketsNotDecryptedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsNotDecryptedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotDecryptedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedOverWrongSA sets the value of PacketsReceivedOverWrongSA for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsReceivedOverWrongSA(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedOverWrongSA", (value)) +} + +// GetPacketsReceivedOverWrongSA gets the value of PacketsReceivedOverWrongSA for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsReceivedOverWrongSA() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedOverWrongSA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedOverWrongSAPersec sets the value of PacketsReceivedOverWrongSAPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsReceivedOverWrongSAPersec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedOverWrongSAPersec", (value)) +} + +// GetPacketsReceivedOverWrongSAPersec gets the value of PacketsReceivedOverWrongSAPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsReceivedOverWrongSAPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedOverWrongSAPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedESPValidation sets the value of PacketsThatFailedESPValidation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsThatFailedESPValidation(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedESPValidation", (value)) +} + +// GetPacketsThatFailedESPValidation gets the value of PacketsThatFailedESPValidation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsThatFailedESPValidation() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedESPValidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedESPValidationPersec sets the value of PacketsThatFailedESPValidationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsThatFailedESPValidationPersec(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedESPValidationPersec", (value)) +} + +// GetPacketsThatFailedESPValidationPersec gets the value of PacketsThatFailedESPValidationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsThatFailedESPValidationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedESPValidationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedReplayDetection sets the value of PacketsThatFailedReplayDetection for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsThatFailedReplayDetection(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedReplayDetection", (value)) +} + +// GetPacketsThatFailedReplayDetection gets the value of PacketsThatFailedReplayDetection for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsThatFailedReplayDetection() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedReplayDetection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedReplayDetectionPersec sets the value of PacketsThatFailedReplayDetectionPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsThatFailedReplayDetectionPersec(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedReplayDetectionPersec", (value)) +} + +// GetPacketsThatFailedReplayDetectionPersec gets the value of PacketsThatFailedReplayDetectionPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsThatFailedReplayDetectionPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedReplayDetectionPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedUDPESPValidation sets the value of PacketsThatFailedUDPESPValidation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsThatFailedUDPESPValidation(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedUDPESPValidation", (value)) +} + +// GetPacketsThatFailedUDPESPValidation gets the value of PacketsThatFailedUDPESPValidation for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsThatFailedUDPESPValidation() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedUDPESPValidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedUDPESPValidationPersec sets the value of PacketsThatFailedUDPESPValidationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPacketsThatFailedUDPESPValidationPersec(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedUDPESPValidationPersec", (value)) +} + +// GetPacketsThatFailedUDPESPValidationPersec gets the value of PacketsThatFailedUDPESPValidationPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPacketsThatFailedUDPESPValidationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedUDPESPValidationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingSecurityAssociations sets the value of PendingSecurityAssociations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPendingSecurityAssociations(value uint32) (err error) { + return instance.SetProperty("PendingSecurityAssociations", (value)) +} + +// GetPendingSecurityAssociations gets the value of PendingSecurityAssociations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPendingSecurityAssociations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingSecurityAssociations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPlaintextPacketsReceived sets the value of PlaintextPacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPlaintextPacketsReceived(value uint32) (err error) { + return instance.SetProperty("PlaintextPacketsReceived", (value)) +} + +// GetPlaintextPacketsReceived gets the value of PlaintextPacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPlaintextPacketsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("PlaintextPacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPlaintextPacketsReceivedPersec sets the value of PlaintextPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyPlaintextPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("PlaintextPacketsReceivedPersec", (value)) +} + +// GetPlaintextPacketsReceivedPersec gets the value of PlaintextPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyPlaintextPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PlaintextPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSARekeys sets the value of SARekeys for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertySARekeys(value uint32) (err error) { + return instance.SetProperty("SARekeys", (value)) +} + +// GetSARekeys gets the value of SARekeys for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertySARekeys() (value uint32, err error) { + retValue, err := instance.GetProperty("SARekeys") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityAssociationsAdded sets the value of SecurityAssociationsAdded for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertySecurityAssociationsAdded(value uint32) (err error) { + return instance.SetProperty("SecurityAssociationsAdded", (value)) +} + +// GetSecurityAssociationsAdded gets the value of SecurityAssociationsAdded for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertySecurityAssociationsAdded() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityAssociationsAdded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalInboundPacketsDropped sets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyTotalInboundPacketsDropped(value uint32) (err error) { + return instance.SetProperty("TotalInboundPacketsDropped", (value)) +} + +// GetTotalInboundPacketsDropped gets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyTotalInboundPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalInboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalInboundPacketsReceived sets the value of TotalInboundPacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) SetPropertyTotalInboundPacketsReceived(value uint32) (err error) { + return instance.SetProperty("TotalInboundPacketsReceived", (value)) +} + +// GetTotalInboundPacketsReceived gets the value of TotalInboundPacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecDriver) GetPropertyTotalInboundPacketsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalInboundPacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4.go new file mode 100644 index 00000000..f05b8f04 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4 struct +type Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4 struct { + *Win32_PerfFormattedData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv1IPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv1IPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6.go new file mode 100644 index 00000000..1e877b2f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6 struct +type Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6 struct { + *Win32_PerfFormattedData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv1IPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv1IPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4.go new file mode 100644 index 00000000..73292063 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4 struct +type Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4 struct { + *Win32_PerfFormattedData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv2IPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv2IPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6.go new file mode 100644 index 00000000..0b3587f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6 struct +type Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6 struct { + *Win32_PerfFormattedData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv2IPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_IPsecIKEv2IPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_KPSSVC.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_KPSSVC.go new file mode 100644 index 00000000..f3055d36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_KPSSVC.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_KPSSVC struct +type Win32_PerfFormattedData_Counters_KPSSVC struct { + *Win32_PerfFormattedData + + // + FailedRequests uint32 + + // + IncomingArmoredRequests uint32 + + // + IncomingPasswordChangeRequests uint32 + + // + IncomingRequests uint32 +} + +func NewWin32_PerfFormattedData_Counters_KPSSVCEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_KPSSVC, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_KPSSVC{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_KPSSVCEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_KPSSVC, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_KPSSVC{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetFailedRequests sets the value of FailedRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) SetPropertyFailedRequests(value uint32) (err error) { + return instance.SetProperty("FailedRequests", (value)) +} + +// GetFailedRequests gets the value of FailedRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) GetPropertyFailedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingArmoredRequests sets the value of IncomingArmoredRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) SetPropertyIncomingArmoredRequests(value uint32) (err error) { + return instance.SetProperty("IncomingArmoredRequests", (value)) +} + +// GetIncomingArmoredRequests gets the value of IncomingArmoredRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) GetPropertyIncomingArmoredRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingArmoredRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingPasswordChangeRequests sets the value of IncomingPasswordChangeRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) SetPropertyIncomingPasswordChangeRequests(value uint32) (err error) { + return instance.SetProperty("IncomingPasswordChangeRequests", (value)) +} + +// GetIncomingPasswordChangeRequests gets the value of IncomingPasswordChangeRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) GetPropertyIncomingPasswordChangeRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingPasswordChangeRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingRequests sets the value of IncomingRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) SetPropertyIncomingRequests(value uint32) (err error) { + return instance.SetProperty("IncomingRequests", (value)) +} + +// GetIncomingRequests gets the value of IncomingRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_KPSSVC) GetPropertyIncomingRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Netlogon.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Netlogon.go new file mode 100644 index 00000000..d3db5f10 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Netlogon.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_Netlogon struct +type Win32_PerfFormattedData_Counters_Netlogon struct { + *Win32_PerfFormattedData + + // + AverageSemaphoreHoldTime uint32 + + // + LastAuthenticationTime uint32 + + // + SemaphoreAcquires uint64 + + // + SemaphoreHolders uint32 + + // + SemaphoreTimeouts uint64 + + // + SemaphoreWaiters uint32 +} + +func NewWin32_PerfFormattedData_Counters_NetlogonEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_Netlogon, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_Netlogon{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_NetlogonEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_Netlogon, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_Netlogon{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageSemaphoreHoldTime sets the value of AverageSemaphoreHoldTime for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) SetPropertyAverageSemaphoreHoldTime(value uint32) (err error) { + return instance.SetProperty("AverageSemaphoreHoldTime", (value)) +} + +// GetAverageSemaphoreHoldTime gets the value of AverageSemaphoreHoldTime for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) GetPropertyAverageSemaphoreHoldTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSemaphoreHoldTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLastAuthenticationTime sets the value of LastAuthenticationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) SetPropertyLastAuthenticationTime(value uint32) (err error) { + return instance.SetProperty("LastAuthenticationTime", (value)) +} + +// GetLastAuthenticationTime gets the value of LastAuthenticationTime for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) GetPropertyLastAuthenticationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("LastAuthenticationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSemaphoreAcquires sets the value of SemaphoreAcquires for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) SetPropertySemaphoreAcquires(value uint64) (err error) { + return instance.SetProperty("SemaphoreAcquires", (value)) +} + +// GetSemaphoreAcquires gets the value of SemaphoreAcquires for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) GetPropertySemaphoreAcquires() (value uint64, err error) { + retValue, err := instance.GetProperty("SemaphoreAcquires") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSemaphoreHolders sets the value of SemaphoreHolders for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) SetPropertySemaphoreHolders(value uint32) (err error) { + return instance.SetProperty("SemaphoreHolders", (value)) +} + +// GetSemaphoreHolders gets the value of SemaphoreHolders for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) GetPropertySemaphoreHolders() (value uint32, err error) { + retValue, err := instance.GetProperty("SemaphoreHolders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSemaphoreTimeouts sets the value of SemaphoreTimeouts for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) SetPropertySemaphoreTimeouts(value uint64) (err error) { + return instance.SetProperty("SemaphoreTimeouts", (value)) +} + +// GetSemaphoreTimeouts gets the value of SemaphoreTimeouts for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) GetPropertySemaphoreTimeouts() (value uint64, err error) { + retValue, err := instance.GetProperty("SemaphoreTimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSemaphoreWaiters sets the value of SemaphoreWaiters for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) SetPropertySemaphoreWaiters(value uint32) (err error) { + return instance.SetProperty("SemaphoreWaiters", (value)) +} + +// GetSemaphoreWaiters gets the value of SemaphoreWaiters for the instance +func (instance *Win32_PerfFormattedData_Counters_Netlogon) GetPropertySemaphoreWaiters() (value uint32, err error) { + retValue, err := instance.GetProperty("SemaphoreWaiters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_NetworkQoSPolicy.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_NetworkQoSPolicy.go new file mode 100644 index 00000000..a7be2bb6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_NetworkQoSPolicy.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_NetworkQoSPolicy struct +type Win32_PerfFormattedData_Counters_NetworkQoSPolicy struct { + *Win32_PerfFormattedData + + // + Bytestransmitted uint64 + + // + BytestransmittedPersec uint64 + + // + Packetsdropped uint32 + + // + PacketsdroppedPersec uint32 + + // + Packetstransmitted uint32 + + // + PacketstransmittedPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_NetworkQoSPolicyEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_NetworkQoSPolicy{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_NetworkQoSPolicyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_NetworkQoSPolicy{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytestransmitted sets the value of Bytestransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) SetPropertyBytestransmitted(value uint64) (err error) { + return instance.SetProperty("Bytestransmitted", (value)) +} + +// GetBytestransmitted gets the value of Bytestransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) GetPropertyBytestransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytestransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytestransmittedPersec sets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) SetPropertyBytestransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytestransmittedPersec", (value)) +} + +// GetBytestransmittedPersec gets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) GetPropertyBytestransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytestransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsdropped sets the value of Packetsdropped for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) SetPropertyPacketsdropped(value uint32) (err error) { + return instance.SetProperty("Packetsdropped", (value)) +} + +// GetPacketsdropped gets the value of Packetsdropped for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) GetPropertyPacketsdropped() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdroppedPersec sets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) SetPropertyPacketsdroppedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsdroppedPersec", (value)) +} + +// GetPacketsdroppedPersec gets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) GetPropertyPacketsdroppedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsdroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmitted sets the value of Packetstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) SetPropertyPacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Packetstransmitted", (value)) +} + +// GetPacketstransmitted gets the value of Packetstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) GetPropertyPacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmittedPersec sets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) SetPropertyPacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("PacketstransmittedPersec", (value)) +} + +// GetPacketstransmittedPersec gets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_NetworkQoSPolicy) GetPropertyPacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerFlow.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerFlow.go new file mode 100644 index 00000000..f533b5e8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerFlow.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacerFlow struct +type Win32_PerfFormattedData_Counters_PacerFlow struct { + *Win32_PerfFormattedData + + // + Averagepacketsinnetcard uint32 + + // + Averagepacketsinsequencer uint32 + + // + Averagepacketsinshaper uint32 + + // + Bytesscheduled uint64 + + // + BytesscheduledPersec uint64 + + // + Bytestransmitted uint64 + + // + BytestransmittedPersec uint64 + + // + Maximumpacketsinnetcard uint32 + + // + Maxpacketsinsequencer uint32 + + // + Maxpacketsinshaper uint32 + + // + Nonconformingpacketsscheduled uint32 + + // + NonconformingpacketsscheduledPersec uint32 + + // + Nonconformingpacketstransmitted uint32 + + // + NonconformingpacketstransmittedPersec uint32 + + // + Packetsdropped uint32 + + // + PacketsdroppedPersec uint32 + + // + Packetsscheduled uint32 + + // + PacketsscheduledPersec uint32 + + // + Packetstransmitted uint32 + + // + PacketstransmittedPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_PacerFlowEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacerFlow, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacerFlow{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacerFlowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacerFlow, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacerFlow{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAveragepacketsinnetcard sets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyAveragepacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinnetcard", (value)) +} + +// GetAveragepacketsinnetcard gets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyAveragepacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinsequencer sets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyAveragepacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinsequencer", (value)) +} + +// GetAveragepacketsinsequencer gets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyAveragepacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinshaper sets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyAveragepacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinshaper", (value)) +} + +// GetAveragepacketsinshaper gets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyAveragepacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesscheduled sets the value of Bytesscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyBytesscheduled(value uint64) (err error) { + return instance.SetProperty("Bytesscheduled", (value)) +} + +// GetBytesscheduled gets the value of Bytesscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyBytesscheduled() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytesscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesscheduledPersec sets the value of BytesscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyBytesscheduledPersec(value uint64) (err error) { + return instance.SetProperty("BytesscheduledPersec", (value)) +} + +// GetBytesscheduledPersec gets the value of BytesscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyBytesscheduledPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytestransmitted sets the value of Bytestransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyBytestransmitted(value uint64) (err error) { + return instance.SetProperty("Bytestransmitted", (value)) +} + +// GetBytestransmitted gets the value of Bytestransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyBytestransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytestransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytestransmittedPersec sets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyBytestransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytestransmittedPersec", (value)) +} + +// GetBytestransmittedPersec gets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyBytestransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytestransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumpacketsinnetcard sets the value of Maximumpacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyMaximumpacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Maximumpacketsinnetcard", (value)) +} + +// GetMaximumpacketsinnetcard gets the value of Maximumpacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyMaximumpacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Maximumpacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinsequencer sets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyMaxpacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinsequencer", (value)) +} + +// GetMaxpacketsinsequencer gets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyMaxpacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinshaper sets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyMaxpacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinshaper", (value)) +} + +// GetMaxpacketsinshaper gets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyMaxpacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduled sets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyNonconformingpacketsscheduled(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketsscheduled", (value)) +} + +// GetNonconformingpacketsscheduled gets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyNonconformingpacketsscheduled() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketsscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduledPersec sets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyNonconformingpacketsscheduledPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketsscheduledPersec", (value)) +} + +// GetNonconformingpacketsscheduledPersec gets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyNonconformingpacketsscheduledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketsscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmitted sets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyNonconformingpacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketstransmitted", (value)) +} + +// GetNonconformingpacketstransmitted gets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyNonconformingpacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmittedPersec sets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyNonconformingpacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketstransmittedPersec", (value)) +} + +// GetNonconformingpacketstransmittedPersec gets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyNonconformingpacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdropped sets the value of Packetsdropped for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyPacketsdropped(value uint32) (err error) { + return instance.SetProperty("Packetsdropped", (value)) +} + +// GetPacketsdropped gets the value of Packetsdropped for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyPacketsdropped() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdroppedPersec sets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyPacketsdroppedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsdroppedPersec", (value)) +} + +// GetPacketsdroppedPersec gets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyPacketsdroppedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsdroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsscheduled sets the value of Packetsscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyPacketsscheduled(value uint32) (err error) { + return instance.SetProperty("Packetsscheduled", (value)) +} + +// GetPacketsscheduled gets the value of Packetsscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyPacketsscheduled() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetsscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsscheduledPersec sets the value of PacketsscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyPacketsscheduledPersec(value uint32) (err error) { + return instance.SetProperty("PacketsscheduledPersec", (value)) +} + +// GetPacketsscheduledPersec gets the value of PacketsscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyPacketsscheduledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmitted sets the value of Packetstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyPacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Packetstransmitted", (value)) +} + +// GetPacketstransmitted gets the value of Packetstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyPacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmittedPersec sets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) SetPropertyPacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("PacketstransmittedPersec", (value)) +} + +// GetPacketstransmittedPersec gets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerFlow) GetPropertyPacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerPipe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerPipe.go new file mode 100644 index 00000000..cf6a67a4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacerPipe.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacerPipe struct +type Win32_PerfFormattedData_Counters_PacerPipe struct { + *Win32_PerfFormattedData + + // + Averagepacketsinnetcard uint32 + + // + Averagepacketsinsequencer uint32 + + // + Averagepacketsinshaper uint32 + + // + Flowmodsrejected uint32 + + // + Flowsclosed uint32 + + // + Flowsmodified uint32 + + // + Flowsopened uint32 + + // + Flowsrejected uint32 + + // + Maxpacketsinnetcard uint32 + + // + Maxpacketsinsequencer uint32 + + // + Maxpacketsinshaper uint32 + + // + Maxsimultaneousflows uint32 + + // + Nonconformingpacketsscheduled uint32 + + // + NonconformingpacketsscheduledPersec uint32 + + // + Nonconformingpacketstransmitted uint32 + + // + NonconformingpacketstransmittedPersec uint32 + + // + Outofpackets uint32 +} + +func NewWin32_PerfFormattedData_Counters_PacerPipeEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacerPipe, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacerPipe{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacerPipeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacerPipe, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacerPipe{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAveragepacketsinnetcard sets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyAveragepacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinnetcard", (value)) +} + +// GetAveragepacketsinnetcard gets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyAveragepacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinsequencer sets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyAveragepacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinsequencer", (value)) +} + +// GetAveragepacketsinsequencer gets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyAveragepacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinshaper sets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyAveragepacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinshaper", (value)) +} + +// GetAveragepacketsinshaper gets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyAveragepacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowmodsrejected sets the value of Flowmodsrejected for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyFlowmodsrejected(value uint32) (err error) { + return instance.SetProperty("Flowmodsrejected", (value)) +} + +// GetFlowmodsrejected gets the value of Flowmodsrejected for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyFlowmodsrejected() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowmodsrejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsclosed sets the value of Flowsclosed for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyFlowsclosed(value uint32) (err error) { + return instance.SetProperty("Flowsclosed", (value)) +} + +// GetFlowsclosed gets the value of Flowsclosed for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyFlowsclosed() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsclosed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsmodified sets the value of Flowsmodified for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyFlowsmodified(value uint32) (err error) { + return instance.SetProperty("Flowsmodified", (value)) +} + +// GetFlowsmodified gets the value of Flowsmodified for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyFlowsmodified() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsmodified") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsopened sets the value of Flowsopened for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyFlowsopened(value uint32) (err error) { + return instance.SetProperty("Flowsopened", (value)) +} + +// GetFlowsopened gets the value of Flowsopened for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyFlowsopened() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsopened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsrejected sets the value of Flowsrejected for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyFlowsrejected(value uint32) (err error) { + return instance.SetProperty("Flowsrejected", (value)) +} + +// GetFlowsrejected gets the value of Flowsrejected for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyFlowsrejected() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsrejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinnetcard sets the value of Maxpacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyMaxpacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinnetcard", (value)) +} + +// GetMaxpacketsinnetcard gets the value of Maxpacketsinnetcard for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyMaxpacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinsequencer sets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyMaxpacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinsequencer", (value)) +} + +// GetMaxpacketsinsequencer gets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyMaxpacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinshaper sets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyMaxpacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinshaper", (value)) +} + +// GetMaxpacketsinshaper gets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyMaxpacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxsimultaneousflows sets the value of Maxsimultaneousflows for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyMaxsimultaneousflows(value uint32) (err error) { + return instance.SetProperty("Maxsimultaneousflows", (value)) +} + +// GetMaxsimultaneousflows gets the value of Maxsimultaneousflows for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyMaxsimultaneousflows() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxsimultaneousflows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduled sets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyNonconformingpacketsscheduled(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketsscheduled", (value)) +} + +// GetNonconformingpacketsscheduled gets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyNonconformingpacketsscheduled() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketsscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduledPersec sets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyNonconformingpacketsscheduledPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketsscheduledPersec", (value)) +} + +// GetNonconformingpacketsscheduledPersec gets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyNonconformingpacketsscheduledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketsscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmitted sets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyNonconformingpacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketstransmitted", (value)) +} + +// GetNonconformingpacketstransmitted gets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyNonconformingpacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmittedPersec sets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyNonconformingpacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketstransmittedPersec", (value)) +} + +// GetNonconformingpacketstransmittedPersec gets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyNonconformingpacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutofpackets sets the value of Outofpackets for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) SetPropertyOutofpackets(value uint32) (err error) { + return instance.SetProperty("Outofpackets", (value)) +} + +// GetOutofpackets gets the value of Outofpackets for the instance +func (instance *Win32_PerfFormattedData_Counters_PacerPipe) GetPropertyOutofpackets() (value uint32, err error) { + retValue, err := instance.GetProperty("Outofpackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectECUtilization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectECUtilization.go new file mode 100644 index 00000000..c07fd0d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectECUtilization.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacketDirectECUtilization struct +type Win32_PerfFormattedData_Counters_PacketDirectECUtilization struct { + *Win32_PerfFormattedData + + // + BusyWaitIterationsPersec uint32 + + // + IterationsPersec uint32 + + // + PercentBusyWaitingTime uint64 + + // + PercentBusyWaitIterations uint32 + + // + PercentIdleTime uint64 + + // + PercentProcessingTime uint64 + + // + ProcessorNumber uint32 + + // + RXQueueCount uint32 + + // + TotalBusyWaitIterations uint64 + + // + TotalIterations uint64 + + // + TXQueueCount uint32 +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectECUtilizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectECUtilization{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectECUtilizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectECUtilization{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBusyWaitIterationsPersec sets the value of BusyWaitIterationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyBusyWaitIterationsPersec(value uint32) (err error) { + return instance.SetProperty("BusyWaitIterationsPersec", (value)) +} + +// GetBusyWaitIterationsPersec gets the value of BusyWaitIterationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyBusyWaitIterationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BusyWaitIterationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIterationsPersec sets the value of IterationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyIterationsPersec(value uint32) (err error) { + return instance.SetProperty("IterationsPersec", (value)) +} + +// GetIterationsPersec gets the value of IterationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyIterationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IterationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentBusyWaitingTime sets the value of PercentBusyWaitingTime for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyPercentBusyWaitingTime(value uint64) (err error) { + return instance.SetProperty("PercentBusyWaitingTime", (value)) +} + +// GetPercentBusyWaitingTime gets the value of PercentBusyWaitingTime for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyPercentBusyWaitingTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentBusyWaitingTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentBusyWaitIterations sets the value of PercentBusyWaitIterations for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyPercentBusyWaitIterations(value uint32) (err error) { + return instance.SetProperty("PercentBusyWaitIterations", (value)) +} + +// GetPercentBusyWaitIterations gets the value of PercentBusyWaitIterations for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyPercentBusyWaitIterations() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentBusyWaitIterations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessingTime sets the value of PercentProcessingTime for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyPercentProcessingTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessingTime", (value)) +} + +// GetPercentProcessingTime gets the value of PercentProcessingTime for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyPercentProcessingTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessingTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessorNumber sets the value of ProcessorNumber for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyProcessorNumber(value uint32) (err error) { + return instance.SetProperty("ProcessorNumber", (value)) +} + +// GetProcessorNumber gets the value of ProcessorNumber for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyProcessorNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRXQueueCount sets the value of RXQueueCount for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyRXQueueCount(value uint32) (err error) { + return instance.SetProperty("RXQueueCount", (value)) +} + +// GetRXQueueCount gets the value of RXQueueCount for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyRXQueueCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RXQueueCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalBusyWaitIterations sets the value of TotalBusyWaitIterations for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyTotalBusyWaitIterations(value uint64) (err error) { + return instance.SetProperty("TotalBusyWaitIterations", (value)) +} + +// GetTotalBusyWaitIterations gets the value of TotalBusyWaitIterations for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyTotalBusyWaitIterations() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBusyWaitIterations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalIterations sets the value of TotalIterations for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyTotalIterations(value uint64) (err error) { + return instance.SetProperty("TotalIterations", (value)) +} + +// GetTotalIterations gets the value of TotalIterations for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyTotalIterations() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalIterations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXQueueCount sets the value of TXQueueCount for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) SetPropertyTXQueueCount(value uint32) (err error) { + return instance.SetProperty("TXQueueCount", (value)) +} + +// GetTXQueueCount gets the value of TXQueueCount for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectECUtilization) GetPropertyTXQueueCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TXQueueCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectQueueDepth.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectQueueDepth.go new file mode 100644 index 00000000..c33351e4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectQueueDepth.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacketDirectQueueDepth struct +type Win32_PerfFormattedData_Counters_PacketDirectQueueDepth struct { + *Win32_PerfFormattedData + + // + AverageQueueDepth uint32 + + // + PercentAverageQueueUtilization uint32 +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectQueueDepthEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectQueueDepth, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectQueueDepth{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectQueueDepthEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectQueueDepth, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectQueueDepth{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageQueueDepth sets the value of AverageQueueDepth for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectQueueDepth) SetPropertyAverageQueueDepth(value uint32) (err error) { + return instance.SetProperty("AverageQueueDepth", (value)) +} + +// GetAverageQueueDepth gets the value of AverageQueueDepth for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectQueueDepth) GetPropertyAverageQueueDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageQueueDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentAverageQueueUtilization sets the value of PercentAverageQueueUtilization for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectQueueDepth) SetPropertyPercentAverageQueueUtilization(value uint32) (err error) { + return instance.SetProperty("PercentAverageQueueUtilization", (value)) +} + +// GetPercentAverageQueueUtilization gets the value of PercentAverageQueueUtilization for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectQueueDepth) GetPropertyPercentAverageQueueUtilization() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentAverageQueueUtilization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters.go new file mode 100644 index 00000000..051dbe35 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters struct +type Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesReceivedPersec uint64 + + // + PacketsDropped uint64 + + // + PacketsDroppedPersec uint64 + + // + PacketsReceived uint64 + + // + PacketsReceivedPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectReceiveCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectReceiveCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsDropped sets the value of PacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsDropped(value uint64) (err error) { + return instance.SetProperty("PacketsDropped", (value)) +} + +// GetPacketsDropped gets the value of PacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsDroppedPersec sets the value of PacketsDroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsDroppedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsDroppedPersec", (value)) +} + +// GetPacketsDroppedPersec gets the value of PacketsDroppedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsDroppedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsDroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters.go new file mode 100644 index 00000000..febdb58c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters struct +type Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters struct { + *Win32_PerfFormattedData + + // + BytesMatched uint64 + + // + BytesMatchedPersec uint64 + + // + PacketsMatched uint64 + + // + PacketsMatchedPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectReceiveFiltersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectReceiveFiltersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesMatched sets the value of BytesMatched for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) SetPropertyBytesMatched(value uint64) (err error) { + return instance.SetProperty("BytesMatched", (value)) +} + +// GetBytesMatched gets the value of BytesMatched for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) GetPropertyBytesMatched() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesMatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesMatchedPersec sets the value of BytesMatchedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) SetPropertyBytesMatchedPersec(value uint64) (err error) { + return instance.SetProperty("BytesMatchedPersec", (value)) +} + +// GetBytesMatchedPersec gets the value of BytesMatchedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) GetPropertyBytesMatchedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesMatchedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsMatched sets the value of PacketsMatched for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) SetPropertyPacketsMatched(value uint64) (err error) { + return instance.SetProperty("PacketsMatched", (value)) +} + +// GetPacketsMatched gets the value of PacketsMatched for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) GetPropertyPacketsMatched() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsMatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsMatchedPersec sets the value of PacketsMatchedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) SetPropertyPacketsMatchedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsMatchedPersec", (value)) +} + +// GetPacketsMatchedPersec gets the value of PacketsMatchedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectReceiveFilters) GetPropertyPacketsMatchedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsMatchedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters.go new file mode 100644 index 00000000..372e2151 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters struct +type Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters struct { + *Win32_PerfFormattedData + + // + BytesTransmitted uint64 + + // + BytesTransmittedPersec uint64 + + // + PacketsTransmitted uint64 + + // + PacketsTransmittedPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectTransmitCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PacketDirectTransmitCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTransmitted sets the value of PacketsTransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) SetPropertyPacketsTransmitted(value uint64) (err error) { + return instance.SetProperty("PacketsTransmitted", (value)) +} + +// GetPacketsTransmitted gets the value of PacketsTransmitted for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) GetPropertyPacketsTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTransmittedPersec sets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) SetPropertyPacketsTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsTransmittedPersec", (value)) +} + +// GetPacketsTransmittedPersec gets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PacketDirectTransmitCounters) GetPropertyPacketsTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles.go new file mode 100644 index 00000000..f98ee688 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles struct +type Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles struct { + *Win32_PerfFormattedData + + // + BuildScatterGatherCyclesPersec uint64 + + // + InterruptCyclesPersec uint64 + + // + InterruptDPCCyclesPersec uint64 + + // + InterruptDPCLatencyCyclesPersec uint64 + + // + MiniportReturnPacketCyclesPersec uint64 + + // + MiniportRSSIndirectionTableChangeCycles uint64 + + // + MiniportSendCyclesPersec uint64 + + // + NDISReceiveIndicationCyclesPersec uint64 + + // + NDISReturnPacketCyclesPersec uint64 + + // + NDISSendCompleteCyclesPersec uint64 + + // + NDISSendCyclesPersec uint64 + + // + StackReceiveIndicationCyclesPersec uint64 + + // + StackSendCompleteCyclesPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_PerProcessorNetworkActivityCyclesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PerProcessorNetworkActivityCyclesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBuildScatterGatherCyclesPersec sets the value of BuildScatterGatherCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyBuildScatterGatherCyclesPersec(value uint64) (err error) { + return instance.SetProperty("BuildScatterGatherCyclesPersec", (value)) +} + +// GetBuildScatterGatherCyclesPersec gets the value of BuildScatterGatherCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyBuildScatterGatherCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BuildScatterGatherCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptCyclesPersec sets the value of InterruptCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyInterruptCyclesPersec(value uint64) (err error) { + return instance.SetProperty("InterruptCyclesPersec", (value)) +} + +// GetInterruptCyclesPersec gets the value of InterruptCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyInterruptCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptDPCCyclesPersec sets the value of InterruptDPCCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyInterruptDPCCyclesPersec(value uint64) (err error) { + return instance.SetProperty("InterruptDPCCyclesPersec", (value)) +} + +// GetInterruptDPCCyclesPersec gets the value of InterruptDPCCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyInterruptDPCCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptDPCCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptDPCLatencyCyclesPersec sets the value of InterruptDPCLatencyCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyInterruptDPCLatencyCyclesPersec(value uint64) (err error) { + return instance.SetProperty("InterruptDPCLatencyCyclesPersec", (value)) +} + +// GetInterruptDPCLatencyCyclesPersec gets the value of InterruptDPCLatencyCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyInterruptDPCLatencyCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptDPCLatencyCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMiniportReturnPacketCyclesPersec sets the value of MiniportReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyMiniportReturnPacketCyclesPersec(value uint64) (err error) { + return instance.SetProperty("MiniportReturnPacketCyclesPersec", (value)) +} + +// GetMiniportReturnPacketCyclesPersec gets the value of MiniportReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyMiniportReturnPacketCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MiniportReturnPacketCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMiniportRSSIndirectionTableChangeCycles sets the value of MiniportRSSIndirectionTableChangeCycles for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyMiniportRSSIndirectionTableChangeCycles(value uint64) (err error) { + return instance.SetProperty("MiniportRSSIndirectionTableChangeCycles", (value)) +} + +// GetMiniportRSSIndirectionTableChangeCycles gets the value of MiniportRSSIndirectionTableChangeCycles for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyMiniportRSSIndirectionTableChangeCycles() (value uint64, err error) { + retValue, err := instance.GetProperty("MiniportRSSIndirectionTableChangeCycles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMiniportSendCyclesPersec sets the value of MiniportSendCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyMiniportSendCyclesPersec(value uint64) (err error) { + return instance.SetProperty("MiniportSendCyclesPersec", (value)) +} + +// GetMiniportSendCyclesPersec gets the value of MiniportSendCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyMiniportSendCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MiniportSendCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISReceiveIndicationCyclesPersec sets the value of NDISReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISReceiveIndicationCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISReceiveIndicationCyclesPersec", (value)) +} + +// GetNDISReceiveIndicationCyclesPersec gets the value of NDISReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISReceiveIndicationCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISReceiveIndicationCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISReturnPacketCyclesPersec sets the value of NDISReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISReturnPacketCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISReturnPacketCyclesPersec", (value)) +} + +// GetNDISReturnPacketCyclesPersec gets the value of NDISReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISReturnPacketCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISReturnPacketCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISSendCompleteCyclesPersec sets the value of NDISSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISSendCompleteCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISSendCompleteCyclesPersec", (value)) +} + +// GetNDISSendCompleteCyclesPersec gets the value of NDISSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISSendCompleteCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISSendCompleteCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISSendCyclesPersec sets the value of NDISSendCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISSendCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISSendCyclesPersec", (value)) +} + +// GetNDISSendCyclesPersec gets the value of NDISSendCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISSendCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISSendCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackReceiveIndicationCyclesPersec sets the value of StackReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyStackReceiveIndicationCyclesPersec(value uint64) (err error) { + return instance.SetProperty("StackReceiveIndicationCyclesPersec", (value)) +} + +// GetStackReceiveIndicationCyclesPersec gets the value of StackReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyStackReceiveIndicationCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("StackReceiveIndicationCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackSendCompleteCyclesPersec sets the value of StackSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) SetPropertyStackSendCompleteCyclesPersec(value uint64) (err error) { + return instance.SetProperty("StackSendCompleteCyclesPersec", (value)) +} + +// GetStackSendCompleteCyclesPersec gets the value of StackSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkActivityCycles) GetPropertyStackSendCompleteCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("StackSendCompleteCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity.go new file mode 100644 index 00000000..8245c18c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity struct +type Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity struct { + *Win32_PerfFormattedData + + // + BuildScatterGatherListCallsPersec uint64 + + // + DPCsDeferredPersec uint64 + + // + DPCsQueuedonOtherCPUsPersec uint64 + + // + DPCsQueuedPersec uint64 + + // + InterruptsPersec uint64 + + // + LowResourceReceivedPacketsPersec uint64 + + // + LowResourceReceiveIndicationsPersec uint64 + + // + PacketsCoalescedPersec uint64 + + // + ReceivedPacketsPersec uint64 + + // + ReceiveIndicationsPersec uint64 + + // + ReturnedPacketsPersec uint64 + + // + ReturnPacketCallsPersec uint64 + + // + RSSIndirectionTableChangeCallsPersec uint64 + + // + SendCompleteCallsPersec uint64 + + // + SendRequestCallsPersec uint64 + + // + SentCompletePacketsPersec uint64 + + // + SentPacketsPersec uint64 + + // + TcpOffloadReceivebytesPersec uint64 + + // + TcpOffloadReceiveIndicationsPersec uint64 + + // + TcpOffloadSendbytesPersec uint64 + + // + TcpOffloadSendRequestCallsPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBuildScatterGatherListCallsPersec sets the value of BuildScatterGatherListCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyBuildScatterGatherListCallsPersec(value uint64) (err error) { + return instance.SetProperty("BuildScatterGatherListCallsPersec", (value)) +} + +// GetBuildScatterGatherListCallsPersec gets the value of BuildScatterGatherListCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyBuildScatterGatherListCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BuildScatterGatherListCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCsDeferredPersec sets the value of DPCsDeferredPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyDPCsDeferredPersec(value uint64) (err error) { + return instance.SetProperty("DPCsDeferredPersec", (value)) +} + +// GetDPCsDeferredPersec gets the value of DPCsDeferredPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyDPCsDeferredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DPCsDeferredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCsQueuedonOtherCPUsPersec sets the value of DPCsQueuedonOtherCPUsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyDPCsQueuedonOtherCPUsPersec(value uint64) (err error) { + return instance.SetProperty("DPCsQueuedonOtherCPUsPersec", (value)) +} + +// GetDPCsQueuedonOtherCPUsPersec gets the value of DPCsQueuedonOtherCPUsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyDPCsQueuedonOtherCPUsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DPCsQueuedonOtherCPUsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCsQueuedPersec sets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyDPCsQueuedPersec(value uint64) (err error) { + return instance.SetProperty("DPCsQueuedPersec", (value)) +} + +// GetDPCsQueuedPersec gets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyDPCsQueuedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DPCsQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLowResourceReceivedPacketsPersec sets the value of LowResourceReceivedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyLowResourceReceivedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("LowResourceReceivedPacketsPersec", (value)) +} + +// GetLowResourceReceivedPacketsPersec gets the value of LowResourceReceivedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyLowResourceReceivedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LowResourceReceivedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLowResourceReceiveIndicationsPersec sets the value of LowResourceReceiveIndicationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyLowResourceReceiveIndicationsPersec(value uint64) (err error) { + return instance.SetProperty("LowResourceReceiveIndicationsPersec", (value)) +} + +// GetLowResourceReceiveIndicationsPersec gets the value of LowResourceReceiveIndicationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyLowResourceReceiveIndicationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LowResourceReceiveIndicationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsCoalescedPersec sets the value of PacketsCoalescedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyPacketsCoalescedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsCoalescedPersec", (value)) +} + +// GetPacketsCoalescedPersec gets the value of PacketsCoalescedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyPacketsCoalescedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsCoalescedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceivedPacketsPersec sets the value of ReceivedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReceivedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedPacketsPersec", (value)) +} + +// GetReceivedPacketsPersec gets the value of ReceivedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReceivedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveIndicationsPersec sets the value of ReceiveIndicationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReceiveIndicationsPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveIndicationsPersec", (value)) +} + +// GetReceiveIndicationsPersec gets the value of ReceiveIndicationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReceiveIndicationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveIndicationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReturnedPacketsPersec sets the value of ReturnedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReturnedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("ReturnedPacketsPersec", (value)) +} + +// GetReturnedPacketsPersec gets the value of ReturnedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReturnedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReturnedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReturnPacketCallsPersec sets the value of ReturnPacketCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReturnPacketCallsPersec(value uint64) (err error) { + return instance.SetProperty("ReturnPacketCallsPersec", (value)) +} + +// GetReturnPacketCallsPersec gets the value of ReturnPacketCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReturnPacketCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReturnPacketCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSSIndirectionTableChangeCallsPersec sets the value of RSSIndirectionTableChangeCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyRSSIndirectionTableChangeCallsPersec(value uint64) (err error) { + return instance.SetProperty("RSSIndirectionTableChangeCallsPersec", (value)) +} + +// GetRSSIndirectionTableChangeCallsPersec gets the value of RSSIndirectionTableChangeCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyRSSIndirectionTableChangeCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RSSIndirectionTableChangeCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendCompleteCallsPersec sets the value of SendCompleteCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySendCompleteCallsPersec(value uint64) (err error) { + return instance.SetProperty("SendCompleteCallsPersec", (value)) +} + +// GetSendCompleteCallsPersec gets the value of SendCompleteCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySendCompleteCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SendCompleteCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendRequestCallsPersec sets the value of SendRequestCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySendRequestCallsPersec(value uint64) (err error) { + return instance.SetProperty("SendRequestCallsPersec", (value)) +} + +// GetSendRequestCallsPersec gets the value of SendRequestCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySendRequestCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SendRequestCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentCompletePacketsPersec sets the value of SentCompletePacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySentCompletePacketsPersec(value uint64) (err error) { + return instance.SetProperty("SentCompletePacketsPersec", (value)) +} + +// GetSentCompletePacketsPersec gets the value of SentCompletePacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySentCompletePacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentCompletePacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentPacketsPersec sets the value of SentPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySentPacketsPersec(value uint64) (err error) { + return instance.SetProperty("SentPacketsPersec", (value)) +} + +// GetSentPacketsPersec gets the value of SentPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySentPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadReceivebytesPersec sets the value of TcpOffloadReceivebytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadReceivebytesPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadReceivebytesPersec", (value)) +} + +// GetTcpOffloadReceivebytesPersec gets the value of TcpOffloadReceivebytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadReceivebytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadReceivebytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadReceiveIndicationsPersec sets the value of TcpOffloadReceiveIndicationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadReceiveIndicationsPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadReceiveIndicationsPersec", (value)) +} + +// GetTcpOffloadReceiveIndicationsPersec gets the value of TcpOffloadReceiveIndicationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadReceiveIndicationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadReceiveIndicationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadSendbytesPersec sets the value of TcpOffloadSendbytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadSendbytesPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadSendbytesPersec", (value)) +} + +// GetTcpOffloadSendbytesPersec gets the value of TcpOffloadSendbytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadSendbytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadSendbytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadSendRequestCallsPersec sets the value of TcpOffloadSendRequestCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadSendRequestCallsPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadSendRequestCallsPersec", (value)) +} + +// GetTcpOffloadSendRequestCallsPersec gets the value of TcpOffloadSendRequestCallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadSendRequestCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadSendRequestCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity.go new file mode 100644 index 00000000..a9212b43 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity struct +type Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity struct { + *Win32_PerfFormattedData + + // + DevicePowerState uint32 + + // + LowPowerTransitionsLifetime uint32 + + // + PercentTimeSuspendedInstantaneous uint64 + + // + PercentTimeSuspendedLifetime uint64 +} + +func NewWin32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDevicePowerState sets the value of DevicePowerState for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyDevicePowerState(value uint32) (err error) { + return instance.SetProperty("DevicePowerState", (value)) +} + +// GetDevicePowerState gets the value of DevicePowerState for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyDevicePowerState() (value uint32, err error) { + retValue, err := instance.GetProperty("DevicePowerState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowPowerTransitionsLifetime sets the value of LowPowerTransitionsLifetime for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyLowPowerTransitionsLifetime(value uint32) (err error) { + return instance.SetProperty("LowPowerTransitionsLifetime", (value)) +} + +// GetLowPowerTransitionsLifetime gets the value of LowPowerTransitionsLifetime for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyLowPowerTransitionsLifetime() (value uint32, err error) { + retValue, err := instance.GetProperty("LowPowerTransitionsLifetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeSuspendedInstantaneous sets the value of PercentTimeSuspendedInstantaneous for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyPercentTimeSuspendedInstantaneous(value uint64) (err error) { + return instance.SetProperty("PercentTimeSuspendedInstantaneous", (value)) +} + +// GetPercentTimeSuspendedInstantaneous gets the value of PercentTimeSuspendedInstantaneous for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyPercentTimeSuspendedInstantaneous() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSuspendedInstantaneous") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTimeSuspendedLifetime sets the value of PercentTimeSuspendedLifetime for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyPercentTimeSuspendedLifetime(value uint64) (err error) { + return instance.SetProperty("PercentTimeSuspendedLifetime", (value)) +} + +// GetPercentTimeSuspendedLifetime gets the value of PercentTimeSuspendedLifetime for the instance +func (instance *Win32_PerfFormattedData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyPercentTimeSuspendedLifetime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSuspendedLifetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PowerShellWorkflow.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PowerShellWorkflow.go new file mode 100644 index 00000000..52c522e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_PowerShellWorkflow.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_PowerShellWorkflow struct +type Win32_PerfFormattedData_Counters_PowerShellWorkflow struct { + *Win32_PerfFormattedData + + // + ActivityHostManagerhostprocessespoolsize uint32 + + // + ActivityHostManagerNumberofbusyhostprocesses uint32 + + // + ActivityHostManagerNumberofcreatedhostprocesses uint32 + + // + ActivityHostManagerNumberofdisposedhostprocesses uint32 + + // + ActivityHostManagerNumberoffailedrequestsinqueue uint32 + + // + ActivityHostManagerNumberoffailedrequestsPersec uint32 + + // + ActivityHostManagerNumberofincomingrequestsPersec uint32 + + // + ActivityHostManagerNumberofpendingrequestsinqueue uint32 + + // + Numberoffailedworkflowjobs uint32 + + // + NumberoffailedworkflowjobsPersec uint32 + + // + Numberofresumedworkflowjobs uint32 + + // + NumberofresumedworkflowjobsPersec uint32 + + // + Numberofrunningworkflowjobs uint32 + + // + NumberofrunningworkflowjobsPersec uint32 + + // + Numberofstoppedworkflowjobs uint32 + + // + NumberofstoppedworkflowjobsPersec uint32 + + // + Numberofsucceededworkflowjobs uint32 + + // + NumberofsucceededworkflowjobsPersec uint32 + + // + Numberofsuspendedworkflowjobs uint32 + + // + NumberofsuspendedworkflowjobsPersec uint32 + + // + Numberofterminatedworkflowjobs uint32 + + // + NumberofterminatedworkflowjobsPersec uint32 + + // + Numberofwaitingworkflowjobs uint32 + + // + PowerShellRemotingNumberofconnectionsclosedreopened uint32 + + // + PowerShellRemotingNumberofcreatedconnections uint32 + + // + PowerShellRemotingNumberofdisposedconnections uint32 + + // + PowerShellRemotingNumberofforcedtowaitrequestsinqueue uint32 + + // + PowerShellRemotingNumberofpendingrequestsinqueue uint32 + + // + PowerShellRemotingNumberofrequestsbeingserviced uint32 +} + +func NewWin32_PerfFormattedData_Counters_PowerShellWorkflowEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_PowerShellWorkflow, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PowerShellWorkflow{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_PowerShellWorkflowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_PowerShellWorkflow, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_PowerShellWorkflow{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActivityHostManagerhostprocessespoolsize sets the value of ActivityHostManagerhostprocessespoolsize for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerhostprocessespoolsize(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerhostprocessespoolsize", (value)) +} + +// GetActivityHostManagerhostprocessespoolsize gets the value of ActivityHostManagerhostprocessespoolsize for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerhostprocessespoolsize() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerhostprocessespoolsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofbusyhostprocesses sets the value of ActivityHostManagerNumberofbusyhostprocesses for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofbusyhostprocesses(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofbusyhostprocesses", (value)) +} + +// GetActivityHostManagerNumberofbusyhostprocesses gets the value of ActivityHostManagerNumberofbusyhostprocesses for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofbusyhostprocesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofbusyhostprocesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofcreatedhostprocesses sets the value of ActivityHostManagerNumberofcreatedhostprocesses for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofcreatedhostprocesses(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofcreatedhostprocesses", (value)) +} + +// GetActivityHostManagerNumberofcreatedhostprocesses gets the value of ActivityHostManagerNumberofcreatedhostprocesses for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofcreatedhostprocesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofcreatedhostprocesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofdisposedhostprocesses sets the value of ActivityHostManagerNumberofdisposedhostprocesses for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofdisposedhostprocesses(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofdisposedhostprocesses", (value)) +} + +// GetActivityHostManagerNumberofdisposedhostprocesses gets the value of ActivityHostManagerNumberofdisposedhostprocesses for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofdisposedhostprocesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofdisposedhostprocesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberoffailedrequestsinqueue sets the value of ActivityHostManagerNumberoffailedrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberoffailedrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberoffailedrequestsinqueue", (value)) +} + +// GetActivityHostManagerNumberoffailedrequestsinqueue gets the value of ActivityHostManagerNumberoffailedrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberoffailedrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberoffailedrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberoffailedrequestsPersec sets the value of ActivityHostManagerNumberoffailedrequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberoffailedrequestsPersec(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberoffailedrequestsPersec", (value)) +} + +// GetActivityHostManagerNumberoffailedrequestsPersec gets the value of ActivityHostManagerNumberoffailedrequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberoffailedrequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberoffailedrequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofincomingrequestsPersec sets the value of ActivityHostManagerNumberofincomingrequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofincomingrequestsPersec(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofincomingrequestsPersec", (value)) +} + +// GetActivityHostManagerNumberofincomingrequestsPersec gets the value of ActivityHostManagerNumberofincomingrequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofincomingrequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofincomingrequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofpendingrequestsinqueue sets the value of ActivityHostManagerNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofpendingrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofpendingrequestsinqueue", (value)) +} + +// GetActivityHostManagerNumberofpendingrequestsinqueue gets the value of ActivityHostManagerNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofpendingrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofpendingrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoffailedworkflowjobs sets the value of Numberoffailedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberoffailedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberoffailedworkflowjobs", (value)) +} + +// GetNumberoffailedworkflowjobs gets the value of Numberoffailedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberoffailedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberoffailedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoffailedworkflowjobsPersec sets the value of NumberoffailedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberoffailedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberoffailedworkflowjobsPersec", (value)) +} + +// GetNumberoffailedworkflowjobsPersec gets the value of NumberoffailedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberoffailedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberoffailedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofresumedworkflowjobs sets the value of Numberofresumedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofresumedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofresumedworkflowjobs", (value)) +} + +// GetNumberofresumedworkflowjobs gets the value of Numberofresumedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofresumedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofresumedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofresumedworkflowjobsPersec sets the value of NumberofresumedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofresumedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofresumedworkflowjobsPersec", (value)) +} + +// GetNumberofresumedworkflowjobsPersec gets the value of NumberofresumedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofresumedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofresumedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofrunningworkflowjobs sets the value of Numberofrunningworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofrunningworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofrunningworkflowjobs", (value)) +} + +// GetNumberofrunningworkflowjobs gets the value of Numberofrunningworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofrunningworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofrunningworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofrunningworkflowjobsPersec sets the value of NumberofrunningworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofrunningworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofrunningworkflowjobsPersec", (value)) +} + +// GetNumberofrunningworkflowjobsPersec gets the value of NumberofrunningworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofrunningworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofrunningworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofstoppedworkflowjobs sets the value of Numberofstoppedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofstoppedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofstoppedworkflowjobs", (value)) +} + +// GetNumberofstoppedworkflowjobs gets the value of Numberofstoppedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofstoppedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofstoppedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofstoppedworkflowjobsPersec sets the value of NumberofstoppedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofstoppedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofstoppedworkflowjobsPersec", (value)) +} + +// GetNumberofstoppedworkflowjobsPersec gets the value of NumberofstoppedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofstoppedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofstoppedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsucceededworkflowjobs sets the value of Numberofsucceededworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofsucceededworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofsucceededworkflowjobs", (value)) +} + +// GetNumberofsucceededworkflowjobs gets the value of Numberofsucceededworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofsucceededworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofsucceededworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsucceededworkflowjobsPersec sets the value of NumberofsucceededworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofsucceededworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofsucceededworkflowjobsPersec", (value)) +} + +// GetNumberofsucceededworkflowjobsPersec gets the value of NumberofsucceededworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofsucceededworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofsucceededworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsuspendedworkflowjobs sets the value of Numberofsuspendedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofsuspendedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofsuspendedworkflowjobs", (value)) +} + +// GetNumberofsuspendedworkflowjobs gets the value of Numberofsuspendedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofsuspendedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofsuspendedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsuspendedworkflowjobsPersec sets the value of NumberofsuspendedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofsuspendedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofsuspendedworkflowjobsPersec", (value)) +} + +// GetNumberofsuspendedworkflowjobsPersec gets the value of NumberofsuspendedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofsuspendedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofsuspendedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofterminatedworkflowjobs sets the value of Numberofterminatedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofterminatedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofterminatedworkflowjobs", (value)) +} + +// GetNumberofterminatedworkflowjobs gets the value of Numberofterminatedworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofterminatedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofterminatedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofterminatedworkflowjobsPersec sets the value of NumberofterminatedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofterminatedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofterminatedworkflowjobsPersec", (value)) +} + +// GetNumberofterminatedworkflowjobsPersec gets the value of NumberofterminatedworkflowjobsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofterminatedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofterminatedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofwaitingworkflowjobs sets the value of Numberofwaitingworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyNumberofwaitingworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofwaitingworkflowjobs", (value)) +} + +// GetNumberofwaitingworkflowjobs gets the value of Numberofwaitingworkflowjobs for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyNumberofwaitingworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofwaitingworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofconnectionsclosedreopened sets the value of PowerShellRemotingNumberofconnectionsclosedreopened for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofconnectionsclosedreopened(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofconnectionsclosedreopened", (value)) +} + +// GetPowerShellRemotingNumberofconnectionsclosedreopened gets the value of PowerShellRemotingNumberofconnectionsclosedreopened for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofconnectionsclosedreopened() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofconnectionsclosedreopened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofcreatedconnections sets the value of PowerShellRemotingNumberofcreatedconnections for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofcreatedconnections(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofcreatedconnections", (value)) +} + +// GetPowerShellRemotingNumberofcreatedconnections gets the value of PowerShellRemotingNumberofcreatedconnections for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofcreatedconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofcreatedconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofdisposedconnections sets the value of PowerShellRemotingNumberofdisposedconnections for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofdisposedconnections(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofdisposedconnections", (value)) +} + +// GetPowerShellRemotingNumberofdisposedconnections gets the value of PowerShellRemotingNumberofdisposedconnections for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofdisposedconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofdisposedconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofforcedtowaitrequestsinqueue sets the value of PowerShellRemotingNumberofforcedtowaitrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofforcedtowaitrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofforcedtowaitrequestsinqueue", (value)) +} + +// GetPowerShellRemotingNumberofforcedtowaitrequestsinqueue gets the value of PowerShellRemotingNumberofforcedtowaitrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofforcedtowaitrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofforcedtowaitrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofpendingrequestsinqueue sets the value of PowerShellRemotingNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofpendingrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofpendingrequestsinqueue", (value)) +} + +// GetPowerShellRemotingNumberofpendingrequestsinqueue gets the value of PowerShellRemotingNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofpendingrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofpendingrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofrequestsbeingserviced sets the value of PowerShellRemotingNumberofrequestsbeingserviced for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofrequestsbeingserviced(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofrequestsbeingserviced", (value)) +} + +// GetPowerShellRemotingNumberofrequestsbeingserviced gets the value of PowerShellRemotingNumberofrequestsbeingserviced for the instance +func (instance *Win32_PerfFormattedData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofrequestsbeingserviced() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofrequestsbeingserviced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ProcessorInformation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ProcessorInformation.go new file mode 100644 index 00000000..404f95fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ProcessorInformation.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_ProcessorInformation struct +type Win32_PerfFormattedData_Counters_ProcessorInformation struct { + *Win32_PerfFormattedData + + // + AverageIdleTime uint64 + + // + C1TransitionsPersec uint64 + + // + C2TransitionsPersec uint64 + + // + C3TransitionsPersec uint64 + + // + ClockInterruptsPersec uint32 + + // + DPCRate uint32 + + // + DPCsQueuedPersec uint32 + + // + IdleBreakEventsPersec uint64 + + // + InterruptsPersec uint32 + + // + ParkingStatus uint32 + + // + PercentC1Time uint64 + + // + PercentC2Time uint64 + + // + PercentC3Time uint64 + + // + PercentDPCTime uint64 + + // + PercentIdleTime uint64 + + // + PercentInterruptTime uint64 + + // + PercentofMaximumFrequency uint32 + + // + PercentPerformanceLimit uint32 + + // + PercentPriorityTime uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentPrivilegedUtility uint64 + + // + PercentProcessorPerformance uint64 + + // + PercentProcessorTime uint64 + + // + PercentProcessorUtility uint64 + + // + PercentUserTime uint64 + + // + PerformanceLimitFlags uint32 + + // + ProcessorFrequency uint32 + + // + ProcessorStateFlags uint32 +} + +func NewWin32_PerfFormattedData_Counters_ProcessorInformationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_ProcessorInformation, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_ProcessorInformation{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_ProcessorInformationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_ProcessorInformation, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_ProcessorInformation{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageIdleTime sets the value of AverageIdleTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyAverageIdleTime(value uint64) (err error) { + return instance.SetProperty("AverageIdleTime", (value)) +} + +// GetAverageIdleTime gets the value of AverageIdleTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyAverageIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC1TransitionsPersec sets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyC1TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C1TransitionsPersec", (value)) +} + +// GetC1TransitionsPersec gets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyC1TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C1TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC2TransitionsPersec sets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyC2TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C2TransitionsPersec", (value)) +} + +// GetC2TransitionsPersec gets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyC2TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C2TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC3TransitionsPersec sets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyC3TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C3TransitionsPersec", (value)) +} + +// GetC3TransitionsPersec gets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyC3TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C3TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClockInterruptsPersec sets the value of ClockInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyClockInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("ClockInterruptsPersec", (value)) +} + +// GetClockInterruptsPersec gets the value of ClockInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyClockInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClockInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCRate sets the value of DPCRate for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyDPCRate(value uint32) (err error) { + return instance.SetProperty("DPCRate", (value)) +} + +// GetDPCRate gets the value of DPCRate for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyDPCRate() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCsQueuedPersec sets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyDPCsQueuedPersec(value uint32) (err error) { + return instance.SetProperty("DPCsQueuedPersec", (value)) +} + +// GetDPCsQueuedPersec gets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyDPCsQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCsQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIdleBreakEventsPersec sets the value of IdleBreakEventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyIdleBreakEventsPersec(value uint64) (err error) { + return instance.SetProperty("IdleBreakEventsPersec", (value)) +} + +// GetIdleBreakEventsPersec gets the value of IdleBreakEventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyIdleBreakEventsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IdleBreakEventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetParkingStatus sets the value of ParkingStatus for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyParkingStatus(value uint32) (err error) { + return instance.SetProperty("ParkingStatus", (value)) +} + +// GetParkingStatus gets the value of ParkingStatus for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyParkingStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("ParkingStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentC1Time sets the value of PercentC1Time for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentC1Time(value uint64) (err error) { + return instance.SetProperty("PercentC1Time", (value)) +} + +// GetPercentC1Time gets the value of PercentC1Time for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentC1Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time sets the value of PercentC2Time for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentC2Time(value uint64) (err error) { + return instance.SetProperty("PercentC2Time", (value)) +} + +// GetPercentC2Time gets the value of PercentC2Time for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentC2Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time sets the value of PercentC3Time for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentC3Time(value uint64) (err error) { + return instance.SetProperty("PercentC3Time", (value)) +} + +// GetPercentC3Time gets the value of PercentC3Time for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentC3Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDPCTime sets the value of PercentDPCTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentDPCTime(value uint64) (err error) { + return instance.SetProperty("PercentDPCTime", (value)) +} + +// GetPercentDPCTime gets the value of PercentDPCTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentDPCTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDPCTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentInterruptTime sets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentInterruptTime(value uint64) (err error) { + return instance.SetProperty("PercentInterruptTime", (value)) +} + +// GetPercentInterruptTime gets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentInterruptTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentInterruptTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentofMaximumFrequency sets the value of PercentofMaximumFrequency for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentofMaximumFrequency(value uint32) (err error) { + return instance.SetProperty("PercentofMaximumFrequency", (value)) +} + +// GetPercentofMaximumFrequency gets the value of PercentofMaximumFrequency for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentofMaximumFrequency() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentofMaximumFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPerformanceLimit sets the value of PercentPerformanceLimit for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentPerformanceLimit(value uint32) (err error) { + return instance.SetProperty("PercentPerformanceLimit", (value)) +} + +// GetPercentPerformanceLimit gets the value of PercentPerformanceLimit for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentPerformanceLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentPerformanceLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPriorityTime sets the value of PercentPriorityTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentPriorityTime(value uint64) (err error) { + return instance.SetProperty("PercentPriorityTime", (value)) +} + +// GetPercentPriorityTime gets the value of PercentPriorityTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentPriorityTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPriorityTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedUtility sets the value of PercentPrivilegedUtility for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentPrivilegedUtility(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedUtility", (value)) +} + +// GetPercentPrivilegedUtility gets the value of PercentPrivilegedUtility for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentPrivilegedUtility() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedUtility") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorPerformance sets the value of PercentProcessorPerformance for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentProcessorPerformance(value uint64) (err error) { + return instance.SetProperty("PercentProcessorPerformance", (value)) +} + +// GetPercentProcessorPerformance gets the value of PercentProcessorPerformance for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentProcessorPerformance() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorPerformance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorUtility sets the value of PercentProcessorUtility for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentProcessorUtility(value uint64) (err error) { + return instance.SetProperty("PercentProcessorUtility", (value)) +} + +// GetPercentProcessorUtility gets the value of PercentProcessorUtility for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentProcessorUtility() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorUtility") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPerformanceLimitFlags sets the value of PerformanceLimitFlags for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyPerformanceLimitFlags(value uint32) (err error) { + return instance.SetProperty("PerformanceLimitFlags", (value)) +} + +// GetPerformanceLimitFlags gets the value of PerformanceLimitFlags for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyPerformanceLimitFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("PerformanceLimitFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessorFrequency sets the value of ProcessorFrequency for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyProcessorFrequency(value uint32) (err error) { + return instance.SetProperty("ProcessorFrequency", (value)) +} + +// GetProcessorFrequency gets the value of ProcessorFrequency for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyProcessorFrequency() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessorStateFlags sets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) SetPropertyProcessorStateFlags(value uint32) (err error) { + return instance.SetProperty("ProcessorStateFlags", (value)) +} + +// GetProcessorStateFlags gets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfFormattedData_Counters_ProcessorInformation) GetPropertyProcessorStateFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorStateFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RDMAActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RDMAActivity.go new file mode 100644 index 00000000..7a3702d1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RDMAActivity.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_RDMAActivity struct +type Win32_PerfFormattedData_Counters_RDMAActivity struct { + *Win32_PerfFormattedData + + // + RDMAAcceptedConnections uint32 + + // + RDMAActiveConnections uint32 + + // + RDMACompletionQueueErrors uint32 + + // + RDMAConnectionErrors uint32 + + // + RDMAFailedConnectionAttempts uint32 + + // + RDMAInboundBytesPersec uint64 + + // + RDMAInboundFramesPersec uint64 + + // + RDMAInitiatedConnections uint32 + + // + RDMAOutboundBytesPersec uint64 + + // + RDMAOutboundFramesPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_RDMAActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_RDMAActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_RDMAActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_RDMAActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_RDMAActivity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_RDMAActivity{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetRDMAAcceptedConnections sets the value of RDMAAcceptedConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAAcceptedConnections(value uint32) (err error) { + return instance.SetProperty("RDMAAcceptedConnections", (value)) +} + +// GetRDMAAcceptedConnections gets the value of RDMAAcceptedConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAAcceptedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAAcceptedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAActiveConnections sets the value of RDMAActiveConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAActiveConnections(value uint32) (err error) { + return instance.SetProperty("RDMAActiveConnections", (value)) +} + +// GetRDMAActiveConnections gets the value of RDMAActiveConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAActiveConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAActiveConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMACompletionQueueErrors sets the value of RDMACompletionQueueErrors for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMACompletionQueueErrors(value uint32) (err error) { + return instance.SetProperty("RDMACompletionQueueErrors", (value)) +} + +// GetRDMACompletionQueueErrors gets the value of RDMACompletionQueueErrors for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMACompletionQueueErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMACompletionQueueErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAConnectionErrors sets the value of RDMAConnectionErrors for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAConnectionErrors(value uint32) (err error) { + return instance.SetProperty("RDMAConnectionErrors", (value)) +} + +// GetRDMAConnectionErrors gets the value of RDMAConnectionErrors for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAConnectionErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAConnectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAFailedConnectionAttempts sets the value of RDMAFailedConnectionAttempts for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAFailedConnectionAttempts(value uint32) (err error) { + return instance.SetProperty("RDMAFailedConnectionAttempts", (value)) +} + +// GetRDMAFailedConnectionAttempts gets the value of RDMAFailedConnectionAttempts for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAFailedConnectionAttempts() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAFailedConnectionAttempts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAInboundBytesPersec sets the value of RDMAInboundBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAInboundBytesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAInboundBytesPersec", (value)) +} + +// GetRDMAInboundBytesPersec gets the value of RDMAInboundBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAInboundBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAInboundBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRDMAInboundFramesPersec sets the value of RDMAInboundFramesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAInboundFramesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAInboundFramesPersec", (value)) +} + +// GetRDMAInboundFramesPersec gets the value of RDMAInboundFramesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAInboundFramesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAInboundFramesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRDMAInitiatedConnections sets the value of RDMAInitiatedConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAInitiatedConnections(value uint32) (err error) { + return instance.SetProperty("RDMAInitiatedConnections", (value)) +} + +// GetRDMAInitiatedConnections gets the value of RDMAInitiatedConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAInitiatedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAInitiatedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAOutboundBytesPersec sets the value of RDMAOutboundBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAOutboundBytesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAOutboundBytesPersec", (value)) +} + +// GetRDMAOutboundBytesPersec gets the value of RDMAOutboundBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAOutboundBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAOutboundBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRDMAOutboundFramesPersec sets the value of RDMAOutboundFramesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) SetPropertyRDMAOutboundFramesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAOutboundFramesPersec", (value)) +} + +// GetRDMAOutboundFramesPersec gets the value of RDMAOutboundFramesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RDMAActivity) GetPropertyRDMAOutboundFramesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAOutboundFramesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ReFS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ReFS.go new file mode 100644 index 00000000..75364db7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ReFS.go @@ -0,0 +1,1190 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_ReFS struct +type Win32_PerfFormattedData_Counters_ReFS struct { + *Win32_PerfFormattedData + + // + AllocationofDataClustersonFastTierPersec uint64 + + // + AllocationofDataClustersonSlowTierPersec uint64 + + // + AllocationofMetadataClustersonFastTierPersec uint64 + + // + AllocationofMetadataClustersonSlowTierPersec uint64 + + // + Checkpointlatency100ns uint64 + + // + CheckpointsPersec uint64 + + // + CompactedContainerFillRatioPercent uint64 + + // + CompactionFailureCount uint32 + + // + Compactionreadlatency100ns uint64 + + // + Compactionsfailedduetoineligiblecontainer uint32 + + // + Compactionsfailedduetomaxfragmentation uint32 + + // + Compactionwritelatency100ns uint64 + + // + ContainerDestagesFromFastTierPersec uint64 + + // + ContainerDestagesFromSlowTierPersec uint64 + + // + ContainerMoveFailureCount uint32 + + // + ContainerMoveRetryCount uint32 + + // + Containermovesfailedduetoineligiblecontainer uint32 + + // + CurrentFastTierDataFillPercentage uint32 + + // + CurrentFastTierMetadataFillPercentage uint32 + + // + CurrentSlowTierDataFillPercentage uint32 + + // + CurrentSlowTierMetadataFillPercentage uint32 + + // + DataCompactionsPersec uint64 + + // + DataInPlaceWriteClustersPersec uint64 + + // + DeleteQueueentries uint32 + + // + Dirtymetadatapages uint64 + + // + Dirtytablelistentries uint32 + + // + FastTierDestagedContainerFillRatioPercent uint64 + + // + Fasttierdestagereadlatency100ns uint64 + + // + Fasttierdestagewritelatency100ns uint64 + + // + Logfillpercentage uint32 + + // + LogwritesPersec uint64 + + // + SlowTierDestagedContainerFillRatioPercent uint64 + + // + Slowtierdestagereadlatency100ns uint64 + + // + Slowtierdestagewritelatency100ns uint64 + + // + TotalAllocationofClustersPersec uint64 + + // + Treeupdatelatency100ns uint64 + + // + TreeupdatesPersec uint64 + + // + Trimlatency100ns uint64 +} + +func NewWin32_PerfFormattedData_Counters_ReFSEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_ReFS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_ReFS{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_ReFSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_ReFS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_ReFS{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAllocationofDataClustersonFastTierPersec sets the value of AllocationofDataClustersonFastTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyAllocationofDataClustersonFastTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofDataClustersonFastTierPersec", (value)) +} + +// GetAllocationofDataClustersonFastTierPersec gets the value of AllocationofDataClustersonFastTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyAllocationofDataClustersonFastTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofDataClustersonFastTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationofDataClustersonSlowTierPersec sets the value of AllocationofDataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyAllocationofDataClustersonSlowTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofDataClustersonSlowTierPersec", (value)) +} + +// GetAllocationofDataClustersonSlowTierPersec gets the value of AllocationofDataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyAllocationofDataClustersonSlowTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofDataClustersonSlowTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationofMetadataClustersonFastTierPersec sets the value of AllocationofMetadataClustersonFastTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyAllocationofMetadataClustersonFastTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofMetadataClustersonFastTierPersec", (value)) +} + +// GetAllocationofMetadataClustersonFastTierPersec gets the value of AllocationofMetadataClustersonFastTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyAllocationofMetadataClustersonFastTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofMetadataClustersonFastTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationofMetadataClustersonSlowTierPersec sets the value of AllocationofMetadataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyAllocationofMetadataClustersonSlowTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofMetadataClustersonSlowTierPersec", (value)) +} + +// GetAllocationofMetadataClustersonSlowTierPersec gets the value of AllocationofMetadataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyAllocationofMetadataClustersonSlowTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofMetadataClustersonSlowTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCheckpointlatency100ns sets the value of Checkpointlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCheckpointlatency100ns(value uint64) (err error) { + return instance.SetProperty("Checkpointlatency100ns", (value)) +} + +// GetCheckpointlatency100ns gets the value of Checkpointlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCheckpointlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Checkpointlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCheckpointsPersec sets the value of CheckpointsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCheckpointsPersec(value uint64) (err error) { + return instance.SetProperty("CheckpointsPersec", (value)) +} + +// GetCheckpointsPersec gets the value of CheckpointsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCheckpointsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CheckpointsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactedContainerFillRatioPercent sets the value of CompactedContainerFillRatioPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCompactedContainerFillRatioPercent(value uint64) (err error) { + return instance.SetProperty("CompactedContainerFillRatioPercent", (value)) +} + +// GetCompactedContainerFillRatioPercent gets the value of CompactedContainerFillRatioPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCompactedContainerFillRatioPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CompactedContainerFillRatioPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactionFailureCount sets the value of CompactionFailureCount for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCompactionFailureCount(value uint32) (err error) { + return instance.SetProperty("CompactionFailureCount", (value)) +} + +// GetCompactionFailureCount gets the value of CompactionFailureCount for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCompactionFailureCount() (value uint32, err error) { + retValue, err := instance.GetProperty("CompactionFailureCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionreadlatency100ns sets the value of Compactionreadlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCompactionreadlatency100ns(value uint64) (err error) { + return instance.SetProperty("Compactionreadlatency100ns", (value)) +} + +// GetCompactionreadlatency100ns gets the value of Compactionreadlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCompactionreadlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Compactionreadlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactionsfailedduetoineligiblecontainer sets the value of Compactionsfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCompactionsfailedduetoineligiblecontainer(value uint32) (err error) { + return instance.SetProperty("Compactionsfailedduetoineligiblecontainer", (value)) +} + +// GetCompactionsfailedduetoineligiblecontainer gets the value of Compactionsfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCompactionsfailedduetoineligiblecontainer() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactionsfailedduetoineligiblecontainer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionsfailedduetomaxfragmentation sets the value of Compactionsfailedduetomaxfragmentation for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCompactionsfailedduetomaxfragmentation(value uint32) (err error) { + return instance.SetProperty("Compactionsfailedduetomaxfragmentation", (value)) +} + +// GetCompactionsfailedduetomaxfragmentation gets the value of Compactionsfailedduetomaxfragmentation for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCompactionsfailedduetomaxfragmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactionsfailedduetomaxfragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionwritelatency100ns sets the value of Compactionwritelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCompactionwritelatency100ns(value uint64) (err error) { + return instance.SetProperty("Compactionwritelatency100ns", (value)) +} + +// GetCompactionwritelatency100ns gets the value of Compactionwritelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCompactionwritelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Compactionwritelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContainerDestagesFromFastTierPersec sets the value of ContainerDestagesFromFastTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyContainerDestagesFromFastTierPersec(value uint64) (err error) { + return instance.SetProperty("ContainerDestagesFromFastTierPersec", (value)) +} + +// GetContainerDestagesFromFastTierPersec gets the value of ContainerDestagesFromFastTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyContainerDestagesFromFastTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ContainerDestagesFromFastTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContainerDestagesFromSlowTierPersec sets the value of ContainerDestagesFromSlowTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyContainerDestagesFromSlowTierPersec(value uint64) (err error) { + return instance.SetProperty("ContainerDestagesFromSlowTierPersec", (value)) +} + +// GetContainerDestagesFromSlowTierPersec gets the value of ContainerDestagesFromSlowTierPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyContainerDestagesFromSlowTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ContainerDestagesFromSlowTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContainerMoveFailureCount sets the value of ContainerMoveFailureCount for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyContainerMoveFailureCount(value uint32) (err error) { + return instance.SetProperty("ContainerMoveFailureCount", (value)) +} + +// GetContainerMoveFailureCount gets the value of ContainerMoveFailureCount for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyContainerMoveFailureCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ContainerMoveFailureCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContainerMoveRetryCount sets the value of ContainerMoveRetryCount for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyContainerMoveRetryCount(value uint32) (err error) { + return instance.SetProperty("ContainerMoveRetryCount", (value)) +} + +// GetContainerMoveRetryCount gets the value of ContainerMoveRetryCount for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyContainerMoveRetryCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ContainerMoveRetryCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContainermovesfailedduetoineligiblecontainer sets the value of Containermovesfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyContainermovesfailedduetoineligiblecontainer(value uint32) (err error) { + return instance.SetProperty("Containermovesfailedduetoineligiblecontainer", (value)) +} + +// GetContainermovesfailedduetoineligiblecontainer gets the value of Containermovesfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyContainermovesfailedduetoineligiblecontainer() (value uint32, err error) { + retValue, err := instance.GetProperty("Containermovesfailedduetoineligiblecontainer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentFastTierDataFillPercentage sets the value of CurrentFastTierDataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCurrentFastTierDataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentFastTierDataFillPercentage", (value)) +} + +// GetCurrentFastTierDataFillPercentage gets the value of CurrentFastTierDataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCurrentFastTierDataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentFastTierDataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentFastTierMetadataFillPercentage sets the value of CurrentFastTierMetadataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCurrentFastTierMetadataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentFastTierMetadataFillPercentage", (value)) +} + +// GetCurrentFastTierMetadataFillPercentage gets the value of CurrentFastTierMetadataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCurrentFastTierMetadataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentFastTierMetadataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentSlowTierDataFillPercentage sets the value of CurrentSlowTierDataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCurrentSlowTierDataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentSlowTierDataFillPercentage", (value)) +} + +// GetCurrentSlowTierDataFillPercentage gets the value of CurrentSlowTierDataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCurrentSlowTierDataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSlowTierDataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentSlowTierMetadataFillPercentage sets the value of CurrentSlowTierMetadataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyCurrentSlowTierMetadataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentSlowTierMetadataFillPercentage", (value)) +} + +// GetCurrentSlowTierMetadataFillPercentage gets the value of CurrentSlowTierMetadataFillPercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyCurrentSlowTierMetadataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSlowTierMetadataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataCompactionsPersec sets the value of DataCompactionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyDataCompactionsPersec(value uint64) (err error) { + return instance.SetProperty("DataCompactionsPersec", (value)) +} + +// GetDataCompactionsPersec gets the value of DataCompactionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyDataCompactionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataCompactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataInPlaceWriteClustersPersec sets the value of DataInPlaceWriteClustersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyDataInPlaceWriteClustersPersec(value uint64) (err error) { + return instance.SetProperty("DataInPlaceWriteClustersPersec", (value)) +} + +// GetDataInPlaceWriteClustersPersec gets the value of DataInPlaceWriteClustersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyDataInPlaceWriteClustersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataInPlaceWriteClustersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeleteQueueentries sets the value of DeleteQueueentries for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyDeleteQueueentries(value uint32) (err error) { + return instance.SetProperty("DeleteQueueentries", (value)) +} + +// GetDeleteQueueentries gets the value of DeleteQueueentries for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyDeleteQueueentries() (value uint32, err error) { + retValue, err := instance.GetProperty("DeleteQueueentries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirtymetadatapages sets the value of Dirtymetadatapages for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyDirtymetadatapages(value uint64) (err error) { + return instance.SetProperty("Dirtymetadatapages", (value)) +} + +// GetDirtymetadatapages gets the value of Dirtymetadatapages for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyDirtymetadatapages() (value uint64, err error) { + retValue, err := instance.GetProperty("Dirtymetadatapages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtytablelistentries sets the value of Dirtytablelistentries for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyDirtytablelistentries(value uint32) (err error) { + return instance.SetProperty("Dirtytablelistentries", (value)) +} + +// GetDirtytablelistentries gets the value of Dirtytablelistentries for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyDirtytablelistentries() (value uint32, err error) { + retValue, err := instance.GetProperty("Dirtytablelistentries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFastTierDestagedContainerFillRatioPercent sets the value of FastTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyFastTierDestagedContainerFillRatioPercent(value uint64) (err error) { + return instance.SetProperty("FastTierDestagedContainerFillRatioPercent", (value)) +} + +// GetFastTierDestagedContainerFillRatioPercent gets the value of FastTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyFastTierDestagedContainerFillRatioPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("FastTierDestagedContainerFillRatioPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFasttierdestagereadlatency100ns sets the value of Fasttierdestagereadlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyFasttierdestagereadlatency100ns(value uint64) (err error) { + return instance.SetProperty("Fasttierdestagereadlatency100ns", (value)) +} + +// GetFasttierdestagereadlatency100ns gets the value of Fasttierdestagereadlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyFasttierdestagereadlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Fasttierdestagereadlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFasttierdestagewritelatency100ns sets the value of Fasttierdestagewritelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyFasttierdestagewritelatency100ns(value uint64) (err error) { + return instance.SetProperty("Fasttierdestagewritelatency100ns", (value)) +} + +// GetFasttierdestagewritelatency100ns gets the value of Fasttierdestagewritelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyFasttierdestagewritelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Fasttierdestagewritelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogfillpercentage sets the value of Logfillpercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyLogfillpercentage(value uint32) (err error) { + return instance.SetProperty("Logfillpercentage", (value)) +} + +// GetLogfillpercentage gets the value of Logfillpercentage for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyLogfillpercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("Logfillpercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogwritesPersec sets the value of LogwritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyLogwritesPersec(value uint64) (err error) { + return instance.SetProperty("LogwritesPersec", (value)) +} + +// GetLogwritesPersec gets the value of LogwritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyLogwritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogwritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowTierDestagedContainerFillRatioPercent sets the value of SlowTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertySlowTierDestagedContainerFillRatioPercent(value uint64) (err error) { + return instance.SetProperty("SlowTierDestagedContainerFillRatioPercent", (value)) +} + +// GetSlowTierDestagedContainerFillRatioPercent gets the value of SlowTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertySlowTierDestagedContainerFillRatioPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("SlowTierDestagedContainerFillRatioPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowtierdestagereadlatency100ns sets the value of Slowtierdestagereadlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertySlowtierdestagereadlatency100ns(value uint64) (err error) { + return instance.SetProperty("Slowtierdestagereadlatency100ns", (value)) +} + +// GetSlowtierdestagereadlatency100ns gets the value of Slowtierdestagereadlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertySlowtierdestagereadlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Slowtierdestagereadlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowtierdestagewritelatency100ns sets the value of Slowtierdestagewritelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertySlowtierdestagewritelatency100ns(value uint64) (err error) { + return instance.SetProperty("Slowtierdestagewritelatency100ns", (value)) +} + +// GetSlowtierdestagewritelatency100ns gets the value of Slowtierdestagewritelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertySlowtierdestagewritelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Slowtierdestagewritelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalAllocationofClustersPersec sets the value of TotalAllocationofClustersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyTotalAllocationofClustersPersec(value uint64) (err error) { + return instance.SetProperty("TotalAllocationofClustersPersec", (value)) +} + +// GetTotalAllocationofClustersPersec gets the value of TotalAllocationofClustersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyTotalAllocationofClustersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalAllocationofClustersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeupdatelatency100ns sets the value of Treeupdatelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyTreeupdatelatency100ns(value uint64) (err error) { + return instance.SetProperty("Treeupdatelatency100ns", (value)) +} + +// GetTreeupdatelatency100ns gets the value of Treeupdatelatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyTreeupdatelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Treeupdatelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeupdatesPersec sets the value of TreeupdatesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyTreeupdatesPersec(value uint64) (err error) { + return instance.SetProperty("TreeupdatesPersec", (value)) +} + +// GetTreeupdatesPersec gets the value of TreeupdatesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyTreeupdatesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TreeupdatesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrimlatency100ns sets the value of Trimlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) SetPropertyTrimlatency100ns(value uint64) (err error) { + return instance.SetProperty("Trimlatency100ns", (value)) +} + +// GetTrimlatency100ns gets the value of Trimlatency100ns for the instance +func (instance *Win32_PerfFormattedData_Counters_ReFS) GetPropertyTrimlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Trimlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXGraphics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXGraphics.go new file mode 100644 index 00000000..ef336cd6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXGraphics.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_RemoteFXGraphics struct +type Win32_PerfFormattedData_Counters_RemoteFXGraphics struct { + *Win32_PerfFormattedData + + // + AverageEncodingTime uint32 + + // + FrameQuality uint32 + + // + FramesSkippedPerSecondInsufficientClientResources uint32 + + // + FramesSkippedPerSecondInsufficientNetworkResources uint32 + + // + FramesSkippedPerSecondInsufficientServerResources uint32 + + // + GraphicsCompressionratio uint32 + + // + InputFramesPerSecond uint32 + + // + OutputFramesPerSecond uint32 + + // + SourceFramesPerSecond uint32 +} + +func NewWin32_PerfFormattedData_Counters_RemoteFXGraphicsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_RemoteFXGraphics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_RemoteFXGraphics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_RemoteFXGraphicsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_RemoteFXGraphics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_RemoteFXGraphics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageEncodingTime sets the value of AverageEncodingTime for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyAverageEncodingTime(value uint32) (err error) { + return instance.SetProperty("AverageEncodingTime", (value)) +} + +// GetAverageEncodingTime gets the value of AverageEncodingTime for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyAverageEncodingTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageEncodingTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFrameQuality sets the value of FrameQuality for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyFrameQuality(value uint32) (err error) { + return instance.SetProperty("FrameQuality", (value)) +} + +// GetFrameQuality gets the value of FrameQuality for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyFrameQuality() (value uint32, err error) { + retValue, err := instance.GetProperty("FrameQuality") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesSkippedPerSecondInsufficientClientResources sets the value of FramesSkippedPerSecondInsufficientClientResources for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyFramesSkippedPerSecondInsufficientClientResources(value uint32) (err error) { + return instance.SetProperty("FramesSkippedPerSecondInsufficientClientResources", (value)) +} + +// GetFramesSkippedPerSecondInsufficientClientResources gets the value of FramesSkippedPerSecondInsufficientClientResources for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyFramesSkippedPerSecondInsufficientClientResources() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesSkippedPerSecondInsufficientClientResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesSkippedPerSecondInsufficientNetworkResources sets the value of FramesSkippedPerSecondInsufficientNetworkResources for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyFramesSkippedPerSecondInsufficientNetworkResources(value uint32) (err error) { + return instance.SetProperty("FramesSkippedPerSecondInsufficientNetworkResources", (value)) +} + +// GetFramesSkippedPerSecondInsufficientNetworkResources gets the value of FramesSkippedPerSecondInsufficientNetworkResources for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyFramesSkippedPerSecondInsufficientNetworkResources() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesSkippedPerSecondInsufficientNetworkResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesSkippedPerSecondInsufficientServerResources sets the value of FramesSkippedPerSecondInsufficientServerResources for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyFramesSkippedPerSecondInsufficientServerResources(value uint32) (err error) { + return instance.SetProperty("FramesSkippedPerSecondInsufficientServerResources", (value)) +} + +// GetFramesSkippedPerSecondInsufficientServerResources gets the value of FramesSkippedPerSecondInsufficientServerResources for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyFramesSkippedPerSecondInsufficientServerResources() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesSkippedPerSecondInsufficientServerResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGraphicsCompressionratio sets the value of GraphicsCompressionratio for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyGraphicsCompressionratio(value uint32) (err error) { + return instance.SetProperty("GraphicsCompressionratio", (value)) +} + +// GetGraphicsCompressionratio gets the value of GraphicsCompressionratio for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyGraphicsCompressionratio() (value uint32, err error) { + retValue, err := instance.GetProperty("GraphicsCompressionratio") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInputFramesPerSecond sets the value of InputFramesPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyInputFramesPerSecond(value uint32) (err error) { + return instance.SetProperty("InputFramesPerSecond", (value)) +} + +// GetInputFramesPerSecond gets the value of InputFramesPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyInputFramesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("InputFramesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutputFramesPerSecond sets the value of OutputFramesPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertyOutputFramesPerSecond(value uint32) (err error) { + return instance.SetProperty("OutputFramesPerSecond", (value)) +} + +// GetOutputFramesPerSecond gets the value of OutputFramesPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertyOutputFramesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("OutputFramesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSourceFramesPerSecond sets the value of SourceFramesPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) SetPropertySourceFramesPerSecond(value uint32) (err error) { + return instance.SetProperty("SourceFramesPerSecond", (value)) +} + +// GetSourceFramesPerSecond gets the value of SourceFramesPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXGraphics) GetPropertySourceFramesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SourceFramesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXNetwork.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXNetwork.go new file mode 100644 index 00000000..cbc398f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_RemoteFXNetwork.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_RemoteFXNetwork struct +type Win32_PerfFormattedData_Counters_RemoteFXNetwork struct { + *Win32_PerfFormattedData + + // + BaseTCPRTT uint32 + + // + BaseUDPRTT uint32 + + // + CurrentTCPBandwidth uint32 + + // + CurrentTCPRTT uint32 + + // + CurrentUDPBandwidth uint32 + + // + CurrentUDPRTT uint32 + + // + FECRate uint32 + + // + LossRate uint32 + + // + RetransmissionRate uint32 + + // + SentRateP0 uint32 + + // + SentRateP1 uint32 + + // + SentRateP2 uint32 + + // + SentRateP3 uint32 + + // + TCPReceivedRate uint32 + + // + TCPSentRate uint32 + + // + TotalReceivedBytes uint32 + + // + TotalReceivedRate uint32 + + // + TotalSentBytes uint32 + + // + TotalSentRate uint32 + + // + UDPPacketsReceivedPersec uint32 + + // + UDPPacketsSentPersec uint32 + + // + UDPReceivedRate uint32 + + // + UDPSentRate uint32 +} + +func NewWin32_PerfFormattedData_Counters_RemoteFXNetworkEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_RemoteFXNetwork, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_RemoteFXNetwork{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_RemoteFXNetworkEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_RemoteFXNetwork, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_RemoteFXNetwork{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBaseTCPRTT sets the value of BaseTCPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyBaseTCPRTT(value uint32) (err error) { + return instance.SetProperty("BaseTCPRTT", (value)) +} + +// GetBaseTCPRTT gets the value of BaseTCPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyBaseTCPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("BaseTCPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBaseUDPRTT sets the value of BaseUDPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyBaseUDPRTT(value uint32) (err error) { + return instance.SetProperty("BaseUDPRTT", (value)) +} + +// GetBaseUDPRTT gets the value of BaseUDPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyBaseUDPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("BaseUDPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentTCPBandwidth sets the value of CurrentTCPBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyCurrentTCPBandwidth(value uint32) (err error) { + return instance.SetProperty("CurrentTCPBandwidth", (value)) +} + +// GetCurrentTCPBandwidth gets the value of CurrentTCPBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyCurrentTCPBandwidth() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentTCPBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentTCPRTT sets the value of CurrentTCPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyCurrentTCPRTT(value uint32) (err error) { + return instance.SetProperty("CurrentTCPRTT", (value)) +} + +// GetCurrentTCPRTT gets the value of CurrentTCPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyCurrentTCPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentTCPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUDPBandwidth sets the value of CurrentUDPBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyCurrentUDPBandwidth(value uint32) (err error) { + return instance.SetProperty("CurrentUDPBandwidth", (value)) +} + +// GetCurrentUDPBandwidth gets the value of CurrentUDPBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyCurrentUDPBandwidth() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUDPBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUDPRTT sets the value of CurrentUDPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyCurrentUDPRTT(value uint32) (err error) { + return instance.SetProperty("CurrentUDPRTT", (value)) +} + +// GetCurrentUDPRTT gets the value of CurrentUDPRTT for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyCurrentUDPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUDPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFECRate sets the value of FECRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyFECRate(value uint32) (err error) { + return instance.SetProperty("FECRate", (value)) +} + +// GetFECRate gets the value of FECRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyFECRate() (value uint32, err error) { + retValue, err := instance.GetProperty("FECRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLossRate sets the value of LossRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyLossRate(value uint32) (err error) { + return instance.SetProperty("LossRate", (value)) +} + +// GetLossRate gets the value of LossRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyLossRate() (value uint32, err error) { + retValue, err := instance.GetProperty("LossRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRetransmissionRate sets the value of RetransmissionRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyRetransmissionRate(value uint32) (err error) { + return instance.SetProperty("RetransmissionRate", (value)) +} + +// GetRetransmissionRate gets the value of RetransmissionRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyRetransmissionRate() (value uint32, err error) { + retValue, err := instance.GetProperty("RetransmissionRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP0 sets the value of SentRateP0 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertySentRateP0(value uint32) (err error) { + return instance.SetProperty("SentRateP0", (value)) +} + +// GetSentRateP0 gets the value of SentRateP0 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertySentRateP0() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP1 sets the value of SentRateP1 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertySentRateP1(value uint32) (err error) { + return instance.SetProperty("SentRateP1", (value)) +} + +// GetSentRateP1 gets the value of SentRateP1 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertySentRateP1() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP2 sets the value of SentRateP2 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertySentRateP2(value uint32) (err error) { + return instance.SetProperty("SentRateP2", (value)) +} + +// GetSentRateP2 gets the value of SentRateP2 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertySentRateP2() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP3 sets the value of SentRateP3 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertySentRateP3(value uint32) (err error) { + return instance.SetProperty("SentRateP3", (value)) +} + +// GetSentRateP3 gets the value of SentRateP3 for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertySentRateP3() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPReceivedRate sets the value of TCPReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyTCPReceivedRate(value uint32) (err error) { + return instance.SetProperty("TCPReceivedRate", (value)) +} + +// GetTCPReceivedRate gets the value of TCPReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyTCPReceivedRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPSentRate sets the value of TCPSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyTCPSentRate(value uint32) (err error) { + return instance.SetProperty("TCPSentRate", (value)) +} + +// GetTCPSentRate gets the value of TCPSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyTCPSentRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalReceivedBytes sets the value of TotalReceivedBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyTotalReceivedBytes(value uint32) (err error) { + return instance.SetProperty("TotalReceivedBytes", (value)) +} + +// GetTotalReceivedBytes gets the value of TotalReceivedBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyTotalReceivedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalReceivedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalReceivedRate sets the value of TotalReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyTotalReceivedRate(value uint32) (err error) { + return instance.SetProperty("TotalReceivedRate", (value)) +} + +// GetTotalReceivedRate gets the value of TotalReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyTotalReceivedRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSentBytes sets the value of TotalSentBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyTotalSentBytes(value uint32) (err error) { + return instance.SetProperty("TotalSentBytes", (value)) +} + +// GetTotalSentBytes gets the value of TotalSentBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyTotalSentBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSentRate sets the value of TotalSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyTotalSentRate(value uint32) (err error) { + return instance.SetProperty("TotalSentRate", (value)) +} + +// GetTotalSentRate gets the value of TotalSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyTotalSentRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPacketsReceivedPersec sets the value of UDPPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyUDPPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("UDPPacketsReceivedPersec", (value)) +} + +// GetUDPPacketsReceivedPersec gets the value of UDPPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyUDPPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPacketsSentPersec sets the value of UDPPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyUDPPacketsSentPersec(value uint32) (err error) { + return instance.SetProperty("UDPPacketsSentPersec", (value)) +} + +// GetUDPPacketsSentPersec gets the value of UDPPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyUDPPacketsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPReceivedRate sets the value of UDPReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyUDPReceivedRate(value uint32) (err error) { + return instance.SetProperty("UDPReceivedRate", (value)) +} + +// GetUDPReceivedRate gets the value of UDPReceivedRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyUDPReceivedRate() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPSentRate sets the value of UDPSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) SetPropertyUDPSentRate(value uint32) (err error) { + return instance.SetProperty("UDPSentRate", (value)) +} + +// GetUDPSentRate gets the value of UDPSentRate for the instance +func (instance *Win32_PerfFormattedData_Counters_RemoteFXNetwork) GetPropertyUDPSentRate() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBClientShares.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBClientShares.go new file mode 100644 index 00000000..9500531d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBClientShares.go @@ -0,0 +1,770 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_SMBClientShares struct +type Win32_PerfFormattedData_Counters_SMBClientShares struct { + *Win32_PerfFormattedData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerWrite uint64 + + // + AvgDataBytesPerRequest uint64 + + // + AvgDataQueueLength uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerDataRequest uint32 + + // + AvgsecPerRead uint32 + + // + AvgsecPerWrite uint32 + + // + AvgWriteQueueLength uint64 + + // + CreditStallsPersec uint32 + + // + CurrentDataQueueLength uint32 + + // + DataBytesPersec uint64 + + // + DataRequestsPersec uint32 + + // + MetadataRequestsPersec uint32 + + // + ReadBytesPersec uint64 + + // + ReadBytestransmittedviaSMBDirectPersec uint64 + + // + ReadRequestsPersec uint32 + + // + ReadRequeststransmittedviaSMBDirectPersec uint32 + + // + TurboIOReadsPersec uint32 + + // + TurboIOWritesPersec uint32 + + // + WriteBytesPersec uint64 + + // + WriteBytestransmittedviaSMBDirectPersec uint64 + + // + WriteRequestsPersec uint32 + + // + WriteRequeststransmittedviaSMBDirectPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_SMBClientSharesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SMBClientShares, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBClientShares{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SMBClientSharesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SMBClientShares, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBClientShares{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest sets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgDataBytesPerRequest(value uint64) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest", (value)) +} + +// GetAvgDataBytesPerRequest gets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgDataBytesPerRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataQueueLength sets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgDataQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDataQueueLength", (value)) +} + +// GetAvgDataQueueLength gets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerDataRequest sets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest", (value)) +} + +// GetAvgsecPerDataRequest gets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreditStallsPersec sets the value of CreditStallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyCreditStallsPersec(value uint32) (err error) { + return instance.SetProperty("CreditStallsPersec", (value)) +} + +// GetCreditStallsPersec gets the value of CreditStallsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyCreditStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CreditStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentDataQueueLength sets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyCurrentDataQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentDataQueueLength", (value)) +} + +// GetCurrentDataQueueLength gets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyCurrentDataQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataBytesPersec sets the value of DataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyDataBytesPersec(value uint64) (err error) { + return instance.SetProperty("DataBytesPersec", (value)) +} + +// GetDataBytesPersec gets the value of DataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyDataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataRequestsPersec sets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyDataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DataRequestsPersec", (value)) +} + +// GetDataRequestsPersec gets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyDataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMetadataRequestsPersec sets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyMetadataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("MetadataRequestsPersec", (value)) +} + +// GetMetadataRequestsPersec gets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyMetadataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MetadataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytestransmittedviaSMBDirectPersec sets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyReadBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetReadBytestransmittedviaSMBDirectPersec gets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyReadBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequeststransmittedviaSMBDirectPersec sets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyReadRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetReadRequeststransmittedviaSMBDirectPersec gets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyReadRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTurboIOReadsPersec sets the value of TurboIOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyTurboIOReadsPersec(value uint32) (err error) { + return instance.SetProperty("TurboIOReadsPersec", (value)) +} + +// GetTurboIOReadsPersec gets the value of TurboIOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyTurboIOReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TurboIOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTurboIOWritesPersec sets the value of TurboIOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyTurboIOWritesPersec(value uint32) (err error) { + return instance.SetProperty("TurboIOWritesPersec", (value)) +} + +// GetTurboIOWritesPersec gets the value of TurboIOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyTurboIOWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TurboIOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytestransmittedviaSMBDirectPersec sets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyWriteBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteBytestransmittedviaSMBDirectPersec gets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyWriteBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequeststransmittedviaSMBDirectPersec sets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) SetPropertyWriteRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteRequeststransmittedviaSMBDirectPersec gets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBClientShares) GetPropertyWriteRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBDirectConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBDirectConnection.go new file mode 100644 index 00000000..1c8f3aa2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBDirectConnection.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_SMBDirectConnection struct +type Win32_PerfFormattedData_Counters_SMBDirectConnection struct { + *Win32_PerfFormattedData + + // + BytesRDMAReadPersec uint64 + + // + BytesRDMAWrittenPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + MemoryRegions uint32 + + // + RCQNotificationEventsPersec uint32 + + // + RDMARegistrationsPersec uint32 + + // + ReceivesPersec uint32 + + // + RemoteInvalidationsPersec uint32 + + // + SCQNotificationEventsPersec uint32 + + // + SendsPersec uint32 + + // + StallsRDMAReadPersec uint32 + + // + StallsRDMARegistrationsPersec uint32 + + // + StallsSendCreditPersec uint32 + + // + StallsSendQueuePersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_SMBDirectConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SMBDirectConnection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBDirectConnection{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SMBDirectConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SMBDirectConnection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBDirectConnection{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesRDMAReadPersec sets the value of BytesRDMAReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyBytesRDMAReadPersec(value uint64) (err error) { + return instance.SetProperty("BytesRDMAReadPersec", (value)) +} + +// GetBytesRDMAReadPersec gets the value of BytesRDMAReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyBytesRDMAReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesRDMAReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesRDMAWrittenPersec sets the value of BytesRDMAWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyBytesRDMAWrittenPersec(value uint64) (err error) { + return instance.SetProperty("BytesRDMAWrittenPersec", (value)) +} + +// GetBytesRDMAWrittenPersec gets the value of BytesRDMAWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyBytesRDMAWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesRDMAWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryRegions sets the value of MemoryRegions for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyMemoryRegions(value uint32) (err error) { + return instance.SetProperty("MemoryRegions", (value)) +} + +// GetMemoryRegions gets the value of MemoryRegions for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyMemoryRegions() (value uint32, err error) { + retValue, err := instance.GetProperty("MemoryRegions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRCQNotificationEventsPersec sets the value of RCQNotificationEventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyRCQNotificationEventsPersec(value uint32) (err error) { + return instance.SetProperty("RCQNotificationEventsPersec", (value)) +} + +// GetRCQNotificationEventsPersec gets the value of RCQNotificationEventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyRCQNotificationEventsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RCQNotificationEventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMARegistrationsPersec sets the value of RDMARegistrationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyRDMARegistrationsPersec(value uint32) (err error) { + return instance.SetProperty("RDMARegistrationsPersec", (value)) +} + +// GetRDMARegistrationsPersec gets the value of RDMARegistrationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyRDMARegistrationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMARegistrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivesPersec sets the value of ReceivesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyReceivesPersec(value uint32) (err error) { + return instance.SetProperty("ReceivesPersec", (value)) +} + +// GetReceivesPersec gets the value of ReceivesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyReceivesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteInvalidationsPersec sets the value of RemoteInvalidationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyRemoteInvalidationsPersec(value uint32) (err error) { + return instance.SetProperty("RemoteInvalidationsPersec", (value)) +} + +// GetRemoteInvalidationsPersec gets the value of RemoteInvalidationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyRemoteInvalidationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteInvalidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCQNotificationEventsPersec sets the value of SCQNotificationEventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertySCQNotificationEventsPersec(value uint32) (err error) { + return instance.SetProperty("SCQNotificationEventsPersec", (value)) +} + +// GetSCQNotificationEventsPersec gets the value of SCQNotificationEventsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertySCQNotificationEventsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCQNotificationEventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSendsPersec sets the value of SendsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertySendsPersec(value uint32) (err error) { + return instance.SetProperty("SendsPersec", (value)) +} + +// GetSendsPersec gets the value of SendsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertySendsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SendsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsRDMAReadPersec sets the value of StallsRDMAReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyStallsRDMAReadPersec(value uint32) (err error) { + return instance.SetProperty("StallsRDMAReadPersec", (value)) +} + +// GetStallsRDMAReadPersec gets the value of StallsRDMAReadPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyStallsRDMAReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsRDMAReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsRDMARegistrationsPersec sets the value of StallsRDMARegistrationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyStallsRDMARegistrationsPersec(value uint32) (err error) { + return instance.SetProperty("StallsRDMARegistrationsPersec", (value)) +} + +// GetStallsRDMARegistrationsPersec gets the value of StallsRDMARegistrationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyStallsRDMARegistrationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsRDMARegistrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsSendCreditPersec sets the value of StallsSendCreditPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyStallsSendCreditPersec(value uint32) (err error) { + return instance.SetProperty("StallsSendCreditPersec", (value)) +} + +// GetStallsSendCreditPersec gets the value of StallsSendCreditPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyStallsSendCreditPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsSendCreditPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsSendQueuePersec sets the value of StallsSendQueuePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) SetPropertyStallsSendQueuePersec(value uint32) (err error) { + return instance.SetProperty("StallsSendQueuePersec", (value)) +} + +// GetStallsSendQueuePersec gets the value of StallsSendQueuePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBDirectConnection) GetPropertyStallsSendQueuePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsSendQueuePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServer.go new file mode 100644 index 00000000..b477a255 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServer.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_SMBServer struct +type Win32_PerfFormattedData_Counters_SMBServer struct { + *Win32_PerfFormattedData + + // + ReadBytesPersec uint64 + + // + ReadRequestsPersec uint64 + + // + ReceiveBytesPersec uint64 + + // + SendBytesPersec uint64 + + // + WriteBytesPersec uint64 + + // + WriteRequestsPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_SMBServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SMBServer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBServer{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SMBServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SMBServer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBServer{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) SetPropertyReadRequestsPersec(value uint64) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) GetPropertyReadRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveBytesPersec sets the value of ReceiveBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) SetPropertyReceiveBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveBytesPersec", (value)) +} + +// GetReceiveBytesPersec gets the value of ReceiveBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) GetPropertyReceiveBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendBytesPersec sets the value of SendBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) SetPropertySendBytesPersec(value uint64) (err error) { + return instance.SetProperty("SendBytesPersec", (value)) +} + +// GetSendBytesPersec gets the value of SendBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) GetPropertySendBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SendBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) SetPropertyWriteRequestsPersec(value uint64) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServer) GetPropertyWriteRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerSessions.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerSessions.go new file mode 100644 index 00000000..ed51c458 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerSessions.go @@ -0,0 +1,1130 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_SMBServerSessions struct +type Win32_PerfFormattedData_Counters_SMBServerSessions struct { + *Win32_PerfFormattedData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerWrite uint64 + + // + AvgDataBytesPerRequest uint64 + + // + AvgDataQueueLength uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerDataRequest uint32 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRequest uint32 + + // + AvgsecPerWrite uint32 + + // + AvgWriteQueueLength uint64 + + // + CurrentDataQueueLength uint64 + + // + CurrentDurableOpenFileCount uint64 + + // + CurrentOpenFileCount uint64 + + // + CurrentPendingRequests uint64 + + // + DataBytesPersec uint64 + + // + DataRequestsPersec uint32 + + // + FilesOpenedPersec uint64 + + // + MetadataRequestsPersec uint64 + + // + PercentPersistentHandles uint64 + + // + PercentResilientHandles uint64 + + // + ReadBytesPersec uint64 + + // + ReadRequestsPersec uint32 + + // + ReceivedBytesPersec uint64 + + // + RequestsPersec uint64 + + // + SentBytesPersec uint64 + + // + TotalDurableHandleReopenCount uint64 + + // + TotalFailedDurableHandleReopenCount uint64 + + // + TotalFailedPersistentHandleReopenCount uint64 + + // + TotalFailedResilientHandleReopenCount uint64 + + // + TotalFileOpenCount uint64 + + // + TotalPersistentHandleReopenCount uint64 + + // + TotalResilientHandleReopenCount uint64 + + // + TransferredBytesPersec uint64 + + // + TreeConnectCount uint64 + + // + WriteBytesPersec uint64 + + // + WriteRequestsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_SMBServerSessionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SMBServerSessions, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBServerSessions{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SMBServerSessionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SMBServerSessions, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBServerSessions{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest sets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgDataBytesPerRequest(value uint64) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest", (value)) +} + +// GetAvgDataBytesPerRequest gets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgDataBytesPerRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataQueueLength sets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgDataQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDataQueueLength", (value)) +} + +// GetAvgDataQueueLength gets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerDataRequest sets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest", (value)) +} + +// GetAvgsecPerDataRequest gets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest sets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgsecPerRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest", (value)) +} + +// GetAvgsecPerRequest gets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgsecPerRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDataQueueLength sets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyCurrentDataQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentDataQueueLength", (value)) +} + +// GetCurrentDataQueueLength gets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyCurrentDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDurableOpenFileCount sets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyCurrentDurableOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentDurableOpenFileCount", (value)) +} + +// GetCurrentDurableOpenFileCount gets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyCurrentDurableOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDurableOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentOpenFileCount sets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyCurrentOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentOpenFileCount", (value)) +} + +// GetCurrentOpenFileCount gets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyCurrentOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPendingRequests sets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyCurrentPendingRequests(value uint64) (err error) { + return instance.SetProperty("CurrentPendingRequests", (value)) +} + +// GetCurrentPendingRequests gets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyCurrentPendingRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPendingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataBytesPersec sets the value of DataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyDataBytesPersec(value uint64) (err error) { + return instance.SetProperty("DataBytesPersec", (value)) +} + +// GetDataBytesPersec gets the value of DataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyDataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataRequestsPersec sets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyDataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DataRequestsPersec", (value)) +} + +// GetDataRequestsPersec gets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyDataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpenedPersec sets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyFilesOpenedPersec(value uint64) (err error) { + return instance.SetProperty("FilesOpenedPersec", (value)) +} + +// GetFilesOpenedPersec gets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyFilesOpenedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesOpenedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataRequestsPersec sets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyMetadataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("MetadataRequestsPersec", (value)) +} + +// GetMetadataRequestsPersec gets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyMetadataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPersistentHandles sets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyPercentPersistentHandles(value uint64) (err error) { + return instance.SetProperty("PercentPersistentHandles", (value)) +} + +// GetPercentPersistentHandles gets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyPercentPersistentHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPersistentHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentResilientHandles sets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyPercentResilientHandles(value uint64) (err error) { + return instance.SetProperty("PercentResilientHandles", (value)) +} + +// GetPercentResilientHandles gets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyPercentResilientHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedBytesPersec sets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyReceivedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedBytesPersec", (value)) +} + +// GetReceivedBytesPersec gets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyReceivedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestsPersec sets the value of RequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyRequestsPersec(value uint64) (err error) { + return instance.SetProperty("RequestsPersec", (value)) +} + +// GetRequestsPersec gets the value of RequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentBytesPersec sets the value of SentBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertySentBytesPersec(value uint64) (err error) { + return instance.SetProperty("SentBytesPersec", (value)) +} + +// GetSentBytesPersec gets the value of SentBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertySentBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalDurableHandleReopenCount sets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalDurableHandleReopenCount", (value)) +} + +// GetTotalDurableHandleReopenCount gets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedDurableHandleReopenCount sets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalFailedDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedDurableHandleReopenCount", (value)) +} + +// GetTotalFailedDurableHandleReopenCount gets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalFailedDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedPersistentHandleReopenCount sets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalFailedPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedPersistentHandleReopenCount", (value)) +} + +// GetTotalFailedPersistentHandleReopenCount gets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalFailedPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedResilientHandleReopenCount sets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalFailedResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedResilientHandleReopenCount", (value)) +} + +// GetTotalFailedResilientHandleReopenCount gets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalFailedResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFileOpenCount sets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalFileOpenCount(value uint64) (err error) { + return instance.SetProperty("TotalFileOpenCount", (value)) +} + +// GetTotalFileOpenCount gets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalFileOpenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFileOpenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPersistentHandleReopenCount sets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalPersistentHandleReopenCount", (value)) +} + +// GetTotalPersistentHandleReopenCount gets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalResilientHandleReopenCount sets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTotalResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalResilientHandleReopenCount", (value)) +} + +// GetTotalResilientHandleReopenCount gets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTotalResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferredBytesPersec sets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTransferredBytesPersec(value uint64) (err error) { + return instance.SetProperty("TransferredBytesPersec", (value)) +} + +// GetTransferredBytesPersec gets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTransferredBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferredBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeConnectCount sets the value of TreeConnectCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyTreeConnectCount(value uint64) (err error) { + return instance.SetProperty("TreeConnectCount", (value)) +} + +// GetTreeConnectCount gets the value of TreeConnectCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyTreeConnectCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TreeConnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerSessions) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerShares.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerShares.go new file mode 100644 index 00000000..e45fc872 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SMBServerShares.go @@ -0,0 +1,1400 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_SMBServerShares struct +type Win32_PerfFormattedData_Counters_SMBServerShares struct { + *Win32_PerfFormattedData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerWrite uint64 + + // + AvgDataBytesPerRequest uint64 + + // + AvgDataQueueLength uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerDataRequest uint32 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRequest uint32 + + // + AvgsecPerWrite uint32 + + // + AvgWriteQueueLength uint64 + + // + CurrentBypassOpenFileCount uint64 + + // + CurrentDataQueueLength uint64 + + // + CurrentDurableOpenFileCount uint64 + + // + CurrentOpenFileCount uint64 + + // + CurrentPendingRequests uint64 + + // + DataBytesPersec uint64 + + // + DataRequestsPersec uint32 + + // + FilesOpenedPersec uint64 + + // + MetadataRequestsPersec uint64 + + // + PercentPersistentHandles uint64 + + // + PercentResilientHandles uint64 + + // + ReadBytesPersec uint64 + + // + ReadBytestransmittedByPassCSVPersec uint64 + + // + ReadBytestransmittedviaSMBDirectPersec uint64 + + // + ReadRequestsPersec uint32 + + // + ReadRequeststransmittedviaBypassCSVPersec uint32 + + // + ReadRequeststransmittedviaSMBDirectPersec uint32 + + // + ReceivedBytesPersec uint64 + + // + RequestsPersec uint64 + + // + SentBytesPersec uint64 + + // + TotalDurableHandleReopenCount uint64 + + // + TotalFailedDurableHandleReopenCount uint64 + + // + TotalFailedPersistentHandleReopenCount uint64 + + // + TotalFailedResilientHandleReopenCount uint64 + + // + TotalFileOpenCount uint64 + + // + TotalPersistentHandleReopenCount uint64 + + // + TotalResilientHandleReopenCount uint64 + + // + TransferredBytesPersec uint64 + + // + TreeConnectCount uint64 + + // + WriteBytesPersec uint64 + + // + WriteBytestransmittedByPassCSVPersec uint64 + + // + WriteBytestransmittedviaSMBDirectPersec uint64 + + // + WriteRequestsPersec uint32 + + // + WriteRequeststransmittedviaBypassCSVPersec uint32 + + // + WriteRequeststransmittedviaSMBDirectPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_SMBServerSharesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SMBServerShares, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBServerShares{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SMBServerSharesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SMBServerShares, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SMBServerShares{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest sets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgDataBytesPerRequest(value uint64) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest", (value)) +} + +// GetAvgDataBytesPerRequest gets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgDataBytesPerRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataQueueLength sets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgDataQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDataQueueLength", (value)) +} + +// GetAvgDataQueueLength gets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerDataRequest sets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest", (value)) +} + +// GetAvgsecPerDataRequest gets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest sets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgsecPerRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest", (value)) +} + +// GetAvgsecPerRequest gets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgsecPerRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentBypassOpenFileCount sets the value of CurrentBypassOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyCurrentBypassOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentBypassOpenFileCount", (value)) +} + +// GetCurrentBypassOpenFileCount gets the value of CurrentBypassOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyCurrentBypassOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentBypassOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDataQueueLength sets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyCurrentDataQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentDataQueueLength", (value)) +} + +// GetCurrentDataQueueLength gets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyCurrentDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDurableOpenFileCount sets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyCurrentDurableOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentDurableOpenFileCount", (value)) +} + +// GetCurrentDurableOpenFileCount gets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyCurrentDurableOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDurableOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentOpenFileCount sets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyCurrentOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentOpenFileCount", (value)) +} + +// GetCurrentOpenFileCount gets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyCurrentOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPendingRequests sets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyCurrentPendingRequests(value uint64) (err error) { + return instance.SetProperty("CurrentPendingRequests", (value)) +} + +// GetCurrentPendingRequests gets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyCurrentPendingRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPendingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataBytesPersec sets the value of DataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyDataBytesPersec(value uint64) (err error) { + return instance.SetProperty("DataBytesPersec", (value)) +} + +// GetDataBytesPersec gets the value of DataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyDataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataRequestsPersec sets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyDataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DataRequestsPersec", (value)) +} + +// GetDataRequestsPersec gets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyDataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpenedPersec sets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyFilesOpenedPersec(value uint64) (err error) { + return instance.SetProperty("FilesOpenedPersec", (value)) +} + +// GetFilesOpenedPersec gets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyFilesOpenedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesOpenedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataRequestsPersec sets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyMetadataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("MetadataRequestsPersec", (value)) +} + +// GetMetadataRequestsPersec gets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyMetadataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPersistentHandles sets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyPercentPersistentHandles(value uint64) (err error) { + return instance.SetProperty("PercentPersistentHandles", (value)) +} + +// GetPercentPersistentHandles gets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyPercentPersistentHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPersistentHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentResilientHandles sets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyPercentResilientHandles(value uint64) (err error) { + return instance.SetProperty("PercentResilientHandles", (value)) +} + +// GetPercentResilientHandles gets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyPercentResilientHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytestransmittedByPassCSVPersec sets the value of ReadBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReadBytestransmittedByPassCSVPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytestransmittedByPassCSVPersec", (value)) +} + +// GetReadBytestransmittedByPassCSVPersec gets the value of ReadBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReadBytestransmittedByPassCSVPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytestransmittedByPassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytestransmittedviaSMBDirectPersec sets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReadBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetReadBytestransmittedviaSMBDirectPersec gets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReadBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequeststransmittedviaBypassCSVPersec sets the value of ReadRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReadRequeststransmittedviaBypassCSVPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequeststransmittedviaBypassCSVPersec", (value)) +} + +// GetReadRequeststransmittedviaBypassCSVPersec gets the value of ReadRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReadRequeststransmittedviaBypassCSVPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequeststransmittedviaBypassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequeststransmittedviaSMBDirectPersec sets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReadRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetReadRequeststransmittedviaSMBDirectPersec gets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReadRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedBytesPersec sets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyReceivedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedBytesPersec", (value)) +} + +// GetReceivedBytesPersec gets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyReceivedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestsPersec sets the value of RequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyRequestsPersec(value uint64) (err error) { + return instance.SetProperty("RequestsPersec", (value)) +} + +// GetRequestsPersec gets the value of RequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentBytesPersec sets the value of SentBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertySentBytesPersec(value uint64) (err error) { + return instance.SetProperty("SentBytesPersec", (value)) +} + +// GetSentBytesPersec gets the value of SentBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertySentBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalDurableHandleReopenCount sets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalDurableHandleReopenCount", (value)) +} + +// GetTotalDurableHandleReopenCount gets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedDurableHandleReopenCount sets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalFailedDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedDurableHandleReopenCount", (value)) +} + +// GetTotalFailedDurableHandleReopenCount gets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalFailedDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedPersistentHandleReopenCount sets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalFailedPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedPersistentHandleReopenCount", (value)) +} + +// GetTotalFailedPersistentHandleReopenCount gets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalFailedPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedResilientHandleReopenCount sets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalFailedResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedResilientHandleReopenCount", (value)) +} + +// GetTotalFailedResilientHandleReopenCount gets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalFailedResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFileOpenCount sets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalFileOpenCount(value uint64) (err error) { + return instance.SetProperty("TotalFileOpenCount", (value)) +} + +// GetTotalFileOpenCount gets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalFileOpenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFileOpenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPersistentHandleReopenCount sets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalPersistentHandleReopenCount", (value)) +} + +// GetTotalPersistentHandleReopenCount gets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalResilientHandleReopenCount sets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTotalResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalResilientHandleReopenCount", (value)) +} + +// GetTotalResilientHandleReopenCount gets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTotalResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferredBytesPersec sets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTransferredBytesPersec(value uint64) (err error) { + return instance.SetProperty("TransferredBytesPersec", (value)) +} + +// GetTransferredBytesPersec gets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTransferredBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferredBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeConnectCount sets the value of TreeConnectCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyTreeConnectCount(value uint64) (err error) { + return instance.SetProperty("TreeConnectCount", (value)) +} + +// GetTreeConnectCount gets the value of TreeConnectCount for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyTreeConnectCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TreeConnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytestransmittedByPassCSVPersec sets the value of WriteBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyWriteBytestransmittedByPassCSVPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytestransmittedByPassCSVPersec", (value)) +} + +// GetWriteBytestransmittedByPassCSVPersec gets the value of WriteBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyWriteBytestransmittedByPassCSVPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytestransmittedByPassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytestransmittedviaSMBDirectPersec sets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyWriteBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteBytestransmittedviaSMBDirectPersec gets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyWriteBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequeststransmittedviaBypassCSVPersec sets the value of WriteRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyWriteRequeststransmittedviaBypassCSVPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequeststransmittedviaBypassCSVPersec", (value)) +} + +// GetWriteRequeststransmittedviaBypassCSVPersec gets the value of WriteRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyWriteRequeststransmittedviaBypassCSVPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequeststransmittedviaBypassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequeststransmittedviaSMBDirectPersec sets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) SetPropertyWriteRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteRequeststransmittedviaSMBDirectPersec gets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SMBServerShares) GetPropertyWriteRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics.go new file mode 100644 index 00000000..0d975373 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics.go @@ -0,0 +1,90 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics struct +type Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics struct { + *Win32_PerfFormattedData + + // + ContextHandles uint32 + + // + CredentialHandles uint32 +} + +func NewWin32_PerfFormattedData_Counters_SecurityPerProcessStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SecurityPerProcessStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetContextHandles sets the value of ContextHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics) SetPropertyContextHandles(value uint32) (err error) { + return instance.SetProperty("ContextHandles", value) +} + +// GetContextHandles gets the value of ContextHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics) GetPropertyContextHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextHandles") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetCredentialHandles sets the value of CredentialHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics) SetPropertyCredentialHandles(value uint32) (err error) { + return instance.SetProperty("CredentialHandles", value) +} + +// GetCredentialHandles gets the value of CredentialHandles for the instance +func (instance *Win32_PerfFormattedData_Counters_SecurityPerProcessStatistics) GetPropertyCredentialHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("CredentialHandles") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics.go new file mode 100644 index 00000000..27457a5c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics.go @@ -0,0 +1,468 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics struct +type Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics struct { + *Win32_PerfFormattedData + + // + ActiveSchannelSessionCacheEntries uint32 + + // + DigestAuthentications uint32 + + // + ForwardedKerberosRequests uint32 + + // + KDCarmoredASRequests uint32 + + // + KDCarmoredTGSRequests uint32 + + // + KDCASRequests uint32 + + // + KDCclaimsawareASRequests uint32 + + // + KDCclaimsawareserviceassertedidentityTGSrequests uint32 + + // + KDCclaimsawareTGSRequests uint32 + + // + KDCclassictypeconstraineddelegationTGSRequests uint32 + + // + KDCkeytrustASRequests uint32 + + // + KDCresourcetypeconstraineddelegationTGSRequests uint32 + + // + KDCTGSRequests uint32 + + // + KerberosAuthentications uint32 + + // + NTLMAuthentications uint32 + + // + SchannelSessionCacheEntries uint32 + + // + SSLClientSideFullHandshakes uint32 + + // + SSLClientSideReconnectHandshakes uint32 + + // + SSLServerSideFullHandshakes uint32 + + // + SSLServerSideReconnectHandshakes uint32 +} + +func NewWin32_PerfFormattedData_Counters_SecuritySystemWideStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SecuritySystemWideStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveSchannelSessionCacheEntries sets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyActiveSchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("ActiveSchannelSessionCacheEntries", value) +} + +// GetActiveSchannelSessionCacheEntries gets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyActiveSchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSchannelSessionCacheEntries") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDigestAuthentications sets the value of DigestAuthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyDigestAuthentications(value uint32) (err error) { + return instance.SetProperty("DigestAuthentications", value) +} + +// GetDigestAuthentications gets the value of DigestAuthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyDigestAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("DigestAuthentications") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetForwardedKerberosRequests sets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyForwardedKerberosRequests(value uint32) (err error) { + return instance.SetProperty("ForwardedKerberosRequests", value) +} + +// GetForwardedKerberosRequests gets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyForwardedKerberosRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("ForwardedKerberosRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCarmoredASRequests sets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCarmoredASRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredASRequests", value) +} + +// GetKDCarmoredASRequests gets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCarmoredASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCarmoredTGSRequests sets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCarmoredTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredTGSRequests", value) +} + +// GetKDCarmoredTGSRequests gets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCarmoredTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCASRequests sets the value of KDCASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCASRequests(value uint32) (err error) { + return instance.SetProperty("KDCASRequests", value) +} + +// GetKDCASRequests gets the value of KDCASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclaimsawareASRequests sets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareASRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareASRequests", value) +} + +// GetKDCclaimsawareASRequests gets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclaimsawareserviceassertedidentityTGSrequests sets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareserviceassertedidentityTGSrequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareserviceassertedidentityTGSrequests", value) +} + +// GetKDCclaimsawareserviceassertedidentityTGSrequests gets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareserviceassertedidentityTGSrequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareserviceassertedidentityTGSrequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclaimsawareTGSRequests sets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareTGSRequests", value) +} + +// GetKDCclaimsawareTGSRequests gets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclassictypeconstraineddelegationTGSRequests sets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclassictypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclassictypeconstraineddelegationTGSRequests", value) +} + +// GetKDCclassictypeconstraineddelegationTGSRequests gets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclassictypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclassictypeconstraineddelegationTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCkeytrustASRequests sets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCkeytrustASRequests(value uint32) (err error) { + return instance.SetProperty("KDCkeytrustASRequests", value) +} + +// GetKDCkeytrustASRequests gets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCkeytrustASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCkeytrustASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCresourcetypeconstraineddelegationTGSRequests sets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCresourcetypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCresourcetypeconstraineddelegationTGSRequests", value) +} + +// GetKDCresourcetypeconstraineddelegationTGSRequests gets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCresourcetypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCresourcetypeconstraineddelegationTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCTGSRequests sets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKDCTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCTGSRequests", value) +} + +// GetKDCTGSRequests gets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKDCTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKerberosAuthentications sets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyKerberosAuthentications(value uint32) (err error) { + return instance.SetProperty("KerberosAuthentications", value) +} + +// GetKerberosAuthentications gets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyKerberosAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("KerberosAuthentications") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetNTLMAuthentications sets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertyNTLMAuthentications(value uint32) (err error) { + return instance.SetProperty("NTLMAuthentications", value) +} + +// GetNTLMAuthentications gets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertyNTLMAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("NTLMAuthentications") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSchannelSessionCacheEntries sets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertySchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("SchannelSessionCacheEntries", value) +} + +// GetSchannelSessionCacheEntries gets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertySchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SchannelSessionCacheEntries") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLClientSideFullHandshakes sets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertySSLClientSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideFullHandshakes", value) +} + +// GetSSLClientSideFullHandshakes gets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertySSLClientSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideFullHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLClientSideReconnectHandshakes sets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertySSLClientSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideReconnectHandshakes", value) +} + +// GetSSLClientSideReconnectHandshakes gets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertySSLClientSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideReconnectHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLServerSideFullHandshakes sets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertySSLServerSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideFullHandshakes", value) +} + +// GetSSLServerSideFullHandshakes gets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertySSLServerSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideFullHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLServerSideReconnectHandshakes sets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) SetPropertySSLServerSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideReconnectHandshakes", value) +} + +// GetSSLServerSideReconnectHandshakes gets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Counters_SecuritySystemWideStatistics) GetPropertySSLServerSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideReconnectHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterFlow.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterFlow.go new file mode 100644 index 00000000..0bc41551 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterFlow.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_StorageQoSFilterFlow struct +type Win32_PerfFormattedData_Counters_StorageQoSFilterFlow struct { + *Win32_PerfFormattedData + + // + AvgBandwidth uint64 + + // + AvgDeviceQueueLength uint64 + + // + AvgIOQuotaReplenishmentOperationsPersec uint64 + + // + AvgNormalizedIOPS uint64 + + // + AvgSchedulerQueueLength uint64 + + // + MaximumBandwidth uint64 + + // + NormalizedMaximumIORate uint64 + + // + NormalizedMinimumIORate uint64 + + // + TotalBandwidthquotaIncrementPersec uint64 + + // + TotalNormalizedIOQuotaIncrement uint64 +} + +func NewWin32_PerfFormattedData_Counters_StorageQoSFilterFlowEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageQoSFilterFlow{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_StorageQoSFilterFlowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageQoSFilterFlow{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBandwidth sets the value of AvgBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyAvgBandwidth(value uint64) (err error) { + return instance.SetProperty("AvgBandwidth", (value)) +} + +// GetAvgBandwidth gets the value of AvgBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyAvgBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDeviceQueueLength sets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyAvgDeviceQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDeviceQueueLength", (value)) +} + +// GetAvgDeviceQueueLength gets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyAvgDeviceQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDeviceQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgIOQuotaReplenishmentOperationsPersec sets the value of AvgIOQuotaReplenishmentOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyAvgIOQuotaReplenishmentOperationsPersec(value uint64) (err error) { + return instance.SetProperty("AvgIOQuotaReplenishmentOperationsPersec", (value)) +} + +// GetAvgIOQuotaReplenishmentOperationsPersec gets the value of AvgIOQuotaReplenishmentOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyAvgIOQuotaReplenishmentOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgIOQuotaReplenishmentOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgNormalizedIOPS sets the value of AvgNormalizedIOPS for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyAvgNormalizedIOPS(value uint64) (err error) { + return instance.SetProperty("AvgNormalizedIOPS", (value)) +} + +// GetAvgNormalizedIOPS gets the value of AvgNormalizedIOPS for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyAvgNormalizedIOPS() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgNormalizedIOPS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgSchedulerQueueLength sets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyAvgSchedulerQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgSchedulerQueueLength", (value)) +} + +// GetAvgSchedulerQueueLength gets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyAvgSchedulerQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgSchedulerQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumBandwidth sets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyMaximumBandwidth(value uint64) (err error) { + return instance.SetProperty("MaximumBandwidth", (value)) +} + +// GetMaximumBandwidth gets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyMaximumBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedMaximumIORate sets the value of NormalizedMaximumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyNormalizedMaximumIORate(value uint64) (err error) { + return instance.SetProperty("NormalizedMaximumIORate", (value)) +} + +// GetNormalizedMaximumIORate gets the value of NormalizedMaximumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyNormalizedMaximumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedMaximumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedMinimumIORate sets the value of NormalizedMinimumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyNormalizedMinimumIORate(value uint64) (err error) { + return instance.SetProperty("NormalizedMinimumIORate", (value)) +} + +// GetNormalizedMinimumIORate gets the value of NormalizedMinimumIORate for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyNormalizedMinimumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedMinimumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBandwidthquotaIncrementPersec sets the value of TotalBandwidthquotaIncrementPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyTotalBandwidthquotaIncrementPersec(value uint64) (err error) { + return instance.SetProperty("TotalBandwidthquotaIncrementPersec", (value)) +} + +// GetTotalBandwidthquotaIncrementPersec gets the value of TotalBandwidthquotaIncrementPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyTotalBandwidthquotaIncrementPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBandwidthquotaIncrementPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalNormalizedIOQuotaIncrement sets the value of TotalNormalizedIOQuotaIncrement for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) SetPropertyTotalNormalizedIOQuotaIncrement(value uint64) (err error) { + return instance.SetProperty("TotalNormalizedIOQuotaIncrement", (value)) +} + +// GetTotalNormalizedIOQuotaIncrement gets the value of TotalNormalizedIOQuotaIncrement for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterFlow) GetPropertyTotalNormalizedIOQuotaIncrement() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalNormalizedIOQuotaIncrement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterVolume.go new file mode 100644 index 00000000..573cfef7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageQoSFilterVolume.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_StorageQoSFilterVolume struct +type Win32_PerfFormattedData_Counters_StorageQoSFilterVolume struct { + *Win32_PerfFormattedData + + // + AllocationQuantum uint64 + + // + AvgBandwidth uint64 + + // + AvgDeviceLatency uint64 + + // + AvgDeviceQueueLength uint64 + + // + AvgIOCost uint64 + + // + AvgNormalizedIOCost uint64 + + // + AvgSchedulerQueueLength uint64 + + // + CongestionThreshold uint64 + + // + DelayedCost uint64 + + // + EstimatedCapacity uint64 + + // + FlowSwitchCost uint64 + + // + IssuedCost uint64 + + // + LatencyTarget uint64 + + // + LowerThreshold uint64 + + // + NormalizedThroughput uint64 + + // + OverheadCost uint64 + + // + SectorCost uint64 + + // + SeekCost uint64 +} + +func NewWin32_PerfFormattedData_Counters_StorageQoSFilterVolumeEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageQoSFilterVolume{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_StorageQoSFilterVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageQoSFilterVolume{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAllocationQuantum sets the value of AllocationQuantum for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAllocationQuantum(value uint64) (err error) { + return instance.SetProperty("AllocationQuantum", (value)) +} + +// GetAllocationQuantum gets the value of AllocationQuantum for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAllocationQuantum() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationQuantum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBandwidth sets the value of AvgBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAvgBandwidth(value uint64) (err error) { + return instance.SetProperty("AvgBandwidth", (value)) +} + +// GetAvgBandwidth gets the value of AvgBandwidth for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAvgBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDeviceLatency sets the value of AvgDeviceLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAvgDeviceLatency(value uint64) (err error) { + return instance.SetProperty("AvgDeviceLatency", (value)) +} + +// GetAvgDeviceLatency gets the value of AvgDeviceLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAvgDeviceLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDeviceLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDeviceQueueLength sets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAvgDeviceQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDeviceQueueLength", (value)) +} + +// GetAvgDeviceQueueLength gets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAvgDeviceQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDeviceQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgIOCost sets the value of AvgIOCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAvgIOCost(value uint64) (err error) { + return instance.SetProperty("AvgIOCost", (value)) +} + +// GetAvgIOCost gets the value of AvgIOCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAvgIOCost() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgIOCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgNormalizedIOCost sets the value of AvgNormalizedIOCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAvgNormalizedIOCost(value uint64) (err error) { + return instance.SetProperty("AvgNormalizedIOCost", (value)) +} + +// GetAvgNormalizedIOCost gets the value of AvgNormalizedIOCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAvgNormalizedIOCost() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgNormalizedIOCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgSchedulerQueueLength sets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyAvgSchedulerQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgSchedulerQueueLength", (value)) +} + +// GetAvgSchedulerQueueLength gets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyAvgSchedulerQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgSchedulerQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCongestionThreshold sets the value of CongestionThreshold for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyCongestionThreshold(value uint64) (err error) { + return instance.SetProperty("CongestionThreshold", (value)) +} + +// GetCongestionThreshold gets the value of CongestionThreshold for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyCongestionThreshold() (value uint64, err error) { + retValue, err := instance.GetProperty("CongestionThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDelayedCost sets the value of DelayedCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyDelayedCost(value uint64) (err error) { + return instance.SetProperty("DelayedCost", (value)) +} + +// GetDelayedCost gets the value of DelayedCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyDelayedCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DelayedCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEstimatedCapacity sets the value of EstimatedCapacity for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyEstimatedCapacity(value uint64) (err error) { + return instance.SetProperty("EstimatedCapacity", (value)) +} + +// GetEstimatedCapacity gets the value of EstimatedCapacity for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyEstimatedCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("EstimatedCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlowSwitchCost sets the value of FlowSwitchCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyFlowSwitchCost(value uint64) (err error) { + return instance.SetProperty("FlowSwitchCost", (value)) +} + +// GetFlowSwitchCost gets the value of FlowSwitchCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyFlowSwitchCost() (value uint64, err error) { + retValue, err := instance.GetProperty("FlowSwitchCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIssuedCost sets the value of IssuedCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyIssuedCost(value uint64) (err error) { + return instance.SetProperty("IssuedCost", (value)) +} + +// GetIssuedCost gets the value of IssuedCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyIssuedCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IssuedCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLatencyTarget sets the value of LatencyTarget for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyLatencyTarget(value uint64) (err error) { + return instance.SetProperty("LatencyTarget", (value)) +} + +// GetLatencyTarget gets the value of LatencyTarget for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyLatencyTarget() (value uint64, err error) { + retValue, err := instance.GetProperty("LatencyTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLowerThreshold sets the value of LowerThreshold for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyLowerThreshold(value uint64) (err error) { + return instance.SetProperty("LowerThreshold", (value)) +} + +// GetLowerThreshold gets the value of LowerThreshold for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyLowerThreshold() (value uint64, err error) { + retValue, err := instance.GetProperty("LowerThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedThroughput sets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyNormalizedThroughput(value uint64) (err error) { + return instance.SetProperty("NormalizedThroughput", (value)) +} + +// GetNormalizedThroughput gets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyNormalizedThroughput() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedThroughput") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOverheadCost sets the value of OverheadCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertyOverheadCost(value uint64) (err error) { + return instance.SetProperty("OverheadCost", (value)) +} + +// GetOverheadCost gets the value of OverheadCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertyOverheadCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OverheadCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSectorCost sets the value of SectorCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertySectorCost(value uint64) (err error) { + return instance.SetProperty("SectorCost", (value)) +} + +// GetSectorCost gets the value of SectorCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertySectorCost() (value uint64, err error) { + retValue, err := instance.GetProperty("SectorCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSeekCost sets the value of SeekCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) SetPropertySeekCost(value uint64) (err error) { + return instance.SetProperty("SeekCost", (value)) +} + +// GetSeekCost gets the value of SeekCost for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageQoSFilterVolume) GetPropertySeekCost() (value uint64, err error) { + retValue, err := instance.GetProperty("SeekCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesDrt.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesDrt.go new file mode 100644 index 00000000..793eb4f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesDrt.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_StorageSpacesDrt struct +type Win32_PerfFormattedData_Counters_StorageSpacesDrt struct { + *Win32_PerfFormattedData + + // + CleanBytes uint64 + + // + CleanCandidateBytes uint64 + + // + CleanCandidateCount uint64 + + // + CleanCount uint64 + + // + DirtyBytes uint64 + + // + DirtyCount uint64 + + // + FlushingBytes uint64 + + // + FlushingCount uint64 + + // + Limit uint32 + + // + LockedBytes uint64 + + // + LockedCount uint64 + + // + NotTrackingBytes uint64 + + // + NotTrackingCount uint64 + + // + Status uint32 + + // + SynchronizingBytes uint64 + + // + SynchronizingCount uint64 +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesDrtEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesDrt, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesDrt{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesDrtEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesDrt, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesDrt{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCleanBytes sets the value of CleanBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyCleanBytes(value uint64) (err error) { + return instance.SetProperty("CleanBytes", (value)) +} + +// GetCleanBytes gets the value of CleanBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyCleanBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanCandidateBytes sets the value of CleanCandidateBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyCleanCandidateBytes(value uint64) (err error) { + return instance.SetProperty("CleanCandidateBytes", (value)) +} + +// GetCleanCandidateBytes gets the value of CleanCandidateBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyCleanCandidateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanCandidateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanCandidateCount sets the value of CleanCandidateCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyCleanCandidateCount(value uint64) (err error) { + return instance.SetProperty("CleanCandidateCount", (value)) +} + +// GetCleanCandidateCount gets the value of CleanCandidateCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyCleanCandidateCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanCandidateCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanCount sets the value of CleanCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyCleanCount(value uint64) (err error) { + return instance.SetProperty("CleanCount", (value)) +} + +// GetCleanCount gets the value of CleanCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyCleanCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyBytes sets the value of DirtyBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyDirtyBytes(value uint64) (err error) { + return instance.SetProperty("DirtyBytes", (value)) +} + +// GetDirtyBytes gets the value of DirtyBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyDirtyBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyCount sets the value of DirtyCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyDirtyCount(value uint64) (err error) { + return instance.SetProperty("DirtyCount", (value)) +} + +// GetDirtyCount gets the value of DirtyCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyDirtyCount() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushingBytes sets the value of FlushingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyFlushingBytes(value uint64) (err error) { + return instance.SetProperty("FlushingBytes", (value)) +} + +// GetFlushingBytes gets the value of FlushingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyFlushingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushingCount sets the value of FlushingCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyFlushingCount(value uint64) (err error) { + return instance.SetProperty("FlushingCount", (value)) +} + +// GetFlushingCount gets the value of FlushingCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyFlushingCount() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushingCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLimit sets the value of Limit for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyLimit(value uint32) (err error) { + return instance.SetProperty("Limit", (value)) +} + +// GetLimit gets the value of Limit for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("Limit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockedBytes sets the value of LockedBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyLockedBytes(value uint64) (err error) { + return instance.SetProperty("LockedBytes", (value)) +} + +// GetLockedBytes gets the value of LockedBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyLockedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LockedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLockedCount sets the value of LockedCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyLockedCount(value uint64) (err error) { + return instance.SetProperty("LockedCount", (value)) +} + +// GetLockedCount gets the value of LockedCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyLockedCount() (value uint64, err error) { + retValue, err := instance.GetProperty("LockedCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotTrackingBytes sets the value of NotTrackingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyNotTrackingBytes(value uint64) (err error) { + return instance.SetProperty("NotTrackingBytes", (value)) +} + +// GetNotTrackingBytes gets the value of NotTrackingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyNotTrackingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("NotTrackingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotTrackingCount sets the value of NotTrackingCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyNotTrackingCount(value uint64) (err error) { + return instance.SetProperty("NotTrackingCount", (value)) +} + +// GetNotTrackingCount gets the value of NotTrackingCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyNotTrackingCount() (value uint64, err error) { + retValue, err := instance.GetProperty("NotTrackingCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertyStatus(value uint32) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertyStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSynchronizingBytes sets the value of SynchronizingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertySynchronizingBytes(value uint64) (err error) { + return instance.SetProperty("SynchronizingBytes", (value)) +} + +// GetSynchronizingBytes gets the value of SynchronizingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertySynchronizingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SynchronizingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSynchronizingCount sets the value of SynchronizingCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) SetPropertySynchronizingCount(value uint64) (err error) { + return instance.SetProperty("SynchronizingCount", (value)) +} + +// GetSynchronizingCount gets the value of SynchronizingCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesDrt) GetPropertySynchronizingCount() (value uint64, err error) { + retValue, err := instance.GetProperty("SynchronizingCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesTier.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesTier.go new file mode 100644 index 00000000..0713eeab --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesTier.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_StorageSpacesTier struct +type Win32_PerfFormattedData_Counters_StorageSpacesTier struct { + *Win32_PerfFormattedData + + // + TierReadBytesAverage uint64 + + // + TierReadBytesPersec uint64 + + // + TierReadLatency uint32 + + // + TierReadsAverage uint64 + + // + TierReadsPersec uint64 + + // + TierTransferBytesAverage uint64 + + // + TierTransferBytesPersec uint64 + + // + TierTransferLatency uint32 + + // + TierTransfersAverage uint64 + + // + TierTransfersCurrent uint32 + + // + TierTransfersPersec uint64 + + // + TierWriteBytesAverage uint64 + + // + TierWriteBytesPersec uint64 + + // + TierWriteLatency uint32 + + // + TierWritesAverage uint64 + + // + TierWritesPersec uint64 +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesTierEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesTier, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesTier{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesTierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesTier, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesTier{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTierReadBytesAverage sets the value of TierReadBytesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierReadBytesAverage(value uint64) (err error) { + return instance.SetProperty("TierReadBytesAverage", (value)) +} + +// GetTierReadBytesAverage gets the value of TierReadBytesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierReadBytesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadBytesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierReadBytesPersec sets the value of TierReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("TierReadBytesPersec", (value)) +} + +// GetTierReadBytesPersec gets the value of TierReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierReadLatency sets the value of TierReadLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierReadLatency(value uint32) (err error) { + return instance.SetProperty("TierReadLatency", (value)) +} + +// GetTierReadLatency gets the value of TierReadLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TierReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierReadsAverage sets the value of TierReadsAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierReadsAverage(value uint64) (err error) { + return instance.SetProperty("TierReadsAverage", (value)) +} + +// GetTierReadsAverage gets the value of TierReadsAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierReadsAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadsAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierReadsPersec sets the value of TierReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierReadsPersec(value uint64) (err error) { + return instance.SetProperty("TierReadsPersec", (value)) +} + +// GetTierReadsPersec gets the value of TierReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransferBytesAverage sets the value of TierTransferBytesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierTransferBytesAverage(value uint64) (err error) { + return instance.SetProperty("TierTransferBytesAverage", (value)) +} + +// GetTierTransferBytesAverage gets the value of TierTransferBytesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierTransferBytesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransferBytesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransferBytesPersec sets the value of TierTransferBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierTransferBytesPersec(value uint64) (err error) { + return instance.SetProperty("TierTransferBytesPersec", (value)) +} + +// GetTierTransferBytesPersec gets the value of TierTransferBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierTransferBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransferBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransferLatency sets the value of TierTransferLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierTransferLatency(value uint32) (err error) { + return instance.SetProperty("TierTransferLatency", (value)) +} + +// GetTierTransferLatency gets the value of TierTransferLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierTransferLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TierTransferLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierTransfersAverage sets the value of TierTransfersAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierTransfersAverage(value uint64) (err error) { + return instance.SetProperty("TierTransfersAverage", (value)) +} + +// GetTierTransfersAverage gets the value of TierTransfersAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierTransfersAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransfersAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransfersCurrent sets the value of TierTransfersCurrent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierTransfersCurrent(value uint32) (err error) { + return instance.SetProperty("TierTransfersCurrent", (value)) +} + +// GetTierTransfersCurrent gets the value of TierTransfersCurrent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierTransfersCurrent() (value uint32, err error) { + retValue, err := instance.GetProperty("TierTransfersCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierTransfersPersec sets the value of TierTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierTransfersPersec(value uint64) (err error) { + return instance.SetProperty("TierTransfersPersec", (value)) +} + +// GetTierTransfersPersec gets the value of TierTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWriteBytesAverage sets the value of TierWriteBytesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierWriteBytesAverage(value uint64) (err error) { + return instance.SetProperty("TierWriteBytesAverage", (value)) +} + +// GetTierWriteBytesAverage gets the value of TierWriteBytesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierWriteBytesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWriteBytesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWriteBytesPersec sets the value of TierWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("TierWriteBytesPersec", (value)) +} + +// GetTierWriteBytesPersec gets the value of TierWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWriteLatency sets the value of TierWriteLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierWriteLatency(value uint32) (err error) { + return instance.SetProperty("TierWriteLatency", (value)) +} + +// GetTierWriteLatency gets the value of TierWriteLatency for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TierWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierWritesAverage sets the value of TierWritesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierWritesAverage(value uint64) (err error) { + return instance.SetProperty("TierWritesAverage", (value)) +} + +// GetTierWritesAverage gets the value of TierWritesAverage for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierWritesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWritesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWritesPersec sets the value of TierWritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) SetPropertyTierWritesPersec(value uint64) (err error) { + return instance.SetProperty("TierWritesPersec", (value)) +} + +// GetTierWritesPersec gets the value of TierWritesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesTier) GetPropertyTierWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk.go new file mode 100644 index 00000000..1aa53f42 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk.go @@ -0,0 +1,1670 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk struct +type Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk struct { + *Win32_PerfFormattedData + + // + VirtualDiskActive uint64 + + // + VirtualDiskActiveBytes uint64 + + // + VirtualDiskFailedReplacementBytes uint64 + + // + VirtualDiskFailedReplacementCount uint64 + + // + VirtualDiskMissing uint64 + + // + VirtualDiskMissingBytes uint64 + + // + VirtualDiskNeedReallocation uint64 + + // + VirtualDiskNeedReallocationBytes uint64 + + // + VirtualDiskNeedRegeneration uint64 + + // + VirtualDiskNeedRegenerationBytes uint64 + + // + VirtualDiskPendingDeletion uint64 + + // + VirtualDiskPendingDeletionBytes uint64 + + // + VirtualDiskReasonFailure uint64 + + // + VirtualDiskReasonFailureBytes uint64 + + // + VirtualDiskReasonHardwareError uint64 + + // + VirtualDiskReasonHardwareErrorBytes uint64 + + // + VirtualDiskReasonIoError uint64 + + // + VirtualDiskReasonIoErrorBytes uint64 + + // + VirtualDiskReasonMissing uint64 + + // + VirtualDiskReasonMissingBytes uint64 + + // + VirtualDiskReasonNew uint64 + + // + VirtualDiskReasonNewBytes uint64 + + // + VirtualDiskReasonRegenReadError uint64 + + // + VirtualDiskReasonRegenReadErrorBytes uint64 + + // + VirtualDiskReasonRegenWriteError uint64 + + // + VirtualDiskReasonRegenWriteErrorBytes uint64 + + // + VirtualDiskReasonRetired uint64 + + // + VirtualDiskReasonRetiredBytes uint64 + + // + VirtualDiskRebalanceReplacementBytes uint64 + + // + VirtualDiskRebalanceReplacementCount uint64 + + // + VirtualDiskRegenerating uint64 + + // + VirtualDiskRegeneratingBytes uint64 + + // + VirtualDiskRepairNeedPhase2Count uint64 + + // + VirtualDiskRepairNeedPhase6Count uint64 + + // + VirtualDiskRepairPhase1Count uint64 + + // + VirtualDiskRepairPhase1Status uint64 + + // + VirtualDiskRepairPhase2Count uint64 + + // + VirtualDiskRepairPhase2Status uint64 + + // + VirtualDiskRepairPhase3Count uint64 + + // + VirtualDiskRepairPhase3Status uint64 + + // + VirtualDiskRepairPhase4Count uint64 + + // + VirtualDiskRepairPhase4Status uint64 + + // + VirtualDiskRepairPhase5Count uint64 + + // + VirtualDiskRepairPhase5Status uint64 + + // + VirtualDiskRepairPhase6Count uint64 + + // + VirtualDiskRepairPhase6Status uint64 + + // + VirtualDiskRepairReplacementBytes uint64 + + // + VirtualDiskRepairReplacementCount uint64 + + // + VirtualDiskScopeRegenerationBytes uint64 + + // + VirtualDiskScopeRegenerationCount uint64 + + // + VirtualDiskStale uint64 + + // + VirtualDiskStaleBytes uint64 + + // + VirtualDiskTotal uint64 + + // + VirtualDiskTotalBytes uint64 +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetVirtualDiskActive sets the value of VirtualDiskActive for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskActive(value uint64) (err error) { + return instance.SetProperty("VirtualDiskActive", (value)) +} + +// GetVirtualDiskActive gets the value of VirtualDiskActive for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskActive() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskActiveBytes sets the value of VirtualDiskActiveBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskActiveBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskActiveBytes", (value)) +} + +// GetVirtualDiskActiveBytes gets the value of VirtualDiskActiveBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskActiveBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskActiveBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskFailedReplacementBytes sets the value of VirtualDiskFailedReplacementBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskFailedReplacementBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskFailedReplacementBytes", (value)) +} + +// GetVirtualDiskFailedReplacementBytes gets the value of VirtualDiskFailedReplacementBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskFailedReplacementBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskFailedReplacementBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskFailedReplacementCount sets the value of VirtualDiskFailedReplacementCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskFailedReplacementCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskFailedReplacementCount", (value)) +} + +// GetVirtualDiskFailedReplacementCount gets the value of VirtualDiskFailedReplacementCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskFailedReplacementCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskFailedReplacementCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskMissing sets the value of VirtualDiskMissing for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskMissing(value uint64) (err error) { + return instance.SetProperty("VirtualDiskMissing", (value)) +} + +// GetVirtualDiskMissing gets the value of VirtualDiskMissing for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskMissingBytes sets the value of VirtualDiskMissingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskMissingBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskMissingBytes", (value)) +} + +// GetVirtualDiskMissingBytes gets the value of VirtualDiskMissingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskMissingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskMissingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedReallocation sets the value of VirtualDiskNeedReallocation for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedReallocation(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedReallocation", (value)) +} + +// GetVirtualDiskNeedReallocation gets the value of VirtualDiskNeedReallocation for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedReallocation() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedReallocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedReallocationBytes sets the value of VirtualDiskNeedReallocationBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedReallocationBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedReallocationBytes", (value)) +} + +// GetVirtualDiskNeedReallocationBytes gets the value of VirtualDiskNeedReallocationBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedReallocationBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedReallocationBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedRegeneration sets the value of VirtualDiskNeedRegeneration for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedRegeneration(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedRegeneration", (value)) +} + +// GetVirtualDiskNeedRegeneration gets the value of VirtualDiskNeedRegeneration for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedRegeneration() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedRegeneration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedRegenerationBytes sets the value of VirtualDiskNeedRegenerationBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedRegenerationBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedRegenerationBytes", (value)) +} + +// GetVirtualDiskNeedRegenerationBytes gets the value of VirtualDiskNeedRegenerationBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedRegenerationBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedRegenerationBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskPendingDeletion sets the value of VirtualDiskPendingDeletion for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskPendingDeletion(value uint64) (err error) { + return instance.SetProperty("VirtualDiskPendingDeletion", (value)) +} + +// GetVirtualDiskPendingDeletion gets the value of VirtualDiskPendingDeletion for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskPendingDeletion() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskPendingDeletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskPendingDeletionBytes sets the value of VirtualDiskPendingDeletionBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskPendingDeletionBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskPendingDeletionBytes", (value)) +} + +// GetVirtualDiskPendingDeletionBytes gets the value of VirtualDiskPendingDeletionBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskPendingDeletionBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskPendingDeletionBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonFailure sets the value of VirtualDiskReasonFailure for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonFailure(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonFailure", (value)) +} + +// GetVirtualDiskReasonFailure gets the value of VirtualDiskReasonFailure for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonFailure() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonFailure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonFailureBytes sets the value of VirtualDiskReasonFailureBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonFailureBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonFailureBytes", (value)) +} + +// GetVirtualDiskReasonFailureBytes gets the value of VirtualDiskReasonFailureBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonFailureBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonFailureBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonHardwareError sets the value of VirtualDiskReasonHardwareError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonHardwareError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonHardwareError", (value)) +} + +// GetVirtualDiskReasonHardwareError gets the value of VirtualDiskReasonHardwareError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonHardwareError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonHardwareError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonHardwareErrorBytes sets the value of VirtualDiskReasonHardwareErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonHardwareErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonHardwareErrorBytes", (value)) +} + +// GetVirtualDiskReasonHardwareErrorBytes gets the value of VirtualDiskReasonHardwareErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonHardwareErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonHardwareErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonIoError sets the value of VirtualDiskReasonIoError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonIoError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonIoError", (value)) +} + +// GetVirtualDiskReasonIoError gets the value of VirtualDiskReasonIoError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonIoError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonIoError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonIoErrorBytes sets the value of VirtualDiskReasonIoErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonIoErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonIoErrorBytes", (value)) +} + +// GetVirtualDiskReasonIoErrorBytes gets the value of VirtualDiskReasonIoErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonIoErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonIoErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonMissing sets the value of VirtualDiskReasonMissing for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonMissing(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonMissing", (value)) +} + +// GetVirtualDiskReasonMissing gets the value of VirtualDiskReasonMissing for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonMissingBytes sets the value of VirtualDiskReasonMissingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonMissingBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonMissingBytes", (value)) +} + +// GetVirtualDiskReasonMissingBytes gets the value of VirtualDiskReasonMissingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonMissingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonMissingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonNew sets the value of VirtualDiskReasonNew for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonNew(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonNew", (value)) +} + +// GetVirtualDiskReasonNew gets the value of VirtualDiskReasonNew for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonNew() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonNew") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonNewBytes sets the value of VirtualDiskReasonNewBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonNewBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonNewBytes", (value)) +} + +// GetVirtualDiskReasonNewBytes gets the value of VirtualDiskReasonNewBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonNewBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonNewBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenReadError sets the value of VirtualDiskReasonRegenReadError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenReadError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenReadError", (value)) +} + +// GetVirtualDiskReasonRegenReadError gets the value of VirtualDiskReasonRegenReadError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenReadError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenReadError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenReadErrorBytes sets the value of VirtualDiskReasonRegenReadErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenReadErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenReadErrorBytes", (value)) +} + +// GetVirtualDiskReasonRegenReadErrorBytes gets the value of VirtualDiskReasonRegenReadErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenReadErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenReadErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenWriteError sets the value of VirtualDiskReasonRegenWriteError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenWriteError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenWriteError", (value)) +} + +// GetVirtualDiskReasonRegenWriteError gets the value of VirtualDiskReasonRegenWriteError for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenWriteError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenWriteError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenWriteErrorBytes sets the value of VirtualDiskReasonRegenWriteErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenWriteErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenWriteErrorBytes", (value)) +} + +// GetVirtualDiskReasonRegenWriteErrorBytes gets the value of VirtualDiskReasonRegenWriteErrorBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenWriteErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenWriteErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRetired sets the value of VirtualDiskReasonRetired for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRetired(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRetired", (value)) +} + +// GetVirtualDiskReasonRetired gets the value of VirtualDiskReasonRetired for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRetired() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRetired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRetiredBytes sets the value of VirtualDiskReasonRetiredBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRetiredBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRetiredBytes", (value)) +} + +// GetVirtualDiskReasonRetiredBytes gets the value of VirtualDiskReasonRetiredBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRetiredBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRetiredBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRebalanceReplacementBytes sets the value of VirtualDiskRebalanceReplacementBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRebalanceReplacementBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRebalanceReplacementBytes", (value)) +} + +// GetVirtualDiskRebalanceReplacementBytes gets the value of VirtualDiskRebalanceReplacementBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRebalanceReplacementBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRebalanceReplacementBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRebalanceReplacementCount sets the value of VirtualDiskRebalanceReplacementCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRebalanceReplacementCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRebalanceReplacementCount", (value)) +} + +// GetVirtualDiskRebalanceReplacementCount gets the value of VirtualDiskRebalanceReplacementCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRebalanceReplacementCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRebalanceReplacementCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRegenerating sets the value of VirtualDiskRegenerating for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRegenerating(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRegenerating", (value)) +} + +// GetVirtualDiskRegenerating gets the value of VirtualDiskRegenerating for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRegenerating() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRegenerating") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRegeneratingBytes sets the value of VirtualDiskRegeneratingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRegeneratingBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRegeneratingBytes", (value)) +} + +// GetVirtualDiskRegeneratingBytes gets the value of VirtualDiskRegeneratingBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRegeneratingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRegeneratingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairNeedPhase2Count sets the value of VirtualDiskRepairNeedPhase2Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairNeedPhase2Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairNeedPhase2Count", (value)) +} + +// GetVirtualDiskRepairNeedPhase2Count gets the value of VirtualDiskRepairNeedPhase2Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairNeedPhase2Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairNeedPhase2Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairNeedPhase6Count sets the value of VirtualDiskRepairNeedPhase6Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairNeedPhase6Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairNeedPhase6Count", (value)) +} + +// GetVirtualDiskRepairNeedPhase6Count gets the value of VirtualDiskRepairNeedPhase6Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairNeedPhase6Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairNeedPhase6Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase1Count sets the value of VirtualDiskRepairPhase1Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase1Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase1Count", (value)) +} + +// GetVirtualDiskRepairPhase1Count gets the value of VirtualDiskRepairPhase1Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase1Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase1Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase1Status sets the value of VirtualDiskRepairPhase1Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase1Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase1Status", (value)) +} + +// GetVirtualDiskRepairPhase1Status gets the value of VirtualDiskRepairPhase1Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase1Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase1Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase2Count sets the value of VirtualDiskRepairPhase2Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase2Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase2Count", (value)) +} + +// GetVirtualDiskRepairPhase2Count gets the value of VirtualDiskRepairPhase2Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase2Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase2Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase2Status sets the value of VirtualDiskRepairPhase2Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase2Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase2Status", (value)) +} + +// GetVirtualDiskRepairPhase2Status gets the value of VirtualDiskRepairPhase2Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase2Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase2Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase3Count sets the value of VirtualDiskRepairPhase3Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase3Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase3Count", (value)) +} + +// GetVirtualDiskRepairPhase3Count gets the value of VirtualDiskRepairPhase3Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase3Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase3Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase3Status sets the value of VirtualDiskRepairPhase3Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase3Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase3Status", (value)) +} + +// GetVirtualDiskRepairPhase3Status gets the value of VirtualDiskRepairPhase3Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase3Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase3Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase4Count sets the value of VirtualDiskRepairPhase4Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase4Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase4Count", (value)) +} + +// GetVirtualDiskRepairPhase4Count gets the value of VirtualDiskRepairPhase4Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase4Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase4Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase4Status sets the value of VirtualDiskRepairPhase4Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase4Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase4Status", (value)) +} + +// GetVirtualDiskRepairPhase4Status gets the value of VirtualDiskRepairPhase4Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase4Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase4Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase5Count sets the value of VirtualDiskRepairPhase5Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase5Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase5Count", (value)) +} + +// GetVirtualDiskRepairPhase5Count gets the value of VirtualDiskRepairPhase5Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase5Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase5Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase5Status sets the value of VirtualDiskRepairPhase5Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase5Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase5Status", (value)) +} + +// GetVirtualDiskRepairPhase5Status gets the value of VirtualDiskRepairPhase5Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase5Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase5Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase6Count sets the value of VirtualDiskRepairPhase6Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase6Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase6Count", (value)) +} + +// GetVirtualDiskRepairPhase6Count gets the value of VirtualDiskRepairPhase6Count for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase6Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase6Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase6Status sets the value of VirtualDiskRepairPhase6Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase6Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase6Status", (value)) +} + +// GetVirtualDiskRepairPhase6Status gets the value of VirtualDiskRepairPhase6Status for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase6Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase6Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairReplacementBytes sets the value of VirtualDiskRepairReplacementBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairReplacementBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairReplacementBytes", (value)) +} + +// GetVirtualDiskRepairReplacementBytes gets the value of VirtualDiskRepairReplacementBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairReplacementBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairReplacementBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairReplacementCount sets the value of VirtualDiskRepairReplacementCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairReplacementCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairReplacementCount", (value)) +} + +// GetVirtualDiskRepairReplacementCount gets the value of VirtualDiskRepairReplacementCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairReplacementCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairReplacementCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskScopeRegenerationBytes sets the value of VirtualDiskScopeRegenerationBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskScopeRegenerationBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskScopeRegenerationBytes", (value)) +} + +// GetVirtualDiskScopeRegenerationBytes gets the value of VirtualDiskScopeRegenerationBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskScopeRegenerationBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskScopeRegenerationBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskScopeRegenerationCount sets the value of VirtualDiskScopeRegenerationCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskScopeRegenerationCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskScopeRegenerationCount", (value)) +} + +// GetVirtualDiskScopeRegenerationCount gets the value of VirtualDiskScopeRegenerationCount for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskScopeRegenerationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskScopeRegenerationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskStale sets the value of VirtualDiskStale for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskStale(value uint64) (err error) { + return instance.SetProperty("VirtualDiskStale", (value)) +} + +// GetVirtualDiskStale gets the value of VirtualDiskStale for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskStale() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskStale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskStaleBytes sets the value of VirtualDiskStaleBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskStaleBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskStaleBytes", (value)) +} + +// GetVirtualDiskStaleBytes gets the value of VirtualDiskStaleBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskStaleBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskStaleBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskTotal sets the value of VirtualDiskTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskTotal(value uint64) (err error) { + return instance.SetProperty("VirtualDiskTotal", (value)) +} + +// GetVirtualDiskTotal gets the value of VirtualDiskTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskTotalBytes sets the value of VirtualDiskTotalBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskTotalBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskTotalBytes", (value)) +} + +// GetVirtualDiskTotalBytes gets the value of VirtualDiskTotalBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesWriteCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesWriteCache.go new file mode 100644 index 00000000..45bc5055 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_StorageSpacesWriteCache.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_StorageSpacesWriteCache struct +type Win32_PerfFormattedData_Counters_StorageSpacesWriteCache struct { + *Win32_PerfFormattedData + + // + CacheAdvances uint32 + + // + CacheCheckpoints uint32 + + // + CacheDataBytes uint64 + + // + CacheDataPercent uint64 + + // + CacheDestagesCurrent uint32 + + // + CacheReclaimableBytes uint64 + + // + CacheReclaimablePercent uint64 + + // + CacheSize uint64 + + // + CacheUsedBytes uint64 + + // + CacheUsedPercent uint64 + + // + EvictCacheBytesPersec uint64 + + // + EvictCacheDestagedBytesPersec uint64 + + // + EvictCacheDestagedPercent uint64 + + // + EvictCacheOverwriteBytesPersec uint64 + + // + EvictCacheOverwritePercent uint64 + + // + ReadBypassBytesPersec uint64 + + // + ReadBypassPercent uint64 + + // + ReadCacheBytesPersec uint64 + + // + ReadCachePercent uint64 + + // + WriteBypassBytesPersec uint64 + + // + WriteBypassPercent uint64 + + // + WriteCacheBytesPersec uint64 + + // + WriteCacheOverlapBytesPersec uint64 + + // + WriteCacheOverlapPercent uint64 + + // + WriteCachePercent uint64 + + // + WriteCacheUnalignedBytesPersec uint64 + + // + WriteCacheUnalignedPercent uint64 + + // + WriteCacheUntrimmedBytesPersec uint64 + + // + WriteCacheUntrimmedPercent uint64 +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesWriteCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesWriteCache{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_StorageSpacesWriteCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_StorageSpacesWriteCache{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCacheAdvances sets the value of CacheAdvances for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheAdvances(value uint32) (err error) { + return instance.SetProperty("CacheAdvances", (value)) +} + +// GetCacheAdvances gets the value of CacheAdvances for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheAdvances() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheAdvances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheCheckpoints sets the value of CacheCheckpoints for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheCheckpoints(value uint32) (err error) { + return instance.SetProperty("CacheCheckpoints", (value)) +} + +// GetCacheCheckpoints gets the value of CacheCheckpoints for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheCheckpoints() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheCheckpoints") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheDataBytes sets the value of CacheDataBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheDataBytes(value uint64) (err error) { + return instance.SetProperty("CacheDataBytes", (value)) +} + +// GetCacheDataBytes gets the value of CacheDataBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheDataBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheDataBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheDataPercent sets the value of CacheDataPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheDataPercent(value uint64) (err error) { + return instance.SetProperty("CacheDataPercent", (value)) +} + +// GetCacheDataPercent gets the value of CacheDataPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheDataPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheDataPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheDestagesCurrent sets the value of CacheDestagesCurrent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheDestagesCurrent(value uint32) (err error) { + return instance.SetProperty("CacheDestagesCurrent", (value)) +} + +// GetCacheDestagesCurrent gets the value of CacheDestagesCurrent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheDestagesCurrent() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheDestagesCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheReclaimableBytes sets the value of CacheReclaimableBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheReclaimableBytes(value uint64) (err error) { + return instance.SetProperty("CacheReclaimableBytes", (value)) +} + +// GetCacheReclaimableBytes gets the value of CacheReclaimableBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheReclaimableBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReclaimableBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReclaimablePercent sets the value of CacheReclaimablePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheReclaimablePercent(value uint64) (err error) { + return instance.SetProperty("CacheReclaimablePercent", (value)) +} + +// GetCacheReclaimablePercent gets the value of CacheReclaimablePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheReclaimablePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReclaimablePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSize sets the value of CacheSize for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheSize(value uint64) (err error) { + return instance.SetProperty("CacheSize", (value)) +} + +// GetCacheSize gets the value of CacheSize for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsedBytes sets the value of CacheUsedBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheUsedBytes(value uint64) (err error) { + return instance.SetProperty("CacheUsedBytes", (value)) +} + +// GetCacheUsedBytes gets the value of CacheUsedBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheUsedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsedPercent sets the value of CacheUsedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyCacheUsedPercent(value uint64) (err error) { + return instance.SetProperty("CacheUsedPercent", (value)) +} + +// GetCacheUsedPercent gets the value of CacheUsedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyCacheUsedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheBytesPersec sets the value of EvictCacheBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheBytesPersec(value uint64) (err error) { + return instance.SetProperty("EvictCacheBytesPersec", (value)) +} + +// GetEvictCacheBytesPersec gets the value of EvictCacheBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheDestagedBytesPersec sets the value of EvictCacheDestagedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheDestagedBytesPersec(value uint64) (err error) { + return instance.SetProperty("EvictCacheDestagedBytesPersec", (value)) +} + +// GetEvictCacheDestagedBytesPersec gets the value of EvictCacheDestagedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheDestagedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheDestagedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheDestagedPercent sets the value of EvictCacheDestagedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheDestagedPercent(value uint64) (err error) { + return instance.SetProperty("EvictCacheDestagedPercent", (value)) +} + +// GetEvictCacheDestagedPercent gets the value of EvictCacheDestagedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheDestagedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheDestagedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheOverwriteBytesPersec sets the value of EvictCacheOverwriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheOverwriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("EvictCacheOverwriteBytesPersec", (value)) +} + +// GetEvictCacheOverwriteBytesPersec gets the value of EvictCacheOverwriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheOverwriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheOverwriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheOverwritePercent sets the value of EvictCacheOverwritePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheOverwritePercent(value uint64) (err error) { + return instance.SetProperty("EvictCacheOverwritePercent", (value)) +} + +// GetEvictCacheOverwritePercent gets the value of EvictCacheOverwritePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheOverwritePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheOverwritePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBypassBytesPersec sets the value of ReadBypassBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyReadBypassBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBypassBytesPersec", (value)) +} + +// GetReadBypassBytesPersec gets the value of ReadBypassBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyReadBypassBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBypassBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBypassPercent sets the value of ReadBypassPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyReadBypassPercent(value uint64) (err error) { + return instance.SetProperty("ReadBypassPercent", (value)) +} + +// GetReadBypassPercent gets the value of ReadBypassPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyReadBypassPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBypassPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCacheBytesPersec sets the value of ReadCacheBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyReadCacheBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadCacheBytesPersec", (value)) +} + +// GetReadCacheBytesPersec gets the value of ReadCacheBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyReadCacheBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadCacheBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCachePercent sets the value of ReadCachePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyReadCachePercent(value uint64) (err error) { + return instance.SetProperty("ReadCachePercent", (value)) +} + +// GetReadCachePercent gets the value of ReadCachePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyReadCachePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadCachePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBypassBytesPersec sets the value of WriteBypassBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteBypassBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBypassBytesPersec", (value)) +} + +// GetWriteBypassBytesPersec gets the value of WriteBypassBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteBypassBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBypassBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBypassPercent sets the value of WriteBypassPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteBypassPercent(value uint64) (err error) { + return instance.SetProperty("WriteBypassPercent", (value)) +} + +// GetWriteBypassPercent gets the value of WriteBypassPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteBypassPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBypassPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheBytesPersec sets the value of WriteCacheBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheBytesPersec", (value)) +} + +// GetWriteCacheBytesPersec gets the value of WriteCacheBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheOverlapBytesPersec sets the value of WriteCacheOverlapBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheOverlapBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheOverlapBytesPersec", (value)) +} + +// GetWriteCacheOverlapBytesPersec gets the value of WriteCacheOverlapBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheOverlapBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheOverlapBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheOverlapPercent sets the value of WriteCacheOverlapPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheOverlapPercent(value uint64) (err error) { + return instance.SetProperty("WriteCacheOverlapPercent", (value)) +} + +// GetWriteCacheOverlapPercent gets the value of WriteCacheOverlapPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheOverlapPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheOverlapPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCachePercent sets the value of WriteCachePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCachePercent(value uint64) (err error) { + return instance.SetProperty("WriteCachePercent", (value)) +} + +// GetWriteCachePercent gets the value of WriteCachePercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCachePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCachePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUnalignedBytesPersec sets the value of WriteCacheUnalignedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUnalignedBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheUnalignedBytesPersec", (value)) +} + +// GetWriteCacheUnalignedBytesPersec gets the value of WriteCacheUnalignedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUnalignedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUnalignedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUnalignedPercent sets the value of WriteCacheUnalignedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUnalignedPercent(value uint64) (err error) { + return instance.SetProperty("WriteCacheUnalignedPercent", (value)) +} + +// GetWriteCacheUnalignedPercent gets the value of WriteCacheUnalignedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUnalignedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUnalignedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUntrimmedBytesPersec sets the value of WriteCacheUntrimmedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUntrimmedBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheUntrimmedBytesPersec", (value)) +} + +// GetWriteCacheUntrimmedBytesPersec gets the value of WriteCacheUntrimmedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUntrimmedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUntrimmedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUntrimmedPercent sets the value of WriteCacheUntrimmedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUntrimmedPercent(value uint64) (err error) { + return instance.SetProperty("WriteCacheUntrimmedPercent", (value)) +} + +// GetWriteCacheUntrimmedPercent gets the value of WriteCacheUntrimmedPercent for the instance +func (instance *Win32_PerfFormattedData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUntrimmedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUntrimmedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Synchronization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Synchronization.go new file mode 100644 index 00000000..a7a90cd9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_Synchronization.go @@ -0,0 +1,1310 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_Synchronization struct +type Win32_PerfFormattedData_Counters_Synchronization struct { + *Win32_PerfFormattedData + + // + ExecResourceAcquiresAcqExclLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceAttemptsAcqExclLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdStarveExclPersec uint32 + + // + ExecResourceAttemptsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceBoostExclOwnerPersec uint32 + + // + ExecResourceBoostSharedOwnersPersec uint32 + + // + ExecResourceContentionAcqExclLitePersec uint32 + + // + ExecResourceContentionAcqShrdLitePersec uint32 + + // + ExecResourceContentionAcqShrdStarveExclPersec uint32 + + // + ExecResourceContentionAcqShrdWaitForExclPersec uint32 + + // + ExecResourcenoWaitsAcqExclLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdStarveExclPersec uint32 + + // + ExecResourcenoWaitsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqExclLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceSetOwnerPointerExclusivePersec uint32 + + // + ExecResourceSetOwnerPointerSharedExistingOwnerPersec uint32 + + // + ExecResourceSetOwnerPointerSharedNewOwnerPersec uint32 + + // + ExecResourceTotalAcquiresPersec uint32 + + // + ExecResourceTotalContentionsPersec uint32 + + // + ExecResourceTotalConvExclusiveToSharedPersec uint32 + + // + ExecResourceTotalDeletePersec uint32 + + // + ExecResourceTotalExclusiveReleasesPersec uint32 + + // + ExecResourceTotalInitializePersec uint32 + + // + ExecResourceTotalReInitializePersec uint32 + + // + ExecResourceTotalSharedReleasesPersec uint32 + + // + IPISendBroadcastRequestsPersec uint32 + + // + IPISendRoutineRequestsPersec uint32 + + // + IPISendSoftwareInterruptsPersec uint32 + + // + SpinlockAcquiresPersec uint32 + + // + SpinlockContentionsPersec uint32 + + // + SpinlockSpinsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_SynchronizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_Synchronization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_Synchronization{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SynchronizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_Synchronization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_Synchronization{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetExecResourceAcquiresAcqExclLitePersec sets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqExclLitePersec gets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdLitePersec sets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdLitePersec gets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqExclLitePersec sets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqExclLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqExclLitePersec gets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdLitePersec sets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdLitePersec gets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdStarveExclPersec sets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdStarveExclPersec gets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdWaitForExclPersec sets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdWaitForExclPersec gets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostExclOwnerPersec sets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceBoostExclOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostExclOwnerPersec", (value)) +} + +// GetExecResourceBoostExclOwnerPersec gets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceBoostExclOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostExclOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostSharedOwnersPersec sets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceBoostSharedOwnersPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostSharedOwnersPersec", (value)) +} + +// GetExecResourceBoostSharedOwnersPersec gets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceBoostSharedOwnersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostSharedOwnersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqExclLitePersec sets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceContentionAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqExclLitePersec", (value)) +} + +// GetExecResourceContentionAcqExclLitePersec gets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceContentionAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdLitePersec sets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceContentionAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdLitePersec", (value)) +} + +// GetExecResourceContentionAcqShrdLitePersec gets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceContentionAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdStarveExclPersec sets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceContentionAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdStarveExclPersec gets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceContentionAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdWaitForExclPersec sets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceContentionAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdWaitForExclPersec gets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceContentionAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqExclLitePersec sets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqExclLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqExclLitePersec gets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdLitePersec sets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdLitePersec gets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdStarveExclPersec sets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdStarveExclPersec gets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdWaitForExclPersec sets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdWaitForExclPersec gets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqExclLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqExclLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerExclusivePersec sets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceSetOwnerPointerExclusivePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerExclusivePersec", (value)) +} + +// GetExecResourceSetOwnerPointerExclusivePersec gets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceSetOwnerPointerExclusivePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerExclusivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedExistingOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedExistingOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedNewOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedNewOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalAcquiresPersec sets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalAcquiresPersec", (value)) +} + +// GetExecResourceTotalAcquiresPersec gets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalContentionsPersec sets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalContentionsPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalContentionsPersec", (value)) +} + +// GetExecResourceTotalContentionsPersec gets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalConvExclusiveToSharedPersec sets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalConvExclusiveToSharedPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalConvExclusiveToSharedPersec", (value)) +} + +// GetExecResourceTotalConvExclusiveToSharedPersec gets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalConvExclusiveToSharedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalConvExclusiveToSharedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalDeletePersec sets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalDeletePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalDeletePersec", (value)) +} + +// GetExecResourceTotalDeletePersec gets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalDeletePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalDeletePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalExclusiveReleasesPersec sets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalExclusiveReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalExclusiveReleasesPersec", (value)) +} + +// GetExecResourceTotalExclusiveReleasesPersec gets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalExclusiveReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalExclusiveReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalInitializePersec sets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalInitializePersec", (value)) +} + +// GetExecResourceTotalInitializePersec gets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalReInitializePersec sets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalReInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalReInitializePersec", (value)) +} + +// GetExecResourceTotalReInitializePersec gets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalReInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalReInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalSharedReleasesPersec sets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyExecResourceTotalSharedReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalSharedReleasesPersec", (value)) +} + +// GetExecResourceTotalSharedReleasesPersec gets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyExecResourceTotalSharedReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalSharedReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendBroadcastRequestsPersec sets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyIPISendBroadcastRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendBroadcastRequestsPersec", (value)) +} + +// GetIPISendBroadcastRequestsPersec gets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyIPISendBroadcastRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendBroadcastRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendRoutineRequestsPersec sets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyIPISendRoutineRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendRoutineRequestsPersec", (value)) +} + +// GetIPISendRoutineRequestsPersec gets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyIPISendRoutineRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendRoutineRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendSoftwareInterruptsPersec sets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertyIPISendSoftwareInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendSoftwareInterruptsPersec", (value)) +} + +// GetIPISendSoftwareInterruptsPersec gets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertyIPISendSoftwareInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendSoftwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockAcquiresPersec sets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertySpinlockAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockAcquiresPersec", (value)) +} + +// GetSpinlockAcquiresPersec gets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertySpinlockAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockContentionsPersec sets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertySpinlockContentionsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockContentionsPersec", (value)) +} + +// GetSpinlockContentionsPersec gets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertySpinlockContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockSpinsPersec sets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) SetPropertySpinlockSpinsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockSpinsPersec", (value)) +} + +// GetSpinlockSpinsPersec gets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_Synchronization) GetPropertySpinlockSpinsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockSpinsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SynchronizationNuma.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SynchronizationNuma.go new file mode 100644 index 00000000..f74d02bc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_SynchronizationNuma.go @@ -0,0 +1,1310 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_SynchronizationNuma struct +type Win32_PerfFormattedData_Counters_SynchronizationNuma struct { + *Win32_PerfFormattedData + + // + ExecResourceAcquiresAcqExclLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceAttemptsAcqExclLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdStarveExclPersec uint32 + + // + ExecResourceAttemptsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceBoostExclOwnerPersec uint32 + + // + ExecResourceBoostSharedOwnersPersec uint32 + + // + ExecResourceContentionAcqExclLitePersec uint32 + + // + ExecResourceContentionAcqShrdLitePersec uint32 + + // + ExecResourceContentionAcqShrdStarveExclPersec uint32 + + // + ExecResourceContentionAcqShrdWaitForExclPersec uint32 + + // + ExecResourcenoWaitsAcqExclLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdStarveExclPersec uint32 + + // + ExecResourcenoWaitsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqExclLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceSetOwnerPointerExclusivePersec uint32 + + // + ExecResourceSetOwnerPointerSharedExistingOwnerPersec uint32 + + // + ExecResourceSetOwnerPointerSharedNewOwnerPersec uint32 + + // + ExecResourceTotalAcquiresPersec uint32 + + // + ExecResourceTotalContentionsPersec uint32 + + // + ExecResourceTotalConvExclusiveToSharedPersec uint32 + + // + ExecResourceTotalDeletePersec uint32 + + // + ExecResourceTotalExclusiveReleasesPersec uint32 + + // + ExecResourceTotalInitializePersec uint32 + + // + ExecResourceTotalReInitializePersec uint32 + + // + ExecResourceTotalSharedReleasesPersec uint32 + + // + IPISendBroadcastRequestsPersec uint32 + + // + IPISendRoutineRequestsPersec uint32 + + // + IPISendSoftwareInterruptsPersec uint32 + + // + SpinlockAcquiresPersec uint32 + + // + SpinlockContentionsPersec uint32 + + // + SpinlockSpinsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_SynchronizationNumaEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_SynchronizationNuma, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SynchronizationNuma{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_SynchronizationNumaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_SynchronizationNuma, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_SynchronizationNuma{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetExecResourceAcquiresAcqExclLitePersec sets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqExclLitePersec gets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdLitePersec sets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdLitePersec gets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqExclLitePersec sets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqExclLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqExclLitePersec gets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdLitePersec sets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdLitePersec gets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdStarveExclPersec sets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdStarveExclPersec gets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdWaitForExclPersec sets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdWaitForExclPersec gets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostExclOwnerPersec sets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceBoostExclOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostExclOwnerPersec", (value)) +} + +// GetExecResourceBoostExclOwnerPersec gets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceBoostExclOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostExclOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostSharedOwnersPersec sets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceBoostSharedOwnersPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostSharedOwnersPersec", (value)) +} + +// GetExecResourceBoostSharedOwnersPersec gets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceBoostSharedOwnersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostSharedOwnersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqExclLitePersec sets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqExclLitePersec", (value)) +} + +// GetExecResourceContentionAcqExclLitePersec gets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdLitePersec sets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdLitePersec", (value)) +} + +// GetExecResourceContentionAcqShrdLitePersec gets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdStarveExclPersec sets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdStarveExclPersec gets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdWaitForExclPersec sets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdWaitForExclPersec gets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqExclLitePersec sets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqExclLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqExclLitePersec gets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdLitePersec sets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdLitePersec gets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdStarveExclPersec sets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdStarveExclPersec gets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdWaitForExclPersec sets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdWaitForExclPersec gets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqExclLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqExclLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerExclusivePersec sets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceSetOwnerPointerExclusivePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerExclusivePersec", (value)) +} + +// GetExecResourceSetOwnerPointerExclusivePersec gets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceSetOwnerPointerExclusivePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerExclusivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedExistingOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedExistingOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedNewOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedNewOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalAcquiresPersec sets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalAcquiresPersec", (value)) +} + +// GetExecResourceTotalAcquiresPersec gets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalContentionsPersec sets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalContentionsPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalContentionsPersec", (value)) +} + +// GetExecResourceTotalContentionsPersec gets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalConvExclusiveToSharedPersec sets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalConvExclusiveToSharedPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalConvExclusiveToSharedPersec", (value)) +} + +// GetExecResourceTotalConvExclusiveToSharedPersec gets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalConvExclusiveToSharedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalConvExclusiveToSharedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalDeletePersec sets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalDeletePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalDeletePersec", (value)) +} + +// GetExecResourceTotalDeletePersec gets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalDeletePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalDeletePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalExclusiveReleasesPersec sets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalExclusiveReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalExclusiveReleasesPersec", (value)) +} + +// GetExecResourceTotalExclusiveReleasesPersec gets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalExclusiveReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalExclusiveReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalInitializePersec sets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalInitializePersec", (value)) +} + +// GetExecResourceTotalInitializePersec gets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalReInitializePersec sets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalReInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalReInitializePersec", (value)) +} + +// GetExecResourceTotalReInitializePersec gets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalReInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalReInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalSharedReleasesPersec sets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalSharedReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalSharedReleasesPersec", (value)) +} + +// GetExecResourceTotalSharedReleasesPersec gets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalSharedReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalSharedReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendBroadcastRequestsPersec sets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyIPISendBroadcastRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendBroadcastRequestsPersec", (value)) +} + +// GetIPISendBroadcastRequestsPersec gets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyIPISendBroadcastRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendBroadcastRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendRoutineRequestsPersec sets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyIPISendRoutineRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendRoutineRequestsPersec", (value)) +} + +// GetIPISendRoutineRequestsPersec gets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyIPISendRoutineRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendRoutineRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendSoftwareInterruptsPersec sets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertyIPISendSoftwareInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendSoftwareInterruptsPersec", (value)) +} + +// GetIPISendSoftwareInterruptsPersec gets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertyIPISendSoftwareInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendSoftwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockAcquiresPersec sets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertySpinlockAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockAcquiresPersec", (value)) +} + +// GetSpinlockAcquiresPersec gets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertySpinlockAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockContentionsPersec sets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertySpinlockContentionsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockContentionsPersec", (value)) +} + +// GetSpinlockContentionsPersec gets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertySpinlockContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockSpinsPersec sets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) SetPropertySpinlockSpinsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockSpinsPersec", (value)) +} + +// GetSpinlockSpinsPersec gets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_SynchronizationNuma) GetPropertySpinlockSpinsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockSpinsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoClient.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoClient.go new file mode 100644 index 00000000..6d4abf83 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoClient.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_TeredoClient struct +type Win32_PerfFormattedData_Counters_TeredoClient struct { + *Win32_PerfFormattedData + + // + InTeredoBubble uint32 + + // + InTeredoData uint64 + + // + InTeredoDataKernelMode uint64 + + // + InTeredoDataUserMode uint64 + + // + InTeredoInvalid uint32 + + // + InTeredoRouterAdvertisement uint32 + + // + OutTeredoBubble uint32 + + // + OutTeredoData uint64 + + // + OutTeredoDataKernelMode uint64 + + // + OutTeredoDataUserMode uint64 + + // + OutTeredoRouterSolicitation uint32 +} + +func NewWin32_PerfFormattedData_Counters_TeredoClientEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_TeredoClient, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_TeredoClient{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_TeredoClientEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_TeredoClient, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_TeredoClient{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetInTeredoBubble sets the value of InTeredoBubble for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyInTeredoBubble(value uint32) (err error) { + return instance.SetProperty("InTeredoBubble", (value)) +} + +// GetInTeredoBubble gets the value of InTeredoBubble for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyInTeredoBubble() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoBubble") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoData sets the value of InTeredoData for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyInTeredoData(value uint64) (err error) { + return instance.SetProperty("InTeredoData", (value)) +} + +// GetInTeredoData gets the value of InTeredoData for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyInTeredoData() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoDataKernelMode sets the value of InTeredoDataKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyInTeredoDataKernelMode(value uint64) (err error) { + return instance.SetProperty("InTeredoDataKernelMode", (value)) +} + +// GetInTeredoDataKernelMode gets the value of InTeredoDataKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyInTeredoDataKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoDataKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoDataUserMode sets the value of InTeredoDataUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyInTeredoDataUserMode(value uint64) (err error) { + return instance.SetProperty("InTeredoDataUserMode", (value)) +} + +// GetInTeredoDataUserMode gets the value of InTeredoDataUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyInTeredoDataUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoDataUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoInvalid sets the value of InTeredoInvalid for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyInTeredoInvalid(value uint32) (err error) { + return instance.SetProperty("InTeredoInvalid", (value)) +} + +// GetInTeredoInvalid gets the value of InTeredoInvalid for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyInTeredoInvalid() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoInvalid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRouterAdvertisement sets the value of InTeredoRouterAdvertisement for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyInTeredoRouterAdvertisement(value uint32) (err error) { + return instance.SetProperty("InTeredoRouterAdvertisement", (value)) +} + +// GetInTeredoRouterAdvertisement gets the value of InTeredoRouterAdvertisement for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyInTeredoRouterAdvertisement() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRouterAdvertisement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoBubble sets the value of OutTeredoBubble for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyOutTeredoBubble(value uint32) (err error) { + return instance.SetProperty("OutTeredoBubble", (value)) +} + +// GetOutTeredoBubble gets the value of OutTeredoBubble for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyOutTeredoBubble() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoBubble") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoData sets the value of OutTeredoData for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyOutTeredoData(value uint64) (err error) { + return instance.SetProperty("OutTeredoData", (value)) +} + +// GetOutTeredoData gets the value of OutTeredoData for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyOutTeredoData() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoDataKernelMode sets the value of OutTeredoDataKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyOutTeredoDataKernelMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoDataKernelMode", (value)) +} + +// GetOutTeredoDataKernelMode gets the value of OutTeredoDataKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyOutTeredoDataKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoDataKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoDataUserMode sets the value of OutTeredoDataUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyOutTeredoDataUserMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoDataUserMode", (value)) +} + +// GetOutTeredoDataUserMode gets the value of OutTeredoDataUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyOutTeredoDataUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoDataUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRouterSolicitation sets the value of OutTeredoRouterSolicitation for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) SetPropertyOutTeredoRouterSolicitation(value uint32) (err error) { + return instance.SetProperty("OutTeredoRouterSolicitation", (value)) +} + +// GetOutTeredoRouterSolicitation gets the value of OutTeredoRouterSolicitation for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoClient) GetPropertyOutTeredoRouterSolicitation() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRouterSolicitation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoRelay.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoRelay.go new file mode 100644 index 00000000..716eab10 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoRelay.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_TeredoRelay struct +type Win32_PerfFormattedData_Counters_TeredoRelay struct { + *Win32_PerfFormattedData + + // + InTeredoRelayErrorPacketsDestinationError uint32 + + // + InTeredoRelayErrorPacketsHeaderError uint32 + + // + InTeredoRelayErrorPacketsSourceError uint32 + + // + InTeredoRelayErrorPacketsTotal uint32 + + // + InTeredoRelaySuccessPacketsBubbles uint32 + + // + InTeredoRelaySuccessPacketsDataPackets uint64 + + // + InTeredoRelaySuccessPacketsDataPacketsKernelMode uint64 + + // + InTeredoRelaySuccessPacketsDataPacketsUserMode uint64 + + // + InTeredoRelaySuccessPacketsTotal uint64 + + // + InTeredoRelayTotalPacketsSuccessError uint32 + + // + InTeredoRelayTotalPacketsSuccessErrorPersec uint32 + + // + OutTeredoRelayErrorPackets uint32 + + // + OutTeredoRelayErrorPacketsDestinationError uint32 + + // + OutTeredoRelayErrorPacketsHeaderError uint32 + + // + OutTeredoRelayErrorPacketsSourceError uint32 + + // + OutTeredoRelaySuccessPackets uint64 + + // + OutTeredoRelaySuccessPacketsBubbles uint32 + + // + OutTeredoRelaySuccessPacketsDataPackets uint64 + + // + OutTeredoRelaySuccessPacketsDataPacketsKernelMode uint64 + + // + OutTeredoRelaySuccessPacketsDataPacketsUserMode uint64 + + // + OutTeredoRelayTotalPacketsSuccessError uint32 + + // + OutTeredoRelayTotalPacketsSuccessErrorPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_TeredoRelayEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_TeredoRelay, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_TeredoRelay{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_TeredoRelayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_TeredoRelay, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_TeredoRelay{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetInTeredoRelayErrorPacketsDestinationError sets the value of InTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsDestinationError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsDestinationError", (value)) +} + +// GetInTeredoRelayErrorPacketsDestinationError gets the value of InTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsDestinationError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsDestinationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayErrorPacketsHeaderError sets the value of InTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsHeaderError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsHeaderError", (value)) +} + +// GetInTeredoRelayErrorPacketsHeaderError gets the value of InTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsHeaderError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsHeaderError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayErrorPacketsSourceError sets the value of InTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsSourceError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsSourceError", (value)) +} + +// GetInTeredoRelayErrorPacketsSourceError gets the value of InTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsSourceError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsSourceError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayErrorPacketsTotal sets the value of InTeredoRelayErrorPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsTotal(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsTotal", (value)) +} + +// GetInTeredoRelayErrorPacketsTotal gets the value of InTeredoRelayErrorPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsBubbles sets the value of InTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsBubbles(value uint32) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsBubbles", (value)) +} + +// GetInTeredoRelaySuccessPacketsBubbles gets the value of InTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsBubbles() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsBubbles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsDataPackets sets the value of InTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsDataPackets(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsDataPackets", (value)) +} + +// GetInTeredoRelaySuccessPacketsDataPackets gets the value of InTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsDataPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsDataPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsDataPacketsKernelMode sets the value of InTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsDataPacketsKernelMode(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsDataPacketsKernelMode", (value)) +} + +// GetInTeredoRelaySuccessPacketsDataPacketsKernelMode gets the value of InTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsDataPacketsKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsDataPacketsKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsDataPacketsUserMode sets the value of InTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsDataPacketsUserMode(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsDataPacketsUserMode", (value)) +} + +// GetInTeredoRelaySuccessPacketsDataPacketsUserMode gets the value of InTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsDataPacketsUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsDataPacketsUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsTotal sets the value of InTeredoRelaySuccessPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsTotal(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsTotal", (value)) +} + +// GetInTeredoRelaySuccessPacketsTotal gets the value of InTeredoRelaySuccessPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelayTotalPacketsSuccessError sets the value of InTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelayTotalPacketsSuccessError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayTotalPacketsSuccessError", (value)) +} + +// GetInTeredoRelayTotalPacketsSuccessError gets the value of InTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelayTotalPacketsSuccessError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayTotalPacketsSuccessError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayTotalPacketsSuccessErrorPersec sets the value of InTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyInTeredoRelayTotalPacketsSuccessErrorPersec(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayTotalPacketsSuccessErrorPersec", (value)) +} + +// GetInTeredoRelayTotalPacketsSuccessErrorPersec gets the value of InTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyInTeredoRelayTotalPacketsSuccessErrorPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayTotalPacketsSuccessErrorPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPackets sets the value of OutTeredoRelayErrorPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPackets(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPackets", (value)) +} + +// GetOutTeredoRelayErrorPackets gets the value of OutTeredoRelayErrorPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPacketsDestinationError sets the value of OutTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPacketsDestinationError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPacketsDestinationError", (value)) +} + +// GetOutTeredoRelayErrorPacketsDestinationError gets the value of OutTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPacketsDestinationError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPacketsDestinationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPacketsHeaderError sets the value of OutTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPacketsHeaderError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPacketsHeaderError", (value)) +} + +// GetOutTeredoRelayErrorPacketsHeaderError gets the value of OutTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPacketsHeaderError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPacketsHeaderError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPacketsSourceError sets the value of OutTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPacketsSourceError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPacketsSourceError", (value)) +} + +// GetOutTeredoRelayErrorPacketsSourceError gets the value of OutTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPacketsSourceError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPacketsSourceError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPackets sets the value of OutTeredoRelaySuccessPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPackets(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPackets", (value)) +} + +// GetOutTeredoRelaySuccessPackets gets the value of OutTeredoRelaySuccessPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsBubbles sets the value of OutTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsBubbles(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsBubbles", (value)) +} + +// GetOutTeredoRelaySuccessPacketsBubbles gets the value of OutTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsBubbles() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsBubbles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsDataPackets sets the value of OutTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsDataPackets(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsDataPackets", (value)) +} + +// GetOutTeredoRelaySuccessPacketsDataPackets gets the value of OutTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsDataPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsDataPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsDataPacketsKernelMode sets the value of OutTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsDataPacketsKernelMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsDataPacketsKernelMode", (value)) +} + +// GetOutTeredoRelaySuccessPacketsDataPacketsKernelMode gets the value of OutTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsDataPacketsKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsDataPacketsKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsDataPacketsUserMode sets the value of OutTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsDataPacketsUserMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsDataPacketsUserMode", (value)) +} + +// GetOutTeredoRelaySuccessPacketsDataPacketsUserMode gets the value of OutTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsDataPacketsUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsDataPacketsUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelayTotalPacketsSuccessError sets the value of OutTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelayTotalPacketsSuccessError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayTotalPacketsSuccessError", (value)) +} + +// GetOutTeredoRelayTotalPacketsSuccessError gets the value of OutTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelayTotalPacketsSuccessError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayTotalPacketsSuccessError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayTotalPacketsSuccessErrorPersec sets the value of OutTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) SetPropertyOutTeredoRelayTotalPacketsSuccessErrorPersec(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayTotalPacketsSuccessErrorPersec", (value)) +} + +// GetOutTeredoRelayTotalPacketsSuccessErrorPersec gets the value of OutTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoRelay) GetPropertyOutTeredoRelayTotalPacketsSuccessErrorPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayTotalPacketsSuccessErrorPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoServer.go new file mode 100644 index 00000000..421506eb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_TeredoServer.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_TeredoServer struct +type Win32_PerfFormattedData_Counters_TeredoServer struct { + *Win32_PerfFormattedData + + // + InTeredoServerErrorPacketsAuthenticationError uint32 + + // + InTeredoServerErrorPacketsDestinationError uint32 + + // + InTeredoServerErrorPacketsHeaderError uint32 + + // + InTeredoServerErrorPacketsSourceError uint32 + + // + InTeredoServerErrorPacketsTotal uint32 + + // + InTeredoServerSuccessPacketsBubbles uint32 + + // + InTeredoServerSuccessPacketsEcho uint32 + + // + InTeredoServerSuccessPacketsRSPrimary uint32 + + // + InTeredoServerSuccessPacketsRSSecondary uint32 + + // + InTeredoServerSuccessPacketsTotal uint32 + + // + InTeredoServerTotalPacketsSuccessError uint32 + + // + InTeredoServerTotalPacketsSuccessErrorPersec uint32 + + // + OutTeredoServerRAPrimary uint32 + + // + OutTeredoServerRASecondary uint32 +} + +func NewWin32_PerfFormattedData_Counters_TeredoServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_TeredoServer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_TeredoServer{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_TeredoServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_TeredoServer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_TeredoServer{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetInTeredoServerErrorPacketsAuthenticationError sets the value of InTeredoServerErrorPacketsAuthenticationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsAuthenticationError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsAuthenticationError", (value)) +} + +// GetInTeredoServerErrorPacketsAuthenticationError gets the value of InTeredoServerErrorPacketsAuthenticationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsAuthenticationError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsAuthenticationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsDestinationError sets the value of InTeredoServerErrorPacketsDestinationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsDestinationError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsDestinationError", (value)) +} + +// GetInTeredoServerErrorPacketsDestinationError gets the value of InTeredoServerErrorPacketsDestinationError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsDestinationError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsDestinationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsHeaderError sets the value of InTeredoServerErrorPacketsHeaderError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsHeaderError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsHeaderError", (value)) +} + +// GetInTeredoServerErrorPacketsHeaderError gets the value of InTeredoServerErrorPacketsHeaderError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsHeaderError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsHeaderError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsSourceError sets the value of InTeredoServerErrorPacketsSourceError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsSourceError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsSourceError", (value)) +} + +// GetInTeredoServerErrorPacketsSourceError gets the value of InTeredoServerErrorPacketsSourceError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsSourceError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsSourceError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsTotal sets the value of InTeredoServerErrorPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsTotal(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsTotal", (value)) +} + +// GetInTeredoServerErrorPacketsTotal gets the value of InTeredoServerErrorPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsBubbles sets the value of InTeredoServerSuccessPacketsBubbles for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsBubbles(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsBubbles", (value)) +} + +// GetInTeredoServerSuccessPacketsBubbles gets the value of InTeredoServerSuccessPacketsBubbles for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsBubbles() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsBubbles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsEcho sets the value of InTeredoServerSuccessPacketsEcho for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsEcho(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsEcho", (value)) +} + +// GetInTeredoServerSuccessPacketsEcho gets the value of InTeredoServerSuccessPacketsEcho for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsEcho() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsEcho") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsRSPrimary sets the value of InTeredoServerSuccessPacketsRSPrimary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsRSPrimary(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsRSPrimary", (value)) +} + +// GetInTeredoServerSuccessPacketsRSPrimary gets the value of InTeredoServerSuccessPacketsRSPrimary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsRSPrimary() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsRSPrimary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsRSSecondary sets the value of InTeredoServerSuccessPacketsRSSecondary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsRSSecondary(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsRSSecondary", (value)) +} + +// GetInTeredoServerSuccessPacketsRSSecondary gets the value of InTeredoServerSuccessPacketsRSSecondary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsRSSecondary() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsRSSecondary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsTotal sets the value of InTeredoServerSuccessPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsTotal(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsTotal", (value)) +} + +// GetInTeredoServerSuccessPacketsTotal gets the value of InTeredoServerSuccessPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerTotalPacketsSuccessError sets the value of InTeredoServerTotalPacketsSuccessError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerTotalPacketsSuccessError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerTotalPacketsSuccessError", (value)) +} + +// GetInTeredoServerTotalPacketsSuccessError gets the value of InTeredoServerTotalPacketsSuccessError for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerTotalPacketsSuccessError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerTotalPacketsSuccessError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerTotalPacketsSuccessErrorPersec sets the value of InTeredoServerTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyInTeredoServerTotalPacketsSuccessErrorPersec(value uint32) (err error) { + return instance.SetProperty("InTeredoServerTotalPacketsSuccessErrorPersec", (value)) +} + +// GetInTeredoServerTotalPacketsSuccessErrorPersec gets the value of InTeredoServerTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyInTeredoServerTotalPacketsSuccessErrorPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerTotalPacketsSuccessErrorPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoServerRAPrimary sets the value of OutTeredoServerRAPrimary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyOutTeredoServerRAPrimary(value uint32) (err error) { + return instance.SetProperty("OutTeredoServerRAPrimary", (value)) +} + +// GetOutTeredoServerRAPrimary gets the value of OutTeredoServerRAPrimary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyOutTeredoServerRAPrimary() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoServerRAPrimary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoServerRASecondary sets the value of OutTeredoServerRASecondary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) SetPropertyOutTeredoServerRASecondary(value uint32) (err error) { + return instance.SetProperty("OutTeredoServerRASecondary", (value)) +} + +// GetOutTeredoServerRASecondary gets the value of OutTeredoServerRASecondary for the instance +func (instance *Win32_PerfFormattedData_Counters_TeredoServer) GetPropertyOutTeredoServerRASecondary() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoServerRASecondary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ThermalZoneInformation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ThermalZoneInformation.go new file mode 100644 index 00000000..c2e712fc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_ThermalZoneInformation.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_ThermalZoneInformation struct +type Win32_PerfFormattedData_Counters_ThermalZoneInformation struct { + *Win32_PerfFormattedData + + // + HighPrecisionTemperature uint32 + + // + PercentPassiveLimit uint32 + + // + Temperature uint32 + + // + ThrottleReasons uint32 +} + +func NewWin32_PerfFormattedData_Counters_ThermalZoneInformationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_ThermalZoneInformation, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_ThermalZoneInformation{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_ThermalZoneInformationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_ThermalZoneInformation, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_ThermalZoneInformation{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHighPrecisionTemperature sets the value of HighPrecisionTemperature for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) SetPropertyHighPrecisionTemperature(value uint32) (err error) { + return instance.SetProperty("HighPrecisionTemperature", (value)) +} + +// GetHighPrecisionTemperature gets the value of HighPrecisionTemperature for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) GetPropertyHighPrecisionTemperature() (value uint32, err error) { + retValue, err := instance.GetProperty("HighPrecisionTemperature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPassiveLimit sets the value of PercentPassiveLimit for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) SetPropertyPercentPassiveLimit(value uint32) (err error) { + return instance.SetProperty("PercentPassiveLimit", (value)) +} + +// GetPercentPassiveLimit gets the value of PercentPassiveLimit for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) GetPropertyPercentPassiveLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentPassiveLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTemperature sets the value of Temperature for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) SetPropertyTemperature(value uint32) (err error) { + return instance.SetProperty("Temperature", (value)) +} + +// GetTemperature gets the value of Temperature for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) GetPropertyTemperature() (value uint32, err error) { + retValue, err := instance.GetProperty("Temperature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThrottleReasons sets the value of ThrottleReasons for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) SetPropertyThrottleReasons(value uint32) (err error) { + return instance.SetProperty("ThrottleReasons", (value)) +} + +// GetThrottleReasons gets the value of ThrottleReasons for the instance +func (instance *Win32_PerfFormattedData_Counters_ThermalZoneInformation) GetPropertyThrottleReasons() (value uint32, err error) { + retValue, err := instance.GetProperty("ThrottleReasons") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic.go new file mode 100644 index 00000000..b22f54e8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + AverageInboundBytes uint64 + + // + AverageInboundForwardedMulticastPackets uint64 + + // + AverageInboundForwardedUnicastPackets uint64 + + // + AverageInboundGFTCopyFINPackets uint64 + + // + AverageInboundGFTCopyPackets uint64 + + // + AverageInboundGFTCopyResetPackets uint64 + + // + AverageInboundGFTExceptionPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadFailedPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadPendingPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets uint64 + + // + AverageInboundGFTExceptionUFPackets uint64 + + // + AverageInboundGFTTotalBytes uint64 + + // + AverageInboundGFTTotalPackets uint64 + + // + AverageInboundHairPinnedPackets uint64 + + // + AverageInboundInterceptedPackets uint64 + + // + AverageInboundMissedInterceptedPackets uint64 + + // + AverageInboundNonIPPackets uint64 + + // + AverageInboundPackets uint64 + + // + AverageInboundPendingPackets uint64 + + // + AverageInboundTCPSYNACKPackets uint64 + + // + AverageInboundTCPSYNPackets uint64 + + // + AverageInboundThrottledPackets uint64 + + // + AverageInboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageInboundBytes sets the value of AverageInboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundBytes(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytes", (value)) +} + +// GetAverageInboundBytes gets the value of AverageInboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundForwardedMulticastPackets sets the value of AverageInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundForwardedMulticastPackets", (value)) +} + +// GetAverageInboundForwardedMulticastPackets gets the value of AverageInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundForwardedUnicastPackets sets the value of AverageInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundForwardedUnicastPackets", (value)) +} + +// GetAverageInboundForwardedUnicastPackets gets the value of AverageInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTCopyFINPackets sets the value of AverageInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTCopyFINPackets", (value)) +} + +// GetAverageInboundGFTCopyFINPackets gets the value of AverageInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTCopyPackets sets the value of AverageInboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTCopyPackets", (value)) +} + +// GetAverageInboundGFTCopyPackets gets the value of AverageInboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTCopyResetPackets sets the value of AverageInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTCopyResetPackets", (value)) +} + +// GetAverageInboundGFTCopyResetPackets gets the value of AverageInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionPackets sets the value of AverageInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionPackets", (value)) +} + +// GetAverageInboundGFTExceptionPackets gets the value of AverageInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadBlockedPackets sets the value of AverageInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadBlockedPackets gets the value of AverageInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadDeferredPackets sets the value of AverageInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadDeferredPackets gets the value of AverageInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadedTCPPackets sets the value of AverageInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadedTCPPackets gets the value of AverageInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadedUDPPackets sets the value of AverageInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadedUDPPackets gets the value of AverageInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadFailedPackets sets the value of AverageInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadFailedPackets gets the value of AverageInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadPendingPackets sets the value of AverageInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadPendingPackets gets the value of AverageInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets sets the value of AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets gets the value of AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFPackets sets the value of AverageInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFPackets gets the value of AverageInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTTotalBytes sets the value of AverageInboundGFTTotalBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTTotalBytes(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTTotalBytes", (value)) +} + +// GetAverageInboundGFTTotalBytes gets the value of AverageInboundGFTTotalBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTTotalPackets sets the value of AverageInboundGFTTotalPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTTotalPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTTotalPackets", (value)) +} + +// GetAverageInboundGFTTotalPackets gets the value of AverageInboundGFTTotalPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTTotalPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTTotalPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundHairPinnedPackets sets the value of AverageInboundHairPinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundHairPinnedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundHairPinnedPackets", (value)) +} + +// GetAverageInboundHairPinnedPackets gets the value of AverageInboundHairPinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundHairPinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundHairPinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundInterceptedPackets sets the value of AverageInboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundInterceptedPackets", (value)) +} + +// GetAverageInboundInterceptedPackets gets the value of AverageInboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundMissedInterceptedPackets sets the value of AverageInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundMissedInterceptedPackets", (value)) +} + +// GetAverageInboundMissedInterceptedPackets gets the value of AverageInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundNonIPPackets sets the value of AverageInboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundNonIPPackets", (value)) +} + +// GetAverageInboundNonIPPackets gets the value of AverageInboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPackets sets the value of AverageInboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundPackets", (value)) +} + +// GetAverageInboundPackets gets the value of AverageInboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPendingPackets sets the value of AverageInboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundPendingPackets", (value)) +} + +// GetAverageInboundPendingPackets gets the value of AverageInboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundTCPSYNACKPackets sets the value of AverageInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundTCPSYNACKPackets", (value)) +} + +// GetAverageInboundTCPSYNACKPackets gets the value of AverageInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundTCPSYNPackets sets the value of AverageInboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundTCPSYNPackets", (value)) +} + +// GetAverageInboundTCPSYNPackets gets the value of AverageInboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundThrottledPackets sets the value of AverageInboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundThrottledPackets", (value)) +} + +// GetAverageInboundThrottledPackets gets the value of AverageInboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundUnicastForwardedGFTExceptionPackets sets the value of AverageInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetAverageInboundUnicastForwardedGFTExceptionPackets gets the value of AverageInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic.go new file mode 100644 index 00000000..dba19913 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + AverageGFTOutboundBytes uint64 + + // + AverageOutboundBytes uint64 + + // + AverageOutboundForwardedMulticastPackets uint64 + + // + AverageOutboundForwardedUnicastPackets uint64 + + // + AverageOutboundGFTCopyFINPackets uint64 + + // + AverageOutboundGFTCopyPackets uint64 + + // + AverageOutboundGFTCopyResetPackets uint64 + + // + AverageOutboundGFTExceptionPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadFailedPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadPendingPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets uint64 + + // + AverageOutboundGFTExceptionUFPackets uint64 + + // + AverageOutboundGFTPackets uint64 + + // + AverageOutboundHairpinnedPackets uint64 + + // + AverageOutboundInterceptedPackets uint64 + + // + AverageOutboundMissedInterceptedPackets uint64 + + // + AverageOutboundNonIPPackets uint64 + + // + AverageOutboundPackets uint64 + + // + AverageOutboundPendingPackets uint64 + + // + AverageOutboundTCPSYNACKPackets uint64 + + // + AverageOutboundTCPSYNPackets uint64 + + // + AverageOutboundThrottledPackets uint64 + + // + AverageOutboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageGFTOutboundBytes sets the value of AverageGFTOutboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageGFTOutboundBytes(value uint64) (err error) { + return instance.SetProperty("AverageGFTOutboundBytes", (value)) +} + +// GetAverageGFTOutboundBytes gets the value of AverageGFTOutboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageGFTOutboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageGFTOutboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytes sets the value of AverageOutboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytes(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytes", (value)) +} + +// GetAverageOutboundBytes gets the value of AverageOutboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundForwardedMulticastPackets sets the value of AverageOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundForwardedMulticastPackets", (value)) +} + +// GetAverageOutboundForwardedMulticastPackets gets the value of AverageOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundForwardedUnicastPackets sets the value of AverageOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundForwardedUnicastPackets", (value)) +} + +// GetAverageOutboundForwardedUnicastPackets gets the value of AverageOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTCopyFINPackets sets the value of AverageOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTCopyFINPackets", (value)) +} + +// GetAverageOutboundGFTCopyFINPackets gets the value of AverageOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTCopyPackets sets the value of AverageOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTCopyPackets", (value)) +} + +// GetAverageOutboundGFTCopyPackets gets the value of AverageOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTCopyResetPackets sets the value of AverageOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTCopyResetPackets", (value)) +} + +// GetAverageOutboundGFTCopyResetPackets gets the value of AverageOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionPackets sets the value of AverageOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionPackets", (value)) +} + +// GetAverageOutboundGFTExceptionPackets gets the value of AverageOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadBlockedPackets sets the value of AverageOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadBlockedPackets gets the value of AverageOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadDeferredPackets sets the value of AverageOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadDeferredPackets gets the value of AverageOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadedTCPPackets sets the value of AverageOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadedTCPPackets gets the value of AverageOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadedUDPPackets sets the value of AverageOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadedUDPPackets gets the value of AverageOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadFailedPackets sets the value of AverageOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadFailedPackets gets the value of AverageOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadPendingPackets sets the value of AverageOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadPendingPackets gets the value of AverageOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets sets the value of AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets gets the value of AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFPackets sets the value of AverageOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFPackets gets the value of AverageOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTPackets sets the value of AverageOutboundGFTPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTPackets", (value)) +} + +// GetAverageOutboundGFTPackets gets the value of AverageOutboundGFTPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundHairpinnedPackets sets the value of AverageOutboundHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundHairpinnedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundHairpinnedPackets", (value)) +} + +// GetAverageOutboundHairpinnedPackets gets the value of AverageOutboundHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundHairpinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundInterceptedPackets sets the value of AverageOutboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundInterceptedPackets", (value)) +} + +// GetAverageOutboundInterceptedPackets gets the value of AverageOutboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundMissedInterceptedPackets sets the value of AverageOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundMissedInterceptedPackets", (value)) +} + +// GetAverageOutboundMissedInterceptedPackets gets the value of AverageOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundNonIPPackets sets the value of AverageOutboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundNonIPPackets", (value)) +} + +// GetAverageOutboundNonIPPackets gets the value of AverageOutboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPackets sets the value of AverageOutboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPackets", (value)) +} + +// GetAverageOutboundPackets gets the value of AverageOutboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPendingPackets sets the value of AverageOutboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPendingPackets", (value)) +} + +// GetAverageOutboundPendingPackets gets the value of AverageOutboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundTCPSYNACKPackets sets the value of AverageOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundTCPSYNACKPackets", (value)) +} + +// GetAverageOutboundTCPSYNACKPackets gets the value of AverageOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundTCPSYNPackets sets the value of AverageOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundTCPSYNPackets", (value)) +} + +// GetAverageOutboundTCPSYNPackets gets the value of AverageOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundThrottledPackets sets the value of AverageOutboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundThrottledPackets", (value)) +} + +// GetAverageOutboundThrottledPackets gets the value of AverageOutboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundUnicastForwardedGFTExceptionPackets sets the value of AverageOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetAverageOutboundUnicastForwardedGFTExceptionPackets gets the value of AverageOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go new file mode 100644 index 00000000..ec6d9c53 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets struct +type Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets struct { + *Win32_PerfFormattedData + + // + TotalInboundDroppedACLPackets uint64 + + // + TotalInboundDroppedARPFilterPackets uint64 + + // + TotalInboundDroppedARPGuardPackets uint64 + + // + TotalInboundDroppedARPLimiterPackets uint64 + + // + TotalInboundDroppedBlockedPackets uint64 + + // + TotalInboundDroppedBroadcastPackets uint64 + + // + TotalInboundDroppedDHCPGuardPackets uint64 + + // + TotalInboundDroppedDHCPLimiterPackets uint64 + + // + TotalInboundDroppedForwardingPackets uint64 + + // + TotalInboundDroppedGFTCopyPackets uint64 + + // + TotalInboundDroppedGFTExceptionPackets uint64 + + // + TotalInboundDroppedInvalidPackets uint64 + + // + TotalInboundDroppedInvalidRuleMatchPackets uint64 + + // + TotalInboundDroppedIPV4SpoofingPackets uint64 + + // + TotalInboundDroppedIPV6SpoofingPackets uint64 + + // + TotalInboundDroppedMACSpoofingPackets uint64 + + // + TotalInboundDroppedMalformedPackets uint64 + + // + TotalInboundDroppedMonitoringPingPackets uint64 + + // + TotalInboundDroppedNonIPPackets uint64 + + // + TotalInboundDroppedNoResourcePackets uint64 + + // + TotalInboundDroppedPackets uint64 + + // + TotalInboundDroppedPendingPackets uint64 + + // + TotalInboundDroppedSimulationPackets uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPacketsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPacketsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalInboundDroppedACLPackets sets the value of TotalInboundDroppedACLPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedACLPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedACLPackets", (value)) +} + +// GetTotalInboundDroppedACLPackets gets the value of TotalInboundDroppedACLPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedACLPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedACLPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedARPFilterPackets sets the value of TotalInboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedARPFilterPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedARPFilterPackets", (value)) +} + +// GetTotalInboundDroppedARPFilterPackets gets the value of TotalInboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedARPFilterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedARPFilterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedARPGuardPackets sets the value of TotalInboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedARPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedARPGuardPackets", (value)) +} + +// GetTotalInboundDroppedARPGuardPackets gets the value of TotalInboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedARPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedARPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedARPLimiterPackets sets the value of TotalInboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedARPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedARPLimiterPackets", (value)) +} + +// GetTotalInboundDroppedARPLimiterPackets gets the value of TotalInboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedARPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedARPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedBlockedPackets sets the value of TotalInboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedBlockedPackets", (value)) +} + +// GetTotalInboundDroppedBlockedPackets gets the value of TotalInboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedBroadcastPackets sets the value of TotalInboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedBroadcastPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedBroadcastPackets", (value)) +} + +// GetTotalInboundDroppedBroadcastPackets gets the value of TotalInboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedBroadcastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedBroadcastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedDHCPGuardPackets sets the value of TotalInboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedDHCPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedDHCPGuardPackets", (value)) +} + +// GetTotalInboundDroppedDHCPGuardPackets gets the value of TotalInboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedDHCPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedDHCPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedDHCPLimiterPackets sets the value of TotalInboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedDHCPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedDHCPLimiterPackets", (value)) +} + +// GetTotalInboundDroppedDHCPLimiterPackets gets the value of TotalInboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedDHCPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedDHCPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedForwardingPackets sets the value of TotalInboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedForwardingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedForwardingPackets", (value)) +} + +// GetTotalInboundDroppedForwardingPackets gets the value of TotalInboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedForwardingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedForwardingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedGFTCopyPackets sets the value of TotalInboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedGFTCopyPackets", (value)) +} + +// GetTotalInboundDroppedGFTCopyPackets gets the value of TotalInboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedGFTExceptionPackets sets the value of TotalInboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedGFTExceptionPackets", (value)) +} + +// GetTotalInboundDroppedGFTExceptionPackets gets the value of TotalInboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedInvalidPackets sets the value of TotalInboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedInvalidPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedInvalidPackets", (value)) +} + +// GetTotalInboundDroppedInvalidPackets gets the value of TotalInboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedInvalidPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedInvalidPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedInvalidRuleMatchPackets sets the value of TotalInboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedInvalidRuleMatchPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedInvalidRuleMatchPackets", (value)) +} + +// GetTotalInboundDroppedInvalidRuleMatchPackets gets the value of TotalInboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedInvalidRuleMatchPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedInvalidRuleMatchPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedIPV4SpoofingPackets sets the value of TotalInboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedIPV4SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedIPV4SpoofingPackets", (value)) +} + +// GetTotalInboundDroppedIPV4SpoofingPackets gets the value of TotalInboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedIPV4SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedIPV4SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedIPV6SpoofingPackets sets the value of TotalInboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedIPV6SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedIPV6SpoofingPackets", (value)) +} + +// GetTotalInboundDroppedIPV6SpoofingPackets gets the value of TotalInboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedIPV6SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedIPV6SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedMACSpoofingPackets sets the value of TotalInboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedMACSpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedMACSpoofingPackets", (value)) +} + +// GetTotalInboundDroppedMACSpoofingPackets gets the value of TotalInboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedMACSpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedMACSpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedMalformedPackets sets the value of TotalInboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedMalformedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedMalformedPackets", (value)) +} + +// GetTotalInboundDroppedMalformedPackets gets the value of TotalInboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedMalformedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedMalformedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedMonitoringPingPackets sets the value of TotalInboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedMonitoringPingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedMonitoringPingPackets", (value)) +} + +// GetTotalInboundDroppedMonitoringPingPackets gets the value of TotalInboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedMonitoringPingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedMonitoringPingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedNonIPPackets sets the value of TotalInboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedNonIPPackets", (value)) +} + +// GetTotalInboundDroppedNonIPPackets gets the value of TotalInboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedNoResourcePackets sets the value of TotalInboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedNoResourcePackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedNoResourcePackets", (value)) +} + +// GetTotalInboundDroppedNoResourcePackets gets the value of TotalInboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedNoResourcePackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedNoResourcePackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedPackets sets the value of TotalInboundDroppedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedPackets", (value)) +} + +// GetTotalInboundDroppedPackets gets the value of TotalInboundDroppedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedPendingPackets sets the value of TotalInboundDroppedPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedPendingPackets", (value)) +} + +// GetTotalInboundDroppedPendingPackets gets the value of TotalInboundDroppedPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedSimulationPackets sets the value of TotalInboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedSimulationPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedSimulationPackets", (value)) +} + +// GetTotalInboundDroppedSimulationPackets gets the value of TotalInboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedSimulationPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedSimulationPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic.go new file mode 100644 index 00000000..96d8ae82 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + TotalInboundBytes uint64 + + // + TotalInboundForwardedMulticastPackets uint64 + + // + TotalInboundForwardedUnicastPackets uint64 + + // + TotalInboundGFTBytes uint64 + + // + TotalInboundGFTCopyFINPackets uint64 + + // + TotalInboundGFTCopyPackets uint64 + + // + TotalInboundGFTCopyResetPackets uint64 + + // + TotalInboundGFTExceptionPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadFailedPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadPendingPackets uint64 + + // + TotalInboundGFTExceptionUFPackets uint64 + + // + TotalInboundGFTExceptionUFRetryAwaitingPackets uint64 + + // + TotalInboundGFTPackets uint64 + + // + TotalInboundHairpinnedPackets uint64 + + // + TotalInboundInterceptedPackets uint64 + + // + TotalInboundMissedInterceptedPackets uint64 + + // + TotalInboundNonIPPackets uint64 + + // + TotalInboundPackets uint64 + + // + TotalInboundPendingPackets uint64 + + // + TotalInboundTCPSYNACKPackets uint64 + + // + TotalInboundTCPSYNPackets uint64 + + // + TotalInboundThrottledPackets uint64 + + // + TotalInboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalInboundBytes sets the value of TotalInboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundBytes(value uint64) (err error) { + return instance.SetProperty("TotalInboundBytes", (value)) +} + +// GetTotalInboundBytes gets the value of TotalInboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundForwardedMulticastPackets sets the value of TotalInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundForwardedMulticastPackets", (value)) +} + +// GetTotalInboundForwardedMulticastPackets gets the value of TotalInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundForwardedUnicastPackets sets the value of TotalInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundForwardedUnicastPackets", (value)) +} + +// GetTotalInboundForwardedUnicastPackets gets the value of TotalInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTBytes sets the value of TotalInboundGFTBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTBytes(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTBytes", (value)) +} + +// GetTotalInboundGFTBytes gets the value of TotalInboundGFTBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTCopyFINPackets sets the value of TotalInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTCopyFINPackets", (value)) +} + +// GetTotalInboundGFTCopyFINPackets gets the value of TotalInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTCopyPackets sets the value of TotalInboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTCopyPackets", (value)) +} + +// GetTotalInboundGFTCopyPackets gets the value of TotalInboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTCopyResetPackets sets the value of TotalInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTCopyResetPackets", (value)) +} + +// GetTotalInboundGFTCopyResetPackets gets the value of TotalInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionPackets sets the value of TotalInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionPackets", (value)) +} + +// GetTotalInboundGFTExceptionPackets gets the value of TotalInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadBlockedPackets sets the value of TotalInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadBlockedPackets gets the value of TotalInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadDeferredPackets sets the value of TotalInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadDeferredPackets gets the value of TotalInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadedTCPPackets sets the value of TotalInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadedTCPPackets gets the value of TotalInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadedUDPPackets sets the value of TotalInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadedUDPPackets gets the value of TotalInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadFailedPackets sets the value of TotalInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadFailedPackets gets the value of TotalInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadPendingPackets sets the value of TotalInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadPendingPackets gets the value of TotalInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFPackets sets the value of TotalInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFPackets gets the value of TotalInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFRetryAwaitingPackets sets the value of TotalInboundGFTExceptionUFRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFRetryAwaitingPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFRetryAwaitingPackets gets the value of TotalInboundGFTExceptionUFRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTPackets sets the value of TotalInboundGFTPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTPackets", (value)) +} + +// GetTotalInboundGFTPackets gets the value of TotalInboundGFTPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundHairpinnedPackets sets the value of TotalInboundHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundHairpinnedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundHairpinnedPackets", (value)) +} + +// GetTotalInboundHairpinnedPackets gets the value of TotalInboundHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundHairpinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundInterceptedPackets sets the value of TotalInboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundInterceptedPackets", (value)) +} + +// GetTotalInboundInterceptedPackets gets the value of TotalInboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundMissedInterceptedPackets sets the value of TotalInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundMissedInterceptedPackets", (value)) +} + +// GetTotalInboundMissedInterceptedPackets gets the value of TotalInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundNonIPPackets sets the value of TotalInboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundNonIPPackets", (value)) +} + +// GetTotalInboundNonIPPackets gets the value of TotalInboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundPackets sets the value of TotalInboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundPackets", (value)) +} + +// GetTotalInboundPackets gets the value of TotalInboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundPendingPackets sets the value of TotalInboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundPendingPackets", (value)) +} + +// GetTotalInboundPendingPackets gets the value of TotalInboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundTCPSYNACKPackets sets the value of TotalInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundTCPSYNACKPackets", (value)) +} + +// GetTotalInboundTCPSYNACKPackets gets the value of TotalInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundTCPSYNPackets sets the value of TotalInboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundTCPSYNPackets", (value)) +} + +// GetTotalInboundTCPSYNPackets gets the value of TotalInboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundThrottledPackets sets the value of TotalInboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundThrottledPackets", (value)) +} + +// GetTotalInboundThrottledPackets gets the value of TotalInboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundUnicastForwardedGFTExceptionPackets sets the value of TotalInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetTotalInboundUnicastForwardedGFTExceptionPackets gets the value of TotalInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go new file mode 100644 index 00000000..8e93589c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets struct +type Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets struct { + *Win32_PerfFormattedData + + // + TotalOutboundDroppedACLPackets uint64 + + // + TotalOutboundDroppedARPFilterPackets uint64 + + // + TotalOutboundDroppedARPGuardPackets uint64 + + // + TotalOutboundDroppedARPLimiterPackets uint64 + + // + TotalOutboundDroppedBlockedPackets uint64 + + // + TotalOutboundDroppedBroadcastPackets uint64 + + // + TotalOutboundDroppedDHCPGuardPackets uint64 + + // + TotalOutboundDroppedDHCPLimiterPackets uint64 + + // + TotalOutboundDroppedForwardingPackets uint64 + + // + TotalOutboundDroppedGFTCopyPackets uint64 + + // + TotalOutboundDroppedGFTExceptionPackets uint64 + + // + TotalOutboundDroppedInvalidPackets uint64 + + // + TotalOutboundDroppedInvalidRuleMatchPackets uint64 + + // + TotalOutboundDroppedIPV4SpoofingPackets uint64 + + // + TotalOutboundDroppedIPV6SpoofingPackets uint64 + + // + TotalOutboundDroppedMACSpoofingPackets uint64 + + // + TotalOutboundDroppedMalformedPackets uint64 + + // + TotalOutboundDroppedMonitoringPingPackets uint64 + + // + TotalOutboundDroppedNonIPPackets uint64 + + // + TotalOutboundDroppedNoResourcePackets uint64 + + // + TotalOutboundDroppedPackets uint64 + + // + TotalOutboundDroppedPendingPackets uint64 + + // + TotalOutboundDroppedSimulationPackets uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPacketsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPacketsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalOutboundDroppedACLPackets sets the value of TotalOutboundDroppedACLPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedACLPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedACLPackets", (value)) +} + +// GetTotalOutboundDroppedACLPackets gets the value of TotalOutboundDroppedACLPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedACLPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedACLPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedARPFilterPackets sets the value of TotalOutboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedARPFilterPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedARPFilterPackets", (value)) +} + +// GetTotalOutboundDroppedARPFilterPackets gets the value of TotalOutboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedARPFilterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedARPFilterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedARPGuardPackets sets the value of TotalOutboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedARPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedARPGuardPackets", (value)) +} + +// GetTotalOutboundDroppedARPGuardPackets gets the value of TotalOutboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedARPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedARPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedARPLimiterPackets sets the value of TotalOutboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedARPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedARPLimiterPackets", (value)) +} + +// GetTotalOutboundDroppedARPLimiterPackets gets the value of TotalOutboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedARPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedARPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedBlockedPackets sets the value of TotalOutboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedBlockedPackets", (value)) +} + +// GetTotalOutboundDroppedBlockedPackets gets the value of TotalOutboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedBroadcastPackets sets the value of TotalOutboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedBroadcastPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedBroadcastPackets", (value)) +} + +// GetTotalOutboundDroppedBroadcastPackets gets the value of TotalOutboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedBroadcastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedBroadcastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedDHCPGuardPackets sets the value of TotalOutboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedDHCPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedDHCPGuardPackets", (value)) +} + +// GetTotalOutboundDroppedDHCPGuardPackets gets the value of TotalOutboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedDHCPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedDHCPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedDHCPLimiterPackets sets the value of TotalOutboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedDHCPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedDHCPLimiterPackets", (value)) +} + +// GetTotalOutboundDroppedDHCPLimiterPackets gets the value of TotalOutboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedDHCPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedDHCPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedForwardingPackets sets the value of TotalOutboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedForwardingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedForwardingPackets", (value)) +} + +// GetTotalOutboundDroppedForwardingPackets gets the value of TotalOutboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedForwardingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedForwardingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedGFTCopyPackets sets the value of TotalOutboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedGFTCopyPackets", (value)) +} + +// GetTotalOutboundDroppedGFTCopyPackets gets the value of TotalOutboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedGFTExceptionPackets sets the value of TotalOutboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedGFTExceptionPackets", (value)) +} + +// GetTotalOutboundDroppedGFTExceptionPackets gets the value of TotalOutboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedInvalidPackets sets the value of TotalOutboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedInvalidPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedInvalidPackets", (value)) +} + +// GetTotalOutboundDroppedInvalidPackets gets the value of TotalOutboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedInvalidPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedInvalidPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedInvalidRuleMatchPackets sets the value of TotalOutboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedInvalidRuleMatchPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedInvalidRuleMatchPackets", (value)) +} + +// GetTotalOutboundDroppedInvalidRuleMatchPackets gets the value of TotalOutboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedInvalidRuleMatchPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedInvalidRuleMatchPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedIPV4SpoofingPackets sets the value of TotalOutboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedIPV4SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedIPV4SpoofingPackets", (value)) +} + +// GetTotalOutboundDroppedIPV4SpoofingPackets gets the value of TotalOutboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedIPV4SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedIPV4SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedIPV6SpoofingPackets sets the value of TotalOutboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedIPV6SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedIPV6SpoofingPackets", (value)) +} + +// GetTotalOutboundDroppedIPV6SpoofingPackets gets the value of TotalOutboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedIPV6SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedIPV6SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedMACSpoofingPackets sets the value of TotalOutboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedMACSpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedMACSpoofingPackets", (value)) +} + +// GetTotalOutboundDroppedMACSpoofingPackets gets the value of TotalOutboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedMACSpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedMACSpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedMalformedPackets sets the value of TotalOutboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedMalformedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedMalformedPackets", (value)) +} + +// GetTotalOutboundDroppedMalformedPackets gets the value of TotalOutboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedMalformedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedMalformedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedMonitoringPingPackets sets the value of TotalOutboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedMonitoringPingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedMonitoringPingPackets", (value)) +} + +// GetTotalOutboundDroppedMonitoringPingPackets gets the value of TotalOutboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedMonitoringPingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedMonitoringPingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedNonIPPackets sets the value of TotalOutboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedNonIPPackets", (value)) +} + +// GetTotalOutboundDroppedNonIPPackets gets the value of TotalOutboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedNoResourcePackets sets the value of TotalOutboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedNoResourcePackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedNoResourcePackets", (value)) +} + +// GetTotalOutboundDroppedNoResourcePackets gets the value of TotalOutboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedNoResourcePackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedNoResourcePackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedPackets sets the value of TotalOutboundDroppedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedPackets", (value)) +} + +// GetTotalOutboundDroppedPackets gets the value of TotalOutboundDroppedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedPendingPackets sets the value of TotalOutboundDroppedPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedPendingPackets", (value)) +} + +// GetTotalOutboundDroppedPendingPackets gets the value of TotalOutboundDroppedPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedSimulationPackets sets the value of TotalOutboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedSimulationPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedSimulationPackets", (value)) +} + +// GetTotalOutboundDroppedSimulationPackets gets the value of TotalOutboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedSimulationPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedSimulationPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic.go new file mode 100644 index 00000000..37a1f87b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + TotalOutboundBytes uint64 + + // + TotalOutboundForwardedMulticastPackets uint64 + + // + TotalOutboundForwardedUnicastPackets uint64 + + // + TotalOutboundGFTBytes uint64 + + // + TotalOutboundGFTCopyFINPackets uint64 + + // + TotalOutboundGFTCopyPackets uint64 + + // + TotalOutboundGFTCopyResetPackets uint64 + + // + TotalOutboundGFTExceptionPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadFailedPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadPendingPackets uint64 + + // + TotalOutboundGFTExceptionUFPackets uint64 + + // + TotalOutboundGFTRetryAwaitingPackets uint64 + + // + TotalOutboundGftTotalPackets uint64 + + // + TotalOutboundHairPinnedPackets uint64 + + // + TotalOutboundInterceptedPackets uint64 + + // + TotalOutboundMissedInterceptedPackets uint64 + + // + TotalOutboundNonIPPackets uint64 + + // + TotalOutboundPackets uint64 + + // + TotalOutboundPendingPackets uint64 + + // + TotalOutboundTCPSYNACKPackets uint64 + + // + TotalOutboundTCPSYNPackets uint64 + + // + TotalOutboundThrottledPackets uint64 + + // + TotalOutboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalOutboundBytes sets the value of TotalOutboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundBytes(value uint64) (err error) { + return instance.SetProperty("TotalOutboundBytes", (value)) +} + +// GetTotalOutboundBytes gets the value of TotalOutboundBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundForwardedMulticastPackets sets the value of TotalOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundForwardedMulticastPackets", (value)) +} + +// GetTotalOutboundForwardedMulticastPackets gets the value of TotalOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundForwardedUnicastPackets sets the value of TotalOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundForwardedUnicastPackets", (value)) +} + +// GetTotalOutboundForwardedUnicastPackets gets the value of TotalOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTBytes sets the value of TotalOutboundGFTBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTBytes(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTBytes", (value)) +} + +// GetTotalOutboundGFTBytes gets the value of TotalOutboundGFTBytes for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTCopyFINPackets sets the value of TotalOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTCopyFINPackets", (value)) +} + +// GetTotalOutboundGFTCopyFINPackets gets the value of TotalOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTCopyPackets sets the value of TotalOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTCopyPackets", (value)) +} + +// GetTotalOutboundGFTCopyPackets gets the value of TotalOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTCopyResetPackets sets the value of TotalOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTCopyResetPackets", (value)) +} + +// GetTotalOutboundGFTCopyResetPackets gets the value of TotalOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionPackets sets the value of TotalOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionPackets", (value)) +} + +// GetTotalOutboundGFTExceptionPackets gets the value of TotalOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadBlockedPackets sets the value of TotalOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadBlockedPackets gets the value of TotalOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadDeferredPackets sets the value of TotalOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadDeferredPackets gets the value of TotalOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadedTCPPackets sets the value of TotalOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadedTCPPackets gets the value of TotalOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadedUDPPackets sets the value of TotalOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadedUDPPackets gets the value of TotalOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadFailedPackets sets the value of TotalOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadFailedPackets gets the value of TotalOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadPendingPackets sets the value of TotalOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadPendingPackets gets the value of TotalOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFPackets sets the value of TotalOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFPackets gets the value of TotalOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTRetryAwaitingPackets sets the value of TotalOutboundGFTRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTRetryAwaitingPackets", (value)) +} + +// GetTotalOutboundGFTRetryAwaitingPackets gets the value of TotalOutboundGFTRetryAwaitingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGftTotalPackets sets the value of TotalOutboundGftTotalPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGftTotalPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGftTotalPackets", (value)) +} + +// GetTotalOutboundGftTotalPackets gets the value of TotalOutboundGftTotalPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGftTotalPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGftTotalPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundHairPinnedPackets sets the value of TotalOutboundHairPinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundHairPinnedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundHairPinnedPackets", (value)) +} + +// GetTotalOutboundHairPinnedPackets gets the value of TotalOutboundHairPinnedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundHairPinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundHairPinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundInterceptedPackets sets the value of TotalOutboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundInterceptedPackets", (value)) +} + +// GetTotalOutboundInterceptedPackets gets the value of TotalOutboundInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundMissedInterceptedPackets sets the value of TotalOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundMissedInterceptedPackets", (value)) +} + +// GetTotalOutboundMissedInterceptedPackets gets the value of TotalOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundNonIPPackets sets the value of TotalOutboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundNonIPPackets", (value)) +} + +// GetTotalOutboundNonIPPackets gets the value of TotalOutboundNonIPPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundPackets sets the value of TotalOutboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundPackets", (value)) +} + +// GetTotalOutboundPackets gets the value of TotalOutboundPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundPendingPackets sets the value of TotalOutboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundPendingPackets", (value)) +} + +// GetTotalOutboundPendingPackets gets the value of TotalOutboundPendingPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundTCPSYNACKPackets sets the value of TotalOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundTCPSYNACKPackets", (value)) +} + +// GetTotalOutboundTCPSYNACKPackets gets the value of TotalOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundTCPSYNPackets sets the value of TotalOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundTCPSYNPackets", (value)) +} + +// GetTotalOutboundTCPSYNPackets gets the value of TotalOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundThrottledPackets sets the value of TotalOutboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundThrottledPackets", (value)) +} + +// GetTotalOutboundThrottledPackets gets the value of TotalOutboundThrottledPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundUnicastForwardedGFTExceptionPackets sets the value of TotalOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetTotalOutboundUnicastForwardedGFTExceptionPackets gets the value of TotalOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go new file mode 100644 index 00000000..7e51613f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + AverageInboundBytesAllowedThroughtheQueue uint64 + + // + AverageInboundBytesDropped uint64 + + // + AverageInboundBytesEnteringtheQueue uint64 + + // + AverageInboundBytesQueuedduetoBacklog uint64 + + // + AverageInboundBytesQueuedduetoInsufficientTokens uint64 + + // + AverageInboundBytesResumed uint64 + + // + AverageInboundPacketsAllowedThroughtheQueue uint64 + + // + AverageInboundPacketsDropped uint64 + + // + AverageInboundPacketsEnteringtheQueue uint64 + + // + AverageInboundPacketsQueuedduetoBacklog uint64 + + // + AverageInboundPacketsQueuedduetoInsufficientTokens uint64 + + // + AverageInboundPacketsResumed uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageInboundBytesAllowedThroughtheQueue sets the value of AverageInboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesAllowedThroughtheQueue", (value)) +} + +// GetAverageInboundBytesAllowedThroughtheQueue gets the value of AverageInboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesDropped sets the value of AverageInboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesDropped", (value)) +} + +// GetAverageInboundBytesDropped gets the value of AverageInboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesEnteringtheQueue sets the value of AverageInboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesEnteringtheQueue", (value)) +} + +// GetAverageInboundBytesEnteringtheQueue gets the value of AverageInboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesQueuedduetoBacklog sets the value of AverageInboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesQueuedduetoBacklog", (value)) +} + +// GetAverageInboundBytesQueuedduetoBacklog gets the value of AverageInboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesQueuedduetoInsufficientTokens sets the value of AverageInboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageInboundBytesQueuedduetoInsufficientTokens gets the value of AverageInboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesResumed sets the value of AverageInboundBytesResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesResumed(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesResumed", (value)) +} + +// GetAverageInboundBytesResumed gets the value of AverageInboundBytesResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsAllowedThroughtheQueue sets the value of AverageInboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsAllowedThroughtheQueue", (value)) +} + +// GetAverageInboundPacketsAllowedThroughtheQueue gets the value of AverageInboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsDropped sets the value of AverageInboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsDropped", (value)) +} + +// GetAverageInboundPacketsDropped gets the value of AverageInboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsEnteringtheQueue sets the value of AverageInboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsEnteringtheQueue", (value)) +} + +// GetAverageInboundPacketsEnteringtheQueue gets the value of AverageInboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsQueuedduetoBacklog sets the value of AverageInboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsQueuedduetoBacklog", (value)) +} + +// GetAverageInboundPacketsQueuedduetoBacklog gets the value of AverageInboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsQueuedduetoInsufficientTokens sets the value of AverageInboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageInboundPacketsQueuedduetoInsufficientTokens gets the value of AverageInboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsResumed sets the value of AverageInboundPacketsResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsResumed(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsResumed", (value)) +} + +// GetAverageInboundPacketsResumed gets the value of AverageInboundPacketsResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go new file mode 100644 index 00000000..64b24a9f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + AverageOutboundBytesAllowedThroughtheQueue uint64 + + // + AverageOutboundBytesDropped uint64 + + // + AverageOutboundBytesEnteringtheQueue uint64 + + // + AverageOutboundBytesQueuedduetoBacklog uint64 + + // + AverageOutboundBytesQueuedduetoInsufficientTokens uint64 + + // + AverageOutboundBytesResumed uint64 + + // + AverageOutboundPacketsAllowedThroughtheQueue uint64 + + // + AverageOutboundPacketsDropped uint64 + + // + AverageOutboundPacketsEnteringtheQueue uint64 + + // + AverageOutboundPacketsQueuedduetoBacklog uint64 + + // + AverageOutboundPacketsQueuedduetoInsufficientTokens uint64 + + // + AverageOutboundPacketsResumed uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageOutboundBytesAllowedThroughtheQueue sets the value of AverageOutboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesAllowedThroughtheQueue", (value)) +} + +// GetAverageOutboundBytesAllowedThroughtheQueue gets the value of AverageOutboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesDropped sets the value of AverageOutboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesDropped", (value)) +} + +// GetAverageOutboundBytesDropped gets the value of AverageOutboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesEnteringtheQueue sets the value of AverageOutboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesEnteringtheQueue", (value)) +} + +// GetAverageOutboundBytesEnteringtheQueue gets the value of AverageOutboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesQueuedduetoBacklog sets the value of AverageOutboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesQueuedduetoBacklog", (value)) +} + +// GetAverageOutboundBytesQueuedduetoBacklog gets the value of AverageOutboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesQueuedduetoInsufficientTokens sets the value of AverageOutboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageOutboundBytesQueuedduetoInsufficientTokens gets the value of AverageOutboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesResumed sets the value of AverageOutboundBytesResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesResumed(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesResumed", (value)) +} + +// GetAverageOutboundBytesResumed gets the value of AverageOutboundBytesResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsAllowedThroughtheQueue sets the value of AverageOutboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsAllowedThroughtheQueue", (value)) +} + +// GetAverageOutboundPacketsAllowedThroughtheQueue gets the value of AverageOutboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsDropped sets the value of AverageOutboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsDropped", (value)) +} + +// GetAverageOutboundPacketsDropped gets the value of AverageOutboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsEnteringtheQueue sets the value of AverageOutboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsEnteringtheQueue", (value)) +} + +// GetAverageOutboundPacketsEnteringtheQueue gets the value of AverageOutboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsQueuedduetoBacklog sets the value of AverageOutboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsQueuedduetoBacklog", (value)) +} + +// GetAverageOutboundPacketsQueuedduetoBacklog gets the value of AverageOutboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsQueuedduetoInsufficientTokens sets the value of AverageOutboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageOutboundPacketsQueuedduetoInsufficientTokens gets the value of AverageOutboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsResumed sets the value of AverageOutboundPacketsResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsResumed(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsResumed", (value)) +} + +// GetAverageOutboundPacketsResumed gets the value of AverageOutboundPacketsResumed for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go new file mode 100644 index 00000000..4bd9452c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + TotalInboundBytesDropped uint64 + + // + TotalInboundPacketsDropped uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalInboundBytesDropped sets the value of TotalInboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) SetPropertyTotalInboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("TotalInboundBytesDropped", (value)) +} + +// GetTotalInboundBytesDropped gets the value of TotalInboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) GetPropertyTotalInboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundPacketsDropped sets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) SetPropertyTotalInboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("TotalInboundPacketsDropped", (value)) +} + +// GetTotalInboundPacketsDropped gets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) GetPropertyTotalInboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go new file mode 100644 index 00000000..38534446 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic struct +type Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic struct { + *Win32_PerfFormattedData + + // + TotalOutboundBytesDropped uint64 + + // + TotalOutboundPacketsDropped uint64 +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalOutboundBytesDropped sets the value of TotalOutboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) SetPropertyTotalOutboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("TotalOutboundBytesDropped", (value)) +} + +// GetTotalOutboundBytesDropped gets the value of TotalOutboundBytesDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) GetPropertyTotalOutboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundPacketsDropped sets the value of TotalOutboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) SetPropertyTotalOutboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("TotalOutboundPacketsDropped", (value)) +} + +// GetTotalOutboundPacketsDropped gets the value of TotalOutboundPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) GetPropertyTotalOutboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFP.go new file mode 100644 index 00000000..17a7a31e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFP.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_WFP struct +type Win32_PerfFormattedData_Counters_WFP struct { + *Win32_PerfFormattedData + + // + ProviderCount uint32 +} + +func NewWin32_PerfFormattedData_Counters_WFPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_WFP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFP{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_WFPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_WFP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFP{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetProviderCount sets the value of ProviderCount for the instance +func (instance *Win32_PerfFormattedData_Counters_WFP) SetPropertyProviderCount(value uint32) (err error) { + return instance.SetProperty("ProviderCount", (value)) +} + +// GetProviderCount gets the value of ProviderCount for the instance +func (instance *Win32_PerfFormattedData_Counters_WFP) GetPropertyProviderCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ProviderCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPClassify.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPClassify.go new file mode 100644 index 00000000..f21e1d8c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPClassify.go @@ -0,0 +1,3170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_WFPClassify struct +type Win32_PerfFormattedData_Counters_WFPClassify struct { + *Win32_PerfFormattedData + + // + FWPMLAYERALEAUTHCONNECTV4 uint64 + + // + FWPMLAYERALEAUTHCONNECTV4DISCARD uint64 + + // + FWPMLAYERALEAUTHCONNECTV6 uint64 + + // + FWPMLAYERALEAUTHCONNECTV6DISCARD uint64 + + // + FWPMLAYERALEAUTHLISTENV4 uint64 + + // + FWPMLAYERALEAUTHLISTENV4DISCARD uint64 + + // + FWPMLAYERALEAUTHLISTENV6 uint64 + + // + FWPMLAYERALEAUTHLISTENV6DISCARD uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV4 uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV4DISCARD uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV6 uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV6DISCARD uint64 + + // + FWPMLAYERALEBINDREDIRECTV4 uint64 + + // + FWPMLAYERALEBINDREDIRECTV6 uint64 + + // + FWPMLAYERALECONNECTREDIRECTV4 uint64 + + // + FWPMLAYERALECONNECTREDIRECTV6 uint64 + + // + FWPMLAYERALEENDPOINTCLOSUREV4 uint64 + + // + FWPMLAYERALEENDPOINTCLOSUREV6 uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV4 uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV4DISCARD uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV6 uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV6DISCARD uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV4 uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV6 uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD uint64 + + // + FWPMLAYERALERESOURCERELEASEV4 uint64 + + // + FWPMLAYERALERESOURCERELEASEV6 uint64 + + // + FWPMLAYERDATAGRAMDATAV4 uint64 + + // + FWPMLAYERDATAGRAMDATAV4DISCARD uint64 + + // + FWPMLAYERDATAGRAMDATAV6 uint64 + + // + FWPMLAYERDATAGRAMDATAV6DISCARD uint64 + + // + FWPMLAYEREGRESSVSWITCHETHERNET uint64 + + // + FWPMLAYEREGRESSVSWITCHTRANSPORTV4 uint64 + + // + FWPMLAYEREGRESSVSWITCHTRANSPORTV6 uint64 + + // + FWPMLAYERIKEEXTV4 uint64 + + // + FWPMLAYERIKEEXTV6 uint64 + + // + FWPMLAYERINBOUNDICMPERRORV4 uint64 + + // + FWPMLAYERINBOUNDICMPERRORV4DISCARD uint64 + + // + FWPMLAYERINBOUNDICMPERRORV6 uint64 + + // + FWPMLAYERINBOUNDICMPERRORV6DISCARD uint64 + + // + FWPMLAYERINBOUNDIPPACKETV4 uint64 + + // + FWPMLAYERINBOUNDIPPACKETV4DISCARD uint64 + + // + FWPMLAYERINBOUNDIPPACKETV6 uint64 + + // + FWPMLAYERINBOUNDIPPACKETV6DISCARD uint64 + + // + FWPMLAYERINBOUNDMACFRAMEETHERNET uint64 + + // + FWPMLAYERINBOUNDMACFRAMENATIVE uint64 + + // + FWPMLAYERINBOUNDMACFRAMENATIVEFAST uint64 + + // + FWPMLAYERINBOUNDSSLTHROTTLING uint64 + + // + FWPMLAYERINBOUNDTRANSPORTFAST uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV4 uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV4DISCARD uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV6 uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV6DISCARD uint64 + + // + FWPMLAYERINGRESSVSWITCHETHERNET uint64 + + // + FWPMLAYERINGRESSVSWITCHTRANSPORTV4 uint64 + + // + FWPMLAYERINGRESSVSWITCHTRANSPORTV6 uint64 + + // + FWPMLAYERIPFORWARDV4 uint64 + + // + FWPMLAYERIPFORWARDV4DISCARD uint64 + + // + FWPMLAYERIPFORWARDV6 uint64 + + // + FWPMLAYERIPFORWARDV6DISCARD uint64 + + // + FWPMLAYERIPSECKMDEMUXV4 uint64 + + // + FWPMLAYERIPSECKMDEMUXV6 uint64 + + // + FWPMLAYERIPSECV4 uint64 + + // + FWPMLAYERIPSECV6 uint64 + + // + FWPMLAYERKMAUTHORIZATION uint64 + + // + FWPMLAYERNAMERESOLUTIONCACHEV4 uint64 + + // + FWPMLAYERNAMERESOLUTIONCACHEV6 uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV4 uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV4DISCARD uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV6 uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV6DISCARD uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV4 uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV4DISCARD uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV6 uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV6DISCARD uint64 + + // + FWPMLAYEROUTBOUNDMACFRAMEETHERNET uint64 + + // + FWPMLAYEROUTBOUNDMACFRAMENATIVE uint64 + + // + FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTFAST uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV4 uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV6 uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD uint64 + + // + FWPMLAYERRPCEPADD uint64 + + // + FWPMLAYERRPCEPMAP uint64 + + // + FWPMLAYERRPCPROXYCONN uint64 + + // + FWPMLAYERRPCPROXYIF uint64 + + // + FWPMLAYERRPCUM uint64 + + // + FWPMLAYERSTREAMPACKETV4 uint64 + + // + FWPMLAYERSTREAMPACKETV6 uint64 + + // + FWPMLAYERSTREAMV4 uint64 + + // + FWPMLAYERSTREAMV4DISCARD uint64 + + // + FWPMLAYERSTREAMV6 uint64 + + // + FWPMLAYERSTREAMV6DISCARD uint64 + + // + Total uint64 +} + +func NewWin32_PerfFormattedData_Counters_WFPClassifyEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_WFPClassify, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPClassify{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_WFPClassifyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_WFPClassify, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPClassify{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetFWPMLAYERALEAUTHCONNECTV4 sets the value of FWPMLAYERALEAUTHCONNECTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV4", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV4 gets the value of FWPMLAYERALEAUTHCONNECTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHCONNECTV4DISCARD sets the value of FWPMLAYERALEAUTHCONNECTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV4DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV4DISCARD gets the value of FWPMLAYERALEAUTHCONNECTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHCONNECTV6 sets the value of FWPMLAYERALEAUTHCONNECTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV6", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV6 gets the value of FWPMLAYERALEAUTHCONNECTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHCONNECTV6DISCARD sets the value of FWPMLAYERALEAUTHCONNECTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV6DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV6DISCARD gets the value of FWPMLAYERALEAUTHCONNECTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV4 sets the value of FWPMLAYERALEAUTHLISTENV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV4", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV4 gets the value of FWPMLAYERALEAUTHLISTENV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV4DISCARD sets the value of FWPMLAYERALEAUTHLISTENV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV4DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV4DISCARD gets the value of FWPMLAYERALEAUTHLISTENV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV6 sets the value of FWPMLAYERALEAUTHLISTENV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV6", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV6 gets the value of FWPMLAYERALEAUTHLISTENV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV6DISCARD sets the value of FWPMLAYERALEAUTHLISTENV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV6DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV6DISCARD gets the value of FWPMLAYERALEAUTHLISTENV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV4 sets the value of FWPMLAYERALEAUTHRECVACCEPTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV4", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV4 gets the value of FWPMLAYERALEAUTHRECVACCEPTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV4DISCARD sets the value of FWPMLAYERALEAUTHRECVACCEPTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV4DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV4DISCARD gets the value of FWPMLAYERALEAUTHRECVACCEPTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV6 sets the value of FWPMLAYERALEAUTHRECVACCEPTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV6", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV6 gets the value of FWPMLAYERALEAUTHRECVACCEPTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV6DISCARD sets the value of FWPMLAYERALEAUTHRECVACCEPTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV6DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV6DISCARD gets the value of FWPMLAYERALEAUTHRECVACCEPTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEBINDREDIRECTV4 sets the value of FWPMLAYERALEBINDREDIRECTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEBINDREDIRECTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEBINDREDIRECTV4", (value)) +} + +// GetFWPMLAYERALEBINDREDIRECTV4 gets the value of FWPMLAYERALEBINDREDIRECTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEBINDREDIRECTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEBINDREDIRECTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEBINDREDIRECTV6 sets the value of FWPMLAYERALEBINDREDIRECTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEBINDREDIRECTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEBINDREDIRECTV6", (value)) +} + +// GetFWPMLAYERALEBINDREDIRECTV6 gets the value of FWPMLAYERALEBINDREDIRECTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEBINDREDIRECTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEBINDREDIRECTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALECONNECTREDIRECTV4 sets the value of FWPMLAYERALECONNECTREDIRECTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALECONNECTREDIRECTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALECONNECTREDIRECTV4", (value)) +} + +// GetFWPMLAYERALECONNECTREDIRECTV4 gets the value of FWPMLAYERALECONNECTREDIRECTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALECONNECTREDIRECTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALECONNECTREDIRECTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALECONNECTREDIRECTV6 sets the value of FWPMLAYERALECONNECTREDIRECTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALECONNECTREDIRECTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALECONNECTREDIRECTV6", (value)) +} + +// GetFWPMLAYERALECONNECTREDIRECTV6 gets the value of FWPMLAYERALECONNECTREDIRECTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALECONNECTREDIRECTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALECONNECTREDIRECTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEENDPOINTCLOSUREV4 sets the value of FWPMLAYERALEENDPOINTCLOSUREV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEENDPOINTCLOSUREV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEENDPOINTCLOSUREV4", (value)) +} + +// GetFWPMLAYERALEENDPOINTCLOSUREV4 gets the value of FWPMLAYERALEENDPOINTCLOSUREV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEENDPOINTCLOSUREV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEENDPOINTCLOSUREV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEENDPOINTCLOSUREV6 sets the value of FWPMLAYERALEENDPOINTCLOSUREV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEENDPOINTCLOSUREV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEENDPOINTCLOSUREV6", (value)) +} + +// GetFWPMLAYERALEENDPOINTCLOSUREV6 gets the value of FWPMLAYERALEENDPOINTCLOSUREV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEENDPOINTCLOSUREV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEENDPOINTCLOSUREV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV4 sets the value of FWPMLAYERALEFLOWESTABLISHEDV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV4", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV4 gets the value of FWPMLAYERALEFLOWESTABLISHEDV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV4DISCARD sets the value of FWPMLAYERALEFLOWESTABLISHEDV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV4DISCARD", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV4DISCARD gets the value of FWPMLAYERALEFLOWESTABLISHEDV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV6 sets the value of FWPMLAYERALEFLOWESTABLISHEDV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV6", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV6 gets the value of FWPMLAYERALEFLOWESTABLISHEDV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV6DISCARD sets the value of FWPMLAYERALEFLOWESTABLISHEDV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV6DISCARD", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV6DISCARD gets the value of FWPMLAYERALEFLOWESTABLISHEDV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV4 sets the value of FWPMLAYERALERESOURCEASSIGNMENTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV4 gets the value of FWPMLAYERALERESOURCEASSIGNMENTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD sets the value of FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD gets the value of FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV6 sets the value of FWPMLAYERALERESOURCEASSIGNMENTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV6 gets the value of FWPMLAYERALERESOURCEASSIGNMENTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD sets the value of FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD gets the value of FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCERELEASEV4 sets the value of FWPMLAYERALERESOURCERELEASEV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCERELEASEV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCERELEASEV4", (value)) +} + +// GetFWPMLAYERALERESOURCERELEASEV4 gets the value of FWPMLAYERALERESOURCERELEASEV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCERELEASEV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCERELEASEV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCERELEASEV6 sets the value of FWPMLAYERALERESOURCERELEASEV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCERELEASEV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCERELEASEV6", (value)) +} + +// GetFWPMLAYERALERESOURCERELEASEV6 gets the value of FWPMLAYERALERESOURCERELEASEV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCERELEASEV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCERELEASEV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV4 sets the value of FWPMLAYERDATAGRAMDATAV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV4", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV4 gets the value of FWPMLAYERDATAGRAMDATAV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV4DISCARD sets the value of FWPMLAYERDATAGRAMDATAV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV4DISCARD", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV4DISCARD gets the value of FWPMLAYERDATAGRAMDATAV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV6 sets the value of FWPMLAYERDATAGRAMDATAV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV6", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV6 gets the value of FWPMLAYERDATAGRAMDATAV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV6DISCARD sets the value of FWPMLAYERDATAGRAMDATAV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV6DISCARD", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV6DISCARD gets the value of FWPMLAYERDATAGRAMDATAV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEREGRESSVSWITCHETHERNET sets the value of FWPMLAYEREGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEREGRESSVSWITCHETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEREGRESSVSWITCHETHERNET", (value)) +} + +// GetFWPMLAYEREGRESSVSWITCHETHERNET gets the value of FWPMLAYEREGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEREGRESSVSWITCHETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEREGRESSVSWITCHETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEREGRESSVSWITCHTRANSPORTV4 sets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV4", (value)) +} + +// GetFWPMLAYEREGRESSVSWITCHTRANSPORTV4 gets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEREGRESSVSWITCHTRANSPORTV6 sets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV6", (value)) +} + +// GetFWPMLAYEREGRESSVSWITCHTRANSPORTV6 gets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIKEEXTV4 sets the value of FWPMLAYERIKEEXTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIKEEXTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIKEEXTV4", (value)) +} + +// GetFWPMLAYERIKEEXTV4 gets the value of FWPMLAYERIKEEXTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIKEEXTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIKEEXTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIKEEXTV6 sets the value of FWPMLAYERIKEEXTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIKEEXTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIKEEXTV6", (value)) +} + +// GetFWPMLAYERIKEEXTV6 gets the value of FWPMLAYERIKEEXTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIKEEXTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIKEEXTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV4 sets the value of FWPMLAYERINBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV4", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV4 gets the value of FWPMLAYERINBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV4DISCARD sets the value of FWPMLAYERINBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV4DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV4DISCARD gets the value of FWPMLAYERINBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV6 sets the value of FWPMLAYERINBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV6", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV6 gets the value of FWPMLAYERINBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV6DISCARD sets the value of FWPMLAYERINBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV6DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV6DISCARD gets the value of FWPMLAYERINBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV4 sets the value of FWPMLAYERINBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV4", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV4 gets the value of FWPMLAYERINBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV4DISCARD sets the value of FWPMLAYERINBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV4DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV4DISCARD gets the value of FWPMLAYERINBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV6 sets the value of FWPMLAYERINBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV6", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV6 gets the value of FWPMLAYERINBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV6DISCARD sets the value of FWPMLAYERINBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV6DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV6DISCARD gets the value of FWPMLAYERINBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDMACFRAMEETHERNET sets the value of FWPMLAYERINBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDMACFRAMEETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDMACFRAMEETHERNET", (value)) +} + +// GetFWPMLAYERINBOUNDMACFRAMEETHERNET gets the value of FWPMLAYERINBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDMACFRAMEETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDMACFRAMEETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDMACFRAMENATIVE sets the value of FWPMLAYERINBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDMACFRAMENATIVE(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDMACFRAMENATIVE", (value)) +} + +// GetFWPMLAYERINBOUNDMACFRAMENATIVE gets the value of FWPMLAYERINBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDMACFRAMENATIVE() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDMACFRAMENATIVE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDMACFRAMENATIVEFAST sets the value of FWPMLAYERINBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDMACFRAMENATIVEFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDMACFRAMENATIVEFAST", (value)) +} + +// GetFWPMLAYERINBOUNDMACFRAMENATIVEFAST gets the value of FWPMLAYERINBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDMACFRAMENATIVEFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDMACFRAMENATIVEFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDSSLTHROTTLING sets the value of FWPMLAYERINBOUNDSSLTHROTTLING for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDSSLTHROTTLING(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDSSLTHROTTLING", (value)) +} + +// GetFWPMLAYERINBOUNDSSLTHROTTLING gets the value of FWPMLAYERINBOUNDSSLTHROTTLING for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDSSLTHROTTLING() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDSSLTHROTTLING") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTFAST sets the value of FWPMLAYERINBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTFAST", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTFAST gets the value of FWPMLAYERINBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV4 sets the value of FWPMLAYERINBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV4", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV4 gets the value of FWPMLAYERINBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV4DISCARD sets the value of FWPMLAYERINBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV4DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV4DISCARD gets the value of FWPMLAYERINBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV6 sets the value of FWPMLAYERINBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV6", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV6 gets the value of FWPMLAYERINBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV6DISCARD sets the value of FWPMLAYERINBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV6DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV6DISCARD gets the value of FWPMLAYERINBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINGRESSVSWITCHETHERNET sets the value of FWPMLAYERINGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINGRESSVSWITCHETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINGRESSVSWITCHETHERNET", (value)) +} + +// GetFWPMLAYERINGRESSVSWITCHETHERNET gets the value of FWPMLAYERINGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINGRESSVSWITCHETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINGRESSVSWITCHETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINGRESSVSWITCHTRANSPORTV4 sets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV4", (value)) +} + +// GetFWPMLAYERINGRESSVSWITCHTRANSPORTV4 gets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINGRESSVSWITCHTRANSPORTV6 sets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV6", (value)) +} + +// GetFWPMLAYERINGRESSVSWITCHTRANSPORTV6 gets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV4 sets the value of FWPMLAYERIPFORWARDV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV4", (value)) +} + +// GetFWPMLAYERIPFORWARDV4 gets the value of FWPMLAYERIPFORWARDV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV4DISCARD sets the value of FWPMLAYERIPFORWARDV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV4DISCARD", (value)) +} + +// GetFWPMLAYERIPFORWARDV4DISCARD gets the value of FWPMLAYERIPFORWARDV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV6 sets the value of FWPMLAYERIPFORWARDV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV6", (value)) +} + +// GetFWPMLAYERIPFORWARDV6 gets the value of FWPMLAYERIPFORWARDV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV6DISCARD sets the value of FWPMLAYERIPFORWARDV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV6DISCARD", (value)) +} + +// GetFWPMLAYERIPFORWARDV6DISCARD gets the value of FWPMLAYERIPFORWARDV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECKMDEMUXV4 sets the value of FWPMLAYERIPSECKMDEMUXV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECKMDEMUXV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECKMDEMUXV4", (value)) +} + +// GetFWPMLAYERIPSECKMDEMUXV4 gets the value of FWPMLAYERIPSECKMDEMUXV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECKMDEMUXV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECKMDEMUXV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECKMDEMUXV6 sets the value of FWPMLAYERIPSECKMDEMUXV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECKMDEMUXV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECKMDEMUXV6", (value)) +} + +// GetFWPMLAYERIPSECKMDEMUXV6 gets the value of FWPMLAYERIPSECKMDEMUXV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECKMDEMUXV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECKMDEMUXV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECV4 sets the value of FWPMLAYERIPSECV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECV4", (value)) +} + +// GetFWPMLAYERIPSECV4 gets the value of FWPMLAYERIPSECV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECV6 sets the value of FWPMLAYERIPSECV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECV6", (value)) +} + +// GetFWPMLAYERIPSECV6 gets the value of FWPMLAYERIPSECV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERKMAUTHORIZATION sets the value of FWPMLAYERKMAUTHORIZATION for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERKMAUTHORIZATION(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERKMAUTHORIZATION", (value)) +} + +// GetFWPMLAYERKMAUTHORIZATION gets the value of FWPMLAYERKMAUTHORIZATION for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERKMAUTHORIZATION() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERKMAUTHORIZATION") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERNAMERESOLUTIONCACHEV4 sets the value of FWPMLAYERNAMERESOLUTIONCACHEV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERNAMERESOLUTIONCACHEV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERNAMERESOLUTIONCACHEV4", (value)) +} + +// GetFWPMLAYERNAMERESOLUTIONCACHEV4 gets the value of FWPMLAYERNAMERESOLUTIONCACHEV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERNAMERESOLUTIONCACHEV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERNAMERESOLUTIONCACHEV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERNAMERESOLUTIONCACHEV6 sets the value of FWPMLAYERNAMERESOLUTIONCACHEV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERNAMERESOLUTIONCACHEV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERNAMERESOLUTIONCACHEV6", (value)) +} + +// GetFWPMLAYERNAMERESOLUTIONCACHEV6 gets the value of FWPMLAYERNAMERESOLUTIONCACHEV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERNAMERESOLUTIONCACHEV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERNAMERESOLUTIONCACHEV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV4 sets the value of FWPMLAYEROUTBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV4", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV4 gets the value of FWPMLAYEROUTBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV4DISCARD sets the value of FWPMLAYEROUTBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV4DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV4DISCARD gets the value of FWPMLAYEROUTBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV6 sets the value of FWPMLAYEROUTBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV6", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV6 gets the value of FWPMLAYEROUTBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV6DISCARD sets the value of FWPMLAYEROUTBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV6DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV6DISCARD gets the value of FWPMLAYEROUTBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV4 sets the value of FWPMLAYEROUTBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV4", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV4 gets the value of FWPMLAYEROUTBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV4DISCARD sets the value of FWPMLAYEROUTBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV4DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV4DISCARD gets the value of FWPMLAYEROUTBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV6 sets the value of FWPMLAYEROUTBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV6", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV6 gets the value of FWPMLAYEROUTBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV6DISCARD sets the value of FWPMLAYEROUTBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV6DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV6DISCARD gets the value of FWPMLAYEROUTBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDMACFRAMEETHERNET sets the value of FWPMLAYEROUTBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDMACFRAMEETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDMACFRAMEETHERNET", (value)) +} + +// GetFWPMLAYEROUTBOUNDMACFRAMEETHERNET gets the value of FWPMLAYEROUTBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDMACFRAMEETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDMACFRAMEETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDMACFRAMENATIVE sets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVE(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVE", (value)) +} + +// GetFWPMLAYEROUTBOUNDMACFRAMENATIVE gets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVE() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST sets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST", (value)) +} + +// GetFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST gets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTFAST sets the value of FWPMLAYEROUTBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTFAST", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTFAST gets the value of FWPMLAYEROUTBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV4 sets the value of FWPMLAYEROUTBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV4 gets the value of FWPMLAYEROUTBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD sets the value of FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD gets the value of FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV6 sets the value of FWPMLAYEROUTBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV6 gets the value of FWPMLAYEROUTBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD sets the value of FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD gets the value of FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCEPADD sets the value of FWPMLAYERRPCEPADD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCEPADD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCEPADD", (value)) +} + +// GetFWPMLAYERRPCEPADD gets the value of FWPMLAYERRPCEPADD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCEPADD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCEPADD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCEPMAP sets the value of FWPMLAYERRPCEPMAP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCEPMAP(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCEPMAP", (value)) +} + +// GetFWPMLAYERRPCEPMAP gets the value of FWPMLAYERRPCEPMAP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCEPMAP() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCEPMAP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCPROXYCONN sets the value of FWPMLAYERRPCPROXYCONN for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCPROXYCONN(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCPROXYCONN", (value)) +} + +// GetFWPMLAYERRPCPROXYCONN gets the value of FWPMLAYERRPCPROXYCONN for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCPROXYCONN() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCPROXYCONN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCPROXYIF sets the value of FWPMLAYERRPCPROXYIF for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCPROXYIF(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCPROXYIF", (value)) +} + +// GetFWPMLAYERRPCPROXYIF gets the value of FWPMLAYERRPCPROXYIF for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCPROXYIF() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCPROXYIF") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCUM sets the value of FWPMLAYERRPCUM for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCUM(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCUM", (value)) +} + +// GetFWPMLAYERRPCUM gets the value of FWPMLAYERRPCUM for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCUM() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCUM") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMPACKETV4 sets the value of FWPMLAYERSTREAMPACKETV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMPACKETV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMPACKETV4", (value)) +} + +// GetFWPMLAYERSTREAMPACKETV4 gets the value of FWPMLAYERSTREAMPACKETV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMPACKETV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMPACKETV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMPACKETV6 sets the value of FWPMLAYERSTREAMPACKETV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMPACKETV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMPACKETV6", (value)) +} + +// GetFWPMLAYERSTREAMPACKETV6 gets the value of FWPMLAYERSTREAMPACKETV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMPACKETV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMPACKETV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV4 sets the value of FWPMLAYERSTREAMV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV4", (value)) +} + +// GetFWPMLAYERSTREAMV4 gets the value of FWPMLAYERSTREAMV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV4DISCARD sets the value of FWPMLAYERSTREAMV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV4DISCARD", (value)) +} + +// GetFWPMLAYERSTREAMV4DISCARD gets the value of FWPMLAYERSTREAMV4DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV6 sets the value of FWPMLAYERSTREAMV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV6", (value)) +} + +// GetFWPMLAYERSTREAMV6 gets the value of FWPMLAYERSTREAMV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV6DISCARD sets the value of FWPMLAYERSTREAMV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV6DISCARD", (value)) +} + +// GetFWPMLAYERSTREAMV6DISCARD gets the value of FWPMLAYERSTREAMV6DISCARD for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotal sets the value of Total for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) SetPropertyTotal(value uint64) (err error) { + return instance.SetProperty("Total", (value)) +} + +// GetTotal gets the value of Total for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPClassify) GetPropertyTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("Total") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPReauthorization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPReauthorization.go new file mode 100644 index 00000000..1ff6e7b8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPReauthorization.go @@ -0,0 +1,830 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_WFPReauthorization struct +type Win32_PerfFormattedData_Counters_WFPReauthorization struct { + *Win32_PerfFormattedData + + // + FamilyV4 uint64 + + // + FamilyV6 uint64 + + // + Inbound uint64 + + // + Outbound uint64 + + // + ProtocolICMP uint64 + + // + ProtocolICMP6 uint64 + + // + ProtocolIPv4 uint64 + + // + ProtocolIPv6 uint64 + + // + ProtocolOther uint64 + + // + ProtocolTCP uint64 + + // + ProtocolUDP uint64 + + // + ReasonClassifyCompletion uint64 + + // + ReasonEDPPolicyChanged uint64 + + // + ReasonIPSecPropertiesChanged uint64 + + // + ReasonMidStreamInspection uint64 + + // + ReasonNewArrivalInterface uint64 + + // + ReasonNewInboundMCastBCastPacket uint64 + + // + ReasonNewNextHopInterface uint64 + + // + ReasonPolicyChange uint64 + + // + ReasonPreclassifyLocalAddressDimensionPolicyChanged uint64 + + // + ReasonPreclassifyLocalPortDimensionPolicyChanged uint64 + + // + ReasonPreclassifyRemoteAddressDimensionPolicyChanged uint64 + + // + ReasonPreclassifyRemotePortDimensionPolicyChanged uint64 + + // + ReasonProfileCrossing uint64 + + // + ReasonProxyHandleChanged uint64 + + // + ReasonSocketPropertyChanged uint64 +} + +func NewWin32_PerfFormattedData_Counters_WFPReauthorizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_WFPReauthorization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPReauthorization{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_WFPReauthorizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_WFPReauthorization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPReauthorization{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetFamilyV4 sets the value of FamilyV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyFamilyV4(value uint64) (err error) { + return instance.SetProperty("FamilyV4", (value)) +} + +// GetFamilyV4 gets the value of FamilyV4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyFamilyV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FamilyV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFamilyV6 sets the value of FamilyV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyFamilyV6(value uint64) (err error) { + return instance.SetProperty("FamilyV6", (value)) +} + +// GetFamilyV6 gets the value of FamilyV6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyFamilyV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FamilyV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInbound sets the value of Inbound for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyInbound(value uint64) (err error) { + return instance.SetProperty("Inbound", (value)) +} + +// GetInbound gets the value of Inbound for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyInbound() (value uint64, err error) { + retValue, err := instance.GetProperty("Inbound") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutbound sets the value of Outbound for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyOutbound(value uint64) (err error) { + return instance.SetProperty("Outbound", (value)) +} + +// GetOutbound gets the value of Outbound for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyOutbound() (value uint64, err error) { + retValue, err := instance.GetProperty("Outbound") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolICMP sets the value of ProtocolICMP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolICMP(value uint64) (err error) { + return instance.SetProperty("ProtocolICMP", (value)) +} + +// GetProtocolICMP gets the value of ProtocolICMP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolICMP() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolICMP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolICMP6 sets the value of ProtocolICMP6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolICMP6(value uint64) (err error) { + return instance.SetProperty("ProtocolICMP6", (value)) +} + +// GetProtocolICMP6 gets the value of ProtocolICMP6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolICMP6() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolICMP6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolIPv4 sets the value of ProtocolIPv4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolIPv4(value uint64) (err error) { + return instance.SetProperty("ProtocolIPv4", (value)) +} + +// GetProtocolIPv4 gets the value of ProtocolIPv4 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolIPv4() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolIPv4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolIPv6 sets the value of ProtocolIPv6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolIPv6(value uint64) (err error) { + return instance.SetProperty("ProtocolIPv6", (value)) +} + +// GetProtocolIPv6 gets the value of ProtocolIPv6 for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolIPv6() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolIPv6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolOther sets the value of ProtocolOther for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolOther(value uint64) (err error) { + return instance.SetProperty("ProtocolOther", (value)) +} + +// GetProtocolOther gets the value of ProtocolOther for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolOther() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolTCP sets the value of ProtocolTCP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolTCP(value uint64) (err error) { + return instance.SetProperty("ProtocolTCP", (value)) +} + +// GetProtocolTCP gets the value of ProtocolTCP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolTCP() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolTCP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolUDP sets the value of ProtocolUDP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyProtocolUDP(value uint64) (err error) { + return instance.SetProperty("ProtocolUDP", (value)) +} + +// GetProtocolUDP gets the value of ProtocolUDP for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyProtocolUDP() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolUDP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonClassifyCompletion sets the value of ReasonClassifyCompletion for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonClassifyCompletion(value uint64) (err error) { + return instance.SetProperty("ReasonClassifyCompletion", (value)) +} + +// GetReasonClassifyCompletion gets the value of ReasonClassifyCompletion for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonClassifyCompletion() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonClassifyCompletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonEDPPolicyChanged sets the value of ReasonEDPPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonEDPPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonEDPPolicyChanged", (value)) +} + +// GetReasonEDPPolicyChanged gets the value of ReasonEDPPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonEDPPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonEDPPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonIPSecPropertiesChanged sets the value of ReasonIPSecPropertiesChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonIPSecPropertiesChanged(value uint64) (err error) { + return instance.SetProperty("ReasonIPSecPropertiesChanged", (value)) +} + +// GetReasonIPSecPropertiesChanged gets the value of ReasonIPSecPropertiesChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonIPSecPropertiesChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonIPSecPropertiesChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonMidStreamInspection sets the value of ReasonMidStreamInspection for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonMidStreamInspection(value uint64) (err error) { + return instance.SetProperty("ReasonMidStreamInspection", (value)) +} + +// GetReasonMidStreamInspection gets the value of ReasonMidStreamInspection for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonMidStreamInspection() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonMidStreamInspection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonNewArrivalInterface sets the value of ReasonNewArrivalInterface for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonNewArrivalInterface(value uint64) (err error) { + return instance.SetProperty("ReasonNewArrivalInterface", (value)) +} + +// GetReasonNewArrivalInterface gets the value of ReasonNewArrivalInterface for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonNewArrivalInterface() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonNewArrivalInterface") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonNewInboundMCastBCastPacket sets the value of ReasonNewInboundMCastBCastPacket for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonNewInboundMCastBCastPacket(value uint64) (err error) { + return instance.SetProperty("ReasonNewInboundMCastBCastPacket", (value)) +} + +// GetReasonNewInboundMCastBCastPacket gets the value of ReasonNewInboundMCastBCastPacket for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonNewInboundMCastBCastPacket() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonNewInboundMCastBCastPacket") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonNewNextHopInterface sets the value of ReasonNewNextHopInterface for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonNewNextHopInterface(value uint64) (err error) { + return instance.SetProperty("ReasonNewNextHopInterface", (value)) +} + +// GetReasonNewNextHopInterface gets the value of ReasonNewNextHopInterface for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonNewNextHopInterface() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonNewNextHopInterface") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPolicyChange sets the value of ReasonPolicyChange for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonPolicyChange(value uint64) (err error) { + return instance.SetProperty("ReasonPolicyChange", (value)) +} + +// GetReasonPolicyChange gets the value of ReasonPolicyChange for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonPolicyChange() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPolicyChange") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyLocalAddressDimensionPolicyChanged sets the value of ReasonPreclassifyLocalAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyLocalAddressDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyLocalAddressDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyLocalAddressDimensionPolicyChanged gets the value of ReasonPreclassifyLocalAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyLocalAddressDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyLocalAddressDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyLocalPortDimensionPolicyChanged sets the value of ReasonPreclassifyLocalPortDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyLocalPortDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyLocalPortDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyLocalPortDimensionPolicyChanged gets the value of ReasonPreclassifyLocalPortDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyLocalPortDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyLocalPortDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyRemoteAddressDimensionPolicyChanged sets the value of ReasonPreclassifyRemoteAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyRemoteAddressDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyRemoteAddressDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyRemoteAddressDimensionPolicyChanged gets the value of ReasonPreclassifyRemoteAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyRemoteAddressDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyRemoteAddressDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyRemotePortDimensionPolicyChanged sets the value of ReasonPreclassifyRemotePortDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyRemotePortDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyRemotePortDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyRemotePortDimensionPolicyChanged gets the value of ReasonPreclassifyRemotePortDimensionPolicyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyRemotePortDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyRemotePortDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonProfileCrossing sets the value of ReasonProfileCrossing for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonProfileCrossing(value uint64) (err error) { + return instance.SetProperty("ReasonProfileCrossing", (value)) +} + +// GetReasonProfileCrossing gets the value of ReasonProfileCrossing for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonProfileCrossing() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonProfileCrossing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonProxyHandleChanged sets the value of ReasonProxyHandleChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonProxyHandleChanged(value uint64) (err error) { + return instance.SetProperty("ReasonProxyHandleChanged", (value)) +} + +// GetReasonProxyHandleChanged gets the value of ReasonProxyHandleChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonProxyHandleChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonProxyHandleChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonSocketPropertyChanged sets the value of ReasonSocketPropertyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) SetPropertyReasonSocketPropertyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonSocketPropertyChanged", (value)) +} + +// GetReasonSocketPropertyChanged gets the value of ReasonSocketPropertyChanged for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPReauthorization) GetPropertyReasonSocketPropertyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonSocketPropertyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv4.go new file mode 100644 index 00000000..cdf8850c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv4.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_WFPv4 struct +type Win32_PerfFormattedData_Counters_WFPv4 struct { + *Win32_PerfFormattedData + + // + ActiveInboundConnections uint32 + + // + ActiveOutboundConnections uint32 + + // + AllowedClassifiesPersec uint32 + + // + BlockedBinds uint32 + + // + InboundConnections uint32 + + // + InboundConnectionsAllowedPersec uint32 + + // + InboundConnectionsBlockedPersec uint32 + + // + InboundPacketsDiscardedPersec uint32 + + // + OutboundConnections uint32 + + // + OutboundConnectionsAllowedPersec uint32 + + // + OutboundConnectionsBlockedPersec uint32 + + // + OutboundPacketsDiscardedPersec uint32 + + // + PacketsDiscardedPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_WFPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_WFPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_WFPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_WFPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveInboundConnections sets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyActiveInboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveInboundConnections", (value)) +} + +// GetActiveInboundConnections gets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyActiveInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveInboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveOutboundConnections sets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyActiveOutboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveOutboundConnections", (value)) +} + +// GetActiveOutboundConnections gets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyActiveOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveOutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAllowedClassifiesPersec sets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyAllowedClassifiesPersec(value uint32) (err error) { + return instance.SetProperty("AllowedClassifiesPersec", (value)) +} + +// GetAllowedClassifiesPersec gets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyAllowedClassifiesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AllowedClassifiesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBlockedBinds sets the value of BlockedBinds for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyBlockedBinds(value uint32) (err error) { + return instance.SetProperty("BlockedBinds", (value)) +} + +// GetBlockedBinds gets the value of BlockedBinds for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyBlockedBinds() (value uint32, err error) { + retValue, err := instance.GetProperty("BlockedBinds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnections sets the value of InboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyInboundConnections(value uint32) (err error) { + return instance.SetProperty("InboundConnections", (value)) +} + +// GetInboundConnections gets the value of InboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsAllowedPersec sets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyInboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsAllowedPersec", (value)) +} + +// GetInboundConnectionsAllowedPersec gets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyInboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsBlockedPersec sets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyInboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsBlockedPersec", (value)) +} + +// GetInboundConnectionsBlockedPersec gets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyInboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsDiscardedPersec sets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyInboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsDiscardedPersec", (value)) +} + +// GetInboundPacketsDiscardedPersec gets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyInboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnections sets the value of OutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyOutboundConnections(value uint32) (err error) { + return instance.SetProperty("OutboundConnections", (value)) +} + +// GetOutboundConnections gets the value of OutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsAllowedPersec sets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyOutboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsAllowedPersec", (value)) +} + +// GetOutboundConnectionsAllowedPersec gets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyOutboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsBlockedPersec sets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyOutboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsBlockedPersec", (value)) +} + +// GetOutboundConnectionsBlockedPersec gets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyOutboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundPacketsDiscardedPersec sets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyOutboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundPacketsDiscardedPersec", (value)) +} + +// GetOutboundPacketsDiscardedPersec gets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyOutboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsDiscardedPersec sets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) SetPropertyPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsDiscardedPersec", (value)) +} + +// GetPacketsDiscardedPersec gets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv4) GetPropertyPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv6.go new file mode 100644 index 00000000..3760b4c0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WFPv6.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_WFPv6 struct +type Win32_PerfFormattedData_Counters_WFPv6 struct { + *Win32_PerfFormattedData + + // + ActiveInboundConnections uint32 + + // + ActiveOutboundConnections uint32 + + // + AllowedClassifiesPersec uint32 + + // + BlockedBinds uint32 + + // + InboundConnections uint32 + + // + InboundConnectionsAllowedPersec uint32 + + // + InboundConnectionsBlockedPersec uint32 + + // + InboundPacketsDiscardedPersec uint32 + + // + OutboundConnections uint32 + + // + OutboundConnectionsAllowedPersec uint32 + + // + OutboundConnectionsBlockedPersec uint32 + + // + OutboundPacketsDiscardedPersec uint32 + + // + PacketsDiscardedPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_WFPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_WFPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_WFPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_WFPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WFPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveInboundConnections sets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyActiveInboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveInboundConnections", (value)) +} + +// GetActiveInboundConnections gets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyActiveInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveInboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveOutboundConnections sets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyActiveOutboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveOutboundConnections", (value)) +} + +// GetActiveOutboundConnections gets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyActiveOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveOutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAllowedClassifiesPersec sets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyAllowedClassifiesPersec(value uint32) (err error) { + return instance.SetProperty("AllowedClassifiesPersec", (value)) +} + +// GetAllowedClassifiesPersec gets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyAllowedClassifiesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AllowedClassifiesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBlockedBinds sets the value of BlockedBinds for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyBlockedBinds(value uint32) (err error) { + return instance.SetProperty("BlockedBinds", (value)) +} + +// GetBlockedBinds gets the value of BlockedBinds for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyBlockedBinds() (value uint32, err error) { + retValue, err := instance.GetProperty("BlockedBinds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnections sets the value of InboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyInboundConnections(value uint32) (err error) { + return instance.SetProperty("InboundConnections", (value)) +} + +// GetInboundConnections gets the value of InboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsAllowedPersec sets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyInboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsAllowedPersec", (value)) +} + +// GetInboundConnectionsAllowedPersec gets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyInboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsBlockedPersec sets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyInboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsBlockedPersec", (value)) +} + +// GetInboundConnectionsBlockedPersec gets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyInboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsDiscardedPersec sets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyInboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsDiscardedPersec", (value)) +} + +// GetInboundPacketsDiscardedPersec gets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyInboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnections sets the value of OutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyOutboundConnections(value uint32) (err error) { + return instance.SetProperty("OutboundConnections", (value)) +} + +// GetOutboundConnections gets the value of OutboundConnections for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsAllowedPersec sets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyOutboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsAllowedPersec", (value)) +} + +// GetOutboundConnectionsAllowedPersec gets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyOutboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsBlockedPersec sets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyOutboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsBlockedPersec", (value)) +} + +// GetOutboundConnectionsBlockedPersec gets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyOutboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundPacketsDiscardedPersec sets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyOutboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundPacketsDiscardedPersec", (value)) +} + +// GetOutboundPacketsDiscardedPersec gets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyOutboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsDiscardedPersec sets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) SetPropertyPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsDiscardedPersec", (value)) +} + +// GetPacketsDiscardedPersec gets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_WFPv6) GetPropertyPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WSManQuotaStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WSManQuotaStatistics.go new file mode 100644 index 00000000..0fd65a0d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_WSManQuotaStatistics.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_WSManQuotaStatistics struct +type Win32_PerfFormattedData_Counters_WSManQuotaStatistics struct { + *Win32_PerfFormattedData + + // + ActiveOperations uint32 + + // + ActiveShells uint32 + + // + ActiveUsers uint32 + + // + ProcessID uint32 + + // + SystemQuotaViolationsPerSecond uint32 + + // + TotalRequestsPerSecond uint32 + + // + UserQuotaViolationsPerSecond uint32 +} + +func NewWin32_PerfFormattedData_Counters_WSManQuotaStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WSManQuotaStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_WSManQuotaStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_WSManQuotaStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveOperations sets the value of ActiveOperations for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertyActiveOperations(value uint32) (err error) { + return instance.SetProperty("ActiveOperations", (value)) +} + +// GetActiveOperations gets the value of ActiveOperations for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertyActiveOperations() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveOperations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveShells sets the value of ActiveShells for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertyActiveShells(value uint32) (err error) { + return instance.SetProperty("ActiveShells", (value)) +} + +// GetActiveShells gets the value of ActiveShells for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertyActiveShells() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveShells") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveUsers sets the value of ActiveUsers for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertyActiveUsers(value uint32) (err error) { + return instance.SetProperty("ActiveUsers", (value)) +} + +// GetActiveUsers gets the value of ActiveUsers for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertyActiveUsers() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveUsers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemQuotaViolationsPerSecond sets the value of SystemQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertySystemQuotaViolationsPerSecond(value uint32) (err error) { + return instance.SetProperty("SystemQuotaViolationsPerSecond", (value)) +} + +// GetSystemQuotaViolationsPerSecond gets the value of SystemQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertySystemQuotaViolationsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemQuotaViolationsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalRequestsPerSecond sets the value of TotalRequestsPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertyTotalRequestsPerSecond(value uint32) (err error) { + return instance.SetProperty("TotalRequestsPerSecond", (value)) +} + +// GetTotalRequestsPerSecond gets the value of TotalRequestsPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertyTotalRequestsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRequestsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUserQuotaViolationsPerSecond sets the value of UserQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) SetPropertyUserQuotaViolationsPerSecond(value uint32) (err error) { + return instance.SetProperty("UserQuotaViolationsPerSecond", (value)) +} + +// GetUserQuotaViolationsPerSecond gets the value of UserQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfFormattedData_Counters_WSManQuotaStatistics) GetPropertyUserQuotaViolationsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("UserQuotaViolationsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCICommonBuffer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCICommonBuffer.go new file mode 100644 index 00000000..52e6d257 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCICommonBuffer.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_XHCICommonBuffer struct +type Win32_PerfFormattedData_Counters_XHCICommonBuffer struct { + *Win32_PerfFormattedData + + // + AllocationCount uint32 + + // + FreeCount uint32 + + // + PagesInUse uint32 + + // + PagesTotal uint32 +} + +func NewWin32_PerfFormattedData_Counters_XHCICommonBufferEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_XHCICommonBuffer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_XHCICommonBuffer{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_XHCICommonBufferEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_XHCICommonBuffer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_XHCICommonBuffer{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAllocationCount sets the value of AllocationCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) SetPropertyAllocationCount(value uint32) (err error) { + return instance.SetProperty("AllocationCount", (value)) +} + +// GetAllocationCount gets the value of AllocationCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) GetPropertyAllocationCount() (value uint32, err error) { + retValue, err := instance.GetProperty("AllocationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeCount sets the value of FreeCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) SetPropertyFreeCount(value uint32) (err error) { + return instance.SetProperty("FreeCount", (value)) +} + +// GetFreeCount gets the value of FreeCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) GetPropertyFreeCount() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesInUse sets the value of PagesInUse for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) SetPropertyPagesInUse(value uint32) (err error) { + return instance.SetProperty("PagesInUse", (value)) +} + +// GetPagesInUse gets the value of PagesInUse for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) GetPropertyPagesInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesTotal sets the value of PagesTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) SetPropertyPagesTotal(value uint32) (err error) { + return instance.SetProperty("PagesTotal", (value)) +} + +// GetPagesTotal gets the value of PagesTotal for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCICommonBuffer) GetPropertyPagesTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCIInterrupter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCIInterrupter.go new file mode 100644 index 00000000..ab246498 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCIInterrupter.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_XHCIInterrupter struct +type Win32_PerfFormattedData_Counters_XHCIInterrupter struct { + *Win32_PerfFormattedData + + // + DpcRequeueCount uint32 + + // + DPCsPersec uint32 + + // + EventRingFullCount uint32 + + // + EventsprocessedDPC uint64 + + // + InterruptsPersec uint32 +} + +func NewWin32_PerfFormattedData_Counters_XHCIInterrupterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_XHCIInterrupter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_XHCIInterrupter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_XHCIInterrupterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_XHCIInterrupter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_XHCIInterrupter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDpcRequeueCount sets the value of DpcRequeueCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) SetPropertyDpcRequeueCount(value uint32) (err error) { + return instance.SetProperty("DpcRequeueCount", (value)) +} + +// GetDpcRequeueCount gets the value of DpcRequeueCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) GetPropertyDpcRequeueCount() (value uint32, err error) { + retValue, err := instance.GetProperty("DpcRequeueCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCsPersec sets the value of DPCsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) SetPropertyDPCsPersec(value uint32) (err error) { + return instance.SetProperty("DPCsPersec", (value)) +} + +// GetDPCsPersec gets the value of DPCsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) GetPropertyDPCsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventRingFullCount sets the value of EventRingFullCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) SetPropertyEventRingFullCount(value uint32) (err error) { + return instance.SetProperty("EventRingFullCount", (value)) +} + +// GetEventRingFullCount gets the value of EventRingFullCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) GetPropertyEventRingFullCount() (value uint32, err error) { + retValue, err := instance.GetProperty("EventRingFullCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventsprocessedDPC sets the value of EventsprocessedDPC for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) SetPropertyEventsprocessedDPC(value uint64) (err error) { + return instance.SetProperty("EventsprocessedDPC", (value)) +} + +// GetEventsprocessedDPC gets the value of EventsprocessedDPC for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) GetPropertyEventsprocessedDPC() (value uint64, err error) { + retValue, err := instance.GetProperty("EventsprocessedDPC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) SetPropertyInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCIInterrupter) GetPropertyInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCITransferRing.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCITransferRing.go new file mode 100644 index 00000000..542b3ef1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Counters_XHCITransferRing.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Counters_XHCITransferRing struct +type Win32_PerfFormattedData_Counters_XHCITransferRing struct { + *Win32_PerfFormattedData + + // + BytesPerSec uint32 + + // + FailedTransferCount uint32 + + // + IsochTDFailuresPersec uint32 + + // + IsochTDPersec uint32 + + // + MissedServiceErrorCount uint32 + + // + TransfersPersec uint32 + + // + UnderrunOverruncount uint32 +} + +func NewWin32_PerfFormattedData_Counters_XHCITransferRingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Counters_XHCITransferRing, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_XHCITransferRing{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Counters_XHCITransferRingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Counters_XHCITransferRing, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Counters_XHCITransferRing{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesPerSec sets the value of BytesPerSec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyBytesPerSec(value uint32) (err error) { + return instance.SetProperty("BytesPerSec", (value)) +} + +// GetBytesPerSec gets the value of BytesPerSec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedTransferCount sets the value of FailedTransferCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyFailedTransferCount(value uint32) (err error) { + return instance.SetProperty("FailedTransferCount", (value)) +} + +// GetFailedTransferCount gets the value of FailedTransferCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyFailedTransferCount() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsochTDFailuresPersec sets the value of IsochTDFailuresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyIsochTDFailuresPersec(value uint32) (err error) { + return instance.SetProperty("IsochTDFailuresPersec", (value)) +} + +// GetIsochTDFailuresPersec gets the value of IsochTDFailuresPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyIsochTDFailuresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsochTDFailuresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsochTDPersec sets the value of IsochTDPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyIsochTDPersec(value uint32) (err error) { + return instance.SetProperty("IsochTDPersec", (value)) +} + +// GetIsochTDPersec gets the value of IsochTDPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyIsochTDPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsochTDPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedServiceErrorCount sets the value of MissedServiceErrorCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyMissedServiceErrorCount(value uint32) (err error) { + return instance.SetProperty("MissedServiceErrorCount", (value)) +} + +// GetMissedServiceErrorCount gets the value of MissedServiceErrorCount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyMissedServiceErrorCount() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedServiceErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransfersPersec sets the value of TransfersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyTransfersPersec(value uint32) (err error) { + return instance.SetProperty("TransfersPersec", (value)) +} + +// GetTransfersPersec gets the value of TransfersPersec for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyTransfersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUnderrunOverruncount sets the value of UnderrunOverruncount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) SetPropertyUnderrunOverruncount(value uint32) (err error) { + return instance.SetProperty("UnderrunOverruncount", (value)) +} + +// GetUnderrunOverruncount gets the value of UnderrunOverruncount for the instance +func (instance *Win32_PerfFormattedData_Counters_XHCITransferRing) GetPropertyUnderrunOverruncount() (value uint32, err error) { + retValue, err := instance.GetProperty("UnderrunOverruncount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go new file mode 100644 index 00000000..f7b93040 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator struct +type Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator struct { + *Win32_PerfFormattedData + + // + CreateFile uint64 + + // + CreateFilePersec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWrites uint64 + + // + IOWritesBytes uint64 + + // + IOWritesPersec uint64 + + // + MetadataIO uint64 + + // + MetadataIOPersec uint64 +} + +func NewWin32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinatorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinatorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCreateFile sets the value of CreateFile for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyCreateFile(value uint64) (err error) { + return instance.SetProperty("CreateFile", (value)) +} + +// GetCreateFile gets the value of CreateFile for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyCreateFile() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFilePersec sets the value of CreateFilePersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyCreateFilePersec(value uint64) (err error) { + return instance.SetProperty("CreateFilePersec", (value)) +} + +// GetCreateFilePersec gets the value of CreateFilePersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyCreateFilePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFilePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesBytes sets the value of IOWritesBytes for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWritesBytes(value uint64) (err error) { + return instance.SetProperty("IOWritesBytes", (value)) +} + +// GetIOWritesBytes gets the value of IOWritesBytes for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWritesBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIO sets the value of MetadataIO for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyMetadataIO(value uint64) (err error) { + return instance.SetProperty("MetadataIO", (value)) +} + +// GetMetadataIO gets the value of MetadataIO for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyMetadataIO() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIOPersec sets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyMetadataIOPersec(value uint64) (err error) { + return instance.SetProperty("MetadataIOPersec", (value)) +} + +// GetMetadataIOPersec gets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfFormattedData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyMetadataIOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS.go new file mode 100644 index 00000000..6215a51b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS struct +type Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS struct { + *Win32_PerfFormattedData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerWrite uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerRead uint32 + + // + AvgsecPerWrite uint32 + + // + AvgWriteQueueLength uint64 + + // + CreateFile uint64 + + // + CreateFilePersec uint64 + + // + CurrentReadQueueLength uint64 + + // + CurrentWriteQueueLength uint64 + + // + FilesInvalidatedDuringResume uint64 + + // + FilesInvalidatedOther uint64 + + // + FilesOpened uint32 + + // + Flushes uint64 + + // + FlushesPersec uint64 + + // + MetadataIO uint64 + + // + MetadataIOPersec uint64 + + // + ReadBytesPersec uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + VolumePauseCountDisk uint64 + + // + VolumePauseCountNetwork uint64 + + // + VolumePauseCountOther uint64 + + // + VolumePauseCountTotal uint64 + + // + VolumeState uint32 + + // + WriteBytesPersec uint64 + + // + Writes uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFile sets the value of CreateFile for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCreateFile(value uint64) (err error) { + return instance.SetProperty("CreateFile", (value)) +} + +// GetCreateFile gets the value of CreateFile for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCreateFile() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFilePersec sets the value of CreateFilePersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCreateFilePersec(value uint64) (err error) { + return instance.SetProperty("CreateFilePersec", (value)) +} + +// GetCreateFilePersec gets the value of CreateFilePersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCreateFilePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFilePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentReadQueueLength sets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCurrentReadQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentReadQueueLength", (value)) +} + +// GetCurrentReadQueueLength gets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCurrentReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentWriteQueueLength sets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCurrentWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentWriteQueueLength", (value)) +} + +// GetCurrentWriteQueueLength gets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCurrentWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedDuringResume sets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFilesInvalidatedDuringResume(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedDuringResume", (value)) +} + +// GetFilesInvalidatedDuringResume gets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFilesInvalidatedDuringResume() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedDuringResume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedOther sets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFilesInvalidatedOther(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedOther", (value)) +} + +// GetFilesInvalidatedOther gets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFilesInvalidatedOther() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesOpened sets the value of FilesOpened for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFilesOpened(value uint32) (err error) { + return instance.SetProperty("FilesOpened", (value)) +} + +// GetFilesOpened gets the value of FilesOpened for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFilesOpened() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushes sets the value of Flushes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFlushes(value uint64) (err error) { + return instance.SetProperty("Flushes", (value)) +} + +// GetFlushes gets the value of Flushes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFlushes() (value uint64, err error) { + retValue, err := instance.GetProperty("Flushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushesPersec sets the value of FlushesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFlushesPersec(value uint64) (err error) { + return instance.SetProperty("FlushesPersec", (value)) +} + +// GetFlushesPersec gets the value of FlushesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIO sets the value of MetadataIO for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyMetadataIO(value uint64) (err error) { + return instance.SetProperty("MetadataIO", (value)) +} + +// GetMetadataIO gets the value of MetadataIO for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyMetadataIO() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIOPersec sets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyMetadataIOPersec(value uint64) (err error) { + return instance.SetProperty("MetadataIOPersec", (value)) +} + +// GetMetadataIOPersec gets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyMetadataIOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountDisk sets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountDisk(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountDisk", (value)) +} + +// GetVolumePauseCountDisk gets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountDisk() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountNetwork sets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountNetwork(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountNetwork", (value)) +} + +// GetVolumePauseCountNetwork gets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountNetwork() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountNetwork") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountOther sets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountOther(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountOther", (value)) +} + +// GetVolumePauseCountOther gets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountOther() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountTotal sets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountTotal(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountTotal", (value)) +} + +// GetVolumePauseCountTotal gets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeState sets the value of VolumeState for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumeState(value uint32) (err error) { + return instance.SetProperty("VolumeState", (value)) +} + +// GetVolumeState gets the value of VolumeState for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumeState() (value uint32, err error) { + retValue, err := instance.GetProperty("VolumeState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go new file mode 100644 index 00000000..bbfe0a0a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache struct +type Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache struct { + *Win32_PerfFormattedData + + // + CacheIOReadBytes uint64 + + // + CacheIOReadBytesPersec uint64 + + // + CacheRead uint64 + + // + CacheReadPerSec uint64 + + // + CacheSizeConfigured uint64 + + // + CacheSizeCurrent uint64 + + // + CacheState uint64 + + // + DiskIOReadBytes uint64 + + // + DiskIOReadBytesPerSec uint64 + + // + DiskIOReads uint64 + + // + DiskIOReadsPerSec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPerSec uint64 + + // + IOReads uint64 + + // + IOReadsPerSec uint64 + + // + LRUCacheSizeCurrent uint64 + + // + LRUCacheSizeTarget uint64 + + // + PartialRead uint64 + + // + PartialReadPersec uint64 + + // + PercentCacheValid uint64 + + // + ValidCacheSize uint64 +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCacheIOReadBytes sets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheIOReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytes", (value)) +} + +// GetCacheIOReadBytes gets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheIOReadBytesPersec sets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytesPersec", (value)) +} + +// GetCacheIOReadBytesPersec gets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheRead sets the value of CacheRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheRead(value uint64) (err error) { + return instance.SetProperty("CacheRead", (value)) +} + +// GetCacheRead gets the value of CacheRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheRead() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReadPerSec sets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheReadPerSec(value uint64) (err error) { + return instance.SetProperty("CacheReadPerSec", (value)) +} + +// GetCacheReadPerSec gets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheReadPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReadPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeConfigured sets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheSizeConfigured(value uint64) (err error) { + return instance.SetProperty("CacheSizeConfigured", (value)) +} + +// GetCacheSizeConfigured gets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheSizeConfigured() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeCurrent sets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("CacheSizeCurrent", (value)) +} + +// GetCacheSizeCurrent gets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheState sets the value of CacheState for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheState(value uint64) (err error) { + return instance.SetProperty("CacheState", (value)) +} + +// GetCacheState gets the value of CacheState for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheState() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytes sets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReadBytes(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytes", (value)) +} + +// GetDiskIOReadBytes gets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytesPerSec sets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytesPerSec", (value)) +} + +// GetDiskIOReadBytesPerSec gets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReads sets the value of DiskIOReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReads(value uint64) (err error) { + return instance.SetProperty("DiskIOReads", (value)) +} + +// GetDiskIOReads gets the value of DiskIOReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadsPerSec sets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadsPerSec", (value)) +} + +// GetDiskIOReadsPerSec gets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPerSec sets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPerSec", (value)) +} + +// GetIOReadBytesPerSec gets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPerSec sets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadsPerSec", (value)) +} + +// GetIOReadsPerSec gets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeCurrent sets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyLRUCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeCurrent", (value)) +} + +// GetLRUCacheSizeCurrent gets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyLRUCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeTarget sets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyLRUCacheSizeTarget(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeTarget", (value)) +} + +// GetLRUCacheSizeTarget gets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyLRUCacheSizeTarget() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialRead sets the value of PartialRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPartialRead(value uint64) (err error) { + return instance.SetProperty("PartialRead", (value)) +} + +// GetPartialRead gets the value of PartialRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPartialRead() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialReadPersec sets the value of PartialReadPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPartialReadPersec(value uint64) (err error) { + return instance.SetProperty("PartialReadPersec", (value)) +} + +// GetPartialReadPersec gets the value of PartialReadPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPartialReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentCacheValid sets the value of PercentCacheValid for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPercentCacheValid(value uint64) (err error) { + return instance.SetProperty("PercentCacheValid", (value)) +} + +// GetPercentCacheValid gets the value of PercentCacheValid for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPercentCacheValid() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentCacheValid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValidCacheSize sets the value of ValidCacheSize for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyValidCacheSize(value uint64) (err error) { + return instance.SetProperty("ValidCacheSize", (value)) +} + +// GetValidCacheSize gets the value of ValidCacheSize for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyValidCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ValidCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go new file mode 100644 index 00000000..db72df7a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go @@ -0,0 +1,770 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO struct +type Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO struct { + *Win32_PerfFormattedData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerWrite uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerRead uint32 + + // + AvgsecPerWrite uint32 + + // + AvgWriteQueueLength uint64 + + // + CurrentReadQueueLength uint64 + + // + CurrentWriteQueueLength uint64 + + // + NonSplitReads uint64 + + // + NonSplitReadsPersec uint64 + + // + NonSplitWrites uint64 + + // + NonSplitWritesPersec uint64 + + // + ReadBytes uint64 + + // + ReadBytesPersec uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + SplitReads uint64 + + // + SplitReadsPersec uint64 + + // + SplitWrites uint64 + + // + SplitWritesPersec uint64 + + // + WriteBytes uint64 + + // + WriteBytesPersec uint64 + + // + Writes uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIOEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentReadQueueLength sets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyCurrentReadQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentReadQueueLength", (value)) +} + +// GetCurrentReadQueueLength gets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyCurrentReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentWriteQueueLength sets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyCurrentWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentWriteQueueLength", (value)) +} + +// GetCurrentWriteQueueLength gets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyCurrentWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitReads sets the value of NonSplitReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitReads(value uint64) (err error) { + return instance.SetProperty("NonSplitReads", (value)) +} + +// GetNonSplitReads gets the value of NonSplitReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitReadsPersec sets the value of NonSplitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitReadsPersec(value uint64) (err error) { + return instance.SetProperty("NonSplitReadsPersec", (value)) +} + +// GetNonSplitReadsPersec gets the value of NonSplitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitWrites sets the value of NonSplitWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitWrites(value uint64) (err error) { + return instance.SetProperty("NonSplitWrites", (value)) +} + +// GetNonSplitWrites gets the value of NonSplitWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitWritesPersec sets the value of NonSplitWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitWritesPersec(value uint64) (err error) { + return instance.SetProperty("NonSplitWritesPersec", (value)) +} + +// GetNonSplitWritesPersec gets the value of NonSplitWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytes sets the value of ReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReadBytes(value uint64) (err error) { + return instance.SetProperty("ReadBytes", (value)) +} + +// GetReadBytes gets the value of ReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitReads sets the value of SplitReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitReads(value uint64) (err error) { + return instance.SetProperty("SplitReads", (value)) +} + +// GetSplitReads gets the value of SplitReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitReadsPersec sets the value of SplitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitReadsPersec(value uint64) (err error) { + return instance.SetProperty("SplitReadsPersec", (value)) +} + +// GetSplitReadsPersec gets the value of SplitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitWrites sets the value of SplitWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitWrites(value uint64) (err error) { + return instance.SetProperty("SplitWrites", (value)) +} + +// GetSplitWrites gets the value of SplitWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitWritesPersec sets the value of SplitWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitWritesPersec(value uint64) (err error) { + return instance.SetProperty("SplitWritesPersec", (value)) +} + +// GetSplitWritesPersec gets the value of SplitWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytes sets the value of WriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWriteBytes(value uint64) (err error) { + return instance.SetProperty("WriteBytes", (value)) +} + +// GetWriteBytes gets the value of WriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go new file mode 100644 index 00000000..83f59772 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go @@ -0,0 +1,620 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO struct +type Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO struct { + *Win32_PerfFormattedData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerWrite uint64 + + // + AvgReadsQueueLength uint64 + + // + AvgsecPerRead uint32 + + // + AvgsecPerWrite uint32 + + // + AvgTrimQueueLength uint64 + + // + AvgWritesQueueLength uint64 + + // + CurrentReadQueueLength uint64 + + // + CurrentTrimQueueLength uint64 + + // + CurrentWriteQueueLength uint64 + + // + ReadBytes uint64 + + // + ReadBytesPersec uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + TrimLatency uint32 + + // + TrimPersec uint64 + + // + WriteBytes uint64 + + // + WriteBytesPersec uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIOEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadsQueueLength sets the value of AvgReadsQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgReadsQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadsQueueLength", (value)) +} + +// GetAvgReadsQueueLength gets the value of AvgReadsQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgReadsQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadsQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgTrimQueueLength sets the value of AvgTrimQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgTrimQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgTrimQueueLength", (value)) +} + +// GetAvgTrimQueueLength gets the value of AvgTrimQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgTrimQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgTrimQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgWritesQueueLength sets the value of AvgWritesQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgWritesQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWritesQueueLength", (value)) +} + +// GetAvgWritesQueueLength gets the value of AvgWritesQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgWritesQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWritesQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentReadQueueLength sets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyCurrentReadQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentReadQueueLength", (value)) +} + +// GetCurrentReadQueueLength gets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyCurrentReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentTrimQueueLength sets the value of CurrentTrimQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyCurrentTrimQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentTrimQueueLength", (value)) +} + +// GetCurrentTrimQueueLength gets the value of CurrentTrimQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyCurrentTrimQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentTrimQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentWriteQueueLength sets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyCurrentWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentWriteQueueLength", (value)) +} + +// GetCurrentWriteQueueLength gets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyCurrentWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytes sets the value of ReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReadBytes(value uint64) (err error) { + return instance.SetProperty("ReadBytes", (value)) +} + +// GetReadBytes gets the value of ReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrimLatency sets the value of TrimLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyTrimLatency(value uint32) (err error) { + return instance.SetProperty("TrimLatency", (value)) +} + +// GetTrimLatency gets the value of TrimLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyTrimLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TrimLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTrimPersec sets the value of TrimPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyTrimPersec(value uint64) (err error) { + return instance.SetProperty("TrimPersec", (value)) +} + +// GetTrimPersec gets the value of TrimPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyTrimPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TrimPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytes sets the value of WriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyWriteBytes(value uint64) (err error) { + return instance.SetProperty("WriteBytes", (value)) +} + +// GetWriteBytes gets the value of WriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem.go new file mode 100644 index 00000000..ff2682e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem.go @@ -0,0 +1,1790 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem struct +type Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem struct { + *Win32_PerfFormattedData + + // + CreateFile uint64 + + // + CreateFilePersec uint64 + + // + FilesInvalidatedDuringResume uint64 + + // + FilesInvalidatedOther uint64 + + // + FilesOpened uint32 + + // + Flushes uint64 + + // + FlushesPersec uint64 + + // + IOReadAvgQueueLength uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadLatency uint32 + + // + IOReadQueueLength uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOSingleReads uint64 + + // + IOSingleReadsPersec uint64 + + // + IOSingleWrites uint64 + + // + IOSingleWritesPersec uint64 + + // + IOSplitReads uint64 + + // + IOSplitReadsPersec uint64 + + // + IOSplitWrites uint64 + + // + IOSplitWritesPersec uint64 + + // + IOWriteAvgQueueLength uint64 + + // + IOWriteBytes uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteLatency uint32 + + // + IOWriteQueueLength uint64 + + // + IOWrites uint64 + + // + IOWritesPersec uint64 + + // + MetadataIO uint64 + + // + MetadataIOPersec uint64 + + // + ReadLatency uint32 + + // + ReadQueueLength uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + RedirectedReadBytes uint64 + + // + RedirectedReadBytesPersec uint64 + + // + RedirectedReadLatency uint32 + + // + RedirectedReadQueueLength uint64 + + // + RedirectedReads uint64 + + // + RedirectedReadsAvgQueueLength uint64 + + // + RedirectedReadsPersec uint64 + + // + RedirectedWriteBytes uint64 + + // + RedirectedWriteBytesPersec uint64 + + // + RedirectedWriteLatency uint32 + + // + RedirectedWriteQueueLength uint64 + + // + RedirectedWrites uint64 + + // + RedirectedWritesAvgQueueLength uint64 + + // + RedirectedWritesPersec uint64 + + // + VolumePauseCountDisk uint64 + + // + VolumePauseCountNetwork uint64 + + // + VolumePauseCountOther uint64 + + // + VolumePauseCountTotal uint64 + + // + VolumeState uint32 + + // + WriteLatency uint32 + + // + WriteQueueLength uint64 + + // + Writes uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystemEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCreateFile sets the value of CreateFile for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyCreateFile(value uint64) (err error) { + return instance.SetProperty("CreateFile", (value)) +} + +// GetCreateFile gets the value of CreateFile for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyCreateFile() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFilePersec sets the value of CreateFilePersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyCreateFilePersec(value uint64) (err error) { + return instance.SetProperty("CreateFilePersec", (value)) +} + +// GetCreateFilePersec gets the value of CreateFilePersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyCreateFilePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFilePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedDuringResume sets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFilesInvalidatedDuringResume(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedDuringResume", (value)) +} + +// GetFilesInvalidatedDuringResume gets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFilesInvalidatedDuringResume() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedDuringResume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedOther sets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFilesInvalidatedOther(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedOther", (value)) +} + +// GetFilesInvalidatedOther gets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFilesInvalidatedOther() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesOpened sets the value of FilesOpened for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFilesOpened(value uint32) (err error) { + return instance.SetProperty("FilesOpened", (value)) +} + +// GetFilesOpened gets the value of FilesOpened for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFilesOpened() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushes sets the value of Flushes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFlushes(value uint64) (err error) { + return instance.SetProperty("Flushes", (value)) +} + +// GetFlushes gets the value of Flushes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFlushes() (value uint64, err error) { + retValue, err := instance.GetProperty("Flushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushesPersec sets the value of FlushesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFlushesPersec(value uint64) (err error) { + return instance.SetProperty("FlushesPersec", (value)) +} + +// GetFlushesPersec gets the value of FlushesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadAvgQueueLength sets the value of IOReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("IOReadAvgQueueLength", (value)) +} + +// GetIOReadAvgQueueLength gets the value of IOReadAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadLatency sets the value of IOReadLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadLatency(value uint32) (err error) { + return instance.SetProperty("IOReadLatency", (value)) +} + +// GetIOReadLatency gets the value of IOReadLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("IOReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOReadQueueLength sets the value of IOReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadQueueLength(value uint64) (err error) { + return instance.SetProperty("IOReadQueueLength", (value)) +} + +// GetIOReadQueueLength gets the value of IOReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleReads sets the value of IOSingleReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleReads(value uint64) (err error) { + return instance.SetProperty("IOSingleReads", (value)) +} + +// GetIOSingleReads gets the value of IOSingleReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleReadsPersec sets the value of IOSingleReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOSingleReadsPersec", (value)) +} + +// GetIOSingleReadsPersec gets the value of IOSingleReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleWrites sets the value of IOSingleWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleWrites(value uint64) (err error) { + return instance.SetProperty("IOSingleWrites", (value)) +} + +// GetIOSingleWrites gets the value of IOSingleWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleWritesPersec sets the value of IOSingleWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOSingleWritesPersec", (value)) +} + +// GetIOSingleWritesPersec gets the value of IOSingleWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitReads sets the value of IOSplitReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitReads(value uint64) (err error) { + return instance.SetProperty("IOSplitReads", (value)) +} + +// GetIOSplitReads gets the value of IOSplitReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitReadsPersec sets the value of IOSplitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOSplitReadsPersec", (value)) +} + +// GetIOSplitReadsPersec gets the value of IOSplitReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitWrites sets the value of IOSplitWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitWrites(value uint64) (err error) { + return instance.SetProperty("IOSplitWrites", (value)) +} + +// GetIOSplitWrites gets the value of IOSplitWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitWritesPersec sets the value of IOSplitWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOSplitWritesPersec", (value)) +} + +// GetIOSplitWritesPersec gets the value of IOSplitWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteAvgQueueLength sets the value of IOWriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("IOWriteAvgQueueLength", (value)) +} + +// GetIOWriteAvgQueueLength gets the value of IOWriteAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytes sets the value of IOWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteBytes(value uint64) (err error) { + return instance.SetProperty("IOWriteBytes", (value)) +} + +// GetIOWriteBytes gets the value of IOWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteLatency sets the value of IOWriteLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteLatency(value uint32) (err error) { + return instance.SetProperty("IOWriteLatency", (value)) +} + +// GetIOWriteLatency gets the value of IOWriteLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("IOWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOWriteQueueLength sets the value of IOWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("IOWriteQueueLength", (value)) +} + +// GetIOWriteQueueLength gets the value of IOWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIO sets the value of MetadataIO for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyMetadataIO(value uint64) (err error) { + return instance.SetProperty("MetadataIO", (value)) +} + +// GetMetadataIO gets the value of MetadataIO for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyMetadataIO() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIOPersec sets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyMetadataIOPersec(value uint64) (err error) { + return instance.SetProperty("MetadataIOPersec", (value)) +} + +// GetMetadataIOPersec gets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyMetadataIOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadLatency sets the value of ReadLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadLatency(value uint32) (err error) { + return instance.SetProperty("ReadLatency", (value)) +} + +// GetReadLatency gets the value of ReadLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadQueueLength sets the value of ReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadQueueLength(value uint64) (err error) { + return instance.SetProperty("ReadQueueLength", (value)) +} + +// GetReadQueueLength gets the value of ReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadBytes sets the value of RedirectedReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadBytes(value uint64) (err error) { + return instance.SetProperty("RedirectedReadBytes", (value)) +} + +// GetRedirectedReadBytes gets the value of RedirectedReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadBytesPersec sets the value of RedirectedReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedReadBytesPersec", (value)) +} + +// GetRedirectedReadBytesPersec gets the value of RedirectedReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadLatency sets the value of RedirectedReadLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadLatency(value uint32) (err error) { + return instance.SetProperty("RedirectedReadLatency", (value)) +} + +// GetRedirectedReadLatency gets the value of RedirectedReadLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RedirectedReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRedirectedReadQueueLength sets the value of RedirectedReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedReadQueueLength", (value)) +} + +// GetRedirectedReadQueueLength gets the value of RedirectedReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReads sets the value of RedirectedReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReads(value uint64) (err error) { + return instance.SetProperty("RedirectedReads", (value)) +} + +// GetRedirectedReads gets the value of RedirectedReads for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadsAvgQueueLength sets the value of RedirectedReadsAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadsAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedReadsAvgQueueLength", (value)) +} + +// GetRedirectedReadsAvgQueueLength gets the value of RedirectedReadsAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadsAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadsAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadsPersec sets the value of RedirectedReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadsPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedReadsPersec", (value)) +} + +// GetRedirectedReadsPersec gets the value of RedirectedReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWriteBytes sets the value of RedirectedWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteBytes(value uint64) (err error) { + return instance.SetProperty("RedirectedWriteBytes", (value)) +} + +// GetRedirectedWriteBytes gets the value of RedirectedWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWriteBytesPersec sets the value of RedirectedWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedWriteBytesPersec", (value)) +} + +// GetRedirectedWriteBytesPersec gets the value of RedirectedWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWriteLatency sets the value of RedirectedWriteLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteLatency(value uint32) (err error) { + return instance.SetProperty("RedirectedWriteLatency", (value)) +} + +// GetRedirectedWriteLatency gets the value of RedirectedWriteLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RedirectedWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRedirectedWriteQueueLength sets the value of RedirectedWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedWriteQueueLength", (value)) +} + +// GetRedirectedWriteQueueLength gets the value of RedirectedWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWrites sets the value of RedirectedWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWrites(value uint64) (err error) { + return instance.SetProperty("RedirectedWrites", (value)) +} + +// GetRedirectedWrites gets the value of RedirectedWrites for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWritesAvgQueueLength sets the value of RedirectedWritesAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWritesAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedWritesAvgQueueLength", (value)) +} + +// GetRedirectedWritesAvgQueueLength gets the value of RedirectedWritesAvgQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWritesAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWritesAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWritesPersec sets the value of RedirectedWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWritesPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedWritesPersec", (value)) +} + +// GetRedirectedWritesPersec gets the value of RedirectedWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountDisk sets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountDisk(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountDisk", (value)) +} + +// GetVolumePauseCountDisk gets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountDisk() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountNetwork sets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountNetwork(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountNetwork", (value)) +} + +// GetVolumePauseCountNetwork gets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountNetwork() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountNetwork") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountOther sets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountOther(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountOther", (value)) +} + +// GetVolumePauseCountOther gets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountOther() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountTotal sets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountTotal(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountTotal", (value)) +} + +// GetVolumePauseCountTotal gets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeState sets the value of VolumeState for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumeState(value uint32) (err error) { + return instance.SetProperty("VolumeState", (value)) +} + +// GetVolumeState gets the value of VolumeState for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumeState() (value uint32, err error) { + retValue, err := instance.GetProperty("VolumeState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteLatency sets the value of WriteLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWriteLatency(value uint32) (err error) { + return instance.SetProperty("WriteLatency", (value)) +} + +// GetWriteLatency gets the value of WriteLatency for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteQueueLength sets the value of WriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("WriteQueueLength", (value)) +} + +// GetWriteQueueLength gets the value of WriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go new file mode 100644 index 00000000..051a6d91 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection struct +type Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection struct { + *Win32_PerfFormattedData + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOWriteBytes uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWrites uint64 + + // + IOWritesPersec uint64 +} + +func NewWin32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytes sets the value of IOWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWriteBytes(value uint64) (err error) { + return instance.SetProperty("IOWriteBytes", (value)) +} + +// GetIOWriteBytes gets the value of IOWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go new file mode 100644 index 00000000..68ef46de --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache struct +type Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache struct { + *Win32_PerfFormattedData + + // + CacheIOReadBytes uint64 + + // + CacheIOReadBytesPersec uint64 + + // + CacheRead uint64 + + // + CacheReadPerSec uint64 + + // + CacheSizeConfigured uint64 + + // + CacheSizeCurrent uint64 + + // + CacheState uint64 + + // + DiskIOReadBytes uint64 + + // + DiskIOReadBytesPerSec uint64 + + // + DiskIOReads uint64 + + // + DiskIOReadsPerSec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPerSec uint64 + + // + IOReads uint64 + + // + IOReadsPerSec uint64 + + // + LRUCacheSizeCurrent uint64 + + // + LRUCacheSizeTarget uint64 + + // + PartialRead uint64 + + // + PartialReadPersec uint64 + + // + PercentCacheValid uint64 + + // + ValidCacheSize uint64 +} + +func NewWin32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCacheIOReadBytes sets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheIOReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytes", (value)) +} + +// GetCacheIOReadBytes gets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheIOReadBytesPersec sets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytesPersec", (value)) +} + +// GetCacheIOReadBytesPersec gets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheRead sets the value of CacheRead for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheRead(value uint64) (err error) { + return instance.SetProperty("CacheRead", (value)) +} + +// GetCacheRead gets the value of CacheRead for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheRead() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReadPerSec sets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheReadPerSec(value uint64) (err error) { + return instance.SetProperty("CacheReadPerSec", (value)) +} + +// GetCacheReadPerSec gets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheReadPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReadPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeConfigured sets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheSizeConfigured(value uint64) (err error) { + return instance.SetProperty("CacheSizeConfigured", (value)) +} + +// GetCacheSizeConfigured gets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheSizeConfigured() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeCurrent sets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("CacheSizeCurrent", (value)) +} + +// GetCacheSizeCurrent gets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheState sets the value of CacheState for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheState(value uint64) (err error) { + return instance.SetProperty("CacheState", (value)) +} + +// GetCacheState gets the value of CacheState for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheState() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytes sets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReadBytes(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytes", (value)) +} + +// GetDiskIOReadBytes gets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytesPerSec sets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytesPerSec", (value)) +} + +// GetDiskIOReadBytesPerSec gets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReads sets the value of DiskIOReads for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReads(value uint64) (err error) { + return instance.SetProperty("DiskIOReads", (value)) +} + +// GetDiskIOReads gets the value of DiskIOReads for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadsPerSec sets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadsPerSec", (value)) +} + +// GetDiskIOReadsPerSec gets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPerSec sets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPerSec", (value)) +} + +// GetIOReadBytesPerSec gets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPerSec sets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadsPerSec", (value)) +} + +// GetIOReadsPerSec gets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeCurrent sets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyLRUCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeCurrent", (value)) +} + +// GetLRUCacheSizeCurrent gets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyLRUCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeTarget sets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyLRUCacheSizeTarget(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeTarget", (value)) +} + +// GetLRUCacheSizeTarget gets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyLRUCacheSizeTarget() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialRead sets the value of PartialRead for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPartialRead(value uint64) (err error) { + return instance.SetProperty("PartialRead", (value)) +} + +// GetPartialRead gets the value of PartialRead for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPartialRead() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialReadPersec sets the value of PartialReadPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPartialReadPersec(value uint64) (err error) { + return instance.SetProperty("PartialReadPersec", (value)) +} + +// GetPartialReadPersec gets the value of PartialReadPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPartialReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentCacheValid sets the value of PercentCacheValid for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPercentCacheValid(value uint64) (err error) { + return instance.SetProperty("PercentCacheValid", (value)) +} + +// GetPercentCacheValid gets the value of PercentCacheValid for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPercentCacheValid() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentCacheValid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValidCacheSize sets the value of ValidCacheSize for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyValidCacheSize(value uint64) (err error) { + return instance.SetProperty("ValidCacheSize", (value)) +} + +// GetValidCacheSize gets the value of ValidCacheSize for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyValidCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ValidCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go new file mode 100644 index 00000000..2f3bf365 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager struct +type Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager struct { + *Win32_PerfFormattedData + + // + DirectIOFailureRedirection uint64 + + // + DirectIOFailureRedirectionPersec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadBytesPersecRedirected uint64 + + // + IOReadBytesRedirected uint64 + + // + IOReadPersecRedirected uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOReadsRedirected uint64 + + // + IOWriteBytes uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteBytesPersecRedirected uint64 + + // + IOWriteBytesRedirected uint64 + + // + IOWrites uint64 + + // + IOWritesPersec uint64 + + // + IOWritesPersecRedirected uint64 + + // + IOWritesRedirected uint64 +} + +func NewWin32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDirectIOFailureRedirection sets the value of DirectIOFailureRedirection for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyDirectIOFailureRedirection(value uint64) (err error) { + return instance.SetProperty("DirectIOFailureRedirection", (value)) +} + +// GetDirectIOFailureRedirection gets the value of DirectIOFailureRedirection for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyDirectIOFailureRedirection() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectIOFailureRedirection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectIOFailureRedirectionPersec sets the value of DirectIOFailureRedirectionPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyDirectIOFailureRedirectionPersec(value uint64) (err error) { + return instance.SetProperty("DirectIOFailureRedirectionPersec", (value)) +} + +// GetDirectIOFailureRedirectionPersec gets the value of DirectIOFailureRedirectionPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyDirectIOFailureRedirectionPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectIOFailureRedirectionPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersecRedirected sets the value of IOReadBytesPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytesPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersecRedirected", (value)) +} + +// GetIOReadBytesPersecRedirected gets the value of IOReadBytesPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytesPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesRedirected sets the value of IOReadBytesRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytesRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadBytesRedirected", (value)) +} + +// GetIOReadBytesRedirected gets the value of IOReadBytesRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytesRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadPersecRedirected sets the value of IOReadPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadPersecRedirected", (value)) +} + +// GetIOReadPersecRedirected gets the value of IOReadPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsRedirected sets the value of IOReadsRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadsRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadsRedirected", (value)) +} + +// GetIOReadsRedirected gets the value of IOReadsRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadsRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytes sets the value of IOWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytes(value uint64) (err error) { + return instance.SetProperty("IOWriteBytes", (value)) +} + +// GetIOWriteBytes gets the value of IOWriteBytes for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersecRedirected sets the value of IOWriteBytesPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytesPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersecRedirected", (value)) +} + +// GetIOWriteBytesPersecRedirected gets the value of IOWriteBytesPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytesPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesRedirected sets the value of IOWriteBytesRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytesRedirected(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesRedirected", (value)) +} + +// GetIOWriteBytesRedirected gets the value of IOWriteBytesRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytesRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersecRedirected sets the value of IOWritesPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWritesPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOWritesPersecRedirected", (value)) +} + +// GetIOWritesPersecRedirected gets the value of IOWritesPersecRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWritesPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesRedirected sets the value of IOWritesRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWritesRedirected(value uint64) (err error) { + return instance.SetProperty("IOWritesRedirected", (value)) +} + +// GetIOWritesRedirected gets the value of IOWritesRedirected for the instance +func (instance *Win32_PerfFormattedData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWritesRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_DdmCounterProvider_RAS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_DdmCounterProvider_RAS.go new file mode 100644 index 00000000..d3a2fd57 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_DdmCounterProvider_RAS.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_DdmCounterProvider_RAS struct +type Win32_PerfFormattedData_DdmCounterProvider_RAS struct { + *Win32_PerfFormattedData + + // + BytesReceivedByDisconnectedClients uint64 + + // + BytesTransmittedByDisconnectedClients uint64 + + // + FailedAuthentications uint32 + + // + MaxClients uint32 + + // + TotalClients uint32 +} + +func NewWin32_PerfFormattedData_DdmCounterProvider_RASEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_DdmCounterProvider_RAS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_DdmCounterProvider_RAS{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_DdmCounterProvider_RASEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_DdmCounterProvider_RAS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_DdmCounterProvider_RAS{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceivedByDisconnectedClients sets the value of BytesReceivedByDisconnectedClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) SetPropertyBytesReceivedByDisconnectedClients(value uint64) (err error) { + return instance.SetProperty("BytesReceivedByDisconnectedClients", (value)) +} + +// GetBytesReceivedByDisconnectedClients gets the value of BytesReceivedByDisconnectedClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) GetPropertyBytesReceivedByDisconnectedClients() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedByDisconnectedClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedByDisconnectedClients sets the value of BytesTransmittedByDisconnectedClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) SetPropertyBytesTransmittedByDisconnectedClients(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedByDisconnectedClients", (value)) +} + +// GetBytesTransmittedByDisconnectedClients gets the value of BytesTransmittedByDisconnectedClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) GetPropertyBytesTransmittedByDisconnectedClients() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedByDisconnectedClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFailedAuthentications sets the value of FailedAuthentications for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) SetPropertyFailedAuthentications(value uint32) (err error) { + return instance.SetProperty("FailedAuthentications", (value)) +} + +// GetFailedAuthentications gets the value of FailedAuthentications for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) GetPropertyFailedAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxClients sets the value of MaxClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) SetPropertyMaxClients(value uint32) (err error) { + return instance.SetProperty("MaxClients", (value)) +} + +// GetMaxClients gets the value of MaxClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) GetPropertyMaxClients() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalClients sets the value of TotalClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) SetPropertyTotalClients(value uint32) (err error) { + return instance.SetProperty("TotalClients", (value)) +} + +// GetTotalClients gets the value of TotalClients for the instance +func (instance *Win32_PerfFormattedData_DdmCounterProvider_RAS) GetPropertyTotalClients() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_Database.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_Database.go new file mode 100644 index 00000000..489b924e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_Database.go @@ -0,0 +1,1700 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ESENT_Database struct +type Win32_PerfFormattedData_ESENT_Database struct { + *Win32_PerfFormattedData + + // + DatabaseCacheMemoryCommitted uint64 + + // + DatabaseCacheMemoryCommittedMB uint64 + + // + DatabaseCacheMemoryReserved uint64 + + // + DatabaseCacheMemoryReservedMB uint64 + + // + DatabaseCacheMissAttachedAverageLatency uint64 + + // + DatabaseCacheMissesPersec uint32 + + // + DatabaseCachePercentDehydrated uint32 + + // + DatabaseCachePercentHit uint32 + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCacheRequestsPersec uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSize uint64 + + // + DatabaseCacheSizeEffective uint64 + + // + DatabaseCacheSizeEffectiveMB uint64 + + // + DatabaseCacheSizeMB uint64 + + // + DatabaseCacheSizeResident uint64 + + // + DatabaseCacheSizeResidentMB uint64 + + // + DatabaseMaintenanceDuration uint32 + + // + DatabasePageEvictionsPersec uint32 + + // + DatabasePageFaultsPersec uint32 + + // + DatabasePageFaultStallsPersec uint32 + + // + DefragmentationTasks uint32 + + // + DefragmentationTasksPending uint32 + + // + IODatabaseReadsAttachedAverageLatency uint64 + + // + IODatabaseReadsAttachedPersec uint32 + + // + IODatabaseReadsAverageLatency uint64 + + // + IODatabaseReadsPersec uint32 + + // + IODatabaseReadsRecoveryAverageLatency uint64 + + // + IODatabaseReadsRecoveryPersec uint32 + + // + IODatabaseWritesAttachedAverageLatency uint64 + + // + IODatabaseWritesAttachedPersec uint32 + + // + IODatabaseWritesAverageLatency uint64 + + // + IODatabaseWritesPersec uint32 + + // + IODatabaseWritesRecoveryAverageLatency uint64 + + // + IODatabaseWritesRecoveryPersec uint32 + + // + IOFlushMapWritesAverageLatency uint64 + + // + IOFlushMapWritesPersec uint32 + + // + IOLogReadsAverageLatency uint64 + + // + IOLogReadsPersec uint32 + + // + IOLogWritesAverageLatency uint64 + + // + IOLogWritesPersec uint32 + + // + LogBytesGeneratedPersec uint32 + + // + LogBytesWritePersec uint32 + + // + LogRecordStallsPersec uint32 + + // + LogThreadsWaiting uint32 + + // + LogWritesPersec uint32 + + // + SessionsInUse uint32 + + // + SessionsPercentUsed uint32 + + // + TableClosesPersec uint32 + + // + TableOpenCacheHitsPersec uint32 + + // + TableOpenCacheMissesPersec uint32 + + // + TableOpenCachePercentHit uint32 + + // + TableOpensPersec uint32 + + // + TablesOpen uint32 + + // + VersionBucketsAllocated uint32 +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ESENT_Database, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_Database{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ESENT_Database, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_Database{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatabaseCacheMemoryCommitted sets the value of DatabaseCacheMemoryCommitted for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheMemoryCommitted(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryCommitted", (value)) +} + +// GetDatabaseCacheMemoryCommitted gets the value of DatabaseCacheMemoryCommitted for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheMemoryCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMemoryCommittedMB sets the value of DatabaseCacheMemoryCommittedMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheMemoryCommittedMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryCommittedMB", (value)) +} + +// GetDatabaseCacheMemoryCommittedMB gets the value of DatabaseCacheMemoryCommittedMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheMemoryCommittedMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryCommittedMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMemoryReserved sets the value of DatabaseCacheMemoryReserved for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheMemoryReserved(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryReserved", (value)) +} + +// GetDatabaseCacheMemoryReserved gets the value of DatabaseCacheMemoryReserved for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheMemoryReserved() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryReserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMemoryReservedMB sets the value of DatabaseCacheMemoryReservedMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheMemoryReservedMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryReservedMB", (value)) +} + +// GetDatabaseCacheMemoryReservedMB gets the value of DatabaseCacheMemoryReservedMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheMemoryReservedMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryReservedMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissAttachedAverageLatency sets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheMissAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency gets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheMissAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissesPersec sets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissesPersec", (value)) +} + +// GetDatabaseCacheMissesPersec gets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentDehydrated sets the value of DatabaseCachePercentDehydrated for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCachePercentDehydrated(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentDehydrated", (value)) +} + +// GetDatabaseCachePercentDehydrated gets the value of DatabaseCachePercentDehydrated for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCachePercentDehydrated() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentDehydrated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit sets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCachePercentHit(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit", (value)) +} + +// GetDatabaseCachePercentHit gets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersec sets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersec", (value)) +} + +// GetDatabaseCacheRequestsPersec gets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSize sets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheSize(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSize", (value)) +} + +// GetDatabaseCacheSize gets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeEffective sets the value of DatabaseCacheSizeEffective for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheSizeEffective(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeEffective", (value)) +} + +// GetDatabaseCacheSizeEffective gets the value of DatabaseCacheSizeEffective for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheSizeEffective() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeEffective") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeEffectiveMB sets the value of DatabaseCacheSizeEffectiveMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheSizeEffectiveMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeEffectiveMB", (value)) +} + +// GetDatabaseCacheSizeEffectiveMB gets the value of DatabaseCacheSizeEffectiveMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheSizeEffectiveMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeEffectiveMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeResident sets the value of DatabaseCacheSizeResident for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheSizeResident(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeResident", (value)) +} + +// GetDatabaseCacheSizeResident gets the value of DatabaseCacheSizeResident for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheSizeResident() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeResident") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeResidentMB sets the value of DatabaseCacheSizeResidentMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseCacheSizeResidentMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeResidentMB", (value)) +} + +// GetDatabaseCacheSizeResidentMB gets the value of DatabaseCacheSizeResidentMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseCacheSizeResidentMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeResidentMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseMaintenanceDuration sets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabaseMaintenanceDuration(value uint32) (err error) { + return instance.SetProperty("DatabaseMaintenanceDuration", (value)) +} + +// GetDatabaseMaintenanceDuration gets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabaseMaintenanceDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseMaintenanceDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabasePageEvictionsPersec sets the value of DatabasePageEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabasePageEvictionsPersec(value uint32) (err error) { + return instance.SetProperty("DatabasePageEvictionsPersec", (value)) +} + +// GetDatabasePageEvictionsPersec gets the value of DatabasePageEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabasePageEvictionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabasePageEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabasePageFaultsPersec sets the value of DatabasePageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabasePageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("DatabasePageFaultsPersec", (value)) +} + +// GetDatabasePageFaultsPersec gets the value of DatabasePageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabasePageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabasePageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabasePageFaultStallsPersec sets the value of DatabasePageFaultStallsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDatabasePageFaultStallsPersec(value uint32) (err error) { + return instance.SetProperty("DatabasePageFaultStallsPersec", (value)) +} + +// GetDatabasePageFaultStallsPersec gets the value of DatabasePageFaultStallsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDatabasePageFaultStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabasePageFaultStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefragmentationTasks sets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDefragmentationTasks(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasks", (value)) +} + +// GetDefragmentationTasks gets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDefragmentationTasks() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefragmentationTasksPending sets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyDefragmentationTasksPending(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasksPending", (value)) +} + +// GetDefragmentationTasksPending gets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyDefragmentationTasksPending() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasksPending") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedAverageLatency sets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseReadsAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedAverageLatency", (value)) +} + +// GetIODatabaseReadsAttachedAverageLatency gets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseReadsAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedPersec sets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseReadsAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedPersec", (value)) +} + +// GetIODatabaseReadsAttachedPersec gets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseReadsAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency sets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency", (value)) +} + +// GetIODatabaseReadsAverageLatency gets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsPersec sets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseReadsPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsPersec", (value)) +} + +// GetIODatabaseReadsPersec gets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryAverageLatency sets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseReadsRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryAverageLatency", (value)) +} + +// GetIODatabaseReadsRecoveryAverageLatency gets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseReadsRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryPersec sets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseReadsRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryPersec", (value)) +} + +// GetIODatabaseReadsRecoveryPersec gets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseReadsRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedAverageLatency sets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseWritesAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedAverageLatency", (value)) +} + +// GetIODatabaseWritesAttachedAverageLatency gets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseWritesAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedPersec sets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseWritesAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedPersec", (value)) +} + +// GetIODatabaseWritesAttachedPersec gets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseWritesAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency sets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency", (value)) +} + +// GetIODatabaseWritesAverageLatency gets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesPersec sets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseWritesPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesPersec", (value)) +} + +// GetIODatabaseWritesPersec gets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryAverageLatency sets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseWritesRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryAverageLatency", (value)) +} + +// GetIODatabaseWritesRecoveryAverageLatency gets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseWritesRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryPersec sets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIODatabaseWritesRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryPersec", (value)) +} + +// GetIODatabaseWritesRecoveryPersec gets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIODatabaseWritesRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOFlushMapWritesAverageLatency sets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIOFlushMapWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOFlushMapWritesAverageLatency", (value)) +} + +// GetIOFlushMapWritesAverageLatency gets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIOFlushMapWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOFlushMapWritesPersec sets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIOFlushMapWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOFlushMapWritesPersec", (value)) +} + +// GetIOFlushMapWritesPersec gets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIOFlushMapWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogReadsAverageLatency sets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIOLogReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogReadsAverageLatency", (value)) +} + +// GetIOLogReadsAverageLatency gets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIOLogReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogReadsPersec sets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIOLogReadsPersec(value uint32) (err error) { + return instance.SetProperty("IOLogReadsPersec", (value)) +} + +// GetIOLogReadsPersec gets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIOLogReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogWritesAverageLatency sets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIOLogWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogWritesAverageLatency", (value)) +} + +// GetIOLogWritesAverageLatency gets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIOLogWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogWritesPersec sets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyIOLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOLogWritesPersec", (value)) +} + +// GetIOLogWritesPersec gets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyIOLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesGeneratedPersec sets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyLogBytesGeneratedPersec(value uint32) (err error) { + return instance.SetProperty("LogBytesGeneratedPersec", (value)) +} + +// GetLogBytesGeneratedPersec gets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyLogBytesGeneratedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesGeneratedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesWritePersec sets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyLogBytesWritePersec(value uint32) (err error) { + return instance.SetProperty("LogBytesWritePersec", (value)) +} + +// GetLogBytesWritePersec gets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyLogBytesWritePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesWritePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogRecordStallsPersec sets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyLogRecordStallsPersec(value uint32) (err error) { + return instance.SetProperty("LogRecordStallsPersec", (value)) +} + +// GetLogRecordStallsPersec gets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyLogRecordStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogRecordStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogThreadsWaiting sets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyLogThreadsWaiting(value uint32) (err error) { + return instance.SetProperty("LogThreadsWaiting", (value)) +} + +// GetLogThreadsWaiting gets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyLogThreadsWaiting() (value uint32, err error) { + retValue, err := instance.GetProperty("LogThreadsWaiting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogWritesPersec sets the value of LogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("LogWritesPersec", (value)) +} + +// GetLogWritesPersec gets the value of LogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsInUse sets the value of SessionsInUse for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertySessionsInUse(value uint32) (err error) { + return instance.SetProperty("SessionsInUse", (value)) +} + +// GetSessionsInUse gets the value of SessionsInUse for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertySessionsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPercentUsed sets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertySessionsPercentUsed(value uint32) (err error) { + return instance.SetProperty("SessionsPercentUsed", (value)) +} + +// GetSessionsPercentUsed gets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertySessionsPercentUsed() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPercentUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableClosesPersec sets the value of TableClosesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyTableClosesPersec(value uint32) (err error) { + return instance.SetProperty("TableClosesPersec", (value)) +} + +// GetTableClosesPersec gets the value of TableClosesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyTableClosesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableClosesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheHitsPersec sets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyTableOpenCacheHitsPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheHitsPersec", (value)) +} + +// GetTableOpenCacheHitsPersec gets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyTableOpenCacheHitsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheHitsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheMissesPersec sets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyTableOpenCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheMissesPersec", (value)) +} + +// GetTableOpenCacheMissesPersec gets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyTableOpenCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCachePercentHit sets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyTableOpenCachePercentHit(value uint32) (err error) { + return instance.SetProperty("TableOpenCachePercentHit", (value)) +} + +// GetTableOpenCachePercentHit gets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyTableOpenCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpensPersec sets the value of TableOpensPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyTableOpensPersec(value uint32) (err error) { + return instance.SetProperty("TableOpensPersec", (value)) +} + +// GetTableOpensPersec gets the value of TableOpensPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyTableOpensPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpensPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTablesOpen sets the value of TablesOpen for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyTablesOpen(value uint32) (err error) { + return instance.SetProperty("TablesOpen", (value)) +} + +// GetTablesOpen gets the value of TablesOpen for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyTablesOpen() (value uint32, err error) { + retValue, err := instance.GetProperty("TablesOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersionBucketsAllocated sets the value of VersionBucketsAllocated for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) SetPropertyVersionBucketsAllocated(value uint32) (err error) { + return instance.SetProperty("VersionBucketsAllocated", (value)) +} + +// GetVersionBucketsAllocated gets the value of VersionBucketsAllocated for the instance +func (instance *Win32_PerfFormattedData_ESENT_Database) GetPropertyVersionBucketsAllocated() (value uint32, err error) { + retValue, err := instance.GetProperty("VersionBucketsAllocated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseDatabases.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseDatabases.go new file mode 100644 index 00000000..31172d15 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseDatabases.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ESENT_DatabaseDatabases struct +type Win32_PerfFormattedData_ESENT_DatabaseDatabases struct { + *Win32_PerfFormattedData + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSizeMB uint64 + + // + IODatabaseReadsAverageLatency uint64 + + // + IODatabaseReadsPersec uint32 + + // + IODatabaseWritesAverageLatency uint64 + + // + IODatabaseWritesPersec uint32 +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseDatabasesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ESENT_DatabaseDatabases, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_DatabaseDatabases{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseDatabasesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ESENT_DatabaseDatabases, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_DatabaseDatabases{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency sets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyIODatabaseReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency", (value)) +} + +// GetIODatabaseReadsAverageLatency gets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyIODatabaseReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsPersec sets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyIODatabaseReadsPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsPersec", (value)) +} + +// GetIODatabaseReadsPersec gets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyIODatabaseReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency sets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyIODatabaseWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency", (value)) +} + +// GetIODatabaseWritesAverageLatency gets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyIODatabaseWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesPersec sets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) SetPropertyIODatabaseWritesPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesPersec", (value)) +} + +// GetIODatabaseWritesPersec gets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseDatabases) GetPropertyIODatabaseWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseInstances.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseInstances.go new file mode 100644 index 00000000..234795a7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseInstances.go @@ -0,0 +1,1610 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ESENT_DatabaseInstances struct +type Win32_PerfFormattedData_ESENT_DatabaseInstances struct { + *Win32_PerfFormattedData + + // + DatabaseCacheMissAttachedAverageLatency uint64 + + // + DatabaseCacheMissesPersec uint32 + + // + DatabaseCachePercentHit uint32 + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCacheRequestsPersec uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSizeMB uint64 + + // + DatabaseMaintenanceDuration uint32 + + // + DatabaseOldestTransaction uint64 + + // + DefragmentationTasks uint32 + + // + DefragmentationTasksPending uint32 + + // + IODatabaseReadsAttachedAverageLatency uint64 + + // + IODatabaseReadsAttachedPersec uint32 + + // + IODatabaseReadsAverageLatency uint64 + + // + IODatabaseReadsPersec uint32 + + // + IODatabaseReadsRecoveryAverageLatency uint64 + + // + IODatabaseReadsRecoveryPersec uint32 + + // + IODatabaseWritesAttachedAverageLatency uint64 + + // + IODatabaseWritesAttachedPersec uint32 + + // + IODatabaseWritesAverageLatency uint64 + + // + IODatabaseWritesPersec uint32 + + // + IODatabaseWritesRecoveryAverageLatency uint64 + + // + IODatabaseWritesRecoveryPersec uint32 + + // + IOFlushMapWritesAverageLatency uint64 + + // + IOFlushMapWritesPersec uint32 + + // + IOLogReadsAverageLatency uint64 + + // + IOLogReadsPersec uint32 + + // + IOLogWritesAverageLatency uint64 + + // + IOLogWritesPersec uint32 + + // + LogBytesGeneratedPersec uint32 + + // + LogBytesWritePersec uint32 + + // + LogCheckpointDepthasaPercentofTarget uint32 + + // + LogFileCurrentGeneration uint32 + + // + LogFilesGenerated uint32 + + // + LogFilesGeneratedPrematurely uint32 + + // + LogGenerationCheckpointDepth uint32 + + // + LogGenerationCheckpointDepthMax uint32 + + // + LogGenerationCheckpointDepthTarget uint32 + + // + LogGenerationLossResiliencyDepth uint32 + + // + LogRecordStallsPersec uint32 + + // + LogThreadsWaiting uint32 + + // + LogWritesPersec uint32 + + // + SessionsInUse uint32 + + // + SessionsPercentUsed uint32 + + // + StreamingBackupPagesReadPersec uint32 + + // + TableClosesPersec uint32 + + // + TableOpenCacheHitsPersec uint32 + + // + TableOpenCacheMissesPersec uint32 + + // + TableOpenCachePercentHit uint32 + + // + TableOpensPersec uint32 + + // + TablesOpen uint32 + + // + Versionbucketsallocated uint32 +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseInstancesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ESENT_DatabaseInstances, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_DatabaseInstances{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseInstancesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ESENT_DatabaseInstances, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_DatabaseInstances{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatabaseCacheMissAttachedAverageLatency sets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheMissAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency gets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheMissAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissesPersec sets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissesPersec", (value)) +} + +// GetDatabaseCacheMissesPersec gets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit sets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCachePercentHit(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit", (value)) +} + +// GetDatabaseCachePercentHit gets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersec sets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersec", (value)) +} + +// GetDatabaseCacheRequestsPersec gets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseMaintenanceDuration sets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseMaintenanceDuration(value uint32) (err error) { + return instance.SetProperty("DatabaseMaintenanceDuration", (value)) +} + +// GetDatabaseMaintenanceDuration gets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseMaintenanceDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseMaintenanceDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseOldestTransaction sets the value of DatabaseOldestTransaction for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDatabaseOldestTransaction(value uint64) (err error) { + return instance.SetProperty("DatabaseOldestTransaction", (value)) +} + +// GetDatabaseOldestTransaction gets the value of DatabaseOldestTransaction for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDatabaseOldestTransaction() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseOldestTransaction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDefragmentationTasks sets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDefragmentationTasks(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasks", (value)) +} + +// GetDefragmentationTasks gets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDefragmentationTasks() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefragmentationTasksPending sets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyDefragmentationTasksPending(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasksPending", (value)) +} + +// GetDefragmentationTasksPending gets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyDefragmentationTasksPending() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasksPending") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedAverageLatency sets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedAverageLatency", (value)) +} + +// GetIODatabaseReadsAttachedAverageLatency gets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedPersec sets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedPersec", (value)) +} + +// GetIODatabaseReadsAttachedPersec gets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency sets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency", (value)) +} + +// GetIODatabaseReadsAverageLatency gets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsPersec sets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsPersec", (value)) +} + +// GetIODatabaseReadsPersec gets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryAverageLatency sets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryAverageLatency", (value)) +} + +// GetIODatabaseReadsRecoveryAverageLatency gets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryPersec sets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryPersec", (value)) +} + +// GetIODatabaseReadsRecoveryPersec gets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedAverageLatency sets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedAverageLatency", (value)) +} + +// GetIODatabaseWritesAttachedAverageLatency gets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedPersec sets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedPersec", (value)) +} + +// GetIODatabaseWritesAttachedPersec gets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency sets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency", (value)) +} + +// GetIODatabaseWritesAverageLatency gets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesPersec sets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesPersec", (value)) +} + +// GetIODatabaseWritesPersec gets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryAverageLatency sets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryAverageLatency", (value)) +} + +// GetIODatabaseWritesRecoveryAverageLatency gets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryPersec sets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryPersec", (value)) +} + +// GetIODatabaseWritesRecoveryPersec gets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOFlushMapWritesAverageLatency sets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIOFlushMapWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOFlushMapWritesAverageLatency", (value)) +} + +// GetIOFlushMapWritesAverageLatency gets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIOFlushMapWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOFlushMapWritesPersec sets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIOFlushMapWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOFlushMapWritesPersec", (value)) +} + +// GetIOFlushMapWritesPersec gets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIOFlushMapWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogReadsAverageLatency sets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIOLogReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogReadsAverageLatency", (value)) +} + +// GetIOLogReadsAverageLatency gets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIOLogReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogReadsPersec sets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIOLogReadsPersec(value uint32) (err error) { + return instance.SetProperty("IOLogReadsPersec", (value)) +} + +// GetIOLogReadsPersec gets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIOLogReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogWritesAverageLatency sets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIOLogWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogWritesAverageLatency", (value)) +} + +// GetIOLogWritesAverageLatency gets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIOLogWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogWritesPersec sets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyIOLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOLogWritesPersec", (value)) +} + +// GetIOLogWritesPersec gets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyIOLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesGeneratedPersec sets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogBytesGeneratedPersec(value uint32) (err error) { + return instance.SetProperty("LogBytesGeneratedPersec", (value)) +} + +// GetLogBytesGeneratedPersec gets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogBytesGeneratedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesGeneratedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesWritePersec sets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogBytesWritePersec(value uint32) (err error) { + return instance.SetProperty("LogBytesWritePersec", (value)) +} + +// GetLogBytesWritePersec gets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogBytesWritePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesWritePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogCheckpointDepthasaPercentofTarget sets the value of LogCheckpointDepthasaPercentofTarget for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogCheckpointDepthasaPercentofTarget(value uint32) (err error) { + return instance.SetProperty("LogCheckpointDepthasaPercentofTarget", (value)) +} + +// GetLogCheckpointDepthasaPercentofTarget gets the value of LogCheckpointDepthasaPercentofTarget for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogCheckpointDepthasaPercentofTarget() (value uint32, err error) { + retValue, err := instance.GetProperty("LogCheckpointDepthasaPercentofTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogFileCurrentGeneration sets the value of LogFileCurrentGeneration for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogFileCurrentGeneration(value uint32) (err error) { + return instance.SetProperty("LogFileCurrentGeneration", (value)) +} + +// GetLogFileCurrentGeneration gets the value of LogFileCurrentGeneration for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogFileCurrentGeneration() (value uint32, err error) { + retValue, err := instance.GetProperty("LogFileCurrentGeneration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogFilesGenerated sets the value of LogFilesGenerated for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogFilesGenerated(value uint32) (err error) { + return instance.SetProperty("LogFilesGenerated", (value)) +} + +// GetLogFilesGenerated gets the value of LogFilesGenerated for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogFilesGenerated() (value uint32, err error) { + retValue, err := instance.GetProperty("LogFilesGenerated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogFilesGeneratedPrematurely sets the value of LogFilesGeneratedPrematurely for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogFilesGeneratedPrematurely(value uint32) (err error) { + return instance.SetProperty("LogFilesGeneratedPrematurely", (value)) +} + +// GetLogFilesGeneratedPrematurely gets the value of LogFilesGeneratedPrematurely for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogFilesGeneratedPrematurely() (value uint32, err error) { + retValue, err := instance.GetProperty("LogFilesGeneratedPrematurely") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationCheckpointDepth sets the value of LogGenerationCheckpointDepth for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogGenerationCheckpointDepth(value uint32) (err error) { + return instance.SetProperty("LogGenerationCheckpointDepth", (value)) +} + +// GetLogGenerationCheckpointDepth gets the value of LogGenerationCheckpointDepth for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogGenerationCheckpointDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationCheckpointDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationCheckpointDepthMax sets the value of LogGenerationCheckpointDepthMax for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogGenerationCheckpointDepthMax(value uint32) (err error) { + return instance.SetProperty("LogGenerationCheckpointDepthMax", (value)) +} + +// GetLogGenerationCheckpointDepthMax gets the value of LogGenerationCheckpointDepthMax for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogGenerationCheckpointDepthMax() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationCheckpointDepthMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationCheckpointDepthTarget sets the value of LogGenerationCheckpointDepthTarget for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogGenerationCheckpointDepthTarget(value uint32) (err error) { + return instance.SetProperty("LogGenerationCheckpointDepthTarget", (value)) +} + +// GetLogGenerationCheckpointDepthTarget gets the value of LogGenerationCheckpointDepthTarget for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogGenerationCheckpointDepthTarget() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationCheckpointDepthTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationLossResiliencyDepth sets the value of LogGenerationLossResiliencyDepth for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogGenerationLossResiliencyDepth(value uint32) (err error) { + return instance.SetProperty("LogGenerationLossResiliencyDepth", (value)) +} + +// GetLogGenerationLossResiliencyDepth gets the value of LogGenerationLossResiliencyDepth for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogGenerationLossResiliencyDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationLossResiliencyDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogRecordStallsPersec sets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogRecordStallsPersec(value uint32) (err error) { + return instance.SetProperty("LogRecordStallsPersec", (value)) +} + +// GetLogRecordStallsPersec gets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogRecordStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogRecordStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogThreadsWaiting sets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogThreadsWaiting(value uint32) (err error) { + return instance.SetProperty("LogThreadsWaiting", (value)) +} + +// GetLogThreadsWaiting gets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogThreadsWaiting() (value uint32, err error) { + retValue, err := instance.GetProperty("LogThreadsWaiting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogWritesPersec sets the value of LogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("LogWritesPersec", (value)) +} + +// GetLogWritesPersec gets the value of LogWritesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsInUse sets the value of SessionsInUse for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertySessionsInUse(value uint32) (err error) { + return instance.SetProperty("SessionsInUse", (value)) +} + +// GetSessionsInUse gets the value of SessionsInUse for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertySessionsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPercentUsed sets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertySessionsPercentUsed(value uint32) (err error) { + return instance.SetProperty("SessionsPercentUsed", (value)) +} + +// GetSessionsPercentUsed gets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertySessionsPercentUsed() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPercentUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStreamingBackupPagesReadPersec sets the value of StreamingBackupPagesReadPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyStreamingBackupPagesReadPersec(value uint32) (err error) { + return instance.SetProperty("StreamingBackupPagesReadPersec", (value)) +} + +// GetStreamingBackupPagesReadPersec gets the value of StreamingBackupPagesReadPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyStreamingBackupPagesReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StreamingBackupPagesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableClosesPersec sets the value of TableClosesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyTableClosesPersec(value uint32) (err error) { + return instance.SetProperty("TableClosesPersec", (value)) +} + +// GetTableClosesPersec gets the value of TableClosesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyTableClosesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableClosesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheHitsPersec sets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyTableOpenCacheHitsPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheHitsPersec", (value)) +} + +// GetTableOpenCacheHitsPersec gets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyTableOpenCacheHitsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheHitsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheMissesPersec sets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyTableOpenCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheMissesPersec", (value)) +} + +// GetTableOpenCacheMissesPersec gets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyTableOpenCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCachePercentHit sets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyTableOpenCachePercentHit(value uint32) (err error) { + return instance.SetProperty("TableOpenCachePercentHit", (value)) +} + +// GetTableOpenCachePercentHit gets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyTableOpenCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpensPersec sets the value of TableOpensPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyTableOpensPersec(value uint32) (err error) { + return instance.SetProperty("TableOpensPersec", (value)) +} + +// GetTableOpensPersec gets the value of TableOpensPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyTableOpensPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpensPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTablesOpen sets the value of TablesOpen for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyTablesOpen(value uint32) (err error) { + return instance.SetProperty("TablesOpen", (value)) +} + +// GetTablesOpen gets the value of TablesOpen for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyTablesOpen() (value uint32, err error) { + retValue, err := instance.GetProperty("TablesOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersionbucketsallocated sets the value of Versionbucketsallocated for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) SetPropertyVersionbucketsallocated(value uint32) (err error) { + return instance.SetProperty("Versionbucketsallocated", (value)) +} + +// GetVersionbucketsallocated gets the value of Versionbucketsallocated for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseInstances) GetPropertyVersionbucketsallocated() (value uint32, err error) { + retValue, err := instance.GetProperty("Versionbucketsallocated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseTableClasses.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseTableClasses.go new file mode 100644 index 00000000..9fd40686 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ESENT_DatabaseTableClasses.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ESENT_DatabaseTableClasses struct +type Win32_PerfFormattedData_ESENT_DatabaseTableClasses struct { + *Win32_PerfFormattedData + + // + DatabaseCacheMissAttachedAverageLatency uint64 + + // + DatabaseCacheMissesPersec uint32 + + // + DatabaseCachePercentHit uint32 + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCacheRequestsPersec uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSize uint64 + + // + DatabaseCacheSizeMB uint64 +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseTableClassesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_DatabaseTableClasses{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ESENT_DatabaseTableClassesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ESENT_DatabaseTableClasses{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatabaseCacheMissAttachedAverageLatency sets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheMissAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency gets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheMissAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissesPersec sets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissesPersec", (value)) +} + +// GetDatabaseCacheMissesPersec gets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit sets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCachePercentHit(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit", (value)) +} + +// GetDatabaseCachePercentHit gets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersec sets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersec", (value)) +} + +// GetDatabaseCacheRequestsPersec gets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSize sets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheSize(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSize", (value)) +} + +// GetDatabaseCacheSize gets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfFormattedData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go new file mode 100644 index 00000000..868ebe4a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter struct +type Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter struct { + *Win32_PerfFormattedData + + // + BytesDropped uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + FramesDropped uint64 + + // + FramesReceivedPersec uint64 + + // + FramesSentPersec uint64 +} + +func NewWin32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesDropped sets the value of BytesDropped for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyBytesDropped(value uint64) (err error) { + return instance.SetProperty("BytesDropped", (value)) +} + +// GetBytesDropped gets the value of BytesDropped for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFramesDropped sets the value of FramesDropped for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyFramesDropped(value uint64) (err error) { + return instance.SetProperty("FramesDropped", (value)) +} + +// GetFramesDropped gets the value of FramesDropped for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyFramesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("FramesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFramesReceivedPersec sets the value of FramesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyFramesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("FramesReceivedPersec", (value)) +} + +// GetFramesReceivedPersec gets the value of FramesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyFramesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FramesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFramesSentPersec sets the value of FramesSentPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyFramesSentPersec(value uint64) (err error) { + return instance.SetProperty("FramesSentPersec", (value)) +} + +// GetFramesSentPersec gets the value of FramesSentPersec for the instance +func (instance *Win32_PerfFormattedData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyFramesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FramesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory.go new file mode 100644 index 00000000..6f4046e2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory struct +type Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory struct { + *Win32_PerfFormattedData + + // + DedicatedUsage uint64 + + // + SharedUsage uint64 + + // + TotalCommitted uint64 +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDedicatedUsage sets the value of DedicatedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory) SetPropertyDedicatedUsage(value uint64) (err error) { + return instance.SetProperty("DedicatedUsage", (value)) +} + +// GetDedicatedUsage gets the value of DedicatedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory) GetPropertyDedicatedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("DedicatedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSharedUsage sets the value of SharedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory) SetPropertySharedUsage(value uint64) (err error) { + return instance.SetProperty("SharedUsage", (value)) +} + +// GetSharedUsage gets the value of SharedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory) GetPropertySharedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("SharedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalCommitted sets the value of TotalCommitted for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory) SetPropertyTotalCommitted(value uint64) (err error) { + return instance.SetProperty("TotalCommitted", (value)) +} + +// GetTotalCommitted gets the value of TotalCommitted for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUAdapterMemory) GetPropertyTotalCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine.go new file mode 100644 index 00000000..868b1bc0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine struct +type Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine struct { + *Win32_PerfFormattedData + + // + RunningTime uint64 + + // + UtilizationPercentage uint64 +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUEngineEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUEngineEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetRunningTime sets the value of RunningTime for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine) SetPropertyRunningTime(value uint64) (err error) { + return instance.SetProperty("RunningTime", (value)) +} + +// GetRunningTime gets the value of RunningTime for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine) GetPropertyRunningTime() (value uint64, err error) { + retValue, err := instance.GetProperty("RunningTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUtilizationPercentage sets the value of UtilizationPercentage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine) SetPropertyUtilizationPercentage(value uint64) (err error) { + return instance.SetProperty("UtilizationPercentage", (value)) +} + +// GetUtilizationPercentage gets the value of UtilizationPercentage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUEngine) GetPropertyUtilizationPercentage() (value uint64, err error) { + retValue, err := instance.GetProperty("UtilizationPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory.go new file mode 100644 index 00000000..d0564d65 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory struct +type Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory struct { + *Win32_PerfFormattedData + + // + LocalUsage uint64 +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetLocalUsage sets the value of LocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory) SetPropertyLocalUsage(value uint64) (err error) { + return instance.SetProperty("LocalUsage", (value)) +} + +// GetLocalUsage gets the value of LocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPULocalAdapterMemory) GetPropertyLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go new file mode 100644 index 00000000..5db0ed3e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory struct +type Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory struct { + *Win32_PerfFormattedData + + // + NonLocalUsage uint64 +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNonLocalUsage sets the value of NonLocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory) SetPropertyNonLocalUsage(value uint64) (err error) { + return instance.SetProperty("NonLocalUsage", (value)) +} + +// GetNonLocalUsage gets the value of NonLocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUNonLocalAdapterMemory) GetPropertyNonLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("NonLocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory.go new file mode 100644 index 00000000..95c4c809 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory struct +type Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory struct { + *Win32_PerfFormattedData + + // + DedicatedUsage uint64 + + // + LocalUsage uint64 + + // + NonLocalUsage uint64 + + // + SharedUsage uint64 + + // + TotalCommitted uint64 +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDedicatedUsage sets the value of DedicatedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyDedicatedUsage(value uint64) (err error) { + return instance.SetProperty("DedicatedUsage", (value)) +} + +// GetDedicatedUsage gets the value of DedicatedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyDedicatedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("DedicatedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalUsage sets the value of LocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyLocalUsage(value uint64) (err error) { + return instance.SetProperty("LocalUsage", (value)) +} + +// GetLocalUsage gets the value of LocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonLocalUsage sets the value of NonLocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyNonLocalUsage(value uint64) (err error) { + return instance.SetProperty("NonLocalUsage", (value)) +} + +// GetNonLocalUsage gets the value of NonLocalUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyNonLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("NonLocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSharedUsage sets the value of SharedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) SetPropertySharedUsage(value uint64) (err error) { + return instance.SetProperty("SharedUsage", (value)) +} + +// GetSharedUsage gets the value of SharedUsage for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) GetPropertySharedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("SharedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalCommitted sets the value of TotalCommitted for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyTotalCommitted(value uint64) (err error) { + return instance.SetProperty("TotalCommitted", (value)) +} + +// GetTotalCommitted gets the value of TotalCommitted for the instance +func (instance *Win32_PerfFormattedData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyTotalCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go new file mode 100644 index 00000000..aadfd54f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore struct +type Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore struct { + *Win32_PerfFormattedData + + // + OperationTime uint32 + + // + RequestsActive uint32 + + // + RequestsDispatched uint32 + + // + RequestsHighPriority uint32 + + // + RequestsProcessed uint32 + + // + ThreadsSpawned uint32 +} + +func NewWin32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestoreEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestoreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetOperationTime sets the value of OperationTime for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyOperationTime(value uint32) (err error) { + return instance.SetProperty("OperationTime", (value)) +} + +// GetOperationTime gets the value of OperationTime for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyOperationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("OperationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsActive sets the value of RequestsActive for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsActive(value uint32) (err error) { + return instance.SetProperty("RequestsActive", (value)) +} + +// GetRequestsActive gets the value of RequestsActive for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsActive() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsDispatched sets the value of RequestsDispatched for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsDispatched(value uint32) (err error) { + return instance.SetProperty("RequestsDispatched", (value)) +} + +// GetRequestsDispatched gets the value of RequestsDispatched for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsDispatched() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsDispatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsHighPriority sets the value of RequestsHighPriority for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsHighPriority(value uint32) (err error) { + return instance.SetProperty("RequestsHighPriority", (value)) +} + +// GetRequestsHighPriority gets the value of RequestsHighPriority for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsHighPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsHighPriority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsProcessed sets the value of RequestsProcessed for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsProcessed(value uint32) (err error) { + return instance.SetProperty("RequestsProcessed", (value)) +} + +// GetRequestsProcessed gets the value of RequestsProcessed for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsProcessed() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadsSpawned sets the value of ThreadsSpawned for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyThreadsSpawned(value uint32) (err error) { + return instance.SetProperty("ThreadsSpawned", (value)) +} + +// GetThreadsSpawned gets the value of ThreadsSpawned for the instance +func (instance *Win32_PerfFormattedData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyThreadsSpawned() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadsSpawned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisor.go new file mode 100644 index 00000000..0569b0d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisor.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HvStats_HyperVHypervisor struct +type Win32_PerfFormattedData_HvStats_HyperVHypervisor struct { + *Win32_PerfFormattedData + + // + HypervisorStartupCost uint64 + + // + LogicalProcessors uint64 + + // + ModernStandbyEntries uint64 + + // + MonitoredNotifications uint64 + + // + Partitions uint64 + + // + PlatformIdleTransitions uint64 + + // + TotalPages uint64 + + // + VirtualProcessors uint64 +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHypervisorStartupCost sets the value of HypervisorStartupCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyHypervisorStartupCost(value uint64) (err error) { + return instance.SetProperty("HypervisorStartupCost", (value)) +} + +// GetHypervisorStartupCost gets the value of HypervisorStartupCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyHypervisorStartupCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorStartupCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessors sets the value of LogicalProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyLogicalProcessors(value uint64) (err error) { + return instance.SetProperty("LogicalProcessors", (value)) +} + +// GetLogicalProcessors gets the value of LogicalProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyLogicalProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetModernStandbyEntries sets the value of ModernStandbyEntries for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyModernStandbyEntries(value uint64) (err error) { + return instance.SetProperty("ModernStandbyEntries", (value)) +} + +// GetModernStandbyEntries gets the value of ModernStandbyEntries for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyModernStandbyEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("ModernStandbyEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMonitoredNotifications sets the value of MonitoredNotifications for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyMonitoredNotifications(value uint64) (err error) { + return instance.SetProperty("MonitoredNotifications", (value)) +} + +// GetMonitoredNotifications gets the value of MonitoredNotifications for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyMonitoredNotifications() (value uint64, err error) { + retValue, err := instance.GetProperty("MonitoredNotifications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartitions sets the value of Partitions for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyPartitions(value uint64) (err error) { + return instance.SetProperty("Partitions", (value)) +} + +// GetPartitions gets the value of Partitions for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyPartitions() (value uint64, err error) { + retValue, err := instance.GetProperty("Partitions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPlatformIdleTransitions sets the value of PlatformIdleTransitions for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyPlatformIdleTransitions(value uint64) (err error) { + return instance.SetProperty("PlatformIdleTransitions", (value)) +} + +// GetPlatformIdleTransitions gets the value of PlatformIdleTransitions for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyPlatformIdleTransitions() (value uint64, err error) { + retValue, err := instance.GetProperty("PlatformIdleTransitions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPages sets the value of TotalPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyTotalPages(value uint64) (err error) { + return instance.SetProperty("TotalPages", (value)) +} + +// GetTotalPages gets the value of TotalPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyTotalPages() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessors sets the value of VirtualProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) SetPropertyVirtualProcessors(value uint64) (err error) { + return instance.SetProperty("VirtualProcessors", (value)) +} + +// GetVirtualProcessors gets the value of VirtualProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisor) GetPropertyVirtualProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor.go new file mode 100644 index 00000000..affc51e5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor struct +type Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor struct { + *Win32_PerfFormattedData + + // + C1TransitionsPersec uint64 + + // + C2TransitionsPersec uint64 + + // + C3TransitionsPersec uint64 + + // + ContextSwitchesPersec uint64 + + // + Frequency uint64 + + // + HardwareInterruptsPersec uint64 + + // + HypervisorBranchPredictorFlushesPersec uint64 + + // + HypervisorImmediateL1DataCacheFlushesPersec uint64 + + // + HypervisorL1DataCacheFlushesPersec uint64 + + // + InterProcessorInterruptsPersec uint64 + + // + InterProcessorInterruptsSentPersec uint64 + + // + MonitorTransitionCost uint64 + + // + ParkingStatus uint64 + + // + PercentC1Time uint64 + + // + PercentC2Time uint64 + + // + PercentC3Time uint64 + + // + PercentGuestRunTime uint64 + + // + PercentHypervisorRunTime uint64 + + // + PercentIdleTime uint64 + + // + PercentofMaxFrequency uint64 + + // + PercentTotalRunTime uint64 + + // + PostedInterruptNotificationsPersec uint64 + + // + ProcessorStateFlags uint64 + + // + RootVpIndex uint64 + + // + SchedulerInterruptsPersec uint64 + + // + TimerInterruptsPersec uint64 + + // + TotalInterruptsPersec uint64 +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetC1TransitionsPersec sets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyC1TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C1TransitionsPersec", (value)) +} + +// GetC1TransitionsPersec gets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyC1TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C1TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC2TransitionsPersec sets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyC2TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C2TransitionsPersec", (value)) +} + +// GetC2TransitionsPersec gets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyC2TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C2TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC3TransitionsPersec sets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyC3TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C3TransitionsPersec", (value)) +} + +// GetC3TransitionsPersec gets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyC3TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C3TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextSwitchesPersec sets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyContextSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("ContextSwitchesPersec", (value)) +} + +// GetContextSwitchesPersec gets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyContextSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ContextSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFrequency sets the value of Frequency for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyFrequency(value uint64) (err error) { + return instance.SetProperty("Frequency", (value)) +} + +// GetFrequency gets the value of Frequency for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyFrequency() (value uint64, err error) { + retValue, err := instance.GetProperty("Frequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHardwareInterruptsPersec sets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHardwareInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("HardwareInterruptsPersec", (value)) +} + +// GetHardwareInterruptsPersec gets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHardwareInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HardwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypervisorBranchPredictorFlushesPersec sets the value of HypervisorBranchPredictorFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHypervisorBranchPredictorFlushesPersec(value uint64) (err error) { + return instance.SetProperty("HypervisorBranchPredictorFlushesPersec", (value)) +} + +// GetHypervisorBranchPredictorFlushesPersec gets the value of HypervisorBranchPredictorFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHypervisorBranchPredictorFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorBranchPredictorFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypervisorImmediateL1DataCacheFlushesPersec sets the value of HypervisorImmediateL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHypervisorImmediateL1DataCacheFlushesPersec(value uint64) (err error) { + return instance.SetProperty("HypervisorImmediateL1DataCacheFlushesPersec", (value)) +} + +// GetHypervisorImmediateL1DataCacheFlushesPersec gets the value of HypervisorImmediateL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHypervisorImmediateL1DataCacheFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorImmediateL1DataCacheFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypervisorL1DataCacheFlushesPersec sets the value of HypervisorL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHypervisorL1DataCacheFlushesPersec(value uint64) (err error) { + return instance.SetProperty("HypervisorL1DataCacheFlushesPersec", (value)) +} + +// GetHypervisorL1DataCacheFlushesPersec gets the value of HypervisorL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHypervisorL1DataCacheFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorL1DataCacheFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterProcessorInterruptsPersec sets the value of InterProcessorInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyInterProcessorInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("InterProcessorInterruptsPersec", (value)) +} + +// GetInterProcessorInterruptsPersec gets the value of InterProcessorInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyInterProcessorInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterProcessorInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterProcessorInterruptsSentPersec sets the value of InterProcessorInterruptsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyInterProcessorInterruptsSentPersec(value uint64) (err error) { + return instance.SetProperty("InterProcessorInterruptsSentPersec", (value)) +} + +// GetInterProcessorInterruptsSentPersec gets the value of InterProcessorInterruptsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyInterProcessorInterruptsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterProcessorInterruptsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMonitorTransitionCost sets the value of MonitorTransitionCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyMonitorTransitionCost(value uint64) (err error) { + return instance.SetProperty("MonitorTransitionCost", (value)) +} + +// GetMonitorTransitionCost gets the value of MonitorTransitionCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyMonitorTransitionCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MonitorTransitionCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetParkingStatus sets the value of ParkingStatus for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyParkingStatus(value uint64) (err error) { + return instance.SetProperty("ParkingStatus", (value)) +} + +// GetParkingStatus gets the value of ParkingStatus for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyParkingStatus() (value uint64, err error) { + retValue, err := instance.GetProperty("ParkingStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC1Time sets the value of PercentC1Time for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC1Time(value uint64) (err error) { + return instance.SetProperty("PercentC1Time", (value)) +} + +// GetPercentC1Time gets the value of PercentC1Time for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC1Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time sets the value of PercentC2Time for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC2Time(value uint64) (err error) { + return instance.SetProperty("PercentC2Time", (value)) +} + +// GetPercentC2Time gets the value of PercentC2Time for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC2Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time sets the value of PercentC3Time for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC3Time(value uint64) (err error) { + return instance.SetProperty("PercentC3Time", (value)) +} + +// GetPercentC3Time gets the value of PercentC3Time for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC3Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime sets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentGuestRunTime(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime", (value)) +} + +// GetPercentGuestRunTime gets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentGuestRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime sets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentHypervisorRunTime(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime", (value)) +} + +// GetPercentHypervisorRunTime gets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentHypervisorRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentofMaxFrequency sets the value of PercentofMaxFrequency for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentofMaxFrequency(value uint64) (err error) { + return instance.SetProperty("PercentofMaxFrequency", (value)) +} + +// GetPercentofMaxFrequency gets the value of PercentofMaxFrequency for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentofMaxFrequency() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentofMaxFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime sets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentTotalRunTime(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime", (value)) +} + +// GetPercentTotalRunTime gets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentTotalRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptNotificationsPersec sets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPostedInterruptNotificationsPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptNotificationsPersec", (value)) +} + +// GetPostedInterruptNotificationsPersec gets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPostedInterruptNotificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptNotificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessorStateFlags sets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyProcessorStateFlags(value uint64) (err error) { + return instance.SetProperty("ProcessorStateFlags", (value)) +} + +// GetProcessorStateFlags gets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyProcessorStateFlags() (value uint64, err error) { + retValue, err := instance.GetProperty("ProcessorStateFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRootVpIndex sets the value of RootVpIndex for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyRootVpIndex(value uint64) (err error) { + return instance.SetProperty("RootVpIndex", (value)) +} + +// GetRootVpIndex gets the value of RootVpIndex for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyRootVpIndex() (value uint64, err error) { + retValue, err := instance.GetProperty("RootVpIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSchedulerInterruptsPersec sets the value of SchedulerInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertySchedulerInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("SchedulerInterruptsPersec", (value)) +} + +// GetSchedulerInterruptsPersec gets the value of SchedulerInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertySchedulerInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SchedulerInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTimerInterruptsPersec sets the value of TimerInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyTimerInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("TimerInterruptsPersec", (value)) +} + +// GetTimerInterruptsPersec gets the value of TimerInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyTimerInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TimerInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterruptsPersec sets the value of TotalInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyTotalInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("TotalInterruptsPersec", (value)) +} + +// GetTotalInterruptsPersec gets the value of TotalInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyTotalInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition.go new file mode 100644 index 00000000..1240b06a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition struct +type Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition struct { + *Win32_PerfFormattedData + + // + AddressSpaces uint64 + + // + AttachedDevices uint64 + + // + DepositedPages uint64 + + // + DeviceDMAErrors uint64 + + // + DeviceInterruptErrors uint64 + + // + DeviceInterruptMappings uint64 + + // + DeviceInterruptThrottleEvents uint64 + + // + GPAPages uint64 + + // + GPASpaceModificationsPersec uint64 + + // + IOTLBFlushCost uint64 + + // + IOTLBFlushesPersec uint64 + + // + NestedTLBFreeListSize uint64 + + // + NestedTLBSize uint64 + + // + NestedTLBTrimmedPagesPersec uint64 + + // + pagesrecombinedPersec uint64 + + // + pagesshatteredPersec uint64 + + // + RecommendedNestedTLBSize uint64 + + // + RecommendedVirtualTLBSize uint64 + + // + SkippedTimerTicks uint64 + + // + Value1Gdevicepages uint64 + + // + Value1GGPApages uint64 + + // + Value2Mdevicepages uint64 + + // + Value2MGPApages uint64 + + // + Value4Kdevicepages uint64 + + // + Value4KGPApages uint64 + + // + VirtualProcessors uint64 + + // + VirtualTLBFlushEntiresPersec uint64 + + // + VirtualTLBPages uint64 +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAddressSpaces sets the value of AddressSpaces for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyAddressSpaces(value uint64) (err error) { + return instance.SetProperty("AddressSpaces", (value)) +} + +// GetAddressSpaces gets the value of AddressSpaces for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyAddressSpaces() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaces") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAttachedDevices sets the value of AttachedDevices for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyAttachedDevices(value uint64) (err error) { + return instance.SetProperty("AttachedDevices", (value)) +} + +// GetAttachedDevices gets the value of AttachedDevices for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyAttachedDevices() (value uint64, err error) { + retValue, err := instance.GetProperty("AttachedDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDepositedPages sets the value of DepositedPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyDepositedPages(value uint64) (err error) { + return instance.SetProperty("DepositedPages", (value)) +} + +// GetDepositedPages gets the value of DepositedPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyDepositedPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DepositedPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceDMAErrors sets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceDMAErrors(value uint64) (err error) { + return instance.SetProperty("DeviceDMAErrors", (value)) +} + +// GetDeviceDMAErrors gets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceDMAErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceDMAErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptErrors sets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceInterruptErrors(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptErrors", (value)) +} + +// GetDeviceInterruptErrors gets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceInterruptErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptMappings sets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceInterruptMappings(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptMappings", (value)) +} + +// GetDeviceInterruptMappings gets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceInterruptMappings() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptMappings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptThrottleEvents sets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceInterruptThrottleEvents(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptThrottleEvents", (value)) +} + +// GetDeviceInterruptThrottleEvents gets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceInterruptThrottleEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptThrottleEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPAPages sets the value of GPAPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyGPAPages(value uint64) (err error) { + return instance.SetProperty("GPAPages", (value)) +} + +// GetGPAPages gets the value of GPAPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyGPAPages() (value uint64, err error) { + retValue, err := instance.GetProperty("GPAPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceModificationsPersec sets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyGPASpaceModificationsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceModificationsPersec", (value)) +} + +// GetGPASpaceModificationsPersec gets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyGPASpaceModificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceModificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushCost sets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushCost", (value)) +} + +// GetIOTLBFlushCost gets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushesPersec sets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushesPersec", (value)) +} + +// GetIOTLBFlushesPersec gets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBFreeListSize sets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyNestedTLBFreeListSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBFreeListSize", (value)) +} + +// GetNestedTLBFreeListSize gets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyNestedTLBFreeListSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBFreeListSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBSize sets the value of NestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBSize", (value)) +} + +// GetNestedTLBSize gets the value of NestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBTrimmedPagesPersec sets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyNestedTLBTrimmedPagesPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBTrimmedPagesPersec", (value)) +} + +// GetNestedTLBTrimmedPagesPersec gets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyNestedTLBTrimmedPagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBTrimmedPagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesrecombinedPersec sets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertypagesrecombinedPersec(value uint64) (err error) { + return instance.SetProperty("pagesrecombinedPersec", (value)) +} + +// GetpagesrecombinedPersec gets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertypagesrecombinedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesrecombinedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesshatteredPersec sets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertypagesshatteredPersec(value uint64) (err error) { + return instance.SetProperty("pagesshatteredPersec", (value)) +} + +// GetpagesshatteredPersec gets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertypagesshatteredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesshatteredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedNestedTLBSize sets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyRecommendedNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedNestedTLBSize", (value)) +} + +// GetRecommendedNestedTLBSize gets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyRecommendedNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedNestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedVirtualTLBSize sets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyRecommendedVirtualTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedVirtualTLBSize", (value)) +} + +// GetRecommendedVirtualTLBSize gets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyRecommendedVirtualTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedVirtualTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSkippedTimerTicks sets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertySkippedTimerTicks(value uint64) (err error) { + return instance.SetProperty("SkippedTimerTicks", (value)) +} + +// GetSkippedTimerTicks gets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertySkippedTimerTicks() (value uint64, err error) { + retValue, err := instance.GetProperty("SkippedTimerTicks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1Gdevicepages sets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyValue1Gdevicepages(value uint64) (err error) { + return instance.SetProperty("Value1Gdevicepages", (value)) +} + +// GetValue1Gdevicepages gets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyValue1Gdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1Gdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1GGPApages sets the value of Value1GGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyValue1GGPApages(value uint64) (err error) { + return instance.SetProperty("Value1GGPApages", (value)) +} + +// GetValue1GGPApages gets the value of Value1GGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyValue1GGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1GGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2Mdevicepages sets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyValue2Mdevicepages(value uint64) (err error) { + return instance.SetProperty("Value2Mdevicepages", (value)) +} + +// GetValue2Mdevicepages gets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyValue2Mdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2Mdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2MGPApages sets the value of Value2MGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyValue2MGPApages(value uint64) (err error) { + return instance.SetProperty("Value2MGPApages", (value)) +} + +// GetValue2MGPApages gets the value of Value2MGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyValue2MGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2MGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4Kdevicepages sets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyValue4Kdevicepages(value uint64) (err error) { + return instance.SetProperty("Value4Kdevicepages", (value)) +} + +// GetValue4Kdevicepages gets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyValue4Kdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4Kdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4KGPApages sets the value of Value4KGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyValue4KGPApages(value uint64) (err error) { + return instance.SetProperty("Value4KGPApages", (value)) +} + +// GetValue4KGPApages gets the value of Value4KGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyValue4KGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4KGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessors sets the value of VirtualProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyVirtualProcessors(value uint64) (err error) { + return instance.SetProperty("VirtualProcessors", (value)) +} + +// GetVirtualProcessors gets the value of VirtualProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyVirtualProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBFlushEntiresPersec sets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyVirtualTLBFlushEntiresPersec(value uint64) (err error) { + return instance.SetProperty("VirtualTLBFlushEntiresPersec", (value)) +} + +// GetVirtualTLBFlushEntiresPersec gets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyVirtualTLBFlushEntiresPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBFlushEntiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBPages sets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) SetPropertyVirtualTLBPages(value uint64) (err error) { + return instance.SetProperty("VirtualTLBPages", (value)) +} + +// GetVirtualTLBPages gets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition) GetPropertyVirtualTLBPages() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition.go new file mode 100644 index 00000000..b24c92ec --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition struct +type Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition struct { + *Win32_PerfFormattedData + + // + AddressSpaces uint64 + + // + AttachedDevices uint64 + + // + DepositedPages uint64 + + // + DeviceDMAErrors uint64 + + // + DeviceInterruptErrors uint64 + + // + DeviceInterruptMappings uint64 + + // + DeviceInterruptThrottleEvents uint64 + + // + GPAPages uint64 + + // + GPASpaceModificationsPersec uint64 + + // + IOTLBFlushCost uint64 + + // + IOTLBFlushesPersec uint64 + + // + NestedTLBFreeListSize uint64 + + // + NestedTLBSize uint64 + + // + NestedTLBTrimmedPagesPersec uint64 + + // + pagesrecombinedPersec uint64 + + // + pagesshatteredPersec uint64 + + // + RecommendedNestedTLBSize uint64 + + // + RecommendedVirtualTLBSize uint64 + + // + SkippedTimerTicks uint64 + + // + Value1Gdevicepages uint64 + + // + Value1GGPApages uint64 + + // + Value2Mdevicepages uint64 + + // + Value2MGPApages uint64 + + // + Value4Kdevicepages uint64 + + // + Value4KGPApages uint64 + + // + VirtualProcessors uint64 + + // + VirtualTLBFlushEntiresPersec uint64 + + // + VirtualTLBPages uint64 +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorRootPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorRootPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAddressSpaces sets the value of AddressSpaces for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyAddressSpaces(value uint64) (err error) { + return instance.SetProperty("AddressSpaces", (value)) +} + +// GetAddressSpaces gets the value of AddressSpaces for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyAddressSpaces() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaces") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAttachedDevices sets the value of AttachedDevices for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyAttachedDevices(value uint64) (err error) { + return instance.SetProperty("AttachedDevices", (value)) +} + +// GetAttachedDevices gets the value of AttachedDevices for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyAttachedDevices() (value uint64, err error) { + retValue, err := instance.GetProperty("AttachedDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDepositedPages sets the value of DepositedPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyDepositedPages(value uint64) (err error) { + return instance.SetProperty("DepositedPages", (value)) +} + +// GetDepositedPages gets the value of DepositedPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyDepositedPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DepositedPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceDMAErrors sets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceDMAErrors(value uint64) (err error) { + return instance.SetProperty("DeviceDMAErrors", (value)) +} + +// GetDeviceDMAErrors gets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceDMAErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceDMAErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptErrors sets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceInterruptErrors(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptErrors", (value)) +} + +// GetDeviceInterruptErrors gets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceInterruptErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptMappings sets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceInterruptMappings(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptMappings", (value)) +} + +// GetDeviceInterruptMappings gets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceInterruptMappings() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptMappings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptThrottleEvents sets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceInterruptThrottleEvents(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptThrottleEvents", (value)) +} + +// GetDeviceInterruptThrottleEvents gets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceInterruptThrottleEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptThrottleEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPAPages sets the value of GPAPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyGPAPages(value uint64) (err error) { + return instance.SetProperty("GPAPages", (value)) +} + +// GetGPAPages gets the value of GPAPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyGPAPages() (value uint64, err error) { + retValue, err := instance.GetProperty("GPAPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceModificationsPersec sets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyGPASpaceModificationsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceModificationsPersec", (value)) +} + +// GetGPASpaceModificationsPersec gets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyGPASpaceModificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceModificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushCost sets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushCost", (value)) +} + +// GetIOTLBFlushCost gets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushesPersec sets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushesPersec", (value)) +} + +// GetIOTLBFlushesPersec gets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBFreeListSize sets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyNestedTLBFreeListSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBFreeListSize", (value)) +} + +// GetNestedTLBFreeListSize gets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyNestedTLBFreeListSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBFreeListSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBSize sets the value of NestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBSize", (value)) +} + +// GetNestedTLBSize gets the value of NestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBTrimmedPagesPersec sets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyNestedTLBTrimmedPagesPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBTrimmedPagesPersec", (value)) +} + +// GetNestedTLBTrimmedPagesPersec gets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyNestedTLBTrimmedPagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBTrimmedPagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesrecombinedPersec sets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertypagesrecombinedPersec(value uint64) (err error) { + return instance.SetProperty("pagesrecombinedPersec", (value)) +} + +// GetpagesrecombinedPersec gets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertypagesrecombinedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesrecombinedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesshatteredPersec sets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertypagesshatteredPersec(value uint64) (err error) { + return instance.SetProperty("pagesshatteredPersec", (value)) +} + +// GetpagesshatteredPersec gets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertypagesshatteredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesshatteredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedNestedTLBSize sets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyRecommendedNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedNestedTLBSize", (value)) +} + +// GetRecommendedNestedTLBSize gets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyRecommendedNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedNestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedVirtualTLBSize sets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyRecommendedVirtualTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedVirtualTLBSize", (value)) +} + +// GetRecommendedVirtualTLBSize gets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyRecommendedVirtualTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedVirtualTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSkippedTimerTicks sets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertySkippedTimerTicks(value uint64) (err error) { + return instance.SetProperty("SkippedTimerTicks", (value)) +} + +// GetSkippedTimerTicks gets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertySkippedTimerTicks() (value uint64, err error) { + retValue, err := instance.GetProperty("SkippedTimerTicks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1Gdevicepages sets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue1Gdevicepages(value uint64) (err error) { + return instance.SetProperty("Value1Gdevicepages", (value)) +} + +// GetValue1Gdevicepages gets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue1Gdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1Gdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1GGPApages sets the value of Value1GGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue1GGPApages(value uint64) (err error) { + return instance.SetProperty("Value1GGPApages", (value)) +} + +// GetValue1GGPApages gets the value of Value1GGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue1GGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1GGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2Mdevicepages sets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue2Mdevicepages(value uint64) (err error) { + return instance.SetProperty("Value2Mdevicepages", (value)) +} + +// GetValue2Mdevicepages gets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue2Mdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2Mdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2MGPApages sets the value of Value2MGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue2MGPApages(value uint64) (err error) { + return instance.SetProperty("Value2MGPApages", (value)) +} + +// GetValue2MGPApages gets the value of Value2MGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue2MGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2MGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4Kdevicepages sets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue4Kdevicepages(value uint64) (err error) { + return instance.SetProperty("Value4Kdevicepages", (value)) +} + +// GetValue4Kdevicepages gets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue4Kdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4Kdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4KGPApages sets the value of Value4KGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue4KGPApages(value uint64) (err error) { + return instance.SetProperty("Value4KGPApages", (value)) +} + +// GetValue4KGPApages gets the value of Value4KGPApages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue4KGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4KGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessors sets the value of VirtualProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyVirtualProcessors(value uint64) (err error) { + return instance.SetProperty("VirtualProcessors", (value)) +} + +// GetVirtualProcessors gets the value of VirtualProcessors for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyVirtualProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBFlushEntiresPersec sets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyVirtualTLBFlushEntiresPersec(value uint64) (err error) { + return instance.SetProperty("VirtualTLBFlushEntiresPersec", (value)) +} + +// GetVirtualTLBFlushEntiresPersec gets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyVirtualTLBFlushEntiresPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBFlushEntiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBPages sets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) SetPropertyVirtualTLBPages(value uint64) (err error) { + return instance.SetProperty("VirtualTLBPages", (value)) +} + +// GetVirtualTLBPages gets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition) GetPropertyVirtualTLBPages() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor.go new file mode 100644 index 00000000..ea658505 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor.go @@ -0,0 +1,4520 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor struct +type Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor struct { + *Win32_PerfFormattedData + + // + AddressDomainFlushesPersec uint64 + + // + AddressSpaceEvictionsPersec uint64 + + // + AddressSpaceFlushesPersec uint64 + + // + AddressSpaceSwitchesPersec uint64 + + // + APICEOIAccessesPersec uint64 + + // + APICIPIsSentPersec uint64 + + // + APICMMIOAccessesPersec uint64 + + // + APICSelfIPIsSentPersec uint64 + + // + APICTPRAccessesPersec uint64 + + // + ControlRegisterAccessesCost uint64 + + // + ControlRegisterAccessesForwardedPersec uint64 + + // + ControlRegisterAccessesForwardingCost uint64 + + // + ControlRegisterAccessesPersec uint64 + + // + CPUIDInstructionsCost uint64 + + // + CPUIDInstructionsForwardedPersec uint64 + + // + CPUIDInstructionsForwardingCost uint64 + + // + CPUIDInstructionsPersec uint64 + + // + CPUWaitTimePerDispatch uint64 + + // + DebugRegisterAccessesCost uint64 + + // + DebugRegisterAccessesForwardedPersec uint64 + + // + DebugRegisterAccessesForwardingCost uint64 + + // + DebugRegisterAccessesPersec uint64 + + // + EmulatedInstructionsCost uint64 + + // + EmulatedInstructionsForwardedPersec uint64 + + // + EmulatedInstructionsForwardingCost uint64 + + // + EmulatedInstructionsPersec uint64 + + // + ExtendedHypercallInterceptMessagesPersec uint64 + + // + ExtendedHypercallsPersec uint64 + + // + ExternalInterruptsCost uint64 + + // + ExternalInterruptsForwardedPersec uint64 + + // + ExternalInterruptsPersec uint64 + + // + FlushPhysicalAddressListHypercallsPersec uint64 + + // + FlushPhysicalAddressSpaceHypercallsPersec uint64 + + // + GlobalGVARangeFlushesPersec uint64 + + // + GlobalIOTLBFlushCost uint64 + + // + GlobalIOTLBFlushesPersec uint64 + + // + GPASpaceHypercallsPersec uint64 + + // + GuestPageTableMapsPersec uint64 + + // + HardwareInterruptsPersec uint64 + + // + HLTInstructionsCost uint64 + + // + HLTInstructionsForwardedPersec uint64 + + // + HLTInstructionsForwardingCost uint64 + + // + HLTInstructionsPersec uint64 + + // + HypercallsCost uint64 + + // + HypercallsForwardedPersec uint64 + + // + HypercallsForwardingCost uint64 + + // + HypercallsPersec uint64 + + // + InvEptAllContextEmulationInterceptsPersec uint64 + + // + InvEptAllContextInstructionEmulationCost uint64 + + // + InvEptSingleContextEmulationInterceptsPersec uint64 + + // + InvEptSingleContextInstructionEmulationCost uint64 + + // + InvVpidAllContextEmulationInterceptsPersec uint64 + + // + InvVpidAllContextInstructionEmulationCost uint64 + + // + InvVpidSingleAddressEmulationInterceptsPersec uint64 + + // + InvVpidSingleAddressInstructionEmulationCost uint64 + + // + InvVpidSingleContextEmulationInterceptsPersec uint64 + + // + InvVpidSingleContextInstructionEmulationCost uint64 + + // + IOInstructionsCost uint64 + + // + IOInstructionsForwardedPersec uint64 + + // + IOInstructionsForwardingCost uint64 + + // + IOInstructionsPersec uint64 + + // + IOInterceptMessagesPersec uint64 + + // + LargePageTLBFillsPersec uint64 + + // + LocalFlushedGVARangesPersec uint64 + + // + LocalIOTLBFlushCost uint64 + + // + LocalIOTLBFlushesPersec uint64 + + // + LogicalProcessorDispatchesPersec uint64 + + // + LogicalProcessorHypercallsPersec uint64 + + // + LogicalProcessorMigrationsPersec uint64 + + // + LongSpinWaitHypercallsPersec uint64 + + // + MBECNestedPageTableSwitchesPersec uint64 + + // + MemoryInterceptMessagesPersec uint64 + + // + MSRAccessesCost uint64 + + // + MSRAccessesForwardedPersec uint64 + + // + MSRAccessesForwardingCost uint64 + + // + MSRAccessesPersec uint64 + + // + MWAITInstructionsCost uint64 + + // + MWAITInstructionsForwardedPersec uint64 + + // + MWAITInstructionsForwardingCost uint64 + + // + MWAITInstructionsPersec uint64 + + // + NestedPageFaultInterceptsCost uint64 + + // + NestedPageFaultInterceptsPersec uint64 + + // + NestedSLATHardPageFaultsCost uint64 + + // + NestedSLATHardPageFaultsPersec uint64 + + // + NestedSLATSoftPageFaultsCost uint64 + + // + NestedSLATSoftPageFaultsPersec uint64 + + // + NestedTLBPageTableEvictionsPersec uint64 + + // + NestedTLBPageTableReclamationsPersec uint64 + + // + NestedVMEntriesCost uint64 + + // + NestedVMEntriesPersec uint64 + + // + OtherHypercallsPersec uint64 + + // + OtherInterceptsCost uint64 + + // + OtherInterceptsForwardedPersec uint64 + + // + OtherInterceptsForwardingCost uint64 + + // + OtherInterceptsPersec uint64 + + // + OtherMessagesPersec uint64 + + // + OtherReflectedGuestExceptionsPersec uint64 + + // + PageFaultInterceptsCost uint64 + + // + PageFaultInterceptsForwardedPersec uint64 + + // + PageFaultInterceptsForwardingCost uint64 + + // + PageFaultInterceptsPersec uint64 + + // + PageInvalidationsCost uint64 + + // + PageInvalidationsForwardedPersec uint64 + + // + PageInvalidationsForwardingCost uint64 + + // + PageInvalidationsPersec uint64 + + // + PageScansPersec uint64 + + // + PageTableAllocationsPersec uint64 + + // + PageTableEvictionsPersec uint64 + + // + PageTableReclamationsPersec uint64 + + // + PageTableResetsPersec uint64 + + // + PageTableValidationsPersec uint64 + + // + PageTableWriteInterceptsPersec uint64 + + // + PendingInterruptsCost uint64 + + // + PendingInterruptsForwardedPersec uint64 + + // + PendingInterruptsForwardingCost uint64 + + // + PendingInterruptsPersec uint64 + + // + PercentGuestRunTime uint64 + + // + PercentHypervisorRunTime uint64 + + // + PercentRemoteRunTime uint64 + + // + PercentTotalRunTime uint64 + + // + PostedInterruptNotificationsPersec uint64 + + // + PostedInterruptScansPersec uint64 + + // + ReflectedGuestPageFaultsPersec uint64 + + // + SmallPageTLBFillsPersec uint64 + + // + SyntheticInterruptHypercallsPersec uint64 + + // + SyntheticInterruptsPersec uint64 + + // + TotalInterceptsCost uint64 + + // + TotalInterceptsPersec uint64 + + // + TotalMessagesPersec uint64 + + // + TotalVirtualizationInstructionsEmulatedPersec uint64 + + // + TotalVirtualizationInstructionsEmulationCost uint64 + + // + VirtualInterruptHypercallsPersec uint64 + + // + VirtualInterruptsPersec uint64 + + // + VirtualMMUHypercallsPersec uint64 + + // + VirtualProcessorHypercallsPersec uint64 + + // + VMCLEAREmulationInterceptsPersec uint64 + + // + VMCLEARInstructionEmulationCost uint64 + + // + VMPTRLDEmulationInterceptsPersec uint64 + + // + VMPTRLDInstructionEmulationCost uint64 + + // + VMPTRSTEmulationInterceptsPersec uint64 + + // + VMPTRSTInstructionEmulationCost uint64 + + // + VMREADEmulationInterceptsPersec uint64 + + // + VMREADInstructionEmulationCost uint64 + + // + VMWRITEEmulationInterceptsPersec uint64 + + // + VMWRITEInstructionEmulationCost uint64 + + // + VMXOFFEmulationInterceptsPersec uint64 + + // + VMXOFFInstructionEmulationCost uint64 + + // + VMXONEmulationInterceptsPersec uint64 + + // + VMXONInstructionEmulationCost uint64 +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAddressDomainFlushesPersec sets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressDomainFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressDomainFlushesPersec", (value)) +} + +// GetAddressDomainFlushesPersec gets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressDomainFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressDomainFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceEvictionsPersec sets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressSpaceEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceEvictionsPersec", (value)) +} + +// GetAddressSpaceEvictionsPersec gets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressSpaceEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceFlushesPersec sets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressSpaceFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceFlushesPersec", (value)) +} + +// GetAddressSpaceFlushesPersec gets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressSpaceFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceSwitchesPersec sets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressSpaceSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceSwitchesPersec", (value)) +} + +// GetAddressSpaceSwitchesPersec gets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressSpaceSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICEOIAccessesPersec sets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICEOIAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICEOIAccessesPersec", (value)) +} + +// GetAPICEOIAccessesPersec gets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICEOIAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICEOIAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICIPIsSentPersec sets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICIPIsSentPersec", (value)) +} + +// GetAPICIPIsSentPersec gets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICMMIOAccessesPersec sets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICMMIOAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICMMIOAccessesPersec", (value)) +} + +// GetAPICMMIOAccessesPersec gets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICMMIOAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICMMIOAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICSelfIPIsSentPersec sets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICSelfIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICSelfIPIsSentPersec", (value)) +} + +// GetAPICSelfIPIsSentPersec gets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICSelfIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICSelfIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICTPRAccessesPersec sets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICTPRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICTPRAccessesPersec", (value)) +} + +// GetAPICTPRAccessesPersec gets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICTPRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICTPRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesCost sets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesCost", (value)) +} + +// GetControlRegisterAccessesCost gets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardedPersec sets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardedPersec", (value)) +} + +// GetControlRegisterAccessesForwardedPersec gets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardingCost sets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardingCost", (value)) +} + +// GetControlRegisterAccessesForwardingCost gets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesPersec sets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesPersec", (value)) +} + +// GetControlRegisterAccessesPersec gets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsCost sets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsCost", (value)) +} + +// GetCPUIDInstructionsCost gets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardedPersec sets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardedPersec", (value)) +} + +// GetCPUIDInstructionsForwardedPersec gets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardingCost sets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardingCost", (value)) +} + +// GetCPUIDInstructionsForwardingCost gets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsPersec sets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsPersec", (value)) +} + +// GetCPUIDInstructionsPersec gets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUWaitTimePerDispatch sets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUWaitTimePerDispatch(value uint64) (err error) { + return instance.SetProperty("CPUWaitTimePerDispatch", (value)) +} + +// GetCPUWaitTimePerDispatch gets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUWaitTimePerDispatch() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUWaitTimePerDispatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesCost sets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesCost", (value)) +} + +// GetDebugRegisterAccessesCost gets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardedPersec sets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardedPersec", (value)) +} + +// GetDebugRegisterAccessesForwardedPersec gets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardingCost sets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardingCost", (value)) +} + +// GetDebugRegisterAccessesForwardingCost gets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesPersec sets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesPersec", (value)) +} + +// GetDebugRegisterAccessesPersec gets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsCost sets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsCost", (value)) +} + +// GetEmulatedInstructionsCost gets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardedPersec sets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardedPersec", (value)) +} + +// GetEmulatedInstructionsForwardedPersec gets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardingCost sets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardingCost", (value)) +} + +// GetEmulatedInstructionsForwardingCost gets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsPersec sets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsPersec", (value)) +} + +// GetEmulatedInstructionsPersec gets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallInterceptMessagesPersec sets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExtendedHypercallInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallInterceptMessagesPersec", (value)) +} + +// GetExtendedHypercallInterceptMessagesPersec gets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExtendedHypercallInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallsPersec sets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExtendedHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallsPersec", (value)) +} + +// GetExtendedHypercallsPersec gets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExtendedHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsCost sets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsCost(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsCost", (value)) +} + +// GetExternalInterruptsCost gets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsForwardedPersec sets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsForwardedPersec", (value)) +} + +// GetExternalInterruptsForwardedPersec gets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsPersec sets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsPersec", (value)) +} + +// GetExternalInterruptsPersec gets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressListHypercallsPersec sets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyFlushPhysicalAddressListHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressListHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressListHypercallsPersec gets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyFlushPhysicalAddressListHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressListHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressSpaceHypercallsPersec sets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyFlushPhysicalAddressSpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressSpaceHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressSpaceHypercallsPersec gets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyFlushPhysicalAddressSpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressSpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalGVARangeFlushesPersec sets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalGVARangeFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalGVARangeFlushesPersec", (value)) +} + +// GetGlobalGVARangeFlushesPersec gets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalGVARangeFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalGVARangeFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushCost sets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushCost", (value)) +} + +// GetGlobalIOTLBFlushCost gets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushesPersec sets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushesPersec", (value)) +} + +// GetGlobalIOTLBFlushesPersec gets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceHypercallsPersec sets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGPASpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceHypercallsPersec", (value)) +} + +// GetGPASpaceHypercallsPersec gets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGPASpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGuestPageTableMapsPersec sets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGuestPageTableMapsPersec(value uint64) (err error) { + return instance.SetProperty("GuestPageTableMapsPersec", (value)) +} + +// GetGuestPageTableMapsPersec gets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGuestPageTableMapsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GuestPageTableMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHardwareInterruptsPersec sets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHardwareInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("HardwareInterruptsPersec", (value)) +} + +// GetHardwareInterruptsPersec gets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHardwareInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HardwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsCost sets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsCost", (value)) +} + +// GetHLTInstructionsCost gets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardedPersec sets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardedPersec", (value)) +} + +// GetHLTInstructionsForwardedPersec gets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardingCost sets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardingCost", (value)) +} + +// GetHLTInstructionsForwardingCost gets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsPersec sets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsPersec", (value)) +} + +// GetHLTInstructionsPersec gets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsCost sets the value of HypercallsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsCost(value uint64) (err error) { + return instance.SetProperty("HypercallsCost", (value)) +} + +// GetHypercallsCost gets the value of HypercallsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardedPersec sets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardedPersec", (value)) +} + +// GetHypercallsForwardedPersec gets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardingCost sets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardingCost", (value)) +} + +// GetHypercallsForwardingCost gets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsPersec sets the value of HypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsPersec", (value)) +} + +// GetHypercallsPersec gets the value of HypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextEmulationInterceptsPersec sets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptAllContextEmulationInterceptsPersec gets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextInstructionEmulationCost sets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextInstructionEmulationCost", (value)) +} + +// GetInvEptAllContextInstructionEmulationCost gets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextEmulationInterceptsPersec sets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptSingleContextEmulationInterceptsPersec gets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextInstructionEmulationCost sets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextInstructionEmulationCost", (value)) +} + +// GetInvEptSingleContextInstructionEmulationCost gets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextEmulationInterceptsPersec sets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidAllContextEmulationInterceptsPersec gets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextInstructionEmulationCost sets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextInstructionEmulationCost", (value)) +} + +// GetInvVpidAllContextInstructionEmulationCost gets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressEmulationInterceptsPersec sets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleAddressEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleAddressEmulationInterceptsPersec gets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleAddressEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressInstructionEmulationCost sets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleAddressInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleAddressInstructionEmulationCost gets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleAddressInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextEmulationInterceptsPersec sets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleContextEmulationInterceptsPersec gets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextInstructionEmulationCost sets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleContextInstructionEmulationCost gets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsCost sets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsCost", (value)) +} + +// GetIOInstructionsCost gets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardedPersec sets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardedPersec", (value)) +} + +// GetIOInstructionsForwardedPersec gets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardingCost sets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardingCost", (value)) +} + +// GetIOInstructionsForwardingCost gets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsPersec sets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsPersec", (value)) +} + +// GetIOInstructionsPersec gets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInterceptMessagesPersec sets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("IOInterceptMessagesPersec", (value)) +} + +// GetIOInterceptMessagesPersec gets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLargePageTLBFillsPersec sets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLargePageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("LargePageTLBFillsPersec", (value)) +} + +// GetLargePageTLBFillsPersec gets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLargePageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LargePageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalFlushedGVARangesPersec sets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalFlushedGVARangesPersec(value uint64) (err error) { + return instance.SetProperty("LocalFlushedGVARangesPersec", (value)) +} + +// GetLocalFlushedGVARangesPersec gets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalFlushedGVARangesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalFlushedGVARangesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushCost sets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushCost", (value)) +} + +// GetLocalIOTLBFlushCost gets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushesPersec sets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushesPersec", (value)) +} + +// GetLocalIOTLBFlushesPersec gets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorDispatchesPersec sets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLogicalProcessorDispatchesPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorDispatchesPersec", (value)) +} + +// GetLogicalProcessorDispatchesPersec gets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLogicalProcessorDispatchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorDispatchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorHypercallsPersec sets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLogicalProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorHypercallsPersec", (value)) +} + +// GetLogicalProcessorHypercallsPersec gets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLogicalProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorMigrationsPersec sets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLogicalProcessorMigrationsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorMigrationsPersec", (value)) +} + +// GetLogicalProcessorMigrationsPersec gets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLogicalProcessorMigrationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorMigrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLongSpinWaitHypercallsPersec sets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLongSpinWaitHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LongSpinWaitHypercallsPersec", (value)) +} + +// GetLongSpinWaitHypercallsPersec gets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLongSpinWaitHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LongSpinWaitHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMBECNestedPageTableSwitchesPersec sets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMBECNestedPageTableSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("MBECNestedPageTableSwitchesPersec", (value)) +} + +// GetMBECNestedPageTableSwitchesPersec gets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMBECNestedPageTableSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MBECNestedPageTableSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryInterceptMessagesPersec sets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMemoryInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("MemoryInterceptMessagesPersec", (value)) +} + +// GetMemoryInterceptMessagesPersec gets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMemoryInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesCost sets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesCost", (value)) +} + +// GetMSRAccessesCost gets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardedPersec sets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardedPersec", (value)) +} + +// GetMSRAccessesForwardedPersec gets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardingCost sets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardingCost", (value)) +} + +// GetMSRAccessesForwardingCost gets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesPersec sets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesPersec", (value)) +} + +// GetMSRAccessesPersec gets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsCost sets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsCost", (value)) +} + +// GetMWAITInstructionsCost gets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardedPersec sets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardedPersec", (value)) +} + +// GetMWAITInstructionsForwardedPersec gets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardingCost sets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardingCost", (value)) +} + +// GetMWAITInstructionsForwardingCost gets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsPersec sets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsPersec", (value)) +} + +// GetMWAITInstructionsPersec gets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsCost sets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsCost", (value)) +} + +// GetNestedPageFaultInterceptsCost gets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsPersec sets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsPersec", (value)) +} + +// GetNestedPageFaultInterceptsPersec gets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsCost sets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATHardPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsCost", (value)) +} + +// GetNestedSLATHardPageFaultsCost gets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATHardPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsPersec sets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATHardPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsPersec", (value)) +} + +// GetNestedSLATHardPageFaultsPersec gets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATHardPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsCost sets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsCost", (value)) +} + +// GetNestedSLATSoftPageFaultsCost gets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsPersec sets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsPersec", (value)) +} + +// GetNestedSLATSoftPageFaultsPersec gets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableEvictionsPersec sets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedTLBPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableEvictionsPersec", (value)) +} + +// GetNestedTLBPageTableEvictionsPersec gets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedTLBPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableReclamationsPersec sets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedTLBPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableReclamationsPersec", (value)) +} + +// GetNestedTLBPageTableReclamationsPersec gets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedTLBPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesCost sets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedVMEntriesCost(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesCost", (value)) +} + +// GetNestedVMEntriesCost gets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedVMEntriesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesPersec sets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedVMEntriesPersec(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesPersec", (value)) +} + +// GetNestedVMEntriesPersec gets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedVMEntriesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherHypercallsPersec sets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("OtherHypercallsPersec", (value)) +} + +// GetOtherHypercallsPersec gets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsCost sets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsCost", (value)) +} + +// GetOtherInterceptsCost gets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardedPersec sets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardedPersec", (value)) +} + +// GetOtherInterceptsForwardedPersec gets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardingCost sets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardingCost", (value)) +} + +// GetOtherInterceptsForwardingCost gets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsPersec sets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsPersec", (value)) +} + +// GetOtherInterceptsPersec gets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherMessagesPersec sets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherMessagesPersec(value uint64) (err error) { + return instance.SetProperty("OtherMessagesPersec", (value)) +} + +// GetOtherMessagesPersec gets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherReflectedGuestExceptionsPersec sets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherReflectedGuestExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("OtherReflectedGuestExceptionsPersec", (value)) +} + +// GetOtherReflectedGuestExceptionsPersec gets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherReflectedGuestExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherReflectedGuestExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsCost sets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsCost", (value)) +} + +// GetPageFaultInterceptsCost gets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardedPersec sets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardedPersec", (value)) +} + +// GetPageFaultInterceptsForwardedPersec gets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardingCost sets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardingCost", (value)) +} + +// GetPageFaultInterceptsForwardingCost gets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsPersec sets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsPersec", (value)) +} + +// GetPageFaultInterceptsPersec gets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsCost sets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsCost", (value)) +} + +// GetPageInvalidationsCost gets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardedPersec sets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardedPersec", (value)) +} + +// GetPageInvalidationsForwardedPersec gets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardingCost sets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardingCost", (value)) +} + +// GetPageInvalidationsForwardingCost gets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsPersec sets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsPersec", (value)) +} + +// GetPageInvalidationsPersec gets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageScansPersec sets the value of PageScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageScansPersec(value uint64) (err error) { + return instance.SetProperty("PageScansPersec", (value)) +} + +// GetPageScansPersec gets the value of PageScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableAllocationsPersec sets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableAllocationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableAllocationsPersec", (value)) +} + +// GetPageTableAllocationsPersec gets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableAllocationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableAllocationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableEvictionsPersec sets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableEvictionsPersec", (value)) +} + +// GetPageTableEvictionsPersec gets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableReclamationsPersec sets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableReclamationsPersec", (value)) +} + +// GetPageTableReclamationsPersec gets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableResetsPersec sets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableResetsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableResetsPersec", (value)) +} + +// GetPageTableResetsPersec gets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableResetsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableResetsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableValidationsPersec sets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableValidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableValidationsPersec", (value)) +} + +// GetPageTableValidationsPersec gets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableValidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableValidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableWriteInterceptsPersec sets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableWriteInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableWriteInterceptsPersec", (value)) +} + +// GetPageTableWriteInterceptsPersec gets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableWriteInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableWriteInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsCost sets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsCost", (value)) +} + +// GetPendingInterruptsCost gets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardedPersec sets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardedPersec", (value)) +} + +// GetPendingInterruptsForwardedPersec gets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardingCost sets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardingCost", (value)) +} + +// GetPendingInterruptsForwardingCost gets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsPersec sets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsPersec", (value)) +} + +// GetPendingInterruptsPersec gets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime sets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentGuestRunTime(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime", (value)) +} + +// GetPercentGuestRunTime gets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentGuestRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime sets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentHypervisorRunTime(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime", (value)) +} + +// GetPercentHypervisorRunTime gets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentHypervisorRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentRemoteRunTime sets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentRemoteRunTime(value uint64) (err error) { + return instance.SetProperty("PercentRemoteRunTime", (value)) +} + +// GetPercentRemoteRunTime gets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentRemoteRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentRemoteRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime sets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentTotalRunTime(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime", (value)) +} + +// GetPercentTotalRunTime gets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentTotalRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptNotificationsPersec sets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPostedInterruptNotificationsPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptNotificationsPersec", (value)) +} + +// GetPostedInterruptNotificationsPersec gets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPostedInterruptNotificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptNotificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptScansPersec sets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPostedInterruptScansPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptScansPersec", (value)) +} + +// GetPostedInterruptScansPersec gets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPostedInterruptScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReflectedGuestPageFaultsPersec sets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyReflectedGuestPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("ReflectedGuestPageFaultsPersec", (value)) +} + +// GetReflectedGuestPageFaultsPersec gets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyReflectedGuestPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReflectedGuestPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSmallPageTLBFillsPersec sets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertySmallPageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("SmallPageTLBFillsPersec", (value)) +} + +// GetSmallPageTLBFillsPersec gets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertySmallPageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SmallPageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptHypercallsPersec sets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertySyntheticInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptHypercallsPersec", (value)) +} + +// GetSyntheticInterruptHypercallsPersec gets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertySyntheticInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptsPersec sets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertySyntheticInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptsPersec", (value)) +} + +// GetSyntheticInterruptsPersec gets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertySyntheticInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsCost sets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalInterceptsCost(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsCost", (value)) +} + +// GetTotalInterceptsCost gets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsPersec sets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsPersec", (value)) +} + +// GetTotalInterceptsPersec gets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalMessagesPersec sets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalMessagesPersec(value uint64) (err error) { + return instance.SetProperty("TotalMessagesPersec", (value)) +} + +// GetTotalMessagesPersec gets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulatedPersec sets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulatedPersec(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulatedPersec", (value)) +} + +// GetTotalVirtualizationInstructionsEmulatedPersec gets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulatedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulationCost sets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulationCost(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulationCost", (value)) +} + +// GetTotalVirtualizationInstructionsEmulationCost gets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptHypercallsPersec sets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptHypercallsPersec", (value)) +} + +// GetVirtualInterruptHypercallsPersec gets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptsPersec sets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptsPersec", (value)) +} + +// GetVirtualInterruptsPersec gets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualMMUHypercallsPersec sets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualMMUHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualMMUHypercallsPersec", (value)) +} + +// GetVirtualMMUHypercallsPersec gets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualMMUHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualMMUHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessorHypercallsPersec sets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualProcessorHypercallsPersec", (value)) +} + +// GetVirtualProcessorHypercallsPersec gets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEAREmulationInterceptsPersec sets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMCLEAREmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMCLEAREmulationInterceptsPersec", (value)) +} + +// GetVMCLEAREmulationInterceptsPersec gets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMCLEAREmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEAREmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEARInstructionEmulationCost sets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMCLEARInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMCLEARInstructionEmulationCost", (value)) +} + +// GetVMCLEARInstructionEmulationCost gets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMCLEARInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEARInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDEmulationInterceptsPersec sets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRLDEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRLDEmulationInterceptsPersec", (value)) +} + +// GetVMPTRLDEmulationInterceptsPersec gets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRLDEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDInstructionEmulationCost sets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRLDInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRLDInstructionEmulationCost", (value)) +} + +// GetVMPTRLDInstructionEmulationCost gets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRLDInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTEmulationInterceptsPersec sets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRSTEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRSTEmulationInterceptsPersec", (value)) +} + +// GetVMPTRSTEmulationInterceptsPersec gets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRSTEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTInstructionEmulationCost sets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRSTInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRSTInstructionEmulationCost", (value)) +} + +// GetVMPTRSTInstructionEmulationCost gets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRSTInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADEmulationInterceptsPersec sets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMREADEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMREADEmulationInterceptsPersec", (value)) +} + +// GetVMREADEmulationInterceptsPersec gets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMREADEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADInstructionEmulationCost sets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMREADInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMREADInstructionEmulationCost", (value)) +} + +// GetVMREADInstructionEmulationCost gets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMREADInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEEmulationInterceptsPersec sets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMWRITEEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMWRITEEmulationInterceptsPersec", (value)) +} + +// GetVMWRITEEmulationInterceptsPersec gets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMWRITEEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEInstructionEmulationCost sets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMWRITEInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMWRITEInstructionEmulationCost", (value)) +} + +// GetVMWRITEInstructionEmulationCost gets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMWRITEInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFEmulationInterceptsPersec sets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXOFFEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXOFFEmulationInterceptsPersec", (value)) +} + +// GetVMXOFFEmulationInterceptsPersec gets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXOFFEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFInstructionEmulationCost sets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXOFFInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXOFFInstructionEmulationCost", (value)) +} + +// GetVMXOFFInstructionEmulationCost gets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXOFFInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONEmulationInterceptsPersec sets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXONEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXONEmulationInterceptsPersec", (value)) +} + +// GetVMXONEmulationInterceptsPersec gets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXONEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONInstructionEmulationCost sets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXONInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXONInstructionEmulationCost", (value)) +} + +// GetVMXONInstructionEmulationCost gets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXONInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor.go new file mode 100644 index 00000000..0fe3b840 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor.go @@ -0,0 +1,4520 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor struct +type Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor struct { + *Win32_PerfFormattedData + + // + AddressDomainFlushesPersec uint64 + + // + AddressSpaceEvictionsPersec uint64 + + // + AddressSpaceFlushesPersec uint64 + + // + AddressSpaceSwitchesPersec uint64 + + // + APICEOIAccessesPersec uint64 + + // + APICIPIsSentPersec uint64 + + // + APICMMIOAccessesPersec uint64 + + // + APICSelfIPIsSentPersec uint64 + + // + APICTPRAccessesPersec uint64 + + // + ControlRegisterAccessesCost uint64 + + // + ControlRegisterAccessesForwardedPersec uint64 + + // + ControlRegisterAccessesForwardingCost uint64 + + // + ControlRegisterAccessesPersec uint64 + + // + CPUIDInstructionsCost uint64 + + // + CPUIDInstructionsForwardedPersec uint64 + + // + CPUIDInstructionsForwardingCost uint64 + + // + CPUIDInstructionsPersec uint64 + + // + CPUWaitTimePerDispatch uint64 + + // + DebugRegisterAccessesCost uint64 + + // + DebugRegisterAccessesForwardedPersec uint64 + + // + DebugRegisterAccessesForwardingCost uint64 + + // + DebugRegisterAccessesPersec uint64 + + // + EmulatedInstructionsCost uint64 + + // + EmulatedInstructionsForwardedPersec uint64 + + // + EmulatedInstructionsForwardingCost uint64 + + // + EmulatedInstructionsPersec uint64 + + // + ExtendedHypercallInterceptMessagesPersec uint64 + + // + ExtendedHypercallsPersec uint64 + + // + ExternalInterruptsCost uint64 + + // + ExternalInterruptsForwardedPersec uint64 + + // + ExternalInterruptsPersec uint64 + + // + FlushPhysicalAddressListHypercallsPersec uint64 + + // + FlushPhysicalAddressSpaceHypercallsPersec uint64 + + // + GlobalGVARangeFlushesPersec uint64 + + // + GlobalIOTLBFlushCost uint64 + + // + GlobalIOTLBFlushesPersec uint64 + + // + GPASpaceHypercallsPersec uint64 + + // + GuestPageTableMapsPersec uint64 + + // + HardwareInterruptsPersec uint64 + + // + HLTInstructionsCost uint64 + + // + HLTInstructionsForwardedPersec uint64 + + // + HLTInstructionsForwardingCost uint64 + + // + HLTInstructionsPersec uint64 + + // + HypercallsCost uint64 + + // + HypercallsForwardedPersec uint64 + + // + HypercallsForwardingCost uint64 + + // + HypercallsPersec uint64 + + // + InvEptAllContextEmulationInterceptsPersec uint64 + + // + InvEptAllContextInstructionEmulationCost uint64 + + // + InvEptSingleContextEmulationInterceptsPersec uint64 + + // + InvEptSingleContextInstructionEmulationCost uint64 + + // + InvVpidAllContextEmulationInterceptsPersec uint64 + + // + InvVpidAllContextInstructionEmulationCost uint64 + + // + InvVpidSingleAddressEmulationInterceptsPersec uint64 + + // + InvVpidSingleAddressInstructionEmulationCost uint64 + + // + InvVpidSingleContextEmulationInterceptsPersec uint64 + + // + InvVpidSingleContextInstructionEmulationCost uint64 + + // + IOInstructionsCost uint64 + + // + IOInstructionsForwardedPersec uint64 + + // + IOInstructionsForwardingCost uint64 + + // + IOInstructionsPersec uint64 + + // + IOInterceptMessagesPersec uint64 + + // + LargePageTLBFillsPersec uint64 + + // + LocalFlushedGVARangesPersec uint64 + + // + LocalIOTLBFlushCost uint64 + + // + LocalIOTLBFlushesPersec uint64 + + // + LogicalProcessorDispatchesPersec uint64 + + // + LogicalProcessorHypercallsPersec uint64 + + // + LogicalProcessorMigrationsPersec uint64 + + // + LongSpinWaitHypercallsPersec uint64 + + // + MBECNestedPageTableSwitchesPersec uint64 + + // + MemoryInterceptMessagesPersec uint64 + + // + MSRAccessesCost uint64 + + // + MSRAccessesForwardedPersec uint64 + + // + MSRAccessesForwardingCost uint64 + + // + MSRAccessesPersec uint64 + + // + MWAITInstructionsCost uint64 + + // + MWAITInstructionsForwardedPersec uint64 + + // + MWAITInstructionsForwardingCost uint64 + + // + MWAITInstructionsPersec uint64 + + // + NestedPageFaultInterceptsCost uint64 + + // + NestedPageFaultInterceptsPersec uint64 + + // + NestedSLATHardPageFaultsCost uint64 + + // + NestedSLATHardPageFaultsPersec uint64 + + // + NestedSLATSoftPageFaultsCost uint64 + + // + NestedSLATSoftPageFaultsPersec uint64 + + // + NestedTLBPageTableEvictionsPersec uint64 + + // + NestedTLBPageTableReclamationsPersec uint64 + + // + NestedVMEntriesCost uint64 + + // + NestedVMEntriesPersec uint64 + + // + OtherHypercallsPersec uint64 + + // + OtherInterceptsCost uint64 + + // + OtherInterceptsForwardedPersec uint64 + + // + OtherInterceptsForwardingCost uint64 + + // + OtherInterceptsPersec uint64 + + // + OtherMessagesPersec uint64 + + // + OtherReflectedGuestExceptionsPersec uint64 + + // + PageFaultInterceptsCost uint64 + + // + PageFaultInterceptsForwardedPersec uint64 + + // + PageFaultInterceptsForwardingCost uint64 + + // + PageFaultInterceptsPersec uint64 + + // + PageInvalidationsCost uint64 + + // + PageInvalidationsForwardedPersec uint64 + + // + PageInvalidationsForwardingCost uint64 + + // + PageInvalidationsPersec uint64 + + // + PageScansPersec uint64 + + // + PageTableAllocationsPersec uint64 + + // + PageTableEvictionsPersec uint64 + + // + PageTableReclamationsPersec uint64 + + // + PageTableResetsPersec uint64 + + // + PageTableValidationsPersec uint64 + + // + PageTableWriteInterceptsPersec uint64 + + // + PendingInterruptsCost uint64 + + // + PendingInterruptsForwardedPersec uint64 + + // + PendingInterruptsForwardingCost uint64 + + // + PendingInterruptsPersec uint64 + + // + PercentGuestRunTime uint64 + + // + PercentHypervisorRunTime uint64 + + // + PercentRemoteRunTime uint64 + + // + PercentTotalRunTime uint64 + + // + PostedInterruptNotificationsPersec uint64 + + // + PostedInterruptScansPersec uint64 + + // + ReflectedGuestPageFaultsPersec uint64 + + // + SmallPageTLBFillsPersec uint64 + + // + SyntheticInterruptHypercallsPersec uint64 + + // + SyntheticInterruptsPersec uint64 + + // + TotalInterceptsCost uint64 + + // + TotalInterceptsPersec uint64 + + // + TotalMessagesPersec uint64 + + // + TotalVirtualizationInstructionsEmulatedPersec uint64 + + // + TotalVirtualizationInstructionsEmulationCost uint64 + + // + VirtualInterruptHypercallsPersec uint64 + + // + VirtualInterruptsPersec uint64 + + // + VirtualMMUHypercallsPersec uint64 + + // + VirtualProcessorHypercallsPersec uint64 + + // + VMCLEAREmulationInterceptsPersec uint64 + + // + VMCLEARInstructionEmulationCost uint64 + + // + VMPTRLDEmulationInterceptsPersec uint64 + + // + VMPTRLDInstructionEmulationCost uint64 + + // + VMPTRSTEmulationInterceptsPersec uint64 + + // + VMPTRSTInstructionEmulationCost uint64 + + // + VMREADEmulationInterceptsPersec uint64 + + // + VMREADInstructionEmulationCost uint64 + + // + VMWRITEEmulationInterceptsPersec uint64 + + // + VMWRITEInstructionEmulationCost uint64 + + // + VMXOFFEmulationInterceptsPersec uint64 + + // + VMXOFFInstructionEmulationCost uint64 + + // + VMXONEmulationInterceptsPersec uint64 + + // + VMXONInstructionEmulationCost uint64 +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAddressDomainFlushesPersec sets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressDomainFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressDomainFlushesPersec", (value)) +} + +// GetAddressDomainFlushesPersec gets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressDomainFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressDomainFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceEvictionsPersec sets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressSpaceEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceEvictionsPersec", (value)) +} + +// GetAddressSpaceEvictionsPersec gets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressSpaceEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceFlushesPersec sets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressSpaceFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceFlushesPersec", (value)) +} + +// GetAddressSpaceFlushesPersec gets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressSpaceFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceSwitchesPersec sets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressSpaceSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceSwitchesPersec", (value)) +} + +// GetAddressSpaceSwitchesPersec gets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressSpaceSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICEOIAccessesPersec sets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICEOIAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICEOIAccessesPersec", (value)) +} + +// GetAPICEOIAccessesPersec gets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICEOIAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICEOIAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICIPIsSentPersec sets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICIPIsSentPersec", (value)) +} + +// GetAPICIPIsSentPersec gets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICMMIOAccessesPersec sets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICMMIOAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICMMIOAccessesPersec", (value)) +} + +// GetAPICMMIOAccessesPersec gets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICMMIOAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICMMIOAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICSelfIPIsSentPersec sets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICSelfIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICSelfIPIsSentPersec", (value)) +} + +// GetAPICSelfIPIsSentPersec gets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICSelfIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICSelfIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICTPRAccessesPersec sets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICTPRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICTPRAccessesPersec", (value)) +} + +// GetAPICTPRAccessesPersec gets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICTPRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICTPRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesCost sets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesCost", (value)) +} + +// GetControlRegisterAccessesCost gets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardedPersec sets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardedPersec", (value)) +} + +// GetControlRegisterAccessesForwardedPersec gets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardingCost sets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardingCost", (value)) +} + +// GetControlRegisterAccessesForwardingCost gets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesPersec sets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesPersec", (value)) +} + +// GetControlRegisterAccessesPersec gets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsCost sets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsCost", (value)) +} + +// GetCPUIDInstructionsCost gets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardedPersec sets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardedPersec", (value)) +} + +// GetCPUIDInstructionsForwardedPersec gets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardingCost sets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardingCost", (value)) +} + +// GetCPUIDInstructionsForwardingCost gets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsPersec sets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsPersec", (value)) +} + +// GetCPUIDInstructionsPersec gets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUWaitTimePerDispatch sets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUWaitTimePerDispatch(value uint64) (err error) { + return instance.SetProperty("CPUWaitTimePerDispatch", (value)) +} + +// GetCPUWaitTimePerDispatch gets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUWaitTimePerDispatch() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUWaitTimePerDispatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesCost sets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesCost", (value)) +} + +// GetDebugRegisterAccessesCost gets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardedPersec sets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardedPersec", (value)) +} + +// GetDebugRegisterAccessesForwardedPersec gets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardingCost sets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardingCost", (value)) +} + +// GetDebugRegisterAccessesForwardingCost gets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesPersec sets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesPersec", (value)) +} + +// GetDebugRegisterAccessesPersec gets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsCost sets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsCost", (value)) +} + +// GetEmulatedInstructionsCost gets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardedPersec sets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardedPersec", (value)) +} + +// GetEmulatedInstructionsForwardedPersec gets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardingCost sets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardingCost", (value)) +} + +// GetEmulatedInstructionsForwardingCost gets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsPersec sets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsPersec", (value)) +} + +// GetEmulatedInstructionsPersec gets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallInterceptMessagesPersec sets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExtendedHypercallInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallInterceptMessagesPersec", (value)) +} + +// GetExtendedHypercallInterceptMessagesPersec gets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExtendedHypercallInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallsPersec sets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExtendedHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallsPersec", (value)) +} + +// GetExtendedHypercallsPersec gets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExtendedHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsCost sets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsCost(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsCost", (value)) +} + +// GetExternalInterruptsCost gets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsForwardedPersec sets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsForwardedPersec", (value)) +} + +// GetExternalInterruptsForwardedPersec gets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsPersec sets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsPersec", (value)) +} + +// GetExternalInterruptsPersec gets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressListHypercallsPersec sets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyFlushPhysicalAddressListHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressListHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressListHypercallsPersec gets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyFlushPhysicalAddressListHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressListHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressSpaceHypercallsPersec sets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyFlushPhysicalAddressSpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressSpaceHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressSpaceHypercallsPersec gets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyFlushPhysicalAddressSpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressSpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalGVARangeFlushesPersec sets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalGVARangeFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalGVARangeFlushesPersec", (value)) +} + +// GetGlobalGVARangeFlushesPersec gets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalGVARangeFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalGVARangeFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushCost sets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushCost", (value)) +} + +// GetGlobalIOTLBFlushCost gets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushesPersec sets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushesPersec", (value)) +} + +// GetGlobalIOTLBFlushesPersec gets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceHypercallsPersec sets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGPASpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceHypercallsPersec", (value)) +} + +// GetGPASpaceHypercallsPersec gets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGPASpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGuestPageTableMapsPersec sets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGuestPageTableMapsPersec(value uint64) (err error) { + return instance.SetProperty("GuestPageTableMapsPersec", (value)) +} + +// GetGuestPageTableMapsPersec gets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGuestPageTableMapsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GuestPageTableMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHardwareInterruptsPersec sets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHardwareInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("HardwareInterruptsPersec", (value)) +} + +// GetHardwareInterruptsPersec gets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHardwareInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HardwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsCost sets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsCost", (value)) +} + +// GetHLTInstructionsCost gets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardedPersec sets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardedPersec", (value)) +} + +// GetHLTInstructionsForwardedPersec gets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardingCost sets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardingCost", (value)) +} + +// GetHLTInstructionsForwardingCost gets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsPersec sets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsPersec", (value)) +} + +// GetHLTInstructionsPersec gets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsCost sets the value of HypercallsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsCost(value uint64) (err error) { + return instance.SetProperty("HypercallsCost", (value)) +} + +// GetHypercallsCost gets the value of HypercallsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardedPersec sets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardedPersec", (value)) +} + +// GetHypercallsForwardedPersec gets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardingCost sets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardingCost", (value)) +} + +// GetHypercallsForwardingCost gets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsPersec sets the value of HypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsPersec", (value)) +} + +// GetHypercallsPersec gets the value of HypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextEmulationInterceptsPersec sets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptAllContextEmulationInterceptsPersec gets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextInstructionEmulationCost sets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextInstructionEmulationCost", (value)) +} + +// GetInvEptAllContextInstructionEmulationCost gets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextEmulationInterceptsPersec sets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptSingleContextEmulationInterceptsPersec gets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextInstructionEmulationCost sets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextInstructionEmulationCost", (value)) +} + +// GetInvEptSingleContextInstructionEmulationCost gets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextEmulationInterceptsPersec sets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidAllContextEmulationInterceptsPersec gets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextInstructionEmulationCost sets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextInstructionEmulationCost", (value)) +} + +// GetInvVpidAllContextInstructionEmulationCost gets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressEmulationInterceptsPersec sets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleAddressEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleAddressEmulationInterceptsPersec gets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleAddressEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressInstructionEmulationCost sets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleAddressInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleAddressInstructionEmulationCost gets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleAddressInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextEmulationInterceptsPersec sets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleContextEmulationInterceptsPersec gets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextInstructionEmulationCost sets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleContextInstructionEmulationCost gets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsCost sets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsCost", (value)) +} + +// GetIOInstructionsCost gets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardedPersec sets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardedPersec", (value)) +} + +// GetIOInstructionsForwardedPersec gets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardingCost sets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardingCost", (value)) +} + +// GetIOInstructionsForwardingCost gets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsPersec sets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsPersec", (value)) +} + +// GetIOInstructionsPersec gets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInterceptMessagesPersec sets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("IOInterceptMessagesPersec", (value)) +} + +// GetIOInterceptMessagesPersec gets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLargePageTLBFillsPersec sets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLargePageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("LargePageTLBFillsPersec", (value)) +} + +// GetLargePageTLBFillsPersec gets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLargePageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LargePageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalFlushedGVARangesPersec sets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalFlushedGVARangesPersec(value uint64) (err error) { + return instance.SetProperty("LocalFlushedGVARangesPersec", (value)) +} + +// GetLocalFlushedGVARangesPersec gets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalFlushedGVARangesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalFlushedGVARangesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushCost sets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushCost", (value)) +} + +// GetLocalIOTLBFlushCost gets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushesPersec sets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushesPersec", (value)) +} + +// GetLocalIOTLBFlushesPersec gets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorDispatchesPersec sets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLogicalProcessorDispatchesPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorDispatchesPersec", (value)) +} + +// GetLogicalProcessorDispatchesPersec gets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLogicalProcessorDispatchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorDispatchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorHypercallsPersec sets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLogicalProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorHypercallsPersec", (value)) +} + +// GetLogicalProcessorHypercallsPersec gets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLogicalProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorMigrationsPersec sets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLogicalProcessorMigrationsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorMigrationsPersec", (value)) +} + +// GetLogicalProcessorMigrationsPersec gets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLogicalProcessorMigrationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorMigrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLongSpinWaitHypercallsPersec sets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLongSpinWaitHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LongSpinWaitHypercallsPersec", (value)) +} + +// GetLongSpinWaitHypercallsPersec gets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLongSpinWaitHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LongSpinWaitHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMBECNestedPageTableSwitchesPersec sets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMBECNestedPageTableSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("MBECNestedPageTableSwitchesPersec", (value)) +} + +// GetMBECNestedPageTableSwitchesPersec gets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMBECNestedPageTableSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MBECNestedPageTableSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryInterceptMessagesPersec sets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMemoryInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("MemoryInterceptMessagesPersec", (value)) +} + +// GetMemoryInterceptMessagesPersec gets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMemoryInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesCost sets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesCost", (value)) +} + +// GetMSRAccessesCost gets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardedPersec sets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardedPersec", (value)) +} + +// GetMSRAccessesForwardedPersec gets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardingCost sets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardingCost", (value)) +} + +// GetMSRAccessesForwardingCost gets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesPersec sets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesPersec", (value)) +} + +// GetMSRAccessesPersec gets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsCost sets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsCost", (value)) +} + +// GetMWAITInstructionsCost gets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardedPersec sets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardedPersec", (value)) +} + +// GetMWAITInstructionsForwardedPersec gets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardingCost sets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardingCost", (value)) +} + +// GetMWAITInstructionsForwardingCost gets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsPersec sets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsPersec", (value)) +} + +// GetMWAITInstructionsPersec gets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsCost sets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsCost", (value)) +} + +// GetNestedPageFaultInterceptsCost gets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsPersec sets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsPersec", (value)) +} + +// GetNestedPageFaultInterceptsPersec gets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsCost sets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATHardPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsCost", (value)) +} + +// GetNestedSLATHardPageFaultsCost gets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATHardPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsPersec sets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATHardPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsPersec", (value)) +} + +// GetNestedSLATHardPageFaultsPersec gets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATHardPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsCost sets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsCost", (value)) +} + +// GetNestedSLATSoftPageFaultsCost gets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsPersec sets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsPersec", (value)) +} + +// GetNestedSLATSoftPageFaultsPersec gets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableEvictionsPersec sets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedTLBPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableEvictionsPersec", (value)) +} + +// GetNestedTLBPageTableEvictionsPersec gets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedTLBPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableReclamationsPersec sets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedTLBPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableReclamationsPersec", (value)) +} + +// GetNestedTLBPageTableReclamationsPersec gets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedTLBPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesCost sets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedVMEntriesCost(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesCost", (value)) +} + +// GetNestedVMEntriesCost gets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedVMEntriesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesPersec sets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedVMEntriesPersec(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesPersec", (value)) +} + +// GetNestedVMEntriesPersec gets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedVMEntriesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherHypercallsPersec sets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("OtherHypercallsPersec", (value)) +} + +// GetOtherHypercallsPersec gets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsCost sets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsCost", (value)) +} + +// GetOtherInterceptsCost gets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardedPersec sets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardedPersec", (value)) +} + +// GetOtherInterceptsForwardedPersec gets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardingCost sets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardingCost", (value)) +} + +// GetOtherInterceptsForwardingCost gets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsPersec sets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsPersec", (value)) +} + +// GetOtherInterceptsPersec gets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherMessagesPersec sets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherMessagesPersec(value uint64) (err error) { + return instance.SetProperty("OtherMessagesPersec", (value)) +} + +// GetOtherMessagesPersec gets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherReflectedGuestExceptionsPersec sets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherReflectedGuestExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("OtherReflectedGuestExceptionsPersec", (value)) +} + +// GetOtherReflectedGuestExceptionsPersec gets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherReflectedGuestExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherReflectedGuestExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsCost sets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsCost", (value)) +} + +// GetPageFaultInterceptsCost gets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardedPersec sets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardedPersec", (value)) +} + +// GetPageFaultInterceptsForwardedPersec gets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardingCost sets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardingCost", (value)) +} + +// GetPageFaultInterceptsForwardingCost gets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsPersec sets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsPersec", (value)) +} + +// GetPageFaultInterceptsPersec gets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsCost sets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsCost", (value)) +} + +// GetPageInvalidationsCost gets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardedPersec sets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardedPersec", (value)) +} + +// GetPageInvalidationsForwardedPersec gets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardingCost sets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardingCost", (value)) +} + +// GetPageInvalidationsForwardingCost gets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsPersec sets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsPersec", (value)) +} + +// GetPageInvalidationsPersec gets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageScansPersec sets the value of PageScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageScansPersec(value uint64) (err error) { + return instance.SetProperty("PageScansPersec", (value)) +} + +// GetPageScansPersec gets the value of PageScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableAllocationsPersec sets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableAllocationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableAllocationsPersec", (value)) +} + +// GetPageTableAllocationsPersec gets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableAllocationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableAllocationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableEvictionsPersec sets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableEvictionsPersec", (value)) +} + +// GetPageTableEvictionsPersec gets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableReclamationsPersec sets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableReclamationsPersec", (value)) +} + +// GetPageTableReclamationsPersec gets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableResetsPersec sets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableResetsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableResetsPersec", (value)) +} + +// GetPageTableResetsPersec gets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableResetsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableResetsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableValidationsPersec sets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableValidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableValidationsPersec", (value)) +} + +// GetPageTableValidationsPersec gets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableValidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableValidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableWriteInterceptsPersec sets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableWriteInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableWriteInterceptsPersec", (value)) +} + +// GetPageTableWriteInterceptsPersec gets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableWriteInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableWriteInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsCost sets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsCost", (value)) +} + +// GetPendingInterruptsCost gets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardedPersec sets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardedPersec", (value)) +} + +// GetPendingInterruptsForwardedPersec gets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardingCost sets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardingCost", (value)) +} + +// GetPendingInterruptsForwardingCost gets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsPersec sets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsPersec", (value)) +} + +// GetPendingInterruptsPersec gets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime sets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentGuestRunTime(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime", (value)) +} + +// GetPercentGuestRunTime gets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentGuestRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime sets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentHypervisorRunTime(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime", (value)) +} + +// GetPercentHypervisorRunTime gets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentHypervisorRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentRemoteRunTime sets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentRemoteRunTime(value uint64) (err error) { + return instance.SetProperty("PercentRemoteRunTime", (value)) +} + +// GetPercentRemoteRunTime gets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentRemoteRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentRemoteRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime sets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentTotalRunTime(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime", (value)) +} + +// GetPercentTotalRunTime gets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentTotalRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptNotificationsPersec sets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPostedInterruptNotificationsPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptNotificationsPersec", (value)) +} + +// GetPostedInterruptNotificationsPersec gets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPostedInterruptNotificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptNotificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptScansPersec sets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPostedInterruptScansPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptScansPersec", (value)) +} + +// GetPostedInterruptScansPersec gets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPostedInterruptScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReflectedGuestPageFaultsPersec sets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyReflectedGuestPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("ReflectedGuestPageFaultsPersec", (value)) +} + +// GetReflectedGuestPageFaultsPersec gets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyReflectedGuestPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReflectedGuestPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSmallPageTLBFillsPersec sets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertySmallPageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("SmallPageTLBFillsPersec", (value)) +} + +// GetSmallPageTLBFillsPersec gets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertySmallPageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SmallPageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptHypercallsPersec sets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertySyntheticInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptHypercallsPersec", (value)) +} + +// GetSyntheticInterruptHypercallsPersec gets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertySyntheticInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptsPersec sets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertySyntheticInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptsPersec", (value)) +} + +// GetSyntheticInterruptsPersec gets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertySyntheticInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsCost sets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalInterceptsCost(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsCost", (value)) +} + +// GetTotalInterceptsCost gets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsPersec sets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsPersec", (value)) +} + +// GetTotalInterceptsPersec gets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalMessagesPersec sets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalMessagesPersec(value uint64) (err error) { + return instance.SetProperty("TotalMessagesPersec", (value)) +} + +// GetTotalMessagesPersec gets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulatedPersec sets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulatedPersec(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulatedPersec", (value)) +} + +// GetTotalVirtualizationInstructionsEmulatedPersec gets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulatedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulationCost sets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulationCost(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulationCost", (value)) +} + +// GetTotalVirtualizationInstructionsEmulationCost gets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptHypercallsPersec sets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptHypercallsPersec", (value)) +} + +// GetVirtualInterruptHypercallsPersec gets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptsPersec sets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptsPersec", (value)) +} + +// GetVirtualInterruptsPersec gets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualMMUHypercallsPersec sets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualMMUHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualMMUHypercallsPersec", (value)) +} + +// GetVirtualMMUHypercallsPersec gets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualMMUHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualMMUHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessorHypercallsPersec sets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualProcessorHypercallsPersec", (value)) +} + +// GetVirtualProcessorHypercallsPersec gets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEAREmulationInterceptsPersec sets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMCLEAREmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMCLEAREmulationInterceptsPersec", (value)) +} + +// GetVMCLEAREmulationInterceptsPersec gets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMCLEAREmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEAREmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEARInstructionEmulationCost sets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMCLEARInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMCLEARInstructionEmulationCost", (value)) +} + +// GetVMCLEARInstructionEmulationCost gets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMCLEARInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEARInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDEmulationInterceptsPersec sets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRLDEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRLDEmulationInterceptsPersec", (value)) +} + +// GetVMPTRLDEmulationInterceptsPersec gets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRLDEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDInstructionEmulationCost sets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRLDInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRLDInstructionEmulationCost", (value)) +} + +// GetVMPTRLDInstructionEmulationCost gets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRLDInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTEmulationInterceptsPersec sets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRSTEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRSTEmulationInterceptsPersec", (value)) +} + +// GetVMPTRSTEmulationInterceptsPersec gets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRSTEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTInstructionEmulationCost sets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRSTInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRSTInstructionEmulationCost", (value)) +} + +// GetVMPTRSTInstructionEmulationCost gets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRSTInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADEmulationInterceptsPersec sets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMREADEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMREADEmulationInterceptsPersec", (value)) +} + +// GetVMREADEmulationInterceptsPersec gets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMREADEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADInstructionEmulationCost sets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMREADInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMREADInstructionEmulationCost", (value)) +} + +// GetVMREADInstructionEmulationCost gets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMREADInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEEmulationInterceptsPersec sets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMWRITEEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMWRITEEmulationInterceptsPersec", (value)) +} + +// GetVMWRITEEmulationInterceptsPersec gets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMWRITEEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEInstructionEmulationCost sets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMWRITEInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMWRITEInstructionEmulationCost", (value)) +} + +// GetVMWRITEInstructionEmulationCost gets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMWRITEInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFEmulationInterceptsPersec sets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXOFFEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXOFFEmulationInterceptsPersec", (value)) +} + +// GetVMXOFFEmulationInterceptsPersec gets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXOFFEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFInstructionEmulationCost sets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXOFFInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXOFFInstructionEmulationCost", (value)) +} + +// GetVMXOFFInstructionEmulationCost gets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXOFFInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONEmulationInterceptsPersec sets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXONEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXONEmulationInterceptsPersec", (value)) +} + +// GetVMXONEmulationInterceptsPersec gets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXONEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONInstructionEmulationCost sets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXONInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXONInstructionEmulationCost", (value)) +} + +// GetVMXONInstructionEmulationCost gets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXONInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM.go new file mode 100644 index 00000000..45f1f70b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM struct +type Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM struct { + *Win32_PerfFormattedData + + // + AverageReplicationLatency uint64 + + // + AverageReplicationSize uint64 + + // + CompressionEfficiency uint64 + + // + LastReplicationSize uint64 + + // + NetworkBytesRecv uint64 + + // + NetworkBytesSent uint64 + + // + ReplicationCount uint32 + + // + ReplicationLatency uint64 + + // + ResynchronizedBytes uint64 +} + +func NewWin32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVMEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVMEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageReplicationLatency sets the value of AverageReplicationLatency for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyAverageReplicationLatency(value uint64) (err error) { + return instance.SetProperty("AverageReplicationLatency", (value)) +} + +// GetAverageReplicationLatency gets the value of AverageReplicationLatency for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyAverageReplicationLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageReplicationLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageReplicationSize sets the value of AverageReplicationSize for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyAverageReplicationSize(value uint64) (err error) { + return instance.SetProperty("AverageReplicationSize", (value)) +} + +// GetAverageReplicationSize gets the value of AverageReplicationSize for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyAverageReplicationSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageReplicationSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressionEfficiency sets the value of CompressionEfficiency for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyCompressionEfficiency(value uint64) (err error) { + return instance.SetProperty("CompressionEfficiency", (value)) +} + +// GetCompressionEfficiency gets the value of CompressionEfficiency for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyCompressionEfficiency() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressionEfficiency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLastReplicationSize sets the value of LastReplicationSize for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyLastReplicationSize(value uint64) (err error) { + return instance.SetProperty("LastReplicationSize", (value)) +} + +// GetLastReplicationSize gets the value of LastReplicationSize for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyLastReplicationSize() (value uint64, err error) { + retValue, err := instance.GetProperty("LastReplicationSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkBytesRecv sets the value of NetworkBytesRecv for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyNetworkBytesRecv(value uint64) (err error) { + return instance.SetProperty("NetworkBytesRecv", (value)) +} + +// GetNetworkBytesRecv gets the value of NetworkBytesRecv for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyNetworkBytesRecv() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkBytesRecv") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkBytesSent sets the value of NetworkBytesSent for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyNetworkBytesSent(value uint64) (err error) { + return instance.SetProperty("NetworkBytesSent", (value)) +} + +// GetNetworkBytesSent gets the value of NetworkBytesSent for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyNetworkBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReplicationCount sets the value of ReplicationCount for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyReplicationCount(value uint32) (err error) { + return instance.SetProperty("ReplicationCount", (value)) +} + +// GetReplicationCount gets the value of ReplicationCount for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyReplicationCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ReplicationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReplicationLatency sets the value of ReplicationLatency for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyReplicationLatency(value uint64) (err error) { + return instance.SetProperty("ReplicationLatency", (value)) +} + +// GetReplicationLatency gets the value of ReplicationLatency for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyReplicationLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("ReplicationLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResynchronizedBytes sets the value of ResynchronizedBytes for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyResynchronizedBytes(value uint64) (err error) { + return instance.SetProperty("ResynchronizedBytes", (value)) +} + +// GetResynchronizedBytes gets the value of ResynchronizedBytes for the instance +func (instance *Win32_PerfFormattedData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyResynchronizedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ResynchronizedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration.go new file mode 100644 index 00000000..736cacf3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration.go @@ -0,0 +1,1010 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration struct +type Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration struct { + *Win32_PerfFormattedData + + // + Cacheupdateaveragemilliseconds uint32 + + // + Cacheupdatecount uint32 + + // + Commitaveragemilliseconds uint32 + + // + Commitbytespersecondaverage uint32 + + // + Commitcount uint32 + + // + Compactaveragemilliseconds uint32 + + // + Compactcount uint32 + + // + Configlockacquireaveragemilliseconds uint32 + + // + Configlockcount uint32 + + // + Filelockacquireaveragemilliseconds uint32 + + // + Filelockreleaseaveragemilliseconds uint32 + + // + Getaveragemilliseconds uint32 + + // + Getcount uint32 + + // + Loadfileaveragemilliseconds uint32 + + // + Lockacquireaveragemilliseconds uint32 + + // + Lockcount uint32 + + // + Lockreleaseaveragemilliseconds uint32 + + // + Querysizeaveragesizemilliseconds uint32 + + // + Querysizecount uint32 + + // + Readbytes uint32 + + // + Readbytespersecondaverage uint32 + + // + Readfilebytes uint32 + + // + Readfilebytespersecondaverage uint32 + + // + Readfilecount uint32 + + // + Removeaveragemilliseconds uint32 + + // + Removecount uint32 + + // + Setaveragemilliseconds uint32 + + // + Setcount uint32 + + // + Writebytes uint32 + + // + Writebytespersecondaverage uint32 + + // + Writefilebytes uint32 + + // + Writefilecount uint32 +} + +func NewWin32_PerfFormattedData_HyperVStorageStats_HyperVConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_HyperVStorageStats_HyperVConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCacheupdateaveragemilliseconds sets the value of Cacheupdateaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCacheupdateaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Cacheupdateaveragemilliseconds", (value)) +} + +// GetCacheupdateaveragemilliseconds gets the value of Cacheupdateaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCacheupdateaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Cacheupdateaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheupdatecount sets the value of Cacheupdatecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCacheupdatecount(value uint32) (err error) { + return instance.SetProperty("Cacheupdatecount", (value)) +} + +// GetCacheupdatecount gets the value of Cacheupdatecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCacheupdatecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Cacheupdatecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitaveragemilliseconds sets the value of Commitaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCommitaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Commitaveragemilliseconds", (value)) +} + +// GetCommitaveragemilliseconds gets the value of Commitaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCommitaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Commitaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitbytespersecondaverage sets the value of Commitbytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCommitbytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Commitbytespersecondaverage", (value)) +} + +// GetCommitbytespersecondaverage gets the value of Commitbytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCommitbytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Commitbytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitcount sets the value of Commitcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCommitcount(value uint32) (err error) { + return instance.SetProperty("Commitcount", (value)) +} + +// GetCommitcount gets the value of Commitcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCommitcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Commitcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactaveragemilliseconds sets the value of Compactaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCompactaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Compactaveragemilliseconds", (value)) +} + +// GetCompactaveragemilliseconds gets the value of Compactaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCompactaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactcount sets the value of Compactcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyCompactcount(value uint32) (err error) { + return instance.SetProperty("Compactcount", (value)) +} + +// GetCompactcount gets the value of Compactcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyCompactcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfiglockacquireaveragemilliseconds sets the value of Configlockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyConfiglockacquireaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Configlockacquireaveragemilliseconds", (value)) +} + +// GetConfiglockacquireaveragemilliseconds gets the value of Configlockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyConfiglockacquireaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Configlockacquireaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfiglockcount sets the value of Configlockcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyConfiglockcount(value uint32) (err error) { + return instance.SetProperty("Configlockcount", (value)) +} + +// GetConfiglockcount gets the value of Configlockcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyConfiglockcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Configlockcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilelockacquireaveragemilliseconds sets the value of Filelockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyFilelockacquireaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Filelockacquireaveragemilliseconds", (value)) +} + +// GetFilelockacquireaveragemilliseconds gets the value of Filelockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyFilelockacquireaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Filelockacquireaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilelockreleaseaveragemilliseconds sets the value of Filelockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyFilelockreleaseaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Filelockreleaseaveragemilliseconds", (value)) +} + +// GetFilelockreleaseaveragemilliseconds gets the value of Filelockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyFilelockreleaseaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Filelockreleaseaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGetaveragemilliseconds sets the value of Getaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyGetaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Getaveragemilliseconds", (value)) +} + +// GetGetaveragemilliseconds gets the value of Getaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyGetaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Getaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGetcount sets the value of Getcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyGetcount(value uint32) (err error) { + return instance.SetProperty("Getcount", (value)) +} + +// GetGetcount gets the value of Getcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyGetcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Getcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLoadfileaveragemilliseconds sets the value of Loadfileaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyLoadfileaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Loadfileaveragemilliseconds", (value)) +} + +// GetLoadfileaveragemilliseconds gets the value of Loadfileaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyLoadfileaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Loadfileaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockacquireaveragemilliseconds sets the value of Lockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyLockacquireaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Lockacquireaveragemilliseconds", (value)) +} + +// GetLockacquireaveragemilliseconds gets the value of Lockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyLockacquireaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Lockacquireaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockcount sets the value of Lockcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyLockcount(value uint32) (err error) { + return instance.SetProperty("Lockcount", (value)) +} + +// GetLockcount gets the value of Lockcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyLockcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Lockcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockreleaseaveragemilliseconds sets the value of Lockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyLockreleaseaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Lockreleaseaveragemilliseconds", (value)) +} + +// GetLockreleaseaveragemilliseconds gets the value of Lockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyLockreleaseaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Lockreleaseaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuerysizeaveragesizemilliseconds sets the value of Querysizeaveragesizemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyQuerysizeaveragesizemilliseconds(value uint32) (err error) { + return instance.SetProperty("Querysizeaveragesizemilliseconds", (value)) +} + +// GetQuerysizeaveragesizemilliseconds gets the value of Querysizeaveragesizemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyQuerysizeaveragesizemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Querysizeaveragesizemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuerysizecount sets the value of Querysizecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyQuerysizecount(value uint32) (err error) { + return instance.SetProperty("Querysizecount", (value)) +} + +// GetQuerysizecount gets the value of Querysizecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyQuerysizecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Querysizecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadbytes sets the value of Readbytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadbytes(value uint32) (err error) { + return instance.SetProperty("Readbytes", (value)) +} + +// GetReadbytes gets the value of Readbytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadbytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Readbytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadbytespersecondaverage sets the value of Readbytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadbytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Readbytespersecondaverage", (value)) +} + +// GetReadbytespersecondaverage gets the value of Readbytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadbytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Readbytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadfilebytes sets the value of Readfilebytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadfilebytes(value uint32) (err error) { + return instance.SetProperty("Readfilebytes", (value)) +} + +// GetReadfilebytes gets the value of Readfilebytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadfilebytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Readfilebytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadfilebytespersecondaverage sets the value of Readfilebytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadfilebytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Readfilebytespersecondaverage", (value)) +} + +// GetReadfilebytespersecondaverage gets the value of Readfilebytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadfilebytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Readfilebytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadfilecount sets the value of Readfilecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadfilecount(value uint32) (err error) { + return instance.SetProperty("Readfilecount", (value)) +} + +// GetReadfilecount gets the value of Readfilecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadfilecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Readfilecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoveaveragemilliseconds sets the value of Removeaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyRemoveaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Removeaveragemilliseconds", (value)) +} + +// GetRemoveaveragemilliseconds gets the value of Removeaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyRemoveaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Removeaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemovecount sets the value of Removecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyRemovecount(value uint32) (err error) { + return instance.SetProperty("Removecount", (value)) +} + +// GetRemovecount gets the value of Removecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyRemovecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Removecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSetaveragemilliseconds sets the value of Setaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertySetaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Setaveragemilliseconds", (value)) +} + +// GetSetaveragemilliseconds gets the value of Setaveragemilliseconds for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertySetaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Setaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSetcount sets the value of Setcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertySetcount(value uint32) (err error) { + return instance.SetProperty("Setcount", (value)) +} + +// GetSetcount gets the value of Setcount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertySetcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Setcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritebytes sets the value of Writebytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritebytes(value uint32) (err error) { + return instance.SetProperty("Writebytes", (value)) +} + +// GetWritebytes gets the value of Writebytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritebytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Writebytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritebytespersecondaverage sets the value of Writebytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritebytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Writebytespersecondaverage", (value)) +} + +// GetWritebytespersecondaverage gets the value of Writebytespersecondaverage for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritebytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Writebytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritefilebytes sets the value of Writefilebytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritefilebytes(value uint32) (err error) { + return instance.SetProperty("Writefilebytes", (value)) +} + +// GetWritefilebytes gets the value of Writefilebytes for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritefilebytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Writefilebytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritefilecount sets the value of Writefilecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritefilecount(value uint32) (err error) { + return instance.SetProperty("Writefilecount", (value)) +} + +// GetWritefilecount gets the value of Writefilecount for the instance +func (instance *Win32_PerfFormattedData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritefilecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Writefilecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go new file mode 100644 index 00000000..41eee272 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated struct +type Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated struct { + *Win32_PerfFormattedData + + // + ReadBytesPersec uint64 + + // + ReadSectorsPersec uint64 + + // + WriteBytesPersec uint64 + + // + WrittenSectorsPersec uint64 +} + +func NewWin32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulatedEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadSectorsPersec sets the value of ReadSectorsPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyReadSectorsPersec(value uint64) (err error) { + return instance.SetProperty("ReadSectorsPersec", (value)) +} + +// GetReadSectorsPersec gets the value of ReadSectorsPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyReadSectorsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadSectorsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrittenSectorsPersec sets the value of WrittenSectorsPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyWrittenSectorsPersec(value uint64) (err error) { + return instance.SetProperty("WrittenSectorsPersec", (value)) +} + +// GetWrittenSectorsPersec gets the value of WrittenSectorsPersec for the instance +func (instance *Win32_PerfFormattedData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyWrittenSectorsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WrittenSectorsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperProcess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperProcess.go new file mode 100644 index 00000000..efda691d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperProcess.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_LSM_UserInputDelayperProcess struct +type Win32_PerfFormattedData_LSM_UserInputDelayperProcess struct { + *Win32_PerfFormattedData + + // + MaxInputDelay uint64 +} + +func NewWin32_PerfFormattedData_LSM_UserInputDelayperProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_LSM_UserInputDelayperProcess, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LSM_UserInputDelayperProcess{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_LSM_UserInputDelayperProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_LSM_UserInputDelayperProcess, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LSM_UserInputDelayperProcess{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMaxInputDelay sets the value of MaxInputDelay for the instance +func (instance *Win32_PerfFormattedData_LSM_UserInputDelayperProcess) SetPropertyMaxInputDelay(value uint64) (err error) { + return instance.SetProperty("MaxInputDelay", (value)) +} + +// GetMaxInputDelay gets the value of MaxInputDelay for the instance +func (instance *Win32_PerfFormattedData_LSM_UserInputDelayperProcess) GetPropertyMaxInputDelay() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxInputDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperSession.go new file mode 100644 index 00000000..bdb5c8b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LSM_UserInputDelayperSession.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_LSM_UserInputDelayperSession struct +type Win32_PerfFormattedData_LSM_UserInputDelayperSession struct { + *Win32_PerfFormattedData + + // + MaxInputDelay uint64 +} + +func NewWin32_PerfFormattedData_LSM_UserInputDelayperSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_LSM_UserInputDelayperSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LSM_UserInputDelayperSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_LSM_UserInputDelayperSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_LSM_UserInputDelayperSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LSM_UserInputDelayperSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMaxInputDelay sets the value of MaxInputDelay for the instance +func (instance *Win32_PerfFormattedData_LSM_UserInputDelayperSession) SetPropertyMaxInputDelay(value uint64) (err error) { + return instance.SetProperty("MaxInputDelay", (value)) +} + +// GetMaxInputDelay gets the value of MaxInputDelay for the instance +func (instance *Win32_PerfFormattedData_LSM_UserInputDelayperSession) GetPropertyMaxInputDelay() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxInputDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration.go new file mode 100644 index 00000000..89bb39a0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration.go @@ -0,0 +1,1040 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration struct +type Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration struct { + *Win32_PerfFormattedData + + // + CompressorBytestobeCompressed uint64 + + // + CompressorCompressedBytesSent uint64 + + // + CompressorCompressedBytesSentPersec uint64 + + // + CompressorEnabledThreads uint64 + + // + CompressorMaximumThreads uint64 + + // + MemoryWalkerBytesReadPersec uint64 + + // + MemoryWalkerBytesSentforCompression uint64 + + // + MemoryWalkerBytesSentforCompressionPersec uint64 + + // + MemoryWalkerMaximumThreads uint64 + + // + MemoryWalkerUncompressedBytesSent uint64 + + // + MemoryWalkerUncompressedBytesSentPersec uint64 + + // + ReceiverBytesPendingDecompression uint64 + + // + ReceiverBytesPendingWrite uint64 + + // + ReceiverBytesWrittenPersec uint64 + + // + ReceiverCompressedBytesReceivedPersec uint64 + + // + ReceiverDecompressedBytesPersec uint64 + + // + ReceiverMaximumThreadpoolThreadCount uint64 + + // + ReceiverUncompressedBytesReceivedPersec uint64 + + // + SMBTransportBytesSent uint64 + + // + SMBTransportBytesSentPersec uint64 + + // + SMBTransportPendingSendBytes uint64 + + // + SMBTransportPendingSendCount uint64 + + // + TCPTransportBytesPendingProcessing uint64 + + // + TCPTransportBytesPendingSend uint64 + + // + TCPTransportBytesReceivedPersec uint64 + + // + TCPTransportBytesSentPersec uint64 + + // + TCPTransportPendingSendCount uint64 + + // + TCPTransportPostedReceiveBufferCount uint64 + + // + TCPTransportTotalbuffercount uint64 + + // + TransferpassCPUCap uint64 + + // + TransferpassDirtyPageCount uint64 + + // + TransferPassIsblackout uint64 + + // + TransferPassNumber uint64 +} + +func NewWin32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigrationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCompressorBytestobeCompressed sets the value of CompressorBytestobeCompressed for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorBytestobeCompressed(value uint64) (err error) { + return instance.SetProperty("CompressorBytestobeCompressed", (value)) +} + +// GetCompressorBytestobeCompressed gets the value of CompressorBytestobeCompressed for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorBytestobeCompressed() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorBytestobeCompressed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorCompressedBytesSent sets the value of CompressorCompressedBytesSent for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorCompressedBytesSent(value uint64) (err error) { + return instance.SetProperty("CompressorCompressedBytesSent", (value)) +} + +// GetCompressorCompressedBytesSent gets the value of CompressorCompressedBytesSent for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorCompressedBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorCompressedBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorCompressedBytesSentPersec sets the value of CompressorCompressedBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorCompressedBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("CompressorCompressedBytesSentPersec", (value)) +} + +// GetCompressorCompressedBytesSentPersec gets the value of CompressorCompressedBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorCompressedBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorCompressedBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorEnabledThreads sets the value of CompressorEnabledThreads for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorEnabledThreads(value uint64) (err error) { + return instance.SetProperty("CompressorEnabledThreads", (value)) +} + +// GetCompressorEnabledThreads gets the value of CompressorEnabledThreads for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorEnabledThreads() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorEnabledThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorMaximumThreads sets the value of CompressorMaximumThreads for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorMaximumThreads(value uint64) (err error) { + return instance.SetProperty("CompressorMaximumThreads", (value)) +} + +// GetCompressorMaximumThreads gets the value of CompressorMaximumThreads for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorMaximumThreads() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorMaximumThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerBytesReadPersec sets the value of MemoryWalkerBytesReadPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerBytesReadPersec(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerBytesReadPersec", (value)) +} + +// GetMemoryWalkerBytesReadPersec gets the value of MemoryWalkerBytesReadPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerBytesReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerBytesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerBytesSentforCompression sets the value of MemoryWalkerBytesSentforCompression for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerBytesSentforCompression(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerBytesSentforCompression", (value)) +} + +// GetMemoryWalkerBytesSentforCompression gets the value of MemoryWalkerBytesSentforCompression for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerBytesSentforCompression() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerBytesSentforCompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerBytesSentforCompressionPersec sets the value of MemoryWalkerBytesSentforCompressionPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerBytesSentforCompressionPersec(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerBytesSentforCompressionPersec", (value)) +} + +// GetMemoryWalkerBytesSentforCompressionPersec gets the value of MemoryWalkerBytesSentforCompressionPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerBytesSentforCompressionPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerBytesSentforCompressionPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerMaximumThreads sets the value of MemoryWalkerMaximumThreads for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerMaximumThreads(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerMaximumThreads", (value)) +} + +// GetMemoryWalkerMaximumThreads gets the value of MemoryWalkerMaximumThreads for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerMaximumThreads() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerMaximumThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerUncompressedBytesSent sets the value of MemoryWalkerUncompressedBytesSent for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerUncompressedBytesSent(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerUncompressedBytesSent", (value)) +} + +// GetMemoryWalkerUncompressedBytesSent gets the value of MemoryWalkerUncompressedBytesSent for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerUncompressedBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerUncompressedBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerUncompressedBytesSentPersec sets the value of MemoryWalkerUncompressedBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerUncompressedBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerUncompressedBytesSentPersec", (value)) +} + +// GetMemoryWalkerUncompressedBytesSentPersec gets the value of MemoryWalkerUncompressedBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerUncompressedBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerUncompressedBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverBytesPendingDecompression sets the value of ReceiverBytesPendingDecompression for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverBytesPendingDecompression(value uint64) (err error) { + return instance.SetProperty("ReceiverBytesPendingDecompression", (value)) +} + +// GetReceiverBytesPendingDecompression gets the value of ReceiverBytesPendingDecompression for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverBytesPendingDecompression() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverBytesPendingDecompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverBytesPendingWrite sets the value of ReceiverBytesPendingWrite for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverBytesPendingWrite(value uint64) (err error) { + return instance.SetProperty("ReceiverBytesPendingWrite", (value)) +} + +// GetReceiverBytesPendingWrite gets the value of ReceiverBytesPendingWrite for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverBytesPendingWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverBytesPendingWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverBytesWrittenPersec sets the value of ReceiverBytesWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverBytesWrittenPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverBytesWrittenPersec", (value)) +} + +// GetReceiverBytesWrittenPersec gets the value of ReceiverBytesWrittenPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverBytesWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverBytesWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverCompressedBytesReceivedPersec sets the value of ReceiverCompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverCompressedBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverCompressedBytesReceivedPersec", (value)) +} + +// GetReceiverCompressedBytesReceivedPersec gets the value of ReceiverCompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverCompressedBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverCompressedBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverDecompressedBytesPersec sets the value of ReceiverDecompressedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverDecompressedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverDecompressedBytesPersec", (value)) +} + +// GetReceiverDecompressedBytesPersec gets the value of ReceiverDecompressedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverDecompressedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverDecompressedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverMaximumThreadpoolThreadCount sets the value of ReceiverMaximumThreadpoolThreadCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverMaximumThreadpoolThreadCount(value uint64) (err error) { + return instance.SetProperty("ReceiverMaximumThreadpoolThreadCount", (value)) +} + +// GetReceiverMaximumThreadpoolThreadCount gets the value of ReceiverMaximumThreadpoolThreadCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverMaximumThreadpoolThreadCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverMaximumThreadpoolThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverUncompressedBytesReceivedPersec sets the value of ReceiverUncompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverUncompressedBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverUncompressedBytesReceivedPersec", (value)) +} + +// GetReceiverUncompressedBytesReceivedPersec gets the value of ReceiverUncompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverUncompressedBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverUncompressedBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportBytesSent sets the value of SMBTransportBytesSent for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportBytesSent(value uint64) (err error) { + return instance.SetProperty("SMBTransportBytesSent", (value)) +} + +// GetSMBTransportBytesSent gets the value of SMBTransportBytesSent for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportBytesSentPersec sets the value of SMBTransportBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("SMBTransportBytesSentPersec", (value)) +} + +// GetSMBTransportBytesSentPersec gets the value of SMBTransportBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportPendingSendBytes sets the value of SMBTransportPendingSendBytes for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportPendingSendBytes(value uint64) (err error) { + return instance.SetProperty("SMBTransportPendingSendBytes", (value)) +} + +// GetSMBTransportPendingSendBytes gets the value of SMBTransportPendingSendBytes for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportPendingSendBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportPendingSendBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportPendingSendCount sets the value of SMBTransportPendingSendCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportPendingSendCount(value uint64) (err error) { + return instance.SetProperty("SMBTransportPendingSendCount", (value)) +} + +// GetSMBTransportPendingSendCount gets the value of SMBTransportPendingSendCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportPendingSendCount() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportPendingSendCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesPendingProcessing sets the value of TCPTransportBytesPendingProcessing for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesPendingProcessing(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesPendingProcessing", (value)) +} + +// GetTCPTransportBytesPendingProcessing gets the value of TCPTransportBytesPendingProcessing for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesPendingProcessing() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesPendingProcessing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesPendingSend sets the value of TCPTransportBytesPendingSend for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesPendingSend(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesPendingSend", (value)) +} + +// GetTCPTransportBytesPendingSend gets the value of TCPTransportBytesPendingSend for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesPendingSend() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesPendingSend") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesReceivedPersec sets the value of TCPTransportBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesReceivedPersec", (value)) +} + +// GetTCPTransportBytesReceivedPersec gets the value of TCPTransportBytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesSentPersec sets the value of TCPTransportBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesSentPersec", (value)) +} + +// GetTCPTransportBytesSentPersec gets the value of TCPTransportBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportPendingSendCount sets the value of TCPTransportPendingSendCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportPendingSendCount(value uint64) (err error) { + return instance.SetProperty("TCPTransportPendingSendCount", (value)) +} + +// GetTCPTransportPendingSendCount gets the value of TCPTransportPendingSendCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportPendingSendCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportPendingSendCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportPostedReceiveBufferCount sets the value of TCPTransportPostedReceiveBufferCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportPostedReceiveBufferCount(value uint64) (err error) { + return instance.SetProperty("TCPTransportPostedReceiveBufferCount", (value)) +} + +// GetTCPTransportPostedReceiveBufferCount gets the value of TCPTransportPostedReceiveBufferCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportPostedReceiveBufferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportPostedReceiveBufferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportTotalbuffercount sets the value of TCPTransportTotalbuffercount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportTotalbuffercount(value uint64) (err error) { + return instance.SetProperty("TCPTransportTotalbuffercount", (value)) +} + +// GetTCPTransportTotalbuffercount gets the value of TCPTransportTotalbuffercount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportTotalbuffercount() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportTotalbuffercount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferpassCPUCap sets the value of TransferpassCPUCap for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferpassCPUCap(value uint64) (err error) { + return instance.SetProperty("TransferpassCPUCap", (value)) +} + +// GetTransferpassCPUCap gets the value of TransferpassCPUCap for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferpassCPUCap() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferpassCPUCap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferpassDirtyPageCount sets the value of TransferpassDirtyPageCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferpassDirtyPageCount(value uint64) (err error) { + return instance.SetProperty("TransferpassDirtyPageCount", (value)) +} + +// GetTransferpassDirtyPageCount gets the value of TransferpassDirtyPageCount for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferpassDirtyPageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferpassDirtyPageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferPassIsblackout sets the value of TransferPassIsblackout for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferPassIsblackout(value uint64) (err error) { + return instance.SetProperty("TransferPassIsblackout", (value)) +} + +// GetTransferPassIsblackout gets the value of TransferPassIsblackout for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferPassIsblackout() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferPassIsblackout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferPassNumber sets the value of TransferPassNumber for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferPassNumber(value uint64) (err error) { + return instance.SetProperty("TransferPassNumber", (value)) +} + +// GetTransferPassNumber gets the value of TransferPassNumber for the instance +func (instance *Win32_PerfFormattedData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferPassNumber() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferPassNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LocalSessionManager_TerminalServices.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LocalSessionManager_TerminalServices.go new file mode 100644 index 00000000..69b4decb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_LocalSessionManager_TerminalServices.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_LocalSessionManager_TerminalServices struct +type Win32_PerfFormattedData_LocalSessionManager_TerminalServices struct { + *Win32_PerfFormattedData + + // + ActiveSessions uint32 + + // + InactiveSessions uint32 + + // + TotalSessions uint32 +} + +func NewWin32_PerfFormattedData_LocalSessionManager_TerminalServicesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LocalSessionManager_TerminalServices{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_LocalSessionManager_TerminalServicesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_LocalSessionManager_TerminalServices{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveSessions sets the value of ActiveSessions for the instance +func (instance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices) SetPropertyActiveSessions(value uint32) (err error) { + return instance.SetProperty("ActiveSessions", (value)) +} + +// GetActiveSessions gets the value of ActiveSessions for the instance +func (instance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices) GetPropertyActiveSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInactiveSessions sets the value of InactiveSessions for the instance +func (instance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices) SetPropertyInactiveSessions(value uint32) (err error) { + return instance.SetProperty("InactiveSessions", (value)) +} + +// GetInactiveSessions gets the value of InactiveSessions for the instance +func (instance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices) GetPropertyInactiveSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("InactiveSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSessions sets the value of TotalSessions for the instance +func (instance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices) SetPropertyTotalSessions(value uint32) (err error) { + return instance.SetProperty("TotalSessions", (value)) +} + +// GetTotalSessions gets the value of TotalSessions for the instance +func (instance *Win32_PerfFormattedData_LocalSessionManager_TerminalServices) GetPropertyTotalSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics.go new file mode 100644 index 00000000..b6c348cb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics struct +type Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics struct { + *Win32_PerfFormattedData + + // + ContextHandles uint32 + + // + CredentialHandles uint32 +} + +func NewWin32_PerfFormattedData_Lsa_SecurityPerProcessStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Lsa_SecurityPerProcessStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetContextHandles sets the value of ContextHandles for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics) SetPropertyContextHandles(value uint32) (err error) { + return instance.SetProperty("ContextHandles", (value)) +} + +// GetContextHandles gets the value of ContextHandles for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics) GetPropertyContextHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCredentialHandles sets the value of CredentialHandles for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics) SetPropertyCredentialHandles(value uint32) (err error) { + return instance.SetProperty("CredentialHandles", (value)) +} + +// GetCredentialHandles gets the value of CredentialHandles for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecurityPerProcessStatistics) GetPropertyCredentialHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("CredentialHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics.go new file mode 100644 index 00000000..2c11fdad --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics struct +type Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics struct { + *Win32_PerfFormattedData + + // + ActiveSchannelSessionCacheEntries uint32 + + // + DigestAuthentications uint32 + + // + ForwardedKerberosRequests uint32 + + // + KDCarmoredASRequests uint32 + + // + KDCarmoredTGSRequests uint32 + + // + KDCASRequests uint32 + + // + KDCclaimsawareASRequests uint32 + + // + KDCclaimsawareserviceassertedidentityTGSrequests uint32 + + // + KDCclaimsawareTGSRequests uint32 + + // + KDCclassictypeconstraineddelegationTGSRequests uint32 + + // + KDCkeytrustASRequests uint32 + + // + KDCresourcetypeconstraineddelegationTGSRequests uint32 + + // + KDCTGSRequests uint32 + + // + KerberosAuthentications uint32 + + // + NTLMAuthentications uint32 + + // + SchannelSessionCacheEntries uint32 + + // + SSLClientSideFullHandshakes uint32 + + // + SSLClientSideReconnectHandshakes uint32 + + // + SSLServerSideFullHandshakes uint32 + + // + SSLServerSideReconnectHandshakes uint32 +} + +func NewWin32_PerfFormattedData_Lsa_SecuritySystemWideStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Lsa_SecuritySystemWideStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveSchannelSessionCacheEntries sets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyActiveSchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("ActiveSchannelSessionCacheEntries", (value)) +} + +// GetActiveSchannelSessionCacheEntries gets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyActiveSchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSchannelSessionCacheEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDigestAuthentications sets the value of DigestAuthentications for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyDigestAuthentications(value uint32) (err error) { + return instance.SetProperty("DigestAuthentications", (value)) +} + +// GetDigestAuthentications gets the value of DigestAuthentications for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyDigestAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("DigestAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForwardedKerberosRequests sets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyForwardedKerberosRequests(value uint32) (err error) { + return instance.SetProperty("ForwardedKerberosRequests", (value)) +} + +// GetForwardedKerberosRequests gets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyForwardedKerberosRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("ForwardedKerberosRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCarmoredASRequests sets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCarmoredASRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredASRequests", (value)) +} + +// GetKDCarmoredASRequests gets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCarmoredASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCarmoredTGSRequests sets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCarmoredTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredTGSRequests", (value)) +} + +// GetKDCarmoredTGSRequests gets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCarmoredTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCASRequests sets the value of KDCASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCASRequests(value uint32) (err error) { + return instance.SetProperty("KDCASRequests", (value)) +} + +// GetKDCASRequests gets the value of KDCASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclaimsawareASRequests sets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareASRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareASRequests", (value)) +} + +// GetKDCclaimsawareASRequests gets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclaimsawareserviceassertedidentityTGSrequests sets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareserviceassertedidentityTGSrequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareserviceassertedidentityTGSrequests", (value)) +} + +// GetKDCclaimsawareserviceassertedidentityTGSrequests gets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareserviceassertedidentityTGSrequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareserviceassertedidentityTGSrequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclaimsawareTGSRequests sets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareTGSRequests", (value)) +} + +// GetKDCclaimsawareTGSRequests gets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclassictypeconstraineddelegationTGSRequests sets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclassictypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclassictypeconstraineddelegationTGSRequests", (value)) +} + +// GetKDCclassictypeconstraineddelegationTGSRequests gets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclassictypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclassictypeconstraineddelegationTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCkeytrustASRequests sets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCkeytrustASRequests(value uint32) (err error) { + return instance.SetProperty("KDCkeytrustASRequests", (value)) +} + +// GetKDCkeytrustASRequests gets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCkeytrustASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCkeytrustASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCresourcetypeconstraineddelegationTGSRequests sets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCresourcetypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCresourcetypeconstraineddelegationTGSRequests", (value)) +} + +// GetKDCresourcetypeconstraineddelegationTGSRequests gets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCresourcetypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCresourcetypeconstraineddelegationTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCTGSRequests sets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCTGSRequests", (value)) +} + +// GetKDCTGSRequests gets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKerberosAuthentications sets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyKerberosAuthentications(value uint32) (err error) { + return instance.SetProperty("KerberosAuthentications", (value)) +} + +// GetKerberosAuthentications gets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyKerberosAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("KerberosAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNTLMAuthentications sets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertyNTLMAuthentications(value uint32) (err error) { + return instance.SetProperty("NTLMAuthentications", (value)) +} + +// GetNTLMAuthentications gets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertyNTLMAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("NTLMAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSchannelSessionCacheEntries sets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertySchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("SchannelSessionCacheEntries", (value)) +} + +// GetSchannelSessionCacheEntries gets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertySchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SchannelSessionCacheEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLClientSideFullHandshakes sets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertySSLClientSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideFullHandshakes", (value)) +} + +// GetSSLClientSideFullHandshakes gets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertySSLClientSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideFullHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLClientSideReconnectHandshakes sets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertySSLClientSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideReconnectHandshakes", (value)) +} + +// GetSSLClientSideReconnectHandshakes gets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertySSLClientSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideReconnectHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLServerSideFullHandshakes sets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertySSLServerSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideFullHandshakes", (value)) +} + +// GetSSLServerSideFullHandshakes gets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertySSLServerSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideFullHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLServerSideReconnectHandshakes sets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) SetPropertySSLServerSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideReconnectHandshakes", (value)) +} + +// GetSSLServerSideReconnectHandshakes gets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfFormattedData_Lsa_SecuritySystemWideStatistics) GetPropertySSLServerSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideReconnectHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000.go new file mode 100644 index 00000000..ae171609 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000 struct +type Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000 struct { + *Win32_PerfFormattedData + + // + Averageparticipantcommitresponsetime uint32 + + // + Averageparticipantprepareresponsetime uint32 + + // + CommitretrycountPersec uint32 + + // + FaultsreceivedcountPersec uint32 + + // + FaultssentcountPersec uint32 + + // + MessagesendfailuresPersec uint32 + + // + PreparedretrycountPersec uint32 + + // + PrepareretrycountPersec uint32 + + // + ReplayretrycountPersec uint32 +} + +func NewWin32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageparticipantcommitresponsetime sets the value of Averageparticipantcommitresponsetime for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyAverageparticipantcommitresponsetime(value uint32) (err error) { + return instance.SetProperty("Averageparticipantcommitresponsetime", (value)) +} + +// GetAverageparticipantcommitresponsetime gets the value of Averageparticipantcommitresponsetime for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyAverageparticipantcommitresponsetime() (value uint32, err error) { + retValue, err := instance.GetProperty("Averageparticipantcommitresponsetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageparticipantprepareresponsetime sets the value of Averageparticipantprepareresponsetime for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyAverageparticipantprepareresponsetime(value uint32) (err error) { + return instance.SetProperty("Averageparticipantprepareresponsetime", (value)) +} + +// GetAverageparticipantprepareresponsetime gets the value of Averageparticipantprepareresponsetime for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyAverageparticipantprepareresponsetime() (value uint32, err error) { + retValue, err := instance.GetProperty("Averageparticipantprepareresponsetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitretrycountPersec sets the value of CommitretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyCommitretrycountPersec(value uint32) (err error) { + return instance.SetProperty("CommitretrycountPersec", (value)) +} + +// GetCommitretrycountPersec gets the value of CommitretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyCommitretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CommitretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFaultsreceivedcountPersec sets the value of FaultsreceivedcountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyFaultsreceivedcountPersec(value uint32) (err error) { + return instance.SetProperty("FaultsreceivedcountPersec", (value)) +} + +// GetFaultsreceivedcountPersec gets the value of FaultsreceivedcountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyFaultsreceivedcountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FaultsreceivedcountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFaultssentcountPersec sets the value of FaultssentcountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyFaultssentcountPersec(value uint32) (err error) { + return instance.SetProperty("FaultssentcountPersec", (value)) +} + +// GetFaultssentcountPersec gets the value of FaultssentcountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyFaultssentcountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FaultssentcountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesendfailuresPersec sets the value of MessagesendfailuresPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyMessagesendfailuresPersec(value uint32) (err error) { + return instance.SetProperty("MessagesendfailuresPersec", (value)) +} + +// GetMessagesendfailuresPersec gets the value of MessagesendfailuresPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyMessagesendfailuresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesendfailuresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPreparedretrycountPersec sets the value of PreparedretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyPreparedretrycountPersec(value uint32) (err error) { + return instance.SetProperty("PreparedretrycountPersec", (value)) +} + +// GetPreparedretrycountPersec gets the value of PreparedretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyPreparedretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PreparedretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrepareretrycountPersec sets the value of PrepareretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyPrepareretrycountPersec(value uint32) (err error) { + return instance.SetProperty("PrepareretrycountPersec", (value)) +} + +// GetPrepareretrycountPersec gets the value of PrepareretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyPrepareretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PrepareretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReplayretrycountPersec sets the value of ReplayretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyReplayretrycountPersec(value uint32) (err error) { + return instance.SetProperty("ReplayretrycountPersec", (value)) +} + +// GetReplayretrycountPersec gets the value of ReplayretrycountPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyReplayretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReplayretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator.go new file mode 100644 index 00000000..cb7d1137 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator struct +type Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator struct { + *Win32_PerfFormattedData + + // + AbortedTransactions uint32 + + // + AbortedTransactionsPersec uint32 + + // + ActiveTransactions uint32 + + // + ActiveTransactionsMaximum uint32 + + // + CommittedTransactions uint32 + + // + CommittedTransactionsPersec uint32 + + // + ForceAbortedTransactions uint32 + + // + ForceCommittedTransactions uint32 + + // + InDoubtTransactions uint32 + + // + ResponseTimeAverage uint32 + + // + ResponseTimeMaximum uint32 + + // + ResponseTimeMinimum uint32 + + // + TransactionsPersec uint32 +} + +func NewWin32_PerfFormattedData_MSDTC_DistributedTransactionCoordinatorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_MSDTC_DistributedTransactionCoordinatorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAbortedTransactions sets the value of AbortedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyAbortedTransactions(value uint32) (err error) { + return instance.SetProperty("AbortedTransactions", (value)) +} + +// GetAbortedTransactions gets the value of AbortedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyAbortedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("AbortedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAbortedTransactionsPersec sets the value of AbortedTransactionsPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyAbortedTransactionsPersec(value uint32) (err error) { + return instance.SetProperty("AbortedTransactionsPersec", (value)) +} + +// GetAbortedTransactionsPersec gets the value of AbortedTransactionsPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyAbortedTransactionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AbortedTransactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveTransactions sets the value of ActiveTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyActiveTransactions(value uint32) (err error) { + return instance.SetProperty("ActiveTransactions", (value)) +} + +// GetActiveTransactions gets the value of ActiveTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyActiveTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveTransactionsMaximum sets the value of ActiveTransactionsMaximum for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyActiveTransactionsMaximum(value uint32) (err error) { + return instance.SetProperty("ActiveTransactionsMaximum", (value)) +} + +// GetActiveTransactionsMaximum gets the value of ActiveTransactionsMaximum for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyActiveTransactionsMaximum() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTransactionsMaximum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommittedTransactions sets the value of CommittedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyCommittedTransactions(value uint32) (err error) { + return instance.SetProperty("CommittedTransactions", (value)) +} + +// GetCommittedTransactions gets the value of CommittedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyCommittedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("CommittedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommittedTransactionsPersec sets the value of CommittedTransactionsPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyCommittedTransactionsPersec(value uint32) (err error) { + return instance.SetProperty("CommittedTransactionsPersec", (value)) +} + +// GetCommittedTransactionsPersec gets the value of CommittedTransactionsPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyCommittedTransactionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CommittedTransactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForceAbortedTransactions sets the value of ForceAbortedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyForceAbortedTransactions(value uint32) (err error) { + return instance.SetProperty("ForceAbortedTransactions", (value)) +} + +// GetForceAbortedTransactions gets the value of ForceAbortedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyForceAbortedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("ForceAbortedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForceCommittedTransactions sets the value of ForceCommittedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyForceCommittedTransactions(value uint32) (err error) { + return instance.SetProperty("ForceCommittedTransactions", (value)) +} + +// GetForceCommittedTransactions gets the value of ForceCommittedTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyForceCommittedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("ForceCommittedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInDoubtTransactions sets the value of InDoubtTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyInDoubtTransactions(value uint32) (err error) { + return instance.SetProperty("InDoubtTransactions", (value)) +} + +// GetInDoubtTransactions gets the value of InDoubtTransactions for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyInDoubtTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("InDoubtTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeAverage sets the value of ResponseTimeAverage for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyResponseTimeAverage(value uint32) (err error) { + return instance.SetProperty("ResponseTimeAverage", (value)) +} + +// GetResponseTimeAverage gets the value of ResponseTimeAverage for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyResponseTimeAverage() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeMaximum sets the value of ResponseTimeMaximum for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyResponseTimeMaximum(value uint32) (err error) { + return instance.SetProperty("ResponseTimeMaximum", (value)) +} + +// GetResponseTimeMaximum gets the value of ResponseTimeMaximum for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyResponseTimeMaximum() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeMaximum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeMinimum sets the value of ResponseTimeMinimum for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyResponseTimeMinimum(value uint32) (err error) { + return instance.SetProperty("ResponseTimeMinimum", (value)) +} + +// GetResponseTimeMinimum gets the value of ResponseTimeMinimum for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyResponseTimeMinimum() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeMinimum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsPersec sets the value of TransactionsPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) SetPropertyTransactionsPersec(value uint32) (err error) { + return instance.SetProperty("TransactionsPersec", (value)) +} + +// GetTransactionsPersec gets the value of TransactionsPersec for the instance +func (instance *Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator) GetPropertyTransactionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go new file mode 100644 index 00000000..80ef5c5d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice struct +type Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice struct { + *Win32_PerfFormattedData + + // + NumberofconnectedVMTchannels uint32 + + // + NumberofcreatedVMTchannels uint32 + + // + NumberofdisconnectedVMTchannels uint32 + + // + NumberofRDVGMrestartednotifications uint32 + + // + NumberofwaitingVMTchannels uint32 + + // + TotalnumberofcreatedVMTchannels uint32 +} + +func NewWin32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberofconnectedVMTchannels sets the value of NumberofconnectedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofconnectedVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofconnectedVMTchannels", (value)) +} + +// GetNumberofconnectedVMTchannels gets the value of NumberofconnectedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofconnectedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofconnectedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcreatedVMTchannels sets the value of NumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofcreatedVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofcreatedVMTchannels", (value)) +} + +// GetNumberofcreatedVMTchannels gets the value of NumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofcreatedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofcreatedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdisconnectedVMTchannels sets the value of NumberofdisconnectedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofdisconnectedVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofdisconnectedVMTchannels", (value)) +} + +// GetNumberofdisconnectedVMTchannels gets the value of NumberofdisconnectedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofdisconnectedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofdisconnectedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofRDVGMrestartednotifications sets the value of NumberofRDVGMrestartednotifications for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofRDVGMrestartednotifications(value uint32) (err error) { + return instance.SetProperty("NumberofRDVGMrestartednotifications", (value)) +} + +// GetNumberofRDVGMrestartednotifications gets the value of NumberofRDVGMrestartednotifications for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofRDVGMrestartednotifications() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofRDVGMrestartednotifications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofwaitingVMTchannels sets the value of NumberofwaitingVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofwaitingVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofwaitingVMTchannels", (value)) +} + +// GetNumberofwaitingVMTchannels gets the value of NumberofwaitingVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofwaitingVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofwaitingVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalnumberofcreatedVMTchannels sets the value of TotalnumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyTotalnumberofcreatedVMTchannels(value uint32) (err error) { + return instance.SetProperty("TotalnumberofcreatedVMTchannels", (value)) +} + +// GetTotalnumberofcreatedVMTchannels gets the value of TotalnumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyTotalnumberofcreatedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalnumberofcreatedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go new file mode 100644 index 00000000..6ae146e1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel struct +type Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel struct { + *Win32_PerfFormattedData + + // + Numberofdataavailableeventwasreset uint32 + + // + Numberofdataavailableeventwasresetpersecond uint64 + + // + Numberofdataavailablesignalsreceived uint32 + + // + Numberofdataavailablesignalsreceivedpersecond uint64 + + // + Numberofdataavailablesignalssent uint32 + + // + Numberofdataavailablesignalssentpersecond uint64 + + // + Numberofspaceavailableeventwasreset uint32 + + // + Numberofspaceavailableeventwasresetpersecond uint64 + + // + Numberofspaceavailablesignalsreceived uint32 + + // + Numberofspaceavailablesignalsreceivedpersecond uint64 + + // + Numberofspaceavailablesignalssent uint32 + + // + Numberofspaceavailablesignalssentpersecond uint64 +} + +func NewWin32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannelEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannelEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberofdataavailableeventwasreset sets the value of Numberofdataavailableeventwasreset for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailableeventwasreset(value uint32) (err error) { + return instance.SetProperty("Numberofdataavailableeventwasreset", (value)) +} + +// GetNumberofdataavailableeventwasreset gets the value of Numberofdataavailableeventwasreset for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailableeventwasreset() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofdataavailableeventwasreset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdataavailableeventwasresetpersecond sets the value of Numberofdataavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailableeventwasresetpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofdataavailableeventwasresetpersecond", (value)) +} + +// GetNumberofdataavailableeventwasresetpersecond gets the value of Numberofdataavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailableeventwasresetpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofdataavailableeventwasresetpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofdataavailablesignalsreceived sets the value of Numberofdataavailablesignalsreceived for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalsreceived(value uint32) (err error) { + return instance.SetProperty("Numberofdataavailablesignalsreceived", (value)) +} + +// GetNumberofdataavailablesignalsreceived gets the value of Numberofdataavailablesignalsreceived for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalsreceived() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdataavailablesignalsreceivedpersecond sets the value of Numberofdataavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalsreceivedpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofdataavailablesignalsreceivedpersecond", (value)) +} + +// GetNumberofdataavailablesignalsreceivedpersecond gets the value of Numberofdataavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalsreceivedpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalsreceivedpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofdataavailablesignalssent sets the value of Numberofdataavailablesignalssent for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalssent(value uint32) (err error) { + return instance.SetProperty("Numberofdataavailablesignalssent", (value)) +} + +// GetNumberofdataavailablesignalssent gets the value of Numberofdataavailablesignalssent for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalssent() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdataavailablesignalssentpersecond sets the value of Numberofdataavailablesignalssentpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalssentpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofdataavailablesignalssentpersecond", (value)) +} + +// GetNumberofdataavailablesignalssentpersecond gets the value of Numberofdataavailablesignalssentpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalssentpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalssentpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofspaceavailableeventwasreset sets the value of Numberofspaceavailableeventwasreset for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailableeventwasreset(value uint32) (err error) { + return instance.SetProperty("Numberofspaceavailableeventwasreset", (value)) +} + +// GetNumberofspaceavailableeventwasreset gets the value of Numberofspaceavailableeventwasreset for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailableeventwasreset() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailableeventwasreset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofspaceavailableeventwasresetpersecond sets the value of Numberofspaceavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailableeventwasresetpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofspaceavailableeventwasresetpersecond", (value)) +} + +// GetNumberofspaceavailableeventwasresetpersecond gets the value of Numberofspaceavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailableeventwasresetpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailableeventwasresetpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalsreceived sets the value of Numberofspaceavailablesignalsreceived for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalsreceived(value uint32) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalsreceived", (value)) +} + +// GetNumberofspaceavailablesignalsreceived gets the value of Numberofspaceavailablesignalsreceived for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalsreceived() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalsreceivedpersecond sets the value of Numberofspaceavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalsreceivedpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalsreceivedpersecond", (value)) +} + +// GetNumberofspaceavailablesignalsreceivedpersecond gets the value of Numberofspaceavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalsreceivedpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalsreceivedpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalssent sets the value of Numberofspaceavailablesignalssent for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalssent(value uint32) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalssent", (value)) +} + +// GetNumberofspaceavailablesignalssent gets the value of Numberofspaceavailablesignalssent for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalssent() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalssentpersecond sets the value of Numberofspaceavailablesignalssentpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalssentpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalssentpersecond", (value)) +} + +// GetNumberofspaceavailablesignalssentpersecond gets the value of Numberofspaceavailablesignalssentpersecond for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalssentpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalssentpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go new file mode 100644 index 00000000..4f27c9d0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService struct +type Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService struct { + *Win32_PerfFormattedData + + // + ClockFrequencyAdjustment uint32 + + // + ClockFrequencyAdjustmentPPB uint32 + + // + ComputedTimeOffset uint64 + + // + NTPClientTimeSourceCount uint32 + + // + NTPRoundtripDelay uint32 + + // + NTPServerIncomingRequests uint64 + + // + NTPServerOutgoingResponses uint64 +} + +func NewWin32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetClockFrequencyAdjustment sets the value of ClockFrequencyAdjustment for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyClockFrequencyAdjustment(value uint32) (err error) { + return instance.SetProperty("ClockFrequencyAdjustment", (value)) +} + +// GetClockFrequencyAdjustment gets the value of ClockFrequencyAdjustment for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyClockFrequencyAdjustment() (value uint32, err error) { + retValue, err := instance.GetProperty("ClockFrequencyAdjustment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClockFrequencyAdjustmentPPB sets the value of ClockFrequencyAdjustmentPPB for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyClockFrequencyAdjustmentPPB(value uint32) (err error) { + return instance.SetProperty("ClockFrequencyAdjustmentPPB", (value)) +} + +// GetClockFrequencyAdjustmentPPB gets the value of ClockFrequencyAdjustmentPPB for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyClockFrequencyAdjustmentPPB() (value uint32, err error) { + retValue, err := instance.GetProperty("ClockFrequencyAdjustmentPPB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetComputedTimeOffset sets the value of ComputedTimeOffset for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyComputedTimeOffset(value uint64) (err error) { + return instance.SetProperty("ComputedTimeOffset", (value)) +} + +// GetComputedTimeOffset gets the value of ComputedTimeOffset for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyComputedTimeOffset() (value uint64, err error) { + retValue, err := instance.GetProperty("ComputedTimeOffset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNTPClientTimeSourceCount sets the value of NTPClientTimeSourceCount for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPClientTimeSourceCount(value uint32) (err error) { + return instance.SetProperty("NTPClientTimeSourceCount", (value)) +} + +// GetNTPClientTimeSourceCount gets the value of NTPClientTimeSourceCount for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPClientTimeSourceCount() (value uint32, err error) { + retValue, err := instance.GetProperty("NTPClientTimeSourceCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNTPRoundtripDelay sets the value of NTPRoundtripDelay for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPRoundtripDelay(value uint32) (err error) { + return instance.SetProperty("NTPRoundtripDelay", (value)) +} + +// GetNTPRoundtripDelay gets the value of NTPRoundtripDelay for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPRoundtripDelay() (value uint32, err error) { + retValue, err := instance.GetProperty("NTPRoundtripDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNTPServerIncomingRequests sets the value of NTPServerIncomingRequests for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPServerIncomingRequests(value uint64) (err error) { + return instance.SetProperty("NTPServerIncomingRequests", (value)) +} + +// GetNTPServerIncomingRequests gets the value of NTPServerIncomingRequests for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPServerIncomingRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("NTPServerIncomingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNTPServerOutgoingResponses sets the value of NTPServerOutgoingResponses for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPServerOutgoingResponses(value uint64) (err error) { + return instance.SetProperty("NTPServerOutgoingResponses", (value)) +} + +// GetNTPServerOutgoingResponses gets the value of NTPServerOutgoingResponses for the instance +func (instance *Win32_PerfFormattedData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPServerOutgoingResponses() (value uint64, err error) { + retValue, err := instance.GetProperty("NTPServerOutgoingResponses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go new file mode 100644 index 00000000..6269f651 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go @@ -0,0 +1,1520 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters struct +type Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters struct { + *Win32_PerfFormattedData + + // + ArrivedRDMACNPs uint64 + + // + CPUMEMpages4KmappedbyTPTforCQ uint32 + + // + CPUMEMpages4KmappedbyTPTforEQ uint32 + + // + CPUMEMpages4KmappedbyTPTforMR uint32 + + // + CPUMEMpages4KmappedbyTPTforQP uint32 + + // + CQMissPersec uint32 + + // + Currentqpsinerrorstate uint32 + + // + Currentqpsinlimitedstate uint32 + + // + Dcqcnreactionpointnewqprejectevents uint32 + + // + Dcqcnreactionpointnewqpshapedevents uint32 + + // + Dcqcnreactionpointqprateupdateevents uint32 + + // + Dcqcnreactionpointqpscheduleddelayedevents uint32 + + // + Dcqcnreactionpointqpschedulednotshapedevents uint32 + + // + Dcqcnreactionpointqpscheduledpermitedevents uint32 + + // + EQMissPersec uint32 + + // + ExternalBlueflamehitPersec uint32 + + // + ExternalBlueflameReplacePersec uint32 + + // + ExternalDoorbellDropPersec uint32 + + // + ExternalDoorbellPushPersec uint32 + + // + InternalProcessor0MaximumLatency uint32 + + // + InternalProcessor1MaximumLatency uint32 + + // + InternalProcessor2MaximumLatency uint32 + + // + InternalProcessor3MaximumLatency uint32 + + // + Internalprocessorexecutedcommands uint32 + + // + LastRestransmittedQP uint32 + + // + Maximumqpsinlimitedstate uint32 + + // + MPTentriesusedforCQ uint32 + + // + MPTentriesusedforEQ uint32 + + // + MPTentriesusedforMR uint32 + + // + MPTentriesusedforQP uint32 + + // + MPTMissPersec uint32 + + // + MTTentriesusedforCQ uint32 + + // + MTTentriesusedforEQ uint32 + + // + MTTentriesusedforMR uint32 + + // + MTTentriesusedforQP uint32 + + // + MTTMissPersec uint32 + + // + NoWQEDropsPersec uint32 + + // + Packetsdiscardedduetoinvalidqp uint64 + + // + PCIBackpressurePersec uint32 + + // + Qppriorityupdateflowevents uint32 + + // + ReceiveWQEcachehitPersec uint32 + + // + ReceiveWQEcachelookupPersec uint32 + + // + RQMissPersec uint32 + + // + ScatterBackpressurePersec uint32 + + // + SQMissPersec uint32 + + // + SteeringQPCBackpressurePersec uint32 + + // + Totalqpsinlimitedstate uint32 + + // + Transmissionenginehangevents uint32 + + // + WQEfetchPerAtomicBackpressurePersec uint32 +} + +func NewWin32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetArrivedRDMACNPs sets the value of ArrivedRDMACNPs for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyArrivedRDMACNPs(value uint64) (err error) { + return instance.SetProperty("ArrivedRDMACNPs", (value)) +} + +// GetArrivedRDMACNPs gets the value of ArrivedRDMACNPs for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyArrivedRDMACNPs() (value uint64, err error) { + retValue, err := instance.GetProperty("ArrivedRDMACNPs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforCQ sets the value of CPUMEMpages4KmappedbyTPTforCQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforCQ(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforCQ", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforCQ gets the value of CPUMEMpages4KmappedbyTPTforCQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforCQ() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforCQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforEQ sets the value of CPUMEMpages4KmappedbyTPTforEQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforEQ(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforEQ", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforEQ gets the value of CPUMEMpages4KmappedbyTPTforEQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforEQ() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforEQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforMR sets the value of CPUMEMpages4KmappedbyTPTforMR for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforMR(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforMR", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforMR gets the value of CPUMEMpages4KmappedbyTPTforMR for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforMR() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforMR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforQP sets the value of CPUMEMpages4KmappedbyTPTforQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforQP(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforQP", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforQP gets the value of CPUMEMpages4KmappedbyTPTforQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforQP() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCQMissPersec sets the value of CQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCQMissPersec(value uint32) (err error) { + return instance.SetProperty("CQMissPersec", (value)) +} + +// GetCQMissPersec gets the value of CQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentqpsinerrorstate sets the value of Currentqpsinerrorstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCurrentqpsinerrorstate(value uint32) (err error) { + return instance.SetProperty("Currentqpsinerrorstate", (value)) +} + +// GetCurrentqpsinerrorstate gets the value of Currentqpsinerrorstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCurrentqpsinerrorstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentqpsinerrorstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentqpsinlimitedstate sets the value of Currentqpsinlimitedstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCurrentqpsinlimitedstate(value uint32) (err error) { + return instance.SetProperty("Currentqpsinlimitedstate", (value)) +} + +// GetCurrentqpsinlimitedstate gets the value of Currentqpsinlimitedstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCurrentqpsinlimitedstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentqpsinlimitedstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointnewqprejectevents sets the value of Dcqcnreactionpointnewqprejectevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointnewqprejectevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointnewqprejectevents", (value)) +} + +// GetDcqcnreactionpointnewqprejectevents gets the value of Dcqcnreactionpointnewqprejectevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointnewqprejectevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointnewqprejectevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointnewqpshapedevents sets the value of Dcqcnreactionpointnewqpshapedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointnewqpshapedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointnewqpshapedevents", (value)) +} + +// GetDcqcnreactionpointnewqpshapedevents gets the value of Dcqcnreactionpointnewqpshapedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointnewqpshapedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointnewqpshapedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqprateupdateevents sets the value of Dcqcnreactionpointqprateupdateevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqprateupdateevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqprateupdateevents", (value)) +} + +// GetDcqcnreactionpointqprateupdateevents gets the value of Dcqcnreactionpointqprateupdateevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqprateupdateevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqprateupdateevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqpscheduleddelayedevents sets the value of Dcqcnreactionpointqpscheduleddelayedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqpscheduleddelayedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqpscheduleddelayedevents", (value)) +} + +// GetDcqcnreactionpointqpscheduleddelayedevents gets the value of Dcqcnreactionpointqpscheduleddelayedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqpscheduleddelayedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqpscheduleddelayedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqpschedulednotshapedevents sets the value of Dcqcnreactionpointqpschedulednotshapedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqpschedulednotshapedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqpschedulednotshapedevents", (value)) +} + +// GetDcqcnreactionpointqpschedulednotshapedevents gets the value of Dcqcnreactionpointqpschedulednotshapedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqpschedulednotshapedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqpschedulednotshapedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqpscheduledpermitedevents sets the value of Dcqcnreactionpointqpscheduledpermitedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqpscheduledpermitedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqpscheduledpermitedevents", (value)) +} + +// GetDcqcnreactionpointqpscheduledpermitedevents gets the value of Dcqcnreactionpointqpscheduledpermitedevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqpscheduledpermitedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqpscheduledpermitedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEQMissPersec sets the value of EQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyEQMissPersec(value uint32) (err error) { + return instance.SetProperty("EQMissPersec", (value)) +} + +// GetEQMissPersec gets the value of EQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyEQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalBlueflamehitPersec sets the value of ExternalBlueflamehitPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalBlueflamehitPersec(value uint32) (err error) { + return instance.SetProperty("ExternalBlueflamehitPersec", (value)) +} + +// GetExternalBlueflamehitPersec gets the value of ExternalBlueflamehitPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalBlueflamehitPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalBlueflamehitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalBlueflameReplacePersec sets the value of ExternalBlueflameReplacePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalBlueflameReplacePersec(value uint32) (err error) { + return instance.SetProperty("ExternalBlueflameReplacePersec", (value)) +} + +// GetExternalBlueflameReplacePersec gets the value of ExternalBlueflameReplacePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalBlueflameReplacePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalBlueflameReplacePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalDoorbellDropPersec sets the value of ExternalDoorbellDropPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalDoorbellDropPersec(value uint32) (err error) { + return instance.SetProperty("ExternalDoorbellDropPersec", (value)) +} + +// GetExternalDoorbellDropPersec gets the value of ExternalDoorbellDropPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalDoorbellDropPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalDoorbellDropPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalDoorbellPushPersec sets the value of ExternalDoorbellPushPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalDoorbellPushPersec(value uint32) (err error) { + return instance.SetProperty("ExternalDoorbellPushPersec", (value)) +} + +// GetExternalDoorbellPushPersec gets the value of ExternalDoorbellPushPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalDoorbellPushPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalDoorbellPushPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor0MaximumLatency sets the value of InternalProcessor0MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor0MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor0MaximumLatency", (value)) +} + +// GetInternalProcessor0MaximumLatency gets the value of InternalProcessor0MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor0MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor0MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor1MaximumLatency sets the value of InternalProcessor1MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor1MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor1MaximumLatency", (value)) +} + +// GetInternalProcessor1MaximumLatency gets the value of InternalProcessor1MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor1MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor1MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor2MaximumLatency sets the value of InternalProcessor2MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor2MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor2MaximumLatency", (value)) +} + +// GetInternalProcessor2MaximumLatency gets the value of InternalProcessor2MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor2MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor2MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor3MaximumLatency sets the value of InternalProcessor3MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor3MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor3MaximumLatency", (value)) +} + +// GetInternalProcessor3MaximumLatency gets the value of InternalProcessor3MaximumLatency for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor3MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor3MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalprocessorexecutedcommands sets the value of Internalprocessorexecutedcommands for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalprocessorexecutedcommands(value uint32) (err error) { + return instance.SetProperty("Internalprocessorexecutedcommands", (value)) +} + +// GetInternalprocessorexecutedcommands gets the value of Internalprocessorexecutedcommands for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalprocessorexecutedcommands() (value uint32, err error) { + retValue, err := instance.GetProperty("Internalprocessorexecutedcommands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLastRestransmittedQP sets the value of LastRestransmittedQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyLastRestransmittedQP(value uint32) (err error) { + return instance.SetProperty("LastRestransmittedQP", (value)) +} + +// GetLastRestransmittedQP gets the value of LastRestransmittedQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyLastRestransmittedQP() (value uint32, err error) { + retValue, err := instance.GetProperty("LastRestransmittedQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumqpsinlimitedstate sets the value of Maximumqpsinlimitedstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMaximumqpsinlimitedstate(value uint32) (err error) { + return instance.SetProperty("Maximumqpsinlimitedstate", (value)) +} + +// GetMaximumqpsinlimitedstate gets the value of Maximumqpsinlimitedstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMaximumqpsinlimitedstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Maximumqpsinlimitedstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforCQ sets the value of MPTentriesusedforCQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforCQ(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforCQ", (value)) +} + +// GetMPTentriesusedforCQ gets the value of MPTentriesusedforCQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforCQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforCQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforEQ sets the value of MPTentriesusedforEQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforEQ(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforEQ", (value)) +} + +// GetMPTentriesusedforEQ gets the value of MPTentriesusedforEQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforEQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforEQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforMR sets the value of MPTentriesusedforMR for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforMR(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforMR", (value)) +} + +// GetMPTentriesusedforMR gets the value of MPTentriesusedforMR for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforMR() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforMR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforQP sets the value of MPTentriesusedforQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforQP(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforQP", (value)) +} + +// GetMPTentriesusedforQP gets the value of MPTentriesusedforQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforQP() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTMissPersec sets the value of MPTMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTMissPersec(value uint32) (err error) { + return instance.SetProperty("MPTMissPersec", (value)) +} + +// GetMPTMissPersec gets the value of MPTMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforCQ sets the value of MTTentriesusedforCQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforCQ(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforCQ", (value)) +} + +// GetMTTentriesusedforCQ gets the value of MTTentriesusedforCQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforCQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforCQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforEQ sets the value of MTTentriesusedforEQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforEQ(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforEQ", (value)) +} + +// GetMTTentriesusedforEQ gets the value of MTTentriesusedforEQ for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforEQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforEQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforMR sets the value of MTTentriesusedforMR for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforMR(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforMR", (value)) +} + +// GetMTTentriesusedforMR gets the value of MTTentriesusedforMR for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforMR() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforMR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforQP sets the value of MTTentriesusedforQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforQP(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforQP", (value)) +} + +// GetMTTentriesusedforQP gets the value of MTTentriesusedforQP for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforQP() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTMissPersec sets the value of MTTMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTMissPersec(value uint32) (err error) { + return instance.SetProperty("MTTMissPersec", (value)) +} + +// GetMTTMissPersec gets the value of MTTMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNoWQEDropsPersec sets the value of NoWQEDropsPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyNoWQEDropsPersec(value uint32) (err error) { + return instance.SetProperty("NoWQEDropsPersec", (value)) +} + +// GetNoWQEDropsPersec gets the value of NoWQEDropsPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyNoWQEDropsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NoWQEDropsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdiscardedduetoinvalidqp sets the value of Packetsdiscardedduetoinvalidqp for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyPacketsdiscardedduetoinvalidqp(value uint64) (err error) { + return instance.SetProperty("Packetsdiscardedduetoinvalidqp", (value)) +} + +// GetPacketsdiscardedduetoinvalidqp gets the value of Packetsdiscardedduetoinvalidqp for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyPacketsdiscardedduetoinvalidqp() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsdiscardedduetoinvalidqp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPCIBackpressurePersec sets the value of PCIBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyPCIBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("PCIBackpressurePersec", (value)) +} + +// GetPCIBackpressurePersec gets the value of PCIBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyPCIBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PCIBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQppriorityupdateflowevents sets the value of Qppriorityupdateflowevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyQppriorityupdateflowevents(value uint32) (err error) { + return instance.SetProperty("Qppriorityupdateflowevents", (value)) +} + +// GetQppriorityupdateflowevents gets the value of Qppriorityupdateflowevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyQppriorityupdateflowevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Qppriorityupdateflowevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceiveWQEcachehitPersec sets the value of ReceiveWQEcachehitPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyReceiveWQEcachehitPersec(value uint32) (err error) { + return instance.SetProperty("ReceiveWQEcachehitPersec", (value)) +} + +// GetReceiveWQEcachehitPersec gets the value of ReceiveWQEcachehitPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyReceiveWQEcachehitPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveWQEcachehitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceiveWQEcachelookupPersec sets the value of ReceiveWQEcachelookupPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyReceiveWQEcachelookupPersec(value uint32) (err error) { + return instance.SetProperty("ReceiveWQEcachelookupPersec", (value)) +} + +// GetReceiveWQEcachelookupPersec gets the value of ReceiveWQEcachelookupPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyReceiveWQEcachelookupPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveWQEcachelookupPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRQMissPersec sets the value of RQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyRQMissPersec(value uint32) (err error) { + return instance.SetProperty("RQMissPersec", (value)) +} + +// GetRQMissPersec gets the value of RQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyRQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScatterBackpressurePersec sets the value of ScatterBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyScatterBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("ScatterBackpressurePersec", (value)) +} + +// GetScatterBackpressurePersec gets the value of ScatterBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyScatterBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ScatterBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSQMissPersec sets the value of SQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertySQMissPersec(value uint32) (err error) { + return instance.SetProperty("SQMissPersec", (value)) +} + +// GetSQMissPersec gets the value of SQMissPersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertySQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSteeringQPCBackpressurePersec sets the value of SteeringQPCBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertySteeringQPCBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("SteeringQPCBackpressurePersec", (value)) +} + +// GetSteeringQPCBackpressurePersec gets the value of SteeringQPCBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertySteeringQPCBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SteeringQPCBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalqpsinlimitedstate sets the value of Totalqpsinlimitedstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyTotalqpsinlimitedstate(value uint32) (err error) { + return instance.SetProperty("Totalqpsinlimitedstate", (value)) +} + +// GetTotalqpsinlimitedstate gets the value of Totalqpsinlimitedstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyTotalqpsinlimitedstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Totalqpsinlimitedstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransmissionenginehangevents sets the value of Transmissionenginehangevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyTransmissionenginehangevents(value uint32) (err error) { + return instance.SetProperty("Transmissionenginehangevents", (value)) +} + +// GetTransmissionenginehangevents gets the value of Transmissionenginehangevents for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyTransmissionenginehangevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Transmissionenginehangevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWQEfetchPerAtomicBackpressurePersec sets the value of WQEfetchPerAtomicBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyWQEfetchPerAtomicBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("WQEfetchPerAtomicBackpressurePersec", (value)) +} + +// GetWQEfetchPerAtomicBackpressurePersec gets the value of WQEfetchPerAtomicBackpressurePersec for the instance +func (instance *Win32_PerfFormattedData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyWQEfetchPerAtomicBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WQEfetchPerAtomicBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go new file mode 100644 index 00000000..099270e7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go @@ -0,0 +1,1130 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters struct +type Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters struct { + *Win32_PerfFormattedData + + // + CQOverflows uint64 + + // + Devicedetectedstalledstate uint64 + + // + DroplessModeEntries uint64 + + // + DroplessModeExits uint64 + + // + Linkdowneventsphy uint64 + + // + Packetdetectedasstalled uint64 + + // + PacketsdiscardedduetoHeadOfQueuelifetimelimit uint64 + + // + PacketsdiscardedduetoTCinstalledstate uint64 + + // + RequesterCQEErrors uint64 + + // + RequesterInvalidRequestErrors uint64 + + // + RequesterLengthErrors uint64 + + // + RequesterOutoforderSequenceNAK uint64 + + // + RequesterProtectionErrors uint64 + + // + RequesterQPOperationErrors uint64 + + // + RequesterQPTransportRetriesExceededErrors uint64 + + // + RequesterRemoteAccessErrors uint64 + + // + RequesterRemoteOperationErrors uint64 + + // + RequesterRNRNAK uint64 + + // + RequesterRNRNAKRetriesExceededErrors uint64 + + // + RequesterTimeoutReceived uint64 + + // + RequesterTransportRetriesExceededErrors uint64 + + // + ResponderCQEErrors uint64 + + // + ResponderDuplicateRequestReceived uint64 + + // + ResponderInvalidRequestErrors uint64 + + // + ResponderLengthErrors uint64 + + // + ResponderOutoforderSequenceReceived uint64 + + // + ResponderProtectionErrors uint64 + + // + ResponderQPOperationErrors uint64 + + // + ResponderRemoteAccessErrors uint64 + + // + ResponderRNRNAK uint64 + + // + RscAborts uint64 + + // + RscCoalesceEvents uint64 + + // + RscCoalesceOctets uint64 + + // + RscCoalescePackets uint64 + + // + TXCopiedPackets uint64 + + // + TXRingIsFullPackets uint64 +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCQOverflows sets the value of CQOverflows for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyCQOverflows(value uint64) (err error) { + return instance.SetProperty("CQOverflows", (value)) +} + +// GetCQOverflows gets the value of CQOverflows for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyCQOverflows() (value uint64, err error) { + retValue, err := instance.GetProperty("CQOverflows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicedetectedstalledstate sets the value of Devicedetectedstalledstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyDevicedetectedstalledstate(value uint64) (err error) { + return instance.SetProperty("Devicedetectedstalledstate", (value)) +} + +// GetDevicedetectedstalledstate gets the value of Devicedetectedstalledstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyDevicedetectedstalledstate() (value uint64, err error) { + retValue, err := instance.GetProperty("Devicedetectedstalledstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroplessModeEntries sets the value of DroplessModeEntries for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyDroplessModeEntries(value uint64) (err error) { + return instance.SetProperty("DroplessModeEntries", (value)) +} + +// GetDroplessModeEntries gets the value of DroplessModeEntries for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyDroplessModeEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("DroplessModeEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroplessModeExits sets the value of DroplessModeExits for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyDroplessModeExits(value uint64) (err error) { + return instance.SetProperty("DroplessModeExits", (value)) +} + +// GetDroplessModeExits gets the value of DroplessModeExits for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyDroplessModeExits() (value uint64, err error) { + retValue, err := instance.GetProperty("DroplessModeExits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLinkdowneventsphy sets the value of Linkdowneventsphy for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyLinkdowneventsphy(value uint64) (err error) { + return instance.SetProperty("Linkdowneventsphy", (value)) +} + +// GetLinkdowneventsphy gets the value of Linkdowneventsphy for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyLinkdowneventsphy() (value uint64, err error) { + retValue, err := instance.GetProperty("Linkdowneventsphy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketdetectedasstalled sets the value of Packetdetectedasstalled for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyPacketdetectedasstalled(value uint64) (err error) { + return instance.SetProperty("Packetdetectedasstalled", (value)) +} + +// GetPacketdetectedasstalled gets the value of Packetdetectedasstalled for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyPacketdetectedasstalled() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetdetectedasstalled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsdiscardedduetoHeadOfQueuelifetimelimit sets the value of PacketsdiscardedduetoHeadOfQueuelifetimelimit for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyPacketsdiscardedduetoHeadOfQueuelifetimelimit(value uint64) (err error) { + return instance.SetProperty("PacketsdiscardedduetoHeadOfQueuelifetimelimit", (value)) +} + +// GetPacketsdiscardedduetoHeadOfQueuelifetimelimit gets the value of PacketsdiscardedduetoHeadOfQueuelifetimelimit for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyPacketsdiscardedduetoHeadOfQueuelifetimelimit() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsdiscardedduetoHeadOfQueuelifetimelimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsdiscardedduetoTCinstalledstate sets the value of PacketsdiscardedduetoTCinstalledstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyPacketsdiscardedduetoTCinstalledstate(value uint64) (err error) { + return instance.SetProperty("PacketsdiscardedduetoTCinstalledstate", (value)) +} + +// GetPacketsdiscardedduetoTCinstalledstate gets the value of PacketsdiscardedduetoTCinstalledstate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyPacketsdiscardedduetoTCinstalledstate() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsdiscardedduetoTCinstalledstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterCQEErrors sets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterCQEErrors(value uint64) (err error) { + return instance.SetProperty("RequesterCQEErrors", (value)) +} + +// GetRequesterCQEErrors gets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterInvalidRequestErrors sets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("RequesterInvalidRequestErrors", (value)) +} + +// GetRequesterInvalidRequestErrors gets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterLengthErrors sets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterLengthErrors(value uint64) (err error) { + return instance.SetProperty("RequesterLengthErrors", (value)) +} + +// GetRequesterLengthErrors gets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterOutoforderSequenceNAK sets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterOutoforderSequenceNAK(value uint64) (err error) { + return instance.SetProperty("RequesterOutoforderSequenceNAK", (value)) +} + +// GetRequesterOutoforderSequenceNAK gets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterOutoforderSequenceNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterOutoforderSequenceNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterProtectionErrors sets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterProtectionErrors(value uint64) (err error) { + return instance.SetProperty("RequesterProtectionErrors", (value)) +} + +// GetRequesterProtectionErrors gets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterQPOperationErrors sets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterQPOperationErrors", (value)) +} + +// GetRequesterQPOperationErrors gets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterQPTransportRetriesExceededErrors sets the value of RequesterQPTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterQPTransportRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterQPTransportRetriesExceededErrors", (value)) +} + +// GetRequesterQPTransportRetriesExceededErrors gets the value of RequesterQPTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterQPTransportRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterQPTransportRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteAccessErrors sets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteAccessErrors", (value)) +} + +// GetRequesterRemoteAccessErrors gets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteOperationErrors sets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRemoteOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteOperationErrors", (value)) +} + +// GetRequesterRemoteOperationErrors gets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRemoteOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAK sets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRNRNAK(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAK", (value)) +} + +// GetRequesterRNRNAK gets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAKRetriesExceededErrors sets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRNRNAKRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAKRetriesExceededErrors", (value)) +} + +// GetRequesterRNRNAKRetriesExceededErrors gets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRNRNAKRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAKRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTimeoutReceived sets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterTimeoutReceived(value uint64) (err error) { + return instance.SetProperty("RequesterTimeoutReceived", (value)) +} + +// GetRequesterTimeoutReceived gets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterTimeoutReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTimeoutReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTransportRetriesExceededErrors sets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterTransportRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterTransportRetriesExceededErrors", (value)) +} + +// GetRequesterTransportRetriesExceededErrors gets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterTransportRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTransportRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderCQEErrors sets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderCQEErrors(value uint64) (err error) { + return instance.SetProperty("ResponderCQEErrors", (value)) +} + +// GetResponderCQEErrors gets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderDuplicateRequestReceived sets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderDuplicateRequestReceived(value uint64) (err error) { + return instance.SetProperty("ResponderDuplicateRequestReceived", (value)) +} + +// GetResponderDuplicateRequestReceived gets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderDuplicateRequestReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderDuplicateRequestReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderInvalidRequestErrors sets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("ResponderInvalidRequestErrors", (value)) +} + +// GetResponderInvalidRequestErrors gets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderLengthErrors sets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderLengthErrors(value uint64) (err error) { + return instance.SetProperty("ResponderLengthErrors", (value)) +} + +// GetResponderLengthErrors gets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderOutoforderSequenceReceived sets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderOutoforderSequenceReceived(value uint64) (err error) { + return instance.SetProperty("ResponderOutoforderSequenceReceived", (value)) +} + +// GetResponderOutoforderSequenceReceived gets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderOutoforderSequenceReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderOutoforderSequenceReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderProtectionErrors sets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderProtectionErrors(value uint64) (err error) { + return instance.SetProperty("ResponderProtectionErrors", (value)) +} + +// GetResponderProtectionErrors gets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderQPOperationErrors sets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("ResponderQPOperationErrors", (value)) +} + +// GetResponderQPOperationErrors gets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRemoteAccessErrors sets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("ResponderRemoteAccessErrors", (value)) +} + +// GetResponderRemoteAccessErrors gets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRNRNAK sets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderRNRNAK(value uint64) (err error) { + return instance.SetProperty("ResponderRNRNAK", (value)) +} + +// GetResponderRNRNAK gets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscAborts sets the value of RscAborts for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscAborts(value uint64) (err error) { + return instance.SetProperty("RscAborts", (value)) +} + +// GetRscAborts gets the value of RscAborts for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscAborts() (value uint64, err error) { + retValue, err := instance.GetProperty("RscAborts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscCoalesceEvents sets the value of RscCoalesceEvents for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscCoalesceEvents(value uint64) (err error) { + return instance.SetProperty("RscCoalesceEvents", (value)) +} + +// GetRscCoalesceEvents gets the value of RscCoalesceEvents for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscCoalesceEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("RscCoalesceEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscCoalesceOctets sets the value of RscCoalesceOctets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscCoalesceOctets(value uint64) (err error) { + return instance.SetProperty("RscCoalesceOctets", (value)) +} + +// GetRscCoalesceOctets gets the value of RscCoalesceOctets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscCoalesceOctets() (value uint64, err error) { + retValue, err := instance.GetProperty("RscCoalesceOctets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscCoalescePackets sets the value of RscCoalescePackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscCoalescePackets(value uint64) (err error) { + return instance.SetProperty("RscCoalescePackets", (value)) +} + +// GetRscCoalescePackets gets the value of RscCoalescePackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscCoalescePackets() (value uint64, err error) { + retValue, err := instance.GetProperty("RscCoalescePackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXCopiedPackets sets the value of TXCopiedPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyTXCopiedPackets(value uint64) (err error) { + return instance.SetProperty("TXCopiedPackets", (value)) +} + +// GetTXCopiedPackets gets the value of TXCopiedPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyTXCopiedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TXCopiedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXRingIsFullPackets sets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyTXRingIsFullPackets(value uint64) (err error) { + return instance.SetProperty("TXRingIsFullPackets", (value)) +} + +// GetTXRingIsFullPackets gets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyTXRingIsFullPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TXRingIsFullPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go new file mode 100644 index 00000000..718c4738 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go @@ -0,0 +1,950 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters struct +type Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + BytesTotal uint64 + + // + KBytesReceivedPerSec uint32 + + // + KBytesSentPerSec uint32 + + // + KBytesTotalPerSec uint32 + + // + PacketsReceived uint64 + + // + PacketsReceivedPerSec uint32 + + // + PacketsSent uint64 + + // + PacketsSentPerSec uint32 + + // + PacketsTotal uint64 + + // + PacketsTotalPerSec uint32 + + // + RcvPauseDuration uint64 + + // + RcvPauseFrames uint64 + + // + RequesterAllocatedRateLimiters uint64 + + // + RequesterAverageTotalRate uint64 + + // + RequesterCurrentTotalRate uint64 + + // + RequesterIgnoredLimitationRequest uint64 + + // + RequesterSuccessfullyHandledLimitationRequest uint64 + + // + RequesterTotalAllocatedRateLimiters uint32 + + // + RequesterTrafficRateHighPeak uint64 + + // + RequesterTrafficRateLowPeak uint64 + + // + ResponderActiveCNP uint64 + + // + ResponderCNPSentSuccessfully uint64 + + // + ResponderECNHandledSuccessfully uint64 + + // + ResponderIgnoredECN uint64 + + // + ResponderIgnoredECNdueCNPcoalesce uint64 + + // + SentDiscardFrames uint64 + + // + SentPauseDuration uint64 + + // + SentPauseFrames uint64 +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKBytesReceivedPerSec sets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyKBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesReceivedPerSec", (value)) +} + +// GetKBytesReceivedPerSec gets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyKBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesSentPerSec sets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyKBytesSentPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesSentPerSec", (value)) +} + +// GetKBytesSentPerSec gets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyKBytesSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesTotalPerSec sets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyKBytesTotalPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesTotalPerSec", (value)) +} + +// GetKBytesTotalPerSec gets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyKBytesTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPerSec sets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPerSec", (value)) +} + +// GetPacketsReceivedPerSec gets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsSent sets the value of PacketsSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsSent(value uint64) (err error) { + return instance.SetProperty("PacketsSent", (value)) +} + +// GetPacketsSent gets the value of PacketsSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPerSec sets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsSentPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsSentPerSec", (value)) +} + +// GetPacketsSentPerSec gets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsTotal sets the value of PacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PacketsTotal", (value)) +} + +// GetPacketsTotal gets the value of PacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTotalPerSec sets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsTotalPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsTotalPerSec", (value)) +} + +// GetPacketsTotalPerSec gets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRcvPauseDuration sets the value of RcvPauseDuration for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRcvPauseDuration(value uint64) (err error) { + return instance.SetProperty("RcvPauseDuration", (value)) +} + +// GetRcvPauseDuration gets the value of RcvPauseDuration for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRcvPauseDuration() (value uint64, err error) { + retValue, err := instance.GetProperty("RcvPauseDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRcvPauseFrames sets the value of RcvPauseFrames for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRcvPauseFrames(value uint64) (err error) { + return instance.SetProperty("RcvPauseFrames", (value)) +} + +// GetRcvPauseFrames gets the value of RcvPauseFrames for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRcvPauseFrames() (value uint64, err error) { + retValue, err := instance.GetProperty("RcvPauseFrames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterAllocatedRateLimiters sets the value of RequesterAllocatedRateLimiters for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterAllocatedRateLimiters(value uint64) (err error) { + return instance.SetProperty("RequesterAllocatedRateLimiters", (value)) +} + +// GetRequesterAllocatedRateLimiters gets the value of RequesterAllocatedRateLimiters for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterAllocatedRateLimiters() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterAllocatedRateLimiters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterAverageTotalRate sets the value of RequesterAverageTotalRate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterAverageTotalRate(value uint64) (err error) { + return instance.SetProperty("RequesterAverageTotalRate", (value)) +} + +// GetRequesterAverageTotalRate gets the value of RequesterAverageTotalRate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterAverageTotalRate() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterAverageTotalRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterCurrentTotalRate sets the value of RequesterCurrentTotalRate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterCurrentTotalRate(value uint64) (err error) { + return instance.SetProperty("RequesterCurrentTotalRate", (value)) +} + +// GetRequesterCurrentTotalRate gets the value of RequesterCurrentTotalRate for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterCurrentTotalRate() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterCurrentTotalRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterIgnoredLimitationRequest sets the value of RequesterIgnoredLimitationRequest for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterIgnoredLimitationRequest(value uint64) (err error) { + return instance.SetProperty("RequesterIgnoredLimitationRequest", (value)) +} + +// GetRequesterIgnoredLimitationRequest gets the value of RequesterIgnoredLimitationRequest for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterIgnoredLimitationRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterIgnoredLimitationRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterSuccessfullyHandledLimitationRequest sets the value of RequesterSuccessfullyHandledLimitationRequest for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterSuccessfullyHandledLimitationRequest(value uint64) (err error) { + return instance.SetProperty("RequesterSuccessfullyHandledLimitationRequest", (value)) +} + +// GetRequesterSuccessfullyHandledLimitationRequest gets the value of RequesterSuccessfullyHandledLimitationRequest for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterSuccessfullyHandledLimitationRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterSuccessfullyHandledLimitationRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTotalAllocatedRateLimiters sets the value of RequesterTotalAllocatedRateLimiters for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterTotalAllocatedRateLimiters(value uint32) (err error) { + return instance.SetProperty("RequesterTotalAllocatedRateLimiters", (value)) +} + +// GetRequesterTotalAllocatedRateLimiters gets the value of RequesterTotalAllocatedRateLimiters for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterTotalAllocatedRateLimiters() (value uint32, err error) { + retValue, err := instance.GetProperty("RequesterTotalAllocatedRateLimiters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequesterTrafficRateHighPeak sets the value of RequesterTrafficRateHighPeak for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterTrafficRateHighPeak(value uint64) (err error) { + return instance.SetProperty("RequesterTrafficRateHighPeak", (value)) +} + +// GetRequesterTrafficRateHighPeak gets the value of RequesterTrafficRateHighPeak for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterTrafficRateHighPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTrafficRateHighPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTrafficRateLowPeak sets the value of RequesterTrafficRateLowPeak for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterTrafficRateLowPeak(value uint64) (err error) { + return instance.SetProperty("RequesterTrafficRateLowPeak", (value)) +} + +// GetRequesterTrafficRateLowPeak gets the value of RequesterTrafficRateLowPeak for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterTrafficRateLowPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTrafficRateLowPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderActiveCNP sets the value of ResponderActiveCNP for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderActiveCNP(value uint64) (err error) { + return instance.SetProperty("ResponderActiveCNP", (value)) +} + +// GetResponderActiveCNP gets the value of ResponderActiveCNP for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderActiveCNP() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderActiveCNP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderCNPSentSuccessfully sets the value of ResponderCNPSentSuccessfully for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderCNPSentSuccessfully(value uint64) (err error) { + return instance.SetProperty("ResponderCNPSentSuccessfully", (value)) +} + +// GetResponderCNPSentSuccessfully gets the value of ResponderCNPSentSuccessfully for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderCNPSentSuccessfully() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderCNPSentSuccessfully") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderECNHandledSuccessfully sets the value of ResponderECNHandledSuccessfully for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderECNHandledSuccessfully(value uint64) (err error) { + return instance.SetProperty("ResponderECNHandledSuccessfully", (value)) +} + +// GetResponderECNHandledSuccessfully gets the value of ResponderECNHandledSuccessfully for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderECNHandledSuccessfully() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderECNHandledSuccessfully") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderIgnoredECN sets the value of ResponderIgnoredECN for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderIgnoredECN(value uint64) (err error) { + return instance.SetProperty("ResponderIgnoredECN", (value)) +} + +// GetResponderIgnoredECN gets the value of ResponderIgnoredECN for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderIgnoredECN() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderIgnoredECN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderIgnoredECNdueCNPcoalesce sets the value of ResponderIgnoredECNdueCNPcoalesce for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderIgnoredECNdueCNPcoalesce(value uint64) (err error) { + return instance.SetProperty("ResponderIgnoredECNdueCNPcoalesce", (value)) +} + +// GetResponderIgnoredECNdueCNPcoalesce gets the value of ResponderIgnoredECNdueCNPcoalesce for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderIgnoredECNdueCNPcoalesce() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderIgnoredECNdueCNPcoalesce") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentDiscardFrames sets the value of SentDiscardFrames for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertySentDiscardFrames(value uint64) (err error) { + return instance.SetProperty("SentDiscardFrames", (value)) +} + +// GetSentDiscardFrames gets the value of SentDiscardFrames for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertySentDiscardFrames() (value uint64, err error) { + retValue, err := instance.GetProperty("SentDiscardFrames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentPauseDuration sets the value of SentPauseDuration for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertySentPauseDuration(value uint64) (err error) { + return instance.SetProperty("SentPauseDuration", (value)) +} + +// GetSentPauseDuration gets the value of SentPauseDuration for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertySentPauseDuration() (value uint64, err error) { + retValue, err := instance.GetProperty("SentPauseDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentPauseFrames sets the value of SentPauseFrames for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertySentPauseFrames(value uint64) (err error) { + return instance.SetProperty("SentPauseFrames", (value)) +} + +// GetSentPauseFrames gets the value of SentPauseFrames for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertySentPauseFrames() (value uint64, err error) { + retValue, err := instance.GetProperty("SentPauseFrames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters.go new file mode 100644 index 00000000..64f86a83 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters struct +type Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters struct { + *Win32_PerfFormattedData + + // + EncapsulatedNonRssIPv4Only uint64 + + // + EncapsulatedNonRssIPv4PerTcp uint32 + + // + EncapsulatedNonRssIPv4PerUdp uint32 + + // + EncapsulatedNonRssIPv6Only uint64 + + // + EncapsulatedNonRssIPv6PerTcp uint32 + + // + EncapsulatedNonRssIPv6PerUdp uint32 + + // + EncapsulatedNonRssMisc uint32 + + // + EncapsulatedRssIPv4Only uint64 + + // + EncapsulatedRssIPv4PerTcp uint32 + + // + EncapsulatedRssIPv4PerUdp uint32 + + // + EncapsulatedRssIPv6Only uint64 + + // + EncapsulatedRssIPv6PerTcp uint32 + + // + EncapsulatedRssIPv6PerUdp uint32 + + // + EncapsulatedRssMisc uint32 + + // + NonRssIPv4Only uint64 + + // + NonRssIPv4PerTcp uint32 + + // + NonRssIPv4PerUdp uint32 + + // + NonRssIPv6Only uint64 + + // + NonRssIPv6PerTcp uint32 + + // + NonRssIPv6PerUdp uint32 + + // + NonRssMisc uint32 + + // + RssIPv4Only uint64 + + // + RssIPv4PerTcp uint32 + + // + RssIPv4PerUdp uint32 + + // + RssIPv6Only uint64 + + // + RssIPv6PerTcp uint32 + + // + RssIPv6PerUdp uint32 + + // + RssMisc uint32 +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetEncapsulatedNonRssIPv4Only sets the value of EncapsulatedNonRssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv4Only", (value)) +} + +// GetEncapsulatedNonRssIPv4Only gets the value of EncapsulatedNonRssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv4PerTcp sets the value of EncapsulatedNonRssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv4PerTcp", (value)) +} + +// GetEncapsulatedNonRssIPv4PerTcp gets the value of EncapsulatedNonRssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv4PerUdp sets the value of EncapsulatedNonRssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv4PerUdp", (value)) +} + +// GetEncapsulatedNonRssIPv4PerUdp gets the value of EncapsulatedNonRssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv6Only sets the value of EncapsulatedNonRssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv6Only", (value)) +} + +// GetEncapsulatedNonRssIPv6Only gets the value of EncapsulatedNonRssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv6PerTcp sets the value of EncapsulatedNonRssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv6PerTcp", (value)) +} + +// GetEncapsulatedNonRssIPv6PerTcp gets the value of EncapsulatedNonRssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv6PerUdp sets the value of EncapsulatedNonRssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv6PerUdp", (value)) +} + +// GetEncapsulatedNonRssIPv6PerUdp gets the value of EncapsulatedNonRssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssMisc sets the value of EncapsulatedNonRssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssMisc(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssMisc", (value)) +} + +// GetEncapsulatedNonRssMisc gets the value of EncapsulatedNonRssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv4Only sets the value of EncapsulatedRssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedRssIPv4Only", (value)) +} + +// GetEncapsulatedRssIPv4Only gets the value of EncapsulatedRssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedRssIPv4PerTcp sets the value of EncapsulatedRssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv4PerTcp", (value)) +} + +// GetEncapsulatedRssIPv4PerTcp gets the value of EncapsulatedRssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv4PerUdp sets the value of EncapsulatedRssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv4PerUdp", (value)) +} + +// GetEncapsulatedRssIPv4PerUdp gets the value of EncapsulatedRssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv6Only sets the value of EncapsulatedRssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedRssIPv6Only", (value)) +} + +// GetEncapsulatedRssIPv6Only gets the value of EncapsulatedRssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedRssIPv6PerTcp sets the value of EncapsulatedRssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv6PerTcp", (value)) +} + +// GetEncapsulatedRssIPv6PerTcp gets the value of EncapsulatedRssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv6PerUdp sets the value of EncapsulatedRssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv6PerUdp", (value)) +} + +// GetEncapsulatedRssIPv6PerUdp gets the value of EncapsulatedRssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssMisc sets the value of EncapsulatedRssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssMisc(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssMisc", (value)) +} + +// GetEncapsulatedRssMisc gets the value of EncapsulatedRssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv4Only sets the value of NonRssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("NonRssIPv4Only", (value)) +} + +// GetNonRssIPv4Only gets the value of NonRssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("NonRssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonRssIPv4PerTcp sets the value of NonRssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv4PerTcp", (value)) +} + +// GetNonRssIPv4PerTcp gets the value of NonRssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv4PerUdp sets the value of NonRssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv4PerUdp", (value)) +} + +// GetNonRssIPv4PerUdp gets the value of NonRssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv6Only sets the value of NonRssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("NonRssIPv6Only", (value)) +} + +// GetNonRssIPv6Only gets the value of NonRssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("NonRssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonRssIPv6PerTcp sets the value of NonRssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv6PerTcp", (value)) +} + +// GetNonRssIPv6PerTcp gets the value of NonRssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv6PerUdp sets the value of NonRssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv6PerUdp", (value)) +} + +// GetNonRssIPv6PerUdp gets the value of NonRssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssMisc sets the value of NonRssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssMisc(value uint32) (err error) { + return instance.SetProperty("NonRssMisc", (value)) +} + +// GetNonRssMisc gets the value of NonRssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv4Only sets the value of RssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("RssIPv4Only", (value)) +} + +// GetRssIPv4Only gets the value of RssIPv4Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("RssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRssIPv4PerTcp sets the value of RssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("RssIPv4PerTcp", (value)) +} + +// GetRssIPv4PerTcp gets the value of RssIPv4PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv4PerUdp sets the value of RssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("RssIPv4PerUdp", (value)) +} + +// GetRssIPv4PerUdp gets the value of RssIPv4PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv6Only sets the value of RssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("RssIPv6Only", (value)) +} + +// GetRssIPv6Only gets the value of RssIPv6Only for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("RssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRssIPv6PerTcp sets the value of RssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("RssIPv6PerTcp", (value)) +} + +// GetRssIPv6PerTcp gets the value of RssIPv6PerTcp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv6PerUdp sets the value of RssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("RssIPv6PerUdp", (value)) +} + +// GetRssIPv6PerUdp gets the value of RssIPv6PerUdp for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssMisc sets the value of RssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssMisc(value uint32) (err error) { + return instance.SetProperty("RssMisc", (value)) +} + +// GetRssMisc gets the value of RssMisc for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("RssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go new file mode 100644 index 00000000..35534a76 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters struct +type Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + BytesTotal uint64 + + // + ControlPackets uint64 + + // + KBytesReceivedPerSec uint32 + + // + KBytesSentPerSec uint32 + + // + KBytesTotalPerSec uint32 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsReceived uint64 + + // + PacketsReceivedBadCRCError uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedFrameLengthError uint64 + + // + PacketsReceivedPerSec uint32 + + // + PacketsReceivedSymbolError uint64 + + // + PacketsSent uint64 + + // + PacketsSentPerSec uint32 + + // + PacketsTotal uint64 + + // + PacketsTotalPerSec uint32 +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlPackets sets the value of ControlPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyControlPackets(value uint64) (err error) { + return instance.SetProperty("ControlPackets", (value)) +} + +// GetControlPackets gets the value of ControlPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyControlPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKBytesReceivedPerSec sets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyKBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesReceivedPerSec", (value)) +} + +// GetKBytesReceivedPerSec gets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyKBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesSentPerSec sets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyKBytesSentPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesSentPerSec", (value)) +} + +// GetKBytesSentPerSec gets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyKBytesSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesTotalPerSec sets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyKBytesTotalPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesTotalPerSec", (value)) +} + +// GetKBytesTotalPerSec gets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyKBytesTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedBadCRCError sets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedBadCRCError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedBadCRCError", (value)) +} + +// GetPacketsReceivedBadCRCError gets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedBadCRCError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedBadCRCError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedFrameLengthError sets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedFrameLengthError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedFrameLengthError", (value)) +} + +// GetPacketsReceivedFrameLengthError gets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedFrameLengthError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedFrameLengthError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPerSec sets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPerSec", (value)) +} + +// GetPacketsReceivedPerSec gets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedSymbolError sets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedSymbolError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedSymbolError", (value)) +} + +// GetPacketsReceivedSymbolError gets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedSymbolError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedSymbolError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSent sets the value of PacketsSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsSent(value uint64) (err error) { + return instance.SetProperty("PacketsSent", (value)) +} + +// GetPacketsSent gets the value of PacketsSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPerSec sets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsSentPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsSentPerSec", (value)) +} + +// GetPacketsSentPerSec gets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsTotal sets the value of PacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PacketsTotal", (value)) +} + +// GetPacketsTotal gets the value of PacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTotalPerSec sets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsTotalPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsTotalPerSec", (value)) +} + +// GetPacketsTotalPerSec gets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go new file mode 100644 index 00000000..4298d8bc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters struct +type Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters struct { + *Win32_PerfFormattedData + + // + CQOverflows uint64 + + // + RequesterCQEErrors uint64 + + // + RequesterInvalidRequestErrors uint64 + + // + RequesterLengthErrors uint64 + + // + RequesterOutoforderSequenceNAK uint64 + + // + RequesterProtectionErrors uint64 + + // + RequesterQPOperationErrors uint64 + + // + RequesterRemoteAccessErrors uint64 + + // + RequesterRemoteOperationErrors uint64 + + // + RequesterRNRNAK uint64 + + // + RequesterRNRNAKRetriesExceededErrors uint64 + + // + RequesterTimeoutReceived uint64 + + // + RequesterTransportRetriesExceededErrors uint64 + + // + ResponderCQEErrors uint64 + + // + ResponderDuplicateRequestReceived uint64 + + // + ResponderInvalidRequestErrors uint64 + + // + ResponderLengthErrors uint64 + + // + ResponderOutoforderSequenceReceived uint64 + + // + ResponderProtectionErrors uint64 + + // + ResponderQPOperationErrors uint64 + + // + ResponderRemoteAccessErrors uint64 + + // + ResponderRNRNAK uint64 + + // + TXRingIsFullPackets uint64 +} + +func NewWin32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCQOverflows sets the value of CQOverflows for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyCQOverflows(value uint64) (err error) { + return instance.SetProperty("CQOverflows", (value)) +} + +// GetCQOverflows gets the value of CQOverflows for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyCQOverflows() (value uint64, err error) { + retValue, err := instance.GetProperty("CQOverflows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterCQEErrors sets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterCQEErrors(value uint64) (err error) { + return instance.SetProperty("RequesterCQEErrors", (value)) +} + +// GetRequesterCQEErrors gets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterInvalidRequestErrors sets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("RequesterInvalidRequestErrors", (value)) +} + +// GetRequesterInvalidRequestErrors gets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterLengthErrors sets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterLengthErrors(value uint64) (err error) { + return instance.SetProperty("RequesterLengthErrors", (value)) +} + +// GetRequesterLengthErrors gets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterOutoforderSequenceNAK sets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterOutoforderSequenceNAK(value uint64) (err error) { + return instance.SetProperty("RequesterOutoforderSequenceNAK", (value)) +} + +// GetRequesterOutoforderSequenceNAK gets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterOutoforderSequenceNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterOutoforderSequenceNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterProtectionErrors sets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterProtectionErrors(value uint64) (err error) { + return instance.SetProperty("RequesterProtectionErrors", (value)) +} + +// GetRequesterProtectionErrors gets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterQPOperationErrors sets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterQPOperationErrors", (value)) +} + +// GetRequesterQPOperationErrors gets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteAccessErrors sets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteAccessErrors", (value)) +} + +// GetRequesterRemoteAccessErrors gets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteOperationErrors sets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRemoteOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteOperationErrors", (value)) +} + +// GetRequesterRemoteOperationErrors gets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRemoteOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAK sets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRNRNAK(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAK", (value)) +} + +// GetRequesterRNRNAK gets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAKRetriesExceededErrors sets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRNRNAKRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAKRetriesExceededErrors", (value)) +} + +// GetRequesterRNRNAKRetriesExceededErrors gets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRNRNAKRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAKRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTimeoutReceived sets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterTimeoutReceived(value uint64) (err error) { + return instance.SetProperty("RequesterTimeoutReceived", (value)) +} + +// GetRequesterTimeoutReceived gets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterTimeoutReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTimeoutReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTransportRetriesExceededErrors sets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterTransportRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterTransportRetriesExceededErrors", (value)) +} + +// GetRequesterTransportRetriesExceededErrors gets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterTransportRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTransportRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderCQEErrors sets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderCQEErrors(value uint64) (err error) { + return instance.SetProperty("ResponderCQEErrors", (value)) +} + +// GetResponderCQEErrors gets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderDuplicateRequestReceived sets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderDuplicateRequestReceived(value uint64) (err error) { + return instance.SetProperty("ResponderDuplicateRequestReceived", (value)) +} + +// GetResponderDuplicateRequestReceived gets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderDuplicateRequestReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderDuplicateRequestReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderInvalidRequestErrors sets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("ResponderInvalidRequestErrors", (value)) +} + +// GetResponderInvalidRequestErrors gets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderLengthErrors sets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderLengthErrors(value uint64) (err error) { + return instance.SetProperty("ResponderLengthErrors", (value)) +} + +// GetResponderLengthErrors gets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderOutoforderSequenceReceived sets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderOutoforderSequenceReceived(value uint64) (err error) { + return instance.SetProperty("ResponderOutoforderSequenceReceived", (value)) +} + +// GetResponderOutoforderSequenceReceived gets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderOutoforderSequenceReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderOutoforderSequenceReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderProtectionErrors sets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderProtectionErrors(value uint64) (err error) { + return instance.SetProperty("ResponderProtectionErrors", (value)) +} + +// GetResponderProtectionErrors gets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderQPOperationErrors sets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("ResponderQPOperationErrors", (value)) +} + +// GetResponderQPOperationErrors gets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRemoteAccessErrors sets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("ResponderRemoteAccessErrors", (value)) +} + +// GetResponderRemoteAccessErrors gets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRNRNAK sets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderRNRNAK(value uint64) (err error) { + return instance.SetProperty("ResponderRNRNAK", (value)) +} + +// GetResponderRNRNAK gets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXRingIsFullPackets sets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyTXRingIsFullPackets(value uint64) (err error) { + return instance.SetProperty("TXRingIsFullPackets", (value)) +} + +// GetTXRingIsFullPackets gets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyTXRingIsFullPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TXRingIsFullPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go new file mode 100644 index 00000000..b8b3872b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters struct +type Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + BytesTotal uint64 + + // + ControlPackets uint64 + + // + KBytesReceivedPerSec uint32 + + // + KBytesSentPerSec uint32 + + // + KBytesTotalPerSec uint32 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsReceived uint64 + + // + PacketsReceivedBadCRCError uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedFrameLengthError uint64 + + // + PacketsReceivedPerSec uint32 + + // + PacketsReceivedSymbolError uint64 + + // + PacketsSent uint64 + + // + PacketsSentPerSec uint32 + + // + PacketsTotal uint64 + + // + PacketsTotalPerSec uint32 +} + +func NewWin32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlPackets sets the value of ControlPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyControlPackets(value uint64) (err error) { + return instance.SetProperty("ControlPackets", (value)) +} + +// GetControlPackets gets the value of ControlPackets for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyControlPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKBytesReceivedPerSec sets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyKBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesReceivedPerSec", (value)) +} + +// GetKBytesReceivedPerSec gets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyKBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesSentPerSec sets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyKBytesSentPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesSentPerSec", (value)) +} + +// GetKBytesSentPerSec gets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyKBytesSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesTotalPerSec sets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyKBytesTotalPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesTotalPerSec", (value)) +} + +// GetKBytesTotalPerSec gets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyKBytesTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedBadCRCError sets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedBadCRCError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedBadCRCError", (value)) +} + +// GetPacketsReceivedBadCRCError gets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedBadCRCError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedBadCRCError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedFrameLengthError sets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedFrameLengthError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedFrameLengthError", (value)) +} + +// GetPacketsReceivedFrameLengthError gets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedFrameLengthError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedFrameLengthError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPerSec sets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPerSec", (value)) +} + +// GetPacketsReceivedPerSec gets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedSymbolError sets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedSymbolError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedSymbolError", (value)) +} + +// GetPacketsReceivedSymbolError gets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedSymbolError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedSymbolError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSent sets the value of PacketsSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsSent(value uint64) (err error) { + return instance.SetProperty("PacketsSent", (value)) +} + +// GetPacketsSent gets the value of PacketsSent for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPerSec sets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsSentPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsSentPerSec", (value)) +} + +// GetPacketsSentPerSec gets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsTotal sets the value of PacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PacketsTotal", (value)) +} + +// GetPacketsTotal gets the value of PacketsTotal for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTotalPerSec sets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsTotalPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsTotalPerSec", (value)) +} + +// GetPacketsTotalPerSec gets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfFormattedData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go new file mode 100644 index 00000000..3ba19639 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go @@ -0,0 +1,69 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager struct +type Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager struct { + *Win32_PerfFormattedData + + // + MemoryBlockCount uint64 +} + +func NewWin32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMemoryBlockCount sets the value of MemoryBlockCount for the instance +func (instance *Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager) SetPropertyMemoryBlockCount(value uint64) (err error) { + return instance.SetProperty("MemoryBlockCount", value) +} + +// GetMemoryBlockCount gets the value of MemoryBlockCount for the instance +func (instance *Win32_PerfFormattedData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager) GetPropertyMemoryBlockCount() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryBlockCount") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRData_NETCLRData.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRData_NETCLRData.go new file mode 100644 index 00000000..dc089aed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRData_NETCLRData.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETCLRData_NETCLRData struct +type Win32_PerfFormattedData_NETCLRData_NETCLRData struct { + *Win32_PerfFormattedData + + // + SqlClientCurrentNumberconnectionpools uint32 + + // + SqlClientCurrentNumberpooledandnonpooledconnections uint32 + + // + SqlClientCurrentNumberpooledconnections uint32 + + // + SqlClientPeakNumberpooledconnections uint32 + + // + SqlClientTotalNumberfailedcommands uint32 + + // + SqlClientTotalNumberfailedconnects uint32 +} + +func NewWin32_PerfFormattedData_NETCLRData_NETCLRDataEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETCLRData_NETCLRData, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETCLRData_NETCLRData{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETCLRData_NETCLRDataEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETCLRData_NETCLRData, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETCLRData_NETCLRData{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetSqlClientCurrentNumberconnectionpools sets the value of SqlClientCurrentNumberconnectionpools for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) SetPropertySqlClientCurrentNumberconnectionpools(value uint32) (err error) { + return instance.SetProperty("SqlClientCurrentNumberconnectionpools", (value)) +} + +// GetSqlClientCurrentNumberconnectionpools gets the value of SqlClientCurrentNumberconnectionpools for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) GetPropertySqlClientCurrentNumberconnectionpools() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientCurrentNumberconnectionpools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientCurrentNumberpooledandnonpooledconnections sets the value of SqlClientCurrentNumberpooledandnonpooledconnections for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) SetPropertySqlClientCurrentNumberpooledandnonpooledconnections(value uint32) (err error) { + return instance.SetProperty("SqlClientCurrentNumberpooledandnonpooledconnections", (value)) +} + +// GetSqlClientCurrentNumberpooledandnonpooledconnections gets the value of SqlClientCurrentNumberpooledandnonpooledconnections for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) GetPropertySqlClientCurrentNumberpooledandnonpooledconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientCurrentNumberpooledandnonpooledconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientCurrentNumberpooledconnections sets the value of SqlClientCurrentNumberpooledconnections for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) SetPropertySqlClientCurrentNumberpooledconnections(value uint32) (err error) { + return instance.SetProperty("SqlClientCurrentNumberpooledconnections", (value)) +} + +// GetSqlClientCurrentNumberpooledconnections gets the value of SqlClientCurrentNumberpooledconnections for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) GetPropertySqlClientCurrentNumberpooledconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientCurrentNumberpooledconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientPeakNumberpooledconnections sets the value of SqlClientPeakNumberpooledconnections for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) SetPropertySqlClientPeakNumberpooledconnections(value uint32) (err error) { + return instance.SetProperty("SqlClientPeakNumberpooledconnections", (value)) +} + +// GetSqlClientPeakNumberpooledconnections gets the value of SqlClientPeakNumberpooledconnections for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) GetPropertySqlClientPeakNumberpooledconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientPeakNumberpooledconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientTotalNumberfailedcommands sets the value of SqlClientTotalNumberfailedcommands for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) SetPropertySqlClientTotalNumberfailedcommands(value uint32) (err error) { + return instance.SetProperty("SqlClientTotalNumberfailedcommands", (value)) +} + +// GetSqlClientTotalNumberfailedcommands gets the value of SqlClientTotalNumberfailedcommands for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) GetPropertySqlClientTotalNumberfailedcommands() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientTotalNumberfailedcommands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientTotalNumberfailedconnects sets the value of SqlClientTotalNumberfailedconnects for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) SetPropertySqlClientTotalNumberfailedconnects(value uint32) (err error) { + return instance.SetProperty("SqlClientTotalNumberfailedconnects", (value)) +} + +// GetSqlClientTotalNumberfailedconnects gets the value of SqlClientTotalNumberfailedconnects for the instance +func (instance *Win32_PerfFormattedData_NETCLRData_NETCLRData) GetPropertySqlClientTotalNumberfailedconnects() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientTotalNumberfailedconnects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000.go new file mode 100644 index 00000000..6bb1171c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000 struct +type Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000 struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + ConnectionsEstablished uint32 + + // + DatagramsReceived uint32 + + // + DatagramsSent uint32 + + // + HttpWebRequestsAbortedPerSec uint32 + + // + HttpWebRequestsAverageLifetime uint64 + + // + HttpWebRequestsAverageQueueTime uint64 + + // + HttpWebRequestsCreatedPerSec uint32 + + // + HttpWebRequestsFailedPerSec uint32 + + // + HttpWebRequestsQueuedPerSec uint32 +} + +func NewWin32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceived sets the value of DatagramsReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyDatagramsReceived(value uint32) (err error) { + return instance.SetProperty("DatagramsReceived", (value)) +} + +// GetDatagramsReceived gets the value of DatagramsReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyDatagramsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSent sets the value of DatagramsSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyDatagramsSent(value uint32) (err error) { + return instance.SetProperty("DatagramsSent", (value)) +} + +// GetDatagramsSent gets the value of DatagramsSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyDatagramsSent() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsAbortedPerSec sets the value of HttpWebRequestsAbortedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAbortedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsAbortedPerSec", (value)) +} + +// GetHttpWebRequestsAbortedPerSec gets the value of HttpWebRequestsAbortedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAbortedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAbortedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsAverageLifetime sets the value of HttpWebRequestsAverageLifetime for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAverageLifetime(value uint64) (err error) { + return instance.SetProperty("HttpWebRequestsAverageLifetime", (value)) +} + +// GetHttpWebRequestsAverageLifetime gets the value of HttpWebRequestsAverageLifetime for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAverageLifetime() (value uint64, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAverageLifetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHttpWebRequestsAverageQueueTime sets the value of HttpWebRequestsAverageQueueTime for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAverageQueueTime(value uint64) (err error) { + return instance.SetProperty("HttpWebRequestsAverageQueueTime", (value)) +} + +// GetHttpWebRequestsAverageQueueTime gets the value of HttpWebRequestsAverageQueueTime for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAverageQueueTime() (value uint64, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAverageQueueTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHttpWebRequestsCreatedPerSec sets the value of HttpWebRequestsCreatedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsCreatedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsCreatedPerSec", (value)) +} + +// GetHttpWebRequestsCreatedPerSec gets the value of HttpWebRequestsCreatedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsCreatedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsCreatedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsFailedPerSec sets the value of HttpWebRequestsFailedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsFailedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsFailedPerSec", (value)) +} + +// GetHttpWebRequestsFailedPerSec gets the value of HttpWebRequestsFailedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsFailedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsFailedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsQueuedPerSec sets the value of HttpWebRequestsQueuedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsQueuedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsQueuedPerSec", (value)) +} + +// GetHttpWebRequestsQueuedPerSec gets the value of HttpWebRequestsQueuedPerSec for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsQueuedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsQueuedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking.go new file mode 100644 index 00000000..017daf10 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking struct +type Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + ConnectionsEstablished uint32 + + // + DatagramsReceived uint32 + + // + DatagramsSent uint32 +} + +func NewWin32_PerfFormattedData_NETCLRNetworking_NETCLRNetworkingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETCLRNetworking_NETCLRNetworkingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceived sets the value of DatagramsReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) SetPropertyDatagramsReceived(value uint32) (err error) { + return instance.SetProperty("DatagramsReceived", (value)) +} + +// GetDatagramsReceived gets the value of DatagramsReceived for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) GetPropertyDatagramsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSent sets the value of DatagramsSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) SetPropertyDatagramsSent(value uint32) (err error) { + return instance.SetProperty("DatagramsSent", (value)) +} + +// GetDatagramsSent gets the value of DatagramsSent for the instance +func (instance *Win32_PerfFormattedData_NETCLRNetworking_NETCLRNetworking) GetPropertyDatagramsSent() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle.go new file mode 100644 index 00000000..81b32000 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle struct +type Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle struct { + *Win32_PerfFormattedData + + // + HardConnectsPerSecond uint32 + + // + HardDisconnectsPerSecond uint32 + + // + NumberOfActiveConnectionPoolGroups uint32 + + // + NumberOfActiveConnectionPools uint32 + + // + NumberOfActiveConnections uint32 + + // + NumberOfFreeConnections uint32 + + // + NumberOfInactiveConnectionPoolGroups uint32 + + // + NumberOfInactiveConnectionPools uint32 + + // + NumberOfNonPooledConnections uint32 + + // + NumberOfPooledConnections uint32 + + // + NumberOfReclaimedConnections uint32 + + // + NumberOfStasisConnections uint32 + + // + SoftConnectsPerSecond uint32 + + // + SoftDisconnectsPerSecond uint32 +} + +func NewWin32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracleEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracleEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHardConnectsPerSecond sets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyHardConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardConnectsPerSecond", (value)) +} + +// GetHardConnectsPerSecond gets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyHardConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHardDisconnectsPerSecond sets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyHardDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardDisconnectsPerSecond", (value)) +} + +// GetHardDisconnectsPerSecond gets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyHardDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPoolGroups sets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfActiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPoolGroups", (value)) +} + +// GetNumberOfActiveConnectionPoolGroups gets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfActiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPools sets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfActiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPools", (value)) +} + +// GetNumberOfActiveConnectionPools gets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfActiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnections sets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfActiveConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnections", (value)) +} + +// GetNumberOfActiveConnections gets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfActiveConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfFreeConnections sets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfFreeConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfFreeConnections", (value)) +} + +// GetNumberOfFreeConnections gets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfFreeConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfFreeConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPoolGroups sets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfInactiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPoolGroups", (value)) +} + +// GetNumberOfInactiveConnectionPoolGroups gets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfInactiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPools sets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfInactiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPools", (value)) +} + +// GetNumberOfInactiveConnectionPools gets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfInactiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfNonPooledConnections sets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfNonPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfNonPooledConnections", (value)) +} + +// GetNumberOfNonPooledConnections gets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfNonPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfNonPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfPooledConnections sets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfPooledConnections", (value)) +} + +// GetNumberOfPooledConnections gets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfReclaimedConnections sets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfReclaimedConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfReclaimedConnections", (value)) +} + +// GetNumberOfReclaimedConnections gets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfReclaimedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfReclaimedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfStasisConnections sets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfStasisConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfStasisConnections", (value)) +} + +// GetNumberOfStasisConnections gets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfStasisConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfStasisConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftConnectsPerSecond sets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertySoftConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftConnectsPerSecond", (value)) +} + +// GetSoftConnectsPerSecond gets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertySoftConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftDisconnectsPerSecond sets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertySoftDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftDisconnectsPerSecond", (value)) +} + +// GetSoftDisconnectsPerSecond gets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertySoftDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go new file mode 100644 index 00000000..d4174f47 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer struct +type Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer struct { + *Win32_PerfFormattedData + + // + HardConnectsPerSecond uint32 + + // + HardDisconnectsPerSecond uint32 + + // + NumberOfActiveConnectionPoolGroups uint32 + + // + NumberOfActiveConnectionPools uint32 + + // + NumberOfActiveConnections uint32 + + // + NumberOfFreeConnections uint32 + + // + NumberOfInactiveConnectionPoolGroups uint32 + + // + NumberOfInactiveConnectionPools uint32 + + // + NumberOfNonPooledConnections uint32 + + // + NumberOfPooledConnections uint32 + + // + NumberOfReclaimedConnections uint32 + + // + NumberOfStasisConnections uint32 + + // + SoftConnectsPerSecond uint32 + + // + SoftDisconnectsPerSecond uint32 +} + +func NewWin32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHardConnectsPerSecond sets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyHardConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardConnectsPerSecond", (value)) +} + +// GetHardConnectsPerSecond gets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyHardConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHardDisconnectsPerSecond sets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyHardDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardDisconnectsPerSecond", (value)) +} + +// GetHardDisconnectsPerSecond gets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyHardDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPoolGroups sets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfActiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPoolGroups", (value)) +} + +// GetNumberOfActiveConnectionPoolGroups gets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfActiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPools sets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfActiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPools", (value)) +} + +// GetNumberOfActiveConnectionPools gets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfActiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnections sets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfActiveConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnections", (value)) +} + +// GetNumberOfActiveConnections gets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfActiveConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfFreeConnections sets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfFreeConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfFreeConnections", (value)) +} + +// GetNumberOfFreeConnections gets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfFreeConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfFreeConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPoolGroups sets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfInactiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPoolGroups", (value)) +} + +// GetNumberOfInactiveConnectionPoolGroups gets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfInactiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPools sets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfInactiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPools", (value)) +} + +// GetNumberOfInactiveConnectionPools gets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfInactiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfNonPooledConnections sets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfNonPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfNonPooledConnections", (value)) +} + +// GetNumberOfNonPooledConnections gets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfNonPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfNonPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfPooledConnections sets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfPooledConnections", (value)) +} + +// GetNumberOfPooledConnections gets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfReclaimedConnections sets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfReclaimedConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfReclaimedConnections", (value)) +} + +// GetNumberOfReclaimedConnections gets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfReclaimedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfReclaimedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfStasisConnections sets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfStasisConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfStasisConnections", (value)) +} + +// GetNumberOfStasisConnections gets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfStasisConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfStasisConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftConnectsPerSecond sets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertySoftConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftConnectsPerSecond", (value)) +} + +// GetSoftConnectsPerSecond gets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertySoftConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftDisconnectsPerSecond sets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertySoftDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftDisconnectsPerSecond", (value)) +} + +// GetSoftDisconnectsPerSecond gets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertySoftDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRExceptions.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRExceptions.go new file mode 100644 index 00000000..08de3590 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRExceptions.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRExceptions struct +type Win32_PerfFormattedData_NETFramework_NETCLRExceptions struct { + *Win32_PerfFormattedData + + // + NumberofExcepsThrown uint32 + + // + NumberofExcepsThrownPersec uint32 + + // + NumberofFiltersPersec uint32 + + // + NumberofFinallysPersec uint32 + + // + ThrowToCatchDepthPersec uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRExceptionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRExceptions{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRExceptionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRExceptions{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberofExcepsThrown sets the value of NumberofExcepsThrown for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) SetPropertyNumberofExcepsThrown(value uint32) (err error) { + return instance.SetProperty("NumberofExcepsThrown", (value)) +} + +// GetNumberofExcepsThrown gets the value of NumberofExcepsThrown for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) GetPropertyNumberofExcepsThrown() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofExcepsThrown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofExcepsThrownPersec sets the value of NumberofExcepsThrownPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) SetPropertyNumberofExcepsThrownPersec(value uint32) (err error) { + return instance.SetProperty("NumberofExcepsThrownPersec", (value)) +} + +// GetNumberofExcepsThrownPersec gets the value of NumberofExcepsThrownPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) GetPropertyNumberofExcepsThrownPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofExcepsThrownPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofFiltersPersec sets the value of NumberofFiltersPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) SetPropertyNumberofFiltersPersec(value uint32) (err error) { + return instance.SetProperty("NumberofFiltersPersec", (value)) +} + +// GetNumberofFiltersPersec gets the value of NumberofFiltersPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) GetPropertyNumberofFiltersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofFiltersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofFinallysPersec sets the value of NumberofFinallysPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) SetPropertyNumberofFinallysPersec(value uint32) (err error) { + return instance.SetProperty("NumberofFinallysPersec", (value)) +} + +// GetNumberofFinallysPersec gets the value of NumberofFinallysPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) GetPropertyNumberofFinallysPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofFinallysPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThrowToCatchDepthPersec sets the value of ThrowToCatchDepthPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) SetPropertyThrowToCatchDepthPersec(value uint32) (err error) { + return instance.SetProperty("ThrowToCatchDepthPersec", (value)) +} + +// GetThrowToCatchDepthPersec gets the value of ThrowToCatchDepthPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRExceptions) GetPropertyThrowToCatchDepthPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ThrowToCatchDepthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRInterop.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRInterop.go new file mode 100644 index 00000000..3ad8fb42 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRInterop.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRInterop struct +type Win32_PerfFormattedData_NETFramework_NETCLRInterop struct { + *Win32_PerfFormattedData + + // + NumberofCCWs uint32 + + // + Numberofmarshalling uint32 + + // + NumberofStubs uint32 + + // + NumberofTLBexportsPersec uint32 + + // + NumberofTLBimportsPersec uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRInteropEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRInterop, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRInterop{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRInteropEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRInterop, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRInterop{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberofCCWs sets the value of NumberofCCWs for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) SetPropertyNumberofCCWs(value uint32) (err error) { + return instance.SetProperty("NumberofCCWs", (value)) +} + +// GetNumberofCCWs gets the value of NumberofCCWs for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) GetPropertyNumberofCCWs() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofCCWs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofmarshalling sets the value of Numberofmarshalling for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) SetPropertyNumberofmarshalling(value uint32) (err error) { + return instance.SetProperty("Numberofmarshalling", (value)) +} + +// GetNumberofmarshalling gets the value of Numberofmarshalling for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) GetPropertyNumberofmarshalling() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofmarshalling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofStubs sets the value of NumberofStubs for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) SetPropertyNumberofStubs(value uint32) (err error) { + return instance.SetProperty("NumberofStubs", (value)) +} + +// GetNumberofStubs gets the value of NumberofStubs for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) GetPropertyNumberofStubs() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofStubs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofTLBexportsPersec sets the value of NumberofTLBexportsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) SetPropertyNumberofTLBexportsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofTLBexportsPersec", (value)) +} + +// GetNumberofTLBexportsPersec gets the value of NumberofTLBexportsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) GetPropertyNumberofTLBexportsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofTLBexportsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofTLBimportsPersec sets the value of NumberofTLBimportsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) SetPropertyNumberofTLBimportsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofTLBimportsPersec", (value)) +} + +// GetNumberofTLBimportsPersec gets the value of NumberofTLBimportsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRInterop) GetPropertyNumberofTLBimportsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofTLBimportsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRJit.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRJit.go new file mode 100644 index 00000000..80847d01 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRJit.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRJit struct +type Win32_PerfFormattedData_NETFramework_NETCLRJit struct { + *Win32_PerfFormattedData + + // + ILBytesJittedPersec uint32 + + // + NumberofILBytesJitted uint32 + + // + NumberofMethodsJitted uint32 + + // + PercentTimeinJit uint32 + + // + StandardJitFailures uint32 + + // + TotalNumberofILBytesJitted uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRJitEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRJit, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRJit{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRJitEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRJit, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRJit{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetILBytesJittedPersec sets the value of ILBytesJittedPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) SetPropertyILBytesJittedPersec(value uint32) (err error) { + return instance.SetProperty("ILBytesJittedPersec", (value)) +} + +// GetILBytesJittedPersec gets the value of ILBytesJittedPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) GetPropertyILBytesJittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ILBytesJittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofILBytesJitted sets the value of NumberofILBytesJitted for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) SetPropertyNumberofILBytesJitted(value uint32) (err error) { + return instance.SetProperty("NumberofILBytesJitted", (value)) +} + +// GetNumberofILBytesJitted gets the value of NumberofILBytesJitted for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) GetPropertyNumberofILBytesJitted() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofILBytesJitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofMethodsJitted sets the value of NumberofMethodsJitted for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) SetPropertyNumberofMethodsJitted(value uint32) (err error) { + return instance.SetProperty("NumberofMethodsJitted", (value)) +} + +// GetNumberofMethodsJitted gets the value of NumberofMethodsJitted for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) GetPropertyNumberofMethodsJitted() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofMethodsJitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinJit sets the value of PercentTimeinJit for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) SetPropertyPercentTimeinJit(value uint32) (err error) { + return instance.SetProperty("PercentTimeinJit", (value)) +} + +// GetPercentTimeinJit gets the value of PercentTimeinJit for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) GetPropertyPercentTimeinJit() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinJit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardJitFailures sets the value of StandardJitFailures for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) SetPropertyStandardJitFailures(value uint32) (err error) { + return instance.SetProperty("StandardJitFailures", (value)) +} + +// GetStandardJitFailures gets the value of StandardJitFailures for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) GetPropertyStandardJitFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardJitFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofILBytesJitted sets the value of TotalNumberofILBytesJitted for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) SetPropertyTotalNumberofILBytesJitted(value uint32) (err error) { + return instance.SetProperty("TotalNumberofILBytesJitted", (value)) +} + +// GetTotalNumberofILBytesJitted gets the value of TotalNumberofILBytesJitted for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRJit) GetPropertyTotalNumberofILBytesJitted() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofILBytesJitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLoading.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLoading.go new file mode 100644 index 00000000..ab1b5522 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLoading.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRLoading struct +type Win32_PerfFormattedData_NETFramework_NETCLRLoading struct { + *Win32_PerfFormattedData + + // + AssemblySearchLength uint32 + + // + BytesinLoaderHeap uint32 + + // + Currentappdomains uint32 + + // + CurrentAssemblies uint32 + + // + CurrentClassesLoaded uint32 + + // + PercentTimeLoading uint64 + + // + Rateofappdomains uint32 + + // + Rateofappdomainsunloaded uint32 + + // + RateofAssemblies uint32 + + // + RateofClassesLoaded uint32 + + // + RateofLoadFailures uint32 + + // + TotalAppdomains uint32 + + // + Totalappdomainsunloaded uint32 + + // + TotalAssemblies uint32 + + // + TotalClassesLoaded uint32 + + // + TotalNumberofLoadFailures uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRLoadingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRLoading, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRLoading{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRLoadingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRLoading, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRLoading{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAssemblySearchLength sets the value of AssemblySearchLength for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyAssemblySearchLength(value uint32) (err error) { + return instance.SetProperty("AssemblySearchLength", (value)) +} + +// GetAssemblySearchLength gets the value of AssemblySearchLength for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyAssemblySearchLength() (value uint32, err error) { + retValue, err := instance.GetProperty("AssemblySearchLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesinLoaderHeap sets the value of BytesinLoaderHeap for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyBytesinLoaderHeap(value uint32) (err error) { + return instance.SetProperty("BytesinLoaderHeap", (value)) +} + +// GetBytesinLoaderHeap gets the value of BytesinLoaderHeap for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyBytesinLoaderHeap() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesinLoaderHeap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentappdomains sets the value of Currentappdomains for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyCurrentappdomains(value uint32) (err error) { + return instance.SetProperty("Currentappdomains", (value)) +} + +// GetCurrentappdomains gets the value of Currentappdomains for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyCurrentappdomains() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentappdomains") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentAssemblies sets the value of CurrentAssemblies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyCurrentAssemblies(value uint32) (err error) { + return instance.SetProperty("CurrentAssemblies", (value)) +} + +// GetCurrentAssemblies gets the value of CurrentAssemblies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyCurrentAssemblies() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentAssemblies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentClassesLoaded sets the value of CurrentClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyCurrentClassesLoaded(value uint32) (err error) { + return instance.SetProperty("CurrentClassesLoaded", (value)) +} + +// GetCurrentClassesLoaded gets the value of CurrentClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyCurrentClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeLoading sets the value of PercentTimeLoading for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyPercentTimeLoading(value uint64) (err error) { + return instance.SetProperty("PercentTimeLoading", (value)) +} + +// GetPercentTimeLoading gets the value of PercentTimeLoading for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyPercentTimeLoading() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeLoading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateofappdomains sets the value of Rateofappdomains for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyRateofappdomains(value uint32) (err error) { + return instance.SetProperty("Rateofappdomains", (value)) +} + +// GetRateofappdomains gets the value of Rateofappdomains for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyRateofappdomains() (value uint32, err error) { + retValue, err := instance.GetProperty("Rateofappdomains") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofappdomainsunloaded sets the value of Rateofappdomainsunloaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyRateofappdomainsunloaded(value uint32) (err error) { + return instance.SetProperty("Rateofappdomainsunloaded", (value)) +} + +// GetRateofappdomainsunloaded gets the value of Rateofappdomainsunloaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyRateofappdomainsunloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("Rateofappdomainsunloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofAssemblies sets the value of RateofAssemblies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyRateofAssemblies(value uint32) (err error) { + return instance.SetProperty("RateofAssemblies", (value)) +} + +// GetRateofAssemblies gets the value of RateofAssemblies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyRateofAssemblies() (value uint32, err error) { + retValue, err := instance.GetProperty("RateofAssemblies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofClassesLoaded sets the value of RateofClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyRateofClassesLoaded(value uint32) (err error) { + return instance.SetProperty("RateofClassesLoaded", (value)) +} + +// GetRateofClassesLoaded gets the value of RateofClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyRateofClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("RateofClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofLoadFailures sets the value of RateofLoadFailures for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyRateofLoadFailures(value uint32) (err error) { + return instance.SetProperty("RateofLoadFailures", (value)) +} + +// GetRateofLoadFailures gets the value of RateofLoadFailures for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyRateofLoadFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("RateofLoadFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalAppdomains sets the value of TotalAppdomains for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyTotalAppdomains(value uint32) (err error) { + return instance.SetProperty("TotalAppdomains", (value)) +} + +// GetTotalAppdomains gets the value of TotalAppdomains for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyTotalAppdomains() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalAppdomains") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalappdomainsunloaded sets the value of Totalappdomainsunloaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyTotalappdomainsunloaded(value uint32) (err error) { + return instance.SetProperty("Totalappdomainsunloaded", (value)) +} + +// GetTotalappdomainsunloaded gets the value of Totalappdomainsunloaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyTotalappdomainsunloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("Totalappdomainsunloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalAssemblies sets the value of TotalAssemblies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyTotalAssemblies(value uint32) (err error) { + return instance.SetProperty("TotalAssemblies", (value)) +} + +// GetTotalAssemblies gets the value of TotalAssemblies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyTotalAssemblies() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalAssemblies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalClassesLoaded sets the value of TotalClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyTotalClassesLoaded(value uint32) (err error) { + return instance.SetProperty("TotalClassesLoaded", (value)) +} + +// GetTotalClassesLoaded gets the value of TotalClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyTotalClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofLoadFailures sets the value of TotalNumberofLoadFailures for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) SetPropertyTotalNumberofLoadFailures(value uint32) (err error) { + return instance.SetProperty("TotalNumberofLoadFailures", (value)) +} + +// GetTotalNumberofLoadFailures gets the value of TotalNumberofLoadFailures for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLoading) GetPropertyTotalNumberofLoadFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofLoadFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads.go new file mode 100644 index 00000000..7e8a05d2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads struct +type Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads struct { + *Win32_PerfFormattedData + + // + ContentionRatePersec uint32 + + // + CurrentQueueLength uint32 + + // + NumberofcurrentlogicalThreads uint32 + + // + NumberofcurrentphysicalThreads uint32 + + // + Numberofcurrentrecognizedthreads uint32 + + // + Numberoftotalrecognizedthreads uint32 + + // + QueueLengthPeak uint32 + + // + QueueLengthPersec uint32 + + // + rateofrecognizedthreadsPersec uint32 + + // + TotalNumberofContentions uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRLocksAndThreadsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRLocksAndThreadsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetContentionRatePersec sets the value of ContentionRatePersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyContentionRatePersec(value uint32) (err error) { + return instance.SetProperty("ContentionRatePersec", (value)) +} + +// GetContentionRatePersec gets the value of ContentionRatePersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyContentionRatePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContentionRatePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentQueueLength sets the value of CurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyCurrentQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentQueueLength", (value)) +} + +// GetCurrentQueueLength gets the value of CurrentQueueLength for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyCurrentQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcurrentlogicalThreads sets the value of NumberofcurrentlogicalThreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberofcurrentlogicalThreads(value uint32) (err error) { + return instance.SetProperty("NumberofcurrentlogicalThreads", (value)) +} + +// GetNumberofcurrentlogicalThreads gets the value of NumberofcurrentlogicalThreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberofcurrentlogicalThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofcurrentlogicalThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcurrentphysicalThreads sets the value of NumberofcurrentphysicalThreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberofcurrentphysicalThreads(value uint32) (err error) { + return instance.SetProperty("NumberofcurrentphysicalThreads", (value)) +} + +// GetNumberofcurrentphysicalThreads gets the value of NumberofcurrentphysicalThreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberofcurrentphysicalThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofcurrentphysicalThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcurrentrecognizedthreads sets the value of Numberofcurrentrecognizedthreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberofcurrentrecognizedthreads(value uint32) (err error) { + return instance.SetProperty("Numberofcurrentrecognizedthreads", (value)) +} + +// GetNumberofcurrentrecognizedthreads gets the value of Numberofcurrentrecognizedthreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberofcurrentrecognizedthreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofcurrentrecognizedthreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoftotalrecognizedthreads sets the value of Numberoftotalrecognizedthreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberoftotalrecognizedthreads(value uint32) (err error) { + return instance.SetProperty("Numberoftotalrecognizedthreads", (value)) +} + +// GetNumberoftotalrecognizedthreads gets the value of Numberoftotalrecognizedthreads for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberoftotalrecognizedthreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberoftotalrecognizedthreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueueLengthPeak sets the value of QueueLengthPeak for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyQueueLengthPeak(value uint32) (err error) { + return instance.SetProperty("QueueLengthPeak", (value)) +} + +// GetQueueLengthPeak gets the value of QueueLengthPeak for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyQueueLengthPeak() (value uint32, err error) { + retValue, err := instance.GetProperty("QueueLengthPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueueLengthPersec sets the value of QueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyQueueLengthPersec(value uint32) (err error) { + return instance.SetProperty("QueueLengthPersec", (value)) +} + +// GetQueueLengthPersec gets the value of QueueLengthPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyQueueLengthPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetrateofrecognizedthreadsPersec sets the value of rateofrecognizedthreadsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyrateofrecognizedthreadsPersec(value uint32) (err error) { + return instance.SetProperty("rateofrecognizedthreadsPersec", (value)) +} + +// GetrateofrecognizedthreadsPersec gets the value of rateofrecognizedthreadsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyrateofrecognizedthreadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("rateofrecognizedthreadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofContentions sets the value of TotalNumberofContentions for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) SetPropertyTotalNumberofContentions(value uint32) (err error) { + return instance.SetProperty("TotalNumberofContentions", (value)) +} + +// GetTotalNumberofContentions gets the value of TotalNumberofContentions for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRLocksAndThreads) GetPropertyTotalNumberofContentions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofContentions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRMemory.go new file mode 100644 index 00000000..c0cafe22 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRMemory.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRMemory struct +type Win32_PerfFormattedData_NETFramework_NETCLRMemory struct { + *Win32_PerfFormattedData + + // + AllocatedBytesPersec uint32 + + // + FinalizationSurvivors uint32 + + // + Gen0heapsize uint32 + + // + Gen0PromotedBytesPerSec uint32 + + // + Gen1heapsize uint32 + + // + Gen1PromotedBytesPerSec uint32 + + // + Gen2heapsize uint32 + + // + LargeObjectHeapsize uint32 + + // + NumberBytesinallHeaps uint32 + + // + NumberGCHandles uint32 + + // + NumberGen0Collections uint32 + + // + NumberGen1Collections uint32 + + // + NumberGen2Collections uint32 + + // + NumberInducedGC uint32 + + // + NumberofPinnedObjects uint32 + + // + NumberofSinkBlocksinuse uint32 + + // + NumberTotalcommittedBytes uint32 + + // + NumberTotalreservedBytes uint32 + + // + PercentTimeinGC uint32 + + // + ProcessID uint32 + + // + PromotedFinalizationMemoryfromGen0 uint32 + + // + PromotedMemoryfromGen0 uint32 + + // + PromotedMemoryfromGen1 uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAllocatedBytesPersec sets the value of AllocatedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyAllocatedBytesPersec(value uint32) (err error) { + return instance.SetProperty("AllocatedBytesPersec", (value)) +} + +// GetAllocatedBytesPersec gets the value of AllocatedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyAllocatedBytesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AllocatedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFinalizationSurvivors sets the value of FinalizationSurvivors for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyFinalizationSurvivors(value uint32) (err error) { + return instance.SetProperty("FinalizationSurvivors", (value)) +} + +// GetFinalizationSurvivors gets the value of FinalizationSurvivors for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyFinalizationSurvivors() (value uint32, err error) { + retValue, err := instance.GetProperty("FinalizationSurvivors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen0heapsize sets the value of Gen0heapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyGen0heapsize(value uint32) (err error) { + return instance.SetProperty("Gen0heapsize", (value)) +} + +// GetGen0heapsize gets the value of Gen0heapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyGen0heapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen0heapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen0PromotedBytesPerSec sets the value of Gen0PromotedBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyGen0PromotedBytesPerSec(value uint32) (err error) { + return instance.SetProperty("Gen0PromotedBytesPerSec", (value)) +} + +// GetGen0PromotedBytesPerSec gets the value of Gen0PromotedBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyGen0PromotedBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen0PromotedBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen1heapsize sets the value of Gen1heapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyGen1heapsize(value uint32) (err error) { + return instance.SetProperty("Gen1heapsize", (value)) +} + +// GetGen1heapsize gets the value of Gen1heapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyGen1heapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen1heapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen1PromotedBytesPerSec sets the value of Gen1PromotedBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyGen1PromotedBytesPerSec(value uint32) (err error) { + return instance.SetProperty("Gen1PromotedBytesPerSec", (value)) +} + +// GetGen1PromotedBytesPerSec gets the value of Gen1PromotedBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyGen1PromotedBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen1PromotedBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen2heapsize sets the value of Gen2heapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyGen2heapsize(value uint32) (err error) { + return instance.SetProperty("Gen2heapsize", (value)) +} + +// GetGen2heapsize gets the value of Gen2heapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyGen2heapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen2heapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLargeObjectHeapsize sets the value of LargeObjectHeapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyLargeObjectHeapsize(value uint32) (err error) { + return instance.SetProperty("LargeObjectHeapsize", (value)) +} + +// GetLargeObjectHeapsize gets the value of LargeObjectHeapsize for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyLargeObjectHeapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("LargeObjectHeapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberBytesinallHeaps sets the value of NumberBytesinallHeaps for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberBytesinallHeaps(value uint32) (err error) { + return instance.SetProperty("NumberBytesinallHeaps", (value)) +} + +// GetNumberBytesinallHeaps gets the value of NumberBytesinallHeaps for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberBytesinallHeaps() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberBytesinallHeaps") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGCHandles sets the value of NumberGCHandles for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberGCHandles(value uint32) (err error) { + return instance.SetProperty("NumberGCHandles", (value)) +} + +// GetNumberGCHandles gets the value of NumberGCHandles for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberGCHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGCHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGen0Collections sets the value of NumberGen0Collections for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberGen0Collections(value uint32) (err error) { + return instance.SetProperty("NumberGen0Collections", (value)) +} + +// GetNumberGen0Collections gets the value of NumberGen0Collections for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberGen0Collections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGen0Collections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGen1Collections sets the value of NumberGen1Collections for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberGen1Collections(value uint32) (err error) { + return instance.SetProperty("NumberGen1Collections", (value)) +} + +// GetNumberGen1Collections gets the value of NumberGen1Collections for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberGen1Collections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGen1Collections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGen2Collections sets the value of NumberGen2Collections for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberGen2Collections(value uint32) (err error) { + return instance.SetProperty("NumberGen2Collections", (value)) +} + +// GetNumberGen2Collections gets the value of NumberGen2Collections for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberGen2Collections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGen2Collections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberInducedGC sets the value of NumberInducedGC for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberInducedGC(value uint32) (err error) { + return instance.SetProperty("NumberInducedGC", (value)) +} + +// GetNumberInducedGC gets the value of NumberInducedGC for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberInducedGC() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberInducedGC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofPinnedObjects sets the value of NumberofPinnedObjects for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberofPinnedObjects(value uint32) (err error) { + return instance.SetProperty("NumberofPinnedObjects", (value)) +} + +// GetNumberofPinnedObjects gets the value of NumberofPinnedObjects for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberofPinnedObjects() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofPinnedObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofSinkBlocksinuse sets the value of NumberofSinkBlocksinuse for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberofSinkBlocksinuse(value uint32) (err error) { + return instance.SetProperty("NumberofSinkBlocksinuse", (value)) +} + +// GetNumberofSinkBlocksinuse gets the value of NumberofSinkBlocksinuse for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberofSinkBlocksinuse() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofSinkBlocksinuse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberTotalcommittedBytes sets the value of NumberTotalcommittedBytes for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberTotalcommittedBytes(value uint32) (err error) { + return instance.SetProperty("NumberTotalcommittedBytes", (value)) +} + +// GetNumberTotalcommittedBytes gets the value of NumberTotalcommittedBytes for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberTotalcommittedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberTotalcommittedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberTotalreservedBytes sets the value of NumberTotalreservedBytes for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyNumberTotalreservedBytes(value uint32) (err error) { + return instance.SetProperty("NumberTotalreservedBytes", (value)) +} + +// GetNumberTotalreservedBytes gets the value of NumberTotalreservedBytes for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyNumberTotalreservedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberTotalreservedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinGC sets the value of PercentTimeinGC for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyPercentTimeinGC(value uint32) (err error) { + return instance.SetProperty("PercentTimeinGC", (value)) +} + +// GetPercentTimeinGC gets the value of PercentTimeinGC for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyPercentTimeinGC() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinGC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPromotedFinalizationMemoryfromGen0 sets the value of PromotedFinalizationMemoryfromGen0 for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyPromotedFinalizationMemoryfromGen0(value uint32) (err error) { + return instance.SetProperty("PromotedFinalizationMemoryfromGen0", (value)) +} + +// GetPromotedFinalizationMemoryfromGen0 gets the value of PromotedFinalizationMemoryfromGen0 for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyPromotedFinalizationMemoryfromGen0() (value uint32, err error) { + retValue, err := instance.GetProperty("PromotedFinalizationMemoryfromGen0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPromotedMemoryfromGen0 sets the value of PromotedMemoryfromGen0 for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyPromotedMemoryfromGen0(value uint32) (err error) { + return instance.SetProperty("PromotedMemoryfromGen0", (value)) +} + +// GetPromotedMemoryfromGen0 gets the value of PromotedMemoryfromGen0 for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyPromotedMemoryfromGen0() (value uint32, err error) { + retValue, err := instance.GetProperty("PromotedMemoryfromGen0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPromotedMemoryfromGen1 sets the value of PromotedMemoryfromGen1 for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) SetPropertyPromotedMemoryfromGen1(value uint32) (err error) { + return instance.SetProperty("PromotedMemoryfromGen1", (value)) +} + +// GetPromotedMemoryfromGen1 gets the value of PromotedMemoryfromGen1 for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRMemory) GetPropertyPromotedMemoryfromGen1() (value uint32, err error) { + retValue, err := instance.GetProperty("PromotedMemoryfromGen1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRRemoting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRRemoting.go new file mode 100644 index 00000000..3db1d198 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRRemoting.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRRemoting struct +type Win32_PerfFormattedData_NETFramework_NETCLRRemoting struct { + *Win32_PerfFormattedData + + // + Channels uint32 + + // + ContextBoundClassesLoaded uint32 + + // + ContextBoundObjectsAllocPersec uint32 + + // + ContextProxies uint32 + + // + Contexts uint32 + + // + RemoteCallsPersec uint32 + + // + TotalRemoteCalls uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRRemotingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRRemoting{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRRemotingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRRemoting{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetChannels sets the value of Channels for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyChannels(value uint32) (err error) { + return instance.SetProperty("Channels", (value)) +} + +// GetChannels gets the value of Channels for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyChannels() (value uint32, err error) { + retValue, err := instance.GetProperty("Channels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextBoundClassesLoaded sets the value of ContextBoundClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyContextBoundClassesLoaded(value uint32) (err error) { + return instance.SetProperty("ContextBoundClassesLoaded", (value)) +} + +// GetContextBoundClassesLoaded gets the value of ContextBoundClassesLoaded for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyContextBoundClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBoundClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextBoundObjectsAllocPersec sets the value of ContextBoundObjectsAllocPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyContextBoundObjectsAllocPersec(value uint32) (err error) { + return instance.SetProperty("ContextBoundObjectsAllocPersec", (value)) +} + +// GetContextBoundObjectsAllocPersec gets the value of ContextBoundObjectsAllocPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyContextBoundObjectsAllocPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBoundObjectsAllocPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextProxies sets the value of ContextProxies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyContextProxies(value uint32) (err error) { + return instance.SetProperty("ContextProxies", (value)) +} + +// GetContextProxies gets the value of ContextProxies for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyContextProxies() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextProxies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContexts sets the value of Contexts for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyContexts(value uint32) (err error) { + return instance.SetProperty("Contexts", (value)) +} + +// GetContexts gets the value of Contexts for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyContexts() (value uint32, err error) { + retValue, err := instance.GetProperty("Contexts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteCallsPersec sets the value of RemoteCallsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyRemoteCallsPersec(value uint32) (err error) { + return instance.SetProperty("RemoteCallsPersec", (value)) +} + +// GetRemoteCallsPersec gets the value of RemoteCallsPersec for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyRemoteCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalRemoteCalls sets the value of TotalRemoteCalls for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) SetPropertyTotalRemoteCalls(value uint32) (err error) { + return instance.SetProperty("TotalRemoteCalls", (value)) +} + +// GetTotalRemoteCalls gets the value of TotalRemoteCalls for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRRemoting) GetPropertyTotalRemoteCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRemoteCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRSecurity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRSecurity.go new file mode 100644 index 00000000..830a2527 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETFramework_NETCLRSecurity.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETFramework_NETCLRSecurity struct +type Win32_PerfFormattedData_NETFramework_NETCLRSecurity struct { + *Win32_PerfFormattedData + + // + NumberLinkTimeChecks uint32 + + // + PercentTimeinRTchecks uint32 + + // + PercentTimeSigAuthenticating uint64 + + // + StackWalkDepth uint32 + + // + TotalRuntimeChecks uint32 +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRSecurityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRSecurity{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETFramework_NETCLRSecurityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETFramework_NETCLRSecurity{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberLinkTimeChecks sets the value of NumberLinkTimeChecks for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) SetPropertyNumberLinkTimeChecks(value uint32) (err error) { + return instance.SetProperty("NumberLinkTimeChecks", (value)) +} + +// GetNumberLinkTimeChecks gets the value of NumberLinkTimeChecks for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) GetPropertyNumberLinkTimeChecks() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberLinkTimeChecks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinRTchecks sets the value of PercentTimeinRTchecks for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) SetPropertyPercentTimeinRTchecks(value uint32) (err error) { + return instance.SetProperty("PercentTimeinRTchecks", (value)) +} + +// GetPercentTimeinRTchecks gets the value of PercentTimeinRTchecks for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) GetPropertyPercentTimeinRTchecks() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinRTchecks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeSigAuthenticating sets the value of PercentTimeSigAuthenticating for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) SetPropertyPercentTimeSigAuthenticating(value uint64) (err error) { + return instance.SetProperty("PercentTimeSigAuthenticating", (value)) +} + +// GetPercentTimeSigAuthenticating gets the value of PercentTimeSigAuthenticating for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) GetPropertyPercentTimeSigAuthenticating() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSigAuthenticating") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackWalkDepth sets the value of StackWalkDepth for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) SetPropertyStackWalkDepth(value uint32) (err error) { + return instance.SetProperty("StackWalkDepth", (value)) +} + +// GetStackWalkDepth gets the value of StackWalkDepth for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) GetPropertyStackWalkDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("StackWalkDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalRuntimeChecks sets the value of TotalRuntimeChecks for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) SetPropertyTotalRuntimeChecks(value uint32) (err error) { + return instance.SetProperty("TotalRuntimeChecks", (value)) +} + +// GetTotalRuntimeChecks gets the value of TotalRuntimeChecks for the instance +func (instance *Win32_PerfFormattedData_NETFramework_NETCLRSecurity) GetPropertyTotalRuntimeChecks() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRuntimeChecks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40.go new file mode 100644 index 00000000..4c39a569 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40 struct +type Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40 struct { + *Win32_PerfFormattedData + + // + CacheEntries uint32 + + // + CacheHitRatio uint32 + + // + CacheHits uint32 + + // + CacheMisses uint32 + + // + CacheTrims uint32 + + // + CacheTurnoverRate uint32 +} + +func NewWin32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCacheEntries sets the value of CacheEntries for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheEntries(value uint32) (err error) { + return instance.SetProperty("CacheEntries", (value)) +} + +// GetCacheEntries gets the value of CacheEntries for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheHitRatio sets the value of CacheHitRatio for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheHitRatio(value uint32) (err error) { + return instance.SetProperty("CacheHitRatio", (value)) +} + +// GetCacheHitRatio gets the value of CacheHitRatio for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheHitRatio() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheHitRatio") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheHits sets the value of CacheHits for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheHits(value uint32) (err error) { + return instance.SetProperty("CacheHits", (value)) +} + +// GetCacheHits gets the value of CacheHits for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheHits() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheHits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheMisses sets the value of CacheMisses for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheMisses(value uint32) (err error) { + return instance.SetProperty("CacheMisses", (value)) +} + +// GetCacheMisses gets the value of CacheMisses for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheMisses() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheMisses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheTrims sets the value of CacheTrims for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheTrims(value uint32) (err error) { + return instance.SetProperty("CacheTrims", (value)) +} + +// GetCacheTrims gets the value of CacheTrims for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheTrims() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheTrims") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheTurnoverRate sets the value of CacheTurnoverRate for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheTurnoverRate(value uint32) (err error) { + return instance.SetProperty("CacheTurnoverRate", (value)) +} + +// GetCacheTurnoverRate gets the value of CacheTurnoverRate for the instance +func (instance *Win32_PerfFormattedData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheTurnoverRate() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheTurnoverRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats.go new file mode 100644 index 00000000..6af28fd4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats struct +type Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats struct { + *Win32_PerfFormattedData + + // + Missingheartbeats uint32 + + // + Missingheartbeatslimit uint32 +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeatsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeatsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMissingheartbeats sets the value of Missingheartbeats for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats) SetPropertyMissingheartbeats(value uint32) (err error) { + return instance.SetProperty("Missingheartbeats", (value)) +} + +// GetMissingheartbeats gets the value of Missingheartbeats for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats) GetPropertyMissingheartbeats() (value uint32, err error) { + retValue, err := instance.GetProperty("Missingheartbeats") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissingheartbeatslimit sets the value of Missingheartbeatslimit for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats) SetPropertyMissingheartbeatslimit(value uint32) (err error) { + return instance.SetProperty("Missingheartbeatslimit", (value)) +} + +// GetMissingheartbeatslimit gets the value of Missingheartbeatslimit for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetFtHeartbeats) GetPropertyMissingheartbeatslimit() (value uint32, err error) { + retValue, err := instance.GetProperty("Missingheartbeatslimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go new file mode 100644 index 00000000..e75bdbc0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter struct +type Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter struct { + *Win32_PerfFormattedData + + // + TotalReceives uint64 + + // + TotalReceivesAccepted uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequests uint64 + + // + TotalSendRequestsAccepted uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalReceives sets the value of TotalReceives for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalReceives(value uint64) (err error) { + return instance.SetProperty("TotalReceives", value) +} + +// GetTotalReceives gets the value of TotalReceives for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalReceives() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceives") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesAccepted sets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalReceivesAccepted(value uint64) (err error) { + return instance.SetProperty("TotalReceivesAccepted", value) +} + +// GetTotalReceivesAccepted gets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalReceivesAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequests sets the value of TotalSendRequests for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalSendRequests(value uint64) (err error) { + return instance.SetProperty("TotalSendRequests", value) +} + +// GetTotalSendRequests gets the value of TotalSendRequests for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalSendRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequests") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsAccepted sets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalSendRequestsAccepted(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsAccepted", value) +} + +// GetTotalSendRequestsAccepted gets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalSendRequestsAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go new file mode 100644 index 00000000..3591adc4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go @@ -0,0 +1,258 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter struct +type Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter struct { + *Win32_PerfFormattedData + + // + ACKRecievedPerSec uint64 + + // + ACKSentPerSec uint64 + + // + HeartbeatsRecievedPerSec uint64 + + // + HeartbeatsSentPerSec uint64 + + // + TotalACKRecieved uint64 + + // + TotalACKSent uint64 + + // + TotalHeartbeatsRecieved uint64 + + // + TotalHeartbeatsSent uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetACKRecievedPerSec sets the value of ACKRecievedPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyACKRecievedPerSec(value uint64) (err error) { + return instance.SetProperty("ACKRecievedPerSec", value) +} + +// GetACKRecievedPerSec gets the value of ACKRecievedPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyACKRecievedPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("ACKRecievedPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetACKSentPerSec sets the value of ACKSentPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyACKSentPerSec(value uint64) (err error) { + return instance.SetProperty("ACKSentPerSec", value) +} + +// GetACKSentPerSec gets the value of ACKSentPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyACKSentPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("ACKSentPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetHeartbeatsRecievedPerSec sets the value of HeartbeatsRecievedPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyHeartbeatsRecievedPerSec(value uint64) (err error) { + return instance.SetProperty("HeartbeatsRecievedPerSec", value) +} + +// GetHeartbeatsRecievedPerSec gets the value of HeartbeatsRecievedPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyHeartbeatsRecievedPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("HeartbeatsRecievedPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetHeartbeatsSentPerSec sets the value of HeartbeatsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyHeartbeatsSentPerSec(value uint64) (err error) { + return instance.SetProperty("HeartbeatsSentPerSec", value) +} + +// GetHeartbeatsSentPerSec gets the value of HeartbeatsSentPerSec for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyHeartbeatsSentPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("HeartbeatsSentPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalACKRecieved sets the value of TotalACKRecieved for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalACKRecieved(value uint64) (err error) { + return instance.SetProperty("TotalACKRecieved", value) +} + +// GetTotalACKRecieved gets the value of TotalACKRecieved for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalACKRecieved() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalACKRecieved") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalACKSent sets the value of TotalACKSent for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalACKSent(value uint64) (err error) { + return instance.SetProperty("TotalACKSent", value) +} + +// GetTotalACKSent gets the value of TotalACKSent for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalACKSent() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalACKSent") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalHeartbeatsRecieved sets the value of TotalHeartbeatsRecieved for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalHeartbeatsRecieved(value uint64) (err error) { + return instance.SetProperty("TotalHeartbeatsRecieved", value) +} + +// GetTotalHeartbeatsRecieved gets the value of TotalHeartbeatsRecieved for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalHeartbeatsRecieved() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalHeartbeatsRecieved") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalHeartbeatsSent sets the value of TotalHeartbeatsSent for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalHeartbeatsSent(value uint64) (err error) { + return instance.SetProperty("TotalHeartbeatsSent", value) +} + +// GetTotalHeartbeatsSent gets the value of TotalHeartbeatsSent for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalHeartbeatsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalHeartbeatsSent") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go new file mode 100644 index 00000000..f7fea57b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter struct +type Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter struct { + *Win32_PerfFormattedData + + // + TotalReceives uint64 + + // + TotalReceivesAccepted uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequests uint64 + + // + TotalSendRequestsAccepted uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalReceives sets the value of TotalReceives for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalReceives(value uint64) (err error) { + return instance.SetProperty("TotalReceives", value) +} + +// GetTotalReceives gets the value of TotalReceives for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalReceives() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceives") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesAccepted sets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalReceivesAccepted(value uint64) (err error) { + return instance.SetProperty("TotalReceivesAccepted", value) +} + +// GetTotalReceivesAccepted gets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalReceivesAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequests sets the value of TotalSendRequests for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalSendRequests(value uint64) (err error) { + return instance.SetProperty("TotalSendRequests", value) +} + +// GetTotalSendRequests gets the value of TotalSendRequests for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalSendRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequests") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsAccepted sets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalSendRequestsAccepted(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsAccepted", value) +} + +// GetTotalSendRequestsAccepted gets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalSendRequestsAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface.go new file mode 100644 index 00000000..c7ef6b84 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface struct +type Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface struct { + *Win32_PerfFormattedData + + // + TotalReceives uint64 + + // + TotalReceivesAccepted uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequests uint64 + + // + TotalSendRequestsAccepted uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterfaceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterfaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTotalReceives sets the value of TotalReceives for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalReceives(value uint64) (err error) { + return instance.SetProperty("TotalReceives", value) +} + +// GetTotalReceives gets the value of TotalReceives for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalReceives() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceives") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesAccepted sets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalReceivesAccepted(value uint64) (err error) { + return instance.SetProperty("TotalReceivesAccepted", value) +} + +// GetTotalReceivesAccepted gets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalReceivesAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequests sets the value of TotalSendRequests for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalSendRequests(value uint64) (err error) { + return instance.SetProperty("TotalSendRequests", value) +} + +// GetTotalSendRequests gets the value of TotalSendRequests for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalSendRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequests") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsAccepted sets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalSendRequestsAccepted(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsAccepted", value) +} + +// GetTotalSendRequestsAccepted gets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalSendRequestsAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfFormattedData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go new file mode 100644 index 00000000..d4d9dca6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go @@ -0,0 +1,2390 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons struct +type Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons struct { + *Win32_PerfFormattedData + + // + IncomingBridgeReserved uint64 + + // + IncomingBusy uint64 + + // + IncomingDhcpGuard uint64 + + // + IncomingDisconnected uint64 + + // + IncomingFailedDestinationListUpdate uint64 + + // + IncomingFailedPacketFilter uint64 + + // + IncomingFailedPvlanSetting uint64 + + // + IncomingFailedSecurityPolicy uint64 + + // + IncomingFiltered uint64 + + // + IncomingFilteredIsolationUntagged uint64 + + // + IncomingFilteredVLAN uint64 + + // + IncomingInjectedIcmp uint64 + + // + IncomingInvalidConfig uint64 + + // + IncomingInvalidData uint64 + + // + IncomingInvalidDestMac uint64 + + // + IncomingInvalidFirstNBTooSmall uint64 + + // + IncomingInvalidPacket uint64 + + // + IncomingInvalidPDQueue uint64 + + // + IncomingInvalidSourceMac uint64 + + // + IncomingInvalidVlanFormat uint64 + + // + IncomingIpsec uint64 + + // + IncomingLowPowerPacketFilter uint64 + + // + IncomingMacSpoofing uint64 + + // + IncomingMTUMismatch uint64 + + // + IncomingNativeFwdingReq uint64 + + // + IncomingNicDisabled uint64 + + // + IncomingNotAccepted uint64 + + // + IncomingNotReady uint64 + + // + IncomingQos uint64 + + // + IncomingRequiredExtensionMissing uint64 + + // + IncomingResources uint64 + + // + IncomingRouterGuard uint64 + + // + IncomingStormLimit uint64 + + // + IncomingSwitchDataFlowDisabled uint64 + + // + IncomingUnauthorizedMAC uint64 + + // + IncomingUnauthorizedVLAN uint64 + + // + IncomingUnknown uint64 + + // + IncomingVirtualSubnetId uint64 + + // + IncomingWnv uint64 + + // + OutgoingBridgeReserved uint64 + + // + OutgoingBusy uint64 + + // + OutgoingDhcpGuard uint64 + + // + OutgoingDisconnected uint64 + + // + OutgoingFailedDestinationListUpdate uint64 + + // + OutgoingFailedPacketFilter uint64 + + // + OutgoingFailedPvlanSetting uint64 + + // + OutgoingFailedSecurityPolicy uint64 + + // + OutgoingFiltered uint64 + + // + OutgoingFilteredIsolationUntagged uint64 + + // + OutgoingFilteredVLAN uint64 + + // + OutgoingInjectedIcmp uint64 + + // + OutgoingInvalidConfig uint64 + + // + OutgoingInvalidData uint64 + + // + OutgoingInvalidDestMac uint64 + + // + OutgoingInvalidFirstNBTooSmall uint64 + + // + OutgoingInvalidPacket uint64 + + // + OutgoingInvalidPDQueue uint64 + + // + OutgoingInvalidSourceMac uint64 + + // + OutgoingInvalidVlanFormat uint64 + + // + OutgoingIpsec uint64 + + // + OutgoingLowPowerPacketFilter uint64 + + // + OutgoingMacSpoofing uint64 + + // + OutgoingMTUMismatch uint64 + + // + OutgoingNativeFwdingReq uint64 + + // + OutgoingNicDisabled uint64 + + // + OutgoingNotAccepted uint64 + + // + OutgoingNotReady uint64 + + // + OutgoingQos uint64 + + // + OutgoingRequiredExtensionMissing uint64 + + // + OutgoingResources uint64 + + // + OutgoingRouterGuard uint64 + + // + OutgoingStormLimit uint64 + + // + OutgoingSwitchDataFlowDisabled uint64 + + // + OutgoingUnauthorizedMAC uint64 + + // + OutgoingUnauthorizedVLAN uint64 + + // + OutgoingUnknown uint64 + + // + OutgoingVirtualSubnetId uint64 + + // + OutgoingWnv uint64 +} + +func NewWin32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasonsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasonsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetIncomingBridgeReserved sets the value of IncomingBridgeReserved for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingBridgeReserved(value uint64) (err error) { + return instance.SetProperty("IncomingBridgeReserved", (value)) +} + +// GetIncomingBridgeReserved gets the value of IncomingBridgeReserved for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingBridgeReserved() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingBridgeReserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingBusy sets the value of IncomingBusy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingBusy(value uint64) (err error) { + return instance.SetProperty("IncomingBusy", (value)) +} + +// GetIncomingBusy gets the value of IncomingBusy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingBusy() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingBusy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingDhcpGuard sets the value of IncomingDhcpGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingDhcpGuard(value uint64) (err error) { + return instance.SetProperty("IncomingDhcpGuard", (value)) +} + +// GetIncomingDhcpGuard gets the value of IncomingDhcpGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingDhcpGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingDhcpGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingDisconnected sets the value of IncomingDisconnected for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingDisconnected(value uint64) (err error) { + return instance.SetProperty("IncomingDisconnected", (value)) +} + +// GetIncomingDisconnected gets the value of IncomingDisconnected for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingDisconnected() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingDisconnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedDestinationListUpdate sets the value of IncomingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedDestinationListUpdate(value uint64) (err error) { + return instance.SetProperty("IncomingFailedDestinationListUpdate", (value)) +} + +// GetIncomingFailedDestinationListUpdate gets the value of IncomingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedDestinationListUpdate() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedDestinationListUpdate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedPacketFilter sets the value of IncomingFailedPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedPacketFilter(value uint64) (err error) { + return instance.SetProperty("IncomingFailedPacketFilter", (value)) +} + +// GetIncomingFailedPacketFilter gets the value of IncomingFailedPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedPvlanSetting sets the value of IncomingFailedPvlanSetting for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedPvlanSetting(value uint64) (err error) { + return instance.SetProperty("IncomingFailedPvlanSetting", (value)) +} + +// GetIncomingFailedPvlanSetting gets the value of IncomingFailedPvlanSetting for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedPvlanSetting() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedPvlanSetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedSecurityPolicy sets the value of IncomingFailedSecurityPolicy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedSecurityPolicy(value uint64) (err error) { + return instance.SetProperty("IncomingFailedSecurityPolicy", (value)) +} + +// GetIncomingFailedSecurityPolicy gets the value of IncomingFailedSecurityPolicy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedSecurityPolicy() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedSecurityPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFiltered sets the value of IncomingFiltered for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFiltered(value uint64) (err error) { + return instance.SetProperty("IncomingFiltered", (value)) +} + +// GetIncomingFiltered gets the value of IncomingFiltered for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFiltered() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFiltered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFilteredIsolationUntagged sets the value of IncomingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFilteredIsolationUntagged(value uint64) (err error) { + return instance.SetProperty("IncomingFilteredIsolationUntagged", (value)) +} + +// GetIncomingFilteredIsolationUntagged gets the value of IncomingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFilteredIsolationUntagged() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFilteredIsolationUntagged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFilteredVLAN sets the value of IncomingFilteredVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFilteredVLAN(value uint64) (err error) { + return instance.SetProperty("IncomingFilteredVLAN", (value)) +} + +// GetIncomingFilteredVLAN gets the value of IncomingFilteredVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFilteredVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFilteredVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInjectedIcmp sets the value of IncomingInjectedIcmp for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInjectedIcmp(value uint64) (err error) { + return instance.SetProperty("IncomingInjectedIcmp", (value)) +} + +// GetIncomingInjectedIcmp gets the value of IncomingInjectedIcmp for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInjectedIcmp() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInjectedIcmp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidConfig sets the value of IncomingInvalidConfig for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidConfig(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidConfig", (value)) +} + +// GetIncomingInvalidConfig gets the value of IncomingInvalidConfig for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidConfig() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidConfig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidData sets the value of IncomingInvalidData for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidData(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidData", (value)) +} + +// GetIncomingInvalidData gets the value of IncomingInvalidData for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidData() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidDestMac sets the value of IncomingInvalidDestMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidDestMac(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidDestMac", (value)) +} + +// GetIncomingInvalidDestMac gets the value of IncomingInvalidDestMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidDestMac() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidDestMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidFirstNBTooSmall sets the value of IncomingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidFirstNBTooSmall(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidFirstNBTooSmall", (value)) +} + +// GetIncomingInvalidFirstNBTooSmall gets the value of IncomingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidFirstNBTooSmall() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidFirstNBTooSmall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidPacket sets the value of IncomingInvalidPacket for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidPacket(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidPacket", (value)) +} + +// GetIncomingInvalidPacket gets the value of IncomingInvalidPacket for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidPacket() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidPacket") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidPDQueue sets the value of IncomingInvalidPDQueue for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidPDQueue(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidPDQueue", (value)) +} + +// GetIncomingInvalidPDQueue gets the value of IncomingInvalidPDQueue for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidPDQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidPDQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidSourceMac sets the value of IncomingInvalidSourceMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidSourceMac(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidSourceMac", (value)) +} + +// GetIncomingInvalidSourceMac gets the value of IncomingInvalidSourceMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidSourceMac() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidSourceMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidVlanFormat sets the value of IncomingInvalidVlanFormat for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidVlanFormat(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidVlanFormat", (value)) +} + +// GetIncomingInvalidVlanFormat gets the value of IncomingInvalidVlanFormat for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidVlanFormat() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidVlanFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingIpsec sets the value of IncomingIpsec for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingIpsec(value uint64) (err error) { + return instance.SetProperty("IncomingIpsec", (value)) +} + +// GetIncomingIpsec gets the value of IncomingIpsec for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingIpsec() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingIpsec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingLowPowerPacketFilter sets the value of IncomingLowPowerPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingLowPowerPacketFilter(value uint64) (err error) { + return instance.SetProperty("IncomingLowPowerPacketFilter", (value)) +} + +// GetIncomingLowPowerPacketFilter gets the value of IncomingLowPowerPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingLowPowerPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingLowPowerPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingMacSpoofing sets the value of IncomingMacSpoofing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingMacSpoofing(value uint64) (err error) { + return instance.SetProperty("IncomingMacSpoofing", (value)) +} + +// GetIncomingMacSpoofing gets the value of IncomingMacSpoofing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingMacSpoofing() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingMacSpoofing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingMTUMismatch sets the value of IncomingMTUMismatch for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingMTUMismatch(value uint64) (err error) { + return instance.SetProperty("IncomingMTUMismatch", (value)) +} + +// GetIncomingMTUMismatch gets the value of IncomingMTUMismatch for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingMTUMismatch() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingMTUMismatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNativeFwdingReq sets the value of IncomingNativeFwdingReq for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNativeFwdingReq(value uint64) (err error) { + return instance.SetProperty("IncomingNativeFwdingReq", (value)) +} + +// GetIncomingNativeFwdingReq gets the value of IncomingNativeFwdingReq for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNativeFwdingReq() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNativeFwdingReq") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNicDisabled sets the value of IncomingNicDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNicDisabled(value uint64) (err error) { + return instance.SetProperty("IncomingNicDisabled", (value)) +} + +// GetIncomingNicDisabled gets the value of IncomingNicDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNicDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNicDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNotAccepted sets the value of IncomingNotAccepted for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNotAccepted(value uint64) (err error) { + return instance.SetProperty("IncomingNotAccepted", (value)) +} + +// GetIncomingNotAccepted gets the value of IncomingNotAccepted for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNotAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNotAccepted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNotReady sets the value of IncomingNotReady for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNotReady(value uint64) (err error) { + return instance.SetProperty("IncomingNotReady", (value)) +} + +// GetIncomingNotReady gets the value of IncomingNotReady for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNotReady() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNotReady") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingQos sets the value of IncomingQos for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingQos(value uint64) (err error) { + return instance.SetProperty("IncomingQos", (value)) +} + +// GetIncomingQos gets the value of IncomingQos for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingQos() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingQos") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingRequiredExtensionMissing sets the value of IncomingRequiredExtensionMissing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingRequiredExtensionMissing(value uint64) (err error) { + return instance.SetProperty("IncomingRequiredExtensionMissing", (value)) +} + +// GetIncomingRequiredExtensionMissing gets the value of IncomingRequiredExtensionMissing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingRequiredExtensionMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingRequiredExtensionMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingResources sets the value of IncomingResources for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingResources(value uint64) (err error) { + return instance.SetProperty("IncomingResources", (value)) +} + +// GetIncomingResources gets the value of IncomingResources for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingResources() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingRouterGuard sets the value of IncomingRouterGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingRouterGuard(value uint64) (err error) { + return instance.SetProperty("IncomingRouterGuard", (value)) +} + +// GetIncomingRouterGuard gets the value of IncomingRouterGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingRouterGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingRouterGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingStormLimit sets the value of IncomingStormLimit for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingStormLimit(value uint64) (err error) { + return instance.SetProperty("IncomingStormLimit", (value)) +} + +// GetIncomingStormLimit gets the value of IncomingStormLimit for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingStormLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingStormLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingSwitchDataFlowDisabled sets the value of IncomingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingSwitchDataFlowDisabled(value uint64) (err error) { + return instance.SetProperty("IncomingSwitchDataFlowDisabled", (value)) +} + +// GetIncomingSwitchDataFlowDisabled gets the value of IncomingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingSwitchDataFlowDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingSwitchDataFlowDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingUnauthorizedMAC sets the value of IncomingUnauthorizedMAC for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingUnauthorizedMAC(value uint64) (err error) { + return instance.SetProperty("IncomingUnauthorizedMAC", (value)) +} + +// GetIncomingUnauthorizedMAC gets the value of IncomingUnauthorizedMAC for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingUnauthorizedMAC() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingUnauthorizedMAC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingUnauthorizedVLAN sets the value of IncomingUnauthorizedVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingUnauthorizedVLAN(value uint64) (err error) { + return instance.SetProperty("IncomingUnauthorizedVLAN", (value)) +} + +// GetIncomingUnauthorizedVLAN gets the value of IncomingUnauthorizedVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingUnauthorizedVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingUnauthorizedVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingUnknown sets the value of IncomingUnknown for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingUnknown(value uint64) (err error) { + return instance.SetProperty("IncomingUnknown", (value)) +} + +// GetIncomingUnknown gets the value of IncomingUnknown for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingVirtualSubnetId sets the value of IncomingVirtualSubnetId for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingVirtualSubnetId(value uint64) (err error) { + return instance.SetProperty("IncomingVirtualSubnetId", (value)) +} + +// GetIncomingVirtualSubnetId gets the value of IncomingVirtualSubnetId for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingVirtualSubnetId() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingVirtualSubnetId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingWnv sets the value of IncomingWnv for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingWnv(value uint64) (err error) { + return instance.SetProperty("IncomingWnv", (value)) +} + +// GetIncomingWnv gets the value of IncomingWnv for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingWnv() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingWnv") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingBridgeReserved sets the value of OutgoingBridgeReserved for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingBridgeReserved(value uint64) (err error) { + return instance.SetProperty("OutgoingBridgeReserved", (value)) +} + +// GetOutgoingBridgeReserved gets the value of OutgoingBridgeReserved for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingBridgeReserved() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingBridgeReserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingBusy sets the value of OutgoingBusy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingBusy(value uint64) (err error) { + return instance.SetProperty("OutgoingBusy", (value)) +} + +// GetOutgoingBusy gets the value of OutgoingBusy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingBusy() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingBusy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingDhcpGuard sets the value of OutgoingDhcpGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingDhcpGuard(value uint64) (err error) { + return instance.SetProperty("OutgoingDhcpGuard", (value)) +} + +// GetOutgoingDhcpGuard gets the value of OutgoingDhcpGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingDhcpGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingDhcpGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingDisconnected sets the value of OutgoingDisconnected for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingDisconnected(value uint64) (err error) { + return instance.SetProperty("OutgoingDisconnected", (value)) +} + +// GetOutgoingDisconnected gets the value of OutgoingDisconnected for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingDisconnected() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingDisconnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedDestinationListUpdate sets the value of OutgoingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedDestinationListUpdate(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedDestinationListUpdate", (value)) +} + +// GetOutgoingFailedDestinationListUpdate gets the value of OutgoingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedDestinationListUpdate() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedDestinationListUpdate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedPacketFilter sets the value of OutgoingFailedPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedPacketFilter(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedPacketFilter", (value)) +} + +// GetOutgoingFailedPacketFilter gets the value of OutgoingFailedPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedPvlanSetting sets the value of OutgoingFailedPvlanSetting for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedPvlanSetting(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedPvlanSetting", (value)) +} + +// GetOutgoingFailedPvlanSetting gets the value of OutgoingFailedPvlanSetting for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedPvlanSetting() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedPvlanSetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedSecurityPolicy sets the value of OutgoingFailedSecurityPolicy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedSecurityPolicy(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedSecurityPolicy", (value)) +} + +// GetOutgoingFailedSecurityPolicy gets the value of OutgoingFailedSecurityPolicy for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedSecurityPolicy() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedSecurityPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFiltered sets the value of OutgoingFiltered for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFiltered(value uint64) (err error) { + return instance.SetProperty("OutgoingFiltered", (value)) +} + +// GetOutgoingFiltered gets the value of OutgoingFiltered for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFiltered() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFiltered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFilteredIsolationUntagged sets the value of OutgoingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFilteredIsolationUntagged(value uint64) (err error) { + return instance.SetProperty("OutgoingFilteredIsolationUntagged", (value)) +} + +// GetOutgoingFilteredIsolationUntagged gets the value of OutgoingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFilteredIsolationUntagged() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFilteredIsolationUntagged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFilteredVLAN sets the value of OutgoingFilteredVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFilteredVLAN(value uint64) (err error) { + return instance.SetProperty("OutgoingFilteredVLAN", (value)) +} + +// GetOutgoingFilteredVLAN gets the value of OutgoingFilteredVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFilteredVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFilteredVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInjectedIcmp sets the value of OutgoingInjectedIcmp for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInjectedIcmp(value uint64) (err error) { + return instance.SetProperty("OutgoingInjectedIcmp", (value)) +} + +// GetOutgoingInjectedIcmp gets the value of OutgoingInjectedIcmp for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInjectedIcmp() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInjectedIcmp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidConfig sets the value of OutgoingInvalidConfig for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidConfig(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidConfig", (value)) +} + +// GetOutgoingInvalidConfig gets the value of OutgoingInvalidConfig for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidConfig() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidConfig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidData sets the value of OutgoingInvalidData for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidData(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidData", (value)) +} + +// GetOutgoingInvalidData gets the value of OutgoingInvalidData for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidData() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidDestMac sets the value of OutgoingInvalidDestMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidDestMac(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidDestMac", (value)) +} + +// GetOutgoingInvalidDestMac gets the value of OutgoingInvalidDestMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidDestMac() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidDestMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidFirstNBTooSmall sets the value of OutgoingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidFirstNBTooSmall(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidFirstNBTooSmall", (value)) +} + +// GetOutgoingInvalidFirstNBTooSmall gets the value of OutgoingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidFirstNBTooSmall() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidFirstNBTooSmall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidPacket sets the value of OutgoingInvalidPacket for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidPacket(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidPacket", (value)) +} + +// GetOutgoingInvalidPacket gets the value of OutgoingInvalidPacket for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidPacket() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidPacket") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidPDQueue sets the value of OutgoingInvalidPDQueue for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidPDQueue(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidPDQueue", (value)) +} + +// GetOutgoingInvalidPDQueue gets the value of OutgoingInvalidPDQueue for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidPDQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidPDQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidSourceMac sets the value of OutgoingInvalidSourceMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidSourceMac(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidSourceMac", (value)) +} + +// GetOutgoingInvalidSourceMac gets the value of OutgoingInvalidSourceMac for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidSourceMac() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidSourceMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidVlanFormat sets the value of OutgoingInvalidVlanFormat for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidVlanFormat(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidVlanFormat", (value)) +} + +// GetOutgoingInvalidVlanFormat gets the value of OutgoingInvalidVlanFormat for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidVlanFormat() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidVlanFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingIpsec sets the value of OutgoingIpsec for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingIpsec(value uint64) (err error) { + return instance.SetProperty("OutgoingIpsec", (value)) +} + +// GetOutgoingIpsec gets the value of OutgoingIpsec for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingIpsec() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingIpsec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingLowPowerPacketFilter sets the value of OutgoingLowPowerPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingLowPowerPacketFilter(value uint64) (err error) { + return instance.SetProperty("OutgoingLowPowerPacketFilter", (value)) +} + +// GetOutgoingLowPowerPacketFilter gets the value of OutgoingLowPowerPacketFilter for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingLowPowerPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingLowPowerPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingMacSpoofing sets the value of OutgoingMacSpoofing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingMacSpoofing(value uint64) (err error) { + return instance.SetProperty("OutgoingMacSpoofing", (value)) +} + +// GetOutgoingMacSpoofing gets the value of OutgoingMacSpoofing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingMacSpoofing() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingMacSpoofing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingMTUMismatch sets the value of OutgoingMTUMismatch for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingMTUMismatch(value uint64) (err error) { + return instance.SetProperty("OutgoingMTUMismatch", (value)) +} + +// GetOutgoingMTUMismatch gets the value of OutgoingMTUMismatch for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingMTUMismatch() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingMTUMismatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNativeFwdingReq sets the value of OutgoingNativeFwdingReq for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNativeFwdingReq(value uint64) (err error) { + return instance.SetProperty("OutgoingNativeFwdingReq", (value)) +} + +// GetOutgoingNativeFwdingReq gets the value of OutgoingNativeFwdingReq for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNativeFwdingReq() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNativeFwdingReq") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNicDisabled sets the value of OutgoingNicDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNicDisabled(value uint64) (err error) { + return instance.SetProperty("OutgoingNicDisabled", (value)) +} + +// GetOutgoingNicDisabled gets the value of OutgoingNicDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNicDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNicDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNotAccepted sets the value of OutgoingNotAccepted for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNotAccepted(value uint64) (err error) { + return instance.SetProperty("OutgoingNotAccepted", (value)) +} + +// GetOutgoingNotAccepted gets the value of OutgoingNotAccepted for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNotAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNotAccepted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNotReady sets the value of OutgoingNotReady for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNotReady(value uint64) (err error) { + return instance.SetProperty("OutgoingNotReady", (value)) +} + +// GetOutgoingNotReady gets the value of OutgoingNotReady for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNotReady() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNotReady") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingQos sets the value of OutgoingQos for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingQos(value uint64) (err error) { + return instance.SetProperty("OutgoingQos", (value)) +} + +// GetOutgoingQos gets the value of OutgoingQos for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingQos() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingQos") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingRequiredExtensionMissing sets the value of OutgoingRequiredExtensionMissing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingRequiredExtensionMissing(value uint64) (err error) { + return instance.SetProperty("OutgoingRequiredExtensionMissing", (value)) +} + +// GetOutgoingRequiredExtensionMissing gets the value of OutgoingRequiredExtensionMissing for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingRequiredExtensionMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingRequiredExtensionMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingResources sets the value of OutgoingResources for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingResources(value uint64) (err error) { + return instance.SetProperty("OutgoingResources", (value)) +} + +// GetOutgoingResources gets the value of OutgoingResources for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingResources() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingRouterGuard sets the value of OutgoingRouterGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingRouterGuard(value uint64) (err error) { + return instance.SetProperty("OutgoingRouterGuard", (value)) +} + +// GetOutgoingRouterGuard gets the value of OutgoingRouterGuard for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingRouterGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingRouterGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingStormLimit sets the value of OutgoingStormLimit for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingStormLimit(value uint64) (err error) { + return instance.SetProperty("OutgoingStormLimit", (value)) +} + +// GetOutgoingStormLimit gets the value of OutgoingStormLimit for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingStormLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingStormLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingSwitchDataFlowDisabled sets the value of OutgoingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingSwitchDataFlowDisabled(value uint64) (err error) { + return instance.SetProperty("OutgoingSwitchDataFlowDisabled", (value)) +} + +// GetOutgoingSwitchDataFlowDisabled gets the value of OutgoingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingSwitchDataFlowDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingSwitchDataFlowDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingUnauthorizedMAC sets the value of OutgoingUnauthorizedMAC for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingUnauthorizedMAC(value uint64) (err error) { + return instance.SetProperty("OutgoingUnauthorizedMAC", (value)) +} + +// GetOutgoingUnauthorizedMAC gets the value of OutgoingUnauthorizedMAC for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingUnauthorizedMAC() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingUnauthorizedMAC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingUnauthorizedVLAN sets the value of OutgoingUnauthorizedVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingUnauthorizedVLAN(value uint64) (err error) { + return instance.SetProperty("OutgoingUnauthorizedVLAN", (value)) +} + +// GetOutgoingUnauthorizedVLAN gets the value of OutgoingUnauthorizedVLAN for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingUnauthorizedVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingUnauthorizedVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingUnknown sets the value of OutgoingUnknown for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingUnknown(value uint64) (err error) { + return instance.SetProperty("OutgoingUnknown", (value)) +} + +// GetOutgoingUnknown gets the value of OutgoingUnknown for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingVirtualSubnetId sets the value of OutgoingVirtualSubnetId for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingVirtualSubnetId(value uint64) (err error) { + return instance.SetProperty("OutgoingVirtualSubnetId", (value)) +} + +// GetOutgoingVirtualSubnetId gets the value of OutgoingVirtualSubnetId for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingVirtualSubnetId() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingVirtualSubnetId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingWnv sets the value of OutgoingWnv for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingWnv(value uint64) (err error) { + return instance.SetProperty("OutgoingWnv", (value)) +} + +// GetOutgoingWnv gets the value of OutgoingWnv for the instance +func (instance *Win32_PerfFormattedData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingWnv() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingWnv") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter.go new file mode 100644 index 00000000..365030fc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter.go @@ -0,0 +1,1460 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter struct +type Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter struct { + *Win32_PerfFormattedData + + // + BroadcastPacketsReceivedPersec uint64 + + // + BroadcastPacketsSentPersec uint64 + + // + BytesPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + DirectedPacketsReceivedPersec uint64 + + // + DirectedPacketsSentPersec uint64 + + // + DroppedPacketsIncomingPersec uint64 + + // + DroppedPacketsOutgoingPersec uint64 + + // + ExtensionsDroppedPacketsIncomingPersec uint64 + + // + ExtensionsDroppedPacketsOutgoingPersec uint64 + + // + IPsecoffloadBytesReceivePersec uint64 + + // + IPsecoffloadBytesSentPersec uint64 + + // + MulticastPacketsReceivedPersec uint64 + + // + MulticastPacketsSentPersec uint64 + + // + PacketsFailedSoftwareIPRxCSO uint64 + + // + PacketsFailedSoftwareIPRxCSOPersec uint64 + + // + PacketsFailedSoftwareRxCSOParsingPersec uint64 + + // + PacketsFailedSoftwareTCPRxCSO uint64 + + // + PacketsFailedSoftwareTCPRxCSOPersec uint64 + + // + PacketsFailedSoftwareUDPRxCSO uint64 + + // + PacketsFailedSoftwareUDPRxCSOPersec uint64 + + // + PacketsPassedSoftwareIPRxCSOPersec uint64 + + // + PacketsPassedSoftwareTCPRxCSOPersec uint64 + + // + PacketsPassedSoftwareUDPRxCSOPersec uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsSentPersec uint64 + + // + PacketsWithSoftwareIPTxCSOPersec uint64 + + // + PacketsWithSoftwareTCPTxCSOPersec uint64 + + // + PacketsWithSoftwareUDPTxCSOPersec uint64 + + // + RSCCoalescedBytes uint64 + + // + RSCCoalescedEventBucket10To1 uint64 + + // + RSCCoalescedEventBucket22To3 uint64 + + // + RSCCoalescedEventBucket34To7 uint64 + + // + RSCCoalescedEventBucket48To15 uint64 + + // + RSCCoalescedEventBucket516To31 uint64 + + // + RSCCoalescedEventBucket632To63 uint64 + + // + RSCCoalescedPacketBucket10To1 uint64 + + // + RSCCoalescedPacketBucket22To3 uint64 + + // + RSCCoalescedPacketBucket34To7 uint64 + + // + RSCCoalescedPacketBucket48To15 uint64 + + // + RSCCoalescedPacketBucket516To31 uint64 + + // + RSCCoalescedPacketBucket632To63 uint64 + + // + RSCCoalescedPackets uint64 + + // + RSCCoalesceEvents uint64 + + // + RSCPacketsProcessed uint64 +} + +func NewWin32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBroadcastPacketsReceivedPersec sets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBroadcastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsReceivedPersec", (value)) +} + +// GetBroadcastPacketsReceivedPersec gets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBroadcastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastPacketsSentPersec sets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBroadcastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsSentPersec", (value)) +} + +// GetBroadcastPacketsSentPersec gets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBroadcastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesPersec sets the value of BytesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBytesPersec(value uint64) (err error) { + return instance.SetProperty("BytesPersec", (value)) +} + +// GetBytesPersec gets the value of BytesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsReceivedPersec sets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDirectedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsReceivedPersec", (value)) +} + +// GetDirectedPacketsReceivedPersec gets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDirectedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsSentPersec sets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDirectedPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsSentPersec", (value)) +} + +// GetDirectedPacketsSentPersec gets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDirectedPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsIncomingPersec sets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsIncomingPersec", (value)) +} + +// GetDroppedPacketsIncomingPersec gets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsOutgoingPersec sets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsOutgoingPersec", (value)) +} + +// GetDroppedPacketsOutgoingPersec gets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsIncomingPersec sets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyExtensionsDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsIncomingPersec", (value)) +} + +// GetExtensionsDroppedPacketsIncomingPersec gets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyExtensionsDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsOutgoingPersec sets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyExtensionsDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsOutgoingPersec", (value)) +} + +// GetExtensionsDroppedPacketsOutgoingPersec gets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyExtensionsDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesReceivePersec sets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyIPsecoffloadBytesReceivePersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesReceivePersec", (value)) +} + +// GetIPsecoffloadBytesReceivePersec gets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyIPsecoffloadBytesReceivePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesReceivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesSentPersec sets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyIPsecoffloadBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesSentPersec", (value)) +} + +// GetIPsecoffloadBytesSentPersec gets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyIPsecoffloadBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsReceivedPersec sets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyMulticastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsReceivedPersec", (value)) +} + +// GetMulticastPacketsReceivedPersec gets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyMulticastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsSentPersec sets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyMulticastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsSentPersec", (value)) +} + +// GetMulticastPacketsSentPersec gets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyMulticastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareIPRxCSO sets the value of PacketsFailedSoftwareIPRxCSO for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareIPRxCSO(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareIPRxCSO", (value)) +} + +// GetPacketsFailedSoftwareIPRxCSO gets the value of PacketsFailedSoftwareIPRxCSO for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareIPRxCSO() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareIPRxCSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareIPRxCSOPersec sets the value of PacketsFailedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareIPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareIPRxCSOPersec", (value)) +} + +// GetPacketsFailedSoftwareIPRxCSOPersec gets the value of PacketsFailedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareIPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareIPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareRxCSOParsingPersec sets the value of PacketsFailedSoftwareRxCSOParsingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareRxCSOParsingPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareRxCSOParsingPersec", (value)) +} + +// GetPacketsFailedSoftwareRxCSOParsingPersec gets the value of PacketsFailedSoftwareRxCSOParsingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareRxCSOParsingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareRxCSOParsingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareTCPRxCSO sets the value of PacketsFailedSoftwareTCPRxCSO for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareTCPRxCSO(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareTCPRxCSO", (value)) +} + +// GetPacketsFailedSoftwareTCPRxCSO gets the value of PacketsFailedSoftwareTCPRxCSO for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareTCPRxCSO() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareTCPRxCSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareTCPRxCSOPersec sets the value of PacketsFailedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareTCPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareTCPRxCSOPersec", (value)) +} + +// GetPacketsFailedSoftwareTCPRxCSOPersec gets the value of PacketsFailedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareTCPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareTCPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareUDPRxCSO sets the value of PacketsFailedSoftwareUDPRxCSO for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareUDPRxCSO(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareUDPRxCSO", (value)) +} + +// GetPacketsFailedSoftwareUDPRxCSO gets the value of PacketsFailedSoftwareUDPRxCSO for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareUDPRxCSO() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareUDPRxCSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareUDPRxCSOPersec sets the value of PacketsFailedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareUDPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareUDPRxCSOPersec", (value)) +} + +// GetPacketsFailedSoftwareUDPRxCSOPersec gets the value of PacketsFailedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareUDPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareUDPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPassedSoftwareIPRxCSOPersec sets the value of PacketsPassedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPassedSoftwareIPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPassedSoftwareIPRxCSOPersec", (value)) +} + +// GetPacketsPassedSoftwareIPRxCSOPersec gets the value of PacketsPassedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPassedSoftwareIPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPassedSoftwareIPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPassedSoftwareTCPRxCSOPersec sets the value of PacketsPassedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPassedSoftwareTCPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPassedSoftwareTCPRxCSOPersec", (value)) +} + +// GetPacketsPassedSoftwareTCPRxCSOPersec gets the value of PacketsPassedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPassedSoftwareTCPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPassedSoftwareTCPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPassedSoftwareUDPRxCSOPersec sets the value of PacketsPassedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPassedSoftwareUDPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPassedSoftwareUDPRxCSOPersec", (value)) +} + +// GetPacketsPassedSoftwareUDPRxCSOPersec gets the value of PacketsPassedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPassedSoftwareUDPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPassedSoftwareUDPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsWithSoftwareIPTxCSOPersec sets the value of PacketsWithSoftwareIPTxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsWithSoftwareIPTxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsWithSoftwareIPTxCSOPersec", (value)) +} + +// GetPacketsWithSoftwareIPTxCSOPersec gets the value of PacketsWithSoftwareIPTxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsWithSoftwareIPTxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsWithSoftwareIPTxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsWithSoftwareTCPTxCSOPersec sets the value of PacketsWithSoftwareTCPTxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsWithSoftwareTCPTxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsWithSoftwareTCPTxCSOPersec", (value)) +} + +// GetPacketsWithSoftwareTCPTxCSOPersec gets the value of PacketsWithSoftwareTCPTxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsWithSoftwareTCPTxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsWithSoftwareTCPTxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsWithSoftwareUDPTxCSOPersec sets the value of PacketsWithSoftwareUDPTxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsWithSoftwareUDPTxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsWithSoftwareUDPTxCSOPersec", (value)) +} + +// GetPacketsWithSoftwareUDPTxCSOPersec gets the value of PacketsWithSoftwareUDPTxCSOPersec for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsWithSoftwareUDPTxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsWithSoftwareUDPTxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedBytes sets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedBytes(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedBytes", (value)) +} + +// GetRSCCoalescedBytes gets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket10To1 sets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket10To1", (value)) +} + +// GetRSCCoalescedEventBucket10To1 gets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket22To3 sets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket22To3", (value)) +} + +// GetRSCCoalescedEventBucket22To3 gets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket34To7 sets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket34To7", (value)) +} + +// GetRSCCoalescedEventBucket34To7 gets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket48To15 sets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket48To15", (value)) +} + +// GetRSCCoalescedEventBucket48To15 gets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket516To31 sets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket516To31", (value)) +} + +// GetRSCCoalescedEventBucket516To31 gets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket632To63 sets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket632To63", (value)) +} + +// GetRSCCoalescedEventBucket632To63 gets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket10To1 sets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket10To1", (value)) +} + +// GetRSCCoalescedPacketBucket10To1 gets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket22To3 sets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket22To3", (value)) +} + +// GetRSCCoalescedPacketBucket22To3 gets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket34To7 sets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket34To7", (value)) +} + +// GetRSCCoalescedPacketBucket34To7 gets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket48To15 sets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket48To15", (value)) +} + +// GetRSCCoalescedPacketBucket48To15 gets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket516To31 sets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket516To31", (value)) +} + +// GetRSCCoalescedPacketBucket516To31 gets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket632To63 sets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket632To63", (value)) +} + +// GetRSCCoalescedPacketBucket632To63 gets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPackets sets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPackets(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPackets", (value)) +} + +// GetRSCCoalescedPackets gets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalesceEvents sets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalesceEvents(value uint64) (err error) { + return instance.SetProperty("RSCCoalesceEvents", (value)) +} + +// GetRSCCoalesceEvents gets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalesceEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalesceEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCPacketsProcessed sets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCPacketsProcessed(value uint64) (err error) { + return instance.SetProperty("RSCPacketsProcessed", (value)) +} + +// GetRSCPacketsProcessed gets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCPacketsProcessed() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCPacketsProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go new file mode 100644 index 00000000..02aef662 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS struct +type Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS struct { + *Win32_PerfFormattedData + + // + PostmoveReceivePacketsPerSecond uint64 + + // + PostmoveReceivePacketsTotal uint64 + + // + PostmoveSendPacketCompletionsPerSecond uint64 + + // + PostmoveSendPacketCompletionsTotal uint64 + + // + PostmoveSendPacketsPerSecond uint64 + + // + PostmoveSendPacketsTotal uint64 + + // + ReceivePacketPerSecond uint64 + + // + ReceivePacketTotal uint64 + + // + ReceiveProcessor uint32 + + // + ReceiveProcessorGroup uint32 + + // + SendPacketCompletionsPerSecond uint64 + + // + SendPacketCompletionsTotal uint64 + + // + SendPacketPerSecond uint64 + + // + SendPacketTotal uint64 + + // + SendProcessor uint32 + + // + SendProcessorGroup uint32 +} + +func NewWin32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSSEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetPostmoveReceivePacketsPerSecond sets the value of PostmoveReceivePacketsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveReceivePacketsPerSecond(value uint64) (err error) { + return instance.SetProperty("PostmoveReceivePacketsPerSecond", (value)) +} + +// GetPostmoveReceivePacketsPerSecond gets the value of PostmoveReceivePacketsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveReceivePacketsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveReceivePacketsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveReceivePacketsTotal sets the value of PostmoveReceivePacketsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveReceivePacketsTotal(value uint64) (err error) { + return instance.SetProperty("PostmoveReceivePacketsTotal", (value)) +} + +// GetPostmoveReceivePacketsTotal gets the value of PostmoveReceivePacketsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveReceivePacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveReceivePacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketCompletionsPerSecond sets the value of PostmoveSendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketCompletionsPerSecond(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketCompletionsPerSecond", (value)) +} + +// GetPostmoveSendPacketCompletionsPerSecond gets the value of PostmoveSendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketCompletionsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketCompletionsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketCompletionsTotal sets the value of PostmoveSendPacketCompletionsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketCompletionsTotal(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketCompletionsTotal", (value)) +} + +// GetPostmoveSendPacketCompletionsTotal gets the value of PostmoveSendPacketCompletionsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketCompletionsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketCompletionsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketsPerSecond sets the value of PostmoveSendPacketsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketsPerSecond(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketsPerSecond", (value)) +} + +// GetPostmoveSendPacketsPerSecond gets the value of PostmoveSendPacketsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketsTotal sets the value of PostmoveSendPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketsTotal", (value)) +} + +// GetPostmoveSendPacketsTotal gets the value of PostmoveSendPacketsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceivePacketPerSecond sets the value of ReceivePacketPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceivePacketPerSecond(value uint64) (err error) { + return instance.SetProperty("ReceivePacketPerSecond", (value)) +} + +// GetReceivePacketPerSecond gets the value of ReceivePacketPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceivePacketPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivePacketPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceivePacketTotal sets the value of ReceivePacketTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceivePacketTotal(value uint64) (err error) { + return instance.SetProperty("ReceivePacketTotal", (value)) +} + +// GetReceivePacketTotal gets the value of ReceivePacketTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceivePacketTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivePacketTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveProcessor sets the value of ReceiveProcessor for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceiveProcessor(value uint32) (err error) { + return instance.SetProperty("ReceiveProcessor", (value)) +} + +// GetReceiveProcessor gets the value of ReceiveProcessor for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceiveProcessor() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceiveProcessorGroup sets the value of ReceiveProcessorGroup for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceiveProcessorGroup(value uint32) (err error) { + return instance.SetProperty("ReceiveProcessorGroup", (value)) +} + +// GetReceiveProcessorGroup gets the value of ReceiveProcessorGroup for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceiveProcessorGroup() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveProcessorGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSendPacketCompletionsPerSecond sets the value of SendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketCompletionsPerSecond(value uint64) (err error) { + return instance.SetProperty("SendPacketCompletionsPerSecond", (value)) +} + +// GetSendPacketCompletionsPerSecond gets the value of SendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketCompletionsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketCompletionsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendPacketCompletionsTotal sets the value of SendPacketCompletionsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketCompletionsTotal(value uint64) (err error) { + return instance.SetProperty("SendPacketCompletionsTotal", (value)) +} + +// GetSendPacketCompletionsTotal gets the value of SendPacketCompletionsTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketCompletionsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketCompletionsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendPacketPerSecond sets the value of SendPacketPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketPerSecond(value uint64) (err error) { + return instance.SetProperty("SendPacketPerSecond", (value)) +} + +// GetSendPacketPerSecond gets the value of SendPacketPerSecond for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendPacketTotal sets the value of SendPacketTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketTotal(value uint64) (err error) { + return instance.SetProperty("SendPacketTotal", (value)) +} + +// GetSendPacketTotal gets the value of SendPacketTotal for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendProcessor sets the value of SendProcessor for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendProcessor(value uint32) (err error) { + return instance.SetProperty("SendProcessor", (value)) +} + +// GetSendProcessor gets the value of SendProcessor for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendProcessor() (value uint32, err error) { + retValue, err := instance.GetProperty("SendProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSendProcessorGroup sets the value of SendProcessorGroup for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendProcessorGroup(value uint32) (err error) { + return instance.SetProperty("SendProcessorGroup", (value)) +} + +// GetSendProcessorGroup gets the value of SendProcessorGroup for the instance +func (instance *Win32_PerfFormattedData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendProcessorGroup() (value uint32, err error) { + retValue, err := instance.GetProperty("SendProcessorGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort.go new file mode 100644 index 00000000..af0f710c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort struct +type Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort struct { + *Win32_PerfFormattedData + + // + BroadcastPacketsReceivedPersec uint64 + + // + BroadcastPacketsSentPersec uint64 + + // + BytesPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + DirectedPacketsReceivedPersec uint64 + + // + DirectedPacketsSentPersec uint64 + + // + DroppedPacketsIncomingPersec uint64 + + // + DroppedPacketsOutgoingPersec uint64 + + // + ExtensionsDroppedPacketsIncomingPersec uint64 + + // + ExtensionsDroppedPacketsOutgoingPersec uint64 + + // + IPsecoffloadBytesReceivePersec uint64 + + // + IPsecoffloadBytesSentPersec uint64 + + // + IPsecSAsOffloaded uint64 + + // + MulticastPacketsReceivedPersec uint64 + + // + MulticastPacketsSentPersec uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsSentPersec uint64 + + // + UnhashedPacketsReceivedPersec uint64 + + // + UnhashedPacketsSendCompletedPersec uint64 +} + +func NewWin32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPortEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBroadcastPacketsReceivedPersec sets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBroadcastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsReceivedPersec", (value)) +} + +// GetBroadcastPacketsReceivedPersec gets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBroadcastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastPacketsSentPersec sets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBroadcastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsSentPersec", (value)) +} + +// GetBroadcastPacketsSentPersec gets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBroadcastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesPersec sets the value of BytesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBytesPersec(value uint64) (err error) { + return instance.SetProperty("BytesPersec", (value)) +} + +// GetBytesPersec gets the value of BytesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsReceivedPersec sets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDirectedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsReceivedPersec", (value)) +} + +// GetDirectedPacketsReceivedPersec gets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDirectedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsSentPersec sets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDirectedPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsSentPersec", (value)) +} + +// GetDirectedPacketsSentPersec gets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDirectedPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsIncomingPersec sets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsIncomingPersec", (value)) +} + +// GetDroppedPacketsIncomingPersec gets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsOutgoingPersec sets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsOutgoingPersec", (value)) +} + +// GetDroppedPacketsOutgoingPersec gets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsIncomingPersec sets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyExtensionsDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsIncomingPersec", (value)) +} + +// GetExtensionsDroppedPacketsIncomingPersec gets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyExtensionsDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsOutgoingPersec sets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyExtensionsDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsOutgoingPersec", (value)) +} + +// GetExtensionsDroppedPacketsOutgoingPersec gets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyExtensionsDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesReceivePersec sets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyIPsecoffloadBytesReceivePersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesReceivePersec", (value)) +} + +// GetIPsecoffloadBytesReceivePersec gets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyIPsecoffloadBytesReceivePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesReceivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesSentPersec sets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyIPsecoffloadBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesSentPersec", (value)) +} + +// GetIPsecoffloadBytesSentPersec gets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyIPsecoffloadBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecSAsOffloaded sets the value of IPsecSAsOffloaded for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyIPsecSAsOffloaded(value uint64) (err error) { + return instance.SetProperty("IPsecSAsOffloaded", (value)) +} + +// GetIPsecSAsOffloaded gets the value of IPsecSAsOffloaded for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyIPsecSAsOffloaded() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecSAsOffloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsReceivedPersec sets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyMulticastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsReceivedPersec", (value)) +} + +// GetMulticastPacketsReceivedPersec gets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyMulticastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsSentPersec sets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyMulticastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsSentPersec", (value)) +} + +// GetMulticastPacketsSentPersec gets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyMulticastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnhashedPacketsReceivedPersec sets the value of UnhashedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyUnhashedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("UnhashedPacketsReceivedPersec", (value)) +} + +// GetUnhashedPacketsReceivedPersec gets the value of UnhashedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyUnhashedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UnhashedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnhashedPacketsSendCompletedPersec sets the value of UnhashedPacketsSendCompletedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyUnhashedPacketsSendCompletedPersec(value uint64) (err error) { + return instance.SetProperty("UnhashedPacketsSendCompletedPersec", (value)) +} + +// GetUnhashedPacketsSendCompletedPersec gets the value of UnhashedPacketsSendCompletedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyUnhashedPacketsSendCompletedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UnhashedPacketsSendCompletedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go new file mode 100644 index 00000000..6ab275c3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor struct +type Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor struct { + *Win32_PerfFormattedData + + // + NumberofTransmitCompletesPersec uint64 + + // + NumberofVMQs uint64 + + // + PacketsfromExternalPersec uint64 + + // + PacketsfromInternalPersec uint64 +} + +func NewWin32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberofTransmitCompletesPersec sets the value of NumberofTransmitCompletesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyNumberofTransmitCompletesPersec(value uint64) (err error) { + return instance.SetProperty("NumberofTransmitCompletesPersec", (value)) +} + +// GetNumberofTransmitCompletesPersec gets the value of NumberofTransmitCompletesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyNumberofTransmitCompletesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofTransmitCompletesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofVMQs sets the value of NumberofVMQs for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyNumberofVMQs(value uint64) (err error) { + return instance.SetProperty("NumberofVMQs", (value)) +} + +// GetNumberofVMQs gets the value of NumberofVMQs for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyNumberofVMQs() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofVMQs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsfromExternalPersec sets the value of PacketsfromExternalPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyPacketsfromExternalPersec(value uint64) (err error) { + return instance.SetProperty("PacketsfromExternalPersec", (value)) +} + +// GetPacketsfromExternalPersec gets the value of PacketsfromExternalPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyPacketsfromExternalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsfromExternalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsfromInternalPersec sets the value of PacketsfromInternalPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyPacketsfromInternalPersec(value uint64) (err error) { + return instance.SetProperty("PacketsfromInternalPersec", (value)) +} + +// GetPacketsfromInternalPersec gets the value of PacketsfromInternalPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyPacketsfromInternalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsfromInternalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch.go new file mode 100644 index 00000000..d6a5d80f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch.go @@ -0,0 +1,1250 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch struct +type Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch struct { + *Win32_PerfFormattedData + + // + BroadcastPacketsReceivedPersec uint64 + + // + BroadcastPacketsSentPersec uint64 + + // + BytesPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + DirectedPacketsReceivedPersec uint64 + + // + DirectedPacketsSentPersec uint64 + + // + DroppedPacketsIncomingPersec uint64 + + // + DroppedPacketsOutgoingPersec uint64 + + // + ExtensionsDroppedPacketsIncomingPersec uint64 + + // + ExtensionsDroppedPacketsOutgoingPersec uint64 + + // + LearnedMacAddresses uint64 + + // + LearnedMacAddressesPersec uint64 + + // + MulticastPacketsReceivedPersec uint64 + + // + MulticastPacketsSentPersec uint64 + + // + NumberofSendChannelMovesPersec uint64 + + // + NumberofVMQMovesPersec uint64 + + // + PacketsFlooded uint64 + + // + PacketsFloodedPersec uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsSentPersec uint64 + + // + PurgedMacAddresses uint64 + + // + PurgedMacAddressesPersec uint64 + + // + RSCCoalescedBytes uint64 + + // + RSCCoalescedEventBucket10To1 uint64 + + // + RSCCoalescedEventBucket22To3 uint64 + + // + RSCCoalescedEventBucket34To7 uint64 + + // + RSCCoalescedEventBucket48To15 uint64 + + // + RSCCoalescedEventBucket516To31 uint64 + + // + RSCCoalescedEventBucket632To63 uint64 + + // + RSCCoalescedPacketBucket10To1 uint64 + + // + RSCCoalescedPacketBucket22To3 uint64 + + // + RSCCoalescedPacketBucket34To7 uint64 + + // + RSCCoalescedPacketBucket48To15 uint64 + + // + RSCCoalescedPacketBucket516To31 uint64 + + // + RSCCoalescedPacketBucket632To63 uint64 + + // + RSCCoalescedPackets uint64 + + // + RSCCoalesceEvents uint64 + + // + RSCPacketsProcessed uint64 +} + +func NewWin32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitchEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitchEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBroadcastPacketsReceivedPersec sets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBroadcastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsReceivedPersec", (value)) +} + +// GetBroadcastPacketsReceivedPersec gets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBroadcastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastPacketsSentPersec sets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBroadcastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsSentPersec", (value)) +} + +// GetBroadcastPacketsSentPersec gets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBroadcastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesPersec sets the value of BytesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBytesPersec(value uint64) (err error) { + return instance.SetProperty("BytesPersec", (value)) +} + +// GetBytesPersec gets the value of BytesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsReceivedPersec sets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDirectedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsReceivedPersec", (value)) +} + +// GetDirectedPacketsReceivedPersec gets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDirectedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsSentPersec sets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDirectedPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsSentPersec", (value)) +} + +// GetDirectedPacketsSentPersec gets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDirectedPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsIncomingPersec sets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsIncomingPersec", (value)) +} + +// GetDroppedPacketsIncomingPersec gets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsOutgoingPersec sets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsOutgoingPersec", (value)) +} + +// GetDroppedPacketsOutgoingPersec gets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsIncomingPersec sets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyExtensionsDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsIncomingPersec", (value)) +} + +// GetExtensionsDroppedPacketsIncomingPersec gets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyExtensionsDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsOutgoingPersec sets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyExtensionsDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsOutgoingPersec", (value)) +} + +// GetExtensionsDroppedPacketsOutgoingPersec gets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyExtensionsDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLearnedMacAddresses sets the value of LearnedMacAddresses for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyLearnedMacAddresses(value uint64) (err error) { + return instance.SetProperty("LearnedMacAddresses", (value)) +} + +// GetLearnedMacAddresses gets the value of LearnedMacAddresses for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyLearnedMacAddresses() (value uint64, err error) { + retValue, err := instance.GetProperty("LearnedMacAddresses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLearnedMacAddressesPersec sets the value of LearnedMacAddressesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyLearnedMacAddressesPersec(value uint64) (err error) { + return instance.SetProperty("LearnedMacAddressesPersec", (value)) +} + +// GetLearnedMacAddressesPersec gets the value of LearnedMacAddressesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyLearnedMacAddressesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LearnedMacAddressesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsReceivedPersec sets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyMulticastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsReceivedPersec", (value)) +} + +// GetMulticastPacketsReceivedPersec gets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyMulticastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsSentPersec sets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyMulticastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsSentPersec", (value)) +} + +// GetMulticastPacketsSentPersec gets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyMulticastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofSendChannelMovesPersec sets the value of NumberofSendChannelMovesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyNumberofSendChannelMovesPersec(value uint64) (err error) { + return instance.SetProperty("NumberofSendChannelMovesPersec", (value)) +} + +// GetNumberofSendChannelMovesPersec gets the value of NumberofSendChannelMovesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyNumberofSendChannelMovesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofSendChannelMovesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofVMQMovesPersec sets the value of NumberofVMQMovesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyNumberofVMQMovesPersec(value uint64) (err error) { + return instance.SetProperty("NumberofVMQMovesPersec", (value)) +} + +// GetNumberofVMQMovesPersec gets the value of NumberofVMQMovesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyNumberofVMQMovesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofVMQMovesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFlooded sets the value of PacketsFlooded for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsFlooded(value uint64) (err error) { + return instance.SetProperty("PacketsFlooded", (value)) +} + +// GetPacketsFlooded gets the value of PacketsFlooded for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsFlooded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFlooded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFloodedPersec sets the value of PacketsFloodedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsFloodedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFloodedPersec", (value)) +} + +// GetPacketsFloodedPersec gets the value of PacketsFloodedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsFloodedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFloodedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPurgedMacAddresses sets the value of PurgedMacAddresses for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPurgedMacAddresses(value uint64) (err error) { + return instance.SetProperty("PurgedMacAddresses", (value)) +} + +// GetPurgedMacAddresses gets the value of PurgedMacAddresses for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPurgedMacAddresses() (value uint64, err error) { + retValue, err := instance.GetProperty("PurgedMacAddresses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPurgedMacAddressesPersec sets the value of PurgedMacAddressesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPurgedMacAddressesPersec(value uint64) (err error) { + return instance.SetProperty("PurgedMacAddressesPersec", (value)) +} + +// GetPurgedMacAddressesPersec gets the value of PurgedMacAddressesPersec for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPurgedMacAddressesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PurgedMacAddressesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedBytes sets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedBytes(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedBytes", (value)) +} + +// GetRSCCoalescedBytes gets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket10To1 sets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket10To1", (value)) +} + +// GetRSCCoalescedEventBucket10To1 gets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket22To3 sets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket22To3", (value)) +} + +// GetRSCCoalescedEventBucket22To3 gets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket34To7 sets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket34To7", (value)) +} + +// GetRSCCoalescedEventBucket34To7 gets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket48To15 sets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket48To15", (value)) +} + +// GetRSCCoalescedEventBucket48To15 gets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket516To31 sets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket516To31", (value)) +} + +// GetRSCCoalescedEventBucket516To31 gets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket632To63 sets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket632To63", (value)) +} + +// GetRSCCoalescedEventBucket632To63 gets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket10To1 sets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket10To1", (value)) +} + +// GetRSCCoalescedPacketBucket10To1 gets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket22To3 sets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket22To3", (value)) +} + +// GetRSCCoalescedPacketBucket22To3 gets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket34To7 sets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket34To7", (value)) +} + +// GetRSCCoalescedPacketBucket34To7 gets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket48To15 sets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket48To15", (value)) +} + +// GetRSCCoalescedPacketBucket48To15 gets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket516To31 sets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket516To31", (value)) +} + +// GetRSCCoalescedPacketBucket516To31 gets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket632To63 sets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket632To63", (value)) +} + +// GetRSCCoalescedPacketBucket632To63 gets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPackets sets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPackets(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPackets", (value)) +} + +// GetRSCCoalescedPackets gets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalesceEvents sets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalesceEvents(value uint64) (err error) { + return instance.SetProperty("RSCCoalesceEvents", (value)) +} + +// GetRSCCoalesceEvents gets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalesceEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalesceEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCPacketsProcessed sets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCPacketsProcessed(value uint64) (err error) { + return instance.SetProperty("RSCPacketsProcessed", (value)) +} + +// GetRSCPacketsProcessed gets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCPacketsProcessed() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCPacketsProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_ClientSideCaching.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_ClientSideCaching.go new file mode 100644 index 00000000..a6c2e435 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_ClientSideCaching.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_OfflineFiles_ClientSideCaching struct +type Win32_PerfFormattedData_OfflineFiles_ClientSideCaching struct { + *Win32_PerfFormattedData + + // + ApplicationBytesReadFromCache uint64 + + // + ApplicationBytesReadFromServer uint64 + + // + ApplicationBytesReadFromServerNotCached uint64 + + // + PrefetchBytesReadFromCache uint64 + + // + PrefetchBytesReadFromServer uint64 + + // + PrefetchOperationsQueued uint32 + + // + SMBBranchCacheBytesPublished uint64 + + // + SMBBranchCacheBytesReceived uint64 + + // + SMBBranchCacheBytesRequested uint64 + + // + SMBBranchCacheBytesRequestedFromServer uint64 + + // + SMBBranchCacheHashBytesReceived uint64 + + // + SMBBranchCacheHashesReceived uint32 + + // + SMBBranchCacheHashesRequested uint32 +} + +func NewWin32_PerfFormattedData_OfflineFiles_ClientSideCachingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_OfflineFiles_ClientSideCaching{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_OfflineFiles_ClientSideCachingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_OfflineFiles_ClientSideCaching{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetApplicationBytesReadFromCache sets the value of ApplicationBytesReadFromCache for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertyApplicationBytesReadFromCache(value uint64) (err error) { + return instance.SetProperty("ApplicationBytesReadFromCache", (value)) +} + +// GetApplicationBytesReadFromCache gets the value of ApplicationBytesReadFromCache for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertyApplicationBytesReadFromCache() (value uint64, err error) { + retValue, err := instance.GetProperty("ApplicationBytesReadFromCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetApplicationBytesReadFromServer sets the value of ApplicationBytesReadFromServer for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertyApplicationBytesReadFromServer(value uint64) (err error) { + return instance.SetProperty("ApplicationBytesReadFromServer", (value)) +} + +// GetApplicationBytesReadFromServer gets the value of ApplicationBytesReadFromServer for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertyApplicationBytesReadFromServer() (value uint64, err error) { + retValue, err := instance.GetProperty("ApplicationBytesReadFromServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetApplicationBytesReadFromServerNotCached sets the value of ApplicationBytesReadFromServerNotCached for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertyApplicationBytesReadFromServerNotCached(value uint64) (err error) { + return instance.SetProperty("ApplicationBytesReadFromServerNotCached", (value)) +} + +// GetApplicationBytesReadFromServerNotCached gets the value of ApplicationBytesReadFromServerNotCached for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertyApplicationBytesReadFromServerNotCached() (value uint64, err error) { + retValue, err := instance.GetProperty("ApplicationBytesReadFromServerNotCached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPrefetchBytesReadFromCache sets the value of PrefetchBytesReadFromCache for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertyPrefetchBytesReadFromCache(value uint64) (err error) { + return instance.SetProperty("PrefetchBytesReadFromCache", (value)) +} + +// GetPrefetchBytesReadFromCache gets the value of PrefetchBytesReadFromCache for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertyPrefetchBytesReadFromCache() (value uint64, err error) { + retValue, err := instance.GetProperty("PrefetchBytesReadFromCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPrefetchBytesReadFromServer sets the value of PrefetchBytesReadFromServer for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertyPrefetchBytesReadFromServer(value uint64) (err error) { + return instance.SetProperty("PrefetchBytesReadFromServer", (value)) +} + +// GetPrefetchBytesReadFromServer gets the value of PrefetchBytesReadFromServer for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertyPrefetchBytesReadFromServer() (value uint64, err error) { + retValue, err := instance.GetProperty("PrefetchBytesReadFromServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPrefetchOperationsQueued sets the value of PrefetchOperationsQueued for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertyPrefetchOperationsQueued(value uint32) (err error) { + return instance.SetProperty("PrefetchOperationsQueued", (value)) +} + +// GetPrefetchOperationsQueued gets the value of PrefetchOperationsQueued for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertyPrefetchOperationsQueued() (value uint32, err error) { + retValue, err := instance.GetProperty("PrefetchOperationsQueued") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheBytesPublished sets the value of SMBBranchCacheBytesPublished for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesPublished(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesPublished", (value)) +} + +// GetSMBBranchCacheBytesPublished gets the value of SMBBranchCacheBytesPublished for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesPublished() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesPublished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheBytesReceived sets the value of SMBBranchCacheBytesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesReceived(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesReceived", (value)) +} + +// GetSMBBranchCacheBytesReceived gets the value of SMBBranchCacheBytesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheBytesRequested sets the value of SMBBranchCacheBytesRequested for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesRequested(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesRequested", (value)) +} + +// GetSMBBranchCacheBytesRequested gets the value of SMBBranchCacheBytesRequested for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesRequested() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesRequested") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheBytesRequestedFromServer sets the value of SMBBranchCacheBytesRequestedFromServer for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesRequestedFromServer(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesRequestedFromServer", (value)) +} + +// GetSMBBranchCacheBytesRequestedFromServer gets the value of SMBBranchCacheBytesRequestedFromServer for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesRequestedFromServer() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesRequestedFromServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashBytesReceived sets the value of SMBBranchCacheHashBytesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheHashBytesReceived(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheHashBytesReceived", (value)) +} + +// GetSMBBranchCacheHashBytesReceived gets the value of SMBBranchCacheHashBytesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheHashBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashBytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashesReceived sets the value of SMBBranchCacheHashesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheHashesReceived(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashesReceived", (value)) +} + +// GetSMBBranchCacheHashesReceived gets the value of SMBBranchCacheHashesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheHashesReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashesRequested sets the value of SMBBranchCacheHashesRequested for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheHashesRequested(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashesRequested", (value)) +} + +// GetSMBBranchCacheHashesRequested gets the value of SMBBranchCacheHashesRequested for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheHashesRequested() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashesRequested") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_OfflineFiles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_OfflineFiles.go new file mode 100644 index 00000000..404ce6c8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_OfflineFiles_OfflineFiles.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_OfflineFiles_OfflineFiles struct +type Win32_PerfFormattedData_OfflineFiles_OfflineFiles struct { + *Win32_PerfFormattedData + + // + BytesReceived uint64 + + // + BytesReceivedPersec uint64 + + // + BytesTransmitted uint64 + + // + BytesTransmittedPersec uint64 +} + +func NewWin32_PerfFormattedData_OfflineFiles_OfflineFilesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_OfflineFiles_OfflineFiles{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_OfflineFiles_OfflineFilesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_OfflineFiles_OfflineFiles{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_OfflineFiles_OfflineFiles) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_LogicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_LogicalDisk.go new file mode 100644 index 00000000..75e2b841 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_LogicalDisk.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfDisk_LogicalDisk struct +type Win32_PerfFormattedData_PerfDisk_LogicalDisk struct { + *Win32_PerfFormattedData + + // + AvgDiskBytesPerRead uint64 + + // + AvgDiskBytesPerTransfer uint64 + + // + AvgDiskBytesPerWrite uint64 + + // + AvgDiskQueueLength uint64 + + // + AvgDiskReadQueueLength uint64 + + // + AvgDisksecPerRead uint32 + + // + AvgDisksecPerTransfer uint32 + + // + AvgDisksecPerWrite uint32 + + // + AvgDiskWriteQueueLength uint64 + + // + CurrentDiskQueueLength uint32 + + // + DiskBytesPersec uint64 + + // + DiskReadBytesPersec uint64 + + // + DiskReadsPersec uint32 + + // + DiskTransfersPersec uint32 + + // + DiskWriteBytesPersec uint64 + + // + DiskWritesPersec uint32 + + // + FreeMegabytes uint32 + + // + PercentDiskReadTime uint64 + + // + PercentDiskTime uint64 + + // + PercentDiskWriteTime uint64 + + // + PercentFreeSpace uint32 + + // + PercentIdleTime uint64 + + // + SplitIOPerSec uint32 +} + +func NewWin32_PerfFormattedData_PerfDisk_LogicalDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfDisk_LogicalDisk, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfDisk_LogicalDisk{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfDisk_LogicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfDisk_LogicalDisk, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfDisk_LogicalDisk{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgDiskBytesPerRead sets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerRead", (value)) +} + +// GetAvgDiskBytesPerRead gets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerTransfer sets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerTransfer(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerTransfer", (value)) +} + +// GetAvgDiskBytesPerTransfer gets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerTransfer() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerWrite sets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerWrite", (value)) +} + +// GetAvgDiskBytesPerWrite gets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskQueueLength sets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDiskQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskQueueLength", (value)) +} + +// GetAvgDiskQueueLength gets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDiskQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskReadQueueLength sets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDiskReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskReadQueueLength", (value)) +} + +// GetAvgDiskReadQueueLength gets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDiskReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDisksecPerRead sets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerRead", (value)) +} + +// GetAvgDisksecPerRead gets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerTransfer sets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerTransfer(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerTransfer", (value)) +} + +// GetAvgDisksecPerTransfer gets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerTransfer() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerWrite sets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerWrite", (value)) +} + +// GetAvgDisksecPerWrite gets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskWriteQueueLength sets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyAvgDiskWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskWriteQueueLength", (value)) +} + +// GetAvgDiskWriteQueueLength gets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyAvgDiskWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDiskQueueLength sets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyCurrentDiskQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentDiskQueueLength", (value)) +} + +// GetCurrentDiskQueueLength gets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyCurrentDiskQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskBytesPersec sets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyDiskBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskBytesPersec", (value)) +} + +// GetDiskBytesPersec gets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyDiskBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytesPersec sets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyDiskReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadBytesPersec", (value)) +} + +// GetDiskReadBytesPersec gets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyDiskReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadsPersec sets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyDiskReadsPersec(value uint32) (err error) { + return instance.SetProperty("DiskReadsPersec", (value)) +} + +// GetDiskReadsPersec gets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyDiskReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskTransfersPersec sets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyDiskTransfersPersec(value uint32) (err error) { + return instance.SetProperty("DiskTransfersPersec", (value)) +} + +// GetDiskTransfersPersec gets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyDiskTransfersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskWriteBytesPersec sets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyDiskWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytesPersec", (value)) +} + +// GetDiskWriteBytesPersec gets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyDiskWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWritesPersec sets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyDiskWritesPersec(value uint32) (err error) { + return instance.SetProperty("DiskWritesPersec", (value)) +} + +// GetDiskWritesPersec gets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyDiskWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeMegabytes sets the value of FreeMegabytes for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyFreeMegabytes(value uint32) (err error) { + return instance.SetProperty("FreeMegabytes", (value)) +} + +// GetFreeMegabytes gets the value of FreeMegabytes for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyFreeMegabytes() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeMegabytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentDiskReadTime sets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyPercentDiskReadTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskReadTime", (value)) +} + +// GetPercentDiskReadTime gets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyPercentDiskReadTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskReadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskTime sets the value of PercentDiskTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyPercentDiskTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskTime", (value)) +} + +// GetPercentDiskTime gets the value of PercentDiskTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyPercentDiskTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskWriteTime sets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyPercentDiskWriteTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskWriteTime", (value)) +} + +// GetPercentDiskWriteTime gets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyPercentDiskWriteTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentFreeSpace sets the value of PercentFreeSpace for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyPercentFreeSpace(value uint32) (err error) { + return instance.SetProperty("PercentFreeSpace", (value)) +} + +// GetPercentFreeSpace gets the value of PercentFreeSpace for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyPercentFreeSpace() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentFreeSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitIOPerSec sets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) SetPropertySplitIOPerSec(value uint32) (err error) { + return instance.SetProperty("SplitIOPerSec", (value)) +} + +// GetSplitIOPerSec gets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_LogicalDisk) GetPropertySplitIOPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("SplitIOPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_PhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_PhysicalDisk.go new file mode 100644 index 00000000..289e899c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfDisk_PhysicalDisk.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfDisk_PhysicalDisk struct +type Win32_PerfFormattedData_PerfDisk_PhysicalDisk struct { + *Win32_PerfFormattedData + + // + AvgDiskBytesPerRead uint64 + + // + AvgDiskBytesPerTransfer uint64 + + // + AvgDiskBytesPerWrite uint64 + + // + AvgDiskQueueLength uint64 + + // + AvgDiskReadQueueLength uint64 + + // + AvgDisksecPerRead uint32 + + // + AvgDisksecPerTransfer uint32 + + // + AvgDisksecPerWrite uint32 + + // + AvgDiskWriteQueueLength uint64 + + // + CurrentDiskQueueLength uint32 + + // + DiskBytesPersec uint64 + + // + DiskReadBytesPersec uint64 + + // + DiskReadsPersec uint32 + + // + DiskTransfersPersec uint32 + + // + DiskWriteBytesPersec uint64 + + // + DiskWritesPersec uint32 + + // + PercentDiskReadTime uint64 + + // + PercentDiskTime uint64 + + // + PercentDiskWriteTime uint64 + + // + PercentIdleTime uint64 + + // + SplitIOPerSec uint32 +} + +func NewWin32_PerfFormattedData_PerfDisk_PhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfDisk_PhysicalDisk{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfDisk_PhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfDisk_PhysicalDisk{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgDiskBytesPerRead sets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerRead", (value)) +} + +// GetAvgDiskBytesPerRead gets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerTransfer sets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerTransfer(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerTransfer", (value)) +} + +// GetAvgDiskBytesPerTransfer gets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerTransfer() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerWrite sets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerWrite", (value)) +} + +// GetAvgDiskBytesPerWrite gets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskQueueLength sets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskQueueLength", (value)) +} + +// GetAvgDiskQueueLength gets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskReadQueueLength sets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskReadQueueLength", (value)) +} + +// GetAvgDiskReadQueueLength gets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDisksecPerRead sets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerRead", (value)) +} + +// GetAvgDisksecPerRead gets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerTransfer sets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerTransfer(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerTransfer", (value)) +} + +// GetAvgDisksecPerTransfer gets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerTransfer() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerWrite sets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerWrite", (value)) +} + +// GetAvgDisksecPerWrite gets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskWriteQueueLength sets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskWriteQueueLength", (value)) +} + +// GetAvgDiskWriteQueueLength gets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDiskQueueLength sets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyCurrentDiskQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentDiskQueueLength", (value)) +} + +// GetCurrentDiskQueueLength gets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyCurrentDiskQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskBytesPersec sets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyDiskBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskBytesPersec", (value)) +} + +// GetDiskBytesPersec gets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyDiskBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytesPersec sets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyDiskReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadBytesPersec", (value)) +} + +// GetDiskReadBytesPersec gets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyDiskReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadsPersec sets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyDiskReadsPersec(value uint32) (err error) { + return instance.SetProperty("DiskReadsPersec", (value)) +} + +// GetDiskReadsPersec gets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyDiskReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskTransfersPersec sets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyDiskTransfersPersec(value uint32) (err error) { + return instance.SetProperty("DiskTransfersPersec", (value)) +} + +// GetDiskTransfersPersec gets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyDiskTransfersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskWriteBytesPersec sets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyDiskWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytesPersec", (value)) +} + +// GetDiskWriteBytesPersec gets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyDiskWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWritesPersec sets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyDiskWritesPersec(value uint32) (err error) { + return instance.SetProperty("DiskWritesPersec", (value)) +} + +// GetDiskWritesPersec gets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyDiskWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentDiskReadTime sets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskReadTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskReadTime", (value)) +} + +// GetPercentDiskReadTime gets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskReadTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskReadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskTime sets the value of PercentDiskTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskTime", (value)) +} + +// GetPercentDiskTime gets the value of PercentDiskTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskWriteTime sets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskWriteTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskWriteTime", (value)) +} + +// GetPercentDiskWriteTime gets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskWriteTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitIOPerSec sets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) SetPropertySplitIOPerSec(value uint32) (err error) { + return instance.SetProperty("SplitIOPerSec", (value)) +} + +// GetSplitIOPerSec gets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfFormattedData_PerfDisk_PhysicalDisk) GetPropertySplitIOPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("SplitIOPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Browser.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Browser.go new file mode 100644 index 00000000..02a41c16 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Browser.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfNet_Browser struct +type Win32_PerfFormattedData_PerfNet_Browser struct { + *Win32_PerfFormattedData + + // + AnnouncementsDomainPersec uint64 + + // + AnnouncementsServerPersec uint64 + + // + AnnouncementsTotalPersec uint64 + + // + DuplicateMasterAnnouncements uint32 + + // + ElectionPacketsPersec uint32 + + // + EnumerationsDomainPersec uint32 + + // + EnumerationsOtherPersec uint32 + + // + EnumerationsServerPersec uint32 + + // + EnumerationsTotalPersec uint32 + + // + IllegalDatagramsPersec uint64 + + // + MailslotAllocationsFailed uint32 + + // + MailslotOpensFailedPersec uint32 + + // + MailslotReceivesFailed uint32 + + // + MailslotWritesFailed uint32 + + // + MailslotWritesPersec uint32 + + // + MissedMailslotDatagrams uint32 + + // + MissedServerAnnouncements uint32 + + // + MissedServerListRequests uint32 + + // + ServerAnnounceAllocationsFailedPersec uint32 + + // + ServerListRequestsPersec uint32 +} + +func NewWin32_PerfFormattedData_PerfNet_BrowserEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfNet_Browser, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_Browser{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfNet_BrowserEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfNet_Browser, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_Browser{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAnnouncementsDomainPersec sets the value of AnnouncementsDomainPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyAnnouncementsDomainPersec(value uint64) (err error) { + return instance.SetProperty("AnnouncementsDomainPersec", (value)) +} + +// GetAnnouncementsDomainPersec gets the value of AnnouncementsDomainPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyAnnouncementsDomainPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AnnouncementsDomainPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAnnouncementsServerPersec sets the value of AnnouncementsServerPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyAnnouncementsServerPersec(value uint64) (err error) { + return instance.SetProperty("AnnouncementsServerPersec", (value)) +} + +// GetAnnouncementsServerPersec gets the value of AnnouncementsServerPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyAnnouncementsServerPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AnnouncementsServerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAnnouncementsTotalPersec sets the value of AnnouncementsTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyAnnouncementsTotalPersec(value uint64) (err error) { + return instance.SetProperty("AnnouncementsTotalPersec", (value)) +} + +// GetAnnouncementsTotalPersec gets the value of AnnouncementsTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyAnnouncementsTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AnnouncementsTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDuplicateMasterAnnouncements sets the value of DuplicateMasterAnnouncements for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyDuplicateMasterAnnouncements(value uint32) (err error) { + return instance.SetProperty("DuplicateMasterAnnouncements", (value)) +} + +// GetDuplicateMasterAnnouncements gets the value of DuplicateMasterAnnouncements for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyDuplicateMasterAnnouncements() (value uint32, err error) { + retValue, err := instance.GetProperty("DuplicateMasterAnnouncements") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetElectionPacketsPersec sets the value of ElectionPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyElectionPacketsPersec(value uint32) (err error) { + return instance.SetProperty("ElectionPacketsPersec", (value)) +} + +// GetElectionPacketsPersec gets the value of ElectionPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyElectionPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ElectionPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsDomainPersec sets the value of EnumerationsDomainPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyEnumerationsDomainPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsDomainPersec", (value)) +} + +// GetEnumerationsDomainPersec gets the value of EnumerationsDomainPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyEnumerationsDomainPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsDomainPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsOtherPersec sets the value of EnumerationsOtherPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyEnumerationsOtherPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsOtherPersec", (value)) +} + +// GetEnumerationsOtherPersec gets the value of EnumerationsOtherPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyEnumerationsOtherPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsOtherPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsServerPersec sets the value of EnumerationsServerPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyEnumerationsServerPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsServerPersec", (value)) +} + +// GetEnumerationsServerPersec gets the value of EnumerationsServerPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyEnumerationsServerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsServerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsTotalPersec sets the value of EnumerationsTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyEnumerationsTotalPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsTotalPersec", (value)) +} + +// GetEnumerationsTotalPersec gets the value of EnumerationsTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyEnumerationsTotalPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIllegalDatagramsPersec sets the value of IllegalDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyIllegalDatagramsPersec(value uint64) (err error) { + return instance.SetProperty("IllegalDatagramsPersec", (value)) +} + +// GetIllegalDatagramsPersec gets the value of IllegalDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyIllegalDatagramsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IllegalDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMailslotAllocationsFailed sets the value of MailslotAllocationsFailed for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMailslotAllocationsFailed(value uint32) (err error) { + return instance.SetProperty("MailslotAllocationsFailed", (value)) +} + +// GetMailslotAllocationsFailed gets the value of MailslotAllocationsFailed for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMailslotAllocationsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotAllocationsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotOpensFailedPersec sets the value of MailslotOpensFailedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMailslotOpensFailedPersec(value uint32) (err error) { + return instance.SetProperty("MailslotOpensFailedPersec", (value)) +} + +// GetMailslotOpensFailedPersec gets the value of MailslotOpensFailedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMailslotOpensFailedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotOpensFailedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotReceivesFailed sets the value of MailslotReceivesFailed for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMailslotReceivesFailed(value uint32) (err error) { + return instance.SetProperty("MailslotReceivesFailed", (value)) +} + +// GetMailslotReceivesFailed gets the value of MailslotReceivesFailed for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMailslotReceivesFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotReceivesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotWritesFailed sets the value of MailslotWritesFailed for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMailslotWritesFailed(value uint32) (err error) { + return instance.SetProperty("MailslotWritesFailed", (value)) +} + +// GetMailslotWritesFailed gets the value of MailslotWritesFailed for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMailslotWritesFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotWritesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotWritesPersec sets the value of MailslotWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMailslotWritesPersec(value uint32) (err error) { + return instance.SetProperty("MailslotWritesPersec", (value)) +} + +// GetMailslotWritesPersec gets the value of MailslotWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMailslotWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedMailslotDatagrams sets the value of MissedMailslotDatagrams for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMissedMailslotDatagrams(value uint32) (err error) { + return instance.SetProperty("MissedMailslotDatagrams", (value)) +} + +// GetMissedMailslotDatagrams gets the value of MissedMailslotDatagrams for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMissedMailslotDatagrams() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedMailslotDatagrams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedServerAnnouncements sets the value of MissedServerAnnouncements for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMissedServerAnnouncements(value uint32) (err error) { + return instance.SetProperty("MissedServerAnnouncements", (value)) +} + +// GetMissedServerAnnouncements gets the value of MissedServerAnnouncements for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMissedServerAnnouncements() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedServerAnnouncements") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedServerListRequests sets the value of MissedServerListRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyMissedServerListRequests(value uint32) (err error) { + return instance.SetProperty("MissedServerListRequests", (value)) +} + +// GetMissedServerListRequests gets the value of MissedServerListRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyMissedServerListRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedServerListRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerAnnounceAllocationsFailedPersec sets the value of ServerAnnounceAllocationsFailedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyServerAnnounceAllocationsFailedPersec(value uint32) (err error) { + return instance.SetProperty("ServerAnnounceAllocationsFailedPersec", (value)) +} + +// GetServerAnnounceAllocationsFailedPersec gets the value of ServerAnnounceAllocationsFailedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyServerAnnounceAllocationsFailedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerAnnounceAllocationsFailedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerListRequestsPersec sets the value of ServerListRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) SetPropertyServerListRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ServerListRequestsPersec", (value)) +} + +// GetServerListRequestsPersec gets the value of ServerListRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Browser) GetPropertyServerListRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerListRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Redirector.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Redirector.go new file mode 100644 index 00000000..3f1c33a0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Redirector.go @@ -0,0 +1,1160 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfNet_Redirector struct +type Win32_PerfFormattedData_PerfNet_Redirector struct { + *Win32_PerfFormattedData + + // + BytesReceivedPersec uint64 + + // + BytesTotalPersec uint64 + + // + BytesTransmittedPersec uint64 + + // + ConnectsCore uint32 + + // + ConnectsLanManager20 uint32 + + // + ConnectsLanManager21 uint32 + + // + ConnectsWindowsNT uint32 + + // + CurrentCommands uint32 + + // + FileDataOperationsPersec uint32 + + // + FileReadOperationsPersec uint32 + + // + FileWriteOperationsPersec uint32 + + // + NetworkErrorsPersec uint32 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsTransmittedPersec uint64 + + // + ReadBytesCachePersec uint64 + + // + ReadBytesNetworkPersec uint64 + + // + ReadBytesNonPagingPersec uint64 + + // + ReadBytesPagingPersec uint64 + + // + ReadOperationsRandomPersec uint32 + + // + ReadPacketsPersec uint32 + + // + ReadPacketsSmallPersec uint32 + + // + ReadsDeniedPersec uint32 + + // + ReadsLargePersec uint32 + + // + ServerDisconnects uint32 + + // + ServerReconnects uint32 + + // + ServerSessions uint32 + + // + ServerSessionsHung uint32 + + // + WriteBytesCachePersec uint64 + + // + WriteBytesNetworkPersec uint64 + + // + WriteBytesNonPagingPersec uint64 + + // + WriteBytesPagingPersec uint64 + + // + WriteOperationsRandomPersec uint32 + + // + WritePacketsPersec uint32 + + // + WritePacketsSmallPersec uint32 + + // + WritesDeniedPersec uint32 + + // + WritesLargePersec uint32 +} + +func NewWin32_PerfFormattedData_PerfNet_RedirectorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfNet_Redirector, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_Redirector{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfNet_RedirectorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfNet_Redirector, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_Redirector{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectsCore sets the value of ConnectsCore for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyConnectsCore(value uint32) (err error) { + return instance.SetProperty("ConnectsCore", (value)) +} + +// GetConnectsCore gets the value of ConnectsCore for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyConnectsCore() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsCore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectsLanManager20 sets the value of ConnectsLanManager20 for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyConnectsLanManager20(value uint32) (err error) { + return instance.SetProperty("ConnectsLanManager20", (value)) +} + +// GetConnectsLanManager20 gets the value of ConnectsLanManager20 for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyConnectsLanManager20() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsLanManager20") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectsLanManager21 sets the value of ConnectsLanManager21 for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyConnectsLanManager21(value uint32) (err error) { + return instance.SetProperty("ConnectsLanManager21", (value)) +} + +// GetConnectsLanManager21 gets the value of ConnectsLanManager21 for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyConnectsLanManager21() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsLanManager21") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectsWindowsNT sets the value of ConnectsWindowsNT for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyConnectsWindowsNT(value uint32) (err error) { + return instance.SetProperty("ConnectsWindowsNT", (value)) +} + +// GetConnectsWindowsNT gets the value of ConnectsWindowsNT for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyConnectsWindowsNT() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsWindowsNT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentCommands sets the value of CurrentCommands for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyCurrentCommands(value uint32) (err error) { + return instance.SetProperty("CurrentCommands", (value)) +} + +// GetCurrentCommands gets the value of CurrentCommands for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyCurrentCommands() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentCommands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileDataOperationsPersec sets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyFileDataOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileDataOperationsPersec", (value)) +} + +// GetFileDataOperationsPersec gets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyFileDataOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileDataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileReadOperationsPersec sets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyFileReadOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileReadOperationsPersec", (value)) +} + +// GetFileReadOperationsPersec gets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyFileReadOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileWriteOperationsPersec sets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyFileWriteOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileWriteOperationsPersec", (value)) +} + +// GetFileWriteOperationsPersec gets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyFileWriteOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNetworkErrorsPersec sets the value of NetworkErrorsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyNetworkErrorsPersec(value uint32) (err error) { + return instance.SetProperty("NetworkErrorsPersec", (value)) +} + +// GetNetworkErrorsPersec gets the value of NetworkErrorsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyNetworkErrorsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NetworkErrorsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTransmittedPersec sets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyPacketsTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsTransmittedPersec", (value)) +} + +// GetPacketsTransmittedPersec gets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyPacketsTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesCachePersec sets the value of ReadBytesCachePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadBytesCachePersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesCachePersec", (value)) +} + +// GetReadBytesCachePersec gets the value of ReadBytesCachePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadBytesCachePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesCachePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesNetworkPersec sets the value of ReadBytesNetworkPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadBytesNetworkPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesNetworkPersec", (value)) +} + +// GetReadBytesNetworkPersec gets the value of ReadBytesNetworkPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadBytesNetworkPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesNetworkPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesNonPagingPersec sets the value of ReadBytesNonPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadBytesNonPagingPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesNonPagingPersec", (value)) +} + +// GetReadBytesNonPagingPersec gets the value of ReadBytesNonPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadBytesNonPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesNonPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPagingPersec sets the value of ReadBytesPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadBytesPagingPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPagingPersec", (value)) +} + +// GetReadBytesPagingPersec gets the value of ReadBytesPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadBytesPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadOperationsRandomPersec sets the value of ReadOperationsRandomPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadOperationsRandomPersec(value uint32) (err error) { + return instance.SetProperty("ReadOperationsRandomPersec", (value)) +} + +// GetReadOperationsRandomPersec gets the value of ReadOperationsRandomPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadOperationsRandomPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadOperationsRandomPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPacketsPersec sets the value of ReadPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadPacketsPersec(value uint32) (err error) { + return instance.SetProperty("ReadPacketsPersec", (value)) +} + +// GetReadPacketsPersec gets the value of ReadPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPacketsSmallPersec sets the value of ReadPacketsSmallPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadPacketsSmallPersec(value uint32) (err error) { + return instance.SetProperty("ReadPacketsSmallPersec", (value)) +} + +// GetReadPacketsSmallPersec gets the value of ReadPacketsSmallPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadPacketsSmallPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadPacketsSmallPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadsDeniedPersec sets the value of ReadsDeniedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadsDeniedPersec(value uint32) (err error) { + return instance.SetProperty("ReadsDeniedPersec", (value)) +} + +// GetReadsDeniedPersec gets the value of ReadsDeniedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadsDeniedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadsDeniedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadsLargePersec sets the value of ReadsLargePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyReadsLargePersec(value uint32) (err error) { + return instance.SetProperty("ReadsLargePersec", (value)) +} + +// GetReadsLargePersec gets the value of ReadsLargePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyReadsLargePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadsLargePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerDisconnects sets the value of ServerDisconnects for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyServerDisconnects(value uint32) (err error) { + return instance.SetProperty("ServerDisconnects", (value)) +} + +// GetServerDisconnects gets the value of ServerDisconnects for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyServerDisconnects() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerDisconnects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerReconnects sets the value of ServerReconnects for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyServerReconnects(value uint32) (err error) { + return instance.SetProperty("ServerReconnects", (value)) +} + +// GetServerReconnects gets the value of ServerReconnects for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyServerReconnects() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerReconnects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerSessions sets the value of ServerSessions for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyServerSessions(value uint32) (err error) { + return instance.SetProperty("ServerSessions", (value)) +} + +// GetServerSessions gets the value of ServerSessions for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyServerSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerSessionsHung sets the value of ServerSessionsHung for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyServerSessionsHung(value uint32) (err error) { + return instance.SetProperty("ServerSessionsHung", (value)) +} + +// GetServerSessionsHung gets the value of ServerSessionsHung for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyServerSessionsHung() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerSessionsHung") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesCachePersec sets the value of WriteBytesCachePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWriteBytesCachePersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesCachePersec", (value)) +} + +// GetWriteBytesCachePersec gets the value of WriteBytesCachePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWriteBytesCachePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesCachePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesNetworkPersec sets the value of WriteBytesNetworkPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWriteBytesNetworkPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesNetworkPersec", (value)) +} + +// GetWriteBytesNetworkPersec gets the value of WriteBytesNetworkPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWriteBytesNetworkPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesNetworkPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesNonPagingPersec sets the value of WriteBytesNonPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWriteBytesNonPagingPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesNonPagingPersec", (value)) +} + +// GetWriteBytesNonPagingPersec gets the value of WriteBytesNonPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWriteBytesNonPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesNonPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPagingPersec sets the value of WriteBytesPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWriteBytesPagingPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPagingPersec", (value)) +} + +// GetWriteBytesPagingPersec gets the value of WriteBytesPagingPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWriteBytesPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteOperationsRandomPersec sets the value of WriteOperationsRandomPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWriteOperationsRandomPersec(value uint32) (err error) { + return instance.SetProperty("WriteOperationsRandomPersec", (value)) +} + +// GetWriteOperationsRandomPersec gets the value of WriteOperationsRandomPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWriteOperationsRandomPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteOperationsRandomPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritePacketsPersec sets the value of WritePacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWritePacketsPersec(value uint32) (err error) { + return instance.SetProperty("WritePacketsPersec", (value)) +} + +// GetWritePacketsPersec gets the value of WritePacketsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWritePacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritePacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritePacketsSmallPersec sets the value of WritePacketsSmallPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWritePacketsSmallPersec(value uint32) (err error) { + return instance.SetProperty("WritePacketsSmallPersec", (value)) +} + +// GetWritePacketsSmallPersec gets the value of WritePacketsSmallPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWritePacketsSmallPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritePacketsSmallPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritesDeniedPersec sets the value of WritesDeniedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWritesDeniedPersec(value uint32) (err error) { + return instance.SetProperty("WritesDeniedPersec", (value)) +} + +// GetWritesDeniedPersec gets the value of WritesDeniedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWritesDeniedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritesDeniedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritesLargePersec sets the value of WritesLargePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) SetPropertyWritesLargePersec(value uint32) (err error) { + return instance.SetProperty("WritesLargePersec", (value)) +} + +// GetWritesLargePersec gets the value of WritesLargePersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Redirector) GetPropertyWritesLargePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritesLargePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Server.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Server.go new file mode 100644 index 00000000..f9ecaacf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_Server.go @@ -0,0 +1,1280 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfNet_Server struct +type Win32_PerfFormattedData_PerfNet_Server struct { + *Win32_PerfFormattedData + + // + BlockingRequestsRejected uint32 + + // + BytesReceivedPersec uint64 + + // + BytesTotalPersec uint64 + + // + BytesTransmittedPersec uint64 + + // + ContextBlocksQueuedPersec uint32 + + // + ErrorsAccessPermissions uint32 + + // + ErrorsGrantedAccess uint32 + + // + ErrorsLogon uint32 + + // + ErrorsSystem uint32 + + // + FileDirectorySearches uint32 + + // + FilesOpen uint32 + + // + FilesOpenedTotal uint32 + + // + LogonPersec uint32 + + // + LogonTotal uint32 + + // + PoolNonpagedBytes uint32 + + // + PoolNonpagedFailures uint32 + + // + PoolNonpagedPeak uint32 + + // + PoolPagedBytes uint32 + + // + PoolPagedFailures uint32 + + // + PoolPagedPeak uint32 + + // + ReconnectedDurableHandles uint32 + + // + ReconnectedResilientHandles uint32 + + // + ServerSessions uint32 + + // + SessionsErroredOut uint32 + + // + SessionsForcedOff uint32 + + // + SessionsLoggedOff uint32 + + // + SessionsTimedOut uint32 + + // + SMBBranchCacheHashBytesSent uint64 + + // + SMBBranchCacheHashGenerationRequests uint32 + + // + SMBBranchCacheHashHeaderRequests uint32 + + // + SMBBranchCacheHashRequestsReceived uint32 + + // + SMBBranchCacheHashResponsesSent uint32 + + // + SMBBranchCacheHashV2BytesSent uint64 + + // + SMBBranchCacheHashV2GenerationRequests uint32 + + // + SMBBranchCacheHashV2HeaderRequests uint32 + + // + SMBBranchCacheHashV2RequestsReceived uint32 + + // + SMBBranchCacheHashV2RequestsServedFromDedup uint32 + + // + SMBBranchCacheHashV2ResponsesSent uint32 + + // + TotalDurableHandles uint32 + + // + TotalResilientHandles uint32 + + // + WorkItemShortages uint32 +} + +func NewWin32_PerfFormattedData_PerfNet_ServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfNet_Server, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_Server{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfNet_ServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfNet_Server, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_Server{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBlockingRequestsRejected sets the value of BlockingRequestsRejected for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyBlockingRequestsRejected(value uint32) (err error) { + return instance.SetProperty("BlockingRequestsRejected", (value)) +} + +// GetBlockingRequestsRejected gets the value of BlockingRequestsRejected for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyBlockingRequestsRejected() (value uint32, err error) { + retValue, err := instance.GetProperty("BlockingRequestsRejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextBlocksQueuedPersec sets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyContextBlocksQueuedPersec(value uint32) (err error) { + return instance.SetProperty("ContextBlocksQueuedPersec", (value)) +} + +// GetContextBlocksQueuedPersec gets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyContextBlocksQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBlocksQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsAccessPermissions sets the value of ErrorsAccessPermissions for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyErrorsAccessPermissions(value uint32) (err error) { + return instance.SetProperty("ErrorsAccessPermissions", (value)) +} + +// GetErrorsAccessPermissions gets the value of ErrorsAccessPermissions for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyErrorsAccessPermissions() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsAccessPermissions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsGrantedAccess sets the value of ErrorsGrantedAccess for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyErrorsGrantedAccess(value uint32) (err error) { + return instance.SetProperty("ErrorsGrantedAccess", (value)) +} + +// GetErrorsGrantedAccess gets the value of ErrorsGrantedAccess for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyErrorsGrantedAccess() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsGrantedAccess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsLogon sets the value of ErrorsLogon for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyErrorsLogon(value uint32) (err error) { + return instance.SetProperty("ErrorsLogon", (value)) +} + +// GetErrorsLogon gets the value of ErrorsLogon for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyErrorsLogon() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsLogon") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsSystem sets the value of ErrorsSystem for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyErrorsSystem(value uint32) (err error) { + return instance.SetProperty("ErrorsSystem", (value)) +} + +// GetErrorsSystem gets the value of ErrorsSystem for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyErrorsSystem() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileDirectorySearches sets the value of FileDirectorySearches for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyFileDirectorySearches(value uint32) (err error) { + return instance.SetProperty("FileDirectorySearches", (value)) +} + +// GetFileDirectorySearches gets the value of FileDirectorySearches for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyFileDirectorySearches() (value uint32, err error) { + retValue, err := instance.GetProperty("FileDirectorySearches") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpen sets the value of FilesOpen for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyFilesOpen(value uint32) (err error) { + return instance.SetProperty("FilesOpen", (value)) +} + +// GetFilesOpen gets the value of FilesOpen for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyFilesOpen() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpenedTotal sets the value of FilesOpenedTotal for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyFilesOpenedTotal(value uint32) (err error) { + return instance.SetProperty("FilesOpenedTotal", (value)) +} + +// GetFilesOpenedTotal gets the value of FilesOpenedTotal for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyFilesOpenedTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpenedTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogonPersec sets the value of LogonPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyLogonPersec(value uint32) (err error) { + return instance.SetProperty("LogonPersec", (value)) +} + +// GetLogonPersec gets the value of LogonPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyLogonPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogonPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogonTotal sets the value of LogonTotal for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyLogonTotal(value uint32) (err error) { + return instance.SetProperty("LogonTotal", (value)) +} + +// GetLogonTotal gets the value of LogonTotal for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyLogonTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("LogonTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedFailures sets the value of PoolNonpagedFailures for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyPoolNonpagedFailures(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedFailures", (value)) +} + +// GetPoolNonpagedFailures gets the value of PoolNonpagedFailures for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyPoolNonpagedFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedPeak sets the value of PoolNonpagedPeak for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyPoolNonpagedPeak(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedPeak", (value)) +} + +// GetPoolNonpagedPeak gets the value of PoolNonpagedPeak for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyPoolNonpagedPeak() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedFailures sets the value of PoolPagedFailures for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyPoolPagedFailures(value uint32) (err error) { + return instance.SetProperty("PoolPagedFailures", (value)) +} + +// GetPoolPagedFailures gets the value of PoolPagedFailures for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyPoolPagedFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedPeak sets the value of PoolPagedPeak for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyPoolPagedPeak(value uint32) (err error) { + return instance.SetProperty("PoolPagedPeak", (value)) +} + +// GetPoolPagedPeak gets the value of PoolPagedPeak for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyPoolPagedPeak() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReconnectedDurableHandles sets the value of ReconnectedDurableHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyReconnectedDurableHandles(value uint32) (err error) { + return instance.SetProperty("ReconnectedDurableHandles", (value)) +} + +// GetReconnectedDurableHandles gets the value of ReconnectedDurableHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyReconnectedDurableHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ReconnectedDurableHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReconnectedResilientHandles sets the value of ReconnectedResilientHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyReconnectedResilientHandles(value uint32) (err error) { + return instance.SetProperty("ReconnectedResilientHandles", (value)) +} + +// GetReconnectedResilientHandles gets the value of ReconnectedResilientHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyReconnectedResilientHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ReconnectedResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerSessions sets the value of ServerSessions for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyServerSessions(value uint32) (err error) { + return instance.SetProperty("ServerSessions", (value)) +} + +// GetServerSessions gets the value of ServerSessions for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyServerSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsErroredOut sets the value of SessionsErroredOut for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySessionsErroredOut(value uint32) (err error) { + return instance.SetProperty("SessionsErroredOut", (value)) +} + +// GetSessionsErroredOut gets the value of SessionsErroredOut for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySessionsErroredOut() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsErroredOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsForcedOff sets the value of SessionsForcedOff for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySessionsForcedOff(value uint32) (err error) { + return instance.SetProperty("SessionsForcedOff", (value)) +} + +// GetSessionsForcedOff gets the value of SessionsForcedOff for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySessionsForcedOff() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsForcedOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsLoggedOff sets the value of SessionsLoggedOff for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySessionsLoggedOff(value uint32) (err error) { + return instance.SetProperty("SessionsLoggedOff", (value)) +} + +// GetSessionsLoggedOff gets the value of SessionsLoggedOff for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySessionsLoggedOff() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsLoggedOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsTimedOut sets the value of SessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("SessionsTimedOut", (value)) +} + +// GetSessionsTimedOut gets the value of SessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashBytesSent sets the value of SMBBranchCacheHashBytesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashBytesSent(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheHashBytesSent", (value)) +} + +// GetSMBBranchCacheHashBytesSent gets the value of SMBBranchCacheHashBytesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashGenerationRequests sets the value of SMBBranchCacheHashGenerationRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashGenerationRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashGenerationRequests", (value)) +} + +// GetSMBBranchCacheHashGenerationRequests gets the value of SMBBranchCacheHashGenerationRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashGenerationRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashGenerationRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashHeaderRequests sets the value of SMBBranchCacheHashHeaderRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashHeaderRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashHeaderRequests", (value)) +} + +// GetSMBBranchCacheHashHeaderRequests gets the value of SMBBranchCacheHashHeaderRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashHeaderRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashHeaderRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashRequestsReceived sets the value of SMBBranchCacheHashRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashRequestsReceived(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashRequestsReceived", (value)) +} + +// GetSMBBranchCacheHashRequestsReceived gets the value of SMBBranchCacheHashRequestsReceived for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashResponsesSent sets the value of SMBBranchCacheHashResponsesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashResponsesSent(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashResponsesSent", (value)) +} + +// GetSMBBranchCacheHashResponsesSent gets the value of SMBBranchCacheHashResponsesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashResponsesSent() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashResponsesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2BytesSent sets the value of SMBBranchCacheHashV2BytesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashV2BytesSent(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2BytesSent", (value)) +} + +// GetSMBBranchCacheHashV2BytesSent gets the value of SMBBranchCacheHashV2BytesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashV2BytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2GenerationRequests sets the value of SMBBranchCacheHashV2GenerationRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashV2GenerationRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2GenerationRequests", (value)) +} + +// GetSMBBranchCacheHashV2GenerationRequests gets the value of SMBBranchCacheHashV2GenerationRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashV2GenerationRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2GenerationRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2HeaderRequests sets the value of SMBBranchCacheHashV2HeaderRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashV2HeaderRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2HeaderRequests", (value)) +} + +// GetSMBBranchCacheHashV2HeaderRequests gets the value of SMBBranchCacheHashV2HeaderRequests for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashV2HeaderRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2HeaderRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2RequestsReceived sets the value of SMBBranchCacheHashV2RequestsReceived for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashV2RequestsReceived(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2RequestsReceived", (value)) +} + +// GetSMBBranchCacheHashV2RequestsReceived gets the value of SMBBranchCacheHashV2RequestsReceived for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashV2RequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2RequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2RequestsServedFromDedup sets the value of SMBBranchCacheHashV2RequestsServedFromDedup for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashV2RequestsServedFromDedup(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2RequestsServedFromDedup", (value)) +} + +// GetSMBBranchCacheHashV2RequestsServedFromDedup gets the value of SMBBranchCacheHashV2RequestsServedFromDedup for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashV2RequestsServedFromDedup() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2RequestsServedFromDedup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2ResponsesSent sets the value of SMBBranchCacheHashV2ResponsesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertySMBBranchCacheHashV2ResponsesSent(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2ResponsesSent", (value)) +} + +// GetSMBBranchCacheHashV2ResponsesSent gets the value of SMBBranchCacheHashV2ResponsesSent for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertySMBBranchCacheHashV2ResponsesSent() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2ResponsesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalDurableHandles sets the value of TotalDurableHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyTotalDurableHandles(value uint32) (err error) { + return instance.SetProperty("TotalDurableHandles", (value)) +} + +// GetTotalDurableHandles gets the value of TotalDurableHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyTotalDurableHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalDurableHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalResilientHandles sets the value of TotalResilientHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyTotalResilientHandles(value uint32) (err error) { + return instance.SetProperty("TotalResilientHandles", (value)) +} + +// GetTotalResilientHandles gets the value of TotalResilientHandles for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyTotalResilientHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkItemShortages sets the value of WorkItemShortages for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) SetPropertyWorkItemShortages(value uint32) (err error) { + return instance.SetProperty("WorkItemShortages", (value)) +} + +// GetWorkItemShortages gets the value of WorkItemShortages for the instance +func (instance *Win32_PerfFormattedData_PerfNet_Server) GetPropertyWorkItemShortages() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkItemShortages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_ServerWorkQueues.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_ServerWorkQueues.go new file mode 100644 index 00000000..4259982a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfNet_ServerWorkQueues.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfNet_ServerWorkQueues struct +type Win32_PerfFormattedData_PerfNet_ServerWorkQueues struct { + *Win32_PerfFormattedData + + // + ActiveThreads uint32 + + // + AvailableThreads uint32 + + // + AvailableWorkItems uint32 + + // + BorrowedWorkItems uint32 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTransferredPersec uint64 + + // + ContextBlocksQueuedPersec uint32 + + // + CurrentClients uint32 + + // + QueueLength uint32 + + // + ReadBytesPersec uint64 + + // + ReadOperationsPersec uint64 + + // + TotalBytesPersec uint64 + + // + TotalOperationsPersec uint64 + + // + WorkItemShortages uint32 + + // + WriteBytesPersec uint64 + + // + WriteOperationsPersec uint64 +} + +func NewWin32_PerfFormattedData_PerfNet_ServerWorkQueuesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_ServerWorkQueues{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfNet_ServerWorkQueuesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfNet_ServerWorkQueues{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveThreads sets the value of ActiveThreads for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyActiveThreads(value uint32) (err error) { + return instance.SetProperty("ActiveThreads", (value)) +} + +// GetActiveThreads gets the value of ActiveThreads for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyActiveThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvailableThreads sets the value of AvailableThreads for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyAvailableThreads(value uint32) (err error) { + return instance.SetProperty("AvailableThreads", (value)) +} + +// GetAvailableThreads gets the value of AvailableThreads for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyAvailableThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvailableWorkItems sets the value of AvailableWorkItems for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyAvailableWorkItems(value uint32) (err error) { + return instance.SetProperty("AvailableWorkItems", (value)) +} + +// GetAvailableWorkItems gets the value of AvailableWorkItems for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyAvailableWorkItems() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableWorkItems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBorrowedWorkItems sets the value of BorrowedWorkItems for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyBorrowedWorkItems(value uint32) (err error) { + return instance.SetProperty("BorrowedWorkItems", (value)) +} + +// GetBorrowedWorkItems gets the value of BorrowedWorkItems for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyBorrowedWorkItems() (value uint32, err error) { + retValue, err := instance.GetProperty("BorrowedWorkItems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransferredPersec sets the value of BytesTransferredPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyBytesTransferredPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransferredPersec", (value)) +} + +// GetBytesTransferredPersec gets the value of BytesTransferredPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyBytesTransferredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransferredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextBlocksQueuedPersec sets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyContextBlocksQueuedPersec(value uint32) (err error) { + return instance.SetProperty("ContextBlocksQueuedPersec", (value)) +} + +// GetContextBlocksQueuedPersec gets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyContextBlocksQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBlocksQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentClients sets the value of CurrentClients for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyCurrentClients(value uint32) (err error) { + return instance.SetProperty("CurrentClients", (value)) +} + +// GetCurrentClients gets the value of CurrentClients for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyCurrentClients() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueueLength sets the value of QueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyQueueLength(value uint32) (err error) { + return instance.SetProperty("QueueLength", (value)) +} + +// GetQueueLength gets the value of QueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("QueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadOperationsPersec sets the value of ReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyReadOperationsPersec(value uint64) (err error) { + return instance.SetProperty("ReadOperationsPersec", (value)) +} + +// GetReadOperationsPersec gets the value of ReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyReadOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBytesPersec sets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyTotalBytesPersec(value uint64) (err error) { + return instance.SetProperty("TotalBytesPersec", (value)) +} + +// GetTotalBytesPersec gets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyTotalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOperationsPersec sets the value of TotalOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyTotalOperationsPersec(value uint64) (err error) { + return instance.SetProperty("TotalOperationsPersec", (value)) +} + +// GetTotalOperationsPersec gets the value of TotalOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyTotalOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkItemShortages sets the value of WorkItemShortages for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyWorkItemShortages(value uint32) (err error) { + return instance.SetProperty("WorkItemShortages", (value)) +} + +// GetWorkItemShortages gets the value of WorkItemShortages for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyWorkItemShortages() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkItemShortages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteOperationsPersec sets the value of WriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) SetPropertyWriteOperationsPersec(value uint64) (err error) { + return instance.SetProperty("WriteOperationsPersec", (value)) +} + +// GetWriteOperationsPersec gets the value of WriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfNet_ServerWorkQueues) GetPropertyWriteOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Cache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Cache.go new file mode 100644 index 00000000..a37385bc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Cache.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_Cache struct +type Win32_PerfFormattedData_PerfOS_Cache struct { + *Win32_PerfFormattedData + + // + AsyncCopyReadsPersec uint32 + + // + AsyncDataMapsPersec uint32 + + // + AsyncFastReadsPersec uint32 + + // + AsyncMDLReadsPersec uint32 + + // + AsyncPinReadsPersec uint32 + + // + CopyReadHitsPercent uint32 + + // + CopyReadsPersec uint32 + + // + DataFlushesPersec uint32 + + // + DataFlushPagesPersec uint32 + + // + DataMapHitsPercent uint32 + + // + DataMapPinsPersec uint32 + + // + DataMapsPersec uint32 + + // + DirtyPages uint64 + + // + DirtyPageThreshold uint64 + + // + FastReadNotPossiblesPersec uint32 + + // + FastReadResourceMissesPersec uint32 + + // + FastReadsPersec uint32 + + // + LazyWriteFlushesPersec uint32 + + // + LazyWritePagesPersec uint32 + + // + MDLReadHitsPercent uint32 + + // + MDLReadsPersec uint32 + + // + PinReadHitsPercent uint32 + + // + PinReadsPersec uint32 + + // + ReadAheadsPersec uint32 + + // + SyncCopyReadsPersec uint32 + + // + SyncDataMapsPersec uint32 + + // + SyncFastReadsPersec uint32 + + // + SyncMDLReadsPersec uint32 + + // + SyncPinReadsPersec uint32 +} + +func NewWin32_PerfFormattedData_PerfOS_CacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_Cache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Cache{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_CacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_Cache, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Cache{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAsyncCopyReadsPersec sets the value of AsyncCopyReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyAsyncCopyReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncCopyReadsPersec", (value)) +} + +// GetAsyncCopyReadsPersec gets the value of AsyncCopyReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyAsyncCopyReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncCopyReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncDataMapsPersec sets the value of AsyncDataMapsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyAsyncDataMapsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncDataMapsPersec", (value)) +} + +// GetAsyncDataMapsPersec gets the value of AsyncDataMapsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyAsyncDataMapsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncDataMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncFastReadsPersec sets the value of AsyncFastReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyAsyncFastReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncFastReadsPersec", (value)) +} + +// GetAsyncFastReadsPersec gets the value of AsyncFastReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyAsyncFastReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncFastReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncMDLReadsPersec sets the value of AsyncMDLReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyAsyncMDLReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncMDLReadsPersec", (value)) +} + +// GetAsyncMDLReadsPersec gets the value of AsyncMDLReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyAsyncMDLReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncMDLReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncPinReadsPersec sets the value of AsyncPinReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyAsyncPinReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncPinReadsPersec", (value)) +} + +// GetAsyncPinReadsPersec gets the value of AsyncPinReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyAsyncPinReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncPinReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCopyReadHitsPercent sets the value of CopyReadHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyCopyReadHitsPercent(value uint32) (err error) { + return instance.SetProperty("CopyReadHitsPercent", (value)) +} + +// GetCopyReadHitsPercent gets the value of CopyReadHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyCopyReadHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("CopyReadHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCopyReadsPersec sets the value of CopyReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyCopyReadsPersec(value uint32) (err error) { + return instance.SetProperty("CopyReadsPersec", (value)) +} + +// GetCopyReadsPersec gets the value of CopyReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyCopyReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CopyReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataFlushesPersec sets the value of DataFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDataFlushesPersec(value uint32) (err error) { + return instance.SetProperty("DataFlushesPersec", (value)) +} + +// GetDataFlushesPersec gets the value of DataFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDataFlushesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataFlushPagesPersec sets the value of DataFlushPagesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDataFlushPagesPersec(value uint32) (err error) { + return instance.SetProperty("DataFlushPagesPersec", (value)) +} + +// GetDataFlushPagesPersec gets the value of DataFlushPagesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDataFlushPagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataFlushPagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapHitsPercent sets the value of DataMapHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDataMapHitsPercent(value uint32) (err error) { + return instance.SetProperty("DataMapHitsPercent", (value)) +} + +// GetDataMapHitsPercent gets the value of DataMapHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDataMapHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapPinsPersec sets the value of DataMapPinsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDataMapPinsPersec(value uint32) (err error) { + return instance.SetProperty("DataMapPinsPersec", (value)) +} + +// GetDataMapPinsPersec gets the value of DataMapPinsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDataMapPinsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapPinsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapsPersec sets the value of DataMapsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDataMapsPersec(value uint32) (err error) { + return instance.SetProperty("DataMapsPersec", (value)) +} + +// GetDataMapsPersec gets the value of DataMapsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDataMapsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirtyPages sets the value of DirtyPages for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDirtyPages(value uint64) (err error) { + return instance.SetProperty("DirtyPages", (value)) +} + +// GetDirtyPages gets the value of DirtyPages for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDirtyPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyPageThreshold sets the value of DirtyPageThreshold for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyDirtyPageThreshold(value uint64) (err error) { + return instance.SetProperty("DirtyPageThreshold", (value)) +} + +// GetDirtyPageThreshold gets the value of DirtyPageThreshold for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyDirtyPageThreshold() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyPageThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFastReadNotPossiblesPersec sets the value of FastReadNotPossiblesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyFastReadNotPossiblesPersec(value uint32) (err error) { + return instance.SetProperty("FastReadNotPossiblesPersec", (value)) +} + +// GetFastReadNotPossiblesPersec gets the value of FastReadNotPossiblesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyFastReadNotPossiblesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FastReadNotPossiblesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFastReadResourceMissesPersec sets the value of FastReadResourceMissesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyFastReadResourceMissesPersec(value uint32) (err error) { + return instance.SetProperty("FastReadResourceMissesPersec", (value)) +} + +// GetFastReadResourceMissesPersec gets the value of FastReadResourceMissesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyFastReadResourceMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FastReadResourceMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFastReadsPersec sets the value of FastReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyFastReadsPersec(value uint32) (err error) { + return instance.SetProperty("FastReadsPersec", (value)) +} + +// GetFastReadsPersec gets the value of FastReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyFastReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FastReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLazyWriteFlushesPersec sets the value of LazyWriteFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyLazyWriteFlushesPersec(value uint32) (err error) { + return instance.SetProperty("LazyWriteFlushesPersec", (value)) +} + +// GetLazyWriteFlushesPersec gets the value of LazyWriteFlushesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyLazyWriteFlushesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LazyWriteFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLazyWritePagesPersec sets the value of LazyWritePagesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyLazyWritePagesPersec(value uint32) (err error) { + return instance.SetProperty("LazyWritePagesPersec", (value)) +} + +// GetLazyWritePagesPersec gets the value of LazyWritePagesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyLazyWritePagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LazyWritePagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMDLReadHitsPercent sets the value of MDLReadHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyMDLReadHitsPercent(value uint32) (err error) { + return instance.SetProperty("MDLReadHitsPercent", (value)) +} + +// GetMDLReadHitsPercent gets the value of MDLReadHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyMDLReadHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("MDLReadHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMDLReadsPersec sets the value of MDLReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyMDLReadsPersec(value uint32) (err error) { + return instance.SetProperty("MDLReadsPersec", (value)) +} + +// GetMDLReadsPersec gets the value of MDLReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyMDLReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MDLReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinReadHitsPercent sets the value of PinReadHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyPinReadHitsPercent(value uint32) (err error) { + return instance.SetProperty("PinReadHitsPercent", (value)) +} + +// GetPinReadHitsPercent gets the value of PinReadHitsPercent for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyPinReadHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("PinReadHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinReadsPersec sets the value of PinReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyPinReadsPersec(value uint32) (err error) { + return instance.SetProperty("PinReadsPersec", (value)) +} + +// GetPinReadsPersec gets the value of PinReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyPinReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PinReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadAheadsPersec sets the value of ReadAheadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertyReadAheadsPersec(value uint32) (err error) { + return instance.SetProperty("ReadAheadsPersec", (value)) +} + +// GetReadAheadsPersec gets the value of ReadAheadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertyReadAheadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadAheadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncCopyReadsPersec sets the value of SyncCopyReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertySyncCopyReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncCopyReadsPersec", (value)) +} + +// GetSyncCopyReadsPersec gets the value of SyncCopyReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertySyncCopyReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncCopyReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncDataMapsPersec sets the value of SyncDataMapsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertySyncDataMapsPersec(value uint32) (err error) { + return instance.SetProperty("SyncDataMapsPersec", (value)) +} + +// GetSyncDataMapsPersec gets the value of SyncDataMapsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertySyncDataMapsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncDataMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncFastReadsPersec sets the value of SyncFastReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertySyncFastReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncFastReadsPersec", (value)) +} + +// GetSyncFastReadsPersec gets the value of SyncFastReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertySyncFastReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncFastReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncMDLReadsPersec sets the value of SyncMDLReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertySyncMDLReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncMDLReadsPersec", (value)) +} + +// GetSyncMDLReadsPersec gets the value of SyncMDLReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertySyncMDLReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncMDLReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncPinReadsPersec sets the value of SyncPinReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) SetPropertySyncPinReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncPinReadsPersec", (value)) +} + +// GetSyncPinReadsPersec gets the value of SyncPinReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Cache) GetPropertySyncPinReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncPinReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Memory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Memory.go new file mode 100644 index 00000000..8bf3b82a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Memory.go @@ -0,0 +1,1130 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_Memory struct +type Win32_PerfFormattedData_PerfOS_Memory struct { + *Win32_PerfFormattedData + + // + AvailableBytes uint64 + + // + AvailableKBytes uint64 + + // + AvailableMBytes uint64 + + // + CacheBytes uint64 + + // + CacheBytesPeak uint64 + + // + CacheFaultsPersec uint32 + + // + CommitLimit uint64 + + // + CommittedBytes uint64 + + // + DemandZeroFaultsPersec uint32 + + // + FreeAndZeroPageListBytes uint64 + + // + FreeSystemPageTableEntries uint32 + + // + LongTermAverageStandbyCacheLifetimes uint32 + + // + ModifiedPageListBytes uint64 + + // + PageFaultsPersec uint32 + + // + PageReadsPersec uint32 + + // + PagesInputPersec uint32 + + // + PagesOutputPersec uint32 + + // + PagesPersec uint32 + + // + PageWritesPersec uint32 + + // + PercentCommittedBytesInUse uint32 + + // + PoolNonpagedAllocs uint32 + + // + PoolNonpagedBytes uint64 + + // + PoolPagedAllocs uint32 + + // + PoolPagedBytes uint64 + + // + PoolPagedResidentBytes uint64 + + // + StandbyCacheCoreBytes uint64 + + // + StandbyCacheNormalPriorityBytes uint64 + + // + StandbyCacheReserveBytes uint64 + + // + SystemCacheResidentBytes uint64 + + // + SystemCodeResidentBytes uint64 + + // + SystemCodeTotalBytes uint64 + + // + SystemDriverResidentBytes uint64 + + // + SystemDriverTotalBytes uint64 + + // + TransitionFaultsPersec uint32 + + // + TransitionPagesRePurposedPersec uint32 + + // + WriteCopiesPersec uint32 +} + +func NewWin32_PerfFormattedData_PerfOS_MemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_Memory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Memory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_MemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_Memory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Memory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvailableBytes sets the value of AvailableBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyAvailableBytes(value uint64) (err error) { + return instance.SetProperty("AvailableBytes", (value)) +} + +// GetAvailableBytes gets the value of AvailableBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyAvailableBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvailableKBytes sets the value of AvailableKBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyAvailableKBytes(value uint64) (err error) { + return instance.SetProperty("AvailableKBytes", (value)) +} + +// GetAvailableKBytes gets the value of AvailableKBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyAvailableKBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableKBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvailableMBytes sets the value of AvailableMBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyAvailableMBytes(value uint64) (err error) { + return instance.SetProperty("AvailableMBytes", (value)) +} + +// GetAvailableMBytes gets the value of AvailableMBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyAvailableMBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableMBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheBytes sets the value of CacheBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyCacheBytes(value uint64) (err error) { + return instance.SetProperty("CacheBytes", (value)) +} + +// GetCacheBytes gets the value of CacheBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyCacheBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheBytesPeak sets the value of CacheBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyCacheBytesPeak(value uint64) (err error) { + return instance.SetProperty("CacheBytesPeak", (value)) +} + +// GetCacheBytesPeak gets the value of CacheBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyCacheBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFaultsPersec sets the value of CacheFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyCacheFaultsPersec(value uint32) (err error) { + return instance.SetProperty("CacheFaultsPersec", (value)) +} + +// GetCacheFaultsPersec gets the value of CacheFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyCacheFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitLimit sets the value of CommitLimit for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyCommitLimit(value uint64) (err error) { + return instance.SetProperty("CommitLimit", (value)) +} + +// GetCommitLimit gets the value of CommitLimit for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyCommitLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("CommitLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCommittedBytes sets the value of CommittedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyCommittedBytes(value uint64) (err error) { + return instance.SetProperty("CommittedBytes", (value)) +} + +// GetCommittedBytes gets the value of CommittedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyCommittedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CommittedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDemandZeroFaultsPersec sets the value of DemandZeroFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyDemandZeroFaultsPersec(value uint32) (err error) { + return instance.SetProperty("DemandZeroFaultsPersec", (value)) +} + +// GetDemandZeroFaultsPersec gets the value of DemandZeroFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyDemandZeroFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DemandZeroFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeAndZeroPageListBytes sets the value of FreeAndZeroPageListBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyFreeAndZeroPageListBytes(value uint64) (err error) { + return instance.SetProperty("FreeAndZeroPageListBytes", (value)) +} + +// GetFreeAndZeroPageListBytes gets the value of FreeAndZeroPageListBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyFreeAndZeroPageListBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeAndZeroPageListBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFreeSystemPageTableEntries sets the value of FreeSystemPageTableEntries for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyFreeSystemPageTableEntries(value uint32) (err error) { + return instance.SetProperty("FreeSystemPageTableEntries", (value)) +} + +// GetFreeSystemPageTableEntries gets the value of FreeSystemPageTableEntries for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyFreeSystemPageTableEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeSystemPageTableEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLongTermAverageStandbyCacheLifetimes sets the value of LongTermAverageStandbyCacheLifetimes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyLongTermAverageStandbyCacheLifetimes(value uint32) (err error) { + return instance.SetProperty("LongTermAverageStandbyCacheLifetimes", (value)) +} + +// GetLongTermAverageStandbyCacheLifetimes gets the value of LongTermAverageStandbyCacheLifetimes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyLongTermAverageStandbyCacheLifetimes() (value uint32, err error) { + retValue, err := instance.GetProperty("LongTermAverageStandbyCacheLifetimes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetModifiedPageListBytes sets the value of ModifiedPageListBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyModifiedPageListBytes(value uint64) (err error) { + return instance.SetProperty("ModifiedPageListBytes", (value)) +} + +// GetModifiedPageListBytes gets the value of ModifiedPageListBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyModifiedPageListBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ModifiedPageListBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageReadsPersec sets the value of PageReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPageReadsPersec(value uint32) (err error) { + return instance.SetProperty("PageReadsPersec", (value)) +} + +// GetPageReadsPersec gets the value of PageReadsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPageReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesInputPersec sets the value of PagesInputPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPagesInputPersec(value uint32) (err error) { + return instance.SetProperty("PagesInputPersec", (value)) +} + +// GetPagesInputPersec gets the value of PagesInputPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPagesInputPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesInputPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesOutputPersec sets the value of PagesOutputPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPagesOutputPersec(value uint32) (err error) { + return instance.SetProperty("PagesOutputPersec", (value)) +} + +// GetPagesOutputPersec gets the value of PagesOutputPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPagesOutputPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesOutputPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesPersec sets the value of PagesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPagesPersec(value uint32) (err error) { + return instance.SetProperty("PagesPersec", (value)) +} + +// GetPagesPersec gets the value of PagesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageWritesPersec sets the value of PageWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPageWritesPersec(value uint32) (err error) { + return instance.SetProperty("PageWritesPersec", (value)) +} + +// GetPageWritesPersec gets the value of PageWritesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPageWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCommittedBytesInUse sets the value of PercentCommittedBytesInUse for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPercentCommittedBytesInUse(value uint32) (err error) { + return instance.SetProperty("PercentCommittedBytesInUse", (value)) +} + +// GetPercentCommittedBytesInUse gets the value of PercentCommittedBytesInUse for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPercentCommittedBytesInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCommittedBytesInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedAllocs sets the value of PoolNonpagedAllocs for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPoolNonpagedAllocs(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedAllocs", (value)) +} + +// GetPoolNonpagedAllocs gets the value of PoolNonpagedAllocs for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPoolNonpagedAllocs() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedAllocs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPoolNonpagedBytes(value uint64) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPoolNonpagedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolPagedAllocs sets the value of PoolPagedAllocs for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPoolPagedAllocs(value uint32) (err error) { + return instance.SetProperty("PoolPagedAllocs", (value)) +} + +// GetPoolPagedAllocs gets the value of PoolPagedAllocs for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPoolPagedAllocs() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedAllocs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPoolPagedBytes(value uint64) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPoolPagedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolPagedResidentBytes sets the value of PoolPagedResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyPoolPagedResidentBytes(value uint64) (err error) { + return instance.SetProperty("PoolPagedResidentBytes", (value)) +} + +// GetPoolPagedResidentBytes gets the value of PoolPagedResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyPoolPagedResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PoolPagedResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStandbyCacheCoreBytes sets the value of StandbyCacheCoreBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyStandbyCacheCoreBytes(value uint64) (err error) { + return instance.SetProperty("StandbyCacheCoreBytes", (value)) +} + +// GetStandbyCacheCoreBytes gets the value of StandbyCacheCoreBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyStandbyCacheCoreBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("StandbyCacheCoreBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStandbyCacheNormalPriorityBytes sets the value of StandbyCacheNormalPriorityBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyStandbyCacheNormalPriorityBytes(value uint64) (err error) { + return instance.SetProperty("StandbyCacheNormalPriorityBytes", (value)) +} + +// GetStandbyCacheNormalPriorityBytes gets the value of StandbyCacheNormalPriorityBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyStandbyCacheNormalPriorityBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("StandbyCacheNormalPriorityBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStandbyCacheReserveBytes sets the value of StandbyCacheReserveBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyStandbyCacheReserveBytes(value uint64) (err error) { + return instance.SetProperty("StandbyCacheReserveBytes", (value)) +} + +// GetStandbyCacheReserveBytes gets the value of StandbyCacheReserveBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyStandbyCacheReserveBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("StandbyCacheReserveBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCacheResidentBytes sets the value of SystemCacheResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertySystemCacheResidentBytes(value uint64) (err error) { + return instance.SetProperty("SystemCacheResidentBytes", (value)) +} + +// GetSystemCacheResidentBytes gets the value of SystemCacheResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertySystemCacheResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemCacheResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCodeResidentBytes sets the value of SystemCodeResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertySystemCodeResidentBytes(value uint64) (err error) { + return instance.SetProperty("SystemCodeResidentBytes", (value)) +} + +// GetSystemCodeResidentBytes gets the value of SystemCodeResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertySystemCodeResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemCodeResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCodeTotalBytes sets the value of SystemCodeTotalBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertySystemCodeTotalBytes(value uint64) (err error) { + return instance.SetProperty("SystemCodeTotalBytes", (value)) +} + +// GetSystemCodeTotalBytes gets the value of SystemCodeTotalBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertySystemCodeTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemCodeTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemDriverResidentBytes sets the value of SystemDriverResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertySystemDriverResidentBytes(value uint64) (err error) { + return instance.SetProperty("SystemDriverResidentBytes", (value)) +} + +// GetSystemDriverResidentBytes gets the value of SystemDriverResidentBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertySystemDriverResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemDriverResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemDriverTotalBytes sets the value of SystemDriverTotalBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertySystemDriverTotalBytes(value uint64) (err error) { + return instance.SetProperty("SystemDriverTotalBytes", (value)) +} + +// GetSystemDriverTotalBytes gets the value of SystemDriverTotalBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertySystemDriverTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemDriverTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransitionFaultsPersec sets the value of TransitionFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyTransitionFaultsPersec(value uint32) (err error) { + return instance.SetProperty("TransitionFaultsPersec", (value)) +} + +// GetTransitionFaultsPersec gets the value of TransitionFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyTransitionFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransitionFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransitionPagesRePurposedPersec sets the value of TransitionPagesRePurposedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyTransitionPagesRePurposedPersec(value uint32) (err error) { + return instance.SetProperty("TransitionPagesRePurposedPersec", (value)) +} + +// GetTransitionPagesRePurposedPersec gets the value of TransitionPagesRePurposedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyTransitionPagesRePurposedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransitionPagesRePurposedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteCopiesPersec sets the value of WriteCopiesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) SetPropertyWriteCopiesPersec(value uint32) (err error) { + return instance.SetProperty("WriteCopiesPersec", (value)) +} + +// GetWriteCopiesPersec gets the value of WriteCopiesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Memory) GetPropertyWriteCopiesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteCopiesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_NUMANodeMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_NUMANodeMemory.go new file mode 100644 index 00000000..cd30307d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_NUMANodeMemory.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_NUMANodeMemory struct +type Win32_PerfFormattedData_PerfOS_NUMANodeMemory struct { + *Win32_PerfFormattedData + + // + FreeAndZeroPageListMBytes uint32 + + // + TotalMBytes uint32 +} + +func NewWin32_PerfFormattedData_PerfOS_NUMANodeMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_NUMANodeMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_NUMANodeMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_NUMANodeMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_NUMANodeMemory, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_NUMANodeMemory{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetFreeAndZeroPageListMBytes sets the value of FreeAndZeroPageListMBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_NUMANodeMemory) SetPropertyFreeAndZeroPageListMBytes(value uint32) (err error) { + return instance.SetProperty("FreeAndZeroPageListMBytes", (value)) +} + +// GetFreeAndZeroPageListMBytes gets the value of FreeAndZeroPageListMBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_NUMANodeMemory) GetPropertyFreeAndZeroPageListMBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeAndZeroPageListMBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalMBytes sets the value of TotalMBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_NUMANodeMemory) SetPropertyTotalMBytes(value uint32) (err error) { + return instance.SetProperty("TotalMBytes", (value)) +} + +// GetTotalMBytes gets the value of TotalMBytes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_NUMANodeMemory) GetPropertyTotalMBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalMBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Objects.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Objects.go new file mode 100644 index 00000000..284c9182 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Objects.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_Objects struct +type Win32_PerfFormattedData_PerfOS_Objects struct { + *Win32_PerfFormattedData + + // + Events uint32 + + // + Mutexes uint32 + + // + Processes uint32 + + // + Sections uint32 + + // + Semaphores uint32 + + // + Threads uint32 +} + +func NewWin32_PerfFormattedData_PerfOS_ObjectsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_Objects, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Objects{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_ObjectsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_Objects, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Objects{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetEvents sets the value of Events for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) SetPropertyEvents(value uint32) (err error) { + return instance.SetProperty("Events", (value)) +} + +// GetEvents gets the value of Events for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) GetPropertyEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("Events") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMutexes sets the value of Mutexes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) SetPropertyMutexes(value uint32) (err error) { + return instance.SetProperty("Mutexes", (value)) +} + +// GetMutexes gets the value of Mutexes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) GetPropertyMutexes() (value uint32, err error) { + retValue, err := instance.GetProperty("Mutexes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcesses sets the value of Processes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) SetPropertyProcesses(value uint32) (err error) { + return instance.SetProperty("Processes", (value)) +} + +// GetProcesses gets the value of Processes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) GetPropertyProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("Processes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSections sets the value of Sections for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) SetPropertySections(value uint32) (err error) { + return instance.SetProperty("Sections", (value)) +} + +// GetSections gets the value of Sections for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) GetPropertySections() (value uint32, err error) { + retValue, err := instance.GetProperty("Sections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSemaphores sets the value of Semaphores for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) SetPropertySemaphores(value uint32) (err error) { + return instance.SetProperty("Semaphores", (value)) +} + +// GetSemaphores gets the value of Semaphores for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) GetPropertySemaphores() (value uint32, err error) { + retValue, err := instance.GetProperty("Semaphores") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreads sets the value of Threads for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) SetPropertyThreads(value uint32) (err error) { + return instance.SetProperty("Threads", (value)) +} + +// GetThreads gets the value of Threads for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Objects) GetPropertyThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Threads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_PagingFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_PagingFile.go new file mode 100644 index 00000000..b71f8ee7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_PagingFile.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_PagingFile struct +type Win32_PerfFormattedData_PerfOS_PagingFile struct { + *Win32_PerfFormattedData + + // + PercentUsage uint32 + + // + PercentUsagePeak uint32 +} + +func NewWin32_PerfFormattedData_PerfOS_PagingFileEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_PagingFile, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_PagingFile{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_PagingFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_PagingFile, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_PagingFile{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetPercentUsage sets the value of PercentUsage for the instance +func (instance *Win32_PerfFormattedData_PerfOS_PagingFile) SetPropertyPercentUsage(value uint32) (err error) { + return instance.SetProperty("PercentUsage", (value)) +} + +// GetPercentUsage gets the value of PercentUsage for the instance +func (instance *Win32_PerfFormattedData_PerfOS_PagingFile) GetPropertyPercentUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentUsagePeak sets the value of PercentUsagePeak for the instance +func (instance *Win32_PerfFormattedData_PerfOS_PagingFile) SetPropertyPercentUsagePeak(value uint32) (err error) { + return instance.SetProperty("PercentUsagePeak", (value)) +} + +// GetPercentUsagePeak gets the value of PercentUsagePeak for the instance +func (instance *Win32_PerfFormattedData_PerfOS_PagingFile) GetPropertyPercentUsagePeak() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentUsagePeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Processor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Processor.go new file mode 100644 index 00000000..12db4afa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_Processor.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_Processor struct +type Win32_PerfFormattedData_PerfOS_Processor struct { + *Win32_PerfFormattedData + + // + C1TransitionsPersec uint64 + + // + C2TransitionsPersec uint64 + + // + C3TransitionsPersec uint64 + + // + DPCRate uint32 + + // + DPCsQueuedPersec uint32 + + // + InterruptsPersec uint32 + + // + PercentC1Time uint64 + + // + PercentC2Time uint64 + + // + PercentC3Time uint64 + + // + PercentDPCTime uint64 + + // + PercentIdleTime uint64 + + // + PercentInterruptTime uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 +} + +func NewWin32_PerfFormattedData_PerfOS_ProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_Processor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Processor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_ProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_Processor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_Processor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetC1TransitionsPersec sets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyC1TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C1TransitionsPersec", (value)) +} + +// GetC1TransitionsPersec gets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyC1TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C1TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC2TransitionsPersec sets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyC2TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C2TransitionsPersec", (value)) +} + +// GetC2TransitionsPersec gets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyC2TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C2TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC3TransitionsPersec sets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyC3TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C3TransitionsPersec", (value)) +} + +// GetC3TransitionsPersec gets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyC3TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C3TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCRate sets the value of DPCRate for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyDPCRate(value uint32) (err error) { + return instance.SetProperty("DPCRate", (value)) +} + +// GetDPCRate gets the value of DPCRate for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyDPCRate() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCsQueuedPersec sets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyDPCsQueuedPersec(value uint32) (err error) { + return instance.SetProperty("DPCsQueuedPersec", (value)) +} + +// GetDPCsQueuedPersec gets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyDPCsQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCsQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentC1Time sets the value of PercentC1Time for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentC1Time(value uint64) (err error) { + return instance.SetProperty("PercentC1Time", (value)) +} + +// GetPercentC1Time gets the value of PercentC1Time for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentC1Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time sets the value of PercentC2Time for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentC2Time(value uint64) (err error) { + return instance.SetProperty("PercentC2Time", (value)) +} + +// GetPercentC2Time gets the value of PercentC2Time for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentC2Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time sets the value of PercentC3Time for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentC3Time(value uint64) (err error) { + return instance.SetProperty("PercentC3Time", (value)) +} + +// GetPercentC3Time gets the value of PercentC3Time for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentC3Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDPCTime sets the value of PercentDPCTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentDPCTime(value uint64) (err error) { + return instance.SetProperty("PercentDPCTime", (value)) +} + +// GetPercentDPCTime gets the value of PercentDPCTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentDPCTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDPCTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentInterruptTime sets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentInterruptTime(value uint64) (err error) { + return instance.SetProperty("PercentInterruptTime", (value)) +} + +// GetPercentInterruptTime gets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentInterruptTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentInterruptTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_Processor) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_System.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_System.go new file mode 100644 index 00000000..b10af834 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfOS_System.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfOS_System struct +type Win32_PerfFormattedData_PerfOS_System struct { + *Win32_PerfFormattedData + + // + AlignmentFixupsPersec uint32 + + // + ContextSwitchesPersec uint32 + + // + ExceptionDispatchesPersec uint32 + + // + FileControlBytesPersec uint64 + + // + FileControlOperationsPersec uint32 + + // + FileDataOperationsPersec uint32 + + // + FileReadBytesPersec uint64 + + // + FileReadOperationsPersec uint32 + + // + FileWriteBytesPersec uint64 + + // + FileWriteOperationsPersec uint32 + + // + FloatingEmulationsPersec uint32 + + // + PercentRegistryQuotaInUse uint32 + + // + Processes uint32 + + // + ProcessorQueueLength uint32 + + // + SystemCallsPersec uint32 + + // + SystemUpTime uint64 + + // + Threads uint32 +} + +func NewWin32_PerfFormattedData_PerfOS_SystemEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfOS_System, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_System{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfOS_SystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfOS_System, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfOS_System{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAlignmentFixupsPersec sets the value of AlignmentFixupsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyAlignmentFixupsPersec(value uint32) (err error) { + return instance.SetProperty("AlignmentFixupsPersec", (value)) +} + +// GetAlignmentFixupsPersec gets the value of AlignmentFixupsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyAlignmentFixupsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AlignmentFixupsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextSwitchesPersec sets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyContextSwitchesPersec(value uint32) (err error) { + return instance.SetProperty("ContextSwitchesPersec", (value)) +} + +// GetContextSwitchesPersec gets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyContextSwitchesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExceptionDispatchesPersec sets the value of ExceptionDispatchesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyExceptionDispatchesPersec(value uint32) (err error) { + return instance.SetProperty("ExceptionDispatchesPersec", (value)) +} + +// GetExceptionDispatchesPersec gets the value of ExceptionDispatchesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyExceptionDispatchesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExceptionDispatchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileControlBytesPersec sets the value of FileControlBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileControlBytesPersec(value uint64) (err error) { + return instance.SetProperty("FileControlBytesPersec", (value)) +} + +// GetFileControlBytesPersec gets the value of FileControlBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileControlBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FileControlBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileControlOperationsPersec sets the value of FileControlOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileControlOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileControlOperationsPersec", (value)) +} + +// GetFileControlOperationsPersec gets the value of FileControlOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileControlOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileControlOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileDataOperationsPersec sets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileDataOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileDataOperationsPersec", (value)) +} + +// GetFileDataOperationsPersec gets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileDataOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileDataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileReadBytesPersec sets the value of FileReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("FileReadBytesPersec", (value)) +} + +// GetFileReadBytesPersec gets the value of FileReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FileReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileReadOperationsPersec sets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileReadOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileReadOperationsPersec", (value)) +} + +// GetFileReadOperationsPersec gets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileReadOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileWriteBytesPersec sets the value of FileWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("FileWriteBytesPersec", (value)) +} + +// GetFileWriteBytesPersec gets the value of FileWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FileWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileWriteOperationsPersec sets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFileWriteOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileWriteOperationsPersec", (value)) +} + +// GetFileWriteOperationsPersec gets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFileWriteOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFloatingEmulationsPersec sets the value of FloatingEmulationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyFloatingEmulationsPersec(value uint32) (err error) { + return instance.SetProperty("FloatingEmulationsPersec", (value)) +} + +// GetFloatingEmulationsPersec gets the value of FloatingEmulationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyFloatingEmulationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FloatingEmulationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentRegistryQuotaInUse sets the value of PercentRegistryQuotaInUse for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyPercentRegistryQuotaInUse(value uint32) (err error) { + return instance.SetProperty("PercentRegistryQuotaInUse", (value)) +} + +// GetPercentRegistryQuotaInUse gets the value of PercentRegistryQuotaInUse for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyPercentRegistryQuotaInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentRegistryQuotaInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcesses sets the value of Processes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyProcesses(value uint32) (err error) { + return instance.SetProperty("Processes", (value)) +} + +// GetProcesses gets the value of Processes for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("Processes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessorQueueLength sets the value of ProcessorQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyProcessorQueueLength(value uint32) (err error) { + return instance.SetProperty("ProcessorQueueLength", (value)) +} + +// GetProcessorQueueLength gets the value of ProcessorQueueLength for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyProcessorQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemCallsPersec sets the value of SystemCallsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertySystemCallsPersec(value uint32) (err error) { + return instance.SetProperty("SystemCallsPersec", (value)) +} + +// GetSystemCallsPersec gets the value of SystemCallsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertySystemCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemUpTime sets the value of SystemUpTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertySystemUpTime(value uint64) (err error) { + return instance.SetProperty("SystemUpTime", (value)) +} + +// GetSystemUpTime gets the value of SystemUpTime for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertySystemUpTime() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemUpTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreads sets the value of Threads for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) SetPropertyThreads(value uint32) (err error) { + return instance.SetProperty("Threads", (value)) +} + +// GetThreads gets the value of Threads for the instance +func (instance *Win32_PerfFormattedData_PerfOS_System) GetPropertyThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Threads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObject.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObject.go new file mode 100644 index 00000000..908137db --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObject.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfProc_JobObject struct +type Win32_PerfFormattedData_PerfProc_JobObject struct { + *Win32_PerfFormattedData + + // + CurrentPercentKernelModeTime uint64 + + // + CurrentPercentProcessorTime uint64 + + // + CurrentPercentUserModeTime uint64 + + // + PagesPerSec uint32 + + // + ProcessCountActive uint32 + + // + ProcessCountTerminated uint32 + + // + ProcessCountTotal uint32 + + // + ThisPeriodmSecKernelMode uint64 + + // + ThisPeriodmSecProcessor uint64 + + // + ThisPeriodmSecUserMode uint64 + + // + TotalmSecKernelMode uint64 + + // + TotalmSecProcessor uint64 + + // + TotalmSecUserMode uint64 +} + +func NewWin32_PerfFormattedData_PerfProc_JobObjectEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfProc_JobObject, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_JobObject{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfProc_JobObjectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfProc_JobObject, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_JobObject{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCurrentPercentKernelModeTime sets the value of CurrentPercentKernelModeTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyCurrentPercentKernelModeTime(value uint64) (err error) { + return instance.SetProperty("CurrentPercentKernelModeTime", (value)) +} + +// GetCurrentPercentKernelModeTime gets the value of CurrentPercentKernelModeTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyCurrentPercentKernelModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPercentKernelModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPercentProcessorTime sets the value of CurrentPercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyCurrentPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("CurrentPercentProcessorTime", (value)) +} + +// GetCurrentPercentProcessorTime gets the value of CurrentPercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyCurrentPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPercentUserModeTime sets the value of CurrentPercentUserModeTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyCurrentPercentUserModeTime(value uint64) (err error) { + return instance.SetProperty("CurrentPercentUserModeTime", (value)) +} + +// GetCurrentPercentUserModeTime gets the value of CurrentPercentUserModeTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyCurrentPercentUserModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPercentUserModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPagesPerSec sets the value of PagesPerSec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyPagesPerSec(value uint32) (err error) { + return instance.SetProperty("PagesPerSec", (value)) +} + +// GetPagesPerSec gets the value of PagesPerSec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyPagesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCountActive sets the value of ProcessCountActive for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyProcessCountActive(value uint32) (err error) { + return instance.SetProperty("ProcessCountActive", (value)) +} + +// GetProcessCountActive gets the value of ProcessCountActive for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyProcessCountActive() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCountActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCountTerminated sets the value of ProcessCountTerminated for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyProcessCountTerminated(value uint32) (err error) { + return instance.SetProperty("ProcessCountTerminated", (value)) +} + +// GetProcessCountTerminated gets the value of ProcessCountTerminated for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyProcessCountTerminated() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCountTerminated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCountTotal sets the value of ProcessCountTotal for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyProcessCountTotal(value uint32) (err error) { + return instance.SetProperty("ProcessCountTotal", (value)) +} + +// GetProcessCountTotal gets the value of ProcessCountTotal for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyProcessCountTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCountTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThisPeriodmSecKernelMode sets the value of ThisPeriodmSecKernelMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyThisPeriodmSecKernelMode(value uint64) (err error) { + return instance.SetProperty("ThisPeriodmSecKernelMode", (value)) +} + +// GetThisPeriodmSecKernelMode gets the value of ThisPeriodmSecKernelMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyThisPeriodmSecKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodmSecKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThisPeriodmSecProcessor sets the value of ThisPeriodmSecProcessor for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyThisPeriodmSecProcessor(value uint64) (err error) { + return instance.SetProperty("ThisPeriodmSecProcessor", (value)) +} + +// GetThisPeriodmSecProcessor gets the value of ThisPeriodmSecProcessor for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyThisPeriodmSecProcessor() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodmSecProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThisPeriodmSecUserMode sets the value of ThisPeriodmSecUserMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyThisPeriodmSecUserMode(value uint64) (err error) { + return instance.SetProperty("ThisPeriodmSecUserMode", (value)) +} + +// GetThisPeriodmSecUserMode gets the value of ThisPeriodmSecUserMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyThisPeriodmSecUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodmSecUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalmSecKernelMode sets the value of TotalmSecKernelMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyTotalmSecKernelMode(value uint64) (err error) { + return instance.SetProperty("TotalmSecKernelMode", (value)) +} + +// GetTotalmSecKernelMode gets the value of TotalmSecKernelMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyTotalmSecKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalmSecKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalmSecProcessor sets the value of TotalmSecProcessor for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyTotalmSecProcessor(value uint64) (err error) { + return instance.SetProperty("TotalmSecProcessor", (value)) +} + +// GetTotalmSecProcessor gets the value of TotalmSecProcessor for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyTotalmSecProcessor() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalmSecProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalmSecUserMode sets the value of TotalmSecUserMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) SetPropertyTotalmSecUserMode(value uint64) (err error) { + return instance.SetProperty("TotalmSecUserMode", (value)) +} + +// GetTotalmSecUserMode gets the value of TotalmSecUserMode for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObject) GetPropertyTotalmSecUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalmSecUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObjectDetails.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObjectDetails.go new file mode 100644 index 00000000..ee5fbe73 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_JobObjectDetails.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfProc_JobObjectDetails struct +type Win32_PerfFormattedData_PerfProc_JobObjectDetails struct { + *Win32_PerfFormattedData + + // + CreatingProcessID uint64 + + // + ElapsedTime uint64 + + // + HandleCount uint32 + + // + IDProcess uint64 + + // + IODataBytesPersec uint64 + + // + IODataOperationsPersec uint64 + + // + IOOtherBytesPersec uint64 + + // + IOOtherOperationsPersec uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadOperationsPersec uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteOperationsPersec uint64 + + // + PageFaultsPersec uint32 + + // + PageFileBytes uint64 + + // + PageFileBytesPeak uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PoolNonpagedBytes uint32 + + // + PoolPagedBytes uint32 + + // + PriorityBase uint32 + + // + PrivateBytes uint64 + + // + ThreadCount uint32 + + // + VirtualBytes uint64 + + // + VirtualBytesPeak uint64 + + // + WorkingSet uint64 + + // + WorkingSetPeak uint64 +} + +func NewWin32_PerfFormattedData_PerfProc_JobObjectDetailsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfProc_JobObjectDetails, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_JobObjectDetails{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfProc_JobObjectDetailsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfProc_JobObjectDetails, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_JobObjectDetails{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCreatingProcessID sets the value of CreatingProcessID for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyCreatingProcessID(value uint64) (err error) { + return instance.SetProperty("CreatingProcessID", (value)) +} + +// GetCreatingProcessID gets the value of CreatingProcessID for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyCreatingProcessID() (value uint64, err error) { + retValue, err := instance.GetProperty("CreatingProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIDProcess sets the value of IDProcess for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIDProcess(value uint64) (err error) { + return instance.SetProperty("IDProcess", (value)) +} + +// GetIDProcess gets the value of IDProcess for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIDProcess() (value uint64, err error) { + retValue, err := instance.GetProperty("IDProcess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODataBytesPersec sets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIODataBytesPersec(value uint64) (err error) { + return instance.SetProperty("IODataBytesPersec", (value)) +} + +// GetIODataBytesPersec gets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIODataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODataOperationsPersec sets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIODataOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IODataOperationsPersec", (value)) +} + +// GetIODataOperationsPersec gets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIODataOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherBytesPersec sets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIOOtherBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherBytesPersec", (value)) +} + +// GetIOOtherBytesPersec gets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIOOtherBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherOperationsPersec sets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIOOtherOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherOperationsPersec", (value)) +} + +// GetIOOtherOperationsPersec gets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIOOtherOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadOperationsPersec sets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIOReadOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadOperationsPersec", (value)) +} + +// GetIOReadOperationsPersec gets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIOReadOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteOperationsPersec sets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyIOWriteOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteOperationsPersec", (value)) +} + +// GetIOWriteOperationsPersec gets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyIOWriteOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileBytes sets the value of PageFileBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPageFileBytes(value uint64) (err error) { + return instance.SetProperty("PageFileBytes", (value)) +} + +// GetPageFileBytes gets the value of PageFileBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPageFileBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileBytesPeak sets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPageFileBytesPeak(value uint64) (err error) { + return instance.SetProperty("PageFileBytesPeak", (value)) +} + +// GetPageFileBytesPeak gets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPageFileBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivateBytes sets the value of PrivateBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyPrivateBytes(value uint64) (err error) { + return instance.SetProperty("PrivateBytes", (value)) +} + +// GetPrivateBytes gets the value of PrivateBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyPrivateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualBytes sets the value of VirtualBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyVirtualBytes(value uint64) (err error) { + return instance.SetProperty("VirtualBytes", (value)) +} + +// GetVirtualBytes gets the value of VirtualBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyVirtualBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualBytesPeak sets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyVirtualBytesPeak(value uint64) (err error) { + return instance.SetProperty("VirtualBytesPeak", (value)) +} + +// GetVirtualBytesPeak gets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyVirtualBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSet sets the value of WorkingSet for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyWorkingSet(value uint64) (err error) { + return instance.SetProperty("WorkingSet", (value)) +} + +// GetWorkingSet gets the value of WorkingSet for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyWorkingSet() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPeak sets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) SetPropertyWorkingSetPeak(value uint64) (err error) { + return instance.SetProperty("WorkingSetPeak", (value)) +} + +// GetWorkingSetPeak gets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_JobObjectDetails) GetPropertyWorkingSetPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Process.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Process.go new file mode 100644 index 00000000..c56b66fa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Process.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfProc_Process struct +type Win32_PerfFormattedData_PerfProc_Process struct { + *Win32_PerfFormattedData + + // + CreatingProcessID uint32 + + // + ElapsedTime uint64 + + // + HandleCount uint32 + + // + IDProcess uint32 + + // + IODataBytesPersec uint64 + + // + IODataOperationsPersec uint64 + + // + IOOtherBytesPersec uint64 + + // + IOOtherOperationsPersec uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadOperationsPersec uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteOperationsPersec uint64 + + // + PageFaultsPersec uint32 + + // + PageFileBytes uint64 + + // + PageFileBytesPeak uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PoolNonpagedBytes uint32 + + // + PoolPagedBytes uint32 + + // + PriorityBase uint32 + + // + PrivateBytes uint64 + + // + ThreadCount uint32 + + // + VirtualBytes uint64 + + // + VirtualBytesPeak uint64 + + // + WorkingSet uint64 + + // + WorkingSetPeak uint64 + + // + WorkingSetPrivate uint64 +} + +func NewWin32_PerfFormattedData_PerfProc_ProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfProc_Process, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_Process{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfProc_ProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfProc_Process, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_Process{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCreatingProcessID sets the value of CreatingProcessID for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyCreatingProcessID(value uint32) (err error) { + return instance.SetProperty("CreatingProcessID", (value)) +} + +// GetCreatingProcessID gets the value of CreatingProcessID for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyCreatingProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("CreatingProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIDProcess sets the value of IDProcess for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIDProcess(value uint32) (err error) { + return instance.SetProperty("IDProcess", (value)) +} + +// GetIDProcess gets the value of IDProcess for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIDProcess() (value uint32, err error) { + retValue, err := instance.GetProperty("IDProcess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODataBytesPersec sets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIODataBytesPersec(value uint64) (err error) { + return instance.SetProperty("IODataBytesPersec", (value)) +} + +// GetIODataBytesPersec gets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIODataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODataOperationsPersec sets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIODataOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IODataOperationsPersec", (value)) +} + +// GetIODataOperationsPersec gets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIODataOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherBytesPersec sets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIOOtherBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherBytesPersec", (value)) +} + +// GetIOOtherBytesPersec gets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIOOtherBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherOperationsPersec sets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIOOtherOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherOperationsPersec", (value)) +} + +// GetIOOtherOperationsPersec gets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIOOtherOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadOperationsPersec sets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIOReadOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadOperationsPersec", (value)) +} + +// GetIOReadOperationsPersec gets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIOReadOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteOperationsPersec sets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyIOWriteOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteOperationsPersec", (value)) +} + +// GetIOWriteOperationsPersec gets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyIOWriteOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileBytes sets the value of PageFileBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPageFileBytes(value uint64) (err error) { + return instance.SetProperty("PageFileBytes", (value)) +} + +// GetPageFileBytes gets the value of PageFileBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPageFileBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileBytesPeak sets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPageFileBytesPeak(value uint64) (err error) { + return instance.SetProperty("PageFileBytesPeak", (value)) +} + +// GetPageFileBytesPeak gets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPageFileBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivateBytes sets the value of PrivateBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyPrivateBytes(value uint64) (err error) { + return instance.SetProperty("PrivateBytes", (value)) +} + +// GetPrivateBytes gets the value of PrivateBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyPrivateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualBytes sets the value of VirtualBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyVirtualBytes(value uint64) (err error) { + return instance.SetProperty("VirtualBytes", (value)) +} + +// GetVirtualBytes gets the value of VirtualBytes for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyVirtualBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualBytesPeak sets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyVirtualBytesPeak(value uint64) (err error) { + return instance.SetProperty("VirtualBytesPeak", (value)) +} + +// GetVirtualBytesPeak gets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyVirtualBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSet sets the value of WorkingSet for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyWorkingSet(value uint64) (err error) { + return instance.SetProperty("WorkingSet", (value)) +} + +// GetWorkingSet gets the value of WorkingSet for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyWorkingSet() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPeak sets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyWorkingSetPeak(value uint64) (err error) { + return instance.SetProperty("WorkingSetPeak", (value)) +} + +// GetWorkingSetPeak gets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyWorkingSetPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPrivate sets the value of WorkingSetPrivate for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) SetPropertyWorkingSetPrivate(value uint64) (err error) { + return instance.SetProperty("WorkingSetPrivate", (value)) +} + +// GetWorkingSetPrivate gets the value of WorkingSetPrivate for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Process) GetPropertyWorkingSetPrivate() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPrivate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Thread.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Thread.go new file mode 100644 index 00000000..832ff00e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PerfProc_Thread.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PerfProc_Thread struct +type Win32_PerfFormattedData_PerfProc_Thread struct { + *Win32_PerfFormattedData + + // + ContextSwitchesPersec uint32 + + // + ElapsedTime uint64 + + // + IDProcess uint32 + + // + IDThread uint32 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PriorityBase uint32 + + // + PriorityCurrent uint32 + + // + StartAddress uint32 + + // + ThreadState uint32 + + // + ThreadWaitReason uint32 +} + +func NewWin32_PerfFormattedData_PerfProc_ThreadEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PerfProc_Thread, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_Thread{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PerfProc_ThreadEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PerfProc_Thread, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PerfProc_Thread{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetContextSwitchesPersec sets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyContextSwitchesPersec(value uint32) (err error) { + return instance.SetProperty("ContextSwitchesPersec", (value)) +} + +// GetContextSwitchesPersec gets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyContextSwitchesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIDProcess sets the value of IDProcess for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyIDProcess(value uint32) (err error) { + return instance.SetProperty("IDProcess", (value)) +} + +// GetIDProcess gets the value of IDProcess for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyIDProcess() (value uint32, err error) { + retValue, err := instance.GetProperty("IDProcess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIDThread sets the value of IDThread for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyIDThread(value uint32) (err error) { + return instance.SetProperty("IDThread", (value)) +} + +// GetIDThread gets the value of IDThread for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyIDThread() (value uint32, err error) { + retValue, err := instance.GetProperty("IDThread") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityCurrent sets the value of PriorityCurrent for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyPriorityCurrent(value uint32) (err error) { + return instance.SetProperty("PriorityCurrent", (value)) +} + +// GetPriorityCurrent gets the value of PriorityCurrent for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyPriorityCurrent() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStartAddress sets the value of StartAddress for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyStartAddress(value uint32) (err error) { + return instance.SetProperty("StartAddress", (value)) +} + +// GetStartAddress gets the value of StartAddress for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyStartAddress() (value uint32, err error) { + retValue, err := instance.GetProperty("StartAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadState sets the value of ThreadState for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyThreadState(value uint32) (err error) { + return instance.SetProperty("ThreadState", (value)) +} + +// GetThreadState gets the value of ThreadState for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyThreadState() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadWaitReason sets the value of ThreadWaitReason for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) SetPropertyThreadWaitReason(value uint32) (err error) { + return instance.SetProperty("ThreadWaitReason", (value)) +} + +// GetThreadWaitReason gets the value of ThreadWaitReason for the instance +func (instance *Win32_PerfFormattedData_PerfProc_Thread) GetPropertyThreadWaitReason() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadWaitReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter.go new file mode 100644 index 00000000..fc3be050 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter struct +type Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter struct { + *Win32_PerfFormattedData + + // + Energy uint64 + + // + Power uint64 + + // + Time uint64 +} + +func NewWin32_PerfFormattedData_PowerMeterCounter_EnergyMeterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PowerMeterCounter_EnergyMeterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetEnergy sets the value of Energy for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter) SetPropertyEnergy(value uint64) (err error) { + return instance.SetProperty("Energy", (value)) +} + +// GetEnergy gets the value of Energy for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter) GetPropertyEnergy() (value uint64, err error) { + retValue, err := instance.GetProperty("Energy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPower sets the value of Power for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter) SetPropertyPower(value uint64) (err error) { + return instance.SetProperty("Power", (value)) +} + +// GetPower gets the value of Power for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter) GetPropertyPower() (value uint64, err error) { + retValue, err := instance.GetProperty("Power") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTime sets the value of Time for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter) SetPropertyTime(value uint64) (err error) { + return instance.SetProperty("Time", (value)) +} + +// GetTime gets the value of Time for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_EnergyMeter) GetPropertyTime() (value uint64, err error) { + retValue, err := instance.GetProperty("Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_PowerMeter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_PowerMeter.go new file mode 100644 index 00000000..847db251 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_PowerMeterCounter_PowerMeter.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_PowerMeterCounter_PowerMeter struct +type Win32_PerfFormattedData_PowerMeterCounter_PowerMeter struct { + *Win32_PerfFormattedData + + // + Power uint32 + + // + PowerBudget uint32 +} + +func NewWin32_PerfFormattedData_PowerMeterCounter_PowerMeterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_PowerMeterCounter_PowerMeter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PowerMeterCounter_PowerMeter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_PowerMeterCounter_PowerMeterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_PowerMeterCounter_PowerMeter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_PowerMeterCounter_PowerMeter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetPower sets the value of Power for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_PowerMeter) SetPropertyPower(value uint32) (err error) { + return instance.SetProperty("Power", (value)) +} + +// GetPower gets the value of Power for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_PowerMeter) GetPropertyPower() (value uint32, err error) { + retValue, err := instance.GetProperty("Power") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerBudget sets the value of PowerBudget for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_PowerMeter) SetPropertyPowerBudget(value uint32) (err error) { + return instance.SetProperty("PowerBudget", (value)) +} + +// GetPowerBudget gets the value of PowerBudget for the instance +func (instance *Win32_PerfFormattedData_PowerMeterCounter_PowerMeter) GetPropertyPowerBudget() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerBudget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASPort.go new file mode 100644 index 00000000..3f4ded81 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASPort.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_RemoteAccess_RASPort struct +type Win32_PerfFormattedData_RemoteAccess_RASPort struct { + *Win32_PerfFormattedData + + // + AlignmentErrors uint32 + + // + BufferOverrunErrors uint32 + + // + BytesReceived uint64 + + // + BytesReceivedPerSec uint32 + + // + BytesTransmitted uint64 + + // + BytesTransmittedPerSec uint32 + + // + CRCErrors uint32 + + // + FramesReceived uint32 + + // + FramesReceivedPerSec uint32 + + // + FramesTransmitted uint32 + + // + FramesTransmittedPerSec uint32 + + // + PercentCompressionIn uint32 + + // + PercentCompressionOut uint32 + + // + SerialOverrunErrors uint32 + + // + TimeoutErrors uint32 + + // + TotalErrors uint32 + + // + TotalErrorsPerSec uint32 +} + +func NewWin32_PerfFormattedData_RemoteAccess_RASPortEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_RemoteAccess_RASPort, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemoteAccess_RASPort{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_RemoteAccess_RASPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_RemoteAccess_RASPort, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemoteAccess_RASPort{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAlignmentErrors sets the value of AlignmentErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyAlignmentErrors(value uint32) (err error) { + return instance.SetProperty("AlignmentErrors", (value)) +} + +// GetAlignmentErrors gets the value of AlignmentErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyAlignmentErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("AlignmentErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBufferOverrunErrors sets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyBufferOverrunErrors(value uint32) (err error) { + return instance.SetProperty("BufferOverrunErrors", (value)) +} + +// GetBufferOverrunErrors gets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyBufferOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPerSec sets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedPerSec", (value)) +} + +// GetBytesReceivedPerSec gets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPerSec sets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyBytesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesTransmittedPerSec", (value)) +} + +// GetBytesTransmittedPerSec gets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyBytesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCRCErrors sets the value of CRCErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyCRCErrors(value uint32) (err error) { + return instance.SetProperty("CRCErrors", (value)) +} + +// GetCRCErrors gets the value of CRCErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyCRCErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("CRCErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceived sets the value of FramesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyFramesReceived(value uint32) (err error) { + return instance.SetProperty("FramesReceived", (value)) +} + +// GetFramesReceived gets the value of FramesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyFramesReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceivedPerSec sets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyFramesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesReceivedPerSec", (value)) +} + +// GetFramesReceivedPerSec gets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyFramesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmitted sets the value of FramesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyFramesTransmitted(value uint32) (err error) { + return instance.SetProperty("FramesTransmitted", (value)) +} + +// GetFramesTransmitted gets the value of FramesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyFramesTransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmittedPerSec sets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyFramesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesTransmittedPerSec", (value)) +} + +// GetFramesTransmittedPerSec gets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyFramesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionIn sets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyPercentCompressionIn(value uint32) (err error) { + return instance.SetProperty("PercentCompressionIn", (value)) +} + +// GetPercentCompressionIn gets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyPercentCompressionIn() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionIn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionOut sets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyPercentCompressionOut(value uint32) (err error) { + return instance.SetProperty("PercentCompressionOut", (value)) +} + +// GetPercentCompressionOut gets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyPercentCompressionOut() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSerialOverrunErrors sets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertySerialOverrunErrors(value uint32) (err error) { + return instance.SetProperty("SerialOverrunErrors", (value)) +} + +// GetSerialOverrunErrors gets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertySerialOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("SerialOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeoutErrors sets the value of TimeoutErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyTimeoutErrors(value uint32) (err error) { + return instance.SetProperty("TimeoutErrors", (value)) +} + +// GetTimeoutErrors gets the value of TimeoutErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyTimeoutErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeoutErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrors sets the value of TotalErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyTotalErrors(value uint32) (err error) { + return instance.SetProperty("TotalErrors", (value)) +} + +// GetTotalErrors gets the value of TotalErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyTotalErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrorsPerSec sets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) SetPropertyTotalErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("TotalErrorsPerSec", (value)) +} + +// GetTotalErrorsPerSec gets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASPort) GetPropertyTotalErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASTotal.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASTotal.go new file mode 100644 index 00000000..92b1d34a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteAccess_RASTotal.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_RemoteAccess_RASTotal struct +type Win32_PerfFormattedData_RemoteAccess_RASTotal struct { + *Win32_PerfFormattedData + + // + AlignmentErrors uint32 + + // + BufferOverrunErrors uint32 + + // + BytesReceived uint64 + + // + BytesReceivedPerSec uint32 + + // + BytesTransmitted uint64 + + // + BytesTransmittedPerSec uint32 + + // + CRCErrors uint32 + + // + FramesReceived uint32 + + // + FramesReceivedPerSec uint32 + + // + FramesTransmitted uint32 + + // + FramesTransmittedPerSec uint32 + + // + PercentCompressionIn uint32 + + // + PercentCompressionOut uint32 + + // + SerialOverrunErrors uint32 + + // + TimeoutErrors uint32 + + // + TotalConnections uint32 + + // + TotalErrors uint32 + + // + TotalErrorsPerSec uint32 +} + +func NewWin32_PerfFormattedData_RemoteAccess_RASTotalEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_RemoteAccess_RASTotal, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemoteAccess_RASTotal{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_RemoteAccess_RASTotalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_RemoteAccess_RASTotal, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemoteAccess_RASTotal{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAlignmentErrors sets the value of AlignmentErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyAlignmentErrors(value uint32) (err error) { + return instance.SetProperty("AlignmentErrors", (value)) +} + +// GetAlignmentErrors gets the value of AlignmentErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyAlignmentErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("AlignmentErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBufferOverrunErrors sets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyBufferOverrunErrors(value uint32) (err error) { + return instance.SetProperty("BufferOverrunErrors", (value)) +} + +// GetBufferOverrunErrors gets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyBufferOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPerSec sets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedPerSec", (value)) +} + +// GetBytesReceivedPerSec gets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPerSec sets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyBytesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesTransmittedPerSec", (value)) +} + +// GetBytesTransmittedPerSec gets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyBytesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCRCErrors sets the value of CRCErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyCRCErrors(value uint32) (err error) { + return instance.SetProperty("CRCErrors", (value)) +} + +// GetCRCErrors gets the value of CRCErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyCRCErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("CRCErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceived sets the value of FramesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyFramesReceived(value uint32) (err error) { + return instance.SetProperty("FramesReceived", (value)) +} + +// GetFramesReceived gets the value of FramesReceived for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyFramesReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceivedPerSec sets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyFramesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesReceivedPerSec", (value)) +} + +// GetFramesReceivedPerSec gets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyFramesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmitted sets the value of FramesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyFramesTransmitted(value uint32) (err error) { + return instance.SetProperty("FramesTransmitted", (value)) +} + +// GetFramesTransmitted gets the value of FramesTransmitted for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyFramesTransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmittedPerSec sets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyFramesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesTransmittedPerSec", (value)) +} + +// GetFramesTransmittedPerSec gets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyFramesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionIn sets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyPercentCompressionIn(value uint32) (err error) { + return instance.SetProperty("PercentCompressionIn", (value)) +} + +// GetPercentCompressionIn gets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyPercentCompressionIn() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionIn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionOut sets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyPercentCompressionOut(value uint32) (err error) { + return instance.SetProperty("PercentCompressionOut", (value)) +} + +// GetPercentCompressionOut gets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyPercentCompressionOut() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSerialOverrunErrors sets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertySerialOverrunErrors(value uint32) (err error) { + return instance.SetProperty("SerialOverrunErrors", (value)) +} + +// GetSerialOverrunErrors gets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertySerialOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("SerialOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeoutErrors sets the value of TimeoutErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyTimeoutErrors(value uint32) (err error) { + return instance.SetProperty("TimeoutErrors", (value)) +} + +// GetTimeoutErrors gets the value of TimeoutErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyTimeoutErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeoutErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalConnections sets the value of TotalConnections for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyTotalConnections(value uint32) (err error) { + return instance.SetProperty("TotalConnections", (value)) +} + +// GetTotalConnections gets the value of TotalConnections for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyTotalConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrors sets the value of TotalErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyTotalErrors(value uint32) (err error) { + return instance.SetProperty("TotalErrors", (value)) +} + +// GetTotalErrors gets the value of TotalErrors for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyTotalErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrorsPerSec sets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) SetPropertyTotalErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("TotalErrorsPerSec", (value)) +} + +// GetTotalErrorsPerSec gets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_RemoteAccess_RASTotal) GetPropertyTotalErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go new file mode 100644 index 00000000..43ce6425 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset struct +type Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset struct { + *Win32_PerfFormattedData + + // + Connectiontime uint64 + + // + Contextacquisitionwaittime uint64 + + // + RPCContext uint64 + + // + ThreadswaitingforRPCContext uint64 +} + +func NewWin32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCountersetEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCountersetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetConnectiontime sets the value of Connectiontime for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyConnectiontime(value uint64) (err error) { + return instance.SetProperty("Connectiontime", (value)) +} + +// GetConnectiontime gets the value of Connectiontime for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyConnectiontime() (value uint64, err error) { + retValue, err := instance.GetProperty("Connectiontime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextacquisitionwaittime sets the value of Contextacquisitionwaittime for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyContextacquisitionwaittime(value uint64) (err error) { + return instance.SetProperty("Contextacquisitionwaittime", (value)) +} + +// GetContextacquisitionwaittime gets the value of Contextacquisitionwaittime for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyContextacquisitionwaittime() (value uint64, err error) { + retValue, err := instance.GetProperty("Contextacquisitionwaittime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRPCContext sets the value of RPCContext for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyRPCContext(value uint64) (err error) { + return instance.SetProperty("RPCContext", (value)) +} + +// GetRPCContext gets the value of RPCContext for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyRPCContext() (value uint64, err error) { + retValue, err := instance.GetProperty("RPCContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadswaitingforRPCContext sets the value of ThreadswaitingforRPCContext for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyThreadswaitingforRPCContext(value uint64) (err error) { + return instance.SetProperty("ThreadswaitingforRPCContext", (value)) +} + +// GetThreadswaitingforRPCContext gets the value of ThreadswaitingforRPCContext for the instance +func (instance *Win32_PerfFormattedData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyThreadswaitingforRPCContext() (value uint64, err error) { + retValue, err := instance.GetProperty("ThreadswaitingforRPCContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting.go new file mode 100644 index 00000000..0a51ff5c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting struct +type Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting struct { + *Win32_PerfFormattedData + + // + ConnectedClients uint32 + + // + UpdatedPixelsPersec uint32 +} + +func NewWin32_PerfFormattedData_RemotePerfProvider_HyperVVMRemotingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_RemotePerfProvider_HyperVVMRemotingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetConnectedClients sets the value of ConnectedClients for the instance +func (instance *Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting) SetPropertyConnectedClients(value uint32) (err error) { + return instance.SetProperty("ConnectedClients", (value)) +} + +// GetConnectedClients gets the value of ConnectedClients for the instance +func (instance *Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting) GetPropertyConnectedClients() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectedClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUpdatedPixelsPersec sets the value of UpdatedPixelsPersec for the instance +func (instance *Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting) SetPropertyUpdatedPixelsPersec(value uint32) (err error) { + return instance.SetProperty("UpdatedPixelsPersec", (value)) +} + +// GetUpdatedPixelsPersec gets the value of UpdatedPixelsPersec for the instance +func (instance *Win32_PerfFormattedData_RemotePerfProvider_HyperVVMRemoting) GetPropertyUpdatedPixelsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("UpdatedPixelsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter.go new file mode 100644 index 00000000..16d68ae6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter struct +type Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter struct { + *Win32_PerfFormattedData + + // + CancelledHandleCount uint64 + + // + CurrentActiveHandleCount uint64 + + // + CurrentInactiveHandleCount uint64 + + // + FSFailedResumeHandleCount uint64 + + // + ReplayedHandleCount uint64 + + // + ResumedHandleCount uint64 + + // + RKFailedResumeHandleCount uint64 + + // + SuspendedHandleCount uint64 +} + +func NewWin32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCancelledHandleCount sets the value of CancelledHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyCancelledHandleCount(value uint64) (err error) { + return instance.SetProperty("CancelledHandleCount", (value)) +} + +// GetCancelledHandleCount gets the value of CancelledHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyCancelledHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CancelledHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentActiveHandleCount sets the value of CurrentActiveHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyCurrentActiveHandleCount(value uint64) (err error) { + return instance.SetProperty("CurrentActiveHandleCount", (value)) +} + +// GetCurrentActiveHandleCount gets the value of CurrentActiveHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyCurrentActiveHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentActiveHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentInactiveHandleCount sets the value of CurrentInactiveHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyCurrentInactiveHandleCount(value uint64) (err error) { + return instance.SetProperty("CurrentInactiveHandleCount", (value)) +} + +// GetCurrentInactiveHandleCount gets the value of CurrentInactiveHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyCurrentInactiveHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentInactiveHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFSFailedResumeHandleCount sets the value of FSFailedResumeHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyFSFailedResumeHandleCount(value uint64) (err error) { + return instance.SetProperty("FSFailedResumeHandleCount", (value)) +} + +// GetFSFailedResumeHandleCount gets the value of FSFailedResumeHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyFSFailedResumeHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("FSFailedResumeHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReplayedHandleCount sets the value of ReplayedHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyReplayedHandleCount(value uint64) (err error) { + return instance.SetProperty("ReplayedHandleCount", (value)) +} + +// GetReplayedHandleCount gets the value of ReplayedHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyReplayedHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReplayedHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResumedHandleCount sets the value of ResumedHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyResumedHandleCount(value uint64) (err error) { + return instance.SetProperty("ResumedHandleCount", (value)) +} + +// GetResumedHandleCount gets the value of ResumedHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyResumedHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ResumedHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRKFailedResumeHandleCount sets the value of RKFailedResumeHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyRKFailedResumeHandleCount(value uint64) (err error) { + return instance.SetProperty("RKFailedResumeHandleCount", (value)) +} + +// GetRKFailedResumeHandleCount gets the value of RKFailedResumeHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyRKFailedResumeHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("RKFailedResumeHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSuspendedHandleCount sets the value of SuspendedHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) SetPropertySuspendedHandleCount(value uint64) (err error) { + return instance.SetProperty("SuspendedHandleCount", (value)) +} + +// GetSuspendedHandleCount gets the value of SuspendedHandleCount for the instance +func (instance *Win32_PerfFormattedData_ResumeKeyFilter_ResumeKeyFilter) GetPropertySuspendedHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("SuspendedHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000.go new file mode 100644 index 00000000..e1573378 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000 struct +type Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000 struct { + *Win32_PerfFormattedData + + // + ConnectionsAcceptedovernetpipe uint32 + + // + ConnectionsAcceptedovernettcp uint32 + + // + ConnectionsDispatchedovernetpipe uint32 + + // + ConnectionsDispatchedovernettcp uint32 + + // + DispatchFailuresovernetpipe uint32 + + // + DispatchFailuresovernettcp uint32 + + // + ProtocolFailuresovernetpipe uint32 + + // + ProtocolFailuresovernettcp uint32 + + // + RegistrationsActivefornetpipe uint32 + + // + RegistrationsActivefornettcp uint32 + + // + UrisRegisteredfornetpipe uint32 + + // + UrisRegisteredfornettcp uint32 + + // + UrisUnregisteredfornetpipe uint32 + + // + UrisUnregisteredfornettcp uint32 +} + +func NewWin32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetConnectionsAcceptedovernetpipe sets the value of ConnectionsAcceptedovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsAcceptedovernetpipe(value uint32) (err error) { + return instance.SetProperty("ConnectionsAcceptedovernetpipe", (value)) +} + +// GetConnectionsAcceptedovernetpipe gets the value of ConnectionsAcceptedovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsAcceptedovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsAcceptedovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsAcceptedovernettcp sets the value of ConnectionsAcceptedovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsAcceptedovernettcp(value uint32) (err error) { + return instance.SetProperty("ConnectionsAcceptedovernettcp", (value)) +} + +// GetConnectionsAcceptedovernettcp gets the value of ConnectionsAcceptedovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsAcceptedovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsAcceptedovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsDispatchedovernetpipe sets the value of ConnectionsDispatchedovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsDispatchedovernetpipe(value uint32) (err error) { + return instance.SetProperty("ConnectionsDispatchedovernetpipe", (value)) +} + +// GetConnectionsDispatchedovernetpipe gets the value of ConnectionsDispatchedovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsDispatchedovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsDispatchedovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsDispatchedovernettcp sets the value of ConnectionsDispatchedovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsDispatchedovernettcp(value uint32) (err error) { + return instance.SetProperty("ConnectionsDispatchedovernettcp", (value)) +} + +// GetConnectionsDispatchedovernettcp gets the value of ConnectionsDispatchedovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsDispatchedovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsDispatchedovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDispatchFailuresovernetpipe sets the value of DispatchFailuresovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyDispatchFailuresovernetpipe(value uint32) (err error) { + return instance.SetProperty("DispatchFailuresovernetpipe", (value)) +} + +// GetDispatchFailuresovernetpipe gets the value of DispatchFailuresovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyDispatchFailuresovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("DispatchFailuresovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDispatchFailuresovernettcp sets the value of DispatchFailuresovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyDispatchFailuresovernettcp(value uint32) (err error) { + return instance.SetProperty("DispatchFailuresovernettcp", (value)) +} + +// GetDispatchFailuresovernettcp gets the value of DispatchFailuresovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyDispatchFailuresovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("DispatchFailuresovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocolFailuresovernetpipe sets the value of ProtocolFailuresovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyProtocolFailuresovernetpipe(value uint32) (err error) { + return instance.SetProperty("ProtocolFailuresovernetpipe", (value)) +} + +// GetProtocolFailuresovernetpipe gets the value of ProtocolFailuresovernetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyProtocolFailuresovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("ProtocolFailuresovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocolFailuresovernettcp sets the value of ProtocolFailuresovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyProtocolFailuresovernettcp(value uint32) (err error) { + return instance.SetProperty("ProtocolFailuresovernettcp", (value)) +} + +// GetProtocolFailuresovernettcp gets the value of ProtocolFailuresovernettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyProtocolFailuresovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("ProtocolFailuresovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRegistrationsActivefornetpipe sets the value of RegistrationsActivefornetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyRegistrationsActivefornetpipe(value uint32) (err error) { + return instance.SetProperty("RegistrationsActivefornetpipe", (value)) +} + +// GetRegistrationsActivefornetpipe gets the value of RegistrationsActivefornetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyRegistrationsActivefornetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("RegistrationsActivefornetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRegistrationsActivefornettcp sets the value of RegistrationsActivefornettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyRegistrationsActivefornettcp(value uint32) (err error) { + return instance.SetProperty("RegistrationsActivefornettcp", (value)) +} + +// GetRegistrationsActivefornettcp gets the value of RegistrationsActivefornettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyRegistrationsActivefornettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("RegistrationsActivefornettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisRegisteredfornetpipe sets the value of UrisRegisteredfornetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisRegisteredfornetpipe(value uint32) (err error) { + return instance.SetProperty("UrisRegisteredfornetpipe", (value)) +} + +// GetUrisRegisteredfornetpipe gets the value of UrisRegisteredfornetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisRegisteredfornetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisRegisteredfornetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisRegisteredfornettcp sets the value of UrisRegisteredfornettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisRegisteredfornettcp(value uint32) (err error) { + return instance.SetProperty("UrisRegisteredfornettcp", (value)) +} + +// GetUrisRegisteredfornettcp gets the value of UrisRegisteredfornettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisRegisteredfornettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisRegisteredfornettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisUnregisteredfornetpipe sets the value of UrisUnregisteredfornetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisUnregisteredfornetpipe(value uint32) (err error) { + return instance.SetProperty("UrisUnregisteredfornetpipe", (value)) +} + +// GetUrisUnregisteredfornetpipe gets the value of UrisUnregisteredfornetpipe for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisUnregisteredfornetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisUnregisteredfornetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisUnregisteredfornettcp sets the value of UrisUnregisteredfornettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisUnregisteredfornettcp(value uint32) (err error) { + return instance.SetProperty("UrisUnregisteredfornettcp", (value)) +} + +// GetUrisUnregisteredfornettcp gets the value of UrisUnregisteredfornettcp for the instance +func (instance *Win32_PerfFormattedData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisUnregisteredfornettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisUnregisteredfornettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000.go new file mode 100644 index 00000000..bd921ffe --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000 struct +type Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000 struct { + *Win32_PerfFormattedData + + // + Calls uint32 + + // + CallsDuration uint32 + + // + CallsFailed uint32 + + // + CallsFailedPerSecond uint32 + + // + CallsFaulted uint32 + + // + CallsFaultedPerSecond uint32 + + // + CallsOutstanding uint32 + + // + CallsPerSecond uint32 + + // + ReliableMessagingMessagesDropped uint32 + + // + ReliableMessagingMessagesDroppedPerSecond uint32 + + // + ReliableMessagingSessionsFaulted uint32 + + // + ReliableMessagingSessionsFaultedPerSecond uint32 + + // + SecurityCallsNotAuthorized uint32 + + // + SecurityCallsNotAuthorizedPerSecond uint32 + + // + SecurityValidationandAuthenticationFailures uint32 + + // + SecurityValidationandAuthenticationFailuresPerSecond uint32 + + // + TransactionsFlowed uint32 + + // + TransactionsFlowedPerSecond uint32 +} + +func NewWin32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCalls sets the value of Calls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCalls(value uint32) (err error) { + return instance.SetProperty("Calls", (value)) +} + +// GetCalls gets the value of Calls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("Calls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration sets the value of CallsDuration for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsDuration(value uint32) (err error) { + return instance.SetProperty("CallsDuration", (value)) +} + +// GetCallsDuration gets the value of CallsDuration for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailed sets the value of CallsFailed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFailed(value uint32) (err error) { + return instance.SetProperty("CallsFailed", (value)) +} + +// GetCallsFailed gets the value of CallsFailed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailedPerSecond sets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFailedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFailedPerSecond", (value)) +} + +// GetCallsFailedPerSecond gets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFailedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaulted sets the value of CallsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFaulted(value uint32) (err error) { + return instance.SetProperty("CallsFaulted", (value)) +} + +// GetCallsFaulted gets the value of CallsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaultedPerSecond sets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFaultedPerSecond", (value)) +} + +// GetCallsFaultedPerSecond gets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsOutstanding sets the value of CallsOutstanding for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsOutstanding(value uint32) (err error) { + return instance.SetProperty("CallsOutstanding", (value)) +} + +// GetCallsOutstanding gets the value of CallsOutstanding for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsOutstanding() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsPerSecond sets the value of CallsPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsPerSecond", (value)) +} + +// GetCallsPerSecond gets the value of CallsPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDropped sets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingMessagesDropped(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDropped", (value)) +} + +// GetReliableMessagingMessagesDropped gets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingMessagesDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDroppedPerSecond sets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingMessagesDroppedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDroppedPerSecond", (value)) +} + +// GetReliableMessagingMessagesDroppedPerSecond gets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingMessagesDroppedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDroppedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaulted sets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingSessionsFaulted(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaulted", (value)) +} + +// GetReliableMessagingSessionsFaulted gets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingSessionsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaultedPerSecond sets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingSessionsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaultedPerSecond", (value)) +} + +// GetReliableMessagingSessionsFaultedPerSecond gets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingSessionsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorized sets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityCallsNotAuthorized(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorized", (value)) +} + +// GetSecurityCallsNotAuthorized gets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityCallsNotAuthorized() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorized") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorizedPerSecond sets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityCallsNotAuthorizedPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorizedPerSecond", (value)) +} + +// GetSecurityCallsNotAuthorizedPerSecond gets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityCallsNotAuthorizedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorizedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailures sets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityValidationandAuthenticationFailures(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailures", (value)) +} + +// GetSecurityValidationandAuthenticationFailures gets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityValidationandAuthenticationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailuresPerSecond sets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityValidationandAuthenticationFailuresPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailuresPerSecond", (value)) +} + +// GetSecurityValidationandAuthenticationFailuresPerSecond gets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityValidationandAuthenticationFailuresPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailuresPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowed sets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyTransactionsFlowed(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowed", (value)) +} + +// GetTransactionsFlowed gets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyTransactionsFlowed() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowedPerSecond sets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyTransactionsFlowedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowedPerSecond", (value)) +} + +// GetTransactionsFlowedPerSecond gets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyTransactionsFlowedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000.go new file mode 100644 index 00000000..bef3cab4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000 struct +type Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000 struct { + *Win32_PerfFormattedData + + // + CallFailedPerSecond uint32 + + // + Calls uint32 + + // + CallsDuration uint32 + + // + CallsFailed uint32 + + // + CallsFaulted uint32 + + // + CallsFaultedPerSecond uint32 + + // + CallsOutstanding uint32 + + // + CallsPerSecond uint32 + + // + SecurityCallsNotAuthorized uint32 + + // + SecurityCallsNotAuthorizedPerSecond uint32 + + // + SecurityValidationandAuthenticationFailures uint32 + + // + SecurityValidationandAuthenticationFailuresPerSecond uint32 + + // + TransactionsFlowed uint32 + + // + TransactionsFlowedPerSecond uint32 +} + +func NewWin32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCallFailedPerSecond sets the value of CallFailedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallFailedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallFailedPerSecond", (value)) +} + +// GetCallFailedPerSecond gets the value of CallFailedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallFailedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallFailedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCalls sets the value of Calls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCalls(value uint32) (err error) { + return instance.SetProperty("Calls", (value)) +} + +// GetCalls gets the value of Calls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("Calls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration sets the value of CallsDuration for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsDuration(value uint32) (err error) { + return instance.SetProperty("CallsDuration", (value)) +} + +// GetCallsDuration gets the value of CallsDuration for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailed sets the value of CallsFailed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsFailed(value uint32) (err error) { + return instance.SetProperty("CallsFailed", (value)) +} + +// GetCallsFailed gets the value of CallsFailed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaulted sets the value of CallsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsFaulted(value uint32) (err error) { + return instance.SetProperty("CallsFaulted", (value)) +} + +// GetCallsFaulted gets the value of CallsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaultedPerSecond sets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFaultedPerSecond", (value)) +} + +// GetCallsFaultedPerSecond gets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsOutstanding sets the value of CallsOutstanding for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsOutstanding(value uint32) (err error) { + return instance.SetProperty("CallsOutstanding", (value)) +} + +// GetCallsOutstanding gets the value of CallsOutstanding for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsOutstanding() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsPerSecond sets the value of CallsPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsPerSecond", (value)) +} + +// GetCallsPerSecond gets the value of CallsPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorized sets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityCallsNotAuthorized(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorized", (value)) +} + +// GetSecurityCallsNotAuthorized gets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityCallsNotAuthorized() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorized") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorizedPerSecond sets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityCallsNotAuthorizedPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorizedPerSecond", (value)) +} + +// GetSecurityCallsNotAuthorizedPerSecond gets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityCallsNotAuthorizedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorizedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailures sets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityValidationandAuthenticationFailures(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailures", (value)) +} + +// GetSecurityValidationandAuthenticationFailures gets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityValidationandAuthenticationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailuresPerSecond sets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityValidationandAuthenticationFailuresPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailuresPerSecond", (value)) +} + +// GetSecurityValidationandAuthenticationFailuresPerSecond gets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityValidationandAuthenticationFailuresPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailuresPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowed sets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyTransactionsFlowed(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowed", (value)) +} + +// GetTransactionsFlowed gets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyTransactionsFlowed() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowedPerSecond sets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) SetPropertyTransactionsFlowedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowedPerSecond", (value)) +} + +// GetTransactionsFlowedPerSecond gets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelOperation4000) GetPropertyTransactionsFlowedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000.go new file mode 100644 index 00000000..e544336f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000.go @@ -0,0 +1,1100 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000 struct +type Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000 struct { + *Win32_PerfFormattedData + + // + Calls uint32 + + // + CallsDuration uint32 + + // + CallsFailed uint32 + + // + CallsFailedPerSecond uint32 + + // + CallsFaulted uint32 + + // + CallsFaultedPerSecond uint32 + + // + CallsOutstanding uint32 + + // + CallsPerSecond uint32 + + // + Instances uint32 + + // + InstancesCreatedPerSecond uint32 + + // + PercentOfMaxConcurrentCalls uint32 + + // + PercentOfMaxConcurrentInstances uint32 + + // + PercentOfMaxConcurrentSessions uint32 + + // + QueuedMessagesDropped uint32 + + // + QueuedMessagesDroppedPerSecond uint32 + + // + QueuedMessagesRejected uint32 + + // + QueuedMessagesRejectedPerSecond uint32 + + // + QueuedPoisonMessages uint32 + + // + QueuedPoisonMessagesPerSecond uint32 + + // + ReliableMessagingMessagesDropped uint32 + + // + ReliableMessagingMessagesDroppedPerSecond uint32 + + // + ReliableMessagingSessionsFaulted uint32 + + // + ReliableMessagingSessionsFaultedPerSecond uint32 + + // + SecurityCallsNotAuthorized uint32 + + // + SecurityCallsNotAuthorizedPerSecond uint32 + + // + SecurityValidationandAuthenticationFailures uint32 + + // + SecurityValidationandAuthenticationFailuresPerSecond uint32 + + // + TransactedOperationsAborted uint32 + + // + TransactedOperationsAbortedPerSecond uint32 + + // + TransactedOperationsCommitted uint32 + + // + TransactedOperationsCommittedPerSecond uint32 + + // + TransactedOperationsInDoubt uint32 + + // + TransactedOperationsInDoubtPerSecond uint32 + + // + TransactionsFlowed uint32 + + // + TransactionsFlowedPerSecond uint32 +} + +func NewWin32_PerfFormattedData_ServiceModel4000_ServiceModelService4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_ServiceModel4000_ServiceModelService4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCalls sets the value of Calls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCalls(value uint32) (err error) { + return instance.SetProperty("Calls", (value)) +} + +// GetCalls gets the value of Calls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("Calls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration sets the value of CallsDuration for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsDuration(value uint32) (err error) { + return instance.SetProperty("CallsDuration", (value)) +} + +// GetCallsDuration gets the value of CallsDuration for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailed sets the value of CallsFailed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFailed(value uint32) (err error) { + return instance.SetProperty("CallsFailed", (value)) +} + +// GetCallsFailed gets the value of CallsFailed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailedPerSecond sets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFailedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFailedPerSecond", (value)) +} + +// GetCallsFailedPerSecond gets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFailedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaulted sets the value of CallsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFaulted(value uint32) (err error) { + return instance.SetProperty("CallsFaulted", (value)) +} + +// GetCallsFaulted gets the value of CallsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaultedPerSecond sets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFaultedPerSecond", (value)) +} + +// GetCallsFaultedPerSecond gets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsOutstanding sets the value of CallsOutstanding for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsOutstanding(value uint32) (err error) { + return instance.SetProperty("CallsOutstanding", (value)) +} + +// GetCallsOutstanding gets the value of CallsOutstanding for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsOutstanding() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsPerSecond sets the value of CallsPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsPerSecond", (value)) +} + +// GetCallsPerSecond gets the value of CallsPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstances sets the value of Instances for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyInstances(value uint32) (err error) { + return instance.SetProperty("Instances", (value)) +} + +// GetInstances gets the value of Instances for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyInstances() (value uint32, err error) { + retValue, err := instance.GetProperty("Instances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstancesCreatedPerSecond sets the value of InstancesCreatedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyInstancesCreatedPerSecond(value uint32) (err error) { + return instance.SetProperty("InstancesCreatedPerSecond", (value)) +} + +// GetInstancesCreatedPerSecond gets the value of InstancesCreatedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyInstancesCreatedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("InstancesCreatedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentCalls sets the value of PercentOfMaxConcurrentCalls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentCalls(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentCalls", (value)) +} + +// GetPercentOfMaxConcurrentCalls gets the value of PercentOfMaxConcurrentCalls for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentInstances sets the value of PercentOfMaxConcurrentInstances for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentInstances(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentInstances", (value)) +} + +// GetPercentOfMaxConcurrentInstances gets the value of PercentOfMaxConcurrentInstances for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentInstances() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentInstances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentSessions sets the value of PercentOfMaxConcurrentSessions for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentSessions(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentSessions", (value)) +} + +// GetPercentOfMaxConcurrentSessions gets the value of PercentOfMaxConcurrentSessions for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesDropped sets the value of QueuedMessagesDropped for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesDropped(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesDropped", (value)) +} + +// GetQueuedMessagesDropped gets the value of QueuedMessagesDropped for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesDroppedPerSecond sets the value of QueuedMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesDroppedPerSecond(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesDroppedPerSecond", (value)) +} + +// GetQueuedMessagesDroppedPerSecond gets the value of QueuedMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesDroppedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesDroppedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesRejected sets the value of QueuedMessagesRejected for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesRejected(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesRejected", (value)) +} + +// GetQueuedMessagesRejected gets the value of QueuedMessagesRejected for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesRejected() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesRejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesRejectedPerSecond sets the value of QueuedMessagesRejectedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesRejectedPerSecond(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesRejectedPerSecond", (value)) +} + +// GetQueuedMessagesRejectedPerSecond gets the value of QueuedMessagesRejectedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesRejectedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesRejectedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedPoisonMessages sets the value of QueuedPoisonMessages for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedPoisonMessages(value uint32) (err error) { + return instance.SetProperty("QueuedPoisonMessages", (value)) +} + +// GetQueuedPoisonMessages gets the value of QueuedPoisonMessages for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedPoisonMessages() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedPoisonMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedPoisonMessagesPerSecond sets the value of QueuedPoisonMessagesPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedPoisonMessagesPerSecond(value uint32) (err error) { + return instance.SetProperty("QueuedPoisonMessagesPerSecond", (value)) +} + +// GetQueuedPoisonMessagesPerSecond gets the value of QueuedPoisonMessagesPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedPoisonMessagesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedPoisonMessagesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDropped sets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingMessagesDropped(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDropped", (value)) +} + +// GetReliableMessagingMessagesDropped gets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingMessagesDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDroppedPerSecond sets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingMessagesDroppedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDroppedPerSecond", (value)) +} + +// GetReliableMessagingMessagesDroppedPerSecond gets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingMessagesDroppedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDroppedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaulted sets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingSessionsFaulted(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaulted", (value)) +} + +// GetReliableMessagingSessionsFaulted gets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingSessionsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaultedPerSecond sets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingSessionsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaultedPerSecond", (value)) +} + +// GetReliableMessagingSessionsFaultedPerSecond gets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingSessionsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorized sets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityCallsNotAuthorized(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorized", (value)) +} + +// GetSecurityCallsNotAuthorized gets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityCallsNotAuthorized() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorized") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorizedPerSecond sets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityCallsNotAuthorizedPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorizedPerSecond", (value)) +} + +// GetSecurityCallsNotAuthorizedPerSecond gets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityCallsNotAuthorizedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorizedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailures sets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityValidationandAuthenticationFailures(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailures", (value)) +} + +// GetSecurityValidationandAuthenticationFailures gets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityValidationandAuthenticationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailuresPerSecond sets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityValidationandAuthenticationFailuresPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailuresPerSecond", (value)) +} + +// GetSecurityValidationandAuthenticationFailuresPerSecond gets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityValidationandAuthenticationFailuresPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailuresPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsAborted sets the value of TransactedOperationsAborted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsAborted(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsAborted", (value)) +} + +// GetTransactedOperationsAborted gets the value of TransactedOperationsAborted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsAborted() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsAborted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsAbortedPerSecond sets the value of TransactedOperationsAbortedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsAbortedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsAbortedPerSecond", (value)) +} + +// GetTransactedOperationsAbortedPerSecond gets the value of TransactedOperationsAbortedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsAbortedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsAbortedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsCommitted sets the value of TransactedOperationsCommitted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsCommitted(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsCommitted", (value)) +} + +// GetTransactedOperationsCommitted gets the value of TransactedOperationsCommitted for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsCommitted() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsCommittedPerSecond sets the value of TransactedOperationsCommittedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsCommittedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsCommittedPerSecond", (value)) +} + +// GetTransactedOperationsCommittedPerSecond gets the value of TransactedOperationsCommittedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsCommittedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsCommittedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsInDoubt sets the value of TransactedOperationsInDoubt for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsInDoubt(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsInDoubt", (value)) +} + +// GetTransactedOperationsInDoubt gets the value of TransactedOperationsInDoubt for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsInDoubt() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsInDoubt") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsInDoubtPerSecond sets the value of TransactedOperationsInDoubtPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsInDoubtPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsInDoubtPerSecond", (value)) +} + +// GetTransactedOperationsInDoubtPerSecond gets the value of TransactedOperationsInDoubtPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsInDoubtPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsInDoubtPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowed sets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactionsFlowed(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowed", (value)) +} + +// GetTransactionsFlowed gets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactionsFlowed() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowedPerSecond sets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactionsFlowedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowedPerSecond", (value)) +} + +// GetTransactionsFlowedPerSecond gets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfFormattedData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactionsFlowedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Spooler_PrintQueue.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Spooler_PrintQueue.go new file mode 100644 index 00000000..086b994b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Spooler_PrintQueue.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Spooler_PrintQueue struct +type Win32_PerfFormattedData_Spooler_PrintQueue struct { + *Win32_PerfFormattedData + + // + AddNetworkPrinterCalls uint32 + + // + BytesPrintedPersec uint64 + + // + EnumerateNetworkPrinterCalls uint32 + + // + JobErrors uint32 + + // + Jobs uint32 + + // + JobsSpooling uint32 + + // + MaxJobsSpooling uint32 + + // + MaxReferences uint32 + + // + NotReadyErrors uint32 + + // + OutofPaperErrors uint32 + + // + References uint32 + + // + TotalJobsPrinted uint32 + + // + TotalPagesPrinted uint32 +} + +func NewWin32_PerfFormattedData_Spooler_PrintQueueEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Spooler_PrintQueue, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Spooler_PrintQueue{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Spooler_PrintQueueEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Spooler_PrintQueue, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Spooler_PrintQueue{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAddNetworkPrinterCalls sets the value of AddNetworkPrinterCalls for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyAddNetworkPrinterCalls(value uint32) (err error) { + return instance.SetProperty("AddNetworkPrinterCalls", (value)) +} + +// GetAddNetworkPrinterCalls gets the value of AddNetworkPrinterCalls for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyAddNetworkPrinterCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("AddNetworkPrinterCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesPrintedPersec sets the value of BytesPrintedPersec for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyBytesPrintedPersec(value uint64) (err error) { + return instance.SetProperty("BytesPrintedPersec", (value)) +} + +// GetBytesPrintedPersec gets the value of BytesPrintedPersec for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyBytesPrintedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPrintedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEnumerateNetworkPrinterCalls sets the value of EnumerateNetworkPrinterCalls for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyEnumerateNetworkPrinterCalls(value uint32) (err error) { + return instance.SetProperty("EnumerateNetworkPrinterCalls", (value)) +} + +// GetEnumerateNetworkPrinterCalls gets the value of EnumerateNetworkPrinterCalls for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyEnumerateNetworkPrinterCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerateNetworkPrinterCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobErrors sets the value of JobErrors for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyJobErrors(value uint32) (err error) { + return instance.SetProperty("JobErrors", (value)) +} + +// GetJobErrors gets the value of JobErrors for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyJobErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("JobErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobs sets the value of Jobs for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyJobs(value uint32) (err error) { + return instance.SetProperty("Jobs", (value)) +} + +// GetJobs gets the value of Jobs for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyJobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Jobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobsSpooling sets the value of JobsSpooling for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyJobsSpooling(value uint32) (err error) { + return instance.SetProperty("JobsSpooling", (value)) +} + +// GetJobsSpooling gets the value of JobsSpooling for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyJobsSpooling() (value uint32, err error) { + retValue, err := instance.GetProperty("JobsSpooling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxJobsSpooling sets the value of MaxJobsSpooling for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyMaxJobsSpooling(value uint32) (err error) { + return instance.SetProperty("MaxJobsSpooling", (value)) +} + +// GetMaxJobsSpooling gets the value of MaxJobsSpooling for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyMaxJobsSpooling() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxJobsSpooling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxReferences sets the value of MaxReferences for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyMaxReferences(value uint32) (err error) { + return instance.SetProperty("MaxReferences", (value)) +} + +// GetMaxReferences gets the value of MaxReferences for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyMaxReferences() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxReferences") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNotReadyErrors sets the value of NotReadyErrors for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyNotReadyErrors(value uint32) (err error) { + return instance.SetProperty("NotReadyErrors", (value)) +} + +// GetNotReadyErrors gets the value of NotReadyErrors for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyNotReadyErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("NotReadyErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutofPaperErrors sets the value of OutofPaperErrors for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyOutofPaperErrors(value uint32) (err error) { + return instance.SetProperty("OutofPaperErrors", (value)) +} + +// GetOutofPaperErrors gets the value of OutofPaperErrors for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyOutofPaperErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("OutofPaperErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReferences sets the value of References for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyReferences(value uint32) (err error) { + return instance.SetProperty("References", (value)) +} + +// GetReferences gets the value of References for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyReferences() (value uint32, err error) { + retValue, err := instance.GetProperty("References") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalJobsPrinted sets the value of TotalJobsPrinted for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyTotalJobsPrinted(value uint32) (err error) { + return instance.SetProperty("TotalJobsPrinted", (value)) +} + +// GetTotalJobsPrinted gets the value of TotalJobsPrinted for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyTotalJobsPrinted() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalJobsPrinted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalPagesPrinted sets the value of TotalPagesPrinted for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) SetPropertyTotalPagesPrinted(value uint32) (err error) { + return instance.SetProperty("TotalPagesPrinted", (value)) +} + +// GetTotalPagesPrinted gets the value of TotalPagesPrinted for the instance +func (instance *Win32_PerfFormattedData_Spooler_PrintQueue) GetPropertyTotalPagesPrinted() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalPagesPrinted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX.go new file mode 100644 index 00000000..4edfa0ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX.go @@ -0,0 +1,770 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX struct +type Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX struct { + *Win32_PerfFormattedData + + // + Averagebytesperread uint64 + + // + Averagebytesperrequest uint64 + + // + Averagebytesperwrite uint64 + + // + Averagequeuelength uint64 + + // + Averagereadqueuelength uint64 + + // + AverageSharedVHDXdisklogsize uint64 + + // + AverageSharedVHDXdisktotalsize uint64 + + // + AverageSharedVHDXmounttime uint32 + + // + Averagetimeperread uint32 + + // + Averagetimeperrequest uint32 + + // + Averagetimeperwrite uint32 + + // + Averagewritequeuelength uint64 + + // + Currentqueuelength uint32 + + // + Currentreadqueuelength uint32 + + // + Currentwritequeuelength uint32 + + // + Errorspersecond uint64 + + // + InitiatorHandleOpenspersecond uint32 + + // + ReadBytesPersec uint64 + + // + ReadRequestsPersec uint32 + + // + SharedVHDXMountspersecond uint32 + + // + TotalBytesPersec uint64 + + // + TotalRequestsPersec uint32 + + // + WriteRequestsPersec uint32 + + // + WrittenBytesPersec uint64 +} + +func NewWin32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDXEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDXEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAveragebytesperread sets the value of Averagebytesperread for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperread(value uint64) (err error) { + return instance.SetProperty("Averagebytesperread", (value)) +} + +// GetAveragebytesperread gets the value of Averagebytesperread for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperread() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagebytesperread") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragebytesperrequest sets the value of Averagebytesperrequest for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperrequest(value uint64) (err error) { + return instance.SetProperty("Averagebytesperrequest", (value)) +} + +// GetAveragebytesperrequest gets the value of Averagebytesperrequest for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperrequest() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagebytesperrequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragebytesperwrite sets the value of Averagebytesperwrite for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperwrite(value uint64) (err error) { + return instance.SetProperty("Averagebytesperwrite", (value)) +} + +// GetAveragebytesperwrite gets the value of Averagebytesperwrite for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperwrite() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagebytesperwrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragequeuelength sets the value of Averagequeuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragequeuelength(value uint64) (err error) { + return instance.SetProperty("Averagequeuelength", (value)) +} + +// GetAveragequeuelength gets the value of Averagequeuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragequeuelength() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagequeuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragereadqueuelength sets the value of Averagereadqueuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragereadqueuelength(value uint64) (err error) { + return instance.SetProperty("Averagereadqueuelength", (value)) +} + +// GetAveragereadqueuelength gets the value of Averagereadqueuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragereadqueuelength() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagereadqueuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageSharedVHDXdisklogsize sets the value of AverageSharedVHDXdisklogsize for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXdisklogsize(value uint64) (err error) { + return instance.SetProperty("AverageSharedVHDXdisklogsize", (value)) +} + +// GetAverageSharedVHDXdisklogsize gets the value of AverageSharedVHDXdisklogsize for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXdisklogsize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXdisklogsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageSharedVHDXdisktotalsize sets the value of AverageSharedVHDXdisktotalsize for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXdisktotalsize(value uint64) (err error) { + return instance.SetProperty("AverageSharedVHDXdisktotalsize", (value)) +} + +// GetAverageSharedVHDXdisktotalsize gets the value of AverageSharedVHDXdisktotalsize for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXdisktotalsize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXdisktotalsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageSharedVHDXmounttime sets the value of AverageSharedVHDXmounttime for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXmounttime(value uint32) (err error) { + return instance.SetProperty("AverageSharedVHDXmounttime", (value)) +} + +// GetAverageSharedVHDXmounttime gets the value of AverageSharedVHDXmounttime for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXmounttime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXmounttime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperread sets the value of Averagetimeperread for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperread(value uint32) (err error) { + return instance.SetProperty("Averagetimeperread", (value)) +} + +// GetAveragetimeperread gets the value of Averagetimeperread for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperread() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperread") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperrequest sets the value of Averagetimeperrequest for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperrequest(value uint32) (err error) { + return instance.SetProperty("Averagetimeperrequest", (value)) +} + +// GetAveragetimeperrequest gets the value of Averagetimeperrequest for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperrequest() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperrequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperwrite sets the value of Averagetimeperwrite for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperwrite(value uint32) (err error) { + return instance.SetProperty("Averagetimeperwrite", (value)) +} + +// GetAveragetimeperwrite gets the value of Averagetimeperwrite for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperwrite() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperwrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragewritequeuelength sets the value of Averagewritequeuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragewritequeuelength(value uint64) (err error) { + return instance.SetProperty("Averagewritequeuelength", (value)) +} + +// GetAveragewritequeuelength gets the value of Averagewritequeuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragewritequeuelength() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagewritequeuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentqueuelength sets the value of Currentqueuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyCurrentqueuelength(value uint32) (err error) { + return instance.SetProperty("Currentqueuelength", (value)) +} + +// GetCurrentqueuelength gets the value of Currentqueuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyCurrentqueuelength() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentqueuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentreadqueuelength sets the value of Currentreadqueuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyCurrentreadqueuelength(value uint32) (err error) { + return instance.SetProperty("Currentreadqueuelength", (value)) +} + +// GetCurrentreadqueuelength gets the value of Currentreadqueuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyCurrentreadqueuelength() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentreadqueuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentwritequeuelength sets the value of Currentwritequeuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyCurrentwritequeuelength(value uint32) (err error) { + return instance.SetProperty("Currentwritequeuelength", (value)) +} + +// GetCurrentwritequeuelength gets the value of Currentwritequeuelength for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyCurrentwritequeuelength() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentwritequeuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorspersecond sets the value of Errorspersecond for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyErrorspersecond(value uint64) (err error) { + return instance.SetProperty("Errorspersecond", (value)) +} + +// GetErrorspersecond gets the value of Errorspersecond for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyErrorspersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Errorspersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInitiatorHandleOpenspersecond sets the value of InitiatorHandleOpenspersecond for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyInitiatorHandleOpenspersecond(value uint32) (err error) { + return instance.SetProperty("InitiatorHandleOpenspersecond", (value)) +} + +// GetInitiatorHandleOpenspersecond gets the value of InitiatorHandleOpenspersecond for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyInitiatorHandleOpenspersecond() (value uint32, err error) { + retValue, err := instance.GetProperty("InitiatorHandleOpenspersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSharedVHDXMountspersecond sets the value of SharedVHDXMountspersecond for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertySharedVHDXMountspersecond(value uint32) (err error) { + return instance.SetProperty("SharedVHDXMountspersecond", (value)) +} + +// GetSharedVHDXMountspersecond gets the value of SharedVHDXMountspersecond for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertySharedVHDXMountspersecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SharedVHDXMountspersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalBytesPersec sets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyTotalBytesPersec(value uint64) (err error) { + return instance.SetProperty("TotalBytesPersec", (value)) +} + +// GetTotalBytesPersec gets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyTotalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalRequestsPersec sets the value of TotalRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyTotalRequestsPersec(value uint32) (err error) { + return instance.SetProperty("TotalRequestsPersec", (value)) +} + +// GetTotalRequestsPersec gets the value of TotalRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyTotalRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWrittenBytesPersec sets the value of WrittenBytesPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyWrittenBytesPersec(value uint64) (err error) { + return instance.SetProperty("WrittenBytesPersec", (value)) +} + +// GetWrittenBytesPersec gets the value of WrittenBytesPersec for the instance +func (instance *Win32_PerfFormattedData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyWrittenBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WrittenBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go new file mode 100644 index 00000000..8834eda1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement struct +type Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement struct { + *Win32_PerfFormattedData + + // + ResourcesVMsrunningRemoteFX uint64 + + // + VRAMAvailableMBperGPU uint64 + + // + VRAMReservedPercentperGPU uint64 +} + +func NewWin32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagementEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetResourcesVMsrunningRemoteFX sets the value of ResourcesVMsrunningRemoteFX for the instance +func (instance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyResourcesVMsrunningRemoteFX(value uint64) (err error) { + return instance.SetProperty("ResourcesVMsrunningRemoteFX", (value)) +} + +// GetResourcesVMsrunningRemoteFX gets the value of ResourcesVMsrunningRemoteFX for the instance +func (instance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyResourcesVMsrunningRemoteFX() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourcesVMsrunningRemoteFX") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVRAMAvailableMBperGPU sets the value of VRAMAvailableMBperGPU for the instance +func (instance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyVRAMAvailableMBperGPU(value uint64) (err error) { + return instance.SetProperty("VRAMAvailableMBperGPU", (value)) +} + +// GetVRAMAvailableMBperGPU gets the value of VRAMAvailableMBperGPU for the instance +func (instance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyVRAMAvailableMBperGPU() (value uint64, err error) { + retValue, err := instance.GetProperty("VRAMAvailableMBperGPU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVRAMReservedPercentperGPU sets the value of VRAMReservedPercentperGPU for the instance +func (instance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyVRAMReservedPercentperGPU(value uint64) (err error) { + return instance.SetProperty("VRAMReservedPercentperGPU", (value)) +} + +// GetVRAMReservedPercentperGPU gets the value of VRAMReservedPercentperGPU for the instance +func (instance *Win32_PerfFormattedData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyVRAMReservedPercentperGPU() (value uint64, err error) { + retValue, err := instance.GetProperty("VRAMReservedPercentperGPU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics.go new file mode 100644 index 00000000..2fa001a6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics struct +type Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics struct { + *Win32_PerfFormattedData + + // + Deniedconnectorsendrequestsinlowpowermode uint32 + + // + IPv4NBLsindicatedwithlowresourceflag uint32 + + // + IPv4NBLsindicatedwithoutprevalidation uint32 + + // + IPv4NBLsPersecindicatedwithlowresourceflag uint32 + + // + IPv4NBLsPersecindicatedwithoutprevalidation uint32 + + // + IPv4NBLsPersectreatedasnonprevalidated uint32 + + // + IPv4NBLstreatedasnonprevalidated uint32 + + // + IPv4outboundNBLsnotprocessedviafastpath uint32 + + // + IPv4outboundNBLsPersecnotprocessedviafastpath uint32 + + // + IPv6NBLsindicatedwithlowresourceflag uint32 + + // + IPv6NBLsindicatedwithoutprevalidation uint32 + + // + IPv6NBLsPersecindicatedwithlowresourceflag uint32 + + // + IPv6NBLsPersecindicatedwithoutprevalidation uint32 + + // + IPv6NBLsPersectreatedasnonprevalidated uint32 + + // + IPv6NBLstreatedasnonprevalidated uint32 + + // + IPv6outboundNBLsnotprocessedviafastpath uint32 + + // + IPv6outboundNBLsPersecnotprocessedviafastpath uint32 + + // + RSCsegmentforwardingfailuresduringsoftwaresegmentation uint32 + + // + RSCsegmentsforwardedviaLSO uint32 + + // + RSCsegmentsforwardedviasoftwaresegmentation uint32 + + // + RSCsegmentsforwardedviasoftwaresegmentationandchecksum uint32 + + // + TCPchecksumerrors uint32 + + // + TCPconnectrequestsfallenoffloopbackfastpath uint32 + + // + TCPconnectrequestsPersecfallenoffloopbackfastpath uint32 + + // + TCPinboundsegmentsnotprocessedviafastpath uint32 + + // + TCPinboundsegmentsPersecnotprocessedviafastpath uint32 + + // + TCPtimeouts uint32 +} + +func NewWin32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDeniedconnectorsendrequestsinlowpowermode sets the value of Deniedconnectorsendrequestsinlowpowermode for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyDeniedconnectorsendrequestsinlowpowermode(value uint32) (err error) { + return instance.SetProperty("Deniedconnectorsendrequestsinlowpowermode", (value)) +} + +// GetDeniedconnectorsendrequestsinlowpowermode gets the value of Deniedconnectorsendrequestsinlowpowermode for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyDeniedconnectorsendrequestsinlowpowermode() (value uint32, err error) { + retValue, err := instance.GetProperty("Deniedconnectorsendrequestsinlowpowermode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsindicatedwithlowresourceflag sets the value of IPv4NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsindicatedwithlowresourceflag", (value)) +} + +// GetIPv4NBLsindicatedwithlowresourceflag gets the value of IPv4NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsindicatedwithoutprevalidation sets the value of IPv4NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsindicatedwithoutprevalidation", (value)) +} + +// GetIPv4NBLsindicatedwithoutprevalidation gets the value of IPv4NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsPersecindicatedwithlowresourceflag sets the value of IPv4NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsPersecindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsPersecindicatedwithlowresourceflag", (value)) +} + +// GetIPv4NBLsPersecindicatedwithlowresourceflag gets the value of IPv4NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsPersecindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsPersecindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsPersecindicatedwithoutprevalidation sets the value of IPv4NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsPersecindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsPersecindicatedwithoutprevalidation", (value)) +} + +// GetIPv4NBLsPersecindicatedwithoutprevalidation gets the value of IPv4NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsPersecindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsPersecindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsPersectreatedasnonprevalidated sets the value of IPv4NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsPersectreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsPersectreatedasnonprevalidated", (value)) +} + +// GetIPv4NBLsPersectreatedasnonprevalidated gets the value of IPv4NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsPersectreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsPersectreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLstreatedasnonprevalidated sets the value of IPv4NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLstreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv4NBLstreatedasnonprevalidated", (value)) +} + +// GetIPv4NBLstreatedasnonprevalidated gets the value of IPv4NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLstreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLstreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4outboundNBLsnotprocessedviafastpath sets the value of IPv4outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4outboundNBLsnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv4outboundNBLsnotprocessedviafastpath", (value)) +} + +// GetIPv4outboundNBLsnotprocessedviafastpath gets the value of IPv4outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4outboundNBLsnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4outboundNBLsnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4outboundNBLsPersecnotprocessedviafastpath sets the value of IPv4outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4outboundNBLsPersecnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv4outboundNBLsPersecnotprocessedviafastpath", (value)) +} + +// GetIPv4outboundNBLsPersecnotprocessedviafastpath gets the value of IPv4outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4outboundNBLsPersecnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4outboundNBLsPersecnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsindicatedwithlowresourceflag sets the value of IPv6NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsindicatedwithlowresourceflag", (value)) +} + +// GetIPv6NBLsindicatedwithlowresourceflag gets the value of IPv6NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsindicatedwithoutprevalidation sets the value of IPv6NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsindicatedwithoutprevalidation", (value)) +} + +// GetIPv6NBLsindicatedwithoutprevalidation gets the value of IPv6NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsPersecindicatedwithlowresourceflag sets the value of IPv6NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsPersecindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsPersecindicatedwithlowresourceflag", (value)) +} + +// GetIPv6NBLsPersecindicatedwithlowresourceflag gets the value of IPv6NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsPersecindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsPersecindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsPersecindicatedwithoutprevalidation sets the value of IPv6NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsPersecindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsPersecindicatedwithoutprevalidation", (value)) +} + +// GetIPv6NBLsPersecindicatedwithoutprevalidation gets the value of IPv6NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsPersecindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsPersecindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsPersectreatedasnonprevalidated sets the value of IPv6NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsPersectreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsPersectreatedasnonprevalidated", (value)) +} + +// GetIPv6NBLsPersectreatedasnonprevalidated gets the value of IPv6NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsPersectreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsPersectreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLstreatedasnonprevalidated sets the value of IPv6NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLstreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv6NBLstreatedasnonprevalidated", (value)) +} + +// GetIPv6NBLstreatedasnonprevalidated gets the value of IPv6NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLstreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLstreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6outboundNBLsnotprocessedviafastpath sets the value of IPv6outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6outboundNBLsnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv6outboundNBLsnotprocessedviafastpath", (value)) +} + +// GetIPv6outboundNBLsnotprocessedviafastpath gets the value of IPv6outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6outboundNBLsnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6outboundNBLsnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6outboundNBLsPersecnotprocessedviafastpath sets the value of IPv6outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6outboundNBLsPersecnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv6outboundNBLsPersecnotprocessedviafastpath", (value)) +} + +// GetIPv6outboundNBLsPersecnotprocessedviafastpath gets the value of IPv6outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6outboundNBLsPersecnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6outboundNBLsPersecnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentforwardingfailuresduringsoftwaresegmentation sets the value of RSCsegmentforwardingfailuresduringsoftwaresegmentation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentforwardingfailuresduringsoftwaresegmentation(value uint32) (err error) { + return instance.SetProperty("RSCsegmentforwardingfailuresduringsoftwaresegmentation", (value)) +} + +// GetRSCsegmentforwardingfailuresduringsoftwaresegmentation gets the value of RSCsegmentforwardingfailuresduringsoftwaresegmentation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentforwardingfailuresduringsoftwaresegmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentforwardingfailuresduringsoftwaresegmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentsforwardedviaLSO sets the value of RSCsegmentsforwardedviaLSO for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentsforwardedviaLSO(value uint32) (err error) { + return instance.SetProperty("RSCsegmentsforwardedviaLSO", (value)) +} + +// GetRSCsegmentsforwardedviaLSO gets the value of RSCsegmentsforwardedviaLSO for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentsforwardedviaLSO() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentsforwardedviaLSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentsforwardedviasoftwaresegmentation sets the value of RSCsegmentsforwardedviasoftwaresegmentation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentsforwardedviasoftwaresegmentation(value uint32) (err error) { + return instance.SetProperty("RSCsegmentsforwardedviasoftwaresegmentation", (value)) +} + +// GetRSCsegmentsforwardedviasoftwaresegmentation gets the value of RSCsegmentsforwardedviasoftwaresegmentation for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentsforwardedviasoftwaresegmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentsforwardedviasoftwaresegmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentsforwardedviasoftwaresegmentationandchecksum sets the value of RSCsegmentsforwardedviasoftwaresegmentationandchecksum for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentsforwardedviasoftwaresegmentationandchecksum(value uint32) (err error) { + return instance.SetProperty("RSCsegmentsforwardedviasoftwaresegmentationandchecksum", (value)) +} + +// GetRSCsegmentsforwardedviasoftwaresegmentationandchecksum gets the value of RSCsegmentsforwardedviasoftwaresegmentationandchecksum for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentsforwardedviasoftwaresegmentationandchecksum() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentsforwardedviasoftwaresegmentationandchecksum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPchecksumerrors sets the value of TCPchecksumerrors for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPchecksumerrors(value uint32) (err error) { + return instance.SetProperty("TCPchecksumerrors", (value)) +} + +// GetTCPchecksumerrors gets the value of TCPchecksumerrors for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPchecksumerrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPchecksumerrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPconnectrequestsfallenoffloopbackfastpath sets the value of TCPconnectrequestsfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPconnectrequestsfallenoffloopbackfastpath(value uint32) (err error) { + return instance.SetProperty("TCPconnectrequestsfallenoffloopbackfastpath", (value)) +} + +// GetTCPconnectrequestsfallenoffloopbackfastpath gets the value of TCPconnectrequestsfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPconnectrequestsfallenoffloopbackfastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPconnectrequestsfallenoffloopbackfastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPconnectrequestsPersecfallenoffloopbackfastpath sets the value of TCPconnectrequestsPersecfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPconnectrequestsPersecfallenoffloopbackfastpath(value uint32) (err error) { + return instance.SetProperty("TCPconnectrequestsPersecfallenoffloopbackfastpath", (value)) +} + +// GetTCPconnectrequestsPersecfallenoffloopbackfastpath gets the value of TCPconnectrequestsPersecfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPconnectrequestsPersecfallenoffloopbackfastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPconnectrequestsPersecfallenoffloopbackfastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPinboundsegmentsnotprocessedviafastpath sets the value of TCPinboundsegmentsnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPinboundsegmentsnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("TCPinboundsegmentsnotprocessedviafastpath", (value)) +} + +// GetTCPinboundsegmentsnotprocessedviafastpath gets the value of TCPinboundsegmentsnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPinboundsegmentsnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPinboundsegmentsnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPinboundsegmentsPersecnotprocessedviafastpath sets the value of TCPinboundsegmentsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPinboundsegmentsPersecnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("TCPinboundsegmentsPersecnotprocessedviafastpath", (value)) +} + +// GetTCPinboundsegmentsPersecnotprocessedviafastpath gets the value of TCPinboundsegmentsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPinboundsegmentsPersecnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPinboundsegmentsPersecnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPtimeouts sets the value of TCPtimeouts for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPtimeouts(value uint32) (err error) { + return instance.SetProperty("TCPtimeouts", (value)) +} + +// GetTCPtimeouts gets the value of TCPtimeouts for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPtimeouts() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPtimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go new file mode 100644 index 00000000..1ed4806a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU struct +type Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU struct { + *Win32_PerfFormattedData + + // + TCPcurrentconnections uint32 +} + +func NewWin32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPUEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPUEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTCPcurrentconnections sets the value of TCPcurrentconnections for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU) SetPropertyTCPcurrentconnections(value uint32) (err error) { + return instance.SetProperty("TCPcurrentconnections", (value)) +} + +// GetTCPcurrentconnections gets the value of TCPcurrentconnections for the instance +func (instance *Win32_PerfFormattedData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU) GetPropertyTCPcurrentconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPcurrentconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMP.go new file mode 100644 index 00000000..ae730737 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMP.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_ICMP struct +type Win32_PerfFormattedData_Tcpip_ICMP struct { + *Win32_PerfFormattedData + + // + MessagesOutboundErrors uint32 + + // + MessagesPersec uint32 + + // + MessagesReceivedErrors uint32 + + // + MessagesReceivedPersec uint32 + + // + MessagesSentPersec uint32 + + // + ReceivedAddressMask uint32 + + // + ReceivedAddressMaskReply uint32 + + // + ReceivedDestUnreachable uint32 + + // + ReceivedEchoPersec uint32 + + // + ReceivedEchoReplyPersec uint32 + + // + ReceivedParameterProblem uint32 + + // + ReceivedRedirectPersec uint32 + + // + ReceivedSourceQuench uint32 + + // + ReceivedTimeExceeded uint32 + + // + ReceivedTimestampPersec uint32 + + // + ReceivedTimestampReplyPersec uint32 + + // + SentAddressMask uint32 + + // + SentAddressMaskReply uint32 + + // + SentDestinationUnreachable uint32 + + // + SentEchoPersec uint32 + + // + SentEchoReplyPersec uint32 + + // + SentParameterProblem uint32 + + // + SentRedirectPersec uint32 + + // + SentSourceQuench uint32 + + // + SentTimeExceeded uint32 + + // + SentTimestampPersec uint32 + + // + SentTimestampReplyPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_ICMPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_ICMP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_ICMP{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_ICMPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_ICMP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_ICMP{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMessagesOutboundErrors sets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyMessagesOutboundErrors(value uint32) (err error) { + return instance.SetProperty("MessagesOutboundErrors", (value)) +} + +// GetMessagesOutboundErrors gets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyMessagesOutboundErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesPersec sets the value of MessagesPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyMessagesPersec(value uint32) (err error) { + return instance.SetProperty("MessagesPersec", (value)) +} + +// GetMessagesPersec gets the value of MessagesPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyMessagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedErrors sets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyMessagesReceivedErrors(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedErrors", (value)) +} + +// GetMessagesReceivedErrors gets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyMessagesReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedPersec sets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyMessagesReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedPersec", (value)) +} + +// GetMessagesReceivedPersec gets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyMessagesReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyMessagesSentPersec(value uint32) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyMessagesSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedAddressMask sets the value of ReceivedAddressMask for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedAddressMask(value uint32) (err error) { + return instance.SetProperty("ReceivedAddressMask", (value)) +} + +// GetReceivedAddressMask gets the value of ReceivedAddressMask for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedAddressMask() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedAddressMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedAddressMaskReply sets the value of ReceivedAddressMaskReply for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedAddressMaskReply(value uint32) (err error) { + return instance.SetProperty("ReceivedAddressMaskReply", (value)) +} + +// GetReceivedAddressMaskReply gets the value of ReceivedAddressMaskReply for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedAddressMaskReply() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedAddressMaskReply") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedDestUnreachable sets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedDestUnreachable(value uint32) (err error) { + return instance.SetProperty("ReceivedDestUnreachable", (value)) +} + +// GetReceivedDestUnreachable gets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedDestUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedDestUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoPersec sets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedEchoPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoPersec", (value)) +} + +// GetReceivedEchoPersec gets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoReplyPersec sets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoReplyPersec", (value)) +} + +// GetReceivedEchoReplyPersec gets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedParameterProblem sets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedParameterProblem(value uint32) (err error) { + return instance.SetProperty("ReceivedParameterProblem", (value)) +} + +// GetReceivedParameterProblem gets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRedirectPersec sets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedRedirectPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedRedirectPersec", (value)) +} + +// GetReceivedRedirectPersec gets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedSourceQuench sets the value of ReceivedSourceQuench for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedSourceQuench(value uint32) (err error) { + return instance.SetProperty("ReceivedSourceQuench", (value)) +} + +// GetReceivedSourceQuench gets the value of ReceivedSourceQuench for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedSourceQuench() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedSourceQuench") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimeExceeded sets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedTimeExceeded(value uint32) (err error) { + return instance.SetProperty("ReceivedTimeExceeded", (value)) +} + +// GetReceivedTimeExceeded gets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimestampPersec sets the value of ReceivedTimestampPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedTimestampPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedTimestampPersec", (value)) +} + +// GetReceivedTimestampPersec gets the value of ReceivedTimestampPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedTimestampPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimestampPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimestampReplyPersec sets the value of ReceivedTimestampReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertyReceivedTimestampReplyPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedTimestampReplyPersec", (value)) +} + +// GetReceivedTimestampReplyPersec gets the value of ReceivedTimestampReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertyReceivedTimestampReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimestampReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentAddressMask sets the value of SentAddressMask for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentAddressMask(value uint32) (err error) { + return instance.SetProperty("SentAddressMask", (value)) +} + +// GetSentAddressMask gets the value of SentAddressMask for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentAddressMask() (value uint32, err error) { + retValue, err := instance.GetProperty("SentAddressMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentAddressMaskReply sets the value of SentAddressMaskReply for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentAddressMaskReply(value uint32) (err error) { + return instance.SetProperty("SentAddressMaskReply", (value)) +} + +// GetSentAddressMaskReply gets the value of SentAddressMaskReply for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentAddressMaskReply() (value uint32, err error) { + retValue, err := instance.GetProperty("SentAddressMaskReply") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentDestinationUnreachable sets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentDestinationUnreachable(value uint32) (err error) { + return instance.SetProperty("SentDestinationUnreachable", (value)) +} + +// GetSentDestinationUnreachable gets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentDestinationUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("SentDestinationUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoPersec sets the value of SentEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentEchoPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoPersec", (value)) +} + +// GetSentEchoPersec gets the value of SentEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoReplyPersec sets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoReplyPersec", (value)) +} + +// GetSentEchoReplyPersec gets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentParameterProblem sets the value of SentParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentParameterProblem(value uint32) (err error) { + return instance.SetProperty("SentParameterProblem", (value)) +} + +// GetSentParameterProblem gets the value of SentParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("SentParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRedirectPersec sets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentRedirectPersec(value uint32) (err error) { + return instance.SetProperty("SentRedirectPersec", (value)) +} + +// GetSentRedirectPersec gets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentSourceQuench sets the value of SentSourceQuench for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentSourceQuench(value uint32) (err error) { + return instance.SetProperty("SentSourceQuench", (value)) +} + +// GetSentSourceQuench gets the value of SentSourceQuench for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentSourceQuench() (value uint32, err error) { + retValue, err := instance.GetProperty("SentSourceQuench") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimeExceeded sets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentTimeExceeded(value uint32) (err error) { + return instance.SetProperty("SentTimeExceeded", (value)) +} + +// GetSentTimeExceeded gets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimestampPersec sets the value of SentTimestampPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentTimestampPersec(value uint32) (err error) { + return instance.SetProperty("SentTimestampPersec", (value)) +} + +// GetSentTimestampPersec gets the value of SentTimestampPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentTimestampPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimestampPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimestampReplyPersec sets the value of SentTimestampReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) SetPropertySentTimestampReplyPersec(value uint32) (err error) { + return instance.SetProperty("SentTimestampReplyPersec", (value)) +} + +// GetSentTimestampReplyPersec gets the value of SentTimestampReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMP) GetPropertySentTimestampReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimestampReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMPv6.go new file mode 100644 index 00000000..7d79f063 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_ICMPv6.go @@ -0,0 +1,1040 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_ICMPv6 struct +type Win32_PerfFormattedData_Tcpip_ICMPv6 struct { + *Win32_PerfFormattedData + + // + MessagesOutboundErrors uint32 + + // + MessagesPersec uint32 + + // + MessagesReceivedErrors uint32 + + // + MessagesReceivedPersec uint32 + + // + MessagesSentPersec uint32 + + // + ReceivedDestUnreachable uint32 + + // + ReceivedEchoPersec uint32 + + // + ReceivedEchoReplyPersec uint32 + + // + ReceivedMembershipQuery uint32 + + // + ReceivedMembershipReduction uint32 + + // + ReceivedMembershipReport uint32 + + // + ReceivedNeighborAdvert uint32 + + // + ReceivedNeighborSolicit uint32 + + // + ReceivedPacketTooBig uint32 + + // + ReceivedParameterProblem uint32 + + // + ReceivedRedirectPersec uint32 + + // + ReceivedRouterAdvert uint32 + + // + ReceivedRouterSolicit uint32 + + // + ReceivedTimeExceeded uint32 + + // + SentDestinationUnreachable uint32 + + // + SentEchoPersec uint32 + + // + SentEchoReplyPersec uint32 + + // + SentMembershipQuery uint32 + + // + SentMembershipReduction uint32 + + // + SentMembershipReport uint32 + + // + SentNeighborAdvert uint32 + + // + SentNeighborSolicit uint32 + + // + SentPacketTooBig uint32 + + // + SentParameterProblem uint32 + + // + SentRedirectPersec uint32 + + // + SentRouterAdvert uint32 + + // + SentRouterSolicit uint32 + + // + SentTimeExceeded uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_ICMPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_ICMPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_ICMPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_ICMPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_ICMPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_ICMPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetMessagesOutboundErrors sets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyMessagesOutboundErrors(value uint32) (err error) { + return instance.SetProperty("MessagesOutboundErrors", (value)) +} + +// GetMessagesOutboundErrors gets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyMessagesOutboundErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesPersec sets the value of MessagesPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyMessagesPersec(value uint32) (err error) { + return instance.SetProperty("MessagesPersec", (value)) +} + +// GetMessagesPersec gets the value of MessagesPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyMessagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedErrors sets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyMessagesReceivedErrors(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedErrors", (value)) +} + +// GetMessagesReceivedErrors gets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyMessagesReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedPersec sets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyMessagesReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedPersec", (value)) +} + +// GetMessagesReceivedPersec gets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyMessagesReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyMessagesSentPersec(value uint32) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyMessagesSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedDestUnreachable sets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedDestUnreachable(value uint32) (err error) { + return instance.SetProperty("ReceivedDestUnreachable", (value)) +} + +// GetReceivedDestUnreachable gets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedDestUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedDestUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoPersec sets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedEchoPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoPersec", (value)) +} + +// GetReceivedEchoPersec gets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoReplyPersec sets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoReplyPersec", (value)) +} + +// GetReceivedEchoReplyPersec gets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedMembershipQuery sets the value of ReceivedMembershipQuery for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedMembershipQuery(value uint32) (err error) { + return instance.SetProperty("ReceivedMembershipQuery", (value)) +} + +// GetReceivedMembershipQuery gets the value of ReceivedMembershipQuery for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedMembershipQuery() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedMembershipQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedMembershipReduction sets the value of ReceivedMembershipReduction for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedMembershipReduction(value uint32) (err error) { + return instance.SetProperty("ReceivedMembershipReduction", (value)) +} + +// GetReceivedMembershipReduction gets the value of ReceivedMembershipReduction for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedMembershipReduction() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedMembershipReduction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedMembershipReport sets the value of ReceivedMembershipReport for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedMembershipReport(value uint32) (err error) { + return instance.SetProperty("ReceivedMembershipReport", (value)) +} + +// GetReceivedMembershipReport gets the value of ReceivedMembershipReport for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedMembershipReport() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedMembershipReport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedNeighborAdvert sets the value of ReceivedNeighborAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedNeighborAdvert(value uint32) (err error) { + return instance.SetProperty("ReceivedNeighborAdvert", (value)) +} + +// GetReceivedNeighborAdvert gets the value of ReceivedNeighborAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedNeighborAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedNeighborAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedNeighborSolicit sets the value of ReceivedNeighborSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedNeighborSolicit(value uint32) (err error) { + return instance.SetProperty("ReceivedNeighborSolicit", (value)) +} + +// GetReceivedNeighborSolicit gets the value of ReceivedNeighborSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedNeighborSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedNeighborSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedPacketTooBig sets the value of ReceivedPacketTooBig for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedPacketTooBig(value uint32) (err error) { + return instance.SetProperty("ReceivedPacketTooBig", (value)) +} + +// GetReceivedPacketTooBig gets the value of ReceivedPacketTooBig for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedPacketTooBig() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedPacketTooBig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedParameterProblem sets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedParameterProblem(value uint32) (err error) { + return instance.SetProperty("ReceivedParameterProblem", (value)) +} + +// GetReceivedParameterProblem gets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRedirectPersec sets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedRedirectPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedRedirectPersec", (value)) +} + +// GetReceivedRedirectPersec gets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRouterAdvert sets the value of ReceivedRouterAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedRouterAdvert(value uint32) (err error) { + return instance.SetProperty("ReceivedRouterAdvert", (value)) +} + +// GetReceivedRouterAdvert gets the value of ReceivedRouterAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedRouterAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRouterAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRouterSolicit sets the value of ReceivedRouterSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedRouterSolicit(value uint32) (err error) { + return instance.SetProperty("ReceivedRouterSolicit", (value)) +} + +// GetReceivedRouterSolicit gets the value of ReceivedRouterSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedRouterSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRouterSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimeExceeded sets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertyReceivedTimeExceeded(value uint32) (err error) { + return instance.SetProperty("ReceivedTimeExceeded", (value)) +} + +// GetReceivedTimeExceeded gets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertyReceivedTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentDestinationUnreachable sets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentDestinationUnreachable(value uint32) (err error) { + return instance.SetProperty("SentDestinationUnreachable", (value)) +} + +// GetSentDestinationUnreachable gets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentDestinationUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("SentDestinationUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoPersec sets the value of SentEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentEchoPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoPersec", (value)) +} + +// GetSentEchoPersec gets the value of SentEchoPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoReplyPersec sets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoReplyPersec", (value)) +} + +// GetSentEchoReplyPersec gets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentMembershipQuery sets the value of SentMembershipQuery for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentMembershipQuery(value uint32) (err error) { + return instance.SetProperty("SentMembershipQuery", (value)) +} + +// GetSentMembershipQuery gets the value of SentMembershipQuery for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentMembershipQuery() (value uint32, err error) { + retValue, err := instance.GetProperty("SentMembershipQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentMembershipReduction sets the value of SentMembershipReduction for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentMembershipReduction(value uint32) (err error) { + return instance.SetProperty("SentMembershipReduction", (value)) +} + +// GetSentMembershipReduction gets the value of SentMembershipReduction for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentMembershipReduction() (value uint32, err error) { + retValue, err := instance.GetProperty("SentMembershipReduction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentMembershipReport sets the value of SentMembershipReport for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentMembershipReport(value uint32) (err error) { + return instance.SetProperty("SentMembershipReport", (value)) +} + +// GetSentMembershipReport gets the value of SentMembershipReport for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentMembershipReport() (value uint32, err error) { + retValue, err := instance.GetProperty("SentMembershipReport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentNeighborAdvert sets the value of SentNeighborAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentNeighborAdvert(value uint32) (err error) { + return instance.SetProperty("SentNeighborAdvert", (value)) +} + +// GetSentNeighborAdvert gets the value of SentNeighborAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentNeighborAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("SentNeighborAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentNeighborSolicit sets the value of SentNeighborSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentNeighborSolicit(value uint32) (err error) { + return instance.SetProperty("SentNeighborSolicit", (value)) +} + +// GetSentNeighborSolicit gets the value of SentNeighborSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentNeighborSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("SentNeighborSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentPacketTooBig sets the value of SentPacketTooBig for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentPacketTooBig(value uint32) (err error) { + return instance.SetProperty("SentPacketTooBig", (value)) +} + +// GetSentPacketTooBig gets the value of SentPacketTooBig for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentPacketTooBig() (value uint32, err error) { + retValue, err := instance.GetProperty("SentPacketTooBig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentParameterProblem sets the value of SentParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentParameterProblem(value uint32) (err error) { + return instance.SetProperty("SentParameterProblem", (value)) +} + +// GetSentParameterProblem gets the value of SentParameterProblem for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("SentParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRedirectPersec sets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentRedirectPersec(value uint32) (err error) { + return instance.SetProperty("SentRedirectPersec", (value)) +} + +// GetSentRedirectPersec gets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRouterAdvert sets the value of SentRouterAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentRouterAdvert(value uint32) (err error) { + return instance.SetProperty("SentRouterAdvert", (value)) +} + +// GetSentRouterAdvert gets the value of SentRouterAdvert for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentRouterAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRouterAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRouterSolicit sets the value of SentRouterSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentRouterSolicit(value uint32) (err error) { + return instance.SetProperty("SentRouterSolicit", (value)) +} + +// GetSentRouterSolicit gets the value of SentRouterSolicit for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentRouterSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRouterSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimeExceeded sets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) SetPropertySentTimeExceeded(value uint32) (err error) { + return instance.SetProperty("SentTimeExceeded", (value)) +} + +// GetSentTimeExceeded gets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_ICMPv6) GetPropertySentTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv4.go new file mode 100644 index 00000000..769e29d9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv4.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_IPv4 struct +type Win32_PerfFormattedData_Tcpip_IPv4 struct { + *Win32_PerfFormattedData + + // + DatagramsForwardedPersec uint32 + + // + DatagramsOutboundDiscarded uint32 + + // + DatagramsOutboundNoRoute uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedAddressErrors uint32 + + // + DatagramsReceivedDeliveredPersec uint32 + + // + DatagramsReceivedDiscarded uint32 + + // + DatagramsReceivedHeaderErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsReceivedUnknownProtocol uint32 + + // + DatagramsSentPersec uint32 + + // + FragmentationFailures uint32 + + // + FragmentedDatagramsPersec uint32 + + // + FragmentReassemblyFailures uint32 + + // + FragmentsCreatedPersec uint32 + + // + FragmentsReassembledPersec uint32 + + // + FragmentsReceivedPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_IPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_IPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_IPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_IPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_IPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_IPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatagramsForwardedPersec sets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsForwardedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsForwardedPersec", (value)) +} + +// GetDatagramsForwardedPersec gets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsForwardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundDiscarded sets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsOutboundDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundDiscarded", (value)) +} + +// GetDatagramsOutboundDiscarded gets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsOutboundDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundNoRoute sets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsOutboundNoRoute(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundNoRoute", (value)) +} + +// GetDatagramsOutboundNoRoute gets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsOutboundNoRoute() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundNoRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedAddressErrors sets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsReceivedAddressErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedAddressErrors", (value)) +} + +// GetDatagramsReceivedAddressErrors gets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsReceivedAddressErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedAddressErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDeliveredPersec sets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsReceivedDeliveredPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDeliveredPersec", (value)) +} + +// GetDatagramsReceivedDeliveredPersec gets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsReceivedDeliveredPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDeliveredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDiscarded sets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsReceivedDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDiscarded", (value)) +} + +// GetDatagramsReceivedDiscarded gets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsReceivedDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedHeaderErrors sets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsReceivedHeaderErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedHeaderErrors", (value)) +} + +// GetDatagramsReceivedHeaderErrors gets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsReceivedHeaderErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedHeaderErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedUnknownProtocol sets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsReceivedUnknownProtocol(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedUnknownProtocol", (value)) +} + +// GetDatagramsReceivedUnknownProtocol gets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsReceivedUnknownProtocol() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedUnknownProtocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentationFailures sets the value of FragmentationFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyFragmentationFailures(value uint32) (err error) { + return instance.SetProperty("FragmentationFailures", (value)) +} + +// GetFragmentationFailures gets the value of FragmentationFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyFragmentationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentedDatagramsPersec sets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyFragmentedDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("FragmentedDatagramsPersec", (value)) +} + +// GetFragmentedDatagramsPersec gets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyFragmentedDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentedDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentReassemblyFailures sets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyFragmentReassemblyFailures(value uint32) (err error) { + return instance.SetProperty("FragmentReassemblyFailures", (value)) +} + +// GetFragmentReassemblyFailures gets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyFragmentReassemblyFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentReassemblyFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsCreatedPersec sets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyFragmentsCreatedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsCreatedPersec", (value)) +} + +// GetFragmentsCreatedPersec gets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyFragmentsCreatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsCreatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReassembledPersec sets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyFragmentsReassembledPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReassembledPersec", (value)) +} + +// GetFragmentsReassembledPersec gets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyFragmentsReassembledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReassembledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReceivedPersec sets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) SetPropertyFragmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReceivedPersec", (value)) +} + +// GetFragmentsReceivedPersec gets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv4) GetPropertyFragmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv6.go new file mode 100644 index 00000000..c8de4fe7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_IPv6.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_IPv6 struct +type Win32_PerfFormattedData_Tcpip_IPv6 struct { + *Win32_PerfFormattedData + + // + DatagramsForwardedPersec uint32 + + // + DatagramsOutboundDiscarded uint32 + + // + DatagramsOutboundNoRoute uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedAddressErrors uint32 + + // + DatagramsReceivedDeliveredPersec uint32 + + // + DatagramsReceivedDiscarded uint32 + + // + DatagramsReceivedHeaderErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsReceivedUnknownProtocol uint32 + + // + DatagramsSentPersec uint32 + + // + FragmentationFailures uint32 + + // + FragmentedDatagramsPersec uint32 + + // + FragmentReassemblyFailures uint32 + + // + FragmentsCreatedPersec uint32 + + // + FragmentsReassembledPersec uint32 + + // + FragmentsReceivedPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_IPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_IPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_IPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_IPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_IPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_IPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatagramsForwardedPersec sets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsForwardedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsForwardedPersec", (value)) +} + +// GetDatagramsForwardedPersec gets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsForwardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundDiscarded sets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsOutboundDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundDiscarded", (value)) +} + +// GetDatagramsOutboundDiscarded gets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsOutboundDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundNoRoute sets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsOutboundNoRoute(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundNoRoute", (value)) +} + +// GetDatagramsOutboundNoRoute gets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsOutboundNoRoute() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundNoRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedAddressErrors sets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsReceivedAddressErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedAddressErrors", (value)) +} + +// GetDatagramsReceivedAddressErrors gets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsReceivedAddressErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedAddressErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDeliveredPersec sets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsReceivedDeliveredPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDeliveredPersec", (value)) +} + +// GetDatagramsReceivedDeliveredPersec gets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsReceivedDeliveredPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDeliveredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDiscarded sets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsReceivedDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDiscarded", (value)) +} + +// GetDatagramsReceivedDiscarded gets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsReceivedDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedHeaderErrors sets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsReceivedHeaderErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedHeaderErrors", (value)) +} + +// GetDatagramsReceivedHeaderErrors gets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsReceivedHeaderErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedHeaderErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedUnknownProtocol sets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsReceivedUnknownProtocol(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedUnknownProtocol", (value)) +} + +// GetDatagramsReceivedUnknownProtocol gets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsReceivedUnknownProtocol() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedUnknownProtocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentationFailures sets the value of FragmentationFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyFragmentationFailures(value uint32) (err error) { + return instance.SetProperty("FragmentationFailures", (value)) +} + +// GetFragmentationFailures gets the value of FragmentationFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyFragmentationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentedDatagramsPersec sets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyFragmentedDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("FragmentedDatagramsPersec", (value)) +} + +// GetFragmentedDatagramsPersec gets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyFragmentedDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentedDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentReassemblyFailures sets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyFragmentReassemblyFailures(value uint32) (err error) { + return instance.SetProperty("FragmentReassemblyFailures", (value)) +} + +// GetFragmentReassemblyFailures gets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyFragmentReassemblyFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentReassemblyFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsCreatedPersec sets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyFragmentsCreatedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsCreatedPersec", (value)) +} + +// GetFragmentsCreatedPersec gets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyFragmentsCreatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsCreatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReassembledPersec sets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyFragmentsReassembledPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReassembledPersec", (value)) +} + +// GetFragmentsReassembledPersec gets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyFragmentsReassembledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReassembledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReceivedPersec sets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) SetPropertyFragmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReceivedPersec", (value)) +} + +// GetFragmentsReceivedPersec gets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_IPv6) GetPropertyFragmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NBTConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NBTConnection.go new file mode 100644 index 00000000..0fd4f7b0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NBTConnection.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_NBTConnection struct +type Win32_PerfFormattedData_Tcpip_NBTConnection struct { + *Win32_PerfFormattedData + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTotalPersec uint64 +} + +func NewWin32_PerfFormattedData_Tcpip_NBTConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_NBTConnection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_NBTConnection{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_NBTConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_NBTConnection, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_NBTConnection{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NBTConnection) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NBTConnection) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NBTConnection) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NBTConnection) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NBTConnection) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NBTConnection) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkAdapter.go new file mode 100644 index 00000000..cbc78dca --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkAdapter.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_NetworkAdapter struct +type Win32_PerfFormattedData_Tcpip_NetworkAdapter struct { + *Win32_PerfFormattedData + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTotalPersec uint64 + + // + CurrentBandwidth uint64 + + // + OffloadedConnections uint64 + + // + OutputQueueLength uint64 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedNonUnicastPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsReceivedUnicastPersec uint64 + + // + PacketsReceivedUnknown uint64 + + // + PacketsSentNonUnicastPersec uint64 + + // + PacketsSentPersec uint64 + + // + PacketsSentUnicastPersec uint64 + + // + TCPActiveRSCConnections uint64 + + // + TCPRSCAveragePacketSize uint64 + + // + TCPRSCCoalescedPacketsPersec uint64 + + // + TCPRSCExceptionsPersec uint64 +} + +func NewWin32_PerfFormattedData_Tcpip_NetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_NetworkAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_NetworkAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_NetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_NetworkAdapter, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_NetworkAdapter{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentBandwidth sets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyCurrentBandwidth(value uint64) (err error) { + return instance.SetProperty("CurrentBandwidth", (value)) +} + +// GetCurrentBandwidth gets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyCurrentBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOffloadedConnections sets the value of OffloadedConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyOffloadedConnections(value uint64) (err error) { + return instance.SetProperty("OffloadedConnections", (value)) +} + +// GetOffloadedConnections gets the value of OffloadedConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyOffloadedConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("OffloadedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutputQueueLength sets the value of OutputQueueLength for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyOutputQueueLength(value uint64) (err error) { + return instance.SetProperty("OutputQueueLength", (value)) +} + +// GetOutputQueueLength gets the value of OutputQueueLength for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyOutputQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("OutputQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedNonUnicastPersec sets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedNonUnicastPersec", (value)) +} + +// GetPacketsReceivedNonUnicastPersec gets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnicastPersec sets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnicastPersec", (value)) +} + +// GetPacketsReceivedUnicastPersec gets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnknown sets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedUnknown(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnknown", (value)) +} + +// GetPacketsReceivedUnknown gets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentNonUnicastPersec sets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsSentNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentNonUnicastPersec", (value)) +} + +// GetPacketsSentNonUnicastPersec gets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsSentNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentUnicastPersec sets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyPacketsSentUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentUnicastPersec", (value)) +} + +// GetPacketsSentUnicastPersec gets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyPacketsSentUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPActiveRSCConnections sets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyTCPActiveRSCConnections(value uint64) (err error) { + return instance.SetProperty("TCPActiveRSCConnections", (value)) +} + +// GetTCPActiveRSCConnections gets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyTCPActiveRSCConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPActiveRSCConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCAveragePacketSize sets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyTCPRSCAveragePacketSize(value uint64) (err error) { + return instance.SetProperty("TCPRSCAveragePacketSize", (value)) +} + +// GetTCPRSCAveragePacketSize gets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyTCPRSCAveragePacketSize() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCAveragePacketSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCCoalescedPacketsPersec sets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyTCPRSCCoalescedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCCoalescedPacketsPersec", (value)) +} + +// GetTCPRSCCoalescedPacketsPersec gets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyTCPRSCCoalescedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCCoalescedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCExceptionsPersec sets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) SetPropertyTCPRSCExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCExceptionsPersec", (value)) +} + +// GetTCPRSCExceptionsPersec gets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkAdapter) GetPropertyTCPRSCExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkInterface.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkInterface.go new file mode 100644 index 00000000..52eb81c6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_NetworkInterface.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_NetworkInterface struct +type Win32_PerfFormattedData_Tcpip_NetworkInterface struct { + *Win32_PerfFormattedData + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTotalPersec uint64 + + // + CurrentBandwidth uint64 + + // + OffloadedConnections uint64 + + // + OutputQueueLength uint64 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedNonUnicastPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsReceivedUnicastPersec uint64 + + // + PacketsReceivedUnknown uint64 + + // + PacketsSentNonUnicastPersec uint64 + + // + PacketsSentPersec uint64 + + // + PacketsSentUnicastPersec uint64 + + // + TCPActiveRSCConnections uint64 + + // + TCPRSCAveragePacketSize uint64 + + // + TCPRSCCoalescedPacketsPersec uint64 + + // + TCPRSCExceptionsPersec uint64 +} + +func NewWin32_PerfFormattedData_Tcpip_NetworkInterfaceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_NetworkInterface, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_NetworkInterface{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_NetworkInterfaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_NetworkInterface, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_NetworkInterface{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentBandwidth sets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyCurrentBandwidth(value uint64) (err error) { + return instance.SetProperty("CurrentBandwidth", (value)) +} + +// GetCurrentBandwidth gets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyCurrentBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOffloadedConnections sets the value of OffloadedConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyOffloadedConnections(value uint64) (err error) { + return instance.SetProperty("OffloadedConnections", (value)) +} + +// GetOffloadedConnections gets the value of OffloadedConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyOffloadedConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("OffloadedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutputQueueLength sets the value of OutputQueueLength for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyOutputQueueLength(value uint64) (err error) { + return instance.SetProperty("OutputQueueLength", (value)) +} + +// GetOutputQueueLength gets the value of OutputQueueLength for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyOutputQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("OutputQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedNonUnicastPersec sets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedNonUnicastPersec", (value)) +} + +// GetPacketsReceivedNonUnicastPersec gets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnicastPersec sets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnicastPersec", (value)) +} + +// GetPacketsReceivedUnicastPersec gets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnknown sets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedUnknown(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnknown", (value)) +} + +// GetPacketsReceivedUnknown gets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentNonUnicastPersec sets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsSentNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentNonUnicastPersec", (value)) +} + +// GetPacketsSentNonUnicastPersec gets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsSentNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentUnicastPersec sets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyPacketsSentUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentUnicastPersec", (value)) +} + +// GetPacketsSentUnicastPersec gets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyPacketsSentUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPActiveRSCConnections sets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyTCPActiveRSCConnections(value uint64) (err error) { + return instance.SetProperty("TCPActiveRSCConnections", (value)) +} + +// GetTCPActiveRSCConnections gets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyTCPActiveRSCConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPActiveRSCConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCAveragePacketSize sets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyTCPRSCAveragePacketSize(value uint64) (err error) { + return instance.SetProperty("TCPRSCAveragePacketSize", (value)) +} + +// GetTCPRSCAveragePacketSize gets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyTCPRSCAveragePacketSize() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCAveragePacketSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCCoalescedPacketsPersec sets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyTCPRSCCoalescedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCCoalescedPacketsPersec", (value)) +} + +// GetTCPRSCCoalescedPacketsPersec gets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyTCPRSCCoalescedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCCoalescedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCExceptionsPersec sets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) SetPropertyTCPRSCExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCExceptionsPersec", (value)) +} + +// GetTCPRSCExceptionsPersec gets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_NetworkInterface) GetPropertyTCPRSCExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv4.go new file mode 100644 index 00000000..cab412d7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv4.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_TCPv4 struct +type Win32_PerfFormattedData_Tcpip_TCPv4 struct { + *Win32_PerfFormattedData + + // + ConnectionFailures uint32 + + // + ConnectionsActive uint32 + + // + ConnectionsEstablished uint32 + + // + ConnectionsPassive uint32 + + // + ConnectionsReset uint32 + + // + SegmentsPersec uint32 + + // + SegmentsReceivedPersec uint32 + + // + SegmentsRetransmittedPersec uint32 + + // + SegmentsSentPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_TCPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_TCPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_TCPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_TCPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_TCPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_TCPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetConnectionFailures sets the value of ConnectionFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertyConnectionFailures(value uint32) (err error) { + return instance.SetProperty("ConnectionFailures", (value)) +} + +// GetConnectionFailures gets the value of ConnectionFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertyConnectionFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsActive sets the value of ConnectionsActive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertyConnectionsActive(value uint32) (err error) { + return instance.SetProperty("ConnectionsActive", (value)) +} + +// GetConnectionsActive gets the value of ConnectionsActive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertyConnectionsActive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsPassive sets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertyConnectionsPassive(value uint32) (err error) { + return instance.SetProperty("ConnectionsPassive", (value)) +} + +// GetConnectionsPassive gets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertyConnectionsPassive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsPassive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsReset sets the value of ConnectionsReset for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertyConnectionsReset(value uint32) (err error) { + return instance.SetProperty("ConnectionsReset", (value)) +} + +// GetConnectionsReset gets the value of ConnectionsReset for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertyConnectionsReset() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsPersec sets the value of SegmentsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertySegmentsPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsPersec", (value)) +} + +// GetSegmentsPersec gets the value of SegmentsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertySegmentsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsReceivedPersec sets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertySegmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsReceivedPersec", (value)) +} + +// GetSegmentsReceivedPersec gets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertySegmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsRetransmittedPersec sets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertySegmentsRetransmittedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsRetransmittedPersec", (value)) +} + +// GetSegmentsRetransmittedPersec gets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertySegmentsRetransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsRetransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsSentPersec sets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) SetPropertySegmentsSentPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsSentPersec", (value)) +} + +// GetSegmentsSentPersec gets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv4) GetPropertySegmentsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv6.go new file mode 100644 index 00000000..4847b5b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_TCPv6.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_TCPv6 struct +type Win32_PerfFormattedData_Tcpip_TCPv6 struct { + *Win32_PerfFormattedData + + // + ConnectionFailures uint32 + + // + ConnectionsActive uint32 + + // + ConnectionsEstablished uint32 + + // + ConnectionsPassive uint32 + + // + ConnectionsReset uint32 + + // + SegmentsPersec uint32 + + // + SegmentsReceivedPersec uint32 + + // + SegmentsRetransmittedPersec uint32 + + // + SegmentsSentPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_TCPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_TCPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_TCPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_TCPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_TCPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_TCPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetConnectionFailures sets the value of ConnectionFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertyConnectionFailures(value uint32) (err error) { + return instance.SetProperty("ConnectionFailures", (value)) +} + +// GetConnectionFailures gets the value of ConnectionFailures for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertyConnectionFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsActive sets the value of ConnectionsActive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertyConnectionsActive(value uint32) (err error) { + return instance.SetProperty("ConnectionsActive", (value)) +} + +// GetConnectionsActive gets the value of ConnectionsActive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertyConnectionsActive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsPassive sets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertyConnectionsPassive(value uint32) (err error) { + return instance.SetProperty("ConnectionsPassive", (value)) +} + +// GetConnectionsPassive gets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertyConnectionsPassive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsPassive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsReset sets the value of ConnectionsReset for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertyConnectionsReset(value uint32) (err error) { + return instance.SetProperty("ConnectionsReset", (value)) +} + +// GetConnectionsReset gets the value of ConnectionsReset for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertyConnectionsReset() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsPersec sets the value of SegmentsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertySegmentsPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsPersec", (value)) +} + +// GetSegmentsPersec gets the value of SegmentsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertySegmentsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsReceivedPersec sets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertySegmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsReceivedPersec", (value)) +} + +// GetSegmentsReceivedPersec gets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertySegmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsRetransmittedPersec sets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertySegmentsRetransmittedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsRetransmittedPersec", (value)) +} + +// GetSegmentsRetransmittedPersec gets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertySegmentsRetransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsRetransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsSentPersec sets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) SetPropertySegmentsSentPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsSentPersec", (value)) +} + +// GetSegmentsSentPersec gets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_TCPv6) GetPropertySegmentsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv4.go new file mode 100644 index 00000000..876232d6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv4.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_UDPv4 struct +type Win32_PerfFormattedData_Tcpip_UDPv4 struct { + *Win32_PerfFormattedData + + // + DatagramsNoPortPersec uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsSentPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_UDPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_UDPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_UDPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_UDPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_UDPv4, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_UDPv4{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatagramsNoPortPersec sets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) SetPropertyDatagramsNoPortPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsNoPortPersec", (value)) +} + +// GetDatagramsNoPortPersec gets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) GetPropertyDatagramsNoPortPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsNoPortPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedErrors sets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) SetPropertyDatagramsReceivedErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedErrors", (value)) +} + +// GetDatagramsReceivedErrors gets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) GetPropertyDatagramsReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv4) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv6.go new file mode 100644 index 00000000..6822c1b8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_Tcpip_UDPv6.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_Tcpip_UDPv6 struct +type Win32_PerfFormattedData_Tcpip_UDPv6 struct { + *Win32_PerfFormattedData + + // + DatagramsNoPortPersec uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsSentPersec uint32 +} + +func NewWin32_PerfFormattedData_Tcpip_UDPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_Tcpip_UDPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_UDPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_Tcpip_UDPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_Tcpip_UDPv6, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_Tcpip_UDPv6{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetDatagramsNoPortPersec sets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) SetPropertyDatagramsNoPortPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsNoPortPersec", (value)) +} + +// GetDatagramsNoPortPersec gets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) GetPropertyDatagramsNoPortPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsNoPortPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedErrors sets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) SetPropertyDatagramsReceivedErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedErrors", (value)) +} + +// GetDatagramsReceivedErrors gets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) GetPropertyDatagramsReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfFormattedData_Tcpip_UDPv6) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TermService_TerminalServicesSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TermService_TerminalServicesSession.go new file mode 100644 index 00000000..45b3b42e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_TermService_TerminalServicesSession.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_TermService_TerminalServicesSession struct +type Win32_PerfFormattedData_TermService_TerminalServicesSession struct { + *Win32_PerfFormattedData + + // + HandleCount uint32 + + // + PageFaultsPersec uint32 + + // + PageFileBytes uint64 + + // + PageFileBytesPeak uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PoolNonpagedBytes uint32 + + // + PoolPagedBytes uint32 + + // + PrivateBytes uint64 + + // + ThreadCount uint32 + + // + VirtualBytes uint64 + + // + VirtualBytesPeak uint64 + + // + WorkingSet uint64 + + // + WorkingSetPeak uint64 +} + +func NewWin32_PerfFormattedData_TermService_TerminalServicesSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_TermService_TerminalServicesSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_TermService_TerminalServicesSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_TermService_TerminalServicesSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_TermService_TerminalServicesSession, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_TermService_TerminalServicesSession{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileBytes sets the value of PageFileBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPageFileBytes(value uint64) (err error) { + return instance.SetProperty("PageFileBytes", (value)) +} + +// GetPageFileBytes gets the value of PageFileBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPageFileBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileBytesPeak sets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPageFileBytesPeak(value uint64) (err error) { + return instance.SetProperty("PageFileBytesPeak", (value)) +} + +// GetPageFileBytesPeak gets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPageFileBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivateBytes sets the value of PrivateBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyPrivateBytes(value uint64) (err error) { + return instance.SetProperty("PrivateBytes", (value)) +} + +// GetPrivateBytes gets the value of PrivateBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyPrivateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualBytes sets the value of VirtualBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyVirtualBytes(value uint64) (err error) { + return instance.SetProperty("VirtualBytes", (value)) +} + +// GetVirtualBytes gets the value of VirtualBytes for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyVirtualBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualBytesPeak sets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyVirtualBytesPeak(value uint64) (err error) { + return instance.SetProperty("VirtualBytesPeak", (value)) +} + +// GetVirtualBytesPeak gets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyVirtualBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSet sets the value of WorkingSet for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyWorkingSet(value uint64) (err error) { + return instance.SetProperty("WorkingSet", (value)) +} + +// GetWorkingSet gets the value of WorkingSet for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyWorkingSet() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPeak sets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) SetPropertyWorkingSetPeak(value uint64) (err error) { + return instance.SetProperty("WorkingSetPeak", (value)) +} + +// GetWorkingSetPeak gets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfFormattedData_TermService_TerminalServicesSession) GetPropertyWorkingSetPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go new file mode 100644 index 00000000..63e14dfc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO struct +type Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO struct { + *Win32_PerfFormattedData + + // + ReceiveMessageQuotaExceeded uint64 + + // + ReceiveQoSConformantMessagesPersec uint64 + + // + ReceiveQoSExemptMessagesPersec uint64 + + // + ReceiveQoSNonConformantMessagesPersec uint64 + + // + ReceiveQoSTotalMessageDelayTime100ns uint64 +} + +func NewWin32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIOEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetReceiveMessageQuotaExceeded sets the value of ReceiveMessageQuotaExceeded for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveMessageQuotaExceeded(value uint64) (err error) { + return instance.SetProperty("ReceiveMessageQuotaExceeded", (value)) +} + +// GetReceiveMessageQuotaExceeded gets the value of ReceiveMessageQuotaExceeded for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveMessageQuotaExceeded() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveMessageQuotaExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSConformantMessagesPersec sets the value of ReceiveQoSConformantMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSConformantMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSConformantMessagesPersec", (value)) +} + +// GetReceiveQoSConformantMessagesPersec gets the value of ReceiveQoSConformantMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSConformantMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSConformantMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSExemptMessagesPersec sets the value of ReceiveQoSExemptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSExemptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSExemptMessagesPersec", (value)) +} + +// GetReceiveQoSExemptMessagesPersec gets the value of ReceiveQoSExemptMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSExemptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSExemptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSNonConformantMessagesPersec sets the value of ReceiveQoSNonConformantMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSNonConformantMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSNonConformantMessagesPersec", (value)) +} + +// GetReceiveQoSNonConformantMessagesPersec gets the value of ReceiveQoSNonConformantMessagesPersec for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSNonConformantMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSNonConformantMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSTotalMessageDelayTime100ns sets the value of ReceiveQoSTotalMessageDelayTime100ns for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSTotalMessageDelayTime100ns(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSTotalMessageDelayTime100ns", (value)) +} + +// GetReceiveQoSTotalMessageDelayTime100ns gets the value of ReceiveQoSTotalMessageDelayTime100ns for the instance +func (instance *Win32_PerfFormattedData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSTotalMessageDelayTime100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSTotalMessageDelayTime100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB.go new file mode 100644 index 00000000..dc4ba947 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB struct +type Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB struct { + *Win32_PerfFormattedData + + // + AvgsecPerRequest uint32 + + // + CurrentOpenFileCount uint32 + + // + CurrentPendingRequests uint32 + + // + DirectMappedPages uint64 + + // + DirectMappedSections uint32 + + // + FlushRequestsPersec uint32 + + // + ReadBytesPersec uint64 + + // + ReadBytesPersecRDMA uint64 + + // + ReadRequestsPersec uint32 + + // + ReadRequestsPersecRDMA uint32 + + // + ReceivedBytesPersec uint64 + + // + RequestsPersec uint32 + + // + SentBytesPersec uint64 + + // + TreeConnectCount uint32 + + // + WriteBytesPersec uint64 + + // + WriteBytesPersecRDMA uint64 + + // + WriteRequestsPersec uint32 + + // + WriteRequestsPersecRDMA uint32 +} + +func NewWin32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMBEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMBEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgsecPerRequest sets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyAvgsecPerRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest", (value)) +} + +// GetAvgsecPerRequest gets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyAvgsecPerRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentOpenFileCount sets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyCurrentOpenFileCount(value uint32) (err error) { + return instance.SetProperty("CurrentOpenFileCount", (value)) +} + +// GetCurrentOpenFileCount gets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyCurrentOpenFileCount() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentPendingRequests sets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyCurrentPendingRequests(value uint32) (err error) { + return instance.SetProperty("CurrentPendingRequests", (value)) +} + +// GetCurrentPendingRequests gets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyCurrentPendingRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentPendingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirectMappedPages sets the value of DirectMappedPages for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyDirectMappedPages(value uint64) (err error) { + return instance.SetProperty("DirectMappedPages", (value)) +} + +// GetDirectMappedPages gets the value of DirectMappedPages for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyDirectMappedPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectMappedPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectMappedSections sets the value of DirectMappedSections for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyDirectMappedSections(value uint32) (err error) { + return instance.SetProperty("DirectMappedSections", (value)) +} + +// GetDirectMappedSections gets the value of DirectMappedSections for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyDirectMappedSections() (value uint32, err error) { + retValue, err := instance.GetProperty("DirectMappedSections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushRequestsPersec sets the value of FlushRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyFlushRequestsPersec(value uint32) (err error) { + return instance.SetProperty("FlushRequestsPersec", (value)) +} + +// GetFlushRequestsPersec gets the value of FlushRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyFlushRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FlushRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersecRDMA sets the value of ReadBytesPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadBytesPersecRDMA(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersecRDMA", (value)) +} + +// GetReadBytesPersecRDMA gets the value of ReadBytesPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadBytesPersecRDMA() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequestsPersecRDMA sets the value of ReadRequestsPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadRequestsPersecRDMA(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersecRDMA", (value)) +} + +// GetReadRequestsPersecRDMA gets the value of ReadRequestsPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadRequestsPersecRDMA() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedBytesPersec sets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReceivedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedBytesPersec", (value)) +} + +// GetReceivedBytesPersec gets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReceivedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestsPersec sets the value of RequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyRequestsPersec(value uint32) (err error) { + return instance.SetProperty("RequestsPersec", (value)) +} + +// GetRequestsPersec gets the value of RequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentBytesPersec sets the value of SentBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertySentBytesPersec(value uint64) (err error) { + return instance.SetProperty("SentBytesPersec", (value)) +} + +// GetSentBytesPersec gets the value of SentBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertySentBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeConnectCount sets the value of TreeConnectCount for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyTreeConnectCount(value uint32) (err error) { + return instance.SetProperty("TreeConnectCount", (value)) +} + +// GetTreeConnectCount gets the value of TreeConnectCount for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyTreeConnectCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TreeConnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersecRDMA sets the value of WriteBytesPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteBytesPersecRDMA(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersecRDMA", (value)) +} + +// GetWriteBytesPersecRDMA gets the value of WriteBytesPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteBytesPersecRDMA() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequestsPersecRDMA sets the value of WriteRequestsPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteRequestsPersecRDMA(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersecRDMA", (value)) +} + +// GetWriteRequestsPersecRDMA gets the value of WriteRequestsPersecRDMA for the instance +func (instance *Win32_PerfFormattedData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteRequestsPersecRDMA() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver.go new file mode 100644 index 00000000..42b664a4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver.go @@ -0,0 +1,69 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver struct +type Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver struct { + *Win32_PerfFormattedData + + // + VidPartitions uint64 +} + +func NewWin32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetVidPartitions sets the value of VidPartitions for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver) SetPropertyVidPartitions(value uint64) (err error) { + return instance.SetProperty("VidPartitions", value) +} + +// GetVidPartitions gets the value of VidPartitions for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidDriver) GetPropertyVidPartitions() (value uint64, err error) { + retValue, err := instance.GetProperty("VidPartitions") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode.go new file mode 100644 index 00000000..c5a53dba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode struct +type Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode struct { + *Win32_PerfFormattedData + + // + PageCount uint64 + + // + ProcessorCount uint64 +} + +func NewWin32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNodeEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNodeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetPageCount sets the value of PageCount for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode) SetPropertyPageCount(value uint64) (err error) { + return instance.SetProperty("PageCount", (value)) +} + +// GetPageCount gets the value of PageCount for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode) GetPropertyPageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("PageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessorCount sets the value of ProcessorCount for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode) SetPropertyProcessorCount(value uint64) (err error) { + return instance.SetProperty("ProcessorCount", (value)) +} + +// GetProcessorCount gets the value of ProcessorCount for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidNumaNode) GetPropertyProcessorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ProcessorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition.go new file mode 100644 index 00000000..e00af14b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition struct +type Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition struct { + *Win32_PerfFormattedData + + // + PhysicalPagesAllocated uint64 + + // + PreferredNUMANodeIndex uint64 + + // + RemotePhysicalPages uint64 +} + +func NewWin32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetPhysicalPagesAllocated sets the value of PhysicalPagesAllocated for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition) SetPropertyPhysicalPagesAllocated(value uint64) (err error) { + return instance.SetProperty("PhysicalPagesAllocated", (value)) +} + +// GetPhysicalPagesAllocated gets the value of PhysicalPagesAllocated for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition) GetPropertyPhysicalPagesAllocated() (value uint64, err error) { + retValue, err := instance.GetProperty("PhysicalPagesAllocated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPreferredNUMANodeIndex sets the value of PreferredNUMANodeIndex for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition) SetPropertyPreferredNUMANodeIndex(value uint64) (err error) { + return instance.SetProperty("PreferredNUMANodeIndex", (value)) +} + +// GetPreferredNUMANodeIndex gets the value of PreferredNUMANodeIndex for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition) GetPropertyPreferredNUMANodeIndex() (value uint64, err error) { + retValue, err := instance.GetProperty("PreferredNUMANodeIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemotePhysicalPages sets the value of RemotePhysicalPages for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition) SetPropertyRemotePhysicalPages(value uint64) (err error) { + return instance.SetProperty("RemotePhysicalPages", (value)) +} + +// GetRemotePhysicalPages gets the value of RemotePhysicalPages for the instance +func (instance *Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition) GetPropertyRemotePhysicalPages() (value uint64, err error) { + retValue, err := instance.GetProperty("RemotePhysicalPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go new file mode 100644 index 00000000..0421f391 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary struct +type Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary struct { + *Win32_PerfFormattedData + + // + HealthCritical uint32 + + // + HealthOk uint32 +} + +func NewWin32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummaryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummaryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetHealthCritical sets the value of HealthCritical for the instance +func (instance *Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) SetPropertyHealthCritical(value uint32) (err error) { + return instance.SetProperty("HealthCritical", (value)) +} + +// GetHealthCritical gets the value of HealthCritical for the instance +func (instance *Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) GetPropertyHealthCritical() (value uint32, err error) { + retValue, err := instance.GetProperty("HealthCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHealthOk sets the value of HealthOk for the instance +func (instance *Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) SetPropertyHealthOk(value uint32) (err error) { + return instance.SetProperty("HealthOk", (value)) +} + +// GetHealthOk gets the value of HealthOk for the instance +func (instance *Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) GetPropertyHealthOk() (value uint32, err error) { + retValue, err := instance.GetProperty("HealthOk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNAT.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNAT.go new file mode 100644 index 00000000..7f81280d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNAT.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WinNatCounters_WinNAT struct +type Win32_PerfFormattedData_WinNatCounters_WinNAT struct { + *Win32_PerfFormattedData + + // + CurrentSessionCount uint32 + + // + DroppedICMPerrorpackets uint32 + + // + DroppedICMPerrorpacketsPersec uint32 + + // + DroppedPackets uint32 + + // + DroppedPacketsPersec uint32 + + // + InterRoutingDomainHairpinnedPackets uint32 + + // + InterRoutingDomainHairpinnedPacketsPersec uint32 + + // + IntraRoutingDomainHairpinnedPackets uint32 + + // + IntraRoutingDomainHairpinnedPacketsPersec uint32 + + // + PacketsExternaltoInternal uint32 + + // + PacketsInternaltoExternal uint32 + + // + PacketsPersecExternaltoInternal uint32 + + // + PacketsPersecInternaltoExternal uint32 + + // + SessionsPersec uint32 +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNAT, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNAT{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNAT, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNAT{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetCurrentSessionCount sets the value of CurrentSessionCount for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyCurrentSessionCount(value uint32) (err error) { + return instance.SetProperty("CurrentSessionCount", (value)) +} + +// GetCurrentSessionCount gets the value of CurrentSessionCount for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyCurrentSessionCount() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSessionCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedICMPerrorpackets sets the value of DroppedICMPerrorpackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyDroppedICMPerrorpackets(value uint32) (err error) { + return instance.SetProperty("DroppedICMPerrorpackets", (value)) +} + +// GetDroppedICMPerrorpackets gets the value of DroppedICMPerrorpackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyDroppedICMPerrorpackets() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedICMPerrorpackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedICMPerrorpacketsPersec sets the value of DroppedICMPerrorpacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyDroppedICMPerrorpacketsPersec(value uint32) (err error) { + return instance.SetProperty("DroppedICMPerrorpacketsPersec", (value)) +} + +// GetDroppedICMPerrorpacketsPersec gets the value of DroppedICMPerrorpacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyDroppedICMPerrorpacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedICMPerrorpacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedPackets sets the value of DroppedPackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyDroppedPackets(value uint32) (err error) { + return instance.SetProperty("DroppedPackets", (value)) +} + +// GetDroppedPackets gets the value of DroppedPackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyDroppedPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedPacketsPersec sets the value of DroppedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyDroppedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("DroppedPacketsPersec", (value)) +} + +// GetDroppedPacketsPersec gets the value of DroppedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyDroppedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterRoutingDomainHairpinnedPackets sets the value of InterRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyInterRoutingDomainHairpinnedPackets(value uint32) (err error) { + return instance.SetProperty("InterRoutingDomainHairpinnedPackets", (value)) +} + +// GetInterRoutingDomainHairpinnedPackets gets the value of InterRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyInterRoutingDomainHairpinnedPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("InterRoutingDomainHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterRoutingDomainHairpinnedPacketsPersec sets the value of InterRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyInterRoutingDomainHairpinnedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InterRoutingDomainHairpinnedPacketsPersec", (value)) +} + +// GetInterRoutingDomainHairpinnedPacketsPersec gets the value of InterRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyInterRoutingDomainHairpinnedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterRoutingDomainHairpinnedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIntraRoutingDomainHairpinnedPackets sets the value of IntraRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyIntraRoutingDomainHairpinnedPackets(value uint32) (err error) { + return instance.SetProperty("IntraRoutingDomainHairpinnedPackets", (value)) +} + +// GetIntraRoutingDomainHairpinnedPackets gets the value of IntraRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyIntraRoutingDomainHairpinnedPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("IntraRoutingDomainHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIntraRoutingDomainHairpinnedPacketsPersec sets the value of IntraRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyIntraRoutingDomainHairpinnedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("IntraRoutingDomainHairpinnedPacketsPersec", (value)) +} + +// GetIntraRoutingDomainHairpinnedPacketsPersec gets the value of IntraRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyIntraRoutingDomainHairpinnedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IntraRoutingDomainHairpinnedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsExternaltoInternal sets the value of PacketsExternaltoInternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyPacketsExternaltoInternal(value uint32) (err error) { + return instance.SetProperty("PacketsExternaltoInternal", (value)) +} + +// GetPacketsExternaltoInternal gets the value of PacketsExternaltoInternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyPacketsExternaltoInternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsExternaltoInternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsInternaltoExternal sets the value of PacketsInternaltoExternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyPacketsInternaltoExternal(value uint32) (err error) { + return instance.SetProperty("PacketsInternaltoExternal", (value)) +} + +// GetPacketsInternaltoExternal gets the value of PacketsInternaltoExternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyPacketsInternaltoExternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsInternaltoExternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsPersecExternaltoInternal sets the value of PacketsPersecExternaltoInternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyPacketsPersecExternaltoInternal(value uint32) (err error) { + return instance.SetProperty("PacketsPersecExternaltoInternal", (value)) +} + +// GetPacketsPersecExternaltoInternal gets the value of PacketsPersecExternaltoInternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyPacketsPersecExternaltoInternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsPersecExternaltoInternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsPersecInternaltoExternal sets the value of PacketsPersecInternaltoExternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertyPacketsPersecInternaltoExternal(value uint32) (err error) { + return instance.SetProperty("PacketsPersecInternaltoExternal", (value)) +} + +// GetPacketsPersecInternaltoExternal gets the value of PacketsPersecInternaltoExternal for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertyPacketsPersecInternaltoExternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsPersecInternaltoExternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPersec sets the value of SessionsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) SetPropertySessionsPersec(value uint32) (err error) { + return instance.SetProperty("SessionsPersec", (value)) +} + +// GetSessionsPersec gets the value of SessionsPersec for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNAT) GetPropertySessionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATICMP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATICMP.go new file mode 100644 index 00000000..8a2a4f6c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATICMP.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WinNatCounters_WinNATICMP struct +type Win32_PerfFormattedData_WinNatCounters_WinNATICMP struct { + *Win32_PerfFormattedData + + // + NumberOfBindings uint32 + + // + NumberOfSessions uint32 + + // + NumExtToIntTranslations uint32 + + // + NumIntToExtTranslations uint32 + + // + NumPacketsDropped uint32 + + // + NumSessionsTimedOut uint32 +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATICMPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATICMP{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATICMPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATICMP{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberOfBindings sets the value of NumberOfBindings for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) SetPropertyNumberOfBindings(value uint32) (err error) { + return instance.SetProperty("NumberOfBindings", (value)) +} + +// GetNumberOfBindings gets the value of NumberOfBindings for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) GetPropertyNumberOfBindings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfBindings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSessions sets the value of NumberOfSessions for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) SetPropertyNumberOfSessions(value uint32) (err error) { + return instance.SetProperty("NumberOfSessions", (value)) +} + +// GetNumberOfSessions gets the value of NumberOfSessions for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) GetPropertyNumberOfSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumExtToIntTranslations sets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) SetPropertyNumExtToIntTranslations(value uint32) (err error) { + return instance.SetProperty("NumExtToIntTranslations", (value)) +} + +// GetNumExtToIntTranslations gets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) GetPropertyNumExtToIntTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumExtToIntTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumIntToExtTranslations sets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) SetPropertyNumIntToExtTranslations(value uint32) (err error) { + return instance.SetProperty("NumIntToExtTranslations", (value)) +} + +// GetNumIntToExtTranslations gets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) GetPropertyNumIntToExtTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumIntToExtTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumPacketsDropped sets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) SetPropertyNumPacketsDropped(value uint32) (err error) { + return instance.SetProperty("NumPacketsDropped", (value)) +} + +// GetNumPacketsDropped gets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) GetPropertyNumPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("NumPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumSessionsTimedOut sets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) SetPropertyNumSessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("NumSessionsTimedOut", (value)) +} + +// GetNumSessionsTimedOut gets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATICMP) GetPropertyNumSessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("NumSessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATInstance.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATInstance.go new file mode 100644 index 00000000..a483cecf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATInstance.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WinNatCounters_WinNATInstance struct +type Win32_PerfFormattedData_WinNatCounters_WinNATInstance struct { + *Win32_PerfFormattedData + + // + TCPPortsAvailable uint32 + + // + TCPPortsInUse uint32 + + // + UDPPortsAvailable uint32 + + // + UDPPortsInUse uint32 +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATInstanceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATInstance{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATInstanceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATInstance{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetTCPPortsAvailable sets the value of TCPPortsAvailable for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) SetPropertyTCPPortsAvailable(value uint32) (err error) { + return instance.SetProperty("TCPPortsAvailable", (value)) +} + +// GetTCPPortsAvailable gets the value of TCPPortsAvailable for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) GetPropertyTCPPortsAvailable() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPPortsAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPPortsInUse sets the value of TCPPortsInUse for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) SetPropertyTCPPortsInUse(value uint32) (err error) { + return instance.SetProperty("TCPPortsInUse", (value)) +} + +// GetTCPPortsInUse gets the value of TCPPortsInUse for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) GetPropertyTCPPortsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPPortsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPortsAvailable sets the value of UDPPortsAvailable for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) SetPropertyUDPPortsAvailable(value uint32) (err error) { + return instance.SetProperty("UDPPortsAvailable", (value)) +} + +// GetUDPPortsAvailable gets the value of UDPPortsAvailable for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) GetPropertyUDPPortsAvailable() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPortsAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPortsInUse sets the value of UDPPortsInUse for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) SetPropertyUDPPortsInUse(value uint32) (err error) { + return instance.SetProperty("UDPPortsInUse", (value)) +} + +// GetUDPPortsInUse gets the value of UDPPortsInUse for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATInstance) GetPropertyUDPPortsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPortsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATTCP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATTCP.go new file mode 100644 index 00000000..6fe98d26 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATTCP.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WinNatCounters_WinNATTCP struct +type Win32_PerfFormattedData_WinNatCounters_WinNATTCP struct { + *Win32_PerfFormattedData + + // + NumberOfBindings uint32 + + // + NumberOfSessions uint32 + + // + NumExtToIntTranslations uint32 + + // + NumIntToExtTranslations uint32 + + // + NumPacketsDropped uint32 + + // + NumSessionsTimedOut uint32 +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATTCPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATTCP{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATTCPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATTCP{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberOfBindings sets the value of NumberOfBindings for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) SetPropertyNumberOfBindings(value uint32) (err error) { + return instance.SetProperty("NumberOfBindings", (value)) +} + +// GetNumberOfBindings gets the value of NumberOfBindings for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) GetPropertyNumberOfBindings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfBindings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSessions sets the value of NumberOfSessions for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) SetPropertyNumberOfSessions(value uint32) (err error) { + return instance.SetProperty("NumberOfSessions", (value)) +} + +// GetNumberOfSessions gets the value of NumberOfSessions for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) GetPropertyNumberOfSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumExtToIntTranslations sets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) SetPropertyNumExtToIntTranslations(value uint32) (err error) { + return instance.SetProperty("NumExtToIntTranslations", (value)) +} + +// GetNumExtToIntTranslations gets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) GetPropertyNumExtToIntTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumExtToIntTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumIntToExtTranslations sets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) SetPropertyNumIntToExtTranslations(value uint32) (err error) { + return instance.SetProperty("NumIntToExtTranslations", (value)) +} + +// GetNumIntToExtTranslations gets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) GetPropertyNumIntToExtTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumIntToExtTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumPacketsDropped sets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) SetPropertyNumPacketsDropped(value uint32) (err error) { + return instance.SetProperty("NumPacketsDropped", (value)) +} + +// GetNumPacketsDropped gets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) GetPropertyNumPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("NumPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumSessionsTimedOut sets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) SetPropertyNumSessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("NumSessionsTimedOut", (value)) +} + +// GetNumSessionsTimedOut gets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATTCP) GetPropertyNumSessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("NumSessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATUDP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATUDP.go new file mode 100644 index 00000000..afb3386e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WinNatCounters_WinNATUDP.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WinNatCounters_WinNATUDP struct +type Win32_PerfFormattedData_WinNatCounters_WinNATUDP struct { + *Win32_PerfFormattedData + + // + NumberOfBindings uint32 + + // + NumberOfSessions uint32 + + // + NumExtToIntTranslations uint32 + + // + NumIntToExtTranslations uint32 + + // + NumPacketsDropped uint32 + + // + NumSessionsTimedOut uint32 +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATUDPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATUDP{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WinNatCounters_WinNATUDPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WinNatCounters_WinNATUDP{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetNumberOfBindings sets the value of NumberOfBindings for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) SetPropertyNumberOfBindings(value uint32) (err error) { + return instance.SetProperty("NumberOfBindings", (value)) +} + +// GetNumberOfBindings gets the value of NumberOfBindings for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) GetPropertyNumberOfBindings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfBindings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSessions sets the value of NumberOfSessions for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) SetPropertyNumberOfSessions(value uint32) (err error) { + return instance.SetProperty("NumberOfSessions", (value)) +} + +// GetNumberOfSessions gets the value of NumberOfSessions for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) GetPropertyNumberOfSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumExtToIntTranslations sets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) SetPropertyNumExtToIntTranslations(value uint32) (err error) { + return instance.SetProperty("NumExtToIntTranslations", (value)) +} + +// GetNumExtToIntTranslations gets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) GetPropertyNumExtToIntTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumExtToIntTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumIntToExtTranslations sets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) SetPropertyNumIntToExtTranslations(value uint32) (err error) { + return instance.SetProperty("NumIntToExtTranslations", (value)) +} + +// GetNumIntToExtTranslations gets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) GetPropertyNumIntToExtTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumIntToExtTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumPacketsDropped sets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) SetPropertyNumPacketsDropped(value uint32) (err error) { + return instance.SetProperty("NumPacketsDropped", (value)) +} + +// GetNumPacketsDropped gets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) GetPropertyNumPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("NumPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumSessionsTimedOut sets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) SetPropertyNumSessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("NumSessionsTimedOut", (value)) +} + +// GetNumSessionsTimedOut gets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfFormattedData_WinNatCounters_WinNATUDP) GetPropertyNumSessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("NumSessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go new file mode 100644 index 00000000..0f914005 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata struct +type Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata struct { + *Win32_PerfFormattedData + + // + AFTSExecutionTimems uint32 + + // + ArtExtractionTimems uint32 + + // + CommitTimems uint32 + + // + DirectoryChangeQueueLength uint32 + + // + DirtyDirectoryHitCount uint32 + + // + FileScanningThreadPrioirty uint32 + + // + FilesScannedPerMinute uint64 + + // + GrovelerServiceRoutineExecutionsPerSecond uint64 + + // + LibraryDescriptionChangeNotificationsPerSecond uint64 + + // + LibraryDescriptionUpdatesPerSecond uint64 + + // + MonitoredFolderUpdatesPerSecond uint64 + + // + NormalizationTimems uint32 + + // + PropertyExtractionTimems uint32 + + // + ReorganizeTimems uint32 + + // + ScanningState uint32 + + // + TimestampDirectoryHitCount uint32 + + // + URLClassificationTimems uint32 +} + +func NewWin32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadataEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadataEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAFTSExecutionTimems sets the value of AFTSExecutionTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyAFTSExecutionTimems(value uint32) (err error) { + return instance.SetProperty("AFTSExecutionTimems", (value)) +} + +// GetAFTSExecutionTimems gets the value of AFTSExecutionTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyAFTSExecutionTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("AFTSExecutionTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetArtExtractionTimems sets the value of ArtExtractionTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyArtExtractionTimems(value uint32) (err error) { + return instance.SetProperty("ArtExtractionTimems", (value)) +} + +// GetArtExtractionTimems gets the value of ArtExtractionTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyArtExtractionTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("ArtExtractionTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitTimems sets the value of CommitTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyCommitTimems(value uint32) (err error) { + return instance.SetProperty("CommitTimems", (value)) +} + +// GetCommitTimems gets the value of CommitTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyCommitTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("CommitTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirectoryChangeQueueLength sets the value of DirectoryChangeQueueLength for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyDirectoryChangeQueueLength(value uint32) (err error) { + return instance.SetProperty("DirectoryChangeQueueLength", (value)) +} + +// GetDirectoryChangeQueueLength gets the value of DirectoryChangeQueueLength for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyDirectoryChangeQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("DirectoryChangeQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirtyDirectoryHitCount sets the value of DirtyDirectoryHitCount for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyDirtyDirectoryHitCount(value uint32) (err error) { + return instance.SetProperty("DirtyDirectoryHitCount", (value)) +} + +// GetDirtyDirectoryHitCount gets the value of DirtyDirectoryHitCount for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyDirtyDirectoryHitCount() (value uint32, err error) { + retValue, err := instance.GetProperty("DirtyDirectoryHitCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileScanningThreadPrioirty sets the value of FileScanningThreadPrioirty for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyFileScanningThreadPrioirty(value uint32) (err error) { + return instance.SetProperty("FileScanningThreadPrioirty", (value)) +} + +// GetFileScanningThreadPrioirty gets the value of FileScanningThreadPrioirty for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyFileScanningThreadPrioirty() (value uint32, err error) { + retValue, err := instance.GetProperty("FileScanningThreadPrioirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesScannedPerMinute sets the value of FilesScannedPerMinute for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyFilesScannedPerMinute(value uint64) (err error) { + return instance.SetProperty("FilesScannedPerMinute", (value)) +} + +// GetFilesScannedPerMinute gets the value of FilesScannedPerMinute for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyFilesScannedPerMinute() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesScannedPerMinute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGrovelerServiceRoutineExecutionsPerSecond sets the value of GrovelerServiceRoutineExecutionsPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyGrovelerServiceRoutineExecutionsPerSecond(value uint64) (err error) { + return instance.SetProperty("GrovelerServiceRoutineExecutionsPerSecond", (value)) +} + +// GetGrovelerServiceRoutineExecutionsPerSecond gets the value of GrovelerServiceRoutineExecutionsPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyGrovelerServiceRoutineExecutionsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("GrovelerServiceRoutineExecutionsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLibraryDescriptionChangeNotificationsPerSecond sets the value of LibraryDescriptionChangeNotificationsPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyLibraryDescriptionChangeNotificationsPerSecond(value uint64) (err error) { + return instance.SetProperty("LibraryDescriptionChangeNotificationsPerSecond", (value)) +} + +// GetLibraryDescriptionChangeNotificationsPerSecond gets the value of LibraryDescriptionChangeNotificationsPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyLibraryDescriptionChangeNotificationsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("LibraryDescriptionChangeNotificationsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLibraryDescriptionUpdatesPerSecond sets the value of LibraryDescriptionUpdatesPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyLibraryDescriptionUpdatesPerSecond(value uint64) (err error) { + return instance.SetProperty("LibraryDescriptionUpdatesPerSecond", (value)) +} + +// GetLibraryDescriptionUpdatesPerSecond gets the value of LibraryDescriptionUpdatesPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyLibraryDescriptionUpdatesPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("LibraryDescriptionUpdatesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMonitoredFolderUpdatesPerSecond sets the value of MonitoredFolderUpdatesPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyMonitoredFolderUpdatesPerSecond(value uint64) (err error) { + return instance.SetProperty("MonitoredFolderUpdatesPerSecond", (value)) +} + +// GetMonitoredFolderUpdatesPerSecond gets the value of MonitoredFolderUpdatesPerSecond for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyMonitoredFolderUpdatesPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("MonitoredFolderUpdatesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizationTimems sets the value of NormalizationTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyNormalizationTimems(value uint32) (err error) { + return instance.SetProperty("NormalizationTimems", (value)) +} + +// GetNormalizationTimems gets the value of NormalizationTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyNormalizationTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("NormalizationTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPropertyExtractionTimems sets the value of PropertyExtractionTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyPropertyExtractionTimems(value uint32) (err error) { + return instance.SetProperty("PropertyExtractionTimems", (value)) +} + +// GetPropertyExtractionTimems gets the value of PropertyExtractionTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyPropertyExtractionTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("PropertyExtractionTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReorganizeTimems sets the value of ReorganizeTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyReorganizeTimems(value uint32) (err error) { + return instance.SetProperty("ReorganizeTimems", (value)) +} + +// GetReorganizeTimems gets the value of ReorganizeTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyReorganizeTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("ReorganizeTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScanningState sets the value of ScanningState for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyScanningState(value uint32) (err error) { + return instance.SetProperty("ScanningState", (value)) +} + +// GetScanningState gets the value of ScanningState for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyScanningState() (value uint32, err error) { + retValue, err := instance.GetProperty("ScanningState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimestampDirectoryHitCount sets the value of TimestampDirectoryHitCount for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyTimestampDirectoryHitCount(value uint32) (err error) { + return instance.SetProperty("TimestampDirectoryHitCount", (value)) +} + +// GetTimestampDirectoryHitCount gets the value of TimestampDirectoryHitCount for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyTimestampDirectoryHitCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TimestampDirectoryHitCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetURLClassificationTimems sets the value of URLClassificationTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyURLClassificationTimems(value uint32) (err error) { + return instance.SetProperty("URLClassificationTimems", (value)) +} + +// GetURLClassificationTimems gets the value of URLClassificationTimems for the instance +func (instance *Win32_PerfFormattedData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyURLClassificationTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("URLClassificationTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go new file mode 100644 index 00000000..caa217c9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000 struct +type Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000 struct { + *Win32_PerfFormattedData + + // + WorkflowsAborted uint32 + + // + WorkflowsAbortedPersec uint32 + + // + WorkflowsCompleted uint32 + + // + WorkflowsCompletedPersec uint32 + + // + WorkflowsCreated uint32 + + // + WorkflowsCreatedPersec uint32 + + // + WorkflowsExecuting uint32 + + // + WorkflowsIdlePersec uint32 + + // + WorkflowsInMemory uint32 + + // + WorkflowsLoaded uint32 + + // + WorkflowsLoadedPersec uint32 + + // + WorkflowsPending uint32 + + // + WorkflowsPersisted uint32 + + // + WorkflowsPersistedPersec uint32 + + // + WorkflowsRunnable uint32 + + // + WorkflowsSuspended uint32 + + // + WorkflowsSuspendedPersec uint32 + + // + WorkflowsTerminated uint32 + + // + WorkflowsTerminatedPersec uint32 + + // + WorkflowsUnloaded uint32 + + // + WorkflowsUnloadedPersec uint32 +} + +func NewWin32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetWorkflowsAborted sets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsAborted(value uint32) (err error) { + return instance.SetProperty("WorkflowsAborted", (value)) +} + +// GetWorkflowsAborted gets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsAborted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAborted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsAbortedPersec sets the value of WorkflowsAbortedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsAbortedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsAbortedPersec", (value)) +} + +// GetWorkflowsAbortedPersec gets the value of WorkflowsAbortedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsAbortedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAbortedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompleted sets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCompleted(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompleted", (value)) +} + +// GetWorkflowsCompleted gets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCompleted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompleted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompletedPersec sets the value of WorkflowsCompletedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCompletedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompletedPersec", (value)) +} + +// GetWorkflowsCompletedPersec gets the value of WorkflowsCompletedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCompletedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompletedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreated sets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCreated(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreated", (value)) +} + +// GetWorkflowsCreated gets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCreated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreatedPersec sets the value of WorkflowsCreatedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCreatedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreatedPersec", (value)) +} + +// GetWorkflowsCreatedPersec gets the value of WorkflowsCreatedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCreatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsExecuting sets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsExecuting(value uint32) (err error) { + return instance.SetProperty("WorkflowsExecuting", (value)) +} + +// GetWorkflowsExecuting gets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsExecuting() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsExecuting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsIdlePersec sets the value of WorkflowsIdlePersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsIdlePersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsIdlePersec", (value)) +} + +// GetWorkflowsIdlePersec gets the value of WorkflowsIdlePersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsIdlePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsIdlePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsInMemory sets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsInMemory(value uint32) (err error) { + return instance.SetProperty("WorkflowsInMemory", (value)) +} + +// GetWorkflowsInMemory gets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsInMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsInMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoaded sets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsLoaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoaded", (value)) +} + +// GetWorkflowsLoaded gets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoadedPersec sets the value of WorkflowsLoadedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsLoadedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoadedPersec", (value)) +} + +// GetWorkflowsLoadedPersec gets the value of WorkflowsLoadedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsLoadedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoadedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPending sets the value of WorkflowsPending for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsPending(value uint32) (err error) { + return instance.SetProperty("WorkflowsPending", (value)) +} + +// GetWorkflowsPending gets the value of WorkflowsPending for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsPending() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPending") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersisted sets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsPersisted(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersisted", (value)) +} + +// GetWorkflowsPersisted gets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsPersisted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersisted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersistedPersec sets the value of WorkflowsPersistedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsPersistedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersistedPersec", (value)) +} + +// GetWorkflowsPersistedPersec gets the value of WorkflowsPersistedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsPersistedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersistedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsRunnable sets the value of WorkflowsRunnable for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsRunnable(value uint32) (err error) { + return instance.SetProperty("WorkflowsRunnable", (value)) +} + +// GetWorkflowsRunnable gets the value of WorkflowsRunnable for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsRunnable() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsRunnable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspended sets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsSuspended(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspended", (value)) +} + +// GetWorkflowsSuspended gets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsSuspended() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspended") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspendedPersec sets the value of WorkflowsSuspendedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsSuspendedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspendedPersec", (value)) +} + +// GetWorkflowsSuspendedPersec gets the value of WorkflowsSuspendedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsSuspendedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspendedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminated sets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsTerminated(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminated", (value)) +} + +// GetWorkflowsTerminated gets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsTerminated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminatedPersec sets the value of WorkflowsTerminatedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsTerminatedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminatedPersec", (value)) +} + +// GetWorkflowsTerminatedPersec gets the value of WorkflowsTerminatedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsTerminatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloaded sets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsUnloaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloaded", (value)) +} + +// GetWorkflowsUnloaded gets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsUnloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloadedPersec sets the value of WorkflowsUnloadedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsUnloadedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloadedPersec", (value)) +} + +// GetWorkflowsUnloadedPersec gets the value of WorkflowsUnloadedPersec for the instance +func (instance *Win32_PerfFormattedData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsUnloadedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloadedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WnvCounters_NetworkVirtualization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WnvCounters_NetworkVirtualization.go new file mode 100644 index 00000000..2fbfc422 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WnvCounters_NetworkVirtualization.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WnvCounters_NetworkVirtualization struct +type Win32_PerfFormattedData_WnvCounters_NetworkVirtualization struct { + *Win32_PerfFormattedData + + // + Broadcastpacketsreceived uint64 + + // + Broadcastpacketssent uint64 + + // + InboundPacketsdropped uint64 + + // + Missingpolicyicmperrorsreceived uint64 + + // + Missingpolicyicmperrorssent uint64 + + // + Missingpolicynotificationsdropped uint64 + + // + Missingpolicynotificationsindicated uint64 + + // + Multicastpacketsreceived uint64 + + // + Multicastpacketssent uint64 + + // + OutboundPacketsdropped uint64 + + // + Packetsbuffered uint64 + + // + Packetsforwarded uint64 + + // + Packetsloopedback uint64 + + // + Policycachehits uint64 + + // + Policycachemisses uint64 + + // + Policylookupfailures uint64 + + // + Provideraddressduplicatedetectionfailures uint64 + + // + UnicastpacketsreceivedGRE uint64 + + // + UnicastpacketssentGRE uint64 + + // + UnicastReplicatedPacketsout uint64 +} + +func NewWin32_PerfFormattedData_WnvCounters_NetworkVirtualizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WnvCounters_NetworkVirtualization{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WnvCounters_NetworkVirtualizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WnvCounters_NetworkVirtualization{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetBroadcastpacketsreceived sets the value of Broadcastpacketsreceived for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyBroadcastpacketsreceived(value uint64) (err error) { + return instance.SetProperty("Broadcastpacketsreceived", (value)) +} + +// GetBroadcastpacketsreceived gets the value of Broadcastpacketsreceived for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyBroadcastpacketsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("Broadcastpacketsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastpacketssent sets the value of Broadcastpacketssent for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyBroadcastpacketssent(value uint64) (err error) { + return instance.SetProperty("Broadcastpacketssent", (value)) +} + +// GetBroadcastpacketssent gets the value of Broadcastpacketssent for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyBroadcastpacketssent() (value uint64, err error) { + retValue, err := instance.GetProperty("Broadcastpacketssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundPacketsdropped sets the value of InboundPacketsdropped for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyInboundPacketsdropped(value uint64) (err error) { + return instance.SetProperty("InboundPacketsdropped", (value)) +} + +// GetInboundPacketsdropped gets the value of InboundPacketsdropped for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyInboundPacketsdropped() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundPacketsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicyicmperrorsreceived sets the value of Missingpolicyicmperrorsreceived for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicyicmperrorsreceived(value uint64) (err error) { + return instance.SetProperty("Missingpolicyicmperrorsreceived", (value)) +} + +// GetMissingpolicyicmperrorsreceived gets the value of Missingpolicyicmperrorsreceived for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicyicmperrorsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicyicmperrorsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicyicmperrorssent sets the value of Missingpolicyicmperrorssent for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicyicmperrorssent(value uint64) (err error) { + return instance.SetProperty("Missingpolicyicmperrorssent", (value)) +} + +// GetMissingpolicyicmperrorssent gets the value of Missingpolicyicmperrorssent for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicyicmperrorssent() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicyicmperrorssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicynotificationsdropped sets the value of Missingpolicynotificationsdropped for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicynotificationsdropped(value uint64) (err error) { + return instance.SetProperty("Missingpolicynotificationsdropped", (value)) +} + +// GetMissingpolicynotificationsdropped gets the value of Missingpolicynotificationsdropped for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicynotificationsdropped() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicynotificationsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicynotificationsindicated sets the value of Missingpolicynotificationsindicated for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicynotificationsindicated(value uint64) (err error) { + return instance.SetProperty("Missingpolicynotificationsindicated", (value)) +} + +// GetMissingpolicynotificationsindicated gets the value of Missingpolicynotificationsindicated for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicynotificationsindicated() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicynotificationsindicated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastpacketsreceived sets the value of Multicastpacketsreceived for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyMulticastpacketsreceived(value uint64) (err error) { + return instance.SetProperty("Multicastpacketsreceived", (value)) +} + +// GetMulticastpacketsreceived gets the value of Multicastpacketsreceived for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyMulticastpacketsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("Multicastpacketsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastpacketssent sets the value of Multicastpacketssent for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyMulticastpacketssent(value uint64) (err error) { + return instance.SetProperty("Multicastpacketssent", (value)) +} + +// GetMulticastpacketssent gets the value of Multicastpacketssent for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyMulticastpacketssent() (value uint64, err error) { + retValue, err := instance.GetProperty("Multicastpacketssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutboundPacketsdropped sets the value of OutboundPacketsdropped for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyOutboundPacketsdropped(value uint64) (err error) { + return instance.SetProperty("OutboundPacketsdropped", (value)) +} + +// GetOutboundPacketsdropped gets the value of OutboundPacketsdropped for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyOutboundPacketsdropped() (value uint64, err error) { + retValue, err := instance.GetProperty("OutboundPacketsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsbuffered sets the value of Packetsbuffered for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyPacketsbuffered(value uint64) (err error) { + return instance.SetProperty("Packetsbuffered", (value)) +} + +// GetPacketsbuffered gets the value of Packetsbuffered for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyPacketsbuffered() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsbuffered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsforwarded sets the value of Packetsforwarded for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyPacketsforwarded(value uint64) (err error) { + return instance.SetProperty("Packetsforwarded", (value)) +} + +// GetPacketsforwarded gets the value of Packetsforwarded for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyPacketsforwarded() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsforwarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsloopedback sets the value of Packetsloopedback for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyPacketsloopedback(value uint64) (err error) { + return instance.SetProperty("Packetsloopedback", (value)) +} + +// GetPacketsloopedback gets the value of Packetsloopedback for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyPacketsloopedback() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsloopedback") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicycachehits sets the value of Policycachehits for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyPolicycachehits(value uint64) (err error) { + return instance.SetProperty("Policycachehits", (value)) +} + +// GetPolicycachehits gets the value of Policycachehits for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyPolicycachehits() (value uint64, err error) { + retValue, err := instance.GetProperty("Policycachehits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicycachemisses sets the value of Policycachemisses for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyPolicycachemisses(value uint64) (err error) { + return instance.SetProperty("Policycachemisses", (value)) +} + +// GetPolicycachemisses gets the value of Policycachemisses for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyPolicycachemisses() (value uint64, err error) { + retValue, err := instance.GetProperty("Policycachemisses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicylookupfailures sets the value of Policylookupfailures for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyPolicylookupfailures(value uint64) (err error) { + return instance.SetProperty("Policylookupfailures", (value)) +} + +// GetPolicylookupfailures gets the value of Policylookupfailures for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyPolicylookupfailures() (value uint64, err error) { + retValue, err := instance.GetProperty("Policylookupfailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProvideraddressduplicatedetectionfailures sets the value of Provideraddressduplicatedetectionfailures for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyProvideraddressduplicatedetectionfailures(value uint64) (err error) { + return instance.SetProperty("Provideraddressduplicatedetectionfailures", (value)) +} + +// GetProvideraddressduplicatedetectionfailures gets the value of Provideraddressduplicatedetectionfailures for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyProvideraddressduplicatedetectionfailures() (value uint64, err error) { + retValue, err := instance.GetProperty("Provideraddressduplicatedetectionfailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnicastpacketsreceivedGRE sets the value of UnicastpacketsreceivedGRE for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyUnicastpacketsreceivedGRE(value uint64) (err error) { + return instance.SetProperty("UnicastpacketsreceivedGRE", (value)) +} + +// GetUnicastpacketsreceivedGRE gets the value of UnicastpacketsreceivedGRE for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyUnicastpacketsreceivedGRE() (value uint64, err error) { + retValue, err := instance.GetProperty("UnicastpacketsreceivedGRE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnicastpacketssentGRE sets the value of UnicastpacketssentGRE for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyUnicastpacketssentGRE(value uint64) (err error) { + return instance.SetProperty("UnicastpacketssentGRE", (value)) +} + +// GetUnicastpacketssentGRE gets the value of UnicastpacketssentGRE for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyUnicastpacketssentGRE() (value uint64, err error) { + retValue, err := instance.GetProperty("UnicastpacketssentGRE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnicastReplicatedPacketsout sets the value of UnicastReplicatedPacketsout for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) SetPropertyUnicastReplicatedPacketsout(value uint64) (err error) { + return instance.SetProperty("UnicastReplicatedPacketsout", (value)) +} + +// GetUnicastReplicatedPacketsout gets the value of UnicastReplicatedPacketsout for the instance +func (instance *Win32_PerfFormattedData_WnvCounters_NetworkVirtualization) GetPropertyUnicastReplicatedPacketsout() (value uint64, err error) { + retValue, err := instance.GetProperty("UnicastReplicatedPacketsout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go new file mode 100644 index 00000000..e7d2ff93 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor struct +type Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor struct { + *Win32_PerfFormattedData + + // + InterceptDelayTimems uint64 + + // + InterceptsDelayed uint64 +} + +func NewWin32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetInterceptDelayTimems sets the value of InterceptDelayTimems for the instance +func (instance *Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor) SetPropertyInterceptDelayTimems(value uint64) (err error) { + return instance.SetProperty("InterceptDelayTimems", (value)) +} + +// GetInterceptDelayTimems gets the value of InterceptDelayTimems for the instance +func (instance *Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor) GetPropertyInterceptDelayTimems() (value uint64, err error) { + retValue, err := instance.GetProperty("InterceptDelayTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterceptsDelayed sets the value of InterceptsDelayed for the instance +func (instance *Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor) SetPropertyInterceptsDelayed(value uint64) (err error) { + return instance.SetProperty("InterceptsDelayed", (value)) +} + +// GetInterceptsDelayed gets the value of InterceptsDelayed for the instance +func (instance *Win32_PerfFormattedData_WorkerVpProvider_HyperVWorkerVirtualProcessor) GetPropertyInterceptsDelayed() (value uint64, err error) { + retValue, err := instance.GetProperty("InterceptsDelayed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000.go new file mode 100644 index 00000000..3c470947 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000 struct +type Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000 struct { + *Win32_PerfFormattedData + + // + AverageWorkflowLoadTime uint32 + + // + AverageWorkflowPersistTime uint32 + + // + WorkflowsAborted uint32 + + // + WorkflowsAbortedPerSecond uint32 + + // + WorkflowsCompleted uint32 + + // + WorkflowsCompletedPerSecond uint32 + + // + WorkflowsCreated uint32 + + // + WorkflowsCreatedPerSecond uint32 + + // + WorkflowsExecuting uint32 + + // + WorkflowsIdlePerSecond uint32 + + // + WorkflowsInMemory uint32 + + // + WorkflowsLoaded uint32 + + // + WorkflowsLoadedPerSecond uint32 + + // + WorkflowsPersisted uint32 + + // + WorkflowsPersistedPerSecond uint32 + + // + WorkflowsSuspended uint32 + + // + WorkflowsSuspendedPerSecond uint32 + + // + WorkflowsTerminated uint32 + + // + WorkflowsTerminatedPerSecond uint32 + + // + WorkflowsUnloaded uint32 + + // + WorkflowsUnloadedPerSecond uint32 +} + +func NewWin32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAverageWorkflowLoadTime sets the value of AverageWorkflowLoadTime for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyAverageWorkflowLoadTime(value uint32) (err error) { + return instance.SetProperty("AverageWorkflowLoadTime", (value)) +} + +// GetAverageWorkflowLoadTime gets the value of AverageWorkflowLoadTime for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyAverageWorkflowLoadTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWorkflowLoadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWorkflowPersistTime sets the value of AverageWorkflowPersistTime for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyAverageWorkflowPersistTime(value uint32) (err error) { + return instance.SetProperty("AverageWorkflowPersistTime", (value)) +} + +// GetAverageWorkflowPersistTime gets the value of AverageWorkflowPersistTime for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyAverageWorkflowPersistTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWorkflowPersistTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsAborted sets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsAborted(value uint32) (err error) { + return instance.SetProperty("WorkflowsAborted", (value)) +} + +// GetWorkflowsAborted gets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsAborted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAborted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsAbortedPerSecond sets the value of WorkflowsAbortedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsAbortedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsAbortedPerSecond", (value)) +} + +// GetWorkflowsAbortedPerSecond gets the value of WorkflowsAbortedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsAbortedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAbortedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompleted sets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCompleted(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompleted", (value)) +} + +// GetWorkflowsCompleted gets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCompleted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompleted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompletedPerSecond sets the value of WorkflowsCompletedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCompletedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompletedPerSecond", (value)) +} + +// GetWorkflowsCompletedPerSecond gets the value of WorkflowsCompletedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCompletedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompletedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreated sets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCreated(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreated", (value)) +} + +// GetWorkflowsCreated gets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCreated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreatedPerSecond sets the value of WorkflowsCreatedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCreatedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreatedPerSecond", (value)) +} + +// GetWorkflowsCreatedPerSecond gets the value of WorkflowsCreatedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCreatedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreatedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsExecuting sets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsExecuting(value uint32) (err error) { + return instance.SetProperty("WorkflowsExecuting", (value)) +} + +// GetWorkflowsExecuting gets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsExecuting() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsExecuting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsIdlePerSecond sets the value of WorkflowsIdlePerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsIdlePerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsIdlePerSecond", (value)) +} + +// GetWorkflowsIdlePerSecond gets the value of WorkflowsIdlePerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsIdlePerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsIdlePerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsInMemory sets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsInMemory(value uint32) (err error) { + return instance.SetProperty("WorkflowsInMemory", (value)) +} + +// GetWorkflowsInMemory gets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsInMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsInMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoaded sets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsLoaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoaded", (value)) +} + +// GetWorkflowsLoaded gets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoadedPerSecond sets the value of WorkflowsLoadedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsLoadedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoadedPerSecond", (value)) +} + +// GetWorkflowsLoadedPerSecond gets the value of WorkflowsLoadedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsLoadedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoadedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersisted sets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsPersisted(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersisted", (value)) +} + +// GetWorkflowsPersisted gets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsPersisted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersisted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersistedPerSecond sets the value of WorkflowsPersistedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsPersistedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersistedPerSecond", (value)) +} + +// GetWorkflowsPersistedPerSecond gets the value of WorkflowsPersistedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsPersistedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersistedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspended sets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsSuspended(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspended", (value)) +} + +// GetWorkflowsSuspended gets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsSuspended() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspended") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspendedPerSecond sets the value of WorkflowsSuspendedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsSuspendedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspendedPerSecond", (value)) +} + +// GetWorkflowsSuspendedPerSecond gets the value of WorkflowsSuspendedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsSuspendedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspendedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminated sets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsTerminated(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminated", (value)) +} + +// GetWorkflowsTerminated gets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsTerminated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminatedPerSecond sets the value of WorkflowsTerminatedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsTerminatedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminatedPerSecond", (value)) +} + +// GetWorkflowsTerminatedPerSecond gets the value of WorkflowsTerminatedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsTerminatedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminatedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloaded sets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsUnloaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloaded", (value)) +} + +// GetWorkflowsUnloaded gets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsUnloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloadedPerSecond sets the value of WorkflowsUnloadedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsUnloadedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloadedPerSecond", (value)) +} + +// GetWorkflowsUnloadedPerSecond gets the value of WorkflowsUnloadedPerSecond for the instance +func (instance *Win32_PerfFormattedData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsUnloadedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloadedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_tapisrv_Telephony.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_tapisrv_Telephony.go new file mode 100644 index 00000000..b8d14498 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_tapisrv_Telephony.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_tapisrv_Telephony struct +type Win32_PerfFormattedData_tapisrv_Telephony struct { + *Win32_PerfFormattedData + + // + ActiveLines uint32 + + // + ActiveTelephones uint32 + + // + ClientApps uint32 + + // + CurrentIncomingCalls uint32 + + // + CurrentOutgoingCalls uint32 + + // + IncomingCallsPersec uint32 + + // + Lines uint32 + + // + OutgoingCallsPersec uint32 + + // + TelephoneDevices uint32 +} + +func NewWin32_PerfFormattedData_tapisrv_TelephonyEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_tapisrv_Telephony, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_tapisrv_Telephony{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_tapisrv_TelephonyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_tapisrv_Telephony, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_tapisrv_Telephony{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetActiveLines sets the value of ActiveLines for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyActiveLines(value uint32) (err error) { + return instance.SetProperty("ActiveLines", (value)) +} + +// GetActiveLines gets the value of ActiveLines for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyActiveLines() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveLines") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveTelephones sets the value of ActiveTelephones for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyActiveTelephones(value uint32) (err error) { + return instance.SetProperty("ActiveTelephones", (value)) +} + +// GetActiveTelephones gets the value of ActiveTelephones for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyActiveTelephones() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTelephones") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClientApps sets the value of ClientApps for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyClientApps(value uint32) (err error) { + return instance.SetProperty("ClientApps", (value)) +} + +// GetClientApps gets the value of ClientApps for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyClientApps() (value uint32, err error) { + retValue, err := instance.GetProperty("ClientApps") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentIncomingCalls sets the value of CurrentIncomingCalls for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyCurrentIncomingCalls(value uint32) (err error) { + return instance.SetProperty("CurrentIncomingCalls", (value)) +} + +// GetCurrentIncomingCalls gets the value of CurrentIncomingCalls for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyCurrentIncomingCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentIncomingCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentOutgoingCalls sets the value of CurrentOutgoingCalls for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyCurrentOutgoingCalls(value uint32) (err error) { + return instance.SetProperty("CurrentOutgoingCalls", (value)) +} + +// GetCurrentOutgoingCalls gets the value of CurrentOutgoingCalls for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyCurrentOutgoingCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentOutgoingCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingCallsPersec sets the value of IncomingCallsPersec for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyIncomingCallsPersec(value uint32) (err error) { + return instance.SetProperty("IncomingCallsPersec", (value)) +} + +// GetIncomingCallsPersec gets the value of IncomingCallsPersec for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyIncomingCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLines sets the value of Lines for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyLines(value uint32) (err error) { + return instance.SetProperty("Lines", (value)) +} + +// GetLines gets the value of Lines for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyLines() (value uint32, err error) { + retValue, err := instance.GetProperty("Lines") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutgoingCallsPersec sets the value of OutgoingCallsPersec for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyOutgoingCallsPersec(value uint32) (err error) { + return instance.SetProperty("OutgoingCallsPersec", (value)) +} + +// GetOutgoingCallsPersec gets the value of OutgoingCallsPersec for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyOutgoingCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutgoingCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTelephoneDevices sets the value of TelephoneDevices for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) SetPropertyTelephoneDevices(value uint32) (err error) { + return instance.SetProperty("TelephoneDevices", (value)) +} + +// GetTelephoneDevices gets the value of TelephoneDevices for the instance +func (instance *Win32_PerfFormattedData_tapisrv_Telephony) GetPropertyTelephoneDevices() (value uint32, err error) { + retValue, err := instance.GetProperty("TelephoneDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_usbhub_USB.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_usbhub_USB.go new file mode 100644 index 00000000..cad5510e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfFormattedData_usbhub_USB.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfFormattedData_usbhub_USB struct +type Win32_PerfFormattedData_usbhub_USB struct { + *Win32_PerfFormattedData + + // + AvgBytesPerTransfer uint64 + + // + AvgmslatencyforISOtransfers uint64 + + // + BulkBytesPerSec uint32 + + // + ControlDataBytesPerSec uint32 + + // + ControllerPCIInterruptsPerSec uint32 + + // + ControllerWorkSignalsPerSec uint32 + + // + HostControllerAsyncCacheFlushCount uint32 + + // + HostControllerAsyncIdle uint32 + + // + HostControllerIdle uint32 + + // + HostControllerPeriodicCacheFlushCount uint32 + + // + HostControllerPeriodicIdle uint32 + + // + InterruptBytesPerSec uint32 + + // + IsochronousBytesPerSec uint32 + + // + IsoPacketErrorsPerSec uint32 + + // + PercentTotalBandwidthUsedforInterrupt uint32 + + // + PercentTotalBandwidthUsedforIso uint32 + + // + TransferErrorsPerSec uint32 +} + +func NewWin32_PerfFormattedData_usbhub_USBEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfFormattedData_usbhub_USB, err error) { + tmp, err := NewWin32_PerfFormattedDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_usbhub_USB{ + Win32_PerfFormattedData: tmp, + } + return +} + +func NewWin32_PerfFormattedData_usbhub_USBEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfFormattedData_usbhub_USB, err error) { + tmp, err := NewWin32_PerfFormattedDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfFormattedData_usbhub_USB{ + Win32_PerfFormattedData: tmp, + } + return +} + +// SetAvgBytesPerTransfer sets the value of AvgBytesPerTransfer for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyAvgBytesPerTransfer(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerTransfer", (value)) +} + +// GetAvgBytesPerTransfer gets the value of AvgBytesPerTransfer for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyAvgBytesPerTransfer() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgmslatencyforISOtransfers sets the value of AvgmslatencyforISOtransfers for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyAvgmslatencyforISOtransfers(value uint64) (err error) { + return instance.SetProperty("AvgmslatencyforISOtransfers", (value)) +} + +// GetAvgmslatencyforISOtransfers gets the value of AvgmslatencyforISOtransfers for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyAvgmslatencyforISOtransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgmslatencyforISOtransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBulkBytesPerSec sets the value of BulkBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyBulkBytesPerSec(value uint32) (err error) { + return instance.SetProperty("BulkBytesPerSec", (value)) +} + +// GetBulkBytesPerSec gets the value of BulkBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyBulkBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BulkBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetControlDataBytesPerSec sets the value of ControlDataBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyControlDataBytesPerSec(value uint32) (err error) { + return instance.SetProperty("ControlDataBytesPerSec", (value)) +} + +// GetControlDataBytesPerSec gets the value of ControlDataBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyControlDataBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ControlDataBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetControllerPCIInterruptsPerSec sets the value of ControllerPCIInterruptsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyControllerPCIInterruptsPerSec(value uint32) (err error) { + return instance.SetProperty("ControllerPCIInterruptsPerSec", (value)) +} + +// GetControllerPCIInterruptsPerSec gets the value of ControllerPCIInterruptsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyControllerPCIInterruptsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ControllerPCIInterruptsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetControllerWorkSignalsPerSec sets the value of ControllerWorkSignalsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyControllerWorkSignalsPerSec(value uint32) (err error) { + return instance.SetProperty("ControllerWorkSignalsPerSec", (value)) +} + +// GetControllerWorkSignalsPerSec gets the value of ControllerWorkSignalsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyControllerWorkSignalsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ControllerWorkSignalsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerAsyncCacheFlushCount sets the value of HostControllerAsyncCacheFlushCount for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyHostControllerAsyncCacheFlushCount(value uint32) (err error) { + return instance.SetProperty("HostControllerAsyncCacheFlushCount", (value)) +} + +// GetHostControllerAsyncCacheFlushCount gets the value of HostControllerAsyncCacheFlushCount for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyHostControllerAsyncCacheFlushCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerAsyncCacheFlushCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerAsyncIdle sets the value of HostControllerAsyncIdle for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyHostControllerAsyncIdle(value uint32) (err error) { + return instance.SetProperty("HostControllerAsyncIdle", (value)) +} + +// GetHostControllerAsyncIdle gets the value of HostControllerAsyncIdle for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyHostControllerAsyncIdle() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerAsyncIdle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerIdle sets the value of HostControllerIdle for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyHostControllerIdle(value uint32) (err error) { + return instance.SetProperty("HostControllerIdle", (value)) +} + +// GetHostControllerIdle gets the value of HostControllerIdle for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyHostControllerIdle() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerIdle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerPeriodicCacheFlushCount sets the value of HostControllerPeriodicCacheFlushCount for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyHostControllerPeriodicCacheFlushCount(value uint32) (err error) { + return instance.SetProperty("HostControllerPeriodicCacheFlushCount", (value)) +} + +// GetHostControllerPeriodicCacheFlushCount gets the value of HostControllerPeriodicCacheFlushCount for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyHostControllerPeriodicCacheFlushCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerPeriodicCacheFlushCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerPeriodicIdle sets the value of HostControllerPeriodicIdle for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyHostControllerPeriodicIdle(value uint32) (err error) { + return instance.SetProperty("HostControllerPeriodicIdle", (value)) +} + +// GetHostControllerPeriodicIdle gets the value of HostControllerPeriodicIdle for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyHostControllerPeriodicIdle() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerPeriodicIdle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterruptBytesPerSec sets the value of InterruptBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyInterruptBytesPerSec(value uint32) (err error) { + return instance.SetProperty("InterruptBytesPerSec", (value)) +} + +// GetInterruptBytesPerSec gets the value of InterruptBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyInterruptBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsochronousBytesPerSec sets the value of IsochronousBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyIsochronousBytesPerSec(value uint32) (err error) { + return instance.SetProperty("IsochronousBytesPerSec", (value)) +} + +// GetIsochronousBytesPerSec gets the value of IsochronousBytesPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyIsochronousBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsochronousBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsoPacketErrorsPerSec sets the value of IsoPacketErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyIsoPacketErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("IsoPacketErrorsPerSec", (value)) +} + +// GetIsoPacketErrorsPerSec gets the value of IsoPacketErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyIsoPacketErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsoPacketErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTotalBandwidthUsedforInterrupt sets the value of PercentTotalBandwidthUsedforInterrupt for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyPercentTotalBandwidthUsedforInterrupt(value uint32) (err error) { + return instance.SetProperty("PercentTotalBandwidthUsedforInterrupt", (value)) +} + +// GetPercentTotalBandwidthUsedforInterrupt gets the value of PercentTotalBandwidthUsedforInterrupt for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyPercentTotalBandwidthUsedforInterrupt() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTotalBandwidthUsedforInterrupt") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTotalBandwidthUsedforIso sets the value of PercentTotalBandwidthUsedforIso for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyPercentTotalBandwidthUsedforIso(value uint32) (err error) { + return instance.SetProperty("PercentTotalBandwidthUsedforIso", (value)) +} + +// GetPercentTotalBandwidthUsedforIso gets the value of PercentTotalBandwidthUsedforIso for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyPercentTotalBandwidthUsedforIso() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTotalBandwidthUsedforIso") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransferErrorsPerSec sets the value of TransferErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) SetPropertyTransferErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("TransferErrorsPerSec", (value)) +} + +// GetTransferErrorsPerSec gets the value of TransferErrorsPerSec for the instance +func (instance *Win32_PerfFormattedData_usbhub_USB) GetPropertyTransferErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransferErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData.go new file mode 100644 index 00000000..3cc20eba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData struct +type Win32_PerfRawData struct { + *Win32_Perf +} + +func NewWin32_PerfRawDataEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData, err error) { + tmp, err := NewWin32_PerfEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData{ + Win32_Perf: tmp, + } + return +} + +func NewWin32_PerfRawDataEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData, err error) { + tmp, err := NewWin32_PerfEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData{ + Win32_Perf: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP.go new file mode 100644 index 00000000..0f81e2b2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP struct +type Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP struct { + *Win32_PerfRawData + + // + DroppedDatagrams uint32 + + // + DroppedDatagramsPersec uint32 + + // + RejectedConnections uint32 + + // + RejectedConnectionsPersec uint32 +} + +func NewWin32_PerfRawData_AFDCounters_MicrosoftWinsockBSPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_AFDCounters_MicrosoftWinsockBSPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDroppedDatagrams sets the value of DroppedDatagrams for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) SetPropertyDroppedDatagrams(value uint32) (err error) { + return instance.SetProperty("DroppedDatagrams", (value)) +} + +// GetDroppedDatagrams gets the value of DroppedDatagrams for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) GetPropertyDroppedDatagrams() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedDatagrams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedDatagramsPersec sets the value of DroppedDatagramsPersec for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) SetPropertyDroppedDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DroppedDatagramsPersec", (value)) +} + +// GetDroppedDatagramsPersec gets the value of DroppedDatagramsPersec for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) GetPropertyDroppedDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRejectedConnections sets the value of RejectedConnections for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) SetPropertyRejectedConnections(value uint32) (err error) { + return instance.SetProperty("RejectedConnections", (value)) +} + +// GetRejectedConnections gets the value of RejectedConnections for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) GetPropertyRejectedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RejectedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRejectedConnectionsPersec sets the value of RejectedConnectionsPersec for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) SetPropertyRejectedConnectionsPersec(value uint32) (err error) { + return instance.SetProperty("RejectedConnectionsPersec", (value)) +} + +// GetRejectedConnectionsPersec gets the value of RejectedConnectionsPersec for the instance +func (instance *Win32_PerfRawData_AFDCounters_MicrosoftWinsockBSP) GetPropertyRejectedConnectionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RejectedConnectionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications.go new file mode 100644 index 00000000..ff398cea --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications struct +type Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications struct { + *Win32_PerfRawData + + // + NumberofScopesloadedinmemory uint32 + + // + Totalnumberofscopes uint32 +} + +func NewWin32_PerfRawData_AuthorizationManager_AuthorizationManagerApplicationsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_AuthorizationManager_AuthorizationManagerApplicationsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberofScopesloadedinmemory sets the value of NumberofScopesloadedinmemory for the instance +func (instance *Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications) SetPropertyNumberofScopesloadedinmemory(value uint32) (err error) { + return instance.SetProperty("NumberofScopesloadedinmemory", (value)) +} + +// GetNumberofScopesloadedinmemory gets the value of NumberofScopesloadedinmemory for the instance +func (instance *Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications) GetPropertyNumberofScopesloadedinmemory() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofScopesloadedinmemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalnumberofscopes sets the value of Totalnumberofscopes for the instance +func (instance *Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications) SetPropertyTotalnumberofscopes(value uint32) (err error) { + return instance.SetProperty("Totalnumberofscopes", (value)) +} + +// GetTotalnumberofscopes gets the value of Totalnumberofscopes for the instance +func (instance *Win32_PerfRawData_AuthorizationManager_AuthorizationManagerApplications) GetPropertyTotalnumberofscopes() (value uint32, err error) { + retValue, err := instance.GetProperty("Totalnumberofscopes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer.go new file mode 100644 index 00000000..05171b4c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer struct +type Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer struct { + *Win32_PerfRawData + + // + AvailableMemory uint32 + + // + AvailableMemoryForBalancing uint32 + + // + AveragePressure uint32 + + // + SystemCurrentPressure uint32 +} + +func NewWin32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvailableMemory sets the value of AvailableMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertyAvailableMemory(value uint32) (err error) { + return instance.SetProperty("AvailableMemory", (value)) +} + +// GetAvailableMemory gets the value of AvailableMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertyAvailableMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvailableMemoryForBalancing sets the value of AvailableMemoryForBalancing for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertyAvailableMemoryForBalancing(value uint32) (err error) { + return instance.SetProperty("AvailableMemoryForBalancing", (value)) +} + +// GetAvailableMemoryForBalancing gets the value of AvailableMemoryForBalancing for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertyAvailableMemoryForBalancing() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableMemoryForBalancing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragePressure sets the value of AveragePressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertyAveragePressure(value uint32) (err error) { + return instance.SetProperty("AveragePressure", (value)) +} + +// GetAveragePressure gets the value of AveragePressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertyAveragePressure() (value uint32, err error) { + retValue, err := instance.GetProperty("AveragePressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemCurrentPressure sets the value of SystemCurrentPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) SetPropertySystemCurrentPressure(value uint32) (err error) { + return instance.SetProperty("SystemCurrentPressure", (value)) +} + +// GetSystemCurrentPressure gets the value of SystemCurrentPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryBalancer) GetPropertySystemCurrentPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemCurrentPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM.go new file mode 100644 index 00000000..7dbf6433 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM struct +type Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM struct { + *Win32_PerfRawData + + // + AddedMemory uint64 + + // + AveragePressure uint32 + + // + CurrentPressure uint32 + + // + GuestVisiblePhysicalMemory uint32 + + // + MaximumPressure uint32 + + // + MemoryAddOperations uint64 + + // + MemoryRemoveOperations uint64 + + // + MinimumPressure uint32 + + // + PhysicalMemory uint32 + + // + RemovedMemory uint64 + + // + SmartPagingWorkingSetSize uint32 +} + +func NewWin32_PerfRawData_BalancerStats_HyperVDynamicMemoryVMEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_BalancerStats_HyperVDynamicMemoryVMEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAddedMemory sets the value of AddedMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyAddedMemory(value uint64) (err error) { + return instance.SetProperty("AddedMemory", (value)) +} + +// GetAddedMemory gets the value of AddedMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyAddedMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("AddedMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragePressure sets the value of AveragePressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyAveragePressure(value uint32) (err error) { + return instance.SetProperty("AveragePressure", (value)) +} + +// GetAveragePressure gets the value of AveragePressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyAveragePressure() (value uint32, err error) { + retValue, err := instance.GetProperty("AveragePressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentPressure sets the value of CurrentPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyCurrentPressure(value uint32) (err error) { + return instance.SetProperty("CurrentPressure", (value)) +} + +// GetCurrentPressure gets the value of CurrentPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyCurrentPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGuestVisiblePhysicalMemory sets the value of GuestVisiblePhysicalMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyGuestVisiblePhysicalMemory(value uint32) (err error) { + return instance.SetProperty("GuestVisiblePhysicalMemory", (value)) +} + +// GetGuestVisiblePhysicalMemory gets the value of GuestVisiblePhysicalMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyGuestVisiblePhysicalMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("GuestVisiblePhysicalMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumPressure sets the value of MaximumPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMaximumPressure(value uint32) (err error) { + return instance.SetProperty("MaximumPressure", (value)) +} + +// GetMaximumPressure gets the value of MaximumPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMaximumPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMemoryAddOperations sets the value of MemoryAddOperations for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMemoryAddOperations(value uint64) (err error) { + return instance.SetProperty("MemoryAddOperations", (value)) +} + +// GetMemoryAddOperations gets the value of MemoryAddOperations for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMemoryAddOperations() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryAddOperations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryRemoveOperations sets the value of MemoryRemoveOperations for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMemoryRemoveOperations(value uint64) (err error) { + return instance.SetProperty("MemoryRemoveOperations", (value)) +} + +// GetMemoryRemoveOperations gets the value of MemoryRemoveOperations for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMemoryRemoveOperations() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryRemoveOperations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMinimumPressure sets the value of MinimumPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyMinimumPressure(value uint32) (err error) { + return instance.SetProperty("MinimumPressure", (value)) +} + +// GetMinimumPressure gets the value of MinimumPressure for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyMinimumPressure() (value uint32, err error) { + retValue, err := instance.GetProperty("MinimumPressure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPhysicalMemory sets the value of PhysicalMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyPhysicalMemory(value uint32) (err error) { + return instance.SetProperty("PhysicalMemory", (value)) +} + +// GetPhysicalMemory gets the value of PhysicalMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyPhysicalMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("PhysicalMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemovedMemory sets the value of RemovedMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertyRemovedMemory(value uint64) (err error) { + return instance.SetProperty("RemovedMemory", (value)) +} + +// GetRemovedMemory gets the value of RemovedMemory for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertyRemovedMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("RemovedMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSmartPagingWorkingSetSize sets the value of SmartPagingWorkingSetSize for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) SetPropertySmartPagingWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("SmartPagingWorkingSetSize", (value)) +} + +// GetSmartPagingWorkingSetSize gets the value of SmartPagingWorkingSetSize for the instance +func (instance *Win32_PerfRawData_BalancerStats_HyperVDynamicMemoryVM) GetPropertySmartPagingWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("SmartPagingWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores.go new file mode 100644 index 00000000..c1fc9813 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores.go @@ -0,0 +1,1670 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores struct +type Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores struct { + *Win32_PerfRawData + + // + BindingsActive uint64 + + // + BindingsEnabled uint64 + + // + CachePages uint64 + + // + CachePagesBytes uint64 + + // + CachePagesDirty uint64 + + // + CachePagesFree uint64 + + // + CachePagesStandBy uint64 + + // + CachePagesStandByL0 uint64 + + // + CachePagesStandByL1 uint64 + + // + CachePagesStandByL2 uint64 + + // + CachePagesStandByOldestL1 uint64 + + // + CacheStores uint64 + + // + CacheUsageEfficiencyPercent uint64 + + // + CacheUsageEfficiencyPercent_Base uint64 + + // + CacheUsagePercent uint64 + + // + CacheUsagePercent_Base uint64 + + // + DestageBytes uint64 + + // + DestageBytesPersec uint64 + + // + DestagedAtLowPriPercent uint64 + + // + DestagedAtLowPriPercent_Base uint64 + + // + DestagedAtNormalPriPercent uint64 + + // + DestagedAtNormalPriPercent_Base uint64 + + // + DestageTransfers uint64 + + // + DestageTransfersPersec uint64 + + // + DevicesBlocked uint64 + + // + DevicesHybrid uint64 + + // + DevicesMaintenance uint64 + + // + DevicesNotConfigured uint64 + + // + DevicesOrphan uint64 + + // + MultiPageFragments uint64 + + // + MultiPageFragmentsRate uint64 + + // + MultiPageFragmentsRate_Base uint32 + + // + MultiPageReMap uint64 + + // + PageHit uint64 + + // + PageHitPersec uint64 + + // + PageReMap uint64 + + // + PageReMapPersec uint64 + + // + ReadErrorsMedia uint64 + + // + ReadErrorsTimeout uint64 + + // + ReadErrorsTotal uint64 + + // + UpdateBytes uint64 + + // + UpdateBytesPersec uint64 + + // + UpdatesCritical uint64 + + // + UpdatesCriticalLogFull uint64 + + // + UpdatesCriticalPersec uint64 + + // + UpdatesNonCritical uint64 + + // + UpdatesNonCriticalLogFull uint64 + + // + UpdatesNonCriticalPersec uint64 + + // + UpdatesNotCommitted uint64 + + // + UpdateTransfers uint64 + + // + UpdateTransfersPersec uint64 + + // + WriteErrorsMedia uint64 + + // + WriteErrorsTimeout uint64 + + // + WriteErrorsTotal uint64 +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStoresEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStoresEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBindingsActive sets the value of BindingsActive for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyBindingsActive(value uint64) (err error) { + return instance.SetProperty("BindingsActive", (value)) +} + +// GetBindingsActive gets the value of BindingsActive for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyBindingsActive() (value uint64, err error) { + retValue, err := instance.GetProperty("BindingsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBindingsEnabled sets the value of BindingsEnabled for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyBindingsEnabled(value uint64) (err error) { + return instance.SetProperty("BindingsEnabled", (value)) +} + +// GetBindingsEnabled gets the value of BindingsEnabled for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyBindingsEnabled() (value uint64, err error) { + retValue, err := instance.GetProperty("BindingsEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePages sets the value of CachePages for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePages(value uint64) (err error) { + return instance.SetProperty("CachePages", (value)) +} + +// GetCachePages gets the value of CachePages for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePages() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesBytes sets the value of CachePagesBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesBytes(value uint64) (err error) { + return instance.SetProperty("CachePagesBytes", (value)) +} + +// GetCachePagesBytes gets the value of CachePagesBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDirty sets the value of CachePagesDirty for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesDirty(value uint64) (err error) { + return instance.SetProperty("CachePagesDirty", (value)) +} + +// GetCachePagesDirty gets the value of CachePagesDirty for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesDirty() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesFree sets the value of CachePagesFree for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesFree(value uint64) (err error) { + return instance.SetProperty("CachePagesFree", (value)) +} + +// GetCachePagesFree gets the value of CachePagesFree for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesFree() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesFree") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandBy sets the value of CachePagesStandBy for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandBy(value uint64) (err error) { + return instance.SetProperty("CachePagesStandBy", (value)) +} + +// GetCachePagesStandBy gets the value of CachePagesStandBy for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandBy() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandBy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByL0 sets the value of CachePagesStandByL0 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByL0(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByL0", (value)) +} + +// GetCachePagesStandByL0 gets the value of CachePagesStandByL0 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByL0() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByL0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByL1 sets the value of CachePagesStandByL1 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByL1(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByL1", (value)) +} + +// GetCachePagesStandByL1 gets the value of CachePagesStandByL1 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByL1() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByL1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByL2 sets the value of CachePagesStandByL2 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByL2(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByL2", (value)) +} + +// GetCachePagesStandByL2 gets the value of CachePagesStandByL2 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByL2() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByL2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesStandByOldestL1 sets the value of CachePagesStandByOldestL1 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCachePagesStandByOldestL1(value uint64) (err error) { + return instance.SetProperty("CachePagesStandByOldestL1", (value)) +} + +// GetCachePagesStandByOldestL1 gets the value of CachePagesStandByOldestL1 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCachePagesStandByOldestL1() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesStandByOldestL1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheStores sets the value of CacheStores for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheStores(value uint64) (err error) { + return instance.SetProperty("CacheStores", (value)) +} + +// GetCacheStores gets the value of CacheStores for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheStores() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheStores") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsageEfficiencyPercent sets the value of CacheUsageEfficiencyPercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheUsageEfficiencyPercent(value uint64) (err error) { + return instance.SetProperty("CacheUsageEfficiencyPercent", (value)) +} + +// GetCacheUsageEfficiencyPercent gets the value of CacheUsageEfficiencyPercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheUsageEfficiencyPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsageEfficiencyPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsageEfficiencyPercent_Base sets the value of CacheUsageEfficiencyPercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheUsageEfficiencyPercent_Base(value uint64) (err error) { + return instance.SetProperty("CacheUsageEfficiencyPercent_Base", (value)) +} + +// GetCacheUsageEfficiencyPercent_Base gets the value of CacheUsageEfficiencyPercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheUsageEfficiencyPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsageEfficiencyPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsagePercent sets the value of CacheUsagePercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheUsagePercent(value uint64) (err error) { + return instance.SetProperty("CacheUsagePercent", (value)) +} + +// GetCacheUsagePercent gets the value of CacheUsagePercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheUsagePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsagePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsagePercent_Base sets the value of CacheUsagePercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyCacheUsagePercent_Base(value uint64) (err error) { + return instance.SetProperty("CacheUsagePercent_Base", (value)) +} + +// GetCacheUsagePercent_Base gets the value of CacheUsagePercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyCacheUsagePercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsagePercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytes sets the value of DestageBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageBytes(value uint64) (err error) { + return instance.SetProperty("DestageBytes", (value)) +} + +// GetDestageBytes gets the value of DestageBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytesPersec sets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageBytesPersec(value uint64) (err error) { + return instance.SetProperty("DestageBytesPersec", (value)) +} + +// GetDestageBytesPersec gets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestagedAtLowPriPercent sets the value of DestagedAtLowPriPercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestagedAtLowPriPercent(value uint64) (err error) { + return instance.SetProperty("DestagedAtLowPriPercent", (value)) +} + +// GetDestagedAtLowPriPercent gets the value of DestagedAtLowPriPercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestagedAtLowPriPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("DestagedAtLowPriPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestagedAtLowPriPercent_Base sets the value of DestagedAtLowPriPercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestagedAtLowPriPercent_Base(value uint64) (err error) { + return instance.SetProperty("DestagedAtLowPriPercent_Base", (value)) +} + +// GetDestagedAtLowPriPercent_Base gets the value of DestagedAtLowPriPercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestagedAtLowPriPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("DestagedAtLowPriPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestagedAtNormalPriPercent sets the value of DestagedAtNormalPriPercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestagedAtNormalPriPercent(value uint64) (err error) { + return instance.SetProperty("DestagedAtNormalPriPercent", (value)) +} + +// GetDestagedAtNormalPriPercent gets the value of DestagedAtNormalPriPercent for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestagedAtNormalPriPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("DestagedAtNormalPriPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestagedAtNormalPriPercent_Base sets the value of DestagedAtNormalPriPercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestagedAtNormalPriPercent_Base(value uint64) (err error) { + return instance.SetProperty("DestagedAtNormalPriPercent_Base", (value)) +} + +// GetDestagedAtNormalPriPercent_Base gets the value of DestagedAtNormalPriPercent_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestagedAtNormalPriPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("DestagedAtNormalPriPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfers sets the value of DestageTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageTransfers(value uint64) (err error) { + return instance.SetProperty("DestageTransfers", (value)) +} + +// GetDestageTransfers gets the value of DestageTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfersPersec sets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDestageTransfersPersec(value uint64) (err error) { + return instance.SetProperty("DestageTransfersPersec", (value)) +} + +// GetDestageTransfersPersec gets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDestageTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesBlocked sets the value of DevicesBlocked for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesBlocked(value uint64) (err error) { + return instance.SetProperty("DevicesBlocked", (value)) +} + +// GetDevicesBlocked gets the value of DevicesBlocked for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesBlocked() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesBlocked") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesHybrid sets the value of DevicesHybrid for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesHybrid(value uint64) (err error) { + return instance.SetProperty("DevicesHybrid", (value)) +} + +// GetDevicesHybrid gets the value of DevicesHybrid for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesHybrid() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesHybrid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesMaintenance sets the value of DevicesMaintenance for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesMaintenance(value uint64) (err error) { + return instance.SetProperty("DevicesMaintenance", (value)) +} + +// GetDevicesMaintenance gets the value of DevicesMaintenance for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesMaintenance() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesMaintenance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesNotConfigured sets the value of DevicesNotConfigured for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesNotConfigured(value uint64) (err error) { + return instance.SetProperty("DevicesNotConfigured", (value)) +} + +// GetDevicesNotConfigured gets the value of DevicesNotConfigured for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesNotConfigured() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesNotConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicesOrphan sets the value of DevicesOrphan for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyDevicesOrphan(value uint64) (err error) { + return instance.SetProperty("DevicesOrphan", (value)) +} + +// GetDevicesOrphan gets the value of DevicesOrphan for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyDevicesOrphan() (value uint64, err error) { + retValue, err := instance.GetProperty("DevicesOrphan") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMultiPageFragments sets the value of MultiPageFragments for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageFragments(value uint64) (err error) { + return instance.SetProperty("MultiPageFragments", (value)) +} + +// GetMultiPageFragments gets the value of MultiPageFragments for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageFragments() (value uint64, err error) { + retValue, err := instance.GetProperty("MultiPageFragments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMultiPageFragmentsRate sets the value of MultiPageFragmentsRate for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageFragmentsRate(value uint64) (err error) { + return instance.SetProperty("MultiPageFragmentsRate", (value)) +} + +// GetMultiPageFragmentsRate gets the value of MultiPageFragmentsRate for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageFragmentsRate() (value uint64, err error) { + retValue, err := instance.GetProperty("MultiPageFragmentsRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMultiPageFragmentsRate_Base sets the value of MultiPageFragmentsRate_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageFragmentsRate_Base(value uint32) (err error) { + return instance.SetProperty("MultiPageFragmentsRate_Base", (value)) +} + +// GetMultiPageFragmentsRate_Base gets the value of MultiPageFragmentsRate_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageFragmentsRate_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("MultiPageFragmentsRate_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMultiPageReMap sets the value of MultiPageReMap for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyMultiPageReMap(value uint64) (err error) { + return instance.SetProperty("MultiPageReMap", (value)) +} + +// GetMultiPageReMap gets the value of MultiPageReMap for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyMultiPageReMap() (value uint64, err error) { + retValue, err := instance.GetProperty("MultiPageReMap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageHit sets the value of PageHit for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageHit(value uint64) (err error) { + return instance.SetProperty("PageHit", (value)) +} + +// GetPageHit gets the value of PageHit for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageHit() (value uint64, err error) { + retValue, err := instance.GetProperty("PageHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageHitPersec sets the value of PageHitPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageHitPersec(value uint64) (err error) { + return instance.SetProperty("PageHitPersec", (value)) +} + +// GetPageHitPersec gets the value of PageHitPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageHitPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageHitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageReMap sets the value of PageReMap for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageReMap(value uint64) (err error) { + return instance.SetProperty("PageReMap", (value)) +} + +// GetPageReMap gets the value of PageReMap for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageReMap() (value uint64, err error) { + retValue, err := instance.GetProperty("PageReMap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageReMapPersec sets the value of PageReMapPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyPageReMapPersec(value uint64) (err error) { + return instance.SetProperty("PageReMapPersec", (value)) +} + +// GetPageReMapPersec gets the value of PageReMapPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyPageReMapPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageReMapPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsMedia sets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyReadErrorsMedia(value uint64) (err error) { + return instance.SetProperty("ReadErrorsMedia", (value)) +} + +// GetReadErrorsMedia gets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyReadErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTimeout sets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyReadErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTimeout", (value)) +} + +// GetReadErrorsTimeout gets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyReadErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTotal sets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyReadErrorsTotal(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTotal", (value)) +} + +// GetReadErrorsTotal gets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyReadErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateBytes sets the value of UpdateBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateBytes(value uint64) (err error) { + return instance.SetProperty("UpdateBytes", (value)) +} + +// GetUpdateBytes gets the value of UpdateBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateBytesPersec sets the value of UpdateBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateBytesPersec(value uint64) (err error) { + return instance.SetProperty("UpdateBytesPersec", (value)) +} + +// GetUpdateBytesPersec gets the value of UpdateBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesCritical sets the value of UpdatesCritical for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesCritical(value uint64) (err error) { + return instance.SetProperty("UpdatesCritical", (value)) +} + +// GetUpdatesCritical gets the value of UpdatesCritical for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesCritical() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesCriticalLogFull sets the value of UpdatesCriticalLogFull for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesCriticalLogFull(value uint64) (err error) { + return instance.SetProperty("UpdatesCriticalLogFull", (value)) +} + +// GetUpdatesCriticalLogFull gets the value of UpdatesCriticalLogFull for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesCriticalLogFull() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesCriticalLogFull") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesCriticalPersec sets the value of UpdatesCriticalPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesCriticalPersec(value uint64) (err error) { + return instance.SetProperty("UpdatesCriticalPersec", (value)) +} + +// GetUpdatesCriticalPersec gets the value of UpdatesCriticalPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesCriticalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesCriticalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNonCritical sets the value of UpdatesNonCritical for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNonCritical(value uint64) (err error) { + return instance.SetProperty("UpdatesNonCritical", (value)) +} + +// GetUpdatesNonCritical gets the value of UpdatesNonCritical for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNonCritical() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNonCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNonCriticalLogFull sets the value of UpdatesNonCriticalLogFull for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNonCriticalLogFull(value uint64) (err error) { + return instance.SetProperty("UpdatesNonCriticalLogFull", (value)) +} + +// GetUpdatesNonCriticalLogFull gets the value of UpdatesNonCriticalLogFull for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNonCriticalLogFull() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNonCriticalLogFull") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNonCriticalPersec sets the value of UpdatesNonCriticalPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNonCriticalPersec(value uint64) (err error) { + return instance.SetProperty("UpdatesNonCriticalPersec", (value)) +} + +// GetUpdatesNonCriticalPersec gets the value of UpdatesNonCriticalPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNonCriticalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNonCriticalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdatesNotCommitted sets the value of UpdatesNotCommitted for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdatesNotCommitted(value uint64) (err error) { + return instance.SetProperty("UpdatesNotCommitted", (value)) +} + +// GetUpdatesNotCommitted gets the value of UpdatesNotCommitted for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdatesNotCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdatesNotCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateTransfers sets the value of UpdateTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateTransfers(value uint64) (err error) { + return instance.SetProperty("UpdateTransfers", (value)) +} + +// GetUpdateTransfers gets the value of UpdateTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateTransfersPersec sets the value of UpdateTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyUpdateTransfersPersec(value uint64) (err error) { + return instance.SetProperty("UpdateTransfersPersec", (value)) +} + +// GetUpdateTransfersPersec gets the value of UpdateTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyUpdateTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsMedia sets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyWriteErrorsMedia(value uint64) (err error) { + return instance.SetProperty("WriteErrorsMedia", (value)) +} + +// GetWriteErrorsMedia gets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyWriteErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTimeout sets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyWriteErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTimeout", (value)) +} + +// GetWriteErrorsTimeout gets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyWriteErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTotal sets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) SetPropertyWriteErrorsTotal(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTotal", (value)) +} + +// GetWriteErrorsTotal gets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageCacheStores) GetPropertyWriteErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go new file mode 100644 index 00000000..bf1edc1f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler.go @@ -0,0 +1,1392 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler struct +type Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler struct { + *Win32_PerfRawData + + // + DspPerSysAvgQueueLength uint64 + + // + DspPerSysHighAvgQueueLength uint64 + + // + DspPerSysHighAvgsecPerDataRequest uint32 + + // + DspPerSysHighAvgsecPerDataRequest_Base uint32 + + // + DspPerSysHighCurrentQueueLength uint64 + + // + DspPerSysIdlePerLowAvgQueueLength uint64 + + // + DspPerSysIdlePerLowAvgsecPerDataRequest uint32 + + // + DspPerSysIdlePerLowAvgsecPerDataRequest_Base uint32 + + // + DspPerSysIdlePerLowCurrentQueueLength uint64 + + // + DspPerSysNormalAvgQueueLength uint64 + + // + DspPerSysNormalAvgsecPerDataRequest uint32 + + // + DspPerSysNormalAvgsecPerDataRequest_Base uint32 + + // + DspPerSysNormalCurrentQueueLength uint64 + + // + DspPerUsrAvgQueueLength uint64 + + // + DspPerUsrHighAvgQueueLength uint64 + + // + DspPerUsrHighAvgsecPerDataRequest uint32 + + // + DspPerUsrHighAvgsecPerDataRequest_Base uint32 + + // + DspPerUsrHighCurrentQueueLength uint64 + + // + DspPerUsrIdlePerLowAvgQueueLength uint64 + + // + DspPerUsrIdlePerLowAvgsecPerDataRequest uint32 + + // + DspPerUsrIdlePerLowAvgsecPerDataRequest_Base uint32 + + // + DspPerUsrIdlePerLowCurrentQueueLength uint64 + + // + DspPerUsrNormalAvgQueueLength uint64 + + // + DspPerUsrNormalAvgsecPerDataRequest uint32 + + // + DspPerUsrNormalAvgsecPerDataRequest_Base uint32 + + // + DspPerUsrNormalCurrentQueueLength uint64 + + // + QuePerSysAvgQueueLength uint64 + + // + QuePerSysHighAvgQueueLength uint64 + + // + QuePerSysHighAvgsecPerDataRequest uint32 + + // + QuePerSysHighAvgsecPerDataRequest_Base uint32 + + // + QuePerSysHighBytesPersec uint64 + + // + QuePerSysHighCurrentQueueLength uint64 + + // + QuePerSysHighDataRequestsPersec uint64 + + // + QuePerSysIdlePerLowAvgQueueLength uint64 + + // + QuePerSysIdlePerLowAvgsecPerDataRequest uint32 + + // + QuePerSysIdlePerLowAvgsecPerDataRequest_Base uint32 + + // + QuePerSysIdlePerLowBytesPersec uint64 + + // + QuePerSysIdlePerLowCurrentQueueLength uint64 + + // + QuePerSysIdlePerLowDataRequestsPersec uint64 + + // + QuePerSysNormalAvgQueueLength uint64 + + // + QuePerSysNormalAvgsecPerDataRequest uint32 + + // + QuePerSysNormalAvgsecPerDataRequest_Base uint32 + + // + QuePerSysNormalBytesPersec uint64 + + // + QuePerSysNormalCurrentQueueLength uint64 + + // + QuePerSysNormalDataRequestsPersec uint64 + + // + QuePerUsrAvgQueueLength uint64 + + // + QuePerUsrHighAvgQueueLength uint64 + + // + QuePerUsrHighAvgsecPerDataRequest uint32 + + // + QuePerUsrHighAvgsecPerDataRequest_Base uint32 + + // + QuePerUsrHighBytesPersec uint64 + + // + QuePerUsrHighCurrentQueueLength uint64 + + // + QuePerUsrHighDataRequestsPersec uint64 + + // + QuePerUsrIdlePerLowAvgQueueLength uint64 + + // + QuePerUsrIdlePerLowAvgsecPerDataRequest uint32 + + // + QuePerUsrIdlePerLowAvgsecPerDataRequest_Base uint32 + + // + QuePerUsrIdlePerLowBytesPersec uint64 + + // + QuePerUsrIdlePerLowCurrentQueueLength uint64 + + // + QuePerUsrIdlePerLowDataRequestsPersec uint64 + + // + QuePerUsrNormalAvgQueueLength uint64 + + // + QuePerUsrNormalAvgsecPerDataRequest uint32 + + // + QuePerUsrNormalAvgsecPerDataRequest_Base uint32 + + // + QuePerUsrNormalBytesPersec uint64 + + // + QuePerUsrNormalCurrentQueueLength uint64 + + // + QuePerUsrNormalDataRequestsPersec uint64 +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskSchedulerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskSchedulerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDspPerSysAvgQueueLength sets the value of DspPerSysAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysAvgQueueLength", value) +} + +// GetDspPerSysAvgQueueLength gets the value of DspPerSysAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighAvgQueueLength sets the value of DspPerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysHighAvgQueueLength", value) +} + +// GetDspPerSysHighAvgQueueLength gets the value of DspPerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighAvgsecPerDataRequest sets the value of DspPerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerSysHighAvgsecPerDataRequest", value) +} + +// GetDspPerSysHighAvgsecPerDataRequest gets the value of DspPerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighAvgsecPerDataRequest_Base sets the value of DspPerSysHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("DspPerSysHighAvgsecPerDataRequest_Base", value) +} + +// GetDspPerSysHighAvgsecPerDataRequest_Base gets the value of DspPerSysHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysHighAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysHighCurrentQueueLength sets the value of DspPerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysHighCurrentQueueLength", value) +} + +// GetDspPerSysHighCurrentQueueLength gets the value of DspPerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowAvgQueueLength sets the value of DspPerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowAvgQueueLength", value) +} + +// GetDspPerSysIdlePerLowAvgQueueLength gets the value of DspPerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowAvgsecPerDataRequest sets the value of DspPerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowAvgsecPerDataRequest", value) +} + +// GetDspPerSysIdlePerLowAvgsecPerDataRequest gets the value of DspPerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowAvgsecPerDataRequest_Base sets the value of DspPerSysIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowAvgsecPerDataRequest_Base", value) +} + +// GetDspPerSysIdlePerLowAvgsecPerDataRequest_Base gets the value of DspPerSysIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysIdlePerLowCurrentQueueLength sets the value of DspPerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysIdlePerLowCurrentQueueLength", value) +} + +// GetDspPerSysIdlePerLowCurrentQueueLength gets the value of DspPerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalAvgQueueLength sets the value of DspPerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysNormalAvgQueueLength", value) +} + +// GetDspPerSysNormalAvgQueueLength gets the value of DspPerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalAvgsecPerDataRequest sets the value of DspPerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerSysNormalAvgsecPerDataRequest", value) +} + +// GetDspPerSysNormalAvgsecPerDataRequest gets the value of DspPerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalAvgsecPerDataRequest_Base sets the value of DspPerSysNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("DspPerSysNormalAvgsecPerDataRequest_Base", value) +} + +// GetDspPerSysNormalAvgsecPerDataRequest_Base gets the value of DspPerSysNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerSysNormalCurrentQueueLength sets the value of DspPerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerSysNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerSysNormalCurrentQueueLength", value) +} + +// GetDspPerSysNormalCurrentQueueLength gets the value of DspPerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerSysNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerSysNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrAvgQueueLength sets the value of DspPerUsrAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrAvgQueueLength", value) +} + +// GetDspPerUsrAvgQueueLength gets the value of DspPerUsrAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighAvgQueueLength sets the value of DspPerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrHighAvgQueueLength", value) +} + +// GetDspPerUsrHighAvgQueueLength gets the value of DspPerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighAvgsecPerDataRequest sets the value of DspPerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerUsrHighAvgsecPerDataRequest", value) +} + +// GetDspPerUsrHighAvgsecPerDataRequest gets the value of DspPerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighAvgsecPerDataRequest_Base sets the value of DspPerUsrHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("DspPerUsrHighAvgsecPerDataRequest_Base", value) +} + +// GetDspPerUsrHighAvgsecPerDataRequest_Base gets the value of DspPerUsrHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrHighCurrentQueueLength sets the value of DspPerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrHighCurrentQueueLength", value) +} + +// GetDspPerUsrHighCurrentQueueLength gets the value of DspPerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowAvgQueueLength sets the value of DspPerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowAvgQueueLength", value) +} + +// GetDspPerUsrIdlePerLowAvgQueueLength gets the value of DspPerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowAvgsecPerDataRequest sets the value of DspPerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowAvgsecPerDataRequest", value) +} + +// GetDspPerUsrIdlePerLowAvgsecPerDataRequest gets the value of DspPerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowAvgsecPerDataRequest_Base sets the value of DspPerUsrIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowAvgsecPerDataRequest_Base", value) +} + +// GetDspPerUsrIdlePerLowAvgsecPerDataRequest_Base gets the value of DspPerUsrIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrIdlePerLowCurrentQueueLength sets the value of DspPerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrIdlePerLowCurrentQueueLength", value) +} + +// GetDspPerUsrIdlePerLowCurrentQueueLength gets the value of DspPerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalAvgQueueLength sets the value of DspPerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrNormalAvgQueueLength", value) +} + +// GetDspPerUsrNormalAvgQueueLength gets the value of DspPerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalAvgsecPerDataRequest sets the value of DspPerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("DspPerUsrNormalAvgsecPerDataRequest", value) +} + +// GetDspPerUsrNormalAvgsecPerDataRequest gets the value of DspPerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalAvgsecPerDataRequest_Base sets the value of DspPerUsrNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("DspPerUsrNormalAvgsecPerDataRequest_Base", value) +} + +// GetDspPerUsrNormalAvgsecPerDataRequest_Base gets the value of DspPerUsrNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDspPerUsrNormalCurrentQueueLength sets the value of DspPerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyDspPerUsrNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("DspPerUsrNormalCurrentQueueLength", value) +} + +// GetDspPerUsrNormalCurrentQueueLength gets the value of DspPerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyDspPerUsrNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DspPerUsrNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysAvgQueueLength sets the value of QuePerSysAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysAvgQueueLength", value) +} + +// GetQuePerSysAvgQueueLength gets the value of QuePerSysAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighAvgQueueLength sets the value of QuePerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighAvgQueueLength", value) +} + +// GetQuePerSysHighAvgQueueLength gets the value of QuePerSysHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighAvgsecPerDataRequest sets the value of QuePerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerSysHighAvgsecPerDataRequest", value) +} + +// GetQuePerSysHighAvgsecPerDataRequest gets the value of QuePerSysHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighAvgsecPerDataRequest_Base sets the value of QuePerSysHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("QuePerSysHighAvgsecPerDataRequest_Base", value) +} + +// GetQuePerSysHighAvgsecPerDataRequest_Base gets the value of QuePerSysHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysHighAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighBytesPersec sets the value of QuePerSysHighBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighBytesPersec", value) +} + +// GetQuePerSysHighBytesPersec gets the value of QuePerSysHighBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighCurrentQueueLength sets the value of QuePerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighCurrentQueueLength", value) +} + +// GetQuePerSysHighCurrentQueueLength gets the value of QuePerSysHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysHighDataRequestsPersec sets the value of QuePerSysHighDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysHighDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysHighDataRequestsPersec", value) +} + +// GetQuePerSysHighDataRequestsPersec gets the value of QuePerSysHighDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysHighDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysHighDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowAvgQueueLength sets the value of QuePerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowAvgQueueLength", value) +} + +// GetQuePerSysIdlePerLowAvgQueueLength gets the value of QuePerSysIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowAvgsecPerDataRequest sets the value of QuePerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowAvgsecPerDataRequest", value) +} + +// GetQuePerSysIdlePerLowAvgsecPerDataRequest gets the value of QuePerSysIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowAvgsecPerDataRequest_Base sets the value of QuePerSysIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowAvgsecPerDataRequest_Base", value) +} + +// GetQuePerSysIdlePerLowAvgsecPerDataRequest_Base gets the value of QuePerSysIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowBytesPersec sets the value of QuePerSysIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowBytesPersec", value) +} + +// GetQuePerSysIdlePerLowBytesPersec gets the value of QuePerSysIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowCurrentQueueLength sets the value of QuePerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowCurrentQueueLength", value) +} + +// GetQuePerSysIdlePerLowCurrentQueueLength gets the value of QuePerSysIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysIdlePerLowDataRequestsPersec sets the value of QuePerSysIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysIdlePerLowDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysIdlePerLowDataRequestsPersec", value) +} + +// GetQuePerSysIdlePerLowDataRequestsPersec gets the value of QuePerSysIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysIdlePerLowDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysIdlePerLowDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalAvgQueueLength sets the value of QuePerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalAvgQueueLength", value) +} + +// GetQuePerSysNormalAvgQueueLength gets the value of QuePerSysNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalAvgsecPerDataRequest sets the value of QuePerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerSysNormalAvgsecPerDataRequest", value) +} + +// GetQuePerSysNormalAvgsecPerDataRequest gets the value of QuePerSysNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalAvgsecPerDataRequest_Base sets the value of QuePerSysNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("QuePerSysNormalAvgsecPerDataRequest_Base", value) +} + +// GetQuePerSysNormalAvgsecPerDataRequest_Base gets the value of QuePerSysNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalBytesPersec sets the value of QuePerSysNormalBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalBytesPersec", value) +} + +// GetQuePerSysNormalBytesPersec gets the value of QuePerSysNormalBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalCurrentQueueLength sets the value of QuePerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalCurrentQueueLength", value) +} + +// GetQuePerSysNormalCurrentQueueLength gets the value of QuePerSysNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerSysNormalDataRequestsPersec sets the value of QuePerSysNormalDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerSysNormalDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerSysNormalDataRequestsPersec", value) +} + +// GetQuePerSysNormalDataRequestsPersec gets the value of QuePerSysNormalDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerSysNormalDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerSysNormalDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrAvgQueueLength sets the value of QuePerUsrAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrAvgQueueLength", value) +} + +// GetQuePerUsrAvgQueueLength gets the value of QuePerUsrAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighAvgQueueLength sets the value of QuePerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighAvgQueueLength", value) +} + +// GetQuePerUsrHighAvgQueueLength gets the value of QuePerUsrHighAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighAvgsecPerDataRequest sets the value of QuePerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerUsrHighAvgsecPerDataRequest", value) +} + +// GetQuePerUsrHighAvgsecPerDataRequest gets the value of QuePerUsrHighAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighAvgsecPerDataRequest_Base sets the value of QuePerUsrHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("QuePerUsrHighAvgsecPerDataRequest_Base", value) +} + +// GetQuePerUsrHighAvgsecPerDataRequest_Base gets the value of QuePerUsrHighAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighBytesPersec sets the value of QuePerUsrHighBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighBytesPersec", value) +} + +// GetQuePerUsrHighBytesPersec gets the value of QuePerUsrHighBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighCurrentQueueLength sets the value of QuePerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighCurrentQueueLength", value) +} + +// GetQuePerUsrHighCurrentQueueLength gets the value of QuePerUsrHighCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrHighDataRequestsPersec sets the value of QuePerUsrHighDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrHighDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrHighDataRequestsPersec", value) +} + +// GetQuePerUsrHighDataRequestsPersec gets the value of QuePerUsrHighDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrHighDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrHighDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowAvgQueueLength sets the value of QuePerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowAvgQueueLength", value) +} + +// GetQuePerUsrIdlePerLowAvgQueueLength gets the value of QuePerUsrIdlePerLowAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowAvgsecPerDataRequest sets the value of QuePerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowAvgsecPerDataRequest", value) +} + +// GetQuePerUsrIdlePerLowAvgsecPerDataRequest gets the value of QuePerUsrIdlePerLowAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowAvgsecPerDataRequest_Base sets the value of QuePerUsrIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowAvgsecPerDataRequest_Base", value) +} + +// GetQuePerUsrIdlePerLowAvgsecPerDataRequest_Base gets the value of QuePerUsrIdlePerLowAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowBytesPersec sets the value of QuePerUsrIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowBytesPersec", value) +} + +// GetQuePerUsrIdlePerLowBytesPersec gets the value of QuePerUsrIdlePerLowBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowCurrentQueueLength sets the value of QuePerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowCurrentQueueLength", value) +} + +// GetQuePerUsrIdlePerLowCurrentQueueLength gets the value of QuePerUsrIdlePerLowCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrIdlePerLowDataRequestsPersec sets the value of QuePerUsrIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrIdlePerLowDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrIdlePerLowDataRequestsPersec", value) +} + +// GetQuePerUsrIdlePerLowDataRequestsPersec gets the value of QuePerUsrIdlePerLowDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrIdlePerLowDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrIdlePerLowDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalAvgQueueLength sets the value of QuePerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalAvgQueueLength", value) +} + +// GetQuePerUsrNormalAvgQueueLength gets the value of QuePerUsrNormalAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalAvgQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalAvgsecPerDataRequest sets the value of QuePerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("QuePerUsrNormalAvgsecPerDataRequest", value) +} + +// GetQuePerUsrNormalAvgsecPerDataRequest gets the value of QuePerUsrNormalAvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalAvgsecPerDataRequest") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalAvgsecPerDataRequest_Base sets the value of QuePerUsrNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("QuePerUsrNormalAvgsecPerDataRequest_Base", value) +} + +// GetQuePerUsrNormalAvgsecPerDataRequest_Base gets the value of QuePerUsrNormalAvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalAvgsecPerDataRequest_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalBytesPersec sets the value of QuePerUsrNormalBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalBytesPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalBytesPersec", value) +} + +// GetQuePerUsrNormalBytesPersec gets the value of QuePerUsrNormalBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalCurrentQueueLength sets the value of QuePerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalCurrentQueueLength(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalCurrentQueueLength", value) +} + +// GetQuePerUsrNormalCurrentQueueLength gets the value of QuePerUsrNormalCurrentQueueLength for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalCurrentQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalCurrentQueueLength") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetQuePerUsrNormalDataRequestsPersec sets the value of QuePerUsrNormalDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) SetPropertyQuePerUsrNormalDataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("QuePerUsrNormalDataRequestsPersec", value) +} + +// GetQuePerUsrNormalDataRequestsPersec gets the value of QuePerUsrNormalDataRequestsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageDiskScheduler) GetPropertyQuePerUsrNormalDataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("QuePerUsrNormalDataRequestsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go new file mode 100644 index 00000000..3ed2fde8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks.go @@ -0,0 +1,1970 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks struct +type Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks struct { + *Win32_PerfRawData + + // + BindingAttributes uint64 + + // + CacheFirstHitPopulatedBytes uint64 + + // + CacheFirstHitPopulatedBytesPersec uint64 + + // + CacheFirstHitWrittenBytes uint64 + + // + CacheFirstHitWrittenBytesPersec uint64 + + // + CacheHitReadBytes uint64 + + // + CacheHitReadBytesPersec uint64 + + // + CacheHitReads uint64 + + // + CacheHitReadsPersec uint64 + + // + CacheMissReadBytes uint64 + + // + CacheMissReadBytesPersec uint64 + + // + CacheMissReads uint64 + + // + CacheMissReadsPersec uint64 + + // + CachePages uint64 + + // + CachePagesDirty uint64 + + // + CachePagesDirtyHot uint64 + + // + CachePagesDiscardIgnored uint64 + + // + CachePagesL2 uint64 + + // + CachePopulateBytes uint64 + + // + CachePopulateBytesPersec uint64 + + // + CacheWriteBytes uint64 + + // + CacheWriteBytesPersec uint64 + + // + CacheWrites uint64 + + // + CacheWritesPersec uint64 + + // + DestageBytes uint64 + + // + DestageBytesPersec uint64 + + // + DestageTransfers uint64 + + // + DestageTransfersPersec uint64 + + // + DirectReadBytes uint64 + + // + DirectReadBytesPersec uint64 + + // + DirectReads uint64 + + // + DirectReadsPersec uint64 + + // + DirectWriteBytes uint64 + + // + DirectWriteBytesPersec uint64 + + // + DirectWrites uint64 + + // + DirectWritesPersec uint64 + + // + DirtyReadBytes uint64 + + // + DirtyReadBytesPersec uint64 + + // + DirtySlots uint64 + + // + DirtySlotsExpands uint64 + + // + DirtySlotsExpandsPersec uint64 + + // + DiskBytes uint64 + + // + DiskBytesPersec uint64 + + // + DiskReadBytes uint64 + + // + DiskReadBytesPersec uint64 + + // + DiskReads uint64 + + // + DiskReadsPersec uint64 + + // + DiskTransfers uint64 + + // + DiskTransfersPersec uint64 + + // + DiskWriteBytes uint64 + + // + DiskWriteBytesPersec uint64 + + // + DiskWrites uint64 + + // + DiskWritesPersec uint64 + + // + MissingSlots uint64 + + // + RateDiskCacheReads uint64 + + // + RateDiskCacheReads_Base uint32 + + // + RateDiskCacheWrites uint64 + + // + RateDiskCacheWrites_Base uint32 + + // + ReadErrorsMedia uint64 + + // + ReadErrorsTimeout uint64 + + // + ReadErrorsTotal uint64 + + // + WriteErrorsMedia uint64 + + // + WriteErrorsTimeout uint64 + + // + WriteErrorsTotal uint64 +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBindingAttributes sets the value of BindingAttributes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyBindingAttributes(value uint64) (err error) { + return instance.SetProperty("BindingAttributes", (value)) +} + +// GetBindingAttributes gets the value of BindingAttributes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyBindingAttributes() (value uint64, err error) { + retValue, err := instance.GetProperty("BindingAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitPopulatedBytes sets the value of CacheFirstHitPopulatedBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitPopulatedBytes(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitPopulatedBytes", (value)) +} + +// GetCacheFirstHitPopulatedBytes gets the value of CacheFirstHitPopulatedBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitPopulatedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitPopulatedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitPopulatedBytesPersec sets the value of CacheFirstHitPopulatedBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitPopulatedBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitPopulatedBytesPersec", (value)) +} + +// GetCacheFirstHitPopulatedBytesPersec gets the value of CacheFirstHitPopulatedBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitPopulatedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitPopulatedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitWrittenBytes sets the value of CacheFirstHitWrittenBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitWrittenBytes(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitWrittenBytes", (value)) +} + +// GetCacheFirstHitWrittenBytes gets the value of CacheFirstHitWrittenBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitWrittenBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitWrittenBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFirstHitWrittenBytesPersec sets the value of CacheFirstHitWrittenBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheFirstHitWrittenBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheFirstHitWrittenBytesPersec", (value)) +} + +// GetCacheFirstHitWrittenBytesPersec gets the value of CacheFirstHitWrittenBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheFirstHitWrittenBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheFirstHitWrittenBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReadBytes sets the value of CacheHitReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheHitReadBytes", (value)) +} + +// GetCacheHitReadBytes gets the value of CacheHitReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReadBytesPersec sets the value of CacheHitReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheHitReadBytesPersec", (value)) +} + +// GetCacheHitReadBytesPersec gets the value of CacheHitReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReads sets the value of CacheHitReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReads(value uint64) (err error) { + return instance.SetProperty("CacheHitReads", (value)) +} + +// GetCacheHitReads gets the value of CacheHitReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitReadsPersec sets the value of CacheHitReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheHitReadsPersec(value uint64) (err error) { + return instance.SetProperty("CacheHitReadsPersec", (value)) +} + +// GetCacheHitReadsPersec gets the value of CacheHitReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheHitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReadBytes sets the value of CacheMissReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheMissReadBytes", (value)) +} + +// GetCacheMissReadBytes gets the value of CacheMissReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReadBytesPersec sets the value of CacheMissReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheMissReadBytesPersec", (value)) +} + +// GetCacheMissReadBytesPersec gets the value of CacheMissReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReads sets the value of CacheMissReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReads(value uint64) (err error) { + return instance.SetProperty("CacheMissReads", (value)) +} + +// GetCacheMissReads gets the value of CacheMissReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReads() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheMissReadsPersec sets the value of CacheMissReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheMissReadsPersec(value uint64) (err error) { + return instance.SetProperty("CacheMissReadsPersec", (value)) +} + +// GetCacheMissReadsPersec gets the value of CacheMissReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheMissReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheMissReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePages sets the value of CachePages for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePages(value uint64) (err error) { + return instance.SetProperty("CachePages", (value)) +} + +// GetCachePages gets the value of CachePages for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePages() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDirty sets the value of CachePagesDirty for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesDirty(value uint64) (err error) { + return instance.SetProperty("CachePagesDirty", (value)) +} + +// GetCachePagesDirty gets the value of CachePagesDirty for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesDirty() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDirtyHot sets the value of CachePagesDirtyHot for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesDirtyHot(value uint64) (err error) { + return instance.SetProperty("CachePagesDirtyHot", (value)) +} + +// GetCachePagesDirtyHot gets the value of CachePagesDirtyHot for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesDirtyHot() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDirtyHot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesDiscardIgnored sets the value of CachePagesDiscardIgnored for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesDiscardIgnored(value uint64) (err error) { + return instance.SetProperty("CachePagesDiscardIgnored", (value)) +} + +// GetCachePagesDiscardIgnored gets the value of CachePagesDiscardIgnored for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesDiscardIgnored() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesDiscardIgnored") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePagesL2 sets the value of CachePagesL2 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePagesL2(value uint64) (err error) { + return instance.SetProperty("CachePagesL2", (value)) +} + +// GetCachePagesL2 gets the value of CachePagesL2 for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePagesL2() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePagesL2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePopulateBytes sets the value of CachePopulateBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePopulateBytes(value uint64) (err error) { + return instance.SetProperty("CachePopulateBytes", (value)) +} + +// GetCachePopulateBytes gets the value of CachePopulateBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePopulateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePopulateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePopulateBytesPersec sets the value of CachePopulateBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCachePopulateBytesPersec(value uint64) (err error) { + return instance.SetProperty("CachePopulateBytesPersec", (value)) +} + +// GetCachePopulateBytesPersec gets the value of CachePopulateBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCachePopulateBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CachePopulateBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBytes sets the value of CacheWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWriteBytes(value uint64) (err error) { + return instance.SetProperty("CacheWriteBytes", (value)) +} + +// GetCacheWriteBytes gets the value of CacheWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBytesPersec sets the value of CacheWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheWriteBytesPersec", (value)) +} + +// GetCacheWriteBytesPersec gets the value of CacheWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWrites sets the value of CacheWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWrites(value uint64) (err error) { + return instance.SetProperty("CacheWrites", (value)) +} + +// GetCacheWrites gets the value of CacheWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWritesPersec sets the value of CacheWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyCacheWritesPersec(value uint64) (err error) { + return instance.SetProperty("CacheWritesPersec", (value)) +} + +// GetCacheWritesPersec gets the value of CacheWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyCacheWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytes sets the value of DestageBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageBytes(value uint64) (err error) { + return instance.SetProperty("DestageBytes", (value)) +} + +// GetDestageBytes gets the value of DestageBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageBytesPersec sets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageBytesPersec(value uint64) (err error) { + return instance.SetProperty("DestageBytesPersec", (value)) +} + +// GetDestageBytesPersec gets the value of DestageBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfers sets the value of DestageTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageTransfers(value uint64) (err error) { + return instance.SetProperty("DestageTransfers", (value)) +} + +// GetDestageTransfers gets the value of DestageTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDestageTransfersPersec sets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDestageTransfersPersec(value uint64) (err error) { + return instance.SetProperty("DestageTransfersPersec", (value)) +} + +// GetDestageTransfersPersec gets the value of DestageTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDestageTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DestageTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReadBytes sets the value of DirectReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReadBytes(value uint64) (err error) { + return instance.SetProperty("DirectReadBytes", (value)) +} + +// GetDirectReadBytes gets the value of DirectReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReadBytesPersec sets the value of DirectReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DirectReadBytesPersec", (value)) +} + +// GetDirectReadBytesPersec gets the value of DirectReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReads sets the value of DirectReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReads(value uint64) (err error) { + return instance.SetProperty("DirectReads", (value)) +} + +// GetDirectReads gets the value of DirectReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectReadsPersec sets the value of DirectReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectReadsPersec(value uint64) (err error) { + return instance.SetProperty("DirectReadsPersec", (value)) +} + +// GetDirectReadsPersec gets the value of DirectReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWriteBytes sets the value of DirectWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWriteBytes(value uint64) (err error) { + return instance.SetProperty("DirectWriteBytes", (value)) +} + +// GetDirectWriteBytes gets the value of DirectWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWriteBytesPersec sets the value of DirectWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DirectWriteBytesPersec", (value)) +} + +// GetDirectWriteBytesPersec gets the value of DirectWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWrites sets the value of DirectWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWrites(value uint64) (err error) { + return instance.SetProperty("DirectWrites", (value)) +} + +// GetDirectWrites gets the value of DirectWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectWritesPersec sets the value of DirectWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirectWritesPersec(value uint64) (err error) { + return instance.SetProperty("DirectWritesPersec", (value)) +} + +// GetDirectWritesPersec gets the value of DirectWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirectWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyReadBytes sets the value of DirtyReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtyReadBytes(value uint64) (err error) { + return instance.SetProperty("DirtyReadBytes", (value)) +} + +// GetDirtyReadBytes gets the value of DirtyReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyReadBytesPersec sets the value of DirtyReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DirtyReadBytesPersec", (value)) +} + +// GetDirtyReadBytesPersec gets the value of DirtyReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtySlots sets the value of DirtySlots for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtySlots(value uint64) (err error) { + return instance.SetProperty("DirtySlots", (value)) +} + +// GetDirtySlots gets the value of DirtySlots for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtySlots() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtySlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtySlotsExpands sets the value of DirtySlotsExpands for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtySlotsExpands(value uint64) (err error) { + return instance.SetProperty("DirtySlotsExpands", (value)) +} + +// GetDirtySlotsExpands gets the value of DirtySlotsExpands for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtySlotsExpands() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtySlotsExpands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtySlotsExpandsPersec sets the value of DirtySlotsExpandsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDirtySlotsExpandsPersec(value uint64) (err error) { + return instance.SetProperty("DirtySlotsExpandsPersec", (value)) +} + +// GetDirtySlotsExpandsPersec gets the value of DirtySlotsExpandsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDirtySlotsExpandsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtySlotsExpandsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskBytes sets the value of DiskBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskBytes(value uint64) (err error) { + return instance.SetProperty("DiskBytes", (value)) +} + +// GetDiskBytes gets the value of DiskBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskBytesPersec sets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskBytesPersec", (value)) +} + +// GetDiskBytesPersec gets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytes sets the value of DiskReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReadBytes(value uint64) (err error) { + return instance.SetProperty("DiskReadBytes", (value)) +} + +// GetDiskReadBytes gets the value of DiskReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytesPersec sets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadBytesPersec", (value)) +} + +// GetDiskReadBytesPersec gets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReads sets the value of DiskReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReads(value uint64) (err error) { + return instance.SetProperty("DiskReads", (value)) +} + +// GetDiskReads gets the value of DiskReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadsPersec sets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskReadsPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadsPersec", (value)) +} + +// GetDiskReadsPersec gets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskTransfers sets the value of DiskTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskTransfers(value uint64) (err error) { + return instance.SetProperty("DiskTransfers", (value)) +} + +// GetDiskTransfers gets the value of DiskTransfers for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskTransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskTransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskTransfersPersec sets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskTransfersPersec(value uint64) (err error) { + return instance.SetProperty("DiskTransfersPersec", (value)) +} + +// GetDiskTransfersPersec gets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWriteBytes sets the value of DiskWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWriteBytes(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytes", (value)) +} + +// GetDiskWriteBytes gets the value of DiskWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWriteBytesPersec sets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytesPersec", (value)) +} + +// GetDiskWriteBytesPersec gets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWrites sets the value of DiskWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWrites(value uint64) (err error) { + return instance.SetProperty("DiskWrites", (value)) +} + +// GetDiskWrites gets the value of DiskWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWritesPersec sets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyDiskWritesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWritesPersec", (value)) +} + +// GetDiskWritesPersec gets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyDiskWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingSlots sets the value of MissingSlots for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyMissingSlots(value uint64) (err error) { + return instance.SetProperty("MissingSlots", (value)) +} + +// GetMissingSlots gets the value of MissingSlots for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyMissingSlots() (value uint64, err error) { + retValue, err := instance.GetProperty("MissingSlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateDiskCacheReads sets the value of RateDiskCacheReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyRateDiskCacheReads(value uint64) (err error) { + return instance.SetProperty("RateDiskCacheReads", (value)) +} + +// GetRateDiskCacheReads gets the value of RateDiskCacheReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyRateDiskCacheReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RateDiskCacheReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateDiskCacheReads_Base sets the value of RateDiskCacheReads_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyRateDiskCacheReads_Base(value uint32) (err error) { + return instance.SetProperty("RateDiskCacheReads_Base", (value)) +} + +// GetRateDiskCacheReads_Base gets the value of RateDiskCacheReads_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyRateDiskCacheReads_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RateDiskCacheReads_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateDiskCacheWrites sets the value of RateDiskCacheWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyRateDiskCacheWrites(value uint64) (err error) { + return instance.SetProperty("RateDiskCacheWrites", (value)) +} + +// GetRateDiskCacheWrites gets the value of RateDiskCacheWrites for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyRateDiskCacheWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("RateDiskCacheWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateDiskCacheWrites_Base sets the value of RateDiskCacheWrites_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyRateDiskCacheWrites_Base(value uint32) (err error) { + return instance.SetProperty("RateDiskCacheWrites_Base", (value)) +} + +// GetRateDiskCacheWrites_Base gets the value of RateDiskCacheWrites_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyRateDiskCacheWrites_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RateDiskCacheWrites_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadErrorsMedia sets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyReadErrorsMedia(value uint64) (err error) { + return instance.SetProperty("ReadErrorsMedia", (value)) +} + +// GetReadErrorsMedia gets the value of ReadErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyReadErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTimeout sets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyReadErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTimeout", (value)) +} + +// GetReadErrorsTimeout gets the value of ReadErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyReadErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTotal sets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyReadErrorsTotal(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTotal", (value)) +} + +// GetReadErrorsTotal gets the value of ReadErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyReadErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsMedia sets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyWriteErrorsMedia(value uint64) (err error) { + return instance.SetProperty("WriteErrorsMedia", (value)) +} + +// GetWriteErrorsMedia gets the value of WriteErrorsMedia for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyWriteErrorsMedia() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsMedia") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTimeout sets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyWriteErrorsTimeout(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTimeout", (value)) +} + +// GetWriteErrorsTimeout gets the value of WriteErrorsTimeout for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyWriteErrorsTimeout() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTotal sets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) SetPropertyWriteErrorsTotal(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTotal", (value)) +} + +// GetWriteErrorsTotal gets the value of WriteErrorsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks) GetPropertyWriteErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go new file mode 100644 index 00000000..d4fc451c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2.go @@ -0,0 +1,300 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2 struct +type Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2 struct { + *Win32_PerfRawData + + // + HeatMapFreeMemory uint64 + + // + HeatMapWindow uint64 + + // + RateDiskVRCReads uint64 + + // + RateDiskVRCReads_Base uint32 + + // + VRCHitReadBytes uint64 + + // + VRCHitReadBytesPersec uint64 + + // + VRCHitReads uint64 + + // + VRCHitReadsPersec uint64 + + // + VRCPopulateBytes uint64 + + // + VRCPopulateBytesPersec uint64 + + // + VRCPopulates uint64 + + // + VRCPopulatesPersec uint64 +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHeatMapFreeMemory sets the value of HeatMapFreeMemory for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyHeatMapFreeMemory(value uint64) (err error) { + return instance.SetProperty("HeatMapFreeMemory", value) +} + +// GetHeatMapFreeMemory gets the value of HeatMapFreeMemory for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyHeatMapFreeMemory() (value uint64, err error) { + retValue, err := instance.GetProperty("HeatMapFreeMemory") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetHeatMapWindow sets the value of HeatMapWindow for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyHeatMapWindow(value uint64) (err error) { + return instance.SetProperty("HeatMapWindow", value) +} + +// GetHeatMapWindow gets the value of HeatMapWindow for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyHeatMapWindow() (value uint64, err error) { + retValue, err := instance.GetProperty("HeatMapWindow") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetRateDiskVRCReads sets the value of RateDiskVRCReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyRateDiskVRCReads(value uint64) (err error) { + return instance.SetProperty("RateDiskVRCReads", value) +} + +// GetRateDiskVRCReads gets the value of RateDiskVRCReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyRateDiskVRCReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RateDiskVRCReads") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetRateDiskVRCReads_Base sets the value of RateDiskVRCReads_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyRateDiskVRCReads_Base(value uint32) (err error) { + return instance.SetProperty("RateDiskVRCReads_Base", value) +} + +// GetRateDiskVRCReads_Base gets the value of RateDiskVRCReads_Base for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyRateDiskVRCReads_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RateDiskVRCReads_Base") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReadBytes sets the value of VRCHitReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReadBytes(value uint64) (err error) { + return instance.SetProperty("VRCHitReadBytes", value) +} + +// GetVRCHitReadBytes gets the value of VRCHitReadBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReadBytes") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReadBytesPersec sets the value of VRCHitReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("VRCHitReadBytesPersec", value) +} + +// GetVRCHitReadBytesPersec gets the value of VRCHitReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReadBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReads sets the value of VRCHitReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReads(value uint64) (err error) { + return instance.SetProperty("VRCHitReads", value) +} + +// GetVRCHitReads gets the value of VRCHitReads for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReads") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCHitReadsPersec sets the value of VRCHitReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCHitReadsPersec(value uint64) (err error) { + return instance.SetProperty("VRCHitReadsPersec", value) +} + +// GetVRCHitReadsPersec gets the value of VRCHitReadsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCHitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCHitReadsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulateBytes sets the value of VRCPopulateBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulateBytes(value uint64) (err error) { + return instance.SetProperty("VRCPopulateBytes", value) +} + +// GetVRCPopulateBytes gets the value of VRCPopulateBytes for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulateBytes") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulateBytesPersec sets the value of VRCPopulateBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulateBytesPersec(value uint64) (err error) { + return instance.SetProperty("VRCPopulateBytesPersec", value) +} + +// GetVRCPopulateBytesPersec gets the value of VRCPopulateBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulateBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulateBytesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulates sets the value of VRCPopulates for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulates(value uint64) (err error) { + return instance.SetProperty("VRCPopulates", value) +} + +// GetVRCPopulates gets the value of VRCPopulates for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulates() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulates") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetVRCPopulatesPersec sets the value of VRCPopulatesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) SetPropertyVRCPopulatesPersec(value uint64) (err error) { + return instance.SetProperty("VRCPopulatesPersec", value) +} + +// GetVRCPopulatesPersec gets the value of VRCPopulatesPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisks2) GetPropertyVRCPopulatesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VRCPopulatesPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go new file mode 100644 index 00000000..fd474188 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile.go @@ -0,0 +1,1970 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile struct +type Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile struct { + *Win32_PerfRawData + + // + CacheWriteBoosts uint64 + + // + CacheWriteBoostsPersec uint64 + + // + CacheWriteBoostsVeto uint64 + + // + CacheWriteBoostsVetoPersec uint64 + + // + Reads0K4K uint64 + + // + Reads1024K2048K uint64 + + // + Reads128K256K uint64 + + // + Reads16K32K uint64 + + // + Reads2048K4096K uint64 + + // + Reads256K512K uint64 + + // + Reads32K64K uint64 + + // + Reads4096Koo uint64 + + // + Reads4K8K uint64 + + // + Reads512K1024K uint64 + + // + Reads64K128K uint64 + + // + Reads8K16K uint64 + + // + Readsnotaligned uint64 + + // + ReadsPagingIO uint64 + + // + ReadsPersec0K4K uint64 + + // + ReadsPersec1024K2048K uint64 + + // + ReadsPersec128K256K uint64 + + // + ReadsPersec16K32K uint64 + + // + ReadsPersec2048K4096K uint64 + + // + ReadsPersec256K512K uint64 + + // + ReadsPersec32K64K uint64 + + // + ReadsPersec4096Koo uint64 + + // + ReadsPersec4K8K uint64 + + // + ReadsPersec512K1024K uint64 + + // + ReadsPersec64K128K uint64 + + // + ReadsPersec8K16K uint64 + + // + ReadsPersecnotaligned uint64 + + // + ReadsPersecPagingIO uint64 + + // + ReadsPersecTotal uint64 + + // + ReadsTotal uint64 + + // + Writes0K4K uint64 + + // + Writes1024K2048K uint64 + + // + Writes128K256K uint64 + + // + Writes16K32K uint64 + + // + Writes2048K4096K uint64 + + // + Writes256K512K uint64 + + // + Writes32K64K uint64 + + // + Writes4096Koo uint64 + + // + Writes4K8K uint64 + + // + Writes512K1024K uint64 + + // + Writes64K128K uint64 + + // + Writes8K16K uint64 + + // + Writesnotaligned uint64 + + // + WritesPagingIO uint64 + + // + WritesPersec0K4K uint64 + + // + WritesPersec1024K2048K uint64 + + // + WritesPersec128K256K uint64 + + // + WritesPersec16K32K uint64 + + // + WritesPersec2048K4096K uint64 + + // + WritesPersec256K512K uint64 + + // + WritesPersec32K64K uint64 + + // + WritesPersec4096Koo uint64 + + // + WritesPersec4K8K uint64 + + // + WritesPersec512K1024K uint64 + + // + WritesPersec64K128K uint64 + + // + WritesPersec8K16K uint64 + + // + WritesPersecnotaligned uint64 + + // + WritesPersecPagingIO uint64 + + // + WritesPersecTotal uint64 + + // + WritesTotal uint64 +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfileEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCacheWriteBoosts sets the value of CacheWriteBoosts for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoosts(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoosts", (value)) +} + +// GetCacheWriteBoosts gets the value of CacheWriteBoosts for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoosts() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoosts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBoostsPersec sets the value of CacheWriteBoostsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoostsPersec(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoostsPersec", (value)) +} + +// GetCacheWriteBoostsPersec gets the value of CacheWriteBoostsPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoostsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoostsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBoostsVeto sets the value of CacheWriteBoostsVeto for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoostsVeto(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoostsVeto", (value)) +} + +// GetCacheWriteBoostsVeto gets the value of CacheWriteBoostsVeto for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoostsVeto() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoostsVeto") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheWriteBoostsVetoPersec sets the value of CacheWriteBoostsVetoPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyCacheWriteBoostsVetoPersec(value uint64) (err error) { + return instance.SetProperty("CacheWriteBoostsVetoPersec", (value)) +} + +// GetCacheWriteBoostsVetoPersec gets the value of CacheWriteBoostsVetoPersec for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyCacheWriteBoostsVetoPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheWriteBoostsVetoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads0K4K sets the value of Reads0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads0K4K(value uint64) (err error) { + return instance.SetProperty("Reads0K4K", (value)) +} + +// GetReads0K4K gets the value of Reads0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads1024K2048K sets the value of Reads1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads1024K2048K(value uint64) (err error) { + return instance.SetProperty("Reads1024K2048K", (value)) +} + +// GetReads1024K2048K gets the value of Reads1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads128K256K sets the value of Reads128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads128K256K(value uint64) (err error) { + return instance.SetProperty("Reads128K256K", (value)) +} + +// GetReads128K256K gets the value of Reads128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads16K32K sets the value of Reads16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads16K32K(value uint64) (err error) { + return instance.SetProperty("Reads16K32K", (value)) +} + +// GetReads16K32K gets the value of Reads16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads2048K4096K sets the value of Reads2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads2048K4096K(value uint64) (err error) { + return instance.SetProperty("Reads2048K4096K", (value)) +} + +// GetReads2048K4096K gets the value of Reads2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads256K512K sets the value of Reads256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads256K512K(value uint64) (err error) { + return instance.SetProperty("Reads256K512K", (value)) +} + +// GetReads256K512K gets the value of Reads256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads32K64K sets the value of Reads32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads32K64K(value uint64) (err error) { + return instance.SetProperty("Reads32K64K", (value)) +} + +// GetReads32K64K gets the value of Reads32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads4096Koo sets the value of Reads4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads4096Koo(value uint64) (err error) { + return instance.SetProperty("Reads4096Koo", (value)) +} + +// GetReads4096Koo gets the value of Reads4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads4K8K sets the value of Reads4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads4K8K(value uint64) (err error) { + return instance.SetProperty("Reads4K8K", (value)) +} + +// GetReads4K8K gets the value of Reads4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads512K1024K sets the value of Reads512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads512K1024K(value uint64) (err error) { + return instance.SetProperty("Reads512K1024K", (value)) +} + +// GetReads512K1024K gets the value of Reads512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads64K128K sets the value of Reads64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads64K128K(value uint64) (err error) { + return instance.SetProperty("Reads64K128K", (value)) +} + +// GetReads64K128K gets the value of Reads64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads8K16K sets the value of Reads8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReads8K16K(value uint64) (err error) { + return instance.SetProperty("Reads8K16K", (value)) +} + +// GetReads8K16K gets the value of Reads8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReads8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsnotaligned sets the value of Readsnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsnotaligned(value uint64) (err error) { + return instance.SetProperty("Readsnotaligned", (value)) +} + +// GetReadsnotaligned gets the value of Readsnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("Readsnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPagingIO sets the value of ReadsPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPagingIO(value uint64) (err error) { + return instance.SetProperty("ReadsPagingIO", (value)) +} + +// GetReadsPagingIO gets the value of ReadsPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec0K4K sets the value of ReadsPersec0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec0K4K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec0K4K", (value)) +} + +// GetReadsPersec0K4K gets the value of ReadsPersec0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec1024K2048K sets the value of ReadsPersec1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec1024K2048K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec1024K2048K", (value)) +} + +// GetReadsPersec1024K2048K gets the value of ReadsPersec1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec128K256K sets the value of ReadsPersec128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec128K256K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec128K256K", (value)) +} + +// GetReadsPersec128K256K gets the value of ReadsPersec128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec16K32K sets the value of ReadsPersec16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec16K32K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec16K32K", (value)) +} + +// GetReadsPersec16K32K gets the value of ReadsPersec16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec2048K4096K sets the value of ReadsPersec2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec2048K4096K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec2048K4096K", (value)) +} + +// GetReadsPersec2048K4096K gets the value of ReadsPersec2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec256K512K sets the value of ReadsPersec256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec256K512K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec256K512K", (value)) +} + +// GetReadsPersec256K512K gets the value of ReadsPersec256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec32K64K sets the value of ReadsPersec32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec32K64K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec32K64K", (value)) +} + +// GetReadsPersec32K64K gets the value of ReadsPersec32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec4096Koo sets the value of ReadsPersec4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec4096Koo(value uint64) (err error) { + return instance.SetProperty("ReadsPersec4096Koo", (value)) +} + +// GetReadsPersec4096Koo gets the value of ReadsPersec4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec4K8K sets the value of ReadsPersec4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec4K8K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec4K8K", (value)) +} + +// GetReadsPersec4K8K gets the value of ReadsPersec4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec512K1024K sets the value of ReadsPersec512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec512K1024K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec512K1024K", (value)) +} + +// GetReadsPersec512K1024K gets the value of ReadsPersec512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec64K128K sets the value of ReadsPersec64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec64K128K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec64K128K", (value)) +} + +// GetReadsPersec64K128K gets the value of ReadsPersec64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec8K16K sets the value of ReadsPersec8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersec8K16K(value uint64) (err error) { + return instance.SetProperty("ReadsPersec8K16K", (value)) +} + +// GetReadsPersec8K16K gets the value of ReadsPersec8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersec8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersecnotaligned sets the value of ReadsPersecnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersecnotaligned(value uint64) (err error) { + return instance.SetProperty("ReadsPersecnotaligned", (value)) +} + +// GetReadsPersecnotaligned gets the value of ReadsPersecnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersecnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersecnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersecPagingIO sets the value of ReadsPersecPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersecPagingIO(value uint64) (err error) { + return instance.SetProperty("ReadsPersecPagingIO", (value)) +} + +// GetReadsPersecPagingIO gets the value of ReadsPersecPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersecPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersecPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersecTotal sets the value of ReadsPersecTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsPersecTotal(value uint64) (err error) { + return instance.SetProperty("ReadsPersecTotal", (value)) +} + +// GetReadsPersecTotal gets the value of ReadsPersecTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsPersecTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersecTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsTotal sets the value of ReadsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyReadsTotal(value uint64) (err error) { + return instance.SetProperty("ReadsTotal", (value)) +} + +// GetReadsTotal gets the value of ReadsTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyReadsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites0K4K sets the value of Writes0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites0K4K(value uint64) (err error) { + return instance.SetProperty("Writes0K4K", (value)) +} + +// GetWrites0K4K gets the value of Writes0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites1024K2048K sets the value of Writes1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites1024K2048K(value uint64) (err error) { + return instance.SetProperty("Writes1024K2048K", (value)) +} + +// GetWrites1024K2048K gets the value of Writes1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites128K256K sets the value of Writes128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites128K256K(value uint64) (err error) { + return instance.SetProperty("Writes128K256K", (value)) +} + +// GetWrites128K256K gets the value of Writes128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites16K32K sets the value of Writes16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites16K32K(value uint64) (err error) { + return instance.SetProperty("Writes16K32K", (value)) +} + +// GetWrites16K32K gets the value of Writes16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites2048K4096K sets the value of Writes2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites2048K4096K(value uint64) (err error) { + return instance.SetProperty("Writes2048K4096K", (value)) +} + +// GetWrites2048K4096K gets the value of Writes2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites256K512K sets the value of Writes256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites256K512K(value uint64) (err error) { + return instance.SetProperty("Writes256K512K", (value)) +} + +// GetWrites256K512K gets the value of Writes256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites32K64K sets the value of Writes32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites32K64K(value uint64) (err error) { + return instance.SetProperty("Writes32K64K", (value)) +} + +// GetWrites32K64K gets the value of Writes32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites4096Koo sets the value of Writes4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites4096Koo(value uint64) (err error) { + return instance.SetProperty("Writes4096Koo", (value)) +} + +// GetWrites4096Koo gets the value of Writes4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites4K8K sets the value of Writes4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites4K8K(value uint64) (err error) { + return instance.SetProperty("Writes4K8K", (value)) +} + +// GetWrites4K8K gets the value of Writes4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites512K1024K sets the value of Writes512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites512K1024K(value uint64) (err error) { + return instance.SetProperty("Writes512K1024K", (value)) +} + +// GetWrites512K1024K gets the value of Writes512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites64K128K sets the value of Writes64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites64K128K(value uint64) (err error) { + return instance.SetProperty("Writes64K128K", (value)) +} + +// GetWrites64K128K gets the value of Writes64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites8K16K sets the value of Writes8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWrites8K16K(value uint64) (err error) { + return instance.SetProperty("Writes8K16K", (value)) +} + +// GetWrites8K16K gets the value of Writes8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWrites8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesnotaligned sets the value of Writesnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesnotaligned(value uint64) (err error) { + return instance.SetProperty("Writesnotaligned", (value)) +} + +// GetWritesnotaligned gets the value of Writesnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("Writesnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPagingIO sets the value of WritesPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPagingIO(value uint64) (err error) { + return instance.SetProperty("WritesPagingIO", (value)) +} + +// GetWritesPagingIO gets the value of WritesPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec0K4K sets the value of WritesPersec0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec0K4K(value uint64) (err error) { + return instance.SetProperty("WritesPersec0K4K", (value)) +} + +// GetWritesPersec0K4K gets the value of WritesPersec0K4K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec0K4K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec0K4K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec1024K2048K sets the value of WritesPersec1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec1024K2048K(value uint64) (err error) { + return instance.SetProperty("WritesPersec1024K2048K", (value)) +} + +// GetWritesPersec1024K2048K gets the value of WritesPersec1024K2048K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec1024K2048K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec1024K2048K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec128K256K sets the value of WritesPersec128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec128K256K(value uint64) (err error) { + return instance.SetProperty("WritesPersec128K256K", (value)) +} + +// GetWritesPersec128K256K gets the value of WritesPersec128K256K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec128K256K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec128K256K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec16K32K sets the value of WritesPersec16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec16K32K(value uint64) (err error) { + return instance.SetProperty("WritesPersec16K32K", (value)) +} + +// GetWritesPersec16K32K gets the value of WritesPersec16K32K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec16K32K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec16K32K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec2048K4096K sets the value of WritesPersec2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec2048K4096K(value uint64) (err error) { + return instance.SetProperty("WritesPersec2048K4096K", (value)) +} + +// GetWritesPersec2048K4096K gets the value of WritesPersec2048K4096K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec2048K4096K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec2048K4096K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec256K512K sets the value of WritesPersec256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec256K512K(value uint64) (err error) { + return instance.SetProperty("WritesPersec256K512K", (value)) +} + +// GetWritesPersec256K512K gets the value of WritesPersec256K512K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec256K512K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec256K512K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec32K64K sets the value of WritesPersec32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec32K64K(value uint64) (err error) { + return instance.SetProperty("WritesPersec32K64K", (value)) +} + +// GetWritesPersec32K64K gets the value of WritesPersec32K64K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec32K64K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec32K64K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec4096Koo sets the value of WritesPersec4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec4096Koo(value uint64) (err error) { + return instance.SetProperty("WritesPersec4096Koo", (value)) +} + +// GetWritesPersec4096Koo gets the value of WritesPersec4096Koo for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec4096Koo() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec4096Koo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec4K8K sets the value of WritesPersec4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec4K8K(value uint64) (err error) { + return instance.SetProperty("WritesPersec4K8K", (value)) +} + +// GetWritesPersec4K8K gets the value of WritesPersec4K8K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec4K8K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec4K8K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec512K1024K sets the value of WritesPersec512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec512K1024K(value uint64) (err error) { + return instance.SetProperty("WritesPersec512K1024K", (value)) +} + +// GetWritesPersec512K1024K gets the value of WritesPersec512K1024K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec512K1024K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec512K1024K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec64K128K sets the value of WritesPersec64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec64K128K(value uint64) (err error) { + return instance.SetProperty("WritesPersec64K128K", (value)) +} + +// GetWritesPersec64K128K gets the value of WritesPersec64K128K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec64K128K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec64K128K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec8K16K sets the value of WritesPersec8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersec8K16K(value uint64) (err error) { + return instance.SetProperty("WritesPersec8K16K", (value)) +} + +// GetWritesPersec8K16K gets the value of WritesPersec8K16K for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersec8K16K() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec8K16K") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersecnotaligned sets the value of WritesPersecnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersecnotaligned(value uint64) (err error) { + return instance.SetProperty("WritesPersecnotaligned", (value)) +} + +// GetWritesPersecnotaligned gets the value of WritesPersecnotaligned for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersecnotaligned() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersecnotaligned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersecPagingIO sets the value of WritesPersecPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersecPagingIO(value uint64) (err error) { + return instance.SetProperty("WritesPersecPagingIO", (value)) +} + +// GetWritesPersecPagingIO gets the value of WritesPersecPagingIO for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersecPagingIO() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersecPagingIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersecTotal sets the value of WritesPersecTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesPersecTotal(value uint64) (err error) { + return instance.SetProperty("WritesPersecTotal", (value)) +} + +// GetWritesPersecTotal gets the value of WritesPersecTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesPersecTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersecTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesTotal sets the value of WritesTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) SetPropertyWritesTotal(value uint64) (err error) { + return instance.SetProperty("WritesTotal", (value)) +} + +// GetWritesTotal gets the value of WritesTotal for the instance +func (instance *Win32_PerfRawData_ClusBfltPerfProvider_ClusterStorageHybridDisksIOProfile) GetPropertyWritesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters.go new file mode 100644 index 00000000..53b87ba3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters.go @@ -0,0 +1,1730 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters struct +type Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters struct { + *Win32_PerfRawData + + // + ExceededLatencyLimit uint64 + + // + ExceededLatencyLimitPersec uint32 + + // + IO10000msPersec uint32 + + // + IO1000msPersec uint32 + + // + IO100msPersec uint32 + + // + IO10msPersec uint32 + + // + IO1msPersec uint32 + + // + IO5msPersec uint32 + + // + LocalReadAvgQueueLength uint64 + + // + LocalReadBytes uint64 + + // + LocalReadBytesPersec uint64 + + // + LocalReadLatency uint32 + + // + LocalReadLatency_Base uint32 + + // + LocalReadPersec uint32 + + // + LocalReadQueueLength uint64 + + // + LocalReads uint64 + + // + LocalWriteAvgQueueLength uint64 + + // + LocalWriteBytes uint64 + + // + LocalWriteBytesPersec uint64 + + // + LocalWriteLatency uint32 + + // + LocalWriteLatency_Base uint32 + + // + LocalWriteQueueLength uint64 + + // + LocalWrites uint64 + + // + LocalWritesPersec uint32 + + // + ReadAvgQueueLength uint64 + + // + ReadBytes uint64 + + // + ReadBytesPersec uint64 + + // + ReadLatency uint32 + + // + ReadLatency_Base uint32 + + // + ReadPersec uint32 + + // + ReadQueueLength uint64 + + // + Reads uint64 + + // + RemoteReadAvgQueueLength uint64 + + // + RemoteReadBytes uint64 + + // + RemoteReadBytesPersec uint64 + + // + RemoteReadLatency uint32 + + // + RemoteReadLatency_Base uint32 + + // + RemoteReadPersec uint32 + + // + RemoteReadQueueLength uint64 + + // + RemoteReads uint64 + + // + RemoteWriteAvgQueueLength uint64 + + // + RemoteWriteBytes uint64 + + // + RemoteWriteBytesPersec uint64 + + // + RemoteWriteLatency uint32 + + // + RemoteWriteLatency_Base uint32 + + // + RemoteWriteQueueLength uint64 + + // + RemoteWrites uint64 + + // + RemoteWritesPersec uint32 + + // + WriteAvgQueueLength uint64 + + // + WriteBytes uint64 + + // + WriteBytesPersec uint32 + + // + WriteLatency uint32 + + // + WriteLatency_Base uint32 + + // + WriteQueueLength uint64 + + // + Writes uint64 + + // + WritesPersec uint32 +} + +func NewWin32_PerfRawData_ClusportPerfProvider_ClusterDiskCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClusportPerfProvider_ClusterDiskCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetExceededLatencyLimit sets the value of ExceededLatencyLimit for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyExceededLatencyLimit(value uint64) (err error) { + return instance.SetProperty("ExceededLatencyLimit", (value)) +} + +// GetExceededLatencyLimit gets the value of ExceededLatencyLimit for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyExceededLatencyLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("ExceededLatencyLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExceededLatencyLimitPersec sets the value of ExceededLatencyLimitPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyExceededLatencyLimitPersec(value uint32) (err error) { + return instance.SetProperty("ExceededLatencyLimitPersec", (value)) +} + +// GetExceededLatencyLimitPersec gets the value of ExceededLatencyLimitPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyExceededLatencyLimitPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExceededLatencyLimitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO10000msPersec sets the value of IO10000msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO10000msPersec(value uint32) (err error) { + return instance.SetProperty("IO10000msPersec", (value)) +} + +// GetIO10000msPersec gets the value of IO10000msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO10000msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO10000msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO1000msPersec sets the value of IO1000msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO1000msPersec(value uint32) (err error) { + return instance.SetProperty("IO1000msPersec", (value)) +} + +// GetIO1000msPersec gets the value of IO1000msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO1000msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO1000msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO100msPersec sets the value of IO100msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO100msPersec(value uint32) (err error) { + return instance.SetProperty("IO100msPersec", (value)) +} + +// GetIO100msPersec gets the value of IO100msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO100msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO100msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO10msPersec sets the value of IO10msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO10msPersec(value uint32) (err error) { + return instance.SetProperty("IO10msPersec", (value)) +} + +// GetIO10msPersec gets the value of IO10msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO10msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO10msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO1msPersec sets the value of IO1msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO1msPersec(value uint32) (err error) { + return instance.SetProperty("IO1msPersec", (value)) +} + +// GetIO1msPersec gets the value of IO1msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO1msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO1msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIO5msPersec sets the value of IO5msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyIO5msPersec(value uint32) (err error) { + return instance.SetProperty("IO5msPersec", (value)) +} + +// GetIO5msPersec gets the value of IO5msPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyIO5msPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IO5msPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadAvgQueueLength sets the value of LocalReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalReadAvgQueueLength", (value)) +} + +// GetLocalReadAvgQueueLength gets the value of LocalReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReadBytes sets the value of LocalReadBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadBytes(value uint64) (err error) { + return instance.SetProperty("LocalReadBytes", (value)) +} + +// GetLocalReadBytes gets the value of LocalReadBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReadBytesPersec sets the value of LocalReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("LocalReadBytesPersec", (value)) +} + +// GetLocalReadBytesPersec gets the value of LocalReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReadLatency sets the value of LocalReadLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadLatency(value uint32) (err error) { + return instance.SetProperty("LocalReadLatency", (value)) +} + +// GetLocalReadLatency gets the value of LocalReadLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadLatency_Base sets the value of LocalReadLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("LocalReadLatency_Base", (value)) +} + +// GetLocalReadLatency_Base gets the value of LocalReadLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadPersec sets the value of LocalReadPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadPersec(value uint32) (err error) { + return instance.SetProperty("LocalReadPersec", (value)) +} + +// GetLocalReadPersec gets the value of LocalReadPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalReadQueueLength sets the value of LocalReadQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReadQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalReadQueueLength", (value)) +} + +// GetLocalReadQueueLength gets the value of LocalReadQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalReads sets the value of LocalReads for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalReads(value uint64) (err error) { + return instance.SetProperty("LocalReads", (value)) +} + +// GetLocalReads gets the value of LocalReads for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalReads() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteAvgQueueLength sets the value of LocalWriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalWriteAvgQueueLength", (value)) +} + +// GetLocalWriteAvgQueueLength gets the value of LocalWriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteBytes sets the value of LocalWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteBytes(value uint64) (err error) { + return instance.SetProperty("LocalWriteBytes", (value)) +} + +// GetLocalWriteBytes gets the value of LocalWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteBytesPersec sets the value of LocalWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("LocalWriteBytesPersec", (value)) +} + +// GetLocalWriteBytesPersec gets the value of LocalWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWriteLatency sets the value of LocalWriteLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteLatency(value uint32) (err error) { + return instance.SetProperty("LocalWriteLatency", (value)) +} + +// GetLocalWriteLatency gets the value of LocalWriteLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalWriteLatency_Base sets the value of LocalWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("LocalWriteLatency_Base", (value)) +} + +// GetLocalWriteLatency_Base gets the value of LocalWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalWriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLocalWriteQueueLength sets the value of LocalWriteQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("LocalWriteQueueLength", (value)) +} + +// GetLocalWriteQueueLength gets the value of LocalWriteQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWrites sets the value of LocalWrites for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWrites(value uint64) (err error) { + return instance.SetProperty("LocalWrites", (value)) +} + +// GetLocalWrites gets the value of LocalWrites for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalWritesPersec sets the value of LocalWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyLocalWritesPersec(value uint32) (err error) { + return instance.SetProperty("LocalWritesPersec", (value)) +} + +// GetLocalWritesPersec gets the value of LocalWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyLocalWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LocalWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadAvgQueueLength sets the value of ReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("ReadAvgQueueLength", (value)) +} + +// GetReadAvgQueueLength gets the value of ReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytes sets the value of ReadBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadBytes(value uint64) (err error) { + return instance.SetProperty("ReadBytes", (value)) +} + +// GetReadBytes gets the value of ReadBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadLatency sets the value of ReadLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadLatency(value uint32) (err error) { + return instance.SetProperty("ReadLatency", (value)) +} + +// GetReadLatency gets the value of ReadLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadLatency_Base sets the value of ReadLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("ReadLatency_Base", (value)) +} + +// GetReadLatency_Base gets the value of ReadLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPersec sets the value of ReadPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadPersec(value uint32) (err error) { + return instance.SetProperty("ReadPersec", (value)) +} + +// GetReadPersec gets the value of ReadPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadQueueLength sets the value of ReadQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReadQueueLength(value uint64) (err error) { + return instance.SetProperty("ReadQueueLength", (value)) +} + +// GetReadQueueLength gets the value of ReadQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadAvgQueueLength sets the value of RemoteReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteReadAvgQueueLength", (value)) +} + +// GetRemoteReadAvgQueueLength gets the value of RemoteReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadBytes sets the value of RemoteReadBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadBytes(value uint64) (err error) { + return instance.SetProperty("RemoteReadBytes", (value)) +} + +// GetRemoteReadBytes gets the value of RemoteReadBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadBytesPersec sets the value of RemoteReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("RemoteReadBytesPersec", (value)) +} + +// GetRemoteReadBytesPersec gets the value of RemoteReadBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReadLatency sets the value of RemoteReadLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadLatency(value uint32) (err error) { + return instance.SetProperty("RemoteReadLatency", (value)) +} + +// GetRemoteReadLatency gets the value of RemoteReadLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteReadLatency_Base sets the value of RemoteReadLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("RemoteReadLatency_Base", (value)) +} + +// GetRemoteReadLatency_Base gets the value of RemoteReadLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteReadPersec sets the value of RemoteReadPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadPersec(value uint32) (err error) { + return instance.SetProperty("RemoteReadPersec", (value)) +} + +// GetRemoteReadPersec gets the value of RemoteReadPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteReadQueueLength sets the value of RemoteReadQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReadQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteReadQueueLength", (value)) +} + +// GetRemoteReadQueueLength gets the value of RemoteReadQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteReads sets the value of RemoteReads for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteReads(value uint64) (err error) { + return instance.SetProperty("RemoteReads", (value)) +} + +// GetRemoteReads gets the value of RemoteReads for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteAvgQueueLength sets the value of RemoteWriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteWriteAvgQueueLength", (value)) +} + +// GetRemoteWriteAvgQueueLength gets the value of RemoteWriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteBytes sets the value of RemoteWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteBytes(value uint64) (err error) { + return instance.SetProperty("RemoteWriteBytes", (value)) +} + +// GetRemoteWriteBytes gets the value of RemoteWriteBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteBytesPersec sets the value of RemoteWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("RemoteWriteBytesPersec", (value)) +} + +// GetRemoteWriteBytesPersec gets the value of RemoteWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWriteLatency sets the value of RemoteWriteLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteLatency(value uint32) (err error) { + return instance.SetProperty("RemoteWriteLatency", (value)) +} + +// GetRemoteWriteLatency gets the value of RemoteWriteLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteWriteLatency_Base sets the value of RemoteWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("RemoteWriteLatency_Base", (value)) +} + +// GetRemoteWriteLatency_Base gets the value of RemoteWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteWriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteWriteQueueLength sets the value of RemoteWriteQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("RemoteWriteQueueLength", (value)) +} + +// GetRemoteWriteQueueLength gets the value of RemoteWriteQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWrites sets the value of RemoteWrites for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWrites(value uint64) (err error) { + return instance.SetProperty("RemoteWrites", (value)) +} + +// GetRemoteWrites gets the value of RemoteWrites for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("RemoteWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemoteWritesPersec sets the value of RemoteWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyRemoteWritesPersec(value uint32) (err error) { + return instance.SetProperty("RemoteWritesPersec", (value)) +} + +// GetRemoteWritesPersec gets the value of RemoteWritesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyRemoteWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteAvgQueueLength sets the value of WriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("WriteAvgQueueLength", (value)) +} + +// GetWriteAvgQueueLength gets the value of WriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytes sets the value of WriteBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteBytes(value uint64) (err error) { + return instance.SetProperty("WriteBytes", (value)) +} + +// GetWriteBytes gets the value of WriteBytes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteBytesPersec(value uint32) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteBytesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteLatency sets the value of WriteLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteLatency(value uint32) (err error) { + return instance.SetProperty("WriteLatency", (value)) +} + +// GetWriteLatency gets the value of WriteLatency for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteLatency_Base sets the value of WriteLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("WriteLatency_Base", (value)) +} + +// GetWriteLatency_Base gets the value of WriteLatency_Base for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteQueueLength sets the value of WriteQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("WriteQueueLength", (value)) +} + +// GetWriteQueueLength gets the value of WriteQueueLength for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) SetPropertyWritesPersec(value uint32) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_ClusportPerfProvider_ClusterDiskCounters) GetPropertyWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls.go new file mode 100644 index 00000000..7d96e420 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls struct { + *Win32_PerfRawData + + // + ClusterAPICallsPersec uint64 + + // + GroupAPICallsPersec uint64 + + // + KeyAPICallsPersec uint64 + + // + NetworkAPICallsPersec uint64 + + // + NetworkInterfaceAPICallsPersec uint64 + + // + NodeAPICallsPersec uint64 + + // + NotificationAPICallsPersec uint64 + + // + NotificationBatchAPICallsPersec uint64 + + // + ResourceAPICallsPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterAPICallsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterAPICallsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls{ + Win32_PerfRawData: tmp, + } + return +} + +// SetClusterAPICallsPersec sets the value of ClusterAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyClusterAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("ClusterAPICallsPersec", (value)) +} + +// GetClusterAPICallsPersec gets the value of ClusterAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyClusterAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGroupAPICallsPersec sets the value of GroupAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyGroupAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("GroupAPICallsPersec", (value)) +} + +// GetGroupAPICallsPersec gets the value of GroupAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyGroupAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKeyAPICallsPersec sets the value of KeyAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyKeyAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("KeyAPICallsPersec", (value)) +} + +// GetKeyAPICallsPersec gets the value of KeyAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyKeyAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("KeyAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkAPICallsPersec sets the value of NetworkAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNetworkAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NetworkAPICallsPersec", (value)) +} + +// GetNetworkAPICallsPersec gets the value of NetworkAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNetworkAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkInterfaceAPICallsPersec sets the value of NetworkInterfaceAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNetworkInterfaceAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NetworkInterfaceAPICallsPersec", (value)) +} + +// GetNetworkInterfaceAPICallsPersec gets the value of NetworkInterfaceAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNetworkInterfaceAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkInterfaceAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNodeAPICallsPersec sets the value of NodeAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNodeAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NodeAPICallsPersec", (value)) +} + +// GetNodeAPICallsPersec gets the value of NodeAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNodeAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NodeAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationAPICallsPersec sets the value of NotificationAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNotificationAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NotificationAPICallsPersec", (value)) +} + +// GetNotificationAPICallsPersec gets the value of NotificationAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNotificationAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationBatchAPICallsPersec sets the value of NotificationBatchAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyNotificationBatchAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("NotificationBatchAPICallsPersec", (value)) +} + +// GetNotificationBatchAPICallsPersec gets the value of NotificationBatchAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyNotificationBatchAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationBatchAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceAPICallsPersec sets the value of ResourceAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) SetPropertyResourceAPICallsPersec(value uint64) (err error) { + return instance.SetProperty("ResourceAPICallsPersec", (value)) +} + +// GetResourceAPICallsPersec gets the value of ResourceAPICallsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPICalls) GetPropertyResourceAPICallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceAPICallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles.go new file mode 100644 index 00000000..0f105be6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles struct { + *Win32_PerfRawData + + // + BatchHandles uint64 + + // + BatchHandlesPersec uint64 + + // + ClusterHandles uint64 + + // + ClusterHandlesPersec uint64 + + // + GroupHandles uint64 + + // + GroupHandlesPersec uint64 + + // + KeyHandles uint64 + + // + KeyHandlesPersec uint64 + + // + NetworkHandles uint64 + + // + NetworkHandlesPersec uint64 + + // + NetworkInterfaceHandles uint64 + + // + NetworkInterfaceHandlesPersec uint64 + + // + NodeHandles uint64 + + // + NodeHandlesPersec uint64 + + // + NotificationHandles uint64 + + // + NotificationHandlesPersec uint64 + + // + ResourceHandles uint64 + + // + ResourceHandlesPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandlesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandlesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBatchHandles sets the value of BatchHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyBatchHandles(value uint64) (err error) { + return instance.SetProperty("BatchHandles", (value)) +} + +// GetBatchHandles gets the value of BatchHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyBatchHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("BatchHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBatchHandlesPersec sets the value of BatchHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyBatchHandlesPersec(value uint64) (err error) { + return instance.SetProperty("BatchHandlesPersec", (value)) +} + +// GetBatchHandlesPersec gets the value of BatchHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyBatchHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BatchHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClusterHandles sets the value of ClusterHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyClusterHandles(value uint64) (err error) { + return instance.SetProperty("ClusterHandles", (value)) +} + +// GetClusterHandles gets the value of ClusterHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyClusterHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClusterHandlesPersec sets the value of ClusterHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyClusterHandlesPersec(value uint64) (err error) { + return instance.SetProperty("ClusterHandlesPersec", (value)) +} + +// GetClusterHandlesPersec gets the value of ClusterHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyClusterHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ClusterHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGroupHandles sets the value of GroupHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyGroupHandles(value uint64) (err error) { + return instance.SetProperty("GroupHandles", (value)) +} + +// GetGroupHandles gets the value of GroupHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyGroupHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGroupHandlesPersec sets the value of GroupHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyGroupHandlesPersec(value uint64) (err error) { + return instance.SetProperty("GroupHandlesPersec", (value)) +} + +// GetGroupHandlesPersec gets the value of GroupHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyGroupHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKeyHandles sets the value of KeyHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyKeyHandles(value uint64) (err error) { + return instance.SetProperty("KeyHandles", (value)) +} + +// GetKeyHandles gets the value of KeyHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyKeyHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("KeyHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKeyHandlesPersec sets the value of KeyHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyKeyHandlesPersec(value uint64) (err error) { + return instance.SetProperty("KeyHandlesPersec", (value)) +} + +// GetKeyHandlesPersec gets the value of KeyHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyKeyHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("KeyHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkHandles sets the value of NetworkHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkHandles(value uint64) (err error) { + return instance.SetProperty("NetworkHandles", (value)) +} + +// GetNetworkHandles gets the value of NetworkHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkHandlesPersec sets the value of NetworkHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NetworkHandlesPersec", (value)) +} + +// GetNetworkHandlesPersec gets the value of NetworkHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkInterfaceHandles sets the value of NetworkInterfaceHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkInterfaceHandles(value uint64) (err error) { + return instance.SetProperty("NetworkInterfaceHandles", (value)) +} + +// GetNetworkInterfaceHandles gets the value of NetworkInterfaceHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkInterfaceHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkInterfaceHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkInterfaceHandlesPersec sets the value of NetworkInterfaceHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNetworkInterfaceHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NetworkInterfaceHandlesPersec", (value)) +} + +// GetNetworkInterfaceHandlesPersec gets the value of NetworkInterfaceHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNetworkInterfaceHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkInterfaceHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNodeHandles sets the value of NodeHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNodeHandles(value uint64) (err error) { + return instance.SetProperty("NodeHandles", (value)) +} + +// GetNodeHandles gets the value of NodeHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNodeHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NodeHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNodeHandlesPersec sets the value of NodeHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNodeHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NodeHandlesPersec", (value)) +} + +// GetNodeHandlesPersec gets the value of NodeHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNodeHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NodeHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationHandles sets the value of NotificationHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNotificationHandles(value uint64) (err error) { + return instance.SetProperty("NotificationHandles", (value)) +} + +// GetNotificationHandles gets the value of NotificationHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNotificationHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotificationHandlesPersec sets the value of NotificationHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyNotificationHandlesPersec(value uint64) (err error) { + return instance.SetProperty("NotificationHandlesPersec", (value)) +} + +// GetNotificationHandlesPersec gets the value of NotificationHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyNotificationHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NotificationHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceHandles sets the value of ResourceHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyResourceHandles(value uint64) (err error) { + return instance.SetProperty("ResourceHandles", (value)) +} + +// GetResourceHandles gets the value of ResourceHandles for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyResourceHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceHandlesPersec sets the value of ResourceHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) SetPropertyResourceHandlesPersec(value uint64) (err error) { + return instance.SetProperty("ResourceHandlesPersec", (value)) +} + +// GetResourceHandlesPersec gets the value of ResourceHandlesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterAPIHandles) GetPropertyResourceHandlesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceHandlesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager.go new file mode 100644 index 00000000..613c2f16 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager struct { + *Win32_PerfRawData + + // + CryptoCheckpointsRestored uint64 + + // + CryptoCheckpointsRestoredPersec uint64 + + // + CryptoCheckpointsSaved uint64 + + // + CryptoCheckpointsSavedPersec uint64 + + // + RegistryCheckpointsRestored uint64 + + // + RegistryCheckpointsRestoredPersec uint64 + + // + RegistryCheckpointsSaved uint64 + + // + RegistryCheckpointsSavedPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCryptoCheckpointsRestored sets the value of CryptoCheckpointsRestored for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsRestored(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsRestored", (value)) +} + +// GetCryptoCheckpointsRestored gets the value of CryptoCheckpointsRestored for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsRestored() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsRestored") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCryptoCheckpointsRestoredPersec sets the value of CryptoCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsRestoredPersec(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsRestoredPersec", (value)) +} + +// GetCryptoCheckpointsRestoredPersec gets the value of CryptoCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsRestoredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsRestoredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCryptoCheckpointsSaved sets the value of CryptoCheckpointsSaved for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsSaved(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsSaved", (value)) +} + +// GetCryptoCheckpointsSaved gets the value of CryptoCheckpointsSaved for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsSaved() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsSaved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCryptoCheckpointsSavedPersec sets the value of CryptoCheckpointsSavedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyCryptoCheckpointsSavedPersec(value uint64) (err error) { + return instance.SetProperty("CryptoCheckpointsSavedPersec", (value)) +} + +// GetCryptoCheckpointsSavedPersec gets the value of CryptoCheckpointsSavedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyCryptoCheckpointsSavedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CryptoCheckpointsSavedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsRestored sets the value of RegistryCheckpointsRestored for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsRestored(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsRestored", (value)) +} + +// GetRegistryCheckpointsRestored gets the value of RegistryCheckpointsRestored for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsRestored() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsRestored") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsRestoredPersec sets the value of RegistryCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsRestoredPersec(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsRestoredPersec", (value)) +} + +// GetRegistryCheckpointsRestoredPersec gets the value of RegistryCheckpointsRestoredPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsRestoredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsRestoredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsSaved sets the value of RegistryCheckpointsSaved for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsSaved(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsSaved", (value)) +} + +// GetRegistryCheckpointsSaved gets the value of RegistryCheckpointsSaved for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsSaved() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsSaved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRegistryCheckpointsSavedPersec sets the value of RegistryCheckpointsSavedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) SetPropertyRegistryCheckpointsSavedPersec(value uint64) (err error) { + return instance.SetProperty("RegistryCheckpointsSavedPersec", (value)) +} + +// GetRegistryCheckpointsSavedPersec gets the value of RegistryCheckpointsSavedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterCheckpointManager) GetPropertyRegistryCheckpointsSavedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RegistryCheckpointsSavedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase.go new file mode 100644 index 00000000..7c672e1e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase struct { + *Win32_PerfRawData + + // + Flushes uint64 + + // + FlushesPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterDatabaseEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterDatabaseEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase{ + Win32_PerfRawData: tmp, + } + return +} + +// SetFlushes sets the value of Flushes for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase) SetPropertyFlushes(value uint64) (err error) { + return instance.SetProperty("Flushes", (value)) +} + +// GetFlushes gets the value of Flushes for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase) GetPropertyFlushes() (value uint64, err error) { + retValue, err := instance.GetProperty("Flushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushesPersec sets the value of FlushesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase) SetPropertyFlushesPersec(value uint64) (err error) { + return instance.SetProperty("FlushesPersec", (value)) +} + +// GetFlushesPersec gets the value of FlushesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterDatabase) GetPropertyFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go new file mode 100644 index 00000000..fe0c015b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages struct { + *Win32_PerfRawData + + // + AverageDatabaseMessagesExecutionTime uint32 + + // + AverageDatabaseMessagesExecutionTime_Base uint32 + + // + AverageMessagesExecutionTime uint32 + + // + AverageMessagesExecutionTime_Base uint32 + + // + AverageWaitingTimeToExecuteDatabaseMessages uint32 + + // + AverageWaitingTimeToExecuteDatabaseMessages_Base uint32 + + // + AverageWaitingTimeToExecuteMessages uint32 + + // + AverageWaitingTimeToExecuteMessages_Base uint32 + + // + DatabaseMessagesQueueLength uint64 + + // + DatabaseUpdateMessages uint64 + + // + DatabaseUpdateMessagesPersec uint64 + + // + MessagesExecutionQueueLength uint64 + + // + MessagesQueueLength uint64 + + // + UpdateMessages uint64 + + // + UpdateMessagesPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageDatabaseMessagesExecutionTime sets the value of AverageDatabaseMessagesExecutionTime for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageDatabaseMessagesExecutionTime(value uint32) (err error) { + return instance.SetProperty("AverageDatabaseMessagesExecutionTime", (value)) +} + +// GetAverageDatabaseMessagesExecutionTime gets the value of AverageDatabaseMessagesExecutionTime for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageDatabaseMessagesExecutionTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageDatabaseMessagesExecutionTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageDatabaseMessagesExecutionTime_Base sets the value of AverageDatabaseMessagesExecutionTime_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageDatabaseMessagesExecutionTime_Base(value uint32) (err error) { + return instance.SetProperty("AverageDatabaseMessagesExecutionTime_Base", (value)) +} + +// GetAverageDatabaseMessagesExecutionTime_Base gets the value of AverageDatabaseMessagesExecutionTime_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageDatabaseMessagesExecutionTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageDatabaseMessagesExecutionTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageMessagesExecutionTime sets the value of AverageMessagesExecutionTime for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageMessagesExecutionTime(value uint32) (err error) { + return instance.SetProperty("AverageMessagesExecutionTime", (value)) +} + +// GetAverageMessagesExecutionTime gets the value of AverageMessagesExecutionTime for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageMessagesExecutionTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageMessagesExecutionTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageMessagesExecutionTime_Base sets the value of AverageMessagesExecutionTime_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageMessagesExecutionTime_Base(value uint32) (err error) { + return instance.SetProperty("AverageMessagesExecutionTime_Base", (value)) +} + +// GetAverageMessagesExecutionTime_Base gets the value of AverageMessagesExecutionTime_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageMessagesExecutionTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageMessagesExecutionTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWaitingTimeToExecuteDatabaseMessages sets the value of AverageWaitingTimeToExecuteDatabaseMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageWaitingTimeToExecuteDatabaseMessages(value uint32) (err error) { + return instance.SetProperty("AverageWaitingTimeToExecuteDatabaseMessages", (value)) +} + +// GetAverageWaitingTimeToExecuteDatabaseMessages gets the value of AverageWaitingTimeToExecuteDatabaseMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageWaitingTimeToExecuteDatabaseMessages() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWaitingTimeToExecuteDatabaseMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWaitingTimeToExecuteDatabaseMessages_Base sets the value of AverageWaitingTimeToExecuteDatabaseMessages_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageWaitingTimeToExecuteDatabaseMessages_Base(value uint32) (err error) { + return instance.SetProperty("AverageWaitingTimeToExecuteDatabaseMessages_Base", (value)) +} + +// GetAverageWaitingTimeToExecuteDatabaseMessages_Base gets the value of AverageWaitingTimeToExecuteDatabaseMessages_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageWaitingTimeToExecuteDatabaseMessages_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWaitingTimeToExecuteDatabaseMessages_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWaitingTimeToExecuteMessages sets the value of AverageWaitingTimeToExecuteMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageWaitingTimeToExecuteMessages(value uint32) (err error) { + return instance.SetProperty("AverageWaitingTimeToExecuteMessages", (value)) +} + +// GetAverageWaitingTimeToExecuteMessages gets the value of AverageWaitingTimeToExecuteMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageWaitingTimeToExecuteMessages() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWaitingTimeToExecuteMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWaitingTimeToExecuteMessages_Base sets the value of AverageWaitingTimeToExecuteMessages_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyAverageWaitingTimeToExecuteMessages_Base(value uint32) (err error) { + return instance.SetProperty("AverageWaitingTimeToExecuteMessages_Base", (value)) +} + +// GetAverageWaitingTimeToExecuteMessages_Base gets the value of AverageWaitingTimeToExecuteMessages_Base for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyAverageWaitingTimeToExecuteMessages_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWaitingTimeToExecuteMessages_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseMessagesQueueLength sets the value of DatabaseMessagesQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyDatabaseMessagesQueueLength(value uint64) (err error) { + return instance.SetProperty("DatabaseMessagesQueueLength", (value)) +} + +// GetDatabaseMessagesQueueLength gets the value of DatabaseMessagesQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyDatabaseMessagesQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseMessagesQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseUpdateMessages sets the value of DatabaseUpdateMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyDatabaseUpdateMessages(value uint64) (err error) { + return instance.SetProperty("DatabaseUpdateMessages", (value)) +} + +// GetDatabaseUpdateMessages gets the value of DatabaseUpdateMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyDatabaseUpdateMessages() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseUpdateMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseUpdateMessagesPersec sets the value of DatabaseUpdateMessagesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyDatabaseUpdateMessagesPersec(value uint64) (err error) { + return instance.SetProperty("DatabaseUpdateMessagesPersec", (value)) +} + +// GetDatabaseUpdateMessagesPersec gets the value of DatabaseUpdateMessagesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyDatabaseUpdateMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseUpdateMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesExecutionQueueLength sets the value of MessagesExecutionQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyMessagesExecutionQueueLength(value uint64) (err error) { + return instance.SetProperty("MessagesExecutionQueueLength", (value)) +} + +// GetMessagesExecutionQueueLength gets the value of MessagesExecutionQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyMessagesExecutionQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesExecutionQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesQueueLength sets the value of MessagesQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyMessagesQueueLength(value uint64) (err error) { + return instance.SetProperty("MessagesQueueLength", (value)) +} + +// GetMessagesQueueLength gets the value of MessagesQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyMessagesQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateMessages sets the value of UpdateMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyUpdateMessages(value uint64) (err error) { + return instance.SetProperty("UpdateMessages", (value)) +} + +// GetUpdateMessages gets the value of UpdateMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyUpdateMessages() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUpdateMessagesPersec sets the value of UpdateMessagesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) SetPropertyUpdateMessagesPersec(value uint64) (err error) { + return instance.SetProperty("UpdateMessagesPersec", (value)) +} + +// GetUpdateMessagesPersec gets the value of UpdateMessagesPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGlobalUpdateManagerMessages) GetPropertyUpdateMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UpdateMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go new file mode 100644 index 00000000..d66e6da9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages struct { + *Win32_PerfRawData + + // + MessageQueueLength uint64 + + // + UnacknowledgedMessages uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMessageQueueLength sets the value of MessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) SetPropertyMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("MessageQueueLength", (value)) +} + +// GetMessageQueueLength gets the value of MessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) GetPropertyMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("MessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnacknowledgedMessages sets the value of UnacknowledgedMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) SetPropertyUnacknowledgedMessages(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessages", (value)) +} + +// GetUnacknowledgedMessages gets the value of UnacknowledgedMessages for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages) GetPropertyUnacknowledgedMessages() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go new file mode 100644 index 00000000..1fd1c4d1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2 struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2 struct { + *Win32_PerfRawData + + // + UnacknowledgedMessageCount uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2{ + Win32_PerfRawData: tmp, + } + return +} + +// SetUnacknowledgedMessageCount sets the value of UnacknowledgedMessageCount for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2) SetPropertyUnacknowledgedMessageCount(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessageCount", (value)) +} + +// GetUnacknowledgedMessageCount gets the value of UnacknowledgedMessageCount for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterGoodEnoughMulticastMessages2) GetPropertyUnacknowledgedMessageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go new file mode 100644 index 00000000..ce27d419 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages struct { + *Win32_PerfRawData + + // + MessagesOutstanding uint64 + + // + MessagesSent uint64 + + // + MessagesSentPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMessagesOutstanding sets the value of MessagesOutstanding for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) SetPropertyMessagesOutstanding(value uint64) (err error) { + return instance.SetProperty("MessagesOutstanding", (value)) +} + +// GetMessagesOutstanding gets the value of MessagesOutstanding for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) GetPropertyMessagesOutstanding() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSent sets the value of MessagesSent for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) SetPropertyMessagesSent(value uint64) (err error) { + return instance.SetProperty("MessagesSent", (value)) +} + +// GetMessagesSent gets the value of MessagesSent for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) GetPropertyMessagesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) SetPropertyMessagesSentPersec(value uint64) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterMulticastRequestResponseMessages) GetPropertyMessagesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages.go new file mode 100644 index 00000000..a1c5600f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSent uint64 + + // + BytesSentPersec uint64 + + // + MessagesReceived uint64 + + // + MessagesReceivedPersec uint64 + + // + MessagesSent uint64 + + // + MessagesSentPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessagesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessagesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesReceived sets the value of MessagesReceived for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesReceived(value uint64) (err error) { + return instance.SetProperty("MessagesReceived", (value)) +} + +// GetMessagesReceived gets the value of MessagesReceived for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesReceivedPersec sets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MessagesReceivedPersec", (value)) +} + +// GetMessagesReceivedPersec gets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSent sets the value of MessagesSent for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesSent(value uint64) (err error) { + return instance.SetProperty("MessagesSent", (value)) +} + +// GetMessagesSent gets the value of MessagesSent for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) SetPropertyMessagesSentPersec(value uint64) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkMessages) GetPropertyMessagesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections.go new file mode 100644 index 00000000..31f671f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections struct { + *Win32_PerfRawData + + // + NormalMessageQueueLength uint64 + + // + NormalMessageQueueLengthPersec uint64 + + // + ReconnectCount uint64 + + // + UnacknowledgedMessageQueueLength uint64 + + // + UnacknowledgedMessageQueueLengthPersec uint64 + + // + UrgentMessageQueueLength uint64 + + // + UrgentMessageQueueLengthPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnectionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnectionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNormalMessageQueueLength sets the value of NormalMessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyNormalMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("NormalMessageQueueLength", (value)) +} + +// GetNormalMessageQueueLength gets the value of NormalMessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyNormalMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalMessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalMessageQueueLengthPersec sets the value of NormalMessageQueueLengthPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyNormalMessageQueueLengthPersec(value uint64) (err error) { + return instance.SetProperty("NormalMessageQueueLengthPersec", (value)) +} + +// GetNormalMessageQueueLengthPersec gets the value of NormalMessageQueueLengthPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyNormalMessageQueueLengthPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalMessageQueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReconnectCount sets the value of ReconnectCount for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyReconnectCount(value uint64) (err error) { + return instance.SetProperty("ReconnectCount", (value)) +} + +// GetReconnectCount gets the value of ReconnectCount for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyReconnectCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReconnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnacknowledgedMessageQueueLength sets the value of UnacknowledgedMessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUnacknowledgedMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessageQueueLength", (value)) +} + +// GetUnacknowledgedMessageQueueLength gets the value of UnacknowledgedMessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUnacknowledgedMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnacknowledgedMessageQueueLengthPersec sets the value of UnacknowledgedMessageQueueLengthPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUnacknowledgedMessageQueueLengthPersec(value uint64) (err error) { + return instance.SetProperty("UnacknowledgedMessageQueueLengthPersec", (value)) +} + +// GetUnacknowledgedMessageQueueLengthPersec gets the value of UnacknowledgedMessageQueueLengthPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUnacknowledgedMessageQueueLengthPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UnacknowledgedMessageQueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUrgentMessageQueueLength sets the value of UrgentMessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUrgentMessageQueueLength(value uint64) (err error) { + return instance.SetProperty("UrgentMessageQueueLength", (value)) +} + +// GetUrgentMessageQueueLength gets the value of UrgentMessageQueueLength for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUrgentMessageQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("UrgentMessageQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUrgentMessageQueueLengthPersec sets the value of UrgentMessageQueueLengthPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) SetPropertyUrgentMessageQueueLengthPersec(value uint64) (err error) { + return instance.SetProperty("UrgentMessageQueueLengthPersec", (value)) +} + +// GetUrgentMessageQueueLengthPersec gets the value of UrgentMessageQueueLengthPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterNetworkReconnections) GetPropertyUrgentMessageQueueLengthPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UrgentMessageQueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager.go new file mode 100644 index 00000000..31289c3f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager struct { + *Win32_PerfRawData + + // + GroupsOnline uint64 + + // + RHSProcesses uint64 + + // + RHSRestarts uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager{ + Win32_PerfRawData: tmp, + } + return +} + +// SetGroupsOnline sets the value of GroupsOnline for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager) SetPropertyGroupsOnline(value uint64) (err error) { + return instance.SetProperty("GroupsOnline", (value)) +} + +// GetGroupsOnline gets the value of GroupsOnline for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager) GetPropertyGroupsOnline() (value uint64, err error) { + retValue, err := instance.GetProperty("GroupsOnline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRHSProcesses sets the value of RHSProcesses for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager) SetPropertyRHSProcesses(value uint64) (err error) { + return instance.SetProperty("RHSProcesses", (value)) +} + +// GetRHSProcesses gets the value of RHSProcesses for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager) GetPropertyRHSProcesses() (value uint64, err error) { + retValue, err := instance.GetProperty("RHSProcesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRHSRestarts sets the value of RHSRestarts for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager) SetPropertyRHSRestarts(value uint64) (err error) { + return instance.SetProperty("RHSRestarts", (value)) +} + +// GetRHSRestarts gets the value of RHSRestarts for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResourceControlManager) GetPropertyRHSRestarts() (value uint64, err error) { + retValue, err := instance.GetProperty("RHSRestarts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResources.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResources.go new file mode 100644 index 00000000..c9c8275c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ClussvcPerfProvider_ClusterResources.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ClussvcPerfProvider_ClusterResources struct +type Win32_PerfRawData_ClussvcPerfProvider_ClusterResources struct { + *Win32_PerfRawData + + // + ResourceControls uint64 + + // + ResourceControlsPersec uint64 + + // + ResourceFailure uint64 + + // + ResourceFailureAccessViolation uint64 + + // + ResourceFailureDeadlock uint64 + + // + ResourcesOnline uint64 + + // + ResourceTypeControls uint64 + + // + ResourceTypeControlsPersec uint64 +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterResourcesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterResources{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ClussvcPerfProvider_ClusterResourcesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ClussvcPerfProvider_ClusterResources{ + Win32_PerfRawData: tmp, + } + return +} + +// SetResourceControls sets the value of ResourceControls for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceControls(value uint64) (err error) { + return instance.SetProperty("ResourceControls", (value)) +} + +// GetResourceControls gets the value of ResourceControls for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceControls() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceControls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceControlsPersec sets the value of ResourceControlsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceControlsPersec(value uint64) (err error) { + return instance.SetProperty("ResourceControlsPersec", (value)) +} + +// GetResourceControlsPersec gets the value of ResourceControlsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceControlsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceControlsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceFailure sets the value of ResourceFailure for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceFailure(value uint64) (err error) { + return instance.SetProperty("ResourceFailure", (value)) +} + +// GetResourceFailure gets the value of ResourceFailure for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceFailure() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceFailure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceFailureAccessViolation sets the value of ResourceFailureAccessViolation for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceFailureAccessViolation(value uint64) (err error) { + return instance.SetProperty("ResourceFailureAccessViolation", (value)) +} + +// GetResourceFailureAccessViolation gets the value of ResourceFailureAccessViolation for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceFailureAccessViolation() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceFailureAccessViolation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceFailureDeadlock sets the value of ResourceFailureDeadlock for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceFailureDeadlock(value uint64) (err error) { + return instance.SetProperty("ResourceFailureDeadlock", (value)) +} + +// GetResourceFailureDeadlock gets the value of ResourceFailureDeadlock for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceFailureDeadlock() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceFailureDeadlock") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourcesOnline sets the value of ResourcesOnline for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourcesOnline(value uint64) (err error) { + return instance.SetProperty("ResourcesOnline", (value)) +} + +// GetResourcesOnline gets the value of ResourcesOnline for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourcesOnline() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourcesOnline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceTypeControls sets the value of ResourceTypeControls for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceTypeControls(value uint64) (err error) { + return instance.SetProperty("ResourceTypeControls", (value)) +} + +// GetResourceTypeControls gets the value of ResourceTypeControls for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceTypeControls() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceTypeControls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResourceTypeControlsPersec sets the value of ResourceTypeControlsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) SetPropertyResourceTypeControlsPersec(value uint64) (err error) { + return instance.SetProperty("ResourceTypeControlsPersec", (value)) +} + +// GetResourceTypeControlsPersec gets the value of ResourceTypeControlsPersec for the instance +func (instance *Win32_PerfRawData_ClussvcPerfProvider_ClusterResources) GetPropertyResourceTypeControlsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourceTypeControlsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage.go new file mode 100644 index 00000000..034b2a1f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage struct +type Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage struct { + *Win32_PerfRawData + + // + PrimaryFeaturePercentStreamed uint32 +} + +func NewWin32_PerfRawData_Counters_AppVClientStreamedDataPercentageEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_AppVClientStreamedDataPercentageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage{ + Win32_PerfRawData: tmp, + } + return +} + +// SetPrimaryFeaturePercentStreamed sets the value of PrimaryFeaturePercentStreamed for the instance +func (instance *Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage) SetPropertyPrimaryFeaturePercentStreamed(value uint32) (err error) { + return instance.SetProperty("PrimaryFeaturePercentStreamed", (value)) +} + +// GetPrimaryFeaturePercentStreamed gets the value of PrimaryFeaturePercentStreamed for the instance +func (instance *Win32_PerfRawData_Counters_AppVClientStreamedDataPercentage) GetPropertyPrimaryFeaturePercentStreamed() (value uint32, err error) { + retValue, err := instance.GetProperty("PrimaryFeaturePercentStreamed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothDevice.go new file mode 100644 index 00000000..6010654b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothDevice.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_BluetoothDevice struct +type Win32_PerfRawData_Counters_BluetoothDevice struct { + *Win32_PerfRawData + + // + ClassicACLbytesreadPersec uint32 + + // + ClassicACLbyteswrittenPersec uint32 + + // + LEACLbytesreadPersec uint32 + + // + LEACLbyteswrittenPersec uint32 + + // + SCObytesreadPersec uint32 + + // + SCObyteswrittenPersec uint32 +} + +func NewWin32_PerfRawData_Counters_BluetoothDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_BluetoothDevice, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_BluetoothDevice{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_BluetoothDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_BluetoothDevice, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_BluetoothDevice{ + Win32_PerfRawData: tmp, + } + return +} + +// SetClassicACLbytesreadPersec sets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) SetPropertyClassicACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbytesreadPersec", (value)) +} + +// GetClassicACLbytesreadPersec gets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) GetPropertyClassicACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLbyteswrittenPersec sets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) SetPropertyClassicACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbyteswrittenPersec", (value)) +} + +// GetClassicACLbyteswrittenPersec gets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) GetPropertyClassicACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbytesreadPersec sets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) SetPropertyLEACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbytesreadPersec", (value)) +} + +// GetLEACLbytesreadPersec gets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) GetPropertyLEACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbyteswrittenPersec sets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) SetPropertyLEACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbyteswrittenPersec", (value)) +} + +// GetLEACLbyteswrittenPersec gets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) GetPropertyLEACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObytesreadPersec sets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) SetPropertySCObytesreadPersec(value uint32) (err error) { + return instance.SetProperty("SCObytesreadPersec", (value)) +} + +// GetSCObytesreadPersec gets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) GetPropertySCObytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObyteswrittenPersec sets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) SetPropertySCObyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("SCObyteswrittenPersec", (value)) +} + +// GetSCObyteswrittenPersec gets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothDevice) GetPropertySCObyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothRadio.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothRadio.go new file mode 100644 index 00000000..b27779b2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_BluetoothRadio.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_BluetoothRadio struct +type Win32_PerfRawData_Counters_BluetoothRadio struct { + *Win32_PerfRawData + + // + ACLflusheventsPersec uint32 + + // + ClassicACLbytesreadPersec uint32 + + // + ClassicACLbyteswrittenPersec uint32 + + // + ClassicACLConnections uint32 + + // + ClassicACLwritecredits uint32 + + // + InquiryScanDutyCyclePercent uint32 + + // + InquiryScanInterval uint32 + + // + InquiryScanWindow uint32 + + // + LEACLbytesreadPersec uint32 + + // + LEACLbyteswrittenPersec uint32 + + // + LEACLConnections uint32 + + // + LEACLwritecredits uint32 + + // + LEScanDutyCyclePercent uint32 + + // + LEScanInterval uint32 + + // + LEScanWindow uint32 + + // + PageScanDutyCyclePercent uint32 + + // + PageScanInterval uint32 + + // + PageScanWindow uint32 + + // + SCObytesreadPersec uint32 + + // + SCObyteswrittenPersec uint32 + + // + SCOConnections uint32 + + // + SidebandSCOConnections uint32 +} + +func NewWin32_PerfRawData_Counters_BluetoothRadioEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_BluetoothRadio, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_BluetoothRadio{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_BluetoothRadioEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_BluetoothRadio, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_BluetoothRadio{ + Win32_PerfRawData: tmp, + } + return +} + +// SetACLflusheventsPersec sets the value of ACLflusheventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyACLflusheventsPersec(value uint32) (err error) { + return instance.SetProperty("ACLflusheventsPersec", (value)) +} + +// GetACLflusheventsPersec gets the value of ACLflusheventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyACLflusheventsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ACLflusheventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLbytesreadPersec sets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyClassicACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbytesreadPersec", (value)) +} + +// GetClassicACLbytesreadPersec gets the value of ClassicACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyClassicACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLbyteswrittenPersec sets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyClassicACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("ClassicACLbyteswrittenPersec", (value)) +} + +// GetClassicACLbyteswrittenPersec gets the value of ClassicACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyClassicACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLConnections sets the value of ClassicACLConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyClassicACLConnections(value uint32) (err error) { + return instance.SetProperty("ClassicACLConnections", (value)) +} + +// GetClassicACLConnections gets the value of ClassicACLConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyClassicACLConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClassicACLwritecredits sets the value of ClassicACLwritecredits for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyClassicACLwritecredits(value uint32) (err error) { + return instance.SetProperty("ClassicACLwritecredits", (value)) +} + +// GetClassicACLwritecredits gets the value of ClassicACLwritecredits for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyClassicACLwritecredits() (value uint32, err error) { + retValue, err := instance.GetProperty("ClassicACLwritecredits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInquiryScanDutyCyclePercent sets the value of InquiryScanDutyCyclePercent for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyInquiryScanDutyCyclePercent(value uint32) (err error) { + return instance.SetProperty("InquiryScanDutyCyclePercent", (value)) +} + +// GetInquiryScanDutyCyclePercent gets the value of InquiryScanDutyCyclePercent for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyInquiryScanDutyCyclePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("InquiryScanDutyCyclePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInquiryScanInterval sets the value of InquiryScanInterval for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyInquiryScanInterval(value uint32) (err error) { + return instance.SetProperty("InquiryScanInterval", (value)) +} + +// GetInquiryScanInterval gets the value of InquiryScanInterval for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyInquiryScanInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("InquiryScanInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInquiryScanWindow sets the value of InquiryScanWindow for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyInquiryScanWindow(value uint32) (err error) { + return instance.SetProperty("InquiryScanWindow", (value)) +} + +// GetInquiryScanWindow gets the value of InquiryScanWindow for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyInquiryScanWindow() (value uint32, err error) { + retValue, err := instance.GetProperty("InquiryScanWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbytesreadPersec sets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEACLbytesreadPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbytesreadPersec", (value)) +} + +// GetLEACLbytesreadPersec gets the value of LEACLbytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEACLbytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLbyteswrittenPersec sets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEACLbyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("LEACLbyteswrittenPersec", (value)) +} + +// GetLEACLbyteswrittenPersec gets the value of LEACLbyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEACLbyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLbyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLConnections sets the value of LEACLConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEACLConnections(value uint32) (err error) { + return instance.SetProperty("LEACLConnections", (value)) +} + +// GetLEACLConnections gets the value of LEACLConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEACLConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEACLwritecredits sets the value of LEACLwritecredits for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEACLwritecredits(value uint32) (err error) { + return instance.SetProperty("LEACLwritecredits", (value)) +} + +// GetLEACLwritecredits gets the value of LEACLwritecredits for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEACLwritecredits() (value uint32, err error) { + retValue, err := instance.GetProperty("LEACLwritecredits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEScanDutyCyclePercent sets the value of LEScanDutyCyclePercent for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEScanDutyCyclePercent(value uint32) (err error) { + return instance.SetProperty("LEScanDutyCyclePercent", (value)) +} + +// GetLEScanDutyCyclePercent gets the value of LEScanDutyCyclePercent for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEScanDutyCyclePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("LEScanDutyCyclePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEScanInterval sets the value of LEScanInterval for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEScanInterval(value uint32) (err error) { + return instance.SetProperty("LEScanInterval", (value)) +} + +// GetLEScanInterval gets the value of LEScanInterval for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEScanInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("LEScanInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLEScanWindow sets the value of LEScanWindow for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyLEScanWindow(value uint32) (err error) { + return instance.SetProperty("LEScanWindow", (value)) +} + +// GetLEScanWindow gets the value of LEScanWindow for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyLEScanWindow() (value uint32, err error) { + retValue, err := instance.GetProperty("LEScanWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageScanDutyCyclePercent sets the value of PageScanDutyCyclePercent for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyPageScanDutyCyclePercent(value uint32) (err error) { + return instance.SetProperty("PageScanDutyCyclePercent", (value)) +} + +// GetPageScanDutyCyclePercent gets the value of PageScanDutyCyclePercent for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyPageScanDutyCyclePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("PageScanDutyCyclePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageScanInterval sets the value of PageScanInterval for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyPageScanInterval(value uint32) (err error) { + return instance.SetProperty("PageScanInterval", (value)) +} + +// GetPageScanInterval gets the value of PageScanInterval for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyPageScanInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("PageScanInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageScanWindow sets the value of PageScanWindow for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertyPageScanWindow(value uint32) (err error) { + return instance.SetProperty("PageScanWindow", (value)) +} + +// GetPageScanWindow gets the value of PageScanWindow for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertyPageScanWindow() (value uint32, err error) { + retValue, err := instance.GetProperty("PageScanWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObytesreadPersec sets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertySCObytesreadPersec(value uint32) (err error) { + return instance.SetProperty("SCObytesreadPersec", (value)) +} + +// GetSCObytesreadPersec gets the value of SCObytesreadPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertySCObytesreadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObytesreadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCObyteswrittenPersec sets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertySCObyteswrittenPersec(value uint32) (err error) { + return instance.SetProperty("SCObyteswrittenPersec", (value)) +} + +// GetSCObyteswrittenPersec gets the value of SCObyteswrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertySCObyteswrittenPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCObyteswrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCOConnections sets the value of SCOConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertySCOConnections(value uint32) (err error) { + return instance.SetProperty("SCOConnections", (value)) +} + +// GetSCOConnections gets the value of SCOConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertySCOConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SCOConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSidebandSCOConnections sets the value of SidebandSCOConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) SetPropertySidebandSCOConnections(value uint32) (err error) { + return instance.SetProperty("SidebandSCOConnections", (value)) +} + +// GetSidebandSCOConnections gets the value of SidebandSCOConnections for the instance +func (instance *Win32_PerfRawData_Counters_BluetoothRadio) GetPropertySidebandSCOConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SidebandSCOConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_DNS64Global.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_DNS64Global.go new file mode 100644 index 00000000..ce7ff3b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_DNS64Global.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_DNS64Global struct +type Win32_PerfRawData_Counters_DNS64Global struct { + *Win32_PerfRawData + + // + AAAAqueriesFailed uint64 + + // + AAAAqueriesSuccessful uint64 + + // + AAAASynthesizedrecords uint64 + + // + IP6ARPAqueriesMatched uint64 + + // + OtherqueriesFailed uint64 + + // + OtherqueriesSuccessful uint64 +} + +func NewWin32_PerfRawData_Counters_DNS64GlobalEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_DNS64Global, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_DNS64Global{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_DNS64GlobalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_DNS64Global, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_DNS64Global{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAAAAqueriesFailed sets the value of AAAAqueriesFailed for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) SetPropertyAAAAqueriesFailed(value uint64) (err error) { + return instance.SetProperty("AAAAqueriesFailed", (value)) +} + +// GetAAAAqueriesFailed gets the value of AAAAqueriesFailed for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) GetPropertyAAAAqueriesFailed() (value uint64, err error) { + retValue, err := instance.GetProperty("AAAAqueriesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAAAAqueriesSuccessful sets the value of AAAAqueriesSuccessful for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) SetPropertyAAAAqueriesSuccessful(value uint64) (err error) { + return instance.SetProperty("AAAAqueriesSuccessful", (value)) +} + +// GetAAAAqueriesSuccessful gets the value of AAAAqueriesSuccessful for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) GetPropertyAAAAqueriesSuccessful() (value uint64, err error) { + retValue, err := instance.GetProperty("AAAAqueriesSuccessful") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAAAASynthesizedrecords sets the value of AAAASynthesizedrecords for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) SetPropertyAAAASynthesizedrecords(value uint64) (err error) { + return instance.SetProperty("AAAASynthesizedrecords", (value)) +} + +// GetAAAASynthesizedrecords gets the value of AAAASynthesizedrecords for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) GetPropertyAAAASynthesizedrecords() (value uint64, err error) { + retValue, err := instance.GetProperty("AAAASynthesizedrecords") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIP6ARPAqueriesMatched sets the value of IP6ARPAqueriesMatched for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) SetPropertyIP6ARPAqueriesMatched(value uint64) (err error) { + return instance.SetProperty("IP6ARPAqueriesMatched", (value)) +} + +// GetIP6ARPAqueriesMatched gets the value of IP6ARPAqueriesMatched for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) GetPropertyIP6ARPAqueriesMatched() (value uint64, err error) { + retValue, err := instance.GetProperty("IP6ARPAqueriesMatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherqueriesFailed sets the value of OtherqueriesFailed for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) SetPropertyOtherqueriesFailed(value uint64) (err error) { + return instance.SetProperty("OtherqueriesFailed", (value)) +} + +// GetOtherqueriesFailed gets the value of OtherqueriesFailed for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) GetPropertyOtherqueriesFailed() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherqueriesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherqueriesSuccessful sets the value of OtherqueriesSuccessful for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) SetPropertyOtherqueriesSuccessful(value uint64) (err error) { + return instance.SetProperty("OtherqueriesSuccessful", (value)) +} + +// GetOtherqueriesSuccessful gets the value of OtherqueriesSuccessful for the instance +func (instance *Win32_PerfRawData_Counters_DNS64Global) GetPropertyOtherqueriesSuccessful() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherqueriesSuccessful") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventLog.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventLog.go new file mode 100644 index 00000000..1570e7f1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventLog.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_Counters_EventLog struct +type Win32_PerfRawData_Counters_EventLog struct { + *Win32_PerfRawData + + // + Activesubscriptions uint32 + + // + ELFRPCcallsPersec uint64 + + // + EnabledChannels uint32 + + // + EventfilteroperationsPersec uint64 + + // + EventsPersec uint64 + + // + WEVTRPCcallsPersec uint64 +} + +func NewWin32_PerfRawData_Counters_EventLogEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_EventLog, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_EventLog{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_EventLogEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_EventLog, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_EventLog{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActivesubscriptions sets the value of Activesubscriptions for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) SetPropertyActivesubscriptions(value uint32) (err error) { + return instance.SetProperty("Activesubscriptions", value) +} + +// GetActivesubscriptions gets the value of Activesubscriptions for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) GetPropertyActivesubscriptions() (value uint32, err error) { + retValue, err := instance.GetProperty("Activesubscriptions") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetELFRPCcallsPersec sets the value of ELFRPCcallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) SetPropertyELFRPCcallsPersec(value uint64) (err error) { + return instance.SetProperty("ELFRPCcallsPersec", value) +} + +// GetELFRPCcallsPersec gets the value of ELFRPCcallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) GetPropertyELFRPCcallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ELFRPCcallsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetEnabledChannels sets the value of EnabledChannels for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) SetPropertyEnabledChannels(value uint32) (err error) { + return instance.SetProperty("EnabledChannels", value) +} + +// GetEnabledChannels gets the value of EnabledChannels for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) GetPropertyEnabledChannels() (value uint32, err error) { + retValue, err := instance.GetProperty("EnabledChannels") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetEventfilteroperationsPersec sets the value of EventfilteroperationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) SetPropertyEventfilteroperationsPersec(value uint64) (err error) { + return instance.SetProperty("EventfilteroperationsPersec", value) +} + +// GetEventfilteroperationsPersec gets the value of EventfilteroperationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) GetPropertyEventfilteroperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EventfilteroperationsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetEventsPersec sets the value of EventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) SetPropertyEventsPersec(value uint64) (err error) { + return instance.SetProperty("EventsPersec", value) +} + +// GetEventsPersec gets the value of EventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) GetPropertyEventsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EventsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetWEVTRPCcallsPersec sets the value of WEVTRPCcallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) SetPropertyWEVTRPCcallsPersec(value uint64) (err error) { + return instance.SetProperty("WEVTRPCcallsPersec", value) +} + +// GetWEVTRPCcallsPersec gets the value of WEVTRPCcallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_EventLog) GetPropertyWEVTRPCcallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WEVTRPCcallsPersec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindows.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindows.go new file mode 100644 index 00000000..3857e8ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindows.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_EventTracingforWindows struct +type Win32_PerfRawData_Counters_EventTracingforWindows struct { + *Win32_PerfRawData + + // + TotalMemoryUsageNonPagedPool uint32 + + // + TotalMemoryUsagePagedPool uint32 + + // + TotalNumberofActiveSessions uint32 + + // + TotalNumberofDistinctDisabledProviders uint32 + + // + TotalNumberofDistinctEnabledProviders uint32 + + // + TotalNumberofDistinctPreEnabledProviders uint32 +} + +func NewWin32_PerfRawData_Counters_EventTracingforWindowsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_EventTracingforWindows, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_EventTracingforWindows{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_EventTracingforWindowsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_EventTracingforWindows, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_EventTracingforWindows{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalMemoryUsageNonPagedPool sets the value of TotalMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) SetPropertyTotalMemoryUsageNonPagedPool(value uint32) (err error) { + return instance.SetProperty("TotalMemoryUsageNonPagedPool", (value)) +} + +// GetTotalMemoryUsageNonPagedPool gets the value of TotalMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) GetPropertyTotalMemoryUsageNonPagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalMemoryUsageNonPagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalMemoryUsagePagedPool sets the value of TotalMemoryUsagePagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) SetPropertyTotalMemoryUsagePagedPool(value uint32) (err error) { + return instance.SetProperty("TotalMemoryUsagePagedPool", (value)) +} + +// GetTotalMemoryUsagePagedPool gets the value of TotalMemoryUsagePagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) GetPropertyTotalMemoryUsagePagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalMemoryUsagePagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofActiveSessions sets the value of TotalNumberofActiveSessions for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) SetPropertyTotalNumberofActiveSessions(value uint32) (err error) { + return instance.SetProperty("TotalNumberofActiveSessions", (value)) +} + +// GetTotalNumberofActiveSessions gets the value of TotalNumberofActiveSessions for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) GetPropertyTotalNumberofActiveSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofActiveSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofDistinctDisabledProviders sets the value of TotalNumberofDistinctDisabledProviders for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) SetPropertyTotalNumberofDistinctDisabledProviders(value uint32) (err error) { + return instance.SetProperty("TotalNumberofDistinctDisabledProviders", (value)) +} + +// GetTotalNumberofDistinctDisabledProviders gets the value of TotalNumberofDistinctDisabledProviders for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) GetPropertyTotalNumberofDistinctDisabledProviders() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofDistinctDisabledProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofDistinctEnabledProviders sets the value of TotalNumberofDistinctEnabledProviders for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) SetPropertyTotalNumberofDistinctEnabledProviders(value uint32) (err error) { + return instance.SetProperty("TotalNumberofDistinctEnabledProviders", (value)) +} + +// GetTotalNumberofDistinctEnabledProviders gets the value of TotalNumberofDistinctEnabledProviders for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) GetPropertyTotalNumberofDistinctEnabledProviders() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofDistinctEnabledProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofDistinctPreEnabledProviders sets the value of TotalNumberofDistinctPreEnabledProviders for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) SetPropertyTotalNumberofDistinctPreEnabledProviders(value uint32) (err error) { + return instance.SetProperty("TotalNumberofDistinctPreEnabledProviders", (value)) +} + +// GetTotalNumberofDistinctPreEnabledProviders gets the value of TotalNumberofDistinctPreEnabledProviders for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindows) GetPropertyTotalNumberofDistinctPreEnabledProviders() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofDistinctPreEnabledProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindowsSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindowsSession.go new file mode 100644 index 00000000..cd3e7382 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_EventTracingforWindowsSession.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_EventTracingforWindowsSession struct +type Win32_PerfRawData_Counters_EventTracingforWindowsSession struct { + *Win32_PerfRawData + + // + BufferMemoryUsageNonPagedPool uint32 + + // + BufferMemoryUsagePagedPool uint32 + + // + EventsLoggedpersec uint64 + + // + EventsLost uint32 + + // + NumberofRealTimeConsumers uint32 +} + +func NewWin32_PerfRawData_Counters_EventTracingforWindowsSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_EventTracingforWindowsSession, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_EventTracingforWindowsSession{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_EventTracingforWindowsSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_EventTracingforWindowsSession, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_EventTracingforWindowsSession{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBufferMemoryUsageNonPagedPool sets the value of BufferMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) SetPropertyBufferMemoryUsageNonPagedPool(value uint32) (err error) { + return instance.SetProperty("BufferMemoryUsageNonPagedPool", (value)) +} + +// GetBufferMemoryUsageNonPagedPool gets the value of BufferMemoryUsageNonPagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) GetPropertyBufferMemoryUsageNonPagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferMemoryUsageNonPagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBufferMemoryUsagePagedPool sets the value of BufferMemoryUsagePagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) SetPropertyBufferMemoryUsagePagedPool(value uint32) (err error) { + return instance.SetProperty("BufferMemoryUsagePagedPool", (value)) +} + +// GetBufferMemoryUsagePagedPool gets the value of BufferMemoryUsagePagedPool for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) GetPropertyBufferMemoryUsagePagedPool() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferMemoryUsagePagedPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventsLoggedpersec sets the value of EventsLoggedpersec for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) SetPropertyEventsLoggedpersec(value uint64) (err error) { + return instance.SetProperty("EventsLoggedpersec", (value)) +} + +// GetEventsLoggedpersec gets the value of EventsLoggedpersec for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) GetPropertyEventsLoggedpersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EventsLoggedpersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEventsLost sets the value of EventsLost for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) SetPropertyEventsLost(value uint32) (err error) { + return instance.SetProperty("EventsLost", (value)) +} + +// GetEventsLost gets the value of EventsLost for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) GetPropertyEventsLost() (value uint32, err error) { + retValue, err := instance.GetProperty("EventsLost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofRealTimeConsumers sets the value of NumberofRealTimeConsumers for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) SetPropertyNumberofRealTimeConsumers(value uint32) (err error) { + return instance.SetProperty("NumberofRealTimeConsumers", (value)) +} + +// GetNumberofRealTimeConsumers gets the value of NumberofRealTimeConsumers for the instance +func (instance *Win32_PerfRawData_Counters_EventTracingforWindowsSession) GetPropertyNumberofRealTimeConsumers() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofRealTimeConsumers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_FileSystemDiskActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_FileSystemDiskActivity.go new file mode 100644 index 00000000..9753317c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_FileSystemDiskActivity.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_FileSystemDiskActivity struct +type Win32_PerfRawData_Counters_FileSystemDiskActivity struct { + *Win32_PerfRawData + + // + FileSystemBytesRead uint64 + + // + FileSystemBytesWritten uint64 +} + +func NewWin32_PerfRawData_Counters_FileSystemDiskActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_FileSystemDiskActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_FileSystemDiskActivity{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_FileSystemDiskActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_FileSystemDiskActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_FileSystemDiskActivity{ + Win32_PerfRawData: tmp, + } + return +} + +// SetFileSystemBytesRead sets the value of FileSystemBytesRead for the instance +func (instance *Win32_PerfRawData_Counters_FileSystemDiskActivity) SetPropertyFileSystemBytesRead(value uint64) (err error) { + return instance.SetProperty("FileSystemBytesRead", (value)) +} + +// GetFileSystemBytesRead gets the value of FileSystemBytesRead for the instance +func (instance *Win32_PerfRawData_Counters_FileSystemDiskActivity) GetPropertyFileSystemBytesRead() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSystemBytesRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileSystemBytesWritten sets the value of FileSystemBytesWritten for the instance +func (instance *Win32_PerfRawData_Counters_FileSystemDiskActivity) SetPropertyFileSystemBytesWritten(value uint64) (err error) { + return instance.SetProperty("FileSystemBytesWritten", (value)) +} + +// GetFileSystemBytesWritten gets the value of FileSystemBytesWritten for the instance +func (instance *Win32_PerfRawData_Counters_FileSystemDiskActivity) GetPropertyFileSystemBytesWritten() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSystemBytesWritten") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2.go new file mode 100644 index 00000000..06bad315 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2 struct +type Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2 struct { + *Win32_PerfRawData + + // + AuthIPMainModeNegotiationTime uint32 + + // + AuthIPQuickModeNegotiationTime uint32 + + // + ExtendedModeNegotiationTime uint32 + + // + FailedNegotiations uint32 + + // + FailedNegotiationsPersec uint32 + + // + IKEv1MainModeNegotiationTime uint32 + + // + IKEv1QuickModeNegotiationTime uint32 + + // + IKEv2MainModeNegotiationTime uint32 + + // + IKEv2QuickModeNegotiationTime uint32 + + // + InvalidPacketsReceivedPersec uint32 + + // + PacketsReceivedPersec uint32 + + // + SuccessfulNegotiations uint32 + + // + SuccessfulNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAuthIPMainModeNegotiationTime sets the value of AuthIPMainModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyAuthIPMainModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("AuthIPMainModeNegotiationTime", (value)) +} + +// GetAuthIPMainModeNegotiationTime gets the value of AuthIPMainModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyAuthIPMainModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthIPMainModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAuthIPQuickModeNegotiationTime sets the value of AuthIPQuickModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyAuthIPQuickModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("AuthIPQuickModeNegotiationTime", (value)) +} + +// GetAuthIPQuickModeNegotiationTime gets the value of AuthIPQuickModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyAuthIPQuickModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AuthIPQuickModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiationTime sets the value of ExtendedModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyExtendedModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiationTime", (value)) +} + +// GetExtendedModeNegotiationTime gets the value of ExtendedModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyExtendedModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedNegotiations sets the value of FailedNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyFailedNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedNegotiations", (value)) +} + +// GetFailedNegotiations gets the value of FailedNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyFailedNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedNegotiationsPersec sets the value of FailedNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyFailedNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedNegotiationsPersec", (value)) +} + +// GetFailedNegotiationsPersec gets the value of FailedNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyFailedNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv1MainModeNegotiationTime sets the value of IKEv1MainModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv1MainModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv1MainModeNegotiationTime", (value)) +} + +// GetIKEv1MainModeNegotiationTime gets the value of IKEv1MainModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv1MainModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv1MainModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv1QuickModeNegotiationTime sets the value of IKEv1QuickModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv1QuickModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv1QuickModeNegotiationTime", (value)) +} + +// GetIKEv1QuickModeNegotiationTime gets the value of IKEv1QuickModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv1QuickModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv1QuickModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv2MainModeNegotiationTime sets the value of IKEv2MainModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv2MainModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv2MainModeNegotiationTime", (value)) +} + +// GetIKEv2MainModeNegotiationTime gets the value of IKEv2MainModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv2MainModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv2MainModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIKEv2QuickModeNegotiationTime sets the value of IKEv2QuickModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyIKEv2QuickModeNegotiationTime(value uint32) (err error) { + return instance.SetProperty("IKEv2QuickModeNegotiationTime", (value)) +} + +// GetIKEv2QuickModeNegotiationTime gets the value of IKEv2QuickModeNegotiationTime for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyIKEv2QuickModeNegotiationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IKEv2QuickModeNegotiationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInvalidPacketsReceivedPersec sets the value of InvalidPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyInvalidPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("InvalidPacketsReceivedPersec", (value)) +} + +// GetInvalidPacketsReceivedPersec gets the value of InvalidPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyInvalidPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InvalidPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertyPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertyPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulNegotiations sets the value of SuccessfulNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertySuccessfulNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulNegotiations", (value)) +} + +// GetSuccessfulNegotiations gets the value of SuccessfulNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertySuccessfulNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulNegotiationsPersec sets the value of SuccessfulNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) SetPropertySuccessfulNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulNegotiationsPersec", (value)) +} + +// GetSuccessfulNegotiationsPersec gets the value of SuccessfulNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_GenericIKEv1AuthIPandIKEv2) GetPropertySuccessfulNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPService.go new file mode 100644 index 00000000..e99772e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPService.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HTTPService struct +type Win32_PerfRawData_Counters_HTTPService struct { + *Win32_PerfRawData + + // + CurrentUrisCached uint32 + + // + TotalFlushedUris uint32 + + // + TotalUrisCached uint32 + + // + UriCacheFlushes uint32 + + // + UriCacheHits uint32 + + // + UriCacheMisses uint32 +} + +func NewWin32_PerfRawData_Counters_HTTPServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HTTPService, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HTTPService{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HTTPServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HTTPService, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HTTPService{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCurrentUrisCached sets the value of CurrentUrisCached for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) SetPropertyCurrentUrisCached(value uint32) (err error) { + return instance.SetProperty("CurrentUrisCached", (value)) +} + +// GetCurrentUrisCached gets the value of CurrentUrisCached for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) GetPropertyCurrentUrisCached() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUrisCached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalFlushedUris sets the value of TotalFlushedUris for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) SetPropertyTotalFlushedUris(value uint32) (err error) { + return instance.SetProperty("TotalFlushedUris", (value)) +} + +// GetTotalFlushedUris gets the value of TotalFlushedUris for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) GetPropertyTotalFlushedUris() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalFlushedUris") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalUrisCached sets the value of TotalUrisCached for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) SetPropertyTotalUrisCached(value uint32) (err error) { + return instance.SetProperty("TotalUrisCached", (value)) +} + +// GetTotalUrisCached gets the value of TotalUrisCached for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) GetPropertyTotalUrisCached() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalUrisCached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUriCacheFlushes sets the value of UriCacheFlushes for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) SetPropertyUriCacheFlushes(value uint32) (err error) { + return instance.SetProperty("UriCacheFlushes", (value)) +} + +// GetUriCacheFlushes gets the value of UriCacheFlushes for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) GetPropertyUriCacheFlushes() (value uint32, err error) { + retValue, err := instance.GetProperty("UriCacheFlushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUriCacheHits sets the value of UriCacheHits for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) SetPropertyUriCacheHits(value uint32) (err error) { + return instance.SetProperty("UriCacheHits", (value)) +} + +// GetUriCacheHits gets the value of UriCacheHits for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) GetPropertyUriCacheHits() (value uint32, err error) { + retValue, err := instance.GetProperty("UriCacheHits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUriCacheMisses sets the value of UriCacheMisses for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) SetPropertyUriCacheMisses(value uint32) (err error) { + return instance.SetProperty("UriCacheMisses", (value)) +} + +// GetUriCacheMisses gets the value of UriCacheMisses for the instance +func (instance *Win32_PerfRawData_Counters_HTTPService) GetPropertyUriCacheMisses() (value uint32, err error) { + retValue, err := instance.GetProperty("UriCacheMisses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceRequestQueues.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceRequestQueues.go new file mode 100644 index 00000000..646e4b72 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceRequestQueues.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HTTPServiceRequestQueues struct +type Win32_PerfRawData_Counters_HTTPServiceRequestQueues struct { + *Win32_PerfRawData + + // + ArrivalRate uint64 + + // + CacheHitRate uint64 + + // + CurrentQueueSize uint32 + + // + MaxQueueItemAge uint64 + + // + RejectedRequests uint64 + + // + RejectionRate uint64 +} + +func NewWin32_PerfRawData_Counters_HTTPServiceRequestQueuesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HTTPServiceRequestQueues{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HTTPServiceRequestQueuesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HTTPServiceRequestQueues{ + Win32_PerfRawData: tmp, + } + return +} + +// SetArrivalRate sets the value of ArrivalRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) SetPropertyArrivalRate(value uint64) (err error) { + return instance.SetProperty("ArrivalRate", (value)) +} + +// GetArrivalRate gets the value of ArrivalRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) GetPropertyArrivalRate() (value uint64, err error) { + retValue, err := instance.GetProperty("ArrivalRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheHitRate sets the value of CacheHitRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) SetPropertyCacheHitRate(value uint64) (err error) { + return instance.SetProperty("CacheHitRate", (value)) +} + +// GetCacheHitRate gets the value of CacheHitRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) GetPropertyCacheHitRate() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheHitRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentQueueSize sets the value of CurrentQueueSize for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) SetPropertyCurrentQueueSize(value uint32) (err error) { + return instance.SetProperty("CurrentQueueSize", (value)) +} + +// GetCurrentQueueSize gets the value of CurrentQueueSize for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) GetPropertyCurrentQueueSize() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentQueueSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxQueueItemAge sets the value of MaxQueueItemAge for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) SetPropertyMaxQueueItemAge(value uint64) (err error) { + return instance.SetProperty("MaxQueueItemAge", (value)) +} + +// GetMaxQueueItemAge gets the value of MaxQueueItemAge for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) GetPropertyMaxQueueItemAge() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxQueueItemAge") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRejectedRequests sets the value of RejectedRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) SetPropertyRejectedRequests(value uint64) (err error) { + return instance.SetProperty("RejectedRequests", (value)) +} + +// GetRejectedRequests gets the value of RejectedRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) GetPropertyRejectedRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("RejectedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRejectionRate sets the value of RejectionRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) SetPropertyRejectionRate(value uint64) (err error) { + return instance.SetProperty("RejectionRate", (value)) +} + +// GetRejectionRate gets the value of RejectionRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceRequestQueues) GetPropertyRejectionRate() (value uint64, err error) { + retValue, err := instance.GetProperty("RejectionRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceUrlGroups.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceUrlGroups.go new file mode 100644 index 00000000..c9127cd9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HTTPServiceUrlGroups.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HTTPServiceUrlGroups struct +type Win32_PerfRawData_Counters_HTTPServiceUrlGroups struct { + *Win32_PerfRawData + + // + AllRequests uint32 + + // + BytesReceivedRate uint64 + + // + BytesSentRate uint64 + + // + BytesTransferredRate uint64 + + // + ConnectionAttempts uint32 + + // + CurrentConnections uint32 + + // + GetRequests uint32 + + // + HeadRequests uint32 + + // + MaxConnections uint32 +} + +func NewWin32_PerfRawData_Counters_HTTPServiceUrlGroupsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HTTPServiceUrlGroups{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HTTPServiceUrlGroupsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HTTPServiceUrlGroups{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAllRequests sets the value of AllRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyAllRequests(value uint32) (err error) { + return instance.SetProperty("AllRequests", (value)) +} + +// GetAllRequests gets the value of AllRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyAllRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("AllRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedRate sets the value of BytesReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyBytesReceivedRate(value uint64) (err error) { + return instance.SetProperty("BytesReceivedRate", (value)) +} + +// GetBytesReceivedRate gets the value of BytesReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyBytesReceivedRate() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentRate sets the value of BytesSentRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyBytesSentRate(value uint64) (err error) { + return instance.SetProperty("BytesSentRate", (value)) +} + +// GetBytesSentRate gets the value of BytesSentRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyBytesSentRate() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransferredRate sets the value of BytesTransferredRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyBytesTransferredRate(value uint64) (err error) { + return instance.SetProperty("BytesTransferredRate", (value)) +} + +// GetBytesTransferredRate gets the value of BytesTransferredRate for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyBytesTransferredRate() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransferredRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectionAttempts sets the value of ConnectionAttempts for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyConnectionAttempts(value uint32) (err error) { + return instance.SetProperty("ConnectionAttempts", (value)) +} + +// GetConnectionAttempts gets the value of ConnectionAttempts for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyConnectionAttempts() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionAttempts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentConnections sets the value of CurrentConnections for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyCurrentConnections(value uint32) (err error) { + return instance.SetProperty("CurrentConnections", (value)) +} + +// GetCurrentConnections gets the value of CurrentConnections for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyCurrentConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGetRequests sets the value of GetRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyGetRequests(value uint32) (err error) { + return instance.SetProperty("GetRequests", (value)) +} + +// GetGetRequests gets the value of GetRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyGetRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("GetRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHeadRequests sets the value of HeadRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyHeadRequests(value uint32) (err error) { + return instance.SetProperty("HeadRequests", (value)) +} + +// GetHeadRequests gets the value of HeadRequests for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyHeadRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("HeadRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxConnections sets the value of MaxConnections for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) SetPropertyMaxConnections(value uint32) (err error) { + return instance.SetProperty("MaxConnections", (value)) +} + +// GetMaxConnections gets the value of MaxConnections for the instance +func (instance *Win32_PerfRawData_Counters_HTTPServiceUrlGroups) GetPropertyMaxConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService.go new file mode 100644 index 00000000..f8ef39a8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService struct +type Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService struct { + *Win32_PerfRawData + + // + MaximumMemoryMbytes uint64 +} + +func NewWin32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMaximumMemoryMbytes sets the value of MaximumMemoryMbytes for the instance +func (instance *Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService) SetPropertyMaximumMemoryMbytes(value uint64) (err error) { + return instance.SetProperty("MaximumMemoryMbytes", (value)) +} + +// GetMaximumMemoryMbytes gets the value of MaximumMemoryMbytes for the instance +func (instance *Win32_PerfRawData_Counters_HyperVDynamicMemoryIntegrationService) GetPropertyMaximumMemoryMbytes() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumMemoryMbytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBus.go new file mode 100644 index 00000000..2ce09a4d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBus.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HyperVVirtualMachineBus struct +type Win32_PerfRawData_Counters_HyperVVirtualMachineBus struct { + *Win32_PerfRawData + + // + InterruptsReceivedPersec uint64 + + // + InterruptsSentPersec uint64 + + // + ThrottleEvents uint64 +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualMachineBusEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualMachineBus{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualMachineBusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualMachineBus{ + Win32_PerfRawData: tmp, + } + return +} + +// SetInterruptsReceivedPersec sets the value of InterruptsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus) SetPropertyInterruptsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("InterruptsReceivedPersec", (value)) +} + +// GetInterruptsReceivedPersec gets the value of InterruptsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus) GetPropertyInterruptsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsSentPersec sets the value of InterruptsSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus) SetPropertyInterruptsSentPersec(value uint64) (err error) { + return instance.SetProperty("InterruptsSentPersec", (value)) +} + +// GetInterruptsSentPersec gets the value of InterruptsSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus) GetPropertyInterruptsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThrottleEvents sets the value of ThrottleEvents for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus) SetPropertyThrottleEvents(value uint64) (err error) { + return instance.SetProperty("ThrottleEvents", (value)) +} + +// GetThrottleEvents gets the value of ThrottleEvents for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBus) GetPropertyThrottleEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("ThrottleEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes.go new file mode 100644 index 00000000..3a964973 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes struct +type Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes struct { + *Win32_PerfRawData + + // + BytesReadPersec uint64 + + // + BytesWrittenPersec uint64 + + // + ReadsPersec uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualMachineBusPipesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualMachineBusPipesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReadPersec sets the value of BytesReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) SetPropertyBytesReadPersec(value uint64) (err error) { + return instance.SetProperty("BytesReadPersec", (value)) +} + +// GetBytesReadPersec gets the value of BytesReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) GetPropertyBytesReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesWrittenPersec sets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) SetPropertyBytesWrittenPersec(value uint64) (err error) { + return instance.SetProperty("BytesWrittenPersec", (value)) +} + +// GetBytesWrittenPersec gets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) GetPropertyBytesWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusPipes) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes.go new file mode 100644 index 00000000..0116cb7d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes struct +type Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes struct { + *Win32_PerfRawData + + // + BytesReadPersec uint64 + + // + BytesWrittenPersec uint64 + + // + ReadsPersec uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReadPersec sets the value of BytesReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyBytesReadPersec(value uint64) (err error) { + return instance.SetProperty("BytesReadPersec", (value)) +} + +// GetBytesReadPersec gets the value of BytesReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyBytesReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesWrittenPersec sets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyBytesWrittenPersec(value uint64) (err error) { + return instance.SetProperty("BytesWrittenPersec", (value)) +} + +// GetBytesWrittenPersec gets the value of BytesWrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyBytesWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualMachineBusProviderPipes) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualStorageDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualStorageDevice.go new file mode 100644 index 00000000..843d051b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_HyperVVirtualStorageDevice.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_HyperVVirtualStorageDevice struct +type Win32_PerfRawData_Counters_HyperVVirtualStorageDevice struct { + *Win32_PerfRawData + + // + AdapterOpenChannelCount uint32 + + // + ByteQuotaReplenishmentRate uint64 + + // + ErrorCount uint32 + + // + FlushCount uint32 + + // + IoQuotaReplenishmentRate uint64 + + // + Latency uint32 + + // + Latency_Base uint32 + + // + LowerLatency uint32 + + // + LowerLatency_Base uint32 + + // + LowerQueueLength uint64 + + // + MaximumAdapterWorkerCount uint32 + + // + MaximumBandwidth uint64 + + // + MaximumIORate uint64 + + // + MinimumIORate uint64 + + // + NormalizedThroughput uint64 + + // + QueueLength uint64 + + // + ReadBytesPersec uint64 + + // + ReadCount uint32 + + // + ReadOperationsPerSec uint32 + + // + Throughput uint32 + + // + WriteBytesPersec uint64 + + // + WriteCount uint32 + + // + WriteOperationsPerSec uint32 +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualStorageDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualStorageDevice{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_HyperVVirtualStorageDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_HyperVVirtualStorageDevice{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAdapterOpenChannelCount sets the value of AdapterOpenChannelCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyAdapterOpenChannelCount(value uint32) (err error) { + return instance.SetProperty("AdapterOpenChannelCount", (value)) +} + +// GetAdapterOpenChannelCount gets the value of AdapterOpenChannelCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyAdapterOpenChannelCount() (value uint32, err error) { + retValue, err := instance.GetProperty("AdapterOpenChannelCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetByteQuotaReplenishmentRate sets the value of ByteQuotaReplenishmentRate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyByteQuotaReplenishmentRate(value uint64) (err error) { + return instance.SetProperty("ByteQuotaReplenishmentRate", (value)) +} + +// GetByteQuotaReplenishmentRate gets the value of ByteQuotaReplenishmentRate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyByteQuotaReplenishmentRate() (value uint64, err error) { + retValue, err := instance.GetProperty("ByteQuotaReplenishmentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorCount sets the value of ErrorCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyErrorCount(value uint32) (err error) { + return instance.SetProperty("ErrorCount", (value)) +} + +// GetErrorCount gets the value of ErrorCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyErrorCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushCount sets the value of FlushCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyFlushCount(value uint32) (err error) { + return instance.SetProperty("FlushCount", (value)) +} + +// GetFlushCount gets the value of FlushCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyFlushCount() (value uint32, err error) { + retValue, err := instance.GetProperty("FlushCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIoQuotaReplenishmentRate sets the value of IoQuotaReplenishmentRate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyIoQuotaReplenishmentRate(value uint64) (err error) { + return instance.SetProperty("IoQuotaReplenishmentRate", (value)) +} + +// GetIoQuotaReplenishmentRate gets the value of IoQuotaReplenishmentRate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyIoQuotaReplenishmentRate() (value uint64, err error) { + retValue, err := instance.GetProperty("IoQuotaReplenishmentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLatency sets the value of Latency for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyLatency(value uint32) (err error) { + return instance.SetProperty("Latency", (value)) +} + +// GetLatency gets the value of Latency for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("Latency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLatency_Base sets the value of Latency_Base for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyLatency_Base(value uint32) (err error) { + return instance.SetProperty("Latency_Base", (value)) +} + +// GetLatency_Base gets the value of Latency_Base for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Latency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowerLatency sets the value of LowerLatency for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyLowerLatency(value uint32) (err error) { + return instance.SetProperty("LowerLatency", (value)) +} + +// GetLowerLatency gets the value of LowerLatency for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyLowerLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("LowerLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowerLatency_Base sets the value of LowerLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyLowerLatency_Base(value uint32) (err error) { + return instance.SetProperty("LowerLatency_Base", (value)) +} + +// GetLowerLatency_Base gets the value of LowerLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyLowerLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LowerLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowerQueueLength sets the value of LowerQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyLowerQueueLength(value uint64) (err error) { + return instance.SetProperty("LowerQueueLength", (value)) +} + +// GetLowerQueueLength gets the value of LowerQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyLowerQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("LowerQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumAdapterWorkerCount sets the value of MaximumAdapterWorkerCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyMaximumAdapterWorkerCount(value uint32) (err error) { + return instance.SetProperty("MaximumAdapterWorkerCount", (value)) +} + +// GetMaximumAdapterWorkerCount gets the value of MaximumAdapterWorkerCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyMaximumAdapterWorkerCount() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumAdapterWorkerCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumBandwidth sets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyMaximumBandwidth(value uint64) (err error) { + return instance.SetProperty("MaximumBandwidth", (value)) +} + +// GetMaximumBandwidth gets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyMaximumBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumIORate sets the value of MaximumIORate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyMaximumIORate(value uint64) (err error) { + return instance.SetProperty("MaximumIORate", (value)) +} + +// GetMaximumIORate gets the value of MaximumIORate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyMaximumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMinimumIORate sets the value of MinimumIORate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyMinimumIORate(value uint64) (err error) { + return instance.SetProperty("MinimumIORate", (value)) +} + +// GetMinimumIORate gets the value of MinimumIORate for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyMinimumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("MinimumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedThroughput sets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyNormalizedThroughput(value uint64) (err error) { + return instance.SetProperty("NormalizedThroughput", (value)) +} + +// GetNormalizedThroughput gets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyNormalizedThroughput() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedThroughput") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetQueueLength sets the value of QueueLength for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyQueueLength(value uint64) (err error) { + return instance.SetProperty("QueueLength", (value)) +} + +// GetQueueLength gets the value of QueueLength for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("QueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCount sets the value of ReadCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyReadCount(value uint32) (err error) { + return instance.SetProperty("ReadCount", (value)) +} + +// GetReadCount gets the value of ReadCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyReadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadOperationsPerSec sets the value of ReadOperationsPerSec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyReadOperationsPerSec(value uint32) (err error) { + return instance.SetProperty("ReadOperationsPerSec", (value)) +} + +// GetReadOperationsPerSec gets the value of ReadOperationsPerSec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyReadOperationsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadOperationsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThroughput sets the value of Throughput for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyThroughput(value uint32) (err error) { + return instance.SetProperty("Throughput", (value)) +} + +// GetThroughput gets the value of Throughput for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyThroughput() (value uint32, err error) { + retValue, err := instance.GetProperty("Throughput") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCount sets the value of WriteCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyWriteCount(value uint32) (err error) { + return instance.SetProperty("WriteCount", (value)) +} + +// GetWriteCount gets the value of WriteCount for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyWriteCount() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteOperationsPerSec sets the value of WriteOperationsPerSec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) SetPropertyWriteOperationsPerSec(value uint32) (err error) { + return instance.SetProperty("WriteOperationsPerSec", (value)) +} + +// GetWriteOperationsPerSec gets the value of WriteOperationsPerSec for the instance +func (instance *Win32_PerfRawData_Counters_HyperVVirtualStorageDevice) GetPropertyWriteOperationsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteOperationsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSGlobal.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSGlobal.go new file mode 100644 index 00000000..06307985 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSGlobal.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPHTTPSGlobal struct +type Win32_PerfRawData_Counters_IPHTTPSGlobal struct { + *Win32_PerfRawData + + // + DropsNeighborresolutiontimeouts uint64 + + // + ErrorsAuthenticationErrors uint64 + + // + ErrorsReceiveerrorsontheserver uint64 + + // + ErrorsTransmiterrorsontheserver uint64 + + // + InTotalbytesreceived uint64 + + // + InTotalpacketsreceived uint64 + + // + OutTotalbytesforwarded uint64 + + // + OutTotalbytessent uint64 + + // + OutTotalpacketssent uint64 + + // + SessionsTotalsessions uint64 +} + +func NewWin32_PerfRawData_Counters_IPHTTPSGlobalEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPHTTPSGlobal, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPHTTPSGlobal{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPHTTPSGlobalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPHTTPSGlobal, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPHTTPSGlobal{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDropsNeighborresolutiontimeouts sets the value of DropsNeighborresolutiontimeouts for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyDropsNeighborresolutiontimeouts(value uint64) (err error) { + return instance.SetProperty("DropsNeighborresolutiontimeouts", (value)) +} + +// GetDropsNeighborresolutiontimeouts gets the value of DropsNeighborresolutiontimeouts for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyDropsNeighborresolutiontimeouts() (value uint64, err error) { + retValue, err := instance.GetProperty("DropsNeighborresolutiontimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsAuthenticationErrors sets the value of ErrorsAuthenticationErrors for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyErrorsAuthenticationErrors(value uint64) (err error) { + return instance.SetProperty("ErrorsAuthenticationErrors", (value)) +} + +// GetErrorsAuthenticationErrors gets the value of ErrorsAuthenticationErrors for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyErrorsAuthenticationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsAuthenticationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsReceiveerrorsontheserver sets the value of ErrorsReceiveerrorsontheserver for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyErrorsReceiveerrorsontheserver(value uint64) (err error) { + return instance.SetProperty("ErrorsReceiveerrorsontheserver", (value)) +} + +// GetErrorsReceiveerrorsontheserver gets the value of ErrorsReceiveerrorsontheserver for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyErrorsReceiveerrorsontheserver() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsReceiveerrorsontheserver") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsTransmiterrorsontheserver sets the value of ErrorsTransmiterrorsontheserver for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyErrorsTransmiterrorsontheserver(value uint64) (err error) { + return instance.SetProperty("ErrorsTransmiterrorsontheserver", (value)) +} + +// GetErrorsTransmiterrorsontheserver gets the value of ErrorsTransmiterrorsontheserver for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyErrorsTransmiterrorsontheserver() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsTransmiterrorsontheserver") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTotalbytesreceived sets the value of InTotalbytesreceived for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyInTotalbytesreceived(value uint64) (err error) { + return instance.SetProperty("InTotalbytesreceived", (value)) +} + +// GetInTotalbytesreceived gets the value of InTotalbytesreceived for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyInTotalbytesreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("InTotalbytesreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTotalpacketsreceived sets the value of InTotalpacketsreceived for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyInTotalpacketsreceived(value uint64) (err error) { + return instance.SetProperty("InTotalpacketsreceived", (value)) +} + +// GetInTotalpacketsreceived gets the value of InTotalpacketsreceived for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyInTotalpacketsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("InTotalpacketsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTotalbytesforwarded sets the value of OutTotalbytesforwarded for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyOutTotalbytesforwarded(value uint64) (err error) { + return instance.SetProperty("OutTotalbytesforwarded", (value)) +} + +// GetOutTotalbytesforwarded gets the value of OutTotalbytesforwarded for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyOutTotalbytesforwarded() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTotalbytesforwarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTotalbytessent sets the value of OutTotalbytessent for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyOutTotalbytessent(value uint64) (err error) { + return instance.SetProperty("OutTotalbytessent", (value)) +} + +// GetOutTotalbytessent gets the value of OutTotalbytessent for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyOutTotalbytessent() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTotalbytessent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTotalpacketssent sets the value of OutTotalpacketssent for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertyOutTotalpacketssent(value uint64) (err error) { + return instance.SetProperty("OutTotalpacketssent", (value)) +} + +// GetOutTotalpacketssent gets the value of OutTotalpacketssent for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertyOutTotalpacketssent() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTotalpacketssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSessionsTotalsessions sets the value of SessionsTotalsessions for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) SetPropertySessionsTotalsessions(value uint64) (err error) { + return instance.SetProperty("SessionsTotalsessions", (value)) +} + +// GetSessionsTotalsessions gets the value of SessionsTotalsessions for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSGlobal) GetPropertySessionsTotalsessions() (value uint64, err error) { + retValue, err := instance.GetProperty("SessionsTotalsessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSSession.go new file mode 100644 index 00000000..43bf546d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPHTTPSSession.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPHTTPSSession struct +type Win32_PerfRawData_Counters_IPHTTPSSession struct { + *Win32_PerfRawData + + // + Bytesreceivedonthissession uint64 + + // + Bytessentonthissession uint64 + + // + DurationDurationofthesessionSeconds uint64 + + // + ErrorsReceiveerrorsonthissession uint64 + + // + ErrorsTransmiterrorsonthissession uint64 + + // + Packetsreceivedonthissession uint64 + + // + Packetssentonthissession uint64 +} + +func NewWin32_PerfRawData_Counters_IPHTTPSSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPHTTPSSession, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPHTTPSSession{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPHTTPSSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPHTTPSSession, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPHTTPSSession{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesreceivedonthissession sets the value of Bytesreceivedonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyBytesreceivedonthissession(value uint64) (err error) { + return instance.SetProperty("Bytesreceivedonthissession", (value)) +} + +// GetBytesreceivedonthissession gets the value of Bytesreceivedonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyBytesreceivedonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytesreceivedonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytessentonthissession sets the value of Bytessentonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyBytessentonthissession(value uint64) (err error) { + return instance.SetProperty("Bytessentonthissession", (value)) +} + +// GetBytessentonthissession gets the value of Bytessentonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyBytessentonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytessentonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDurationDurationofthesessionSeconds sets the value of DurationDurationofthesessionSeconds for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyDurationDurationofthesessionSeconds(value uint64) (err error) { + return instance.SetProperty("DurationDurationofthesessionSeconds", (value)) +} + +// GetDurationDurationofthesessionSeconds gets the value of DurationDurationofthesessionSeconds for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyDurationDurationofthesessionSeconds() (value uint64, err error) { + retValue, err := instance.GetProperty("DurationDurationofthesessionSeconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsReceiveerrorsonthissession sets the value of ErrorsReceiveerrorsonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyErrorsReceiveerrorsonthissession(value uint64) (err error) { + return instance.SetProperty("ErrorsReceiveerrorsonthissession", (value)) +} + +// GetErrorsReceiveerrorsonthissession gets the value of ErrorsReceiveerrorsonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyErrorsReceiveerrorsonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsReceiveerrorsonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorsTransmiterrorsonthissession sets the value of ErrorsTransmiterrorsonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyErrorsTransmiterrorsonthissession(value uint64) (err error) { + return instance.SetProperty("ErrorsTransmiterrorsonthissession", (value)) +} + +// GetErrorsTransmiterrorsonthissession gets the value of ErrorsTransmiterrorsonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyErrorsTransmiterrorsonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorsTransmiterrorsonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsreceivedonthissession sets the value of Packetsreceivedonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyPacketsreceivedonthissession(value uint64) (err error) { + return instance.SetProperty("Packetsreceivedonthissession", (value)) +} + +// GetPacketsreceivedonthissession gets the value of Packetsreceivedonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyPacketsreceivedonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsreceivedonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketssentonthissession sets the value of Packetssentonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) SetPropertyPacketssentonthissession(value uint64) (err error) { + return instance.SetProperty("Packetssentonthissession", (value)) +} + +// GetPacketssentonthissession gets the value of Packetssentonthissession for the instance +func (instance *Win32_PerfRawData_Counters_IPHTTPSSession) GetPropertyPacketssentonthissession() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetssentonthissession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv4.go new file mode 100644 index 00000000..f5dc9ca3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv4.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecAuthIPIPv4 struct +type Win32_PerfRawData_Counters_IPsecAuthIPIPv4 struct { + *Win32_PerfRawData + + // + ActiveExtendedModeSAs uint32 + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + ExtendedModeNegotiations uint32 + + // + ExtendedModeNegotiationsPersec uint32 + + // + ExtendedModeSAsThatUsedImpersonation uint32 + + // + FailedExtendedModeNegotiations uint32 + + // + FailedExtendedModeNegotiationsPersec uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + MainModeSAsThatUsedImpersonation uint32 + + // + MainModeSAsThatUsedImpersonationPersec uint32 + + // + PendingExtendedModeNegotiations uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulExtendedModeNegotiations uint32 + + // + SuccessfulExtendedModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecAuthIPIPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecAuthIPIPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecAuthIPIPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecAuthIPIPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveExtendedModeSAs sets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyActiveExtendedModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveExtendedModeSAs", (value)) +} + +// GetActiveExtendedModeSAs gets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyActiveExtendedModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveExtendedModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiations sets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiations", (value)) +} + +// GetExtendedModeNegotiations gets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiationsPersec sets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiationsPersec", (value)) +} + +// GetExtendedModeNegotiationsPersec gets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeSAsThatUsedImpersonation sets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyExtendedModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("ExtendedModeSAsThatUsedImpersonation", (value)) +} + +// GetExtendedModeSAsThatUsedImpersonation gets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyExtendedModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiations sets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyFailedExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiations", (value)) +} + +// GetFailedExtendedModeNegotiations gets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyFailedExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiationsPersec sets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyFailedExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiationsPersec", (value)) +} + +// GetFailedExtendedModeNegotiationsPersec gets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyFailedExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonation sets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonation", (value)) +} + +// GetMainModeSAsThatUsedImpersonation gets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonationPersec sets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyMainModeSAsThatUsedImpersonationPersec(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonationPersec", (value)) +} + +// GetMainModeSAsThatUsedImpersonationPersec gets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyMainModeSAsThatUsedImpersonationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingExtendedModeNegotiations sets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyPendingExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingExtendedModeNegotiations", (value)) +} + +// GetPendingExtendedModeNegotiations gets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyPendingExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiations sets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiations", (value)) +} + +// GetSuccessfulExtendedModeNegotiations gets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiationsPersec sets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiationsPersec", (value)) +} + +// GetSuccessfulExtendedModeNegotiationsPersec gets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv4) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv6.go new file mode 100644 index 00000000..b0f80aa0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecAuthIPIPv6.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecAuthIPIPv6 struct +type Win32_PerfRawData_Counters_IPsecAuthIPIPv6 struct { + *Win32_PerfRawData + + // + ActiveExtendedModeSAs uint32 + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + ExtendedModeNegotiations uint32 + + // + ExtendedModeNegotiationsPersec uint32 + + // + ExtendedModeSAsThatUsedImpersonation uint32 + + // + FailedExtendedModeNegotiations uint32 + + // + FailedExtendedModeNegotiationsPersec uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + MainModeSAsThatUsedImpersonation uint32 + + // + MainModeSAsThatUsedImpersonationPersec uint32 + + // + PendingExtendedModeNegotiations uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulExtendedModeNegotiations uint32 + + // + SuccessfulExtendedModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecAuthIPIPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecAuthIPIPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecAuthIPIPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecAuthIPIPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveExtendedModeSAs sets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyActiveExtendedModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveExtendedModeSAs", (value)) +} + +// GetActiveExtendedModeSAs gets the value of ActiveExtendedModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyActiveExtendedModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveExtendedModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiations sets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiations", (value)) +} + +// GetExtendedModeNegotiations gets the value of ExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeNegotiationsPersec sets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("ExtendedModeNegotiationsPersec", (value)) +} + +// GetExtendedModeNegotiationsPersec gets the value of ExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExtendedModeSAsThatUsedImpersonation sets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyExtendedModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("ExtendedModeSAsThatUsedImpersonation", (value)) +} + +// GetExtendedModeSAsThatUsedImpersonation gets the value of ExtendedModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyExtendedModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtendedModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiations sets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyFailedExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiations", (value)) +} + +// GetFailedExtendedModeNegotiations gets the value of FailedExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyFailedExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedExtendedModeNegotiationsPersec sets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyFailedExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedExtendedModeNegotiationsPersec", (value)) +} + +// GetFailedExtendedModeNegotiationsPersec gets the value of FailedExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyFailedExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonation sets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeSAsThatUsedImpersonation(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonation", (value)) +} + +// GetMainModeSAsThatUsedImpersonation gets the value of MainModeSAsThatUsedImpersonation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeSAsThatUsedImpersonation() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeSAsThatUsedImpersonationPersec sets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyMainModeSAsThatUsedImpersonationPersec(value uint32) (err error) { + return instance.SetProperty("MainModeSAsThatUsedImpersonationPersec", (value)) +} + +// GetMainModeSAsThatUsedImpersonationPersec gets the value of MainModeSAsThatUsedImpersonationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyMainModeSAsThatUsedImpersonationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeSAsThatUsedImpersonationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingExtendedModeNegotiations sets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyPendingExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingExtendedModeNegotiations", (value)) +} + +// GetPendingExtendedModeNegotiations gets the value of PendingExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyPendingExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiations sets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulExtendedModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiations", (value)) +} + +// GetSuccessfulExtendedModeNegotiations gets the value of SuccessfulExtendedModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulExtendedModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulExtendedModeNegotiationsPersec sets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulExtendedModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulExtendedModeNegotiationsPersec", (value)) +} + +// GetSuccessfulExtendedModeNegotiationsPersec gets the value of SuccessfulExtendedModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulExtendedModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulExtendedModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecAuthIPIPv6) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecConnections.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecConnections.go new file mode 100644 index 00000000..ed6d3d98 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecConnections.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecConnections struct +type Win32_PerfRawData_Counters_IPsecConnections struct { + *Win32_PerfRawData + + // + Maxnumberofconnectionssinceboot uint32 + + // + Numberoffailedauthentications uint64 + + // + TotalBytesInsincestart uint64 + + // + TotalBytesOutsincestart uint64 + + // + TotalNumbercurrentConnections uint32 + + // + Totalnumberofcumulativeconnectionssinceboot uint64 +} + +func NewWin32_PerfRawData_Counters_IPsecConnectionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecConnections, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecConnections{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecConnectionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecConnections, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecConnections{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMaxnumberofconnectionssinceboot sets the value of Maxnumberofconnectionssinceboot for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) SetPropertyMaxnumberofconnectionssinceboot(value uint32) (err error) { + return instance.SetProperty("Maxnumberofconnectionssinceboot", (value)) +} + +// GetMaxnumberofconnectionssinceboot gets the value of Maxnumberofconnectionssinceboot for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) GetPropertyMaxnumberofconnectionssinceboot() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxnumberofconnectionssinceboot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoffailedauthentications sets the value of Numberoffailedauthentications for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) SetPropertyNumberoffailedauthentications(value uint64) (err error) { + return instance.SetProperty("Numberoffailedauthentications", (value)) +} + +// GetNumberoffailedauthentications gets the value of Numberoffailedauthentications for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) GetPropertyNumberoffailedauthentications() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberoffailedauthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBytesInsincestart sets the value of TotalBytesInsincestart for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) SetPropertyTotalBytesInsincestart(value uint64) (err error) { + return instance.SetProperty("TotalBytesInsincestart", (value)) +} + +// GetTotalBytesInsincestart gets the value of TotalBytesInsincestart for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) GetPropertyTotalBytesInsincestart() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesInsincestart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBytesOutsincestart sets the value of TotalBytesOutsincestart for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) SetPropertyTotalBytesOutsincestart(value uint64) (err error) { + return instance.SetProperty("TotalBytesOutsincestart", (value)) +} + +// GetTotalBytesOutsincestart gets the value of TotalBytesOutsincestart for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) GetPropertyTotalBytesOutsincestart() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesOutsincestart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalNumbercurrentConnections sets the value of TotalNumbercurrentConnections for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) SetPropertyTotalNumbercurrentConnections(value uint32) (err error) { + return instance.SetProperty("TotalNumbercurrentConnections", (value)) +} + +// GetTotalNumbercurrentConnections gets the value of TotalNumbercurrentConnections for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) GetPropertyTotalNumbercurrentConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumbercurrentConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalnumberofcumulativeconnectionssinceboot sets the value of Totalnumberofcumulativeconnectionssinceboot for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) SetPropertyTotalnumberofcumulativeconnectionssinceboot(value uint64) (err error) { + return instance.SetProperty("Totalnumberofcumulativeconnectionssinceboot", (value)) +} + +// GetTotalnumberofcumulativeconnectionssinceboot gets the value of Totalnumberofcumulativeconnectionssinceboot for the instance +func (instance *Win32_PerfRawData_Counters_IPsecConnections) GetPropertyTotalnumberofcumulativeconnectionssinceboot() (value uint64, err error) { + retValue, err := instance.GetProperty("Totalnumberofcumulativeconnectionssinceboot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDoSProtection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDoSProtection.go new file mode 100644 index 00000000..908725e0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDoSProtection.go @@ -0,0 +1,1130 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecDoSProtection struct +type Win32_PerfRawData_Counters_IPsecDoSProtection struct { + *Win32_PerfRawData + + // + CurrentStateEntries uint64 + + // + InboundAllowedDefaultBlockExemptPackets uint64 + + // + InboundAllowedDefaultBlockExemptPacketsPersec uint32 + + // + InboundAllowedFilterExemptIPv6Packets uint64 + + // + InboundAllowedFilterExemptIPv6PacketsPersec uint32 + + // + InboundAllowedICMPv6Packets uint64 + + // + InboundAllowedICMPv6PacketsPersec uint32 + + // + InboundAllowedIPv6IPsecAuthenticatedPackets uint64 + + // + InboundAllowedIPv6IPsecAuthenticatedPacketsPersec uint32 + + // + InboundAllowedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + InboundDiscardedDefaultBlockPackets uint64 + + // + InboundDiscardedDefaultBlockPacketsPersec uint32 + + // + InboundDiscardedFilterBlockIPv6Packets uint64 + + // + InboundDiscardedFilterBlockIPv6PacketsPersec uint32 + + // + InboundDiscardedPackets uint64 + + // + InboundDiscardedPacketsPersec uint32 + + // + InboundOtherDiscardedIPv6IPsecAuthenticatedPackets uint64 + + // + InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec uint32 + + // + InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + InboundRateLimitDiscardedDefaultBlockExemptPackets uint64 + + // + InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec uint32 + + // + InboundRateLimitDiscardedFilterExemptIPv6Packets uint64 + + // + InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec uint32 + + // + InboundRateLimitDiscardedICMPv6Packets uint64 + + // + InboundRateLimitDiscardedICMPv6PacketsPersec uint32 + + // + InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets uint64 + + // + InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec uint32 + + // + InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets uint64 + + // + InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec uint32 + + // + PerIPRateLimitQueues uint64 + + // + StateEntries uint64 + + // + StateEntriesPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecDoSProtectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecDoSProtection, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecDoSProtection{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecDoSProtectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecDoSProtection, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecDoSProtection{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCurrentStateEntries sets the value of CurrentStateEntries for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyCurrentStateEntries(value uint64) (err error) { + return instance.SetProperty("CurrentStateEntries", (value)) +} + +// GetCurrentStateEntries gets the value of CurrentStateEntries for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyCurrentStateEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentStateEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedDefaultBlockExemptPackets sets the value of InboundAllowedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedDefaultBlockExemptPackets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedDefaultBlockExemptPackets", (value)) +} + +// GetInboundAllowedDefaultBlockExemptPackets gets the value of InboundAllowedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedDefaultBlockExemptPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedDefaultBlockExemptPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedDefaultBlockExemptPacketsPersec sets the value of InboundAllowedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedDefaultBlockExemptPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedDefaultBlockExemptPacketsPersec", (value)) +} + +// GetInboundAllowedDefaultBlockExemptPacketsPersec gets the value of InboundAllowedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedDefaultBlockExemptPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedDefaultBlockExemptPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedFilterExemptIPv6Packets sets the value of InboundAllowedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedFilterExemptIPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedFilterExemptIPv6Packets", (value)) +} + +// GetInboundAllowedFilterExemptIPv6Packets gets the value of InboundAllowedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedFilterExemptIPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedFilterExemptIPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedFilterExemptIPv6PacketsPersec sets the value of InboundAllowedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedFilterExemptIPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedFilterExemptIPv6PacketsPersec", (value)) +} + +// GetInboundAllowedFilterExemptIPv6PacketsPersec gets the value of InboundAllowedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedFilterExemptIPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedFilterExemptIPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedICMPv6Packets sets the value of InboundAllowedICMPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedICMPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedICMPv6Packets", (value)) +} + +// GetInboundAllowedICMPv6Packets gets the value of InboundAllowedICMPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedICMPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedICMPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedICMPv6PacketsPersec sets the value of InboundAllowedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedICMPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedICMPv6PacketsPersec", (value)) +} + +// GetInboundAllowedICMPv6PacketsPersec gets the value of InboundAllowedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedICMPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedICMPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecAuthenticatedPackets sets the value of InboundAllowedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecAuthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecAuthenticatedPackets", (value)) +} + +// GetInboundAllowedIPv6IPsecAuthenticatedPackets gets the value of InboundAllowedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecAuthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecAuthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecAuthenticatedPacketsPersec sets the value of InboundAllowedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecAuthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecAuthenticatedPacketsPersec", (value)) +} + +// GetInboundAllowedIPv6IPsecAuthenticatedPacketsPersec gets the value of InboundAllowedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecAuthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecAuthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecUnauthenticatedPackets sets the value of InboundAllowedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundAllowedIPv6IPsecUnauthenticatedPackets gets the value of InboundAllowedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundAllowedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundAllowedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundDiscardedDefaultBlockPackets sets the value of InboundDiscardedDefaultBlockPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedDefaultBlockPackets(value uint64) (err error) { + return instance.SetProperty("InboundDiscardedDefaultBlockPackets", (value)) +} + +// GetInboundDiscardedDefaultBlockPackets gets the value of InboundDiscardedDefaultBlockPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedDefaultBlockPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundDiscardedDefaultBlockPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundDiscardedDefaultBlockPacketsPersec sets the value of InboundDiscardedDefaultBlockPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedDefaultBlockPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundDiscardedDefaultBlockPacketsPersec", (value)) +} + +// GetInboundDiscardedDefaultBlockPacketsPersec gets the value of InboundDiscardedDefaultBlockPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedDefaultBlockPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundDiscardedDefaultBlockPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundDiscardedFilterBlockIPv6Packets sets the value of InboundDiscardedFilterBlockIPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedFilterBlockIPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundDiscardedFilterBlockIPv6Packets", (value)) +} + +// GetInboundDiscardedFilterBlockIPv6Packets gets the value of InboundDiscardedFilterBlockIPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedFilterBlockIPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundDiscardedFilterBlockIPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundDiscardedFilterBlockIPv6PacketsPersec sets the value of InboundDiscardedFilterBlockIPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedFilterBlockIPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundDiscardedFilterBlockIPv6PacketsPersec", (value)) +} + +// GetInboundDiscardedFilterBlockIPv6PacketsPersec gets the value of InboundDiscardedFilterBlockIPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedFilterBlockIPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundDiscardedFilterBlockIPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundDiscardedPackets sets the value of InboundDiscardedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedPackets(value uint64) (err error) { + return instance.SetProperty("InboundDiscardedPackets", (value)) +} + +// GetInboundDiscardedPackets gets the value of InboundDiscardedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundDiscardedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundDiscardedPacketsPersec sets the value of InboundDiscardedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundDiscardedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundDiscardedPacketsPersec", (value)) +} + +// GetInboundDiscardedPacketsPersec gets the value of InboundDiscardedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundDiscardedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundDiscardedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecAuthenticatedPackets sets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPackets", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecAuthenticatedPackets gets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec sets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec gets the value of InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecAuthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets sets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets gets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundOtherDiscardedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets sets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets gets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPerIPRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedDefaultBlockExemptPackets sets the value of InboundRateLimitDiscardedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedDefaultBlockExemptPackets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedDefaultBlockExemptPackets", (value)) +} + +// GetInboundRateLimitDiscardedDefaultBlockExemptPackets gets the value of InboundRateLimitDiscardedDefaultBlockExemptPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedDefaultBlockExemptPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedDefaultBlockExemptPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec sets the value of InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec gets the value of InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedDefaultBlockExemptPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedDefaultBlockExemptPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedFilterExemptIPv6Packets sets the value of InboundRateLimitDiscardedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedFilterExemptIPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedFilterExemptIPv6Packets", (value)) +} + +// GetInboundRateLimitDiscardedFilterExemptIPv6Packets gets the value of InboundRateLimitDiscardedFilterExemptIPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedFilterExemptIPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedFilterExemptIPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec sets the value of InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec gets the value of InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedFilterExemptIPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedFilterExemptIPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedICMPv6Packets sets the value of InboundRateLimitDiscardedICMPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedICMPv6Packets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedICMPv6Packets", (value)) +} + +// GetInboundRateLimitDiscardedICMPv6Packets gets the value of InboundRateLimitDiscardedICMPv6Packets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedICMPv6Packets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedICMPv6Packets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedICMPv6PacketsPersec sets the value of InboundRateLimitDiscardedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedICMPv6PacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedICMPv6PacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedICMPv6PacketsPersec gets the value of InboundRateLimitDiscardedICMPv6PacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedICMPv6PacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedICMPv6PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets sets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets gets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec sets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec gets the value of InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecAuthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets sets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets(value uint64) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets gets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec sets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec", (value)) +} + +// GetInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec gets the value of InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyInboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundRateLimitDiscardedIPv6IPsecUnauthenticatedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPerIPRateLimitQueues sets the value of PerIPRateLimitQueues for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyPerIPRateLimitQueues(value uint64) (err error) { + return instance.SetProperty("PerIPRateLimitQueues", (value)) +} + +// GetPerIPRateLimitQueues gets the value of PerIPRateLimitQueues for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyPerIPRateLimitQueues() (value uint64, err error) { + retValue, err := instance.GetProperty("PerIPRateLimitQueues") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStateEntries sets the value of StateEntries for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyStateEntries(value uint64) (err error) { + return instance.SetProperty("StateEntries", (value)) +} + +// GetStateEntries gets the value of StateEntries for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyStateEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("StateEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStateEntriesPersec sets the value of StateEntriesPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) SetPropertyStateEntriesPersec(value uint32) (err error) { + return instance.SetProperty("StateEntriesPersec", (value)) +} + +// GetStateEntriesPersec gets the value of StateEntriesPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDoSProtection) GetPropertyStateEntriesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StateEntriesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDriver.go new file mode 100644 index 00000000..1d551728 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecDriver.go @@ -0,0 +1,980 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecDriver struct +type Win32_PerfRawData_Counters_IPsecDriver struct { + *Win32_PerfRawData + + // + ActiveSecurityAssociations uint32 + + // + BytesReceivedinTransportModePersec uint32 + + // + BytesReceivedinTunnelModePersec uint32 + + // + BytesSentinTransportModePersec uint32 + + // + BytesSentinTunnelModePersec uint32 + + // + InboundPacketsDroppedPersec uint32 + + // + InboundPacketsReceivedPersec uint32 + + // + IncorrectSPIPackets uint32 + + // + IncorrectSPIPacketsPersec uint32 + + // + OffloadedBytesReceivedPersec uint32 + + // + OffloadedBytesSentPersec uint32 + + // + OffloadedSecurityAssociations uint32 + + // + PacketsNotAuthenticated uint32 + + // + PacketsNotAuthenticatedPersec uint32 + + // + PacketsNotDecrypted uint32 + + // + PacketsNotDecryptedPersec uint32 + + // + PacketsReceivedOverWrongSA uint32 + + // + PacketsReceivedOverWrongSAPersec uint32 + + // + PacketsThatFailedESPValidation uint32 + + // + PacketsThatFailedESPValidationPersec uint32 + + // + PacketsThatFailedReplayDetection uint32 + + // + PacketsThatFailedReplayDetectionPersec uint32 + + // + PacketsThatFailedUDPESPValidation uint32 + + // + PacketsThatFailedUDPESPValidationPersec uint32 + + // + PendingSecurityAssociations uint32 + + // + PlaintextPacketsReceived uint32 + + // + PlaintextPacketsReceivedPersec uint32 + + // + SARekeys uint32 + + // + SecurityAssociationsAdded uint32 + + // + TotalInboundPacketsDropped uint32 + + // + TotalInboundPacketsReceived uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecDriver, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecDriver{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecDriver, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecDriver{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveSecurityAssociations sets the value of ActiveSecurityAssociations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyActiveSecurityAssociations(value uint32) (err error) { + return instance.SetProperty("ActiveSecurityAssociations", (value)) +} + +// GetActiveSecurityAssociations gets the value of ActiveSecurityAssociations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyActiveSecurityAssociations() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSecurityAssociations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedinTransportModePersec sets the value of BytesReceivedinTransportModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyBytesReceivedinTransportModePersec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedinTransportModePersec", (value)) +} + +// GetBytesReceivedinTransportModePersec gets the value of BytesReceivedinTransportModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyBytesReceivedinTransportModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedinTransportModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedinTunnelModePersec sets the value of BytesReceivedinTunnelModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyBytesReceivedinTunnelModePersec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedinTunnelModePersec", (value)) +} + +// GetBytesReceivedinTunnelModePersec gets the value of BytesReceivedinTunnelModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyBytesReceivedinTunnelModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedinTunnelModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesSentinTransportModePersec sets the value of BytesSentinTransportModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyBytesSentinTransportModePersec(value uint32) (err error) { + return instance.SetProperty("BytesSentinTransportModePersec", (value)) +} + +// GetBytesSentinTransportModePersec gets the value of BytesSentinTransportModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyBytesSentinTransportModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesSentinTransportModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesSentinTunnelModePersec sets the value of BytesSentinTunnelModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyBytesSentinTunnelModePersec(value uint32) (err error) { + return instance.SetProperty("BytesSentinTunnelModePersec", (value)) +} + +// GetBytesSentinTunnelModePersec gets the value of BytesSentinTunnelModePersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyBytesSentinTunnelModePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesSentinTunnelModePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsDroppedPersec sets the value of InboundPacketsDroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyInboundPacketsDroppedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsDroppedPersec", (value)) +} + +// GetInboundPacketsDroppedPersec gets the value of InboundPacketsDroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyInboundPacketsDroppedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsDroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsReceivedPersec sets the value of InboundPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyInboundPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsReceivedPersec", (value)) +} + +// GetInboundPacketsReceivedPersec gets the value of InboundPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyInboundPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncorrectSPIPackets sets the value of IncorrectSPIPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyIncorrectSPIPackets(value uint32) (err error) { + return instance.SetProperty("IncorrectSPIPackets", (value)) +} + +// GetIncorrectSPIPackets gets the value of IncorrectSPIPackets for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyIncorrectSPIPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("IncorrectSPIPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncorrectSPIPacketsPersec sets the value of IncorrectSPIPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyIncorrectSPIPacketsPersec(value uint32) (err error) { + return instance.SetProperty("IncorrectSPIPacketsPersec", (value)) +} + +// GetIncorrectSPIPacketsPersec gets the value of IncorrectSPIPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyIncorrectSPIPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IncorrectSPIPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOffloadedBytesReceivedPersec sets the value of OffloadedBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyOffloadedBytesReceivedPersec(value uint32) (err error) { + return instance.SetProperty("OffloadedBytesReceivedPersec", (value)) +} + +// GetOffloadedBytesReceivedPersec gets the value of OffloadedBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyOffloadedBytesReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OffloadedBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOffloadedBytesSentPersec sets the value of OffloadedBytesSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyOffloadedBytesSentPersec(value uint32) (err error) { + return instance.SetProperty("OffloadedBytesSentPersec", (value)) +} + +// GetOffloadedBytesSentPersec gets the value of OffloadedBytesSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyOffloadedBytesSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OffloadedBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOffloadedSecurityAssociations sets the value of OffloadedSecurityAssociations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyOffloadedSecurityAssociations(value uint32) (err error) { + return instance.SetProperty("OffloadedSecurityAssociations", (value)) +} + +// GetOffloadedSecurityAssociations gets the value of OffloadedSecurityAssociations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyOffloadedSecurityAssociations() (value uint32, err error) { + retValue, err := instance.GetProperty("OffloadedSecurityAssociations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotAuthenticated sets the value of PacketsNotAuthenticated for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsNotAuthenticated(value uint32) (err error) { + return instance.SetProperty("PacketsNotAuthenticated", (value)) +} + +// GetPacketsNotAuthenticated gets the value of PacketsNotAuthenticated for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsNotAuthenticated() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotAuthenticated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotAuthenticatedPersec sets the value of PacketsNotAuthenticatedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsNotAuthenticatedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsNotAuthenticatedPersec", (value)) +} + +// GetPacketsNotAuthenticatedPersec gets the value of PacketsNotAuthenticatedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsNotAuthenticatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotAuthenticatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotDecrypted sets the value of PacketsNotDecrypted for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsNotDecrypted(value uint32) (err error) { + return instance.SetProperty("PacketsNotDecrypted", (value)) +} + +// GetPacketsNotDecrypted gets the value of PacketsNotDecrypted for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsNotDecrypted() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotDecrypted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsNotDecryptedPersec sets the value of PacketsNotDecryptedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsNotDecryptedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsNotDecryptedPersec", (value)) +} + +// GetPacketsNotDecryptedPersec gets the value of PacketsNotDecryptedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsNotDecryptedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsNotDecryptedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedOverWrongSA sets the value of PacketsReceivedOverWrongSA for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsReceivedOverWrongSA(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedOverWrongSA", (value)) +} + +// GetPacketsReceivedOverWrongSA gets the value of PacketsReceivedOverWrongSA for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsReceivedOverWrongSA() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedOverWrongSA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedOverWrongSAPersec sets the value of PacketsReceivedOverWrongSAPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsReceivedOverWrongSAPersec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedOverWrongSAPersec", (value)) +} + +// GetPacketsReceivedOverWrongSAPersec gets the value of PacketsReceivedOverWrongSAPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsReceivedOverWrongSAPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedOverWrongSAPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedESPValidation sets the value of PacketsThatFailedESPValidation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsThatFailedESPValidation(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedESPValidation", (value)) +} + +// GetPacketsThatFailedESPValidation gets the value of PacketsThatFailedESPValidation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsThatFailedESPValidation() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedESPValidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedESPValidationPersec sets the value of PacketsThatFailedESPValidationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsThatFailedESPValidationPersec(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedESPValidationPersec", (value)) +} + +// GetPacketsThatFailedESPValidationPersec gets the value of PacketsThatFailedESPValidationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsThatFailedESPValidationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedESPValidationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedReplayDetection sets the value of PacketsThatFailedReplayDetection for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsThatFailedReplayDetection(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedReplayDetection", (value)) +} + +// GetPacketsThatFailedReplayDetection gets the value of PacketsThatFailedReplayDetection for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsThatFailedReplayDetection() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedReplayDetection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedReplayDetectionPersec sets the value of PacketsThatFailedReplayDetectionPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsThatFailedReplayDetectionPersec(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedReplayDetectionPersec", (value)) +} + +// GetPacketsThatFailedReplayDetectionPersec gets the value of PacketsThatFailedReplayDetectionPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsThatFailedReplayDetectionPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedReplayDetectionPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedUDPESPValidation sets the value of PacketsThatFailedUDPESPValidation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsThatFailedUDPESPValidation(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedUDPESPValidation", (value)) +} + +// GetPacketsThatFailedUDPESPValidation gets the value of PacketsThatFailedUDPESPValidation for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsThatFailedUDPESPValidation() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedUDPESPValidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsThatFailedUDPESPValidationPersec sets the value of PacketsThatFailedUDPESPValidationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPacketsThatFailedUDPESPValidationPersec(value uint32) (err error) { + return instance.SetProperty("PacketsThatFailedUDPESPValidationPersec", (value)) +} + +// GetPacketsThatFailedUDPESPValidationPersec gets the value of PacketsThatFailedUDPESPValidationPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPacketsThatFailedUDPESPValidationPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsThatFailedUDPESPValidationPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingSecurityAssociations sets the value of PendingSecurityAssociations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPendingSecurityAssociations(value uint32) (err error) { + return instance.SetProperty("PendingSecurityAssociations", (value)) +} + +// GetPendingSecurityAssociations gets the value of PendingSecurityAssociations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPendingSecurityAssociations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingSecurityAssociations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPlaintextPacketsReceived sets the value of PlaintextPacketsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPlaintextPacketsReceived(value uint32) (err error) { + return instance.SetProperty("PlaintextPacketsReceived", (value)) +} + +// GetPlaintextPacketsReceived gets the value of PlaintextPacketsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPlaintextPacketsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("PlaintextPacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPlaintextPacketsReceivedPersec sets the value of PlaintextPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyPlaintextPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("PlaintextPacketsReceivedPersec", (value)) +} + +// GetPlaintextPacketsReceivedPersec gets the value of PlaintextPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyPlaintextPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PlaintextPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSARekeys sets the value of SARekeys for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertySARekeys(value uint32) (err error) { + return instance.SetProperty("SARekeys", (value)) +} + +// GetSARekeys gets the value of SARekeys for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertySARekeys() (value uint32, err error) { + retValue, err := instance.GetProperty("SARekeys") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityAssociationsAdded sets the value of SecurityAssociationsAdded for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertySecurityAssociationsAdded(value uint32) (err error) { + return instance.SetProperty("SecurityAssociationsAdded", (value)) +} + +// GetSecurityAssociationsAdded gets the value of SecurityAssociationsAdded for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertySecurityAssociationsAdded() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityAssociationsAdded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalInboundPacketsDropped sets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyTotalInboundPacketsDropped(value uint32) (err error) { + return instance.SetProperty("TotalInboundPacketsDropped", (value)) +} + +// GetTotalInboundPacketsDropped gets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyTotalInboundPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalInboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalInboundPacketsReceived sets the value of TotalInboundPacketsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) SetPropertyTotalInboundPacketsReceived(value uint32) (err error) { + return instance.SetProperty("TotalInboundPacketsReceived", (value)) +} + +// GetTotalInboundPacketsReceived gets the value of TotalInboundPacketsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecDriver) GetPropertyTotalInboundPacketsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalInboundPacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv4.go new file mode 100644 index 00000000..6c01ac17 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv4.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecIKEv1IPv4 struct +type Win32_PerfRawData_Counters_IPsecIKEv1IPv4 struct { + *Win32_PerfRawData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv1IPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv1IPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv1IPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv1IPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv4) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv6.go new file mode 100644 index 00000000..5b665baa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv1IPv6.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecIKEv1IPv6 struct +type Win32_PerfRawData_Counters_IPsecIKEv1IPv6 struct { + *Win32_PerfRawData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv1IPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv1IPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv1IPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv1IPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv1IPv6) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv4.go new file mode 100644 index 00000000..4cd2d379 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv4.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecIKEv2IPv4 struct +type Win32_PerfRawData_Counters_IPsecIKEv2IPv4 struct { + *Win32_PerfRawData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv2IPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv2IPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv2IPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv2IPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv4) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv6.go new file mode 100644 index 00000000..7510a3eb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_IPsecIKEv2IPv6.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_IPsecIKEv2IPv6 struct +type Win32_PerfRawData_Counters_IPsecIKEv2IPv6 struct { + *Win32_PerfRawData + + // + ActiveMainModeSAs uint32 + + // + ActiveQuickModeSAs uint32 + + // + FailedMainModeNegotiations uint32 + + // + FailedMainModeNegotiationsPersec uint32 + + // + FailedQuickModeNegotiations uint32 + + // + FailedQuickModeNegotiationsPersec uint32 + + // + MainModeNegotiationRequestsReceived uint32 + + // + MainModeNegotiationRequestsReceivedPersec uint32 + + // + MainModeNegotiations uint32 + + // + MainModeNegotiationsPersec uint32 + + // + PendingMainModeNegotiations uint32 + + // + PendingQuickModeNegotiations uint32 + + // + QuickModeNegotiations uint32 + + // + QuickModeNegotiationsPersec uint32 + + // + SuccessfulMainModeNegotiations uint32 + + // + SuccessfulMainModeNegotiationsPersec uint32 + + // + SuccessfulQuickModeNegotiations uint32 + + // + SuccessfulQuickModeNegotiationsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv2IPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv2IPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_IPsecIKEv2IPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_IPsecIKEv2IPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveMainModeSAs sets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyActiveMainModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveMainModeSAs", (value)) +} + +// GetActiveMainModeSAs gets the value of ActiveMainModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyActiveMainModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveMainModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveQuickModeSAs sets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyActiveQuickModeSAs(value uint32) (err error) { + return instance.SetProperty("ActiveQuickModeSAs", (value)) +} + +// GetActiveQuickModeSAs gets the value of ActiveQuickModeSAs for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyActiveQuickModeSAs() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveQuickModeSAs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiations sets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyFailedMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiations", (value)) +} + +// GetFailedMainModeNegotiations gets the value of FailedMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyFailedMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedMainModeNegotiationsPersec sets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyFailedMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedMainModeNegotiationsPersec", (value)) +} + +// GetFailedMainModeNegotiationsPersec gets the value of FailedMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyFailedMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiations sets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyFailedQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiations", (value)) +} + +// GetFailedQuickModeNegotiations gets the value of FailedQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyFailedQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedQuickModeNegotiationsPersec sets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyFailedQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("FailedQuickModeNegotiationsPersec", (value)) +} + +// GetFailedQuickModeNegotiationsPersec gets the value of FailedQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyFailedQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceived sets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiationRequestsReceived(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceived", (value)) +} + +// GetMainModeNegotiationRequestsReceived gets the value of MainModeNegotiationRequestsReceived for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiationRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationRequestsReceivedPersec sets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiationRequestsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationRequestsReceivedPersec", (value)) +} + +// GetMainModeNegotiationRequestsReceivedPersec gets the value of MainModeNegotiationRequestsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiationRequestsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationRequestsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiations sets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiations", (value)) +} + +// GetMainModeNegotiations gets the value of MainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMainModeNegotiationsPersec sets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("MainModeNegotiationsPersec", (value)) +} + +// GetMainModeNegotiationsPersec gets the value of MainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingMainModeNegotiations sets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyPendingMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingMainModeNegotiations", (value)) +} + +// GetPendingMainModeNegotiations gets the value of PendingMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyPendingMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPendingQuickModeNegotiations sets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyPendingQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("PendingQuickModeNegotiations", (value)) +} + +// GetPendingQuickModeNegotiations gets the value of PendingQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyPendingQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("PendingQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiations sets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiations", (value)) +} + +// GetQuickModeNegotiations gets the value of QuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuickModeNegotiationsPersec sets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertyQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("QuickModeNegotiationsPersec", (value)) +} + +// GetQuickModeNegotiationsPersec gets the value of QuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertyQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiations sets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulMainModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiations", (value)) +} + +// GetSuccessfulMainModeNegotiations gets the value of SuccessfulMainModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulMainModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulMainModeNegotiationsPersec sets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulMainModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulMainModeNegotiationsPersec", (value)) +} + +// GetSuccessfulMainModeNegotiationsPersec gets the value of SuccessfulMainModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulMainModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulMainModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiations sets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulQuickModeNegotiations(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiations", (value)) +} + +// GetSuccessfulQuickModeNegotiations gets the value of SuccessfulQuickModeNegotiations for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulQuickModeNegotiations() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSuccessfulQuickModeNegotiationsPersec sets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) SetPropertySuccessfulQuickModeNegotiationsPersec(value uint32) (err error) { + return instance.SetProperty("SuccessfulQuickModeNegotiationsPersec", (value)) +} + +// GetSuccessfulQuickModeNegotiationsPersec gets the value of SuccessfulQuickModeNegotiationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_IPsecIKEv2IPv6) GetPropertySuccessfulQuickModeNegotiationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SuccessfulQuickModeNegotiationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_KPSSVC.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_KPSSVC.go new file mode 100644 index 00000000..7198af81 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_KPSSVC.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_KPSSVC struct +type Win32_PerfRawData_Counters_KPSSVC struct { + *Win32_PerfRawData + + // + FailedRequests uint32 + + // + IncomingArmoredRequests uint32 + + // + IncomingPasswordChangeRequests uint32 + + // + IncomingRequests uint32 +} + +func NewWin32_PerfRawData_Counters_KPSSVCEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_KPSSVC, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_KPSSVC{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_KPSSVCEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_KPSSVC, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_KPSSVC{ + Win32_PerfRawData: tmp, + } + return +} + +// SetFailedRequests sets the value of FailedRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) SetPropertyFailedRequests(value uint32) (err error) { + return instance.SetProperty("FailedRequests", (value)) +} + +// GetFailedRequests gets the value of FailedRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) GetPropertyFailedRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingArmoredRequests sets the value of IncomingArmoredRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) SetPropertyIncomingArmoredRequests(value uint32) (err error) { + return instance.SetProperty("IncomingArmoredRequests", (value)) +} + +// GetIncomingArmoredRequests gets the value of IncomingArmoredRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) GetPropertyIncomingArmoredRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingArmoredRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingPasswordChangeRequests sets the value of IncomingPasswordChangeRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) SetPropertyIncomingPasswordChangeRequests(value uint32) (err error) { + return instance.SetProperty("IncomingPasswordChangeRequests", (value)) +} + +// GetIncomingPasswordChangeRequests gets the value of IncomingPasswordChangeRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) GetPropertyIncomingPasswordChangeRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingPasswordChangeRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingRequests sets the value of IncomingRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) SetPropertyIncomingRequests(value uint32) (err error) { + return instance.SetProperty("IncomingRequests", (value)) +} + +// GetIncomingRequests gets the value of IncomingRequests for the instance +func (instance *Win32_PerfRawData_Counters_KPSSVC) GetPropertyIncomingRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Netlogon.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Netlogon.go new file mode 100644 index 00000000..7018fb8c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Netlogon.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_Netlogon struct +type Win32_PerfRawData_Counters_Netlogon struct { + *Win32_PerfRawData + + // + AverageSemaphoreHoldTime uint32 + + // + AverageSemaphoreHoldTime_Base uint32 + + // + LastAuthenticationTime uint32 + + // + LastAuthenticationTime_Base uint32 + + // + SemaphoreAcquires uint64 + + // + SemaphoreHolders uint32 + + // + SemaphoreTimeouts uint64 + + // + SemaphoreWaiters uint32 +} + +func NewWin32_PerfRawData_Counters_NetlogonEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_Netlogon, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_Netlogon{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_NetlogonEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_Netlogon, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_Netlogon{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageSemaphoreHoldTime sets the value of AverageSemaphoreHoldTime for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertyAverageSemaphoreHoldTime(value uint32) (err error) { + return instance.SetProperty("AverageSemaphoreHoldTime", (value)) +} + +// GetAverageSemaphoreHoldTime gets the value of AverageSemaphoreHoldTime for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertyAverageSemaphoreHoldTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSemaphoreHoldTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageSemaphoreHoldTime_Base sets the value of AverageSemaphoreHoldTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertyAverageSemaphoreHoldTime_Base(value uint32) (err error) { + return instance.SetProperty("AverageSemaphoreHoldTime_Base", (value)) +} + +// GetAverageSemaphoreHoldTime_Base gets the value of AverageSemaphoreHoldTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertyAverageSemaphoreHoldTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSemaphoreHoldTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLastAuthenticationTime sets the value of LastAuthenticationTime for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertyLastAuthenticationTime(value uint32) (err error) { + return instance.SetProperty("LastAuthenticationTime", (value)) +} + +// GetLastAuthenticationTime gets the value of LastAuthenticationTime for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertyLastAuthenticationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("LastAuthenticationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLastAuthenticationTime_Base sets the value of LastAuthenticationTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertyLastAuthenticationTime_Base(value uint32) (err error) { + return instance.SetProperty("LastAuthenticationTime_Base", (value)) +} + +// GetLastAuthenticationTime_Base gets the value of LastAuthenticationTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertyLastAuthenticationTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LastAuthenticationTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSemaphoreAcquires sets the value of SemaphoreAcquires for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertySemaphoreAcquires(value uint64) (err error) { + return instance.SetProperty("SemaphoreAcquires", (value)) +} + +// GetSemaphoreAcquires gets the value of SemaphoreAcquires for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertySemaphoreAcquires() (value uint64, err error) { + retValue, err := instance.GetProperty("SemaphoreAcquires") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSemaphoreHolders sets the value of SemaphoreHolders for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertySemaphoreHolders(value uint32) (err error) { + return instance.SetProperty("SemaphoreHolders", (value)) +} + +// GetSemaphoreHolders gets the value of SemaphoreHolders for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertySemaphoreHolders() (value uint32, err error) { + retValue, err := instance.GetProperty("SemaphoreHolders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSemaphoreTimeouts sets the value of SemaphoreTimeouts for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertySemaphoreTimeouts(value uint64) (err error) { + return instance.SetProperty("SemaphoreTimeouts", (value)) +} + +// GetSemaphoreTimeouts gets the value of SemaphoreTimeouts for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertySemaphoreTimeouts() (value uint64, err error) { + retValue, err := instance.GetProperty("SemaphoreTimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSemaphoreWaiters sets the value of SemaphoreWaiters for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) SetPropertySemaphoreWaiters(value uint32) (err error) { + return instance.SetProperty("SemaphoreWaiters", (value)) +} + +// GetSemaphoreWaiters gets the value of SemaphoreWaiters for the instance +func (instance *Win32_PerfRawData_Counters_Netlogon) GetPropertySemaphoreWaiters() (value uint32, err error) { + retValue, err := instance.GetProperty("SemaphoreWaiters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_NetworkQoSPolicy.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_NetworkQoSPolicy.go new file mode 100644 index 00000000..96104019 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_NetworkQoSPolicy.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_NetworkQoSPolicy struct +type Win32_PerfRawData_Counters_NetworkQoSPolicy struct { + *Win32_PerfRawData + + // + Bytestransmitted uint64 + + // + BytestransmittedPersec uint64 + + // + Packetsdropped uint32 + + // + PacketsdroppedPersec uint32 + + // + Packetstransmitted uint32 + + // + PacketstransmittedPersec uint32 +} + +func NewWin32_PerfRawData_Counters_NetworkQoSPolicyEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_NetworkQoSPolicy, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_NetworkQoSPolicy{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_NetworkQoSPolicyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_NetworkQoSPolicy, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_NetworkQoSPolicy{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytestransmitted sets the value of Bytestransmitted for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) SetPropertyBytestransmitted(value uint64) (err error) { + return instance.SetProperty("Bytestransmitted", (value)) +} + +// GetBytestransmitted gets the value of Bytestransmitted for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) GetPropertyBytestransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytestransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytestransmittedPersec sets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) SetPropertyBytestransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytestransmittedPersec", (value)) +} + +// GetBytestransmittedPersec gets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) GetPropertyBytestransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytestransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsdropped sets the value of Packetsdropped for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) SetPropertyPacketsdropped(value uint32) (err error) { + return instance.SetProperty("Packetsdropped", (value)) +} + +// GetPacketsdropped gets the value of Packetsdropped for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) GetPropertyPacketsdropped() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdroppedPersec sets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) SetPropertyPacketsdroppedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsdroppedPersec", (value)) +} + +// GetPacketsdroppedPersec gets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) GetPropertyPacketsdroppedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsdroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmitted sets the value of Packetstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) SetPropertyPacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Packetstransmitted", (value)) +} + +// GetPacketstransmitted gets the value of Packetstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) GetPropertyPacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmittedPersec sets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) SetPropertyPacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("PacketstransmittedPersec", (value)) +} + +// GetPacketstransmittedPersec gets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_NetworkQoSPolicy) GetPropertyPacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerFlow.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerFlow.go new file mode 100644 index 00000000..5bb414ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerFlow.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacerFlow struct +type Win32_PerfRawData_Counters_PacerFlow struct { + *Win32_PerfRawData + + // + Averagepacketsinnetcard uint32 + + // + Averagepacketsinsequencer uint32 + + // + Averagepacketsinshaper uint32 + + // + Bytesscheduled uint64 + + // + BytesscheduledPersec uint64 + + // + Bytestransmitted uint64 + + // + BytestransmittedPersec uint64 + + // + Maximumpacketsinnetcard uint32 + + // + Maxpacketsinsequencer uint32 + + // + Maxpacketsinshaper uint32 + + // + Nonconformingpacketsscheduled uint32 + + // + NonconformingpacketsscheduledPersec uint32 + + // + Nonconformingpacketstransmitted uint32 + + // + NonconformingpacketstransmittedPersec uint32 + + // + Packetsdropped uint32 + + // + PacketsdroppedPersec uint32 + + // + Packetsscheduled uint32 + + // + PacketsscheduledPersec uint32 + + // + Packetstransmitted uint32 + + // + PacketstransmittedPersec uint32 +} + +func NewWin32_PerfRawData_Counters_PacerFlowEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacerFlow, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacerFlow{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacerFlowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacerFlow, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacerFlow{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAveragepacketsinnetcard sets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyAveragepacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinnetcard", (value)) +} + +// GetAveragepacketsinnetcard gets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyAveragepacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinsequencer sets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyAveragepacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinsequencer", (value)) +} + +// GetAveragepacketsinsequencer gets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyAveragepacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinshaper sets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyAveragepacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinshaper", (value)) +} + +// GetAveragepacketsinshaper gets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyAveragepacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesscheduled sets the value of Bytesscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyBytesscheduled(value uint64) (err error) { + return instance.SetProperty("Bytesscheduled", (value)) +} + +// GetBytesscheduled gets the value of Bytesscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyBytesscheduled() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytesscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesscheduledPersec sets the value of BytesscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyBytesscheduledPersec(value uint64) (err error) { + return instance.SetProperty("BytesscheduledPersec", (value)) +} + +// GetBytesscheduledPersec gets the value of BytesscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyBytesscheduledPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytestransmitted sets the value of Bytestransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyBytestransmitted(value uint64) (err error) { + return instance.SetProperty("Bytestransmitted", (value)) +} + +// GetBytestransmitted gets the value of Bytestransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyBytestransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("Bytestransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytestransmittedPersec sets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyBytestransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytestransmittedPersec", (value)) +} + +// GetBytestransmittedPersec gets the value of BytestransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyBytestransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytestransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumpacketsinnetcard sets the value of Maximumpacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyMaximumpacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Maximumpacketsinnetcard", (value)) +} + +// GetMaximumpacketsinnetcard gets the value of Maximumpacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyMaximumpacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Maximumpacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinsequencer sets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyMaxpacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinsequencer", (value)) +} + +// GetMaxpacketsinsequencer gets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyMaxpacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinshaper sets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyMaxpacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinshaper", (value)) +} + +// GetMaxpacketsinshaper gets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyMaxpacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduled sets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyNonconformingpacketsscheduled(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketsscheduled", (value)) +} + +// GetNonconformingpacketsscheduled gets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyNonconformingpacketsscheduled() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketsscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduledPersec sets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyNonconformingpacketsscheduledPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketsscheduledPersec", (value)) +} + +// GetNonconformingpacketsscheduledPersec gets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyNonconformingpacketsscheduledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketsscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmitted sets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyNonconformingpacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketstransmitted", (value)) +} + +// GetNonconformingpacketstransmitted gets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyNonconformingpacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmittedPersec sets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyNonconformingpacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketstransmittedPersec", (value)) +} + +// GetNonconformingpacketstransmittedPersec gets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyNonconformingpacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdropped sets the value of Packetsdropped for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyPacketsdropped(value uint32) (err error) { + return instance.SetProperty("Packetsdropped", (value)) +} + +// GetPacketsdropped gets the value of Packetsdropped for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyPacketsdropped() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdroppedPersec sets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyPacketsdroppedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsdroppedPersec", (value)) +} + +// GetPacketsdroppedPersec gets the value of PacketsdroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyPacketsdroppedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsdroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsscheduled sets the value of Packetsscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyPacketsscheduled(value uint32) (err error) { + return instance.SetProperty("Packetsscheduled", (value)) +} + +// GetPacketsscheduled gets the value of Packetsscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyPacketsscheduled() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetsscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsscheduledPersec sets the value of PacketsscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyPacketsscheduledPersec(value uint32) (err error) { + return instance.SetProperty("PacketsscheduledPersec", (value)) +} + +// GetPacketsscheduledPersec gets the value of PacketsscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyPacketsscheduledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmitted sets the value of Packetstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyPacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Packetstransmitted", (value)) +} + +// GetPacketstransmitted gets the value of Packetstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyPacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Packetstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketstransmittedPersec sets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) SetPropertyPacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("PacketstransmittedPersec", (value)) +} + +// GetPacketstransmittedPersec gets the value of PacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerFlow) GetPropertyPacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerPipe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerPipe.go new file mode 100644 index 00000000..ef897c6a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacerPipe.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacerPipe struct +type Win32_PerfRawData_Counters_PacerPipe struct { + *Win32_PerfRawData + + // + Averagepacketsinnetcard uint32 + + // + Averagepacketsinsequencer uint32 + + // + Averagepacketsinshaper uint32 + + // + Flowmodsrejected uint32 + + // + Flowsclosed uint32 + + // + Flowsmodified uint32 + + // + Flowsopened uint32 + + // + Flowsrejected uint32 + + // + Maxpacketsinnetcard uint32 + + // + Maxpacketsinsequencer uint32 + + // + Maxpacketsinshaper uint32 + + // + Maxsimultaneousflows uint32 + + // + Nonconformingpacketsscheduled uint32 + + // + NonconformingpacketsscheduledPersec uint32 + + // + Nonconformingpacketstransmitted uint32 + + // + NonconformingpacketstransmittedPersec uint32 + + // + Outofpackets uint32 +} + +func NewWin32_PerfRawData_Counters_PacerPipeEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacerPipe, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacerPipe{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacerPipeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacerPipe, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacerPipe{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAveragepacketsinnetcard sets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyAveragepacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinnetcard", (value)) +} + +// GetAveragepacketsinnetcard gets the value of Averagepacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyAveragepacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinsequencer sets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyAveragepacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinsequencer", (value)) +} + +// GetAveragepacketsinsequencer gets the value of Averagepacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyAveragepacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragepacketsinshaper sets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyAveragepacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Averagepacketsinshaper", (value)) +} + +// GetAveragepacketsinshaper gets the value of Averagepacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyAveragepacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagepacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowmodsrejected sets the value of Flowmodsrejected for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyFlowmodsrejected(value uint32) (err error) { + return instance.SetProperty("Flowmodsrejected", (value)) +} + +// GetFlowmodsrejected gets the value of Flowmodsrejected for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyFlowmodsrejected() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowmodsrejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsclosed sets the value of Flowsclosed for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyFlowsclosed(value uint32) (err error) { + return instance.SetProperty("Flowsclosed", (value)) +} + +// GetFlowsclosed gets the value of Flowsclosed for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyFlowsclosed() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsclosed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsmodified sets the value of Flowsmodified for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyFlowsmodified(value uint32) (err error) { + return instance.SetProperty("Flowsmodified", (value)) +} + +// GetFlowsmodified gets the value of Flowsmodified for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyFlowsmodified() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsmodified") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsopened sets the value of Flowsopened for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyFlowsopened(value uint32) (err error) { + return instance.SetProperty("Flowsopened", (value)) +} + +// GetFlowsopened gets the value of Flowsopened for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyFlowsopened() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsopened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlowsrejected sets the value of Flowsrejected for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyFlowsrejected(value uint32) (err error) { + return instance.SetProperty("Flowsrejected", (value)) +} + +// GetFlowsrejected gets the value of Flowsrejected for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyFlowsrejected() (value uint32, err error) { + retValue, err := instance.GetProperty("Flowsrejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinnetcard sets the value of Maxpacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyMaxpacketsinnetcard(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinnetcard", (value)) +} + +// GetMaxpacketsinnetcard gets the value of Maxpacketsinnetcard for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyMaxpacketsinnetcard() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinnetcard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinsequencer sets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyMaxpacketsinsequencer(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinsequencer", (value)) +} + +// GetMaxpacketsinsequencer gets the value of Maxpacketsinsequencer for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyMaxpacketsinsequencer() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinsequencer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxpacketsinshaper sets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyMaxpacketsinshaper(value uint32) (err error) { + return instance.SetProperty("Maxpacketsinshaper", (value)) +} + +// GetMaxpacketsinshaper gets the value of Maxpacketsinshaper for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyMaxpacketsinshaper() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxpacketsinshaper") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxsimultaneousflows sets the value of Maxsimultaneousflows for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyMaxsimultaneousflows(value uint32) (err error) { + return instance.SetProperty("Maxsimultaneousflows", (value)) +} + +// GetMaxsimultaneousflows gets the value of Maxsimultaneousflows for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyMaxsimultaneousflows() (value uint32, err error) { + retValue, err := instance.GetProperty("Maxsimultaneousflows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduled sets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyNonconformingpacketsscheduled(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketsscheduled", (value)) +} + +// GetNonconformingpacketsscheduled gets the value of Nonconformingpacketsscheduled for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyNonconformingpacketsscheduled() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketsscheduled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketsscheduledPersec sets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyNonconformingpacketsscheduledPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketsscheduledPersec", (value)) +} + +// GetNonconformingpacketsscheduledPersec gets the value of NonconformingpacketsscheduledPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyNonconformingpacketsscheduledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketsscheduledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmitted sets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyNonconformingpacketstransmitted(value uint32) (err error) { + return instance.SetProperty("Nonconformingpacketstransmitted", (value)) +} + +// GetNonconformingpacketstransmitted gets the value of Nonconformingpacketstransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyNonconformingpacketstransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("Nonconformingpacketstransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonconformingpacketstransmittedPersec sets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyNonconformingpacketstransmittedPersec(value uint32) (err error) { + return instance.SetProperty("NonconformingpacketstransmittedPersec", (value)) +} + +// GetNonconformingpacketstransmittedPersec gets the value of NonconformingpacketstransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyNonconformingpacketstransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NonconformingpacketstransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutofpackets sets the value of Outofpackets for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) SetPropertyOutofpackets(value uint32) (err error) { + return instance.SetProperty("Outofpackets", (value)) +} + +// GetOutofpackets gets the value of Outofpackets for the instance +func (instance *Win32_PerfRawData_Counters_PacerPipe) GetPropertyOutofpackets() (value uint32, err error) { + retValue, err := instance.GetProperty("Outofpackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectECUtilization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectECUtilization.go new file mode 100644 index 00000000..d169b16a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectECUtilization.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacketDirectECUtilization struct +type Win32_PerfRawData_Counters_PacketDirectECUtilization struct { + *Win32_PerfRawData + + // + BusyWaitIterationsPersec uint32 + + // + IterationsPersec uint32 + + // + PercentBusyWaitingTime uint64 + + // + PercentBusyWaitingTime_Base uint64 + + // + PercentBusyWaitIterations uint32 + + // + PercentBusyWaitIterations_Base uint32 + + // + PercentIdleTime uint64 + + // + PercentIdleTime_Base uint64 + + // + PercentProcessingTime uint64 + + // + PercentProcessingTime_Base uint64 + + // + ProcessorNumber uint32 + + // + RXQueueCount uint32 + + // + TotalBusyWaitIterations uint64 + + // + TotalIterations uint64 + + // + TXQueueCount uint32 +} + +func NewWin32_PerfRawData_Counters_PacketDirectECUtilizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacketDirectECUtilization, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectECUtilization{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacketDirectECUtilizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacketDirectECUtilization, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectECUtilization{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBusyWaitIterationsPersec sets the value of BusyWaitIterationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyBusyWaitIterationsPersec(value uint32) (err error) { + return instance.SetProperty("BusyWaitIterationsPersec", (value)) +} + +// GetBusyWaitIterationsPersec gets the value of BusyWaitIterationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyBusyWaitIterationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("BusyWaitIterationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIterationsPersec sets the value of IterationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyIterationsPersec(value uint32) (err error) { + return instance.SetProperty("IterationsPersec", (value)) +} + +// GetIterationsPersec gets the value of IterationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyIterationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IterationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentBusyWaitingTime sets the value of PercentBusyWaitingTime for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentBusyWaitingTime(value uint64) (err error) { + return instance.SetProperty("PercentBusyWaitingTime", (value)) +} + +// GetPercentBusyWaitingTime gets the value of PercentBusyWaitingTime for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentBusyWaitingTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentBusyWaitingTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentBusyWaitingTime_Base sets the value of PercentBusyWaitingTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentBusyWaitingTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentBusyWaitingTime_Base", (value)) +} + +// GetPercentBusyWaitingTime_Base gets the value of PercentBusyWaitingTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentBusyWaitingTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentBusyWaitingTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentBusyWaitIterations sets the value of PercentBusyWaitIterations for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentBusyWaitIterations(value uint32) (err error) { + return instance.SetProperty("PercentBusyWaitIterations", (value)) +} + +// GetPercentBusyWaitIterations gets the value of PercentBusyWaitIterations for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentBusyWaitIterations() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentBusyWaitIterations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentBusyWaitIterations_Base sets the value of PercentBusyWaitIterations_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentBusyWaitIterations_Base(value uint32) (err error) { + return instance.SetProperty("PercentBusyWaitIterations_Base", (value)) +} + +// GetPercentBusyWaitIterations_Base gets the value of PercentBusyWaitIterations_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentBusyWaitIterations_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentBusyWaitIterations_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime_Base sets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentIdleTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime_Base", (value)) +} + +// GetPercentIdleTime_Base gets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentIdleTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessingTime sets the value of PercentProcessingTime for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentProcessingTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessingTime", (value)) +} + +// GetPercentProcessingTime gets the value of PercentProcessingTime for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentProcessingTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessingTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessingTime_Base sets the value of PercentProcessingTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyPercentProcessingTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentProcessingTime_Base", (value)) +} + +// GetPercentProcessingTime_Base gets the value of PercentProcessingTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyPercentProcessingTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessingTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessorNumber sets the value of ProcessorNumber for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyProcessorNumber(value uint32) (err error) { + return instance.SetProperty("ProcessorNumber", (value)) +} + +// GetProcessorNumber gets the value of ProcessorNumber for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyProcessorNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRXQueueCount sets the value of RXQueueCount for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyRXQueueCount(value uint32) (err error) { + return instance.SetProperty("RXQueueCount", (value)) +} + +// GetRXQueueCount gets the value of RXQueueCount for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyRXQueueCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RXQueueCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalBusyWaitIterations sets the value of TotalBusyWaitIterations for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyTotalBusyWaitIterations(value uint64) (err error) { + return instance.SetProperty("TotalBusyWaitIterations", (value)) +} + +// GetTotalBusyWaitIterations gets the value of TotalBusyWaitIterations for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyTotalBusyWaitIterations() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBusyWaitIterations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalIterations sets the value of TotalIterations for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyTotalIterations(value uint64) (err error) { + return instance.SetProperty("TotalIterations", (value)) +} + +// GetTotalIterations gets the value of TotalIterations for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyTotalIterations() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalIterations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXQueueCount sets the value of TXQueueCount for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) SetPropertyTXQueueCount(value uint32) (err error) { + return instance.SetProperty("TXQueueCount", (value)) +} + +// GetTXQueueCount gets the value of TXQueueCount for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectECUtilization) GetPropertyTXQueueCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TXQueueCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectQueueDepth.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectQueueDepth.go new file mode 100644 index 00000000..2f79ce71 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectQueueDepth.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacketDirectQueueDepth struct +type Win32_PerfRawData_Counters_PacketDirectQueueDepth struct { + *Win32_PerfRawData + + // + AverageQueueDepth uint32 + + // + PercentAverageQueueUtilization uint32 +} + +func NewWin32_PerfRawData_Counters_PacketDirectQueueDepthEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacketDirectQueueDepth, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectQueueDepth{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacketDirectQueueDepthEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacketDirectQueueDepth, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectQueueDepth{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageQueueDepth sets the value of AverageQueueDepth for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectQueueDepth) SetPropertyAverageQueueDepth(value uint32) (err error) { + return instance.SetProperty("AverageQueueDepth", (value)) +} + +// GetAverageQueueDepth gets the value of AverageQueueDepth for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectQueueDepth) GetPropertyAverageQueueDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageQueueDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentAverageQueueUtilization sets the value of PercentAverageQueueUtilization for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectQueueDepth) SetPropertyPercentAverageQueueUtilization(value uint32) (err error) { + return instance.SetProperty("PercentAverageQueueUtilization", (value)) +} + +// GetPercentAverageQueueUtilization gets the value of PercentAverageQueueUtilization for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectQueueDepth) GetPropertyPercentAverageQueueUtilization() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentAverageQueueUtilization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveCounters.go new file mode 100644 index 00000000..9a5626c9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveCounters.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacketDirectReceiveCounters struct +type Win32_PerfRawData_Counters_PacketDirectReceiveCounters struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesReceivedPersec uint64 + + // + PacketsDropped uint64 + + // + PacketsDroppedPersec uint64 + + // + PacketsReceived uint64 + + // + PacketsReceivedPersec uint64 +} + +func NewWin32_PerfRawData_Counters_PacketDirectReceiveCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectReceiveCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacketDirectReceiveCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectReceiveCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsDropped sets the value of PacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsDropped(value uint64) (err error) { + return instance.SetProperty("PacketsDropped", (value)) +} + +// GetPacketsDropped gets the value of PacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsDroppedPersec sets the value of PacketsDroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsDroppedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsDroppedPersec", (value)) +} + +// GetPacketsDroppedPersec gets the value of PacketsDroppedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsDroppedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsDroppedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveCounters) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveFilters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveFilters.go new file mode 100644 index 00000000..9e00129d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectReceiveFilters.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacketDirectReceiveFilters struct +type Win32_PerfRawData_Counters_PacketDirectReceiveFilters struct { + *Win32_PerfRawData + + // + BytesMatched uint64 + + // + BytesMatchedPersec uint64 + + // + PacketsMatched uint64 + + // + PacketsMatchedPersec uint64 +} + +func NewWin32_PerfRawData_Counters_PacketDirectReceiveFiltersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectReceiveFilters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacketDirectReceiveFiltersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectReceiveFilters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesMatched sets the value of BytesMatched for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) SetPropertyBytesMatched(value uint64) (err error) { + return instance.SetProperty("BytesMatched", (value)) +} + +// GetBytesMatched gets the value of BytesMatched for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) GetPropertyBytesMatched() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesMatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesMatchedPersec sets the value of BytesMatchedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) SetPropertyBytesMatchedPersec(value uint64) (err error) { + return instance.SetProperty("BytesMatchedPersec", (value)) +} + +// GetBytesMatchedPersec gets the value of BytesMatchedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) GetPropertyBytesMatchedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesMatchedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsMatched sets the value of PacketsMatched for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) SetPropertyPacketsMatched(value uint64) (err error) { + return instance.SetProperty("PacketsMatched", (value)) +} + +// GetPacketsMatched gets the value of PacketsMatched for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) GetPropertyPacketsMatched() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsMatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsMatchedPersec sets the value of PacketsMatchedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) SetPropertyPacketsMatchedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsMatchedPersec", (value)) +} + +// GetPacketsMatchedPersec gets the value of PacketsMatchedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectReceiveFilters) GetPropertyPacketsMatchedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsMatchedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectTransmitCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectTransmitCounters.go new file mode 100644 index 00000000..b768bf9b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PacketDirectTransmitCounters.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PacketDirectTransmitCounters struct +type Win32_PerfRawData_Counters_PacketDirectTransmitCounters struct { + *Win32_PerfRawData + + // + BytesTransmitted uint64 + + // + BytesTransmittedPersec uint64 + + // + PacketsTransmitted uint64 + + // + PacketsTransmittedPersec uint64 +} + +func NewWin32_PerfRawData_Counters_PacketDirectTransmitCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectTransmitCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PacketDirectTransmitCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PacketDirectTransmitCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTransmitted sets the value of PacketsTransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) SetPropertyPacketsTransmitted(value uint64) (err error) { + return instance.SetProperty("PacketsTransmitted", (value)) +} + +// GetPacketsTransmitted gets the value of PacketsTransmitted for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) GetPropertyPacketsTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTransmittedPersec sets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) SetPropertyPacketsTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsTransmittedPersec", (value)) +} + +// GetPacketsTransmittedPersec gets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PacketDirectTransmitCounters) GetPropertyPacketsTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles.go new file mode 100644 index 00000000..f2c5c695 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles struct +type Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles struct { + *Win32_PerfRawData + + // + BuildScatterGatherCyclesPersec uint64 + + // + InterruptCyclesPersec uint64 + + // + InterruptDPCCyclesPersec uint64 + + // + InterruptDPCLatencyCyclesPersec uint64 + + // + MiniportReturnPacketCyclesPersec uint64 + + // + MiniportRSSIndirectionTableChangeCycles uint64 + + // + MiniportSendCyclesPersec uint64 + + // + NDISReceiveIndicationCyclesPersec uint64 + + // + NDISReturnPacketCyclesPersec uint64 + + // + NDISSendCompleteCyclesPersec uint64 + + // + NDISSendCyclesPersec uint64 + + // + StackReceiveIndicationCyclesPersec uint64 + + // + StackSendCompleteCyclesPersec uint64 +} + +func NewWin32_PerfRawData_Counters_PerProcessorNetworkActivityCyclesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PerProcessorNetworkActivityCyclesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBuildScatterGatherCyclesPersec sets the value of BuildScatterGatherCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyBuildScatterGatherCyclesPersec(value uint64) (err error) { + return instance.SetProperty("BuildScatterGatherCyclesPersec", (value)) +} + +// GetBuildScatterGatherCyclesPersec gets the value of BuildScatterGatherCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyBuildScatterGatherCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BuildScatterGatherCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptCyclesPersec sets the value of InterruptCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyInterruptCyclesPersec(value uint64) (err error) { + return instance.SetProperty("InterruptCyclesPersec", (value)) +} + +// GetInterruptCyclesPersec gets the value of InterruptCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyInterruptCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptDPCCyclesPersec sets the value of InterruptDPCCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyInterruptDPCCyclesPersec(value uint64) (err error) { + return instance.SetProperty("InterruptDPCCyclesPersec", (value)) +} + +// GetInterruptDPCCyclesPersec gets the value of InterruptDPCCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyInterruptDPCCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptDPCCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptDPCLatencyCyclesPersec sets the value of InterruptDPCLatencyCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyInterruptDPCLatencyCyclesPersec(value uint64) (err error) { + return instance.SetProperty("InterruptDPCLatencyCyclesPersec", (value)) +} + +// GetInterruptDPCLatencyCyclesPersec gets the value of InterruptDPCLatencyCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyInterruptDPCLatencyCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptDPCLatencyCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMiniportReturnPacketCyclesPersec sets the value of MiniportReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyMiniportReturnPacketCyclesPersec(value uint64) (err error) { + return instance.SetProperty("MiniportReturnPacketCyclesPersec", (value)) +} + +// GetMiniportReturnPacketCyclesPersec gets the value of MiniportReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyMiniportReturnPacketCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MiniportReturnPacketCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMiniportRSSIndirectionTableChangeCycles sets the value of MiniportRSSIndirectionTableChangeCycles for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyMiniportRSSIndirectionTableChangeCycles(value uint64) (err error) { + return instance.SetProperty("MiniportRSSIndirectionTableChangeCycles", (value)) +} + +// GetMiniportRSSIndirectionTableChangeCycles gets the value of MiniportRSSIndirectionTableChangeCycles for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyMiniportRSSIndirectionTableChangeCycles() (value uint64, err error) { + retValue, err := instance.GetProperty("MiniportRSSIndirectionTableChangeCycles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMiniportSendCyclesPersec sets the value of MiniportSendCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyMiniportSendCyclesPersec(value uint64) (err error) { + return instance.SetProperty("MiniportSendCyclesPersec", (value)) +} + +// GetMiniportSendCyclesPersec gets the value of MiniportSendCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyMiniportSendCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MiniportSendCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISReceiveIndicationCyclesPersec sets the value of NDISReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISReceiveIndicationCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISReceiveIndicationCyclesPersec", (value)) +} + +// GetNDISReceiveIndicationCyclesPersec gets the value of NDISReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISReceiveIndicationCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISReceiveIndicationCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISReturnPacketCyclesPersec sets the value of NDISReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISReturnPacketCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISReturnPacketCyclesPersec", (value)) +} + +// GetNDISReturnPacketCyclesPersec gets the value of NDISReturnPacketCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISReturnPacketCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISReturnPacketCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISSendCompleteCyclesPersec sets the value of NDISSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISSendCompleteCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISSendCompleteCyclesPersec", (value)) +} + +// GetNDISSendCompleteCyclesPersec gets the value of NDISSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISSendCompleteCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISSendCompleteCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNDISSendCyclesPersec sets the value of NDISSendCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyNDISSendCyclesPersec(value uint64) (err error) { + return instance.SetProperty("NDISSendCyclesPersec", (value)) +} + +// GetNDISSendCyclesPersec gets the value of NDISSendCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyNDISSendCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NDISSendCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackReceiveIndicationCyclesPersec sets the value of StackReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyStackReceiveIndicationCyclesPersec(value uint64) (err error) { + return instance.SetProperty("StackReceiveIndicationCyclesPersec", (value)) +} + +// GetStackReceiveIndicationCyclesPersec gets the value of StackReceiveIndicationCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyStackReceiveIndicationCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("StackReceiveIndicationCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackSendCompleteCyclesPersec sets the value of StackSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) SetPropertyStackSendCompleteCyclesPersec(value uint64) (err error) { + return instance.SetProperty("StackSendCompleteCyclesPersec", (value)) +} + +// GetStackSendCompleteCyclesPersec gets the value of StackSendCompleteCyclesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkActivityCycles) GetPropertyStackSendCompleteCyclesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("StackSendCompleteCyclesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity.go new file mode 100644 index 00000000..a37e1ba3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity struct +type Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity struct { + *Win32_PerfRawData + + // + BuildScatterGatherListCallsPersec uint64 + + // + DPCsDeferredPersec uint64 + + // + DPCsQueuedonOtherCPUsPersec uint64 + + // + DPCsQueuedPersec uint64 + + // + InterruptsPersec uint64 + + // + LowResourceReceivedPacketsPersec uint64 + + // + LowResourceReceiveIndicationsPersec uint64 + + // + PacketsCoalescedPersec uint64 + + // + ReceivedPacketsPersec uint64 + + // + ReceiveIndicationsPersec uint64 + + // + ReturnedPacketsPersec uint64 + + // + ReturnPacketCallsPersec uint64 + + // + RSSIndirectionTableChangeCallsPersec uint64 + + // + SendCompleteCallsPersec uint64 + + // + SendRequestCallsPersec uint64 + + // + SentCompletePacketsPersec uint64 + + // + SentPacketsPersec uint64 + + // + TcpOffloadReceivebytesPersec uint64 + + // + TcpOffloadReceiveIndicationsPersec uint64 + + // + TcpOffloadSendbytesPersec uint64 + + // + TcpOffloadSendRequestCallsPersec uint64 +} + +func NewWin32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBuildScatterGatherListCallsPersec sets the value of BuildScatterGatherListCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyBuildScatterGatherListCallsPersec(value uint64) (err error) { + return instance.SetProperty("BuildScatterGatherListCallsPersec", (value)) +} + +// GetBuildScatterGatherListCallsPersec gets the value of BuildScatterGatherListCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyBuildScatterGatherListCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BuildScatterGatherListCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCsDeferredPersec sets the value of DPCsDeferredPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyDPCsDeferredPersec(value uint64) (err error) { + return instance.SetProperty("DPCsDeferredPersec", (value)) +} + +// GetDPCsDeferredPersec gets the value of DPCsDeferredPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyDPCsDeferredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DPCsDeferredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCsQueuedonOtherCPUsPersec sets the value of DPCsQueuedonOtherCPUsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyDPCsQueuedonOtherCPUsPersec(value uint64) (err error) { + return instance.SetProperty("DPCsQueuedonOtherCPUsPersec", (value)) +} + +// GetDPCsQueuedonOtherCPUsPersec gets the value of DPCsQueuedonOtherCPUsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyDPCsQueuedonOtherCPUsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DPCsQueuedonOtherCPUsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCsQueuedPersec sets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyDPCsQueuedPersec(value uint64) (err error) { + return instance.SetProperty("DPCsQueuedPersec", (value)) +} + +// GetDPCsQueuedPersec gets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyDPCsQueuedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DPCsQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLowResourceReceivedPacketsPersec sets the value of LowResourceReceivedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyLowResourceReceivedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("LowResourceReceivedPacketsPersec", (value)) +} + +// GetLowResourceReceivedPacketsPersec gets the value of LowResourceReceivedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyLowResourceReceivedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LowResourceReceivedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLowResourceReceiveIndicationsPersec sets the value of LowResourceReceiveIndicationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyLowResourceReceiveIndicationsPersec(value uint64) (err error) { + return instance.SetProperty("LowResourceReceiveIndicationsPersec", (value)) +} + +// GetLowResourceReceiveIndicationsPersec gets the value of LowResourceReceiveIndicationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyLowResourceReceiveIndicationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LowResourceReceiveIndicationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsCoalescedPersec sets the value of PacketsCoalescedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyPacketsCoalescedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsCoalescedPersec", (value)) +} + +// GetPacketsCoalescedPersec gets the value of PacketsCoalescedPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyPacketsCoalescedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsCoalescedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceivedPacketsPersec sets the value of ReceivedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReceivedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedPacketsPersec", (value)) +} + +// GetReceivedPacketsPersec gets the value of ReceivedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReceivedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveIndicationsPersec sets the value of ReceiveIndicationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReceiveIndicationsPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveIndicationsPersec", (value)) +} + +// GetReceiveIndicationsPersec gets the value of ReceiveIndicationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReceiveIndicationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveIndicationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReturnedPacketsPersec sets the value of ReturnedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReturnedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("ReturnedPacketsPersec", (value)) +} + +// GetReturnedPacketsPersec gets the value of ReturnedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReturnedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReturnedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReturnPacketCallsPersec sets the value of ReturnPacketCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyReturnPacketCallsPersec(value uint64) (err error) { + return instance.SetProperty("ReturnPacketCallsPersec", (value)) +} + +// GetReturnPacketCallsPersec gets the value of ReturnPacketCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyReturnPacketCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReturnPacketCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSSIndirectionTableChangeCallsPersec sets the value of RSSIndirectionTableChangeCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyRSSIndirectionTableChangeCallsPersec(value uint64) (err error) { + return instance.SetProperty("RSSIndirectionTableChangeCallsPersec", (value)) +} + +// GetRSSIndirectionTableChangeCallsPersec gets the value of RSSIndirectionTableChangeCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyRSSIndirectionTableChangeCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RSSIndirectionTableChangeCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendCompleteCallsPersec sets the value of SendCompleteCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySendCompleteCallsPersec(value uint64) (err error) { + return instance.SetProperty("SendCompleteCallsPersec", (value)) +} + +// GetSendCompleteCallsPersec gets the value of SendCompleteCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySendCompleteCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SendCompleteCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendRequestCallsPersec sets the value of SendRequestCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySendRequestCallsPersec(value uint64) (err error) { + return instance.SetProperty("SendRequestCallsPersec", (value)) +} + +// GetSendRequestCallsPersec gets the value of SendRequestCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySendRequestCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SendRequestCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentCompletePacketsPersec sets the value of SentCompletePacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySentCompletePacketsPersec(value uint64) (err error) { + return instance.SetProperty("SentCompletePacketsPersec", (value)) +} + +// GetSentCompletePacketsPersec gets the value of SentCompletePacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySentCompletePacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentCompletePacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentPacketsPersec sets the value of SentPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertySentPacketsPersec(value uint64) (err error) { + return instance.SetProperty("SentPacketsPersec", (value)) +} + +// GetSentPacketsPersec gets the value of SentPacketsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertySentPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadReceivebytesPersec sets the value of TcpOffloadReceivebytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadReceivebytesPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadReceivebytesPersec", (value)) +} + +// GetTcpOffloadReceivebytesPersec gets the value of TcpOffloadReceivebytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadReceivebytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadReceivebytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadReceiveIndicationsPersec sets the value of TcpOffloadReceiveIndicationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadReceiveIndicationsPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadReceiveIndicationsPersec", (value)) +} + +// GetTcpOffloadReceiveIndicationsPersec gets the value of TcpOffloadReceiveIndicationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadReceiveIndicationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadReceiveIndicationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadSendbytesPersec sets the value of TcpOffloadSendbytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadSendbytesPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadSendbytesPersec", (value)) +} + +// GetTcpOffloadSendbytesPersec gets the value of TcpOffloadSendbytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadSendbytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadSendbytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTcpOffloadSendRequestCallsPersec sets the value of TcpOffloadSendRequestCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) SetPropertyTcpOffloadSendRequestCallsPersec(value uint64) (err error) { + return instance.SetProperty("TcpOffloadSendRequestCallsPersec", (value)) +} + +// GetTcpOffloadSendRequestCallsPersec gets the value of TcpOffloadSendRequestCallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PerProcessorNetworkInterfaceCardActivity) GetPropertyTcpOffloadSendRequestCallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TcpOffloadSendRequestCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity.go new file mode 100644 index 00000000..a29b51ac --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity struct +type Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity struct { + *Win32_PerfRawData + + // + DevicePowerState uint32 + + // + LowPowerTransitionsLifetime uint32 + + // + PercentTimeSuspendedInstantaneous uint64 + + // + PercentTimeSuspendedLifetime uint64 + + // + PercentTimeSuspendedLifetime_Base uint64 +} + +func NewWin32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDevicePowerState sets the value of DevicePowerState for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyDevicePowerState(value uint32) (err error) { + return instance.SetProperty("DevicePowerState", (value)) +} + +// GetDevicePowerState gets the value of DevicePowerState for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyDevicePowerState() (value uint32, err error) { + retValue, err := instance.GetProperty("DevicePowerState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowPowerTransitionsLifetime sets the value of LowPowerTransitionsLifetime for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyLowPowerTransitionsLifetime(value uint32) (err error) { + return instance.SetProperty("LowPowerTransitionsLifetime", (value)) +} + +// GetLowPowerTransitionsLifetime gets the value of LowPowerTransitionsLifetime for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyLowPowerTransitionsLifetime() (value uint32, err error) { + retValue, err := instance.GetProperty("LowPowerTransitionsLifetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeSuspendedInstantaneous sets the value of PercentTimeSuspendedInstantaneous for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyPercentTimeSuspendedInstantaneous(value uint64) (err error) { + return instance.SetProperty("PercentTimeSuspendedInstantaneous", (value)) +} + +// GetPercentTimeSuspendedInstantaneous gets the value of PercentTimeSuspendedInstantaneous for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyPercentTimeSuspendedInstantaneous() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSuspendedInstantaneous") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTimeSuspendedLifetime sets the value of PercentTimeSuspendedLifetime for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyPercentTimeSuspendedLifetime(value uint64) (err error) { + return instance.SetProperty("PercentTimeSuspendedLifetime", (value)) +} + +// GetPercentTimeSuspendedLifetime gets the value of PercentTimeSuspendedLifetime for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyPercentTimeSuspendedLifetime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSuspendedLifetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTimeSuspendedLifetime_Base sets the value of PercentTimeSuspendedLifetime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) SetPropertyPercentTimeSuspendedLifetime_Base(value uint64) (err error) { + return instance.SetProperty("PercentTimeSuspendedLifetime_Base", (value)) +} + +// GetPercentTimeSuspendedLifetime_Base gets the value of PercentTimeSuspendedLifetime_Base for the instance +func (instance *Win32_PerfRawData_Counters_PhysicalNetworkInterfaceCardActivity) GetPropertyPercentTimeSuspendedLifetime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSuspendedLifetime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PowerShellWorkflow.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PowerShellWorkflow.go new file mode 100644 index 00000000..785d075a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_PowerShellWorkflow.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_PowerShellWorkflow struct +type Win32_PerfRawData_Counters_PowerShellWorkflow struct { + *Win32_PerfRawData + + // + ActivityHostManagerhostprocessespoolsize uint32 + + // + ActivityHostManagerNumberofbusyhostprocesses uint32 + + // + ActivityHostManagerNumberofcreatedhostprocesses uint32 + + // + ActivityHostManagerNumberofdisposedhostprocesses uint32 + + // + ActivityHostManagerNumberoffailedrequestsinqueue uint32 + + // + ActivityHostManagerNumberoffailedrequestsPersec uint32 + + // + ActivityHostManagerNumberofincomingrequestsPersec uint32 + + // + ActivityHostManagerNumberofpendingrequestsinqueue uint32 + + // + Numberoffailedworkflowjobs uint32 + + // + NumberoffailedworkflowjobsPersec uint32 + + // + Numberofresumedworkflowjobs uint32 + + // + NumberofresumedworkflowjobsPersec uint32 + + // + Numberofrunningworkflowjobs uint32 + + // + NumberofrunningworkflowjobsPersec uint32 + + // + Numberofstoppedworkflowjobs uint32 + + // + NumberofstoppedworkflowjobsPersec uint32 + + // + Numberofsucceededworkflowjobs uint32 + + // + NumberofsucceededworkflowjobsPersec uint32 + + // + Numberofsuspendedworkflowjobs uint32 + + // + NumberofsuspendedworkflowjobsPersec uint32 + + // + Numberofterminatedworkflowjobs uint32 + + // + NumberofterminatedworkflowjobsPersec uint32 + + // + Numberofwaitingworkflowjobs uint32 + + // + PowerShellRemotingNumberofconnectionsclosedreopened uint32 + + // + PowerShellRemotingNumberofcreatedconnections uint32 + + // + PowerShellRemotingNumberofdisposedconnections uint32 + + // + PowerShellRemotingNumberofforcedtowaitrequestsinqueue uint32 + + // + PowerShellRemotingNumberofpendingrequestsinqueue uint32 + + // + PowerShellRemotingNumberofrequestsbeingserviced uint32 +} + +func NewWin32_PerfRawData_Counters_PowerShellWorkflowEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_PowerShellWorkflow, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PowerShellWorkflow{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_PowerShellWorkflowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_PowerShellWorkflow, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_PowerShellWorkflow{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActivityHostManagerhostprocessespoolsize sets the value of ActivityHostManagerhostprocessespoolsize for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerhostprocessespoolsize(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerhostprocessespoolsize", (value)) +} + +// GetActivityHostManagerhostprocessespoolsize gets the value of ActivityHostManagerhostprocessespoolsize for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerhostprocessespoolsize() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerhostprocessespoolsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofbusyhostprocesses sets the value of ActivityHostManagerNumberofbusyhostprocesses for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofbusyhostprocesses(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofbusyhostprocesses", (value)) +} + +// GetActivityHostManagerNumberofbusyhostprocesses gets the value of ActivityHostManagerNumberofbusyhostprocesses for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofbusyhostprocesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofbusyhostprocesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofcreatedhostprocesses sets the value of ActivityHostManagerNumberofcreatedhostprocesses for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofcreatedhostprocesses(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofcreatedhostprocesses", (value)) +} + +// GetActivityHostManagerNumberofcreatedhostprocesses gets the value of ActivityHostManagerNumberofcreatedhostprocesses for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofcreatedhostprocesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofcreatedhostprocesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofdisposedhostprocesses sets the value of ActivityHostManagerNumberofdisposedhostprocesses for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofdisposedhostprocesses(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofdisposedhostprocesses", (value)) +} + +// GetActivityHostManagerNumberofdisposedhostprocesses gets the value of ActivityHostManagerNumberofdisposedhostprocesses for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofdisposedhostprocesses() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofdisposedhostprocesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberoffailedrequestsinqueue sets the value of ActivityHostManagerNumberoffailedrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberoffailedrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberoffailedrequestsinqueue", (value)) +} + +// GetActivityHostManagerNumberoffailedrequestsinqueue gets the value of ActivityHostManagerNumberoffailedrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberoffailedrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberoffailedrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberoffailedrequestsPersec sets the value of ActivityHostManagerNumberoffailedrequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberoffailedrequestsPersec(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberoffailedrequestsPersec", (value)) +} + +// GetActivityHostManagerNumberoffailedrequestsPersec gets the value of ActivityHostManagerNumberoffailedrequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberoffailedrequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberoffailedrequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofincomingrequestsPersec sets the value of ActivityHostManagerNumberofincomingrequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofincomingrequestsPersec(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofincomingrequestsPersec", (value)) +} + +// GetActivityHostManagerNumberofincomingrequestsPersec gets the value of ActivityHostManagerNumberofincomingrequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofincomingrequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofincomingrequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActivityHostManagerNumberofpendingrequestsinqueue sets the value of ActivityHostManagerNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyActivityHostManagerNumberofpendingrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("ActivityHostManagerNumberofpendingrequestsinqueue", (value)) +} + +// GetActivityHostManagerNumberofpendingrequestsinqueue gets the value of ActivityHostManagerNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyActivityHostManagerNumberofpendingrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("ActivityHostManagerNumberofpendingrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoffailedworkflowjobs sets the value of Numberoffailedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberoffailedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberoffailedworkflowjobs", (value)) +} + +// GetNumberoffailedworkflowjobs gets the value of Numberoffailedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberoffailedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberoffailedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoffailedworkflowjobsPersec sets the value of NumberoffailedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberoffailedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberoffailedworkflowjobsPersec", (value)) +} + +// GetNumberoffailedworkflowjobsPersec gets the value of NumberoffailedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberoffailedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberoffailedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofresumedworkflowjobs sets the value of Numberofresumedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofresumedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofresumedworkflowjobs", (value)) +} + +// GetNumberofresumedworkflowjobs gets the value of Numberofresumedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofresumedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofresumedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofresumedworkflowjobsPersec sets the value of NumberofresumedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofresumedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofresumedworkflowjobsPersec", (value)) +} + +// GetNumberofresumedworkflowjobsPersec gets the value of NumberofresumedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofresumedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofresumedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofrunningworkflowjobs sets the value of Numberofrunningworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofrunningworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofrunningworkflowjobs", (value)) +} + +// GetNumberofrunningworkflowjobs gets the value of Numberofrunningworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofrunningworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofrunningworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofrunningworkflowjobsPersec sets the value of NumberofrunningworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofrunningworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofrunningworkflowjobsPersec", (value)) +} + +// GetNumberofrunningworkflowjobsPersec gets the value of NumberofrunningworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofrunningworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofrunningworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofstoppedworkflowjobs sets the value of Numberofstoppedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofstoppedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofstoppedworkflowjobs", (value)) +} + +// GetNumberofstoppedworkflowjobs gets the value of Numberofstoppedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofstoppedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofstoppedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofstoppedworkflowjobsPersec sets the value of NumberofstoppedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofstoppedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofstoppedworkflowjobsPersec", (value)) +} + +// GetNumberofstoppedworkflowjobsPersec gets the value of NumberofstoppedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofstoppedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofstoppedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsucceededworkflowjobs sets the value of Numberofsucceededworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofsucceededworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofsucceededworkflowjobs", (value)) +} + +// GetNumberofsucceededworkflowjobs gets the value of Numberofsucceededworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofsucceededworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofsucceededworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsucceededworkflowjobsPersec sets the value of NumberofsucceededworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofsucceededworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofsucceededworkflowjobsPersec", (value)) +} + +// GetNumberofsucceededworkflowjobsPersec gets the value of NumberofsucceededworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofsucceededworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofsucceededworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsuspendedworkflowjobs sets the value of Numberofsuspendedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofsuspendedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofsuspendedworkflowjobs", (value)) +} + +// GetNumberofsuspendedworkflowjobs gets the value of Numberofsuspendedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofsuspendedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofsuspendedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofsuspendedworkflowjobsPersec sets the value of NumberofsuspendedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofsuspendedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofsuspendedworkflowjobsPersec", (value)) +} + +// GetNumberofsuspendedworkflowjobsPersec gets the value of NumberofsuspendedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofsuspendedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofsuspendedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofterminatedworkflowjobs sets the value of Numberofterminatedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofterminatedworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofterminatedworkflowjobs", (value)) +} + +// GetNumberofterminatedworkflowjobs gets the value of Numberofterminatedworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofterminatedworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofterminatedworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofterminatedworkflowjobsPersec sets the value of NumberofterminatedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofterminatedworkflowjobsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofterminatedworkflowjobsPersec", (value)) +} + +// GetNumberofterminatedworkflowjobsPersec gets the value of NumberofterminatedworkflowjobsPersec for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofterminatedworkflowjobsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofterminatedworkflowjobsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofwaitingworkflowjobs sets the value of Numberofwaitingworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyNumberofwaitingworkflowjobs(value uint32) (err error) { + return instance.SetProperty("Numberofwaitingworkflowjobs", (value)) +} + +// GetNumberofwaitingworkflowjobs gets the value of Numberofwaitingworkflowjobs for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyNumberofwaitingworkflowjobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofwaitingworkflowjobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofconnectionsclosedreopened sets the value of PowerShellRemotingNumberofconnectionsclosedreopened for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofconnectionsclosedreopened(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofconnectionsclosedreopened", (value)) +} + +// GetPowerShellRemotingNumberofconnectionsclosedreopened gets the value of PowerShellRemotingNumberofconnectionsclosedreopened for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofconnectionsclosedreopened() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofconnectionsclosedreopened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofcreatedconnections sets the value of PowerShellRemotingNumberofcreatedconnections for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofcreatedconnections(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofcreatedconnections", (value)) +} + +// GetPowerShellRemotingNumberofcreatedconnections gets the value of PowerShellRemotingNumberofcreatedconnections for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofcreatedconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofcreatedconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofdisposedconnections sets the value of PowerShellRemotingNumberofdisposedconnections for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofdisposedconnections(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofdisposedconnections", (value)) +} + +// GetPowerShellRemotingNumberofdisposedconnections gets the value of PowerShellRemotingNumberofdisposedconnections for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofdisposedconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofdisposedconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofforcedtowaitrequestsinqueue sets the value of PowerShellRemotingNumberofforcedtowaitrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofforcedtowaitrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofforcedtowaitrequestsinqueue", (value)) +} + +// GetPowerShellRemotingNumberofforcedtowaitrequestsinqueue gets the value of PowerShellRemotingNumberofforcedtowaitrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofforcedtowaitrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofforcedtowaitrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofpendingrequestsinqueue sets the value of PowerShellRemotingNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofpendingrequestsinqueue(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofpendingrequestsinqueue", (value)) +} + +// GetPowerShellRemotingNumberofpendingrequestsinqueue gets the value of PowerShellRemotingNumberofpendingrequestsinqueue for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofpendingrequestsinqueue() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofpendingrequestsinqueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerShellRemotingNumberofrequestsbeingserviced sets the value of PowerShellRemotingNumberofrequestsbeingserviced for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) SetPropertyPowerShellRemotingNumberofrequestsbeingserviced(value uint32) (err error) { + return instance.SetProperty("PowerShellRemotingNumberofrequestsbeingserviced", (value)) +} + +// GetPowerShellRemotingNumberofrequestsbeingserviced gets the value of PowerShellRemotingNumberofrequestsbeingserviced for the instance +func (instance *Win32_PerfRawData_Counters_PowerShellWorkflow) GetPropertyPowerShellRemotingNumberofrequestsbeingserviced() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerShellRemotingNumberofrequestsbeingserviced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ProcessorInformation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ProcessorInformation.go new file mode 100644 index 00000000..da530e84 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ProcessorInformation.go @@ -0,0 +1,1010 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_ProcessorInformation struct +type Win32_PerfRawData_Counters_ProcessorInformation struct { + *Win32_PerfRawData + + // + AverageIdleTime uint64 + + // + AverageIdleTime_Base uint64 + + // + C1TransitionsPersec uint64 + + // + C2TransitionsPersec uint64 + + // + C3TransitionsPersec uint64 + + // + ClockInterruptsPersec uint32 + + // + DPCRate uint32 + + // + DPCsQueuedPersec uint32 + + // + IdleBreakEventsPersec uint64 + + // + InterruptsPersec uint32 + + // + ParkingStatus uint32 + + // + PercentC1Time uint64 + + // + PercentC2Time uint64 + + // + PercentC3Time uint64 + + // + PercentDPCTime uint64 + + // + PercentIdleTime uint64 + + // + PercentInterruptTime uint64 + + // + PercentofMaximumFrequency uint32 + + // + PercentPerformanceLimit uint32 + + // + PercentPriorityTime uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentPrivilegedUtility uint64 + + // + PercentPrivilegedUtility_Base uint32 + + // + PercentProcessorPerformance uint64 + + // + PercentProcessorPerformance_Base uint32 + + // + PercentProcessorTime uint64 + + // + PercentProcessorUtility uint64 + + // + PercentProcessorUtility_Base uint32 + + // + PercentUserTime uint64 + + // + PerformanceLimitFlags uint32 + + // + ProcessorFrequency uint32 + + // + ProcessorStateFlags uint32 +} + +func NewWin32_PerfRawData_Counters_ProcessorInformationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_ProcessorInformation, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_ProcessorInformation{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_ProcessorInformationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_ProcessorInformation, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_ProcessorInformation{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageIdleTime sets the value of AverageIdleTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyAverageIdleTime(value uint64) (err error) { + return instance.SetProperty("AverageIdleTime", (value)) +} + +// GetAverageIdleTime gets the value of AverageIdleTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyAverageIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageIdleTime_Base sets the value of AverageIdleTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyAverageIdleTime_Base(value uint64) (err error) { + return instance.SetProperty("AverageIdleTime_Base", (value)) +} + +// GetAverageIdleTime_Base gets the value of AverageIdleTime_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyAverageIdleTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageIdleTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC1TransitionsPersec sets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyC1TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C1TransitionsPersec", (value)) +} + +// GetC1TransitionsPersec gets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyC1TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C1TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC2TransitionsPersec sets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyC2TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C2TransitionsPersec", (value)) +} + +// GetC2TransitionsPersec gets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyC2TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C2TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC3TransitionsPersec sets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyC3TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C3TransitionsPersec", (value)) +} + +// GetC3TransitionsPersec gets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyC3TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C3TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClockInterruptsPersec sets the value of ClockInterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyClockInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("ClockInterruptsPersec", (value)) +} + +// GetClockInterruptsPersec gets the value of ClockInterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyClockInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ClockInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCRate sets the value of DPCRate for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyDPCRate(value uint32) (err error) { + return instance.SetProperty("DPCRate", (value)) +} + +// GetDPCRate gets the value of DPCRate for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyDPCRate() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCsQueuedPersec sets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyDPCsQueuedPersec(value uint32) (err error) { + return instance.SetProperty("DPCsQueuedPersec", (value)) +} + +// GetDPCsQueuedPersec gets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyDPCsQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCsQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIdleBreakEventsPersec sets the value of IdleBreakEventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyIdleBreakEventsPersec(value uint64) (err error) { + return instance.SetProperty("IdleBreakEventsPersec", (value)) +} + +// GetIdleBreakEventsPersec gets the value of IdleBreakEventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyIdleBreakEventsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IdleBreakEventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetParkingStatus sets the value of ParkingStatus for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyParkingStatus(value uint32) (err error) { + return instance.SetProperty("ParkingStatus", (value)) +} + +// GetParkingStatus gets the value of ParkingStatus for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyParkingStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("ParkingStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentC1Time sets the value of PercentC1Time for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentC1Time(value uint64) (err error) { + return instance.SetProperty("PercentC1Time", (value)) +} + +// GetPercentC1Time gets the value of PercentC1Time for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentC1Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time sets the value of PercentC2Time for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentC2Time(value uint64) (err error) { + return instance.SetProperty("PercentC2Time", (value)) +} + +// GetPercentC2Time gets the value of PercentC2Time for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentC2Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time sets the value of PercentC3Time for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentC3Time(value uint64) (err error) { + return instance.SetProperty("PercentC3Time", (value)) +} + +// GetPercentC3Time gets the value of PercentC3Time for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentC3Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDPCTime sets the value of PercentDPCTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentDPCTime(value uint64) (err error) { + return instance.SetProperty("PercentDPCTime", (value)) +} + +// GetPercentDPCTime gets the value of PercentDPCTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentDPCTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDPCTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentInterruptTime sets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentInterruptTime(value uint64) (err error) { + return instance.SetProperty("PercentInterruptTime", (value)) +} + +// GetPercentInterruptTime gets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentInterruptTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentInterruptTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentofMaximumFrequency sets the value of PercentofMaximumFrequency for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentofMaximumFrequency(value uint32) (err error) { + return instance.SetProperty("PercentofMaximumFrequency", (value)) +} + +// GetPercentofMaximumFrequency gets the value of PercentofMaximumFrequency for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentofMaximumFrequency() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentofMaximumFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPerformanceLimit sets the value of PercentPerformanceLimit for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentPerformanceLimit(value uint32) (err error) { + return instance.SetProperty("PercentPerformanceLimit", (value)) +} + +// GetPercentPerformanceLimit gets the value of PercentPerformanceLimit for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentPerformanceLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentPerformanceLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPriorityTime sets the value of PercentPriorityTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentPriorityTime(value uint64) (err error) { + return instance.SetProperty("PercentPriorityTime", (value)) +} + +// GetPercentPriorityTime gets the value of PercentPriorityTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentPriorityTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPriorityTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedUtility sets the value of PercentPrivilegedUtility for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentPrivilegedUtility(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedUtility", (value)) +} + +// GetPercentPrivilegedUtility gets the value of PercentPrivilegedUtility for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentPrivilegedUtility() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedUtility") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedUtility_Base sets the value of PercentPrivilegedUtility_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentPrivilegedUtility_Base(value uint32) (err error) { + return instance.SetProperty("PercentPrivilegedUtility_Base", (value)) +} + +// GetPercentPrivilegedUtility_Base gets the value of PercentPrivilegedUtility_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentPrivilegedUtility_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedUtility_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentProcessorPerformance sets the value of PercentProcessorPerformance for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentProcessorPerformance(value uint64) (err error) { + return instance.SetProperty("PercentProcessorPerformance", (value)) +} + +// GetPercentProcessorPerformance gets the value of PercentProcessorPerformance for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentProcessorPerformance() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorPerformance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorPerformance_Base sets the value of PercentProcessorPerformance_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentProcessorPerformance_Base(value uint32) (err error) { + return instance.SetProperty("PercentProcessorPerformance_Base", (value)) +} + +// GetPercentProcessorPerformance_Base gets the value of PercentProcessorPerformance_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentProcessorPerformance_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentProcessorPerformance_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorUtility sets the value of PercentProcessorUtility for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentProcessorUtility(value uint64) (err error) { + return instance.SetProperty("PercentProcessorUtility", (value)) +} + +// GetPercentProcessorUtility gets the value of PercentProcessorUtility for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentProcessorUtility() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorUtility") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorUtility_Base sets the value of PercentProcessorUtility_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentProcessorUtility_Base(value uint32) (err error) { + return instance.SetProperty("PercentProcessorUtility_Base", (value)) +} + +// GetPercentProcessorUtility_Base gets the value of PercentProcessorUtility_Base for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentProcessorUtility_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentProcessorUtility_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPerformanceLimitFlags sets the value of PerformanceLimitFlags for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyPerformanceLimitFlags(value uint32) (err error) { + return instance.SetProperty("PerformanceLimitFlags", (value)) +} + +// GetPerformanceLimitFlags gets the value of PerformanceLimitFlags for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyPerformanceLimitFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("PerformanceLimitFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessorFrequency sets the value of ProcessorFrequency for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyProcessorFrequency(value uint32) (err error) { + return instance.SetProperty("ProcessorFrequency", (value)) +} + +// GetProcessorFrequency gets the value of ProcessorFrequency for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyProcessorFrequency() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessorStateFlags sets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) SetPropertyProcessorStateFlags(value uint32) (err error) { + return instance.SetProperty("ProcessorStateFlags", (value)) +} + +// GetProcessorStateFlags gets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfRawData_Counters_ProcessorInformation) GetPropertyProcessorStateFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorStateFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RDMAActivity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RDMAActivity.go new file mode 100644 index 00000000..547749d0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RDMAActivity.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_RDMAActivity struct +type Win32_PerfRawData_Counters_RDMAActivity struct { + *Win32_PerfRawData + + // + RDMAAcceptedConnections uint32 + + // + RDMAActiveConnections uint32 + + // + RDMACompletionQueueErrors uint32 + + // + RDMAConnectionErrors uint32 + + // + RDMAFailedConnectionAttempts uint32 + + // + RDMAInboundBytesPersec uint64 + + // + RDMAInboundFramesPersec uint64 + + // + RDMAInitiatedConnections uint32 + + // + RDMAOutboundBytesPersec uint64 + + // + RDMAOutboundFramesPersec uint64 +} + +func NewWin32_PerfRawData_Counters_RDMAActivityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_RDMAActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_RDMAActivity{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_RDMAActivityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_RDMAActivity, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_RDMAActivity{ + Win32_PerfRawData: tmp, + } + return +} + +// SetRDMAAcceptedConnections sets the value of RDMAAcceptedConnections for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAAcceptedConnections(value uint32) (err error) { + return instance.SetProperty("RDMAAcceptedConnections", (value)) +} + +// GetRDMAAcceptedConnections gets the value of RDMAAcceptedConnections for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAAcceptedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAAcceptedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAActiveConnections sets the value of RDMAActiveConnections for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAActiveConnections(value uint32) (err error) { + return instance.SetProperty("RDMAActiveConnections", (value)) +} + +// GetRDMAActiveConnections gets the value of RDMAActiveConnections for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAActiveConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAActiveConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMACompletionQueueErrors sets the value of RDMACompletionQueueErrors for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMACompletionQueueErrors(value uint32) (err error) { + return instance.SetProperty("RDMACompletionQueueErrors", (value)) +} + +// GetRDMACompletionQueueErrors gets the value of RDMACompletionQueueErrors for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMACompletionQueueErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMACompletionQueueErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAConnectionErrors sets the value of RDMAConnectionErrors for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAConnectionErrors(value uint32) (err error) { + return instance.SetProperty("RDMAConnectionErrors", (value)) +} + +// GetRDMAConnectionErrors gets the value of RDMAConnectionErrors for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAConnectionErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAConnectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAFailedConnectionAttempts sets the value of RDMAFailedConnectionAttempts for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAFailedConnectionAttempts(value uint32) (err error) { + return instance.SetProperty("RDMAFailedConnectionAttempts", (value)) +} + +// GetRDMAFailedConnectionAttempts gets the value of RDMAFailedConnectionAttempts for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAFailedConnectionAttempts() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAFailedConnectionAttempts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAInboundBytesPersec sets the value of RDMAInboundBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAInboundBytesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAInboundBytesPersec", (value)) +} + +// GetRDMAInboundBytesPersec gets the value of RDMAInboundBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAInboundBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAInboundBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRDMAInboundFramesPersec sets the value of RDMAInboundFramesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAInboundFramesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAInboundFramesPersec", (value)) +} + +// GetRDMAInboundFramesPersec gets the value of RDMAInboundFramesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAInboundFramesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAInboundFramesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRDMAInitiatedConnections sets the value of RDMAInitiatedConnections for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAInitiatedConnections(value uint32) (err error) { + return instance.SetProperty("RDMAInitiatedConnections", (value)) +} + +// GetRDMAInitiatedConnections gets the value of RDMAInitiatedConnections for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAInitiatedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMAInitiatedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMAOutboundBytesPersec sets the value of RDMAOutboundBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAOutboundBytesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAOutboundBytesPersec", (value)) +} + +// GetRDMAOutboundBytesPersec gets the value of RDMAOutboundBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAOutboundBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAOutboundBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRDMAOutboundFramesPersec sets the value of RDMAOutboundFramesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) SetPropertyRDMAOutboundFramesPersec(value uint64) (err error) { + return instance.SetProperty("RDMAOutboundFramesPersec", (value)) +} + +// GetRDMAOutboundFramesPersec gets the value of RDMAOutboundFramesPersec for the instance +func (instance *Win32_PerfRawData_Counters_RDMAActivity) GetPropertyRDMAOutboundFramesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RDMAOutboundFramesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ReFS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ReFS.go new file mode 100644 index 00000000..2f192b23 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ReFS.go @@ -0,0 +1,1550 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_ReFS struct +type Win32_PerfRawData_Counters_ReFS struct { + *Win32_PerfRawData + + // + AllocationofDataClustersonFastTierPersec uint64 + + // + AllocationofDataClustersonSlowTierPersec uint64 + + // + AllocationofMetadataClustersonFastTierPersec uint64 + + // + AllocationofMetadataClustersonSlowTierPersec uint64 + + // + Checkpointlatency100ns uint64 + + // + Checkpointlatency100ns_Base uint32 + + // + CheckpointsPersec uint64 + + // + CompactedContainerFillRatioPercent uint64 + + // + CompactedContainerFillRatioPercent_Base uint32 + + // + CompactionFailureCount uint32 + + // + Compactionreadlatency100ns uint64 + + // + Compactionreadlatency100ns_Base uint32 + + // + Compactionsfailedduetoineligiblecontainer uint32 + + // + Compactionsfailedduetomaxfragmentation uint32 + + // + Compactionwritelatency100ns uint64 + + // + Compactionwritelatency100ns_Base uint32 + + // + ContainerDestagesFromFastTierPersec uint64 + + // + ContainerDestagesFromSlowTierPersec uint64 + + // + ContainerMoveFailureCount uint32 + + // + ContainerMoveRetryCount uint32 + + // + Containermovesfailedduetoineligiblecontainer uint32 + + // + CurrentFastTierDataFillPercentage uint32 + + // + CurrentFastTierMetadataFillPercentage uint32 + + // + CurrentSlowTierDataFillPercentage uint32 + + // + CurrentSlowTierMetadataFillPercentage uint32 + + // + DataCompactionsPersec uint64 + + // + DataInPlaceWriteClustersPersec uint64 + + // + DeleteQueueentries uint32 + + // + Dirtymetadatapages uint64 + + // + Dirtytablelistentries uint32 + + // + FastTierDestagedContainerFillRatioPercent uint64 + + // + FastTierDestagedContainerFillRatioPercent_Base uint32 + + // + Fasttierdestagereadlatency100ns uint64 + + // + Fasttierdestagereadlatency100ns_Base uint32 + + // + Fasttierdestagewritelatency100ns uint64 + + // + Fasttierdestagewritelatency100ns_Base uint32 + + // + Logfillpercentage uint32 + + // + LogwritesPersec uint64 + + // + SlowTierDestagedContainerFillRatioPercent uint64 + + // + SlowTierDestagedContainerFillRatioPercent_Base uint32 + + // + Slowtierdestagereadlatency100ns uint64 + + // + Slowtierdestagereadlatency100ns_Base uint32 + + // + Slowtierdestagewritelatency100ns uint64 + + // + Slowtierdestagewritelatency100ns_Base uint32 + + // + TotalAllocationofClustersPersec uint64 + + // + Treeupdatelatency100ns uint64 + + // + Treeupdatelatency100ns_Base uint32 + + // + TreeupdatesPersec uint64 + + // + Trimlatency100ns uint64 + + // + Trimlatency100ns_Base uint32 +} + +func NewWin32_PerfRawData_Counters_ReFSEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_ReFS, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_ReFS{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_ReFSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_ReFS, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_ReFS{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAllocationofDataClustersonFastTierPersec sets the value of AllocationofDataClustersonFastTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyAllocationofDataClustersonFastTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofDataClustersonFastTierPersec", (value)) +} + +// GetAllocationofDataClustersonFastTierPersec gets the value of AllocationofDataClustersonFastTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyAllocationofDataClustersonFastTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofDataClustersonFastTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationofDataClustersonSlowTierPersec sets the value of AllocationofDataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyAllocationofDataClustersonSlowTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofDataClustersonSlowTierPersec", (value)) +} + +// GetAllocationofDataClustersonSlowTierPersec gets the value of AllocationofDataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyAllocationofDataClustersonSlowTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofDataClustersonSlowTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationofMetadataClustersonFastTierPersec sets the value of AllocationofMetadataClustersonFastTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyAllocationofMetadataClustersonFastTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofMetadataClustersonFastTierPersec", (value)) +} + +// GetAllocationofMetadataClustersonFastTierPersec gets the value of AllocationofMetadataClustersonFastTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyAllocationofMetadataClustersonFastTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofMetadataClustersonFastTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationofMetadataClustersonSlowTierPersec sets the value of AllocationofMetadataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyAllocationofMetadataClustersonSlowTierPersec(value uint64) (err error) { + return instance.SetProperty("AllocationofMetadataClustersonSlowTierPersec", (value)) +} + +// GetAllocationofMetadataClustersonSlowTierPersec gets the value of AllocationofMetadataClustersonSlowTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyAllocationofMetadataClustersonSlowTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationofMetadataClustersonSlowTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCheckpointlatency100ns sets the value of Checkpointlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCheckpointlatency100ns(value uint64) (err error) { + return instance.SetProperty("Checkpointlatency100ns", (value)) +} + +// GetCheckpointlatency100ns gets the value of Checkpointlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCheckpointlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Checkpointlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCheckpointlatency100ns_Base sets the value of Checkpointlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCheckpointlatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Checkpointlatency100ns_Base", (value)) +} + +// GetCheckpointlatency100ns_Base gets the value of Checkpointlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCheckpointlatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Checkpointlatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCheckpointsPersec sets the value of CheckpointsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCheckpointsPersec(value uint64) (err error) { + return instance.SetProperty("CheckpointsPersec", (value)) +} + +// GetCheckpointsPersec gets the value of CheckpointsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCheckpointsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CheckpointsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactedContainerFillRatioPercent sets the value of CompactedContainerFillRatioPercent for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactedContainerFillRatioPercent(value uint64) (err error) { + return instance.SetProperty("CompactedContainerFillRatioPercent", (value)) +} + +// GetCompactedContainerFillRatioPercent gets the value of CompactedContainerFillRatioPercent for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactedContainerFillRatioPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CompactedContainerFillRatioPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactedContainerFillRatioPercent_Base sets the value of CompactedContainerFillRatioPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactedContainerFillRatioPercent_Base(value uint32) (err error) { + return instance.SetProperty("CompactedContainerFillRatioPercent_Base", (value)) +} + +// GetCompactedContainerFillRatioPercent_Base gets the value of CompactedContainerFillRatioPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactedContainerFillRatioPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("CompactedContainerFillRatioPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionFailureCount sets the value of CompactionFailureCount for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionFailureCount(value uint32) (err error) { + return instance.SetProperty("CompactionFailureCount", (value)) +} + +// GetCompactionFailureCount gets the value of CompactionFailureCount for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionFailureCount() (value uint32, err error) { + retValue, err := instance.GetProperty("CompactionFailureCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionreadlatency100ns sets the value of Compactionreadlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionreadlatency100ns(value uint64) (err error) { + return instance.SetProperty("Compactionreadlatency100ns", (value)) +} + +// GetCompactionreadlatency100ns gets the value of Compactionreadlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionreadlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Compactionreadlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactionreadlatency100ns_Base sets the value of Compactionreadlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionreadlatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Compactionreadlatency100ns_Base", (value)) +} + +// GetCompactionreadlatency100ns_Base gets the value of Compactionreadlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionreadlatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactionreadlatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionsfailedduetoineligiblecontainer sets the value of Compactionsfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionsfailedduetoineligiblecontainer(value uint32) (err error) { + return instance.SetProperty("Compactionsfailedduetoineligiblecontainer", (value)) +} + +// GetCompactionsfailedduetoineligiblecontainer gets the value of Compactionsfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionsfailedduetoineligiblecontainer() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactionsfailedduetoineligiblecontainer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionsfailedduetomaxfragmentation sets the value of Compactionsfailedduetomaxfragmentation for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionsfailedduetomaxfragmentation(value uint32) (err error) { + return instance.SetProperty("Compactionsfailedduetomaxfragmentation", (value)) +} + +// GetCompactionsfailedduetomaxfragmentation gets the value of Compactionsfailedduetomaxfragmentation for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionsfailedduetomaxfragmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactionsfailedduetomaxfragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactionwritelatency100ns sets the value of Compactionwritelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionwritelatency100ns(value uint64) (err error) { + return instance.SetProperty("Compactionwritelatency100ns", (value)) +} + +// GetCompactionwritelatency100ns gets the value of Compactionwritelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionwritelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Compactionwritelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompactionwritelatency100ns_Base sets the value of Compactionwritelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCompactionwritelatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Compactionwritelatency100ns_Base", (value)) +} + +// GetCompactionwritelatency100ns_Base gets the value of Compactionwritelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCompactionwritelatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactionwritelatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContainerDestagesFromFastTierPersec sets the value of ContainerDestagesFromFastTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyContainerDestagesFromFastTierPersec(value uint64) (err error) { + return instance.SetProperty("ContainerDestagesFromFastTierPersec", (value)) +} + +// GetContainerDestagesFromFastTierPersec gets the value of ContainerDestagesFromFastTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyContainerDestagesFromFastTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ContainerDestagesFromFastTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContainerDestagesFromSlowTierPersec sets the value of ContainerDestagesFromSlowTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyContainerDestagesFromSlowTierPersec(value uint64) (err error) { + return instance.SetProperty("ContainerDestagesFromSlowTierPersec", (value)) +} + +// GetContainerDestagesFromSlowTierPersec gets the value of ContainerDestagesFromSlowTierPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyContainerDestagesFromSlowTierPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ContainerDestagesFromSlowTierPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContainerMoveFailureCount sets the value of ContainerMoveFailureCount for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyContainerMoveFailureCount(value uint32) (err error) { + return instance.SetProperty("ContainerMoveFailureCount", (value)) +} + +// GetContainerMoveFailureCount gets the value of ContainerMoveFailureCount for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyContainerMoveFailureCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ContainerMoveFailureCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContainerMoveRetryCount sets the value of ContainerMoveRetryCount for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyContainerMoveRetryCount(value uint32) (err error) { + return instance.SetProperty("ContainerMoveRetryCount", (value)) +} + +// GetContainerMoveRetryCount gets the value of ContainerMoveRetryCount for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyContainerMoveRetryCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ContainerMoveRetryCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContainermovesfailedduetoineligiblecontainer sets the value of Containermovesfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyContainermovesfailedduetoineligiblecontainer(value uint32) (err error) { + return instance.SetProperty("Containermovesfailedduetoineligiblecontainer", (value)) +} + +// GetContainermovesfailedduetoineligiblecontainer gets the value of Containermovesfailedduetoineligiblecontainer for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyContainermovesfailedduetoineligiblecontainer() (value uint32, err error) { + retValue, err := instance.GetProperty("Containermovesfailedduetoineligiblecontainer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentFastTierDataFillPercentage sets the value of CurrentFastTierDataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCurrentFastTierDataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentFastTierDataFillPercentage", (value)) +} + +// GetCurrentFastTierDataFillPercentage gets the value of CurrentFastTierDataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCurrentFastTierDataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentFastTierDataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentFastTierMetadataFillPercentage sets the value of CurrentFastTierMetadataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCurrentFastTierMetadataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentFastTierMetadataFillPercentage", (value)) +} + +// GetCurrentFastTierMetadataFillPercentage gets the value of CurrentFastTierMetadataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCurrentFastTierMetadataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentFastTierMetadataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentSlowTierDataFillPercentage sets the value of CurrentSlowTierDataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCurrentSlowTierDataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentSlowTierDataFillPercentage", (value)) +} + +// GetCurrentSlowTierDataFillPercentage gets the value of CurrentSlowTierDataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCurrentSlowTierDataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSlowTierDataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentSlowTierMetadataFillPercentage sets the value of CurrentSlowTierMetadataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyCurrentSlowTierMetadataFillPercentage(value uint32) (err error) { + return instance.SetProperty("CurrentSlowTierMetadataFillPercentage", (value)) +} + +// GetCurrentSlowTierMetadataFillPercentage gets the value of CurrentSlowTierMetadataFillPercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyCurrentSlowTierMetadataFillPercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSlowTierMetadataFillPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataCompactionsPersec sets the value of DataCompactionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyDataCompactionsPersec(value uint64) (err error) { + return instance.SetProperty("DataCompactionsPersec", (value)) +} + +// GetDataCompactionsPersec gets the value of DataCompactionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyDataCompactionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataCompactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataInPlaceWriteClustersPersec sets the value of DataInPlaceWriteClustersPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyDataInPlaceWriteClustersPersec(value uint64) (err error) { + return instance.SetProperty("DataInPlaceWriteClustersPersec", (value)) +} + +// GetDataInPlaceWriteClustersPersec gets the value of DataInPlaceWriteClustersPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyDataInPlaceWriteClustersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataInPlaceWriteClustersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeleteQueueentries sets the value of DeleteQueueentries for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyDeleteQueueentries(value uint32) (err error) { + return instance.SetProperty("DeleteQueueentries", (value)) +} + +// GetDeleteQueueentries gets the value of DeleteQueueentries for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyDeleteQueueentries() (value uint32, err error) { + retValue, err := instance.GetProperty("DeleteQueueentries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirtymetadatapages sets the value of Dirtymetadatapages for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyDirtymetadatapages(value uint64) (err error) { + return instance.SetProperty("Dirtymetadatapages", (value)) +} + +// GetDirtymetadatapages gets the value of Dirtymetadatapages for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyDirtymetadatapages() (value uint64, err error) { + retValue, err := instance.GetProperty("Dirtymetadatapages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtytablelistentries sets the value of Dirtytablelistentries for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyDirtytablelistentries(value uint32) (err error) { + return instance.SetProperty("Dirtytablelistentries", (value)) +} + +// GetDirtytablelistentries gets the value of Dirtytablelistentries for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyDirtytablelistentries() (value uint32, err error) { + retValue, err := instance.GetProperty("Dirtytablelistentries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFastTierDestagedContainerFillRatioPercent sets the value of FastTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyFastTierDestagedContainerFillRatioPercent(value uint64) (err error) { + return instance.SetProperty("FastTierDestagedContainerFillRatioPercent", (value)) +} + +// GetFastTierDestagedContainerFillRatioPercent gets the value of FastTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyFastTierDestagedContainerFillRatioPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("FastTierDestagedContainerFillRatioPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFastTierDestagedContainerFillRatioPercent_Base sets the value of FastTierDestagedContainerFillRatioPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyFastTierDestagedContainerFillRatioPercent_Base(value uint32) (err error) { + return instance.SetProperty("FastTierDestagedContainerFillRatioPercent_Base", (value)) +} + +// GetFastTierDestagedContainerFillRatioPercent_Base gets the value of FastTierDestagedContainerFillRatioPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyFastTierDestagedContainerFillRatioPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("FastTierDestagedContainerFillRatioPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFasttierdestagereadlatency100ns sets the value of Fasttierdestagereadlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyFasttierdestagereadlatency100ns(value uint64) (err error) { + return instance.SetProperty("Fasttierdestagereadlatency100ns", (value)) +} + +// GetFasttierdestagereadlatency100ns gets the value of Fasttierdestagereadlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyFasttierdestagereadlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Fasttierdestagereadlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFasttierdestagereadlatency100ns_Base sets the value of Fasttierdestagereadlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyFasttierdestagereadlatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Fasttierdestagereadlatency100ns_Base", (value)) +} + +// GetFasttierdestagereadlatency100ns_Base gets the value of Fasttierdestagereadlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyFasttierdestagereadlatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Fasttierdestagereadlatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFasttierdestagewritelatency100ns sets the value of Fasttierdestagewritelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyFasttierdestagewritelatency100ns(value uint64) (err error) { + return instance.SetProperty("Fasttierdestagewritelatency100ns", (value)) +} + +// GetFasttierdestagewritelatency100ns gets the value of Fasttierdestagewritelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyFasttierdestagewritelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Fasttierdestagewritelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFasttierdestagewritelatency100ns_Base sets the value of Fasttierdestagewritelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyFasttierdestagewritelatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Fasttierdestagewritelatency100ns_Base", (value)) +} + +// GetFasttierdestagewritelatency100ns_Base gets the value of Fasttierdestagewritelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyFasttierdestagewritelatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Fasttierdestagewritelatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogfillpercentage sets the value of Logfillpercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyLogfillpercentage(value uint32) (err error) { + return instance.SetProperty("Logfillpercentage", (value)) +} + +// GetLogfillpercentage gets the value of Logfillpercentage for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyLogfillpercentage() (value uint32, err error) { + retValue, err := instance.GetProperty("Logfillpercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogwritesPersec sets the value of LogwritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyLogwritesPersec(value uint64) (err error) { + return instance.SetProperty("LogwritesPersec", (value)) +} + +// GetLogwritesPersec gets the value of LogwritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyLogwritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogwritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowTierDestagedContainerFillRatioPercent sets the value of SlowTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertySlowTierDestagedContainerFillRatioPercent(value uint64) (err error) { + return instance.SetProperty("SlowTierDestagedContainerFillRatioPercent", (value)) +} + +// GetSlowTierDestagedContainerFillRatioPercent gets the value of SlowTierDestagedContainerFillRatioPercent for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertySlowTierDestagedContainerFillRatioPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("SlowTierDestagedContainerFillRatioPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowTierDestagedContainerFillRatioPercent_Base sets the value of SlowTierDestagedContainerFillRatioPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertySlowTierDestagedContainerFillRatioPercent_Base(value uint32) (err error) { + return instance.SetProperty("SlowTierDestagedContainerFillRatioPercent_Base", (value)) +} + +// GetSlowTierDestagedContainerFillRatioPercent_Base gets the value of SlowTierDestagedContainerFillRatioPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertySlowTierDestagedContainerFillRatioPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("SlowTierDestagedContainerFillRatioPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSlowtierdestagereadlatency100ns sets the value of Slowtierdestagereadlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertySlowtierdestagereadlatency100ns(value uint64) (err error) { + return instance.SetProperty("Slowtierdestagereadlatency100ns", (value)) +} + +// GetSlowtierdestagereadlatency100ns gets the value of Slowtierdestagereadlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertySlowtierdestagereadlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Slowtierdestagereadlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowtierdestagereadlatency100ns_Base sets the value of Slowtierdestagereadlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertySlowtierdestagereadlatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Slowtierdestagereadlatency100ns_Base", (value)) +} + +// GetSlowtierdestagereadlatency100ns_Base gets the value of Slowtierdestagereadlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertySlowtierdestagereadlatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Slowtierdestagereadlatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSlowtierdestagewritelatency100ns sets the value of Slowtierdestagewritelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertySlowtierdestagewritelatency100ns(value uint64) (err error) { + return instance.SetProperty("Slowtierdestagewritelatency100ns", (value)) +} + +// GetSlowtierdestagewritelatency100ns gets the value of Slowtierdestagewritelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertySlowtierdestagewritelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Slowtierdestagewritelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlowtierdestagewritelatency100ns_Base sets the value of Slowtierdestagewritelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertySlowtierdestagewritelatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Slowtierdestagewritelatency100ns_Base", (value)) +} + +// GetSlowtierdestagewritelatency100ns_Base gets the value of Slowtierdestagewritelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertySlowtierdestagewritelatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Slowtierdestagewritelatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalAllocationofClustersPersec sets the value of TotalAllocationofClustersPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyTotalAllocationofClustersPersec(value uint64) (err error) { + return instance.SetProperty("TotalAllocationofClustersPersec", (value)) +} + +// GetTotalAllocationofClustersPersec gets the value of TotalAllocationofClustersPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyTotalAllocationofClustersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalAllocationofClustersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeupdatelatency100ns sets the value of Treeupdatelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyTreeupdatelatency100ns(value uint64) (err error) { + return instance.SetProperty("Treeupdatelatency100ns", (value)) +} + +// GetTreeupdatelatency100ns gets the value of Treeupdatelatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyTreeupdatelatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Treeupdatelatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeupdatelatency100ns_Base sets the value of Treeupdatelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyTreeupdatelatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Treeupdatelatency100ns_Base", (value)) +} + +// GetTreeupdatelatency100ns_Base gets the value of Treeupdatelatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyTreeupdatelatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Treeupdatelatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTreeupdatesPersec sets the value of TreeupdatesPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyTreeupdatesPersec(value uint64) (err error) { + return instance.SetProperty("TreeupdatesPersec", (value)) +} + +// GetTreeupdatesPersec gets the value of TreeupdatesPersec for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyTreeupdatesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TreeupdatesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrimlatency100ns sets the value of Trimlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyTrimlatency100ns(value uint64) (err error) { + return instance.SetProperty("Trimlatency100ns", (value)) +} + +// GetTrimlatency100ns gets the value of Trimlatency100ns for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyTrimlatency100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("Trimlatency100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrimlatency100ns_Base sets the value of Trimlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) SetPropertyTrimlatency100ns_Base(value uint32) (err error) { + return instance.SetProperty("Trimlatency100ns_Base", (value)) +} + +// GetTrimlatency100ns_Base gets the value of Trimlatency100ns_Base for the instance +func (instance *Win32_PerfRawData_Counters_ReFS) GetPropertyTrimlatency100ns_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Trimlatency100ns_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXGraphics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXGraphics.go new file mode 100644 index 00000000..236eaa09 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXGraphics.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_RemoteFXGraphics struct +type Win32_PerfRawData_Counters_RemoteFXGraphics struct { + *Win32_PerfRawData + + // + AverageEncodingTime uint32 + + // + FrameQuality uint32 + + // + FramesSkippedPerSecondInsufficientClientResources uint32 + + // + FramesSkippedPerSecondInsufficientNetworkResources uint32 + + // + FramesSkippedPerSecondInsufficientServerResources uint32 + + // + GraphicsCompressionratio uint32 + + // + InputFramesPerSecond uint32 + + // + OutputFramesPerSecond uint32 + + // + SourceFramesPerSecond uint32 +} + +func NewWin32_PerfRawData_Counters_RemoteFXGraphicsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_RemoteFXGraphics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_RemoteFXGraphics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_RemoteFXGraphicsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_RemoteFXGraphics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_RemoteFXGraphics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageEncodingTime sets the value of AverageEncodingTime for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyAverageEncodingTime(value uint32) (err error) { + return instance.SetProperty("AverageEncodingTime", (value)) +} + +// GetAverageEncodingTime gets the value of AverageEncodingTime for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyAverageEncodingTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageEncodingTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFrameQuality sets the value of FrameQuality for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyFrameQuality(value uint32) (err error) { + return instance.SetProperty("FrameQuality", (value)) +} + +// GetFrameQuality gets the value of FrameQuality for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyFrameQuality() (value uint32, err error) { + retValue, err := instance.GetProperty("FrameQuality") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesSkippedPerSecondInsufficientClientResources sets the value of FramesSkippedPerSecondInsufficientClientResources for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyFramesSkippedPerSecondInsufficientClientResources(value uint32) (err error) { + return instance.SetProperty("FramesSkippedPerSecondInsufficientClientResources", (value)) +} + +// GetFramesSkippedPerSecondInsufficientClientResources gets the value of FramesSkippedPerSecondInsufficientClientResources for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyFramesSkippedPerSecondInsufficientClientResources() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesSkippedPerSecondInsufficientClientResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesSkippedPerSecondInsufficientNetworkResources sets the value of FramesSkippedPerSecondInsufficientNetworkResources for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyFramesSkippedPerSecondInsufficientNetworkResources(value uint32) (err error) { + return instance.SetProperty("FramesSkippedPerSecondInsufficientNetworkResources", (value)) +} + +// GetFramesSkippedPerSecondInsufficientNetworkResources gets the value of FramesSkippedPerSecondInsufficientNetworkResources for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyFramesSkippedPerSecondInsufficientNetworkResources() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesSkippedPerSecondInsufficientNetworkResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesSkippedPerSecondInsufficientServerResources sets the value of FramesSkippedPerSecondInsufficientServerResources for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyFramesSkippedPerSecondInsufficientServerResources(value uint32) (err error) { + return instance.SetProperty("FramesSkippedPerSecondInsufficientServerResources", (value)) +} + +// GetFramesSkippedPerSecondInsufficientServerResources gets the value of FramesSkippedPerSecondInsufficientServerResources for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyFramesSkippedPerSecondInsufficientServerResources() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesSkippedPerSecondInsufficientServerResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGraphicsCompressionratio sets the value of GraphicsCompressionratio for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyGraphicsCompressionratio(value uint32) (err error) { + return instance.SetProperty("GraphicsCompressionratio", (value)) +} + +// GetGraphicsCompressionratio gets the value of GraphicsCompressionratio for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyGraphicsCompressionratio() (value uint32, err error) { + retValue, err := instance.GetProperty("GraphicsCompressionratio") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInputFramesPerSecond sets the value of InputFramesPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyInputFramesPerSecond(value uint32) (err error) { + return instance.SetProperty("InputFramesPerSecond", (value)) +} + +// GetInputFramesPerSecond gets the value of InputFramesPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyInputFramesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("InputFramesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutputFramesPerSecond sets the value of OutputFramesPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertyOutputFramesPerSecond(value uint32) (err error) { + return instance.SetProperty("OutputFramesPerSecond", (value)) +} + +// GetOutputFramesPerSecond gets the value of OutputFramesPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertyOutputFramesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("OutputFramesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSourceFramesPerSecond sets the value of SourceFramesPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) SetPropertySourceFramesPerSecond(value uint32) (err error) { + return instance.SetProperty("SourceFramesPerSecond", (value)) +} + +// GetSourceFramesPerSecond gets the value of SourceFramesPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXGraphics) GetPropertySourceFramesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SourceFramesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXNetwork.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXNetwork.go new file mode 100644 index 00000000..c70d7234 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_RemoteFXNetwork.go @@ -0,0 +1,830 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_RemoteFXNetwork struct +type Win32_PerfRawData_Counters_RemoteFXNetwork struct { + *Win32_PerfRawData + + // + BaseTCPRTT uint32 + + // + BaseUDPRTT uint32 + + // + CurrentTCPBandwidth uint32 + + // + CurrentTCPRTT uint32 + + // + CurrentUDPBandwidth uint32 + + // + CurrentUDPRTT uint32 + + // + FECRate uint32 + + // + FECRate_Base uint32 + + // + LossRate uint32 + + // + LossRate_Base uint32 + + // + RetransmissionRate uint32 + + // + RetransmissionRate_Base uint32 + + // + SentRateP0 uint32 + + // + SentRateP1 uint32 + + // + SentRateP2 uint32 + + // + SentRateP3 uint32 + + // + TCPReceivedRate uint32 + + // + TCPSentRate uint32 + + // + TotalReceivedBytes uint32 + + // + TotalReceivedRate uint32 + + // + TotalSentBytes uint32 + + // + TotalSentRate uint32 + + // + UDPPacketsReceivedPersec uint32 + + // + UDPPacketsSentPersec uint32 + + // + UDPReceivedRate uint32 + + // + UDPSentRate uint32 +} + +func NewWin32_PerfRawData_Counters_RemoteFXNetworkEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_RemoteFXNetwork, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_RemoteFXNetwork{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_RemoteFXNetworkEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_RemoteFXNetwork, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_RemoteFXNetwork{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBaseTCPRTT sets the value of BaseTCPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyBaseTCPRTT(value uint32) (err error) { + return instance.SetProperty("BaseTCPRTT", (value)) +} + +// GetBaseTCPRTT gets the value of BaseTCPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyBaseTCPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("BaseTCPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBaseUDPRTT sets the value of BaseUDPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyBaseUDPRTT(value uint32) (err error) { + return instance.SetProperty("BaseUDPRTT", (value)) +} + +// GetBaseUDPRTT gets the value of BaseUDPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyBaseUDPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("BaseUDPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentTCPBandwidth sets the value of CurrentTCPBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyCurrentTCPBandwidth(value uint32) (err error) { + return instance.SetProperty("CurrentTCPBandwidth", (value)) +} + +// GetCurrentTCPBandwidth gets the value of CurrentTCPBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyCurrentTCPBandwidth() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentTCPBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentTCPRTT sets the value of CurrentTCPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyCurrentTCPRTT(value uint32) (err error) { + return instance.SetProperty("CurrentTCPRTT", (value)) +} + +// GetCurrentTCPRTT gets the value of CurrentTCPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyCurrentTCPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentTCPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUDPBandwidth sets the value of CurrentUDPBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyCurrentUDPBandwidth(value uint32) (err error) { + return instance.SetProperty("CurrentUDPBandwidth", (value)) +} + +// GetCurrentUDPBandwidth gets the value of CurrentUDPBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyCurrentUDPBandwidth() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUDPBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUDPRTT sets the value of CurrentUDPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyCurrentUDPRTT(value uint32) (err error) { + return instance.SetProperty("CurrentUDPRTT", (value)) +} + +// GetCurrentUDPRTT gets the value of CurrentUDPRTT for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyCurrentUDPRTT() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUDPRTT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFECRate sets the value of FECRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyFECRate(value uint32) (err error) { + return instance.SetProperty("FECRate", (value)) +} + +// GetFECRate gets the value of FECRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyFECRate() (value uint32, err error) { + retValue, err := instance.GetProperty("FECRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFECRate_Base sets the value of FECRate_Base for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyFECRate_Base(value uint32) (err error) { + return instance.SetProperty("FECRate_Base", (value)) +} + +// GetFECRate_Base gets the value of FECRate_Base for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyFECRate_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("FECRate_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLossRate sets the value of LossRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyLossRate(value uint32) (err error) { + return instance.SetProperty("LossRate", (value)) +} + +// GetLossRate gets the value of LossRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyLossRate() (value uint32, err error) { + retValue, err := instance.GetProperty("LossRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLossRate_Base sets the value of LossRate_Base for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyLossRate_Base(value uint32) (err error) { + return instance.SetProperty("LossRate_Base", (value)) +} + +// GetLossRate_Base gets the value of LossRate_Base for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyLossRate_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LossRate_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRetransmissionRate sets the value of RetransmissionRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyRetransmissionRate(value uint32) (err error) { + return instance.SetProperty("RetransmissionRate", (value)) +} + +// GetRetransmissionRate gets the value of RetransmissionRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyRetransmissionRate() (value uint32, err error) { + retValue, err := instance.GetProperty("RetransmissionRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRetransmissionRate_Base sets the value of RetransmissionRate_Base for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyRetransmissionRate_Base(value uint32) (err error) { + return instance.SetProperty("RetransmissionRate_Base", (value)) +} + +// GetRetransmissionRate_Base gets the value of RetransmissionRate_Base for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyRetransmissionRate_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RetransmissionRate_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP0 sets the value of SentRateP0 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertySentRateP0(value uint32) (err error) { + return instance.SetProperty("SentRateP0", (value)) +} + +// GetSentRateP0 gets the value of SentRateP0 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertySentRateP0() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP1 sets the value of SentRateP1 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertySentRateP1(value uint32) (err error) { + return instance.SetProperty("SentRateP1", (value)) +} + +// GetSentRateP1 gets the value of SentRateP1 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertySentRateP1() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP2 sets the value of SentRateP2 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertySentRateP2(value uint32) (err error) { + return instance.SetProperty("SentRateP2", (value)) +} + +// GetSentRateP2 gets the value of SentRateP2 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertySentRateP2() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRateP3 sets the value of SentRateP3 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertySentRateP3(value uint32) (err error) { + return instance.SetProperty("SentRateP3", (value)) +} + +// GetSentRateP3 gets the value of SentRateP3 for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertySentRateP3() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRateP3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPReceivedRate sets the value of TCPReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyTCPReceivedRate(value uint32) (err error) { + return instance.SetProperty("TCPReceivedRate", (value)) +} + +// GetTCPReceivedRate gets the value of TCPReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyTCPReceivedRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPSentRate sets the value of TCPSentRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyTCPSentRate(value uint32) (err error) { + return instance.SetProperty("TCPSentRate", (value)) +} + +// GetTCPSentRate gets the value of TCPSentRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyTCPSentRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalReceivedBytes sets the value of TotalReceivedBytes for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyTotalReceivedBytes(value uint32) (err error) { + return instance.SetProperty("TotalReceivedBytes", (value)) +} + +// GetTotalReceivedBytes gets the value of TotalReceivedBytes for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyTotalReceivedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalReceivedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalReceivedRate sets the value of TotalReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyTotalReceivedRate(value uint32) (err error) { + return instance.SetProperty("TotalReceivedRate", (value)) +} + +// GetTotalReceivedRate gets the value of TotalReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyTotalReceivedRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSentBytes sets the value of TotalSentBytes for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyTotalSentBytes(value uint32) (err error) { + return instance.SetProperty("TotalSentBytes", (value)) +} + +// GetTotalSentBytes gets the value of TotalSentBytes for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyTotalSentBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSentRate sets the value of TotalSentRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyTotalSentRate(value uint32) (err error) { + return instance.SetProperty("TotalSentRate", (value)) +} + +// GetTotalSentRate gets the value of TotalSentRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyTotalSentRate() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPacketsReceivedPersec sets the value of UDPPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyUDPPacketsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("UDPPacketsReceivedPersec", (value)) +} + +// GetUDPPacketsReceivedPersec gets the value of UDPPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyUDPPacketsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPacketsSentPersec sets the value of UDPPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyUDPPacketsSentPersec(value uint32) (err error) { + return instance.SetProperty("UDPPacketsSentPersec", (value)) +} + +// GetUDPPacketsSentPersec gets the value of UDPPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyUDPPacketsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPReceivedRate sets the value of UDPReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyUDPReceivedRate(value uint32) (err error) { + return instance.SetProperty("UDPReceivedRate", (value)) +} + +// GetUDPReceivedRate gets the value of UDPReceivedRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyUDPReceivedRate() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPReceivedRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPSentRate sets the value of UDPSentRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) SetPropertyUDPSentRate(value uint32) (err error) { + return instance.SetProperty("UDPSentRate", (value)) +} + +// GetUDPSentRate gets the value of UDPSentRate for the instance +func (instance *Win32_PerfRawData_Counters_RemoteFXNetwork) GetPropertyUDPSentRate() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPSentRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBClientShares.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBClientShares.go new file mode 100644 index 00000000..5f33f965 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBClientShares.go @@ -0,0 +1,950 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_SMBClientShares struct +type Win32_PerfRawData_Counters_SMBClientShares struct { + *Win32_PerfRawData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerRead_Base uint32 + + // + AvgBytesPerWrite uint64 + + // + AvgBytesPerWrite_Base uint32 + + // + AvgDataBytesPerRequest uint64 + + // + AvgDataBytesPerRequest_Base uint32 + + // + AvgDataQueueLength uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerDataRequest uint32 + + // + AvgsecPerDataRequest_Base uint32 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRead_Base uint32 + + // + AvgsecPerWrite uint32 + + // + AvgsecPerWrite_Base uint32 + + // + AvgWriteQueueLength uint64 + + // + CreditStallsPersec uint32 + + // + CurrentDataQueueLength uint32 + + // + DataBytesPersec uint64 + + // + DataRequestsPersec uint32 + + // + MetadataRequestsPersec uint32 + + // + ReadBytesPersec uint64 + + // + ReadBytestransmittedviaSMBDirectPersec uint64 + + // + ReadRequestsPersec uint32 + + // + ReadRequeststransmittedviaSMBDirectPersec uint32 + + // + TurboIOReadsPersec uint32 + + // + TurboIOWritesPersec uint32 + + // + WriteBytesPersec uint64 + + // + WriteBytestransmittedviaSMBDirectPersec uint64 + + // + WriteRequestsPersec uint32 + + // + WriteRequeststransmittedviaSMBDirectPersec uint32 +} + +func NewWin32_PerfRawData_Counters_SMBClientSharesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SMBClientShares, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBClientShares{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SMBClientSharesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SMBClientShares, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBClientShares{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerRead_Base sets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerRead_Base", (value)) +} + +// GetAvgBytesPerRead_Base gets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite_Base sets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerWrite_Base", (value)) +} + +// GetAvgBytesPerWrite_Base gets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest sets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgDataBytesPerRequest(value uint64) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest", (value)) +} + +// GetAvgDataBytesPerRequest gets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgDataBytesPerRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest_Base sets the value of AvgDataBytesPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgDataBytesPerRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest_Base", (value)) +} + +// GetAvgDataBytesPerRequest_Base gets the value of AvgDataBytesPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgDataBytesPerRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDataQueueLength sets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgDataQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDataQueueLength", (value)) +} + +// GetAvgDataQueueLength gets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerDataRequest sets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest", (value)) +} + +// GetAvgsecPerDataRequest gets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerDataRequest_Base sets the value of AvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest_Base", (value)) +} + +// GetAvgsecPerDataRequest_Base gets the value of AvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead_Base sets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgsecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead_Base", (value)) +} + +// GetAvgsecPerRead_Base gets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgsecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite_Base sets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgsecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite_Base", (value)) +} + +// GetAvgsecPerWrite_Base gets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgsecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreditStallsPersec sets the value of CreditStallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyCreditStallsPersec(value uint32) (err error) { + return instance.SetProperty("CreditStallsPersec", (value)) +} + +// GetCreditStallsPersec gets the value of CreditStallsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyCreditStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CreditStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentDataQueueLength sets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyCurrentDataQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentDataQueueLength", (value)) +} + +// GetCurrentDataQueueLength gets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyCurrentDataQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataBytesPersec sets the value of DataBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyDataBytesPersec(value uint64) (err error) { + return instance.SetProperty("DataBytesPersec", (value)) +} + +// GetDataBytesPersec gets the value of DataBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyDataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataRequestsPersec sets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyDataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DataRequestsPersec", (value)) +} + +// GetDataRequestsPersec gets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyDataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMetadataRequestsPersec sets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyMetadataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("MetadataRequestsPersec", (value)) +} + +// GetMetadataRequestsPersec gets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyMetadataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MetadataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytestransmittedviaSMBDirectPersec sets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyReadBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetReadBytestransmittedviaSMBDirectPersec gets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyReadBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequeststransmittedviaSMBDirectPersec sets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyReadRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetReadRequeststransmittedviaSMBDirectPersec gets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyReadRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTurboIOReadsPersec sets the value of TurboIOReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyTurboIOReadsPersec(value uint32) (err error) { + return instance.SetProperty("TurboIOReadsPersec", (value)) +} + +// GetTurboIOReadsPersec gets the value of TurboIOReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyTurboIOReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TurboIOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTurboIOWritesPersec sets the value of TurboIOWritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyTurboIOWritesPersec(value uint32) (err error) { + return instance.SetProperty("TurboIOWritesPersec", (value)) +} + +// GetTurboIOWritesPersec gets the value of TurboIOWritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyTurboIOWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TurboIOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytestransmittedviaSMBDirectPersec sets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyWriteBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteBytestransmittedviaSMBDirectPersec gets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyWriteBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequeststransmittedviaSMBDirectPersec sets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) SetPropertyWriteRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteRequeststransmittedviaSMBDirectPersec gets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBClientShares) GetPropertyWriteRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBDirectConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBDirectConnection.go new file mode 100644 index 00000000..61eb7385 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBDirectConnection.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_SMBDirectConnection struct +type Win32_PerfRawData_Counters_SMBDirectConnection struct { + *Win32_PerfRawData + + // + BytesRDMAReadPersec uint64 + + // + BytesRDMAWrittenPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + MemoryRegions uint32 + + // + RCQNotificationEventsPersec uint32 + + // + RDMARegistrationsPersec uint32 + + // + ReceivesPersec uint32 + + // + RemoteInvalidationsPersec uint32 + + // + SCQNotificationEventsPersec uint32 + + // + SendsPersec uint32 + + // + StallsRDMAReadPersec uint32 + + // + StallsRDMARegistrationsPersec uint32 + + // + StallsSendCreditPersec uint32 + + // + StallsSendQueuePersec uint32 +} + +func NewWin32_PerfRawData_Counters_SMBDirectConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SMBDirectConnection, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBDirectConnection{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SMBDirectConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SMBDirectConnection, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBDirectConnection{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesRDMAReadPersec sets the value of BytesRDMAReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyBytesRDMAReadPersec(value uint64) (err error) { + return instance.SetProperty("BytesRDMAReadPersec", (value)) +} + +// GetBytesRDMAReadPersec gets the value of BytesRDMAReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyBytesRDMAReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesRDMAReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesRDMAWrittenPersec sets the value of BytesRDMAWrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyBytesRDMAWrittenPersec(value uint64) (err error) { + return instance.SetProperty("BytesRDMAWrittenPersec", (value)) +} + +// GetBytesRDMAWrittenPersec gets the value of BytesRDMAWrittenPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyBytesRDMAWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesRDMAWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryRegions sets the value of MemoryRegions for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyMemoryRegions(value uint32) (err error) { + return instance.SetProperty("MemoryRegions", (value)) +} + +// GetMemoryRegions gets the value of MemoryRegions for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyMemoryRegions() (value uint32, err error) { + retValue, err := instance.GetProperty("MemoryRegions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRCQNotificationEventsPersec sets the value of RCQNotificationEventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyRCQNotificationEventsPersec(value uint32) (err error) { + return instance.SetProperty("RCQNotificationEventsPersec", (value)) +} + +// GetRCQNotificationEventsPersec gets the value of RCQNotificationEventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyRCQNotificationEventsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RCQNotificationEventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRDMARegistrationsPersec sets the value of RDMARegistrationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyRDMARegistrationsPersec(value uint32) (err error) { + return instance.SetProperty("RDMARegistrationsPersec", (value)) +} + +// GetRDMARegistrationsPersec gets the value of RDMARegistrationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyRDMARegistrationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RDMARegistrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivesPersec sets the value of ReceivesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyReceivesPersec(value uint32) (err error) { + return instance.SetProperty("ReceivesPersec", (value)) +} + +// GetReceivesPersec gets the value of ReceivesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyReceivesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteInvalidationsPersec sets the value of RemoteInvalidationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyRemoteInvalidationsPersec(value uint32) (err error) { + return instance.SetProperty("RemoteInvalidationsPersec", (value)) +} + +// GetRemoteInvalidationsPersec gets the value of RemoteInvalidationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyRemoteInvalidationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteInvalidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSCQNotificationEventsPersec sets the value of SCQNotificationEventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertySCQNotificationEventsPersec(value uint32) (err error) { + return instance.SetProperty("SCQNotificationEventsPersec", (value)) +} + +// GetSCQNotificationEventsPersec gets the value of SCQNotificationEventsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertySCQNotificationEventsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SCQNotificationEventsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSendsPersec sets the value of SendsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertySendsPersec(value uint32) (err error) { + return instance.SetProperty("SendsPersec", (value)) +} + +// GetSendsPersec gets the value of SendsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertySendsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SendsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsRDMAReadPersec sets the value of StallsRDMAReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyStallsRDMAReadPersec(value uint32) (err error) { + return instance.SetProperty("StallsRDMAReadPersec", (value)) +} + +// GetStallsRDMAReadPersec gets the value of StallsRDMAReadPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyStallsRDMAReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsRDMAReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsRDMARegistrationsPersec sets the value of StallsRDMARegistrationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyStallsRDMARegistrationsPersec(value uint32) (err error) { + return instance.SetProperty("StallsRDMARegistrationsPersec", (value)) +} + +// GetStallsRDMARegistrationsPersec gets the value of StallsRDMARegistrationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyStallsRDMARegistrationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsRDMARegistrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsSendCreditPersec sets the value of StallsSendCreditPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyStallsSendCreditPersec(value uint32) (err error) { + return instance.SetProperty("StallsSendCreditPersec", (value)) +} + +// GetStallsSendCreditPersec gets the value of StallsSendCreditPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyStallsSendCreditPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsSendCreditPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStallsSendQueuePersec sets the value of StallsSendQueuePersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) SetPropertyStallsSendQueuePersec(value uint32) (err error) { + return instance.SetProperty("StallsSendQueuePersec", (value)) +} + +// GetStallsSendQueuePersec gets the value of StallsSendQueuePersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBDirectConnection) GetPropertyStallsSendQueuePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StallsSendQueuePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServer.go new file mode 100644 index 00000000..f5ae4d34 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServer.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_SMBServer struct +type Win32_PerfRawData_Counters_SMBServer struct { + *Win32_PerfRawData + + // + ReadBytesPersec uint64 + + // + ReadRequestsPersec uint64 + + // + ReceiveBytesPersec uint64 + + // + SendBytesPersec uint64 + + // + WriteBytesPersec uint64 + + // + WriteRequestsPersec uint64 +} + +func NewWin32_PerfRawData_Counters_SMBServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SMBServer, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBServer{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SMBServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SMBServer, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBServer{ + Win32_PerfRawData: tmp, + } + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) SetPropertyReadRequestsPersec(value uint64) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) GetPropertyReadRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveBytesPersec sets the value of ReceiveBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) SetPropertyReceiveBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveBytesPersec", (value)) +} + +// GetReceiveBytesPersec gets the value of ReceiveBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) GetPropertyReceiveBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendBytesPersec sets the value of SendBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) SetPropertySendBytesPersec(value uint64) (err error) { + return instance.SetProperty("SendBytesPersec", (value)) +} + +// GetSendBytesPersec gets the value of SendBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) GetPropertySendBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SendBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) SetPropertyWriteRequestsPersec(value uint64) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServer) GetPropertyWriteRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerSessions.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerSessions.go new file mode 100644 index 00000000..4a0652df --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerSessions.go @@ -0,0 +1,1400 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_SMBServerSessions struct +type Win32_PerfRawData_Counters_SMBServerSessions struct { + *Win32_PerfRawData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerRead_Base uint32 + + // + AvgBytesPerWrite uint64 + + // + AvgBytesPerWrite_Base uint32 + + // + AvgDataBytesPerRequest uint64 + + // + AvgDataBytesPerRequest_Base uint32 + + // + AvgDataQueueLength uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerDataRequest uint32 + + // + AvgsecPerDataRequest_Base uint32 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRead_Base uint32 + + // + AvgsecPerRequest uint32 + + // + AvgsecPerRequest_Base uint32 + + // + AvgsecPerWrite uint32 + + // + AvgsecPerWrite_Base uint32 + + // + AvgWriteQueueLength uint64 + + // + CurrentDataQueueLength uint64 + + // + CurrentDurableOpenFileCount uint64 + + // + CurrentOpenFileCount uint64 + + // + CurrentPendingRequests uint64 + + // + DataBytesPersec uint64 + + // + DataRequestsPersec uint32 + + // + FilesOpenedPersec uint64 + + // + MetadataRequestsPersec uint64 + + // + PercentPersistentHandles uint64 + + // + PercentPersistentHandles_Base uint64 + + // + PercentResilientHandles uint64 + + // + PercentResilientHandles_Base uint64 + + // + ReadBytesPersec uint64 + + // + ReadRequestsPersec uint32 + + // + ReceivedBytesPersec uint64 + + // + RequestsPersec uint64 + + // + SentBytesPersec uint64 + + // + TotalDurableHandleReopenCount uint64 + + // + TotalFailedDurableHandleReopenCount uint64 + + // + TotalFailedPersistentHandleReopenCount uint64 + + // + TotalFailedResilientHandleReopenCount uint64 + + // + TotalFileOpenCount uint64 + + // + TotalPersistentHandleReopenCount uint64 + + // + TotalResilientHandleReopenCount uint64 + + // + TransferredBytesPersec uint64 + + // + TreeConnectCount uint64 + + // + WriteBytesPersec uint64 + + // + WriteRequestsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_SMBServerSessionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SMBServerSessions, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBServerSessions{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SMBServerSessionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SMBServerSessions, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBServerSessions{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerRead_Base sets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerRead_Base", (value)) +} + +// GetAvgBytesPerRead_Base gets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite_Base sets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerWrite_Base", (value)) +} + +// GetAvgBytesPerWrite_Base gets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest sets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgDataBytesPerRequest(value uint64) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest", (value)) +} + +// GetAvgDataBytesPerRequest gets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgDataBytesPerRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest_Base sets the value of AvgDataBytesPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgDataBytesPerRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest_Base", (value)) +} + +// GetAvgDataBytesPerRequest_Base gets the value of AvgDataBytesPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgDataBytesPerRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDataQueueLength sets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgDataQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDataQueueLength", (value)) +} + +// GetAvgDataQueueLength gets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerDataRequest sets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest", (value)) +} + +// GetAvgsecPerDataRequest gets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerDataRequest_Base sets the value of AvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest_Base", (value)) +} + +// GetAvgsecPerDataRequest_Base gets the value of AvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead_Base sets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead_Base", (value)) +} + +// GetAvgsecPerRead_Base gets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest sets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest", (value)) +} + +// GetAvgsecPerRequest gets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest_Base sets the value of AvgsecPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest_Base", (value)) +} + +// GetAvgsecPerRequest_Base gets the value of AvgsecPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite_Base sets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgsecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite_Base", (value)) +} + +// GetAvgsecPerWrite_Base gets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgsecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDataQueueLength sets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyCurrentDataQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentDataQueueLength", (value)) +} + +// GetCurrentDataQueueLength gets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyCurrentDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDurableOpenFileCount sets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyCurrentDurableOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentDurableOpenFileCount", (value)) +} + +// GetCurrentDurableOpenFileCount gets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyCurrentDurableOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDurableOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentOpenFileCount sets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyCurrentOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentOpenFileCount", (value)) +} + +// GetCurrentOpenFileCount gets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyCurrentOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPendingRequests sets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyCurrentPendingRequests(value uint64) (err error) { + return instance.SetProperty("CurrentPendingRequests", (value)) +} + +// GetCurrentPendingRequests gets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyCurrentPendingRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPendingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataBytesPersec sets the value of DataBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyDataBytesPersec(value uint64) (err error) { + return instance.SetProperty("DataBytesPersec", (value)) +} + +// GetDataBytesPersec gets the value of DataBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyDataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataRequestsPersec sets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyDataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DataRequestsPersec", (value)) +} + +// GetDataRequestsPersec gets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyDataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpenedPersec sets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyFilesOpenedPersec(value uint64) (err error) { + return instance.SetProperty("FilesOpenedPersec", (value)) +} + +// GetFilesOpenedPersec gets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyFilesOpenedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesOpenedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataRequestsPersec sets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyMetadataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("MetadataRequestsPersec", (value)) +} + +// GetMetadataRequestsPersec gets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyMetadataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPersistentHandles sets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyPercentPersistentHandles(value uint64) (err error) { + return instance.SetProperty("PercentPersistentHandles", (value)) +} + +// GetPercentPersistentHandles gets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyPercentPersistentHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPersistentHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPersistentHandles_Base sets the value of PercentPersistentHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyPercentPersistentHandles_Base(value uint64) (err error) { + return instance.SetProperty("PercentPersistentHandles_Base", (value)) +} + +// GetPercentPersistentHandles_Base gets the value of PercentPersistentHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyPercentPersistentHandles_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPersistentHandles_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentResilientHandles sets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyPercentResilientHandles(value uint64) (err error) { + return instance.SetProperty("PercentResilientHandles", (value)) +} + +// GetPercentResilientHandles gets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyPercentResilientHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentResilientHandles_Base sets the value of PercentResilientHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyPercentResilientHandles_Base(value uint64) (err error) { + return instance.SetProperty("PercentResilientHandles_Base", (value)) +} + +// GetPercentResilientHandles_Base gets the value of PercentResilientHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyPercentResilientHandles_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentResilientHandles_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedBytesPersec sets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyReceivedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedBytesPersec", (value)) +} + +// GetReceivedBytesPersec gets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyReceivedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestsPersec sets the value of RequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyRequestsPersec(value uint64) (err error) { + return instance.SetProperty("RequestsPersec", (value)) +} + +// GetRequestsPersec gets the value of RequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentBytesPersec sets the value of SentBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertySentBytesPersec(value uint64) (err error) { + return instance.SetProperty("SentBytesPersec", (value)) +} + +// GetSentBytesPersec gets the value of SentBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertySentBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalDurableHandleReopenCount sets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalDurableHandleReopenCount", (value)) +} + +// GetTotalDurableHandleReopenCount gets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedDurableHandleReopenCount sets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalFailedDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedDurableHandleReopenCount", (value)) +} + +// GetTotalFailedDurableHandleReopenCount gets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalFailedDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedPersistentHandleReopenCount sets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalFailedPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedPersistentHandleReopenCount", (value)) +} + +// GetTotalFailedPersistentHandleReopenCount gets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalFailedPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedResilientHandleReopenCount sets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalFailedResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedResilientHandleReopenCount", (value)) +} + +// GetTotalFailedResilientHandleReopenCount gets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalFailedResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFileOpenCount sets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalFileOpenCount(value uint64) (err error) { + return instance.SetProperty("TotalFileOpenCount", (value)) +} + +// GetTotalFileOpenCount gets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalFileOpenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFileOpenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPersistentHandleReopenCount sets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalPersistentHandleReopenCount", (value)) +} + +// GetTotalPersistentHandleReopenCount gets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalResilientHandleReopenCount sets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTotalResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalResilientHandleReopenCount", (value)) +} + +// GetTotalResilientHandleReopenCount gets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTotalResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferredBytesPersec sets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTransferredBytesPersec(value uint64) (err error) { + return instance.SetProperty("TransferredBytesPersec", (value)) +} + +// GetTransferredBytesPersec gets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTransferredBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferredBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeConnectCount sets the value of TreeConnectCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyTreeConnectCount(value uint64) (err error) { + return instance.SetProperty("TreeConnectCount", (value)) +} + +// GetTreeConnectCount gets the value of TreeConnectCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyTreeConnectCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TreeConnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerSessions) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerShares.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerShares.go new file mode 100644 index 00000000..18a65e96 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SMBServerShares.go @@ -0,0 +1,1670 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_SMBServerShares struct +type Win32_PerfRawData_Counters_SMBServerShares struct { + *Win32_PerfRawData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerRead_Base uint32 + + // + AvgBytesPerWrite uint64 + + // + AvgBytesPerWrite_Base uint32 + + // + AvgDataBytesPerRequest uint64 + + // + AvgDataBytesPerRequest_Base uint32 + + // + AvgDataQueueLength uint64 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerDataRequest uint32 + + // + AvgsecPerDataRequest_Base uint32 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRead_Base uint32 + + // + AvgsecPerRequest uint32 + + // + AvgsecPerRequest_Base uint32 + + // + AvgsecPerWrite uint32 + + // + AvgsecPerWrite_Base uint32 + + // + AvgWriteQueueLength uint64 + + // + CurrentBypassOpenFileCount uint64 + + // + CurrentDataQueueLength uint64 + + // + CurrentDurableOpenFileCount uint64 + + // + CurrentOpenFileCount uint64 + + // + CurrentPendingRequests uint64 + + // + DataBytesPersec uint64 + + // + DataRequestsPersec uint32 + + // + FilesOpenedPersec uint64 + + // + MetadataRequestsPersec uint64 + + // + PercentPersistentHandles uint64 + + // + PercentPersistentHandles_Base uint64 + + // + PercentResilientHandles uint64 + + // + PercentResilientHandles_Base uint64 + + // + ReadBytesPersec uint64 + + // + ReadBytestransmittedByPassCSVPersec uint64 + + // + ReadBytestransmittedviaSMBDirectPersec uint64 + + // + ReadRequestsPersec uint32 + + // + ReadRequeststransmittedviaBypassCSVPersec uint32 + + // + ReadRequeststransmittedviaSMBDirectPersec uint32 + + // + ReceivedBytesPersec uint64 + + // + RequestsPersec uint64 + + // + SentBytesPersec uint64 + + // + TotalDurableHandleReopenCount uint64 + + // + TotalFailedDurableHandleReopenCount uint64 + + // + TotalFailedPersistentHandleReopenCount uint64 + + // + TotalFailedResilientHandleReopenCount uint64 + + // + TotalFileOpenCount uint64 + + // + TotalPersistentHandleReopenCount uint64 + + // + TotalResilientHandleReopenCount uint64 + + // + TransferredBytesPersec uint64 + + // + TreeConnectCount uint64 + + // + WriteBytesPersec uint64 + + // + WriteBytestransmittedByPassCSVPersec uint64 + + // + WriteBytestransmittedviaSMBDirectPersec uint64 + + // + WriteRequestsPersec uint32 + + // + WriteRequeststransmittedviaBypassCSVPersec uint32 + + // + WriteRequeststransmittedviaSMBDirectPersec uint32 +} + +func NewWin32_PerfRawData_Counters_SMBServerSharesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SMBServerShares, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBServerShares{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SMBServerSharesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SMBServerShares, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SMBServerShares{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerRead_Base sets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerRead_Base", (value)) +} + +// GetAvgBytesPerRead_Base gets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite_Base sets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerWrite_Base", (value)) +} + +// GetAvgBytesPerWrite_Base gets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest sets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgDataBytesPerRequest(value uint64) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest", (value)) +} + +// GetAvgDataBytesPerRequest gets the value of AvgDataBytesPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgDataBytesPerRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDataBytesPerRequest_Base sets the value of AvgDataBytesPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgDataBytesPerRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgDataBytesPerRequest_Base", (value)) +} + +// GetAvgDataBytesPerRequest_Base gets the value of AvgDataBytesPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgDataBytesPerRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDataBytesPerRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDataQueueLength sets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgDataQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDataQueueLength", (value)) +} + +// GetAvgDataQueueLength gets the value of AvgDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerDataRequest sets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerDataRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest", (value)) +} + +// GetAvgsecPerDataRequest gets the value of AvgsecPerDataRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerDataRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerDataRequest_Base sets the value of AvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerDataRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerDataRequest_Base", (value)) +} + +// GetAvgsecPerDataRequest_Base gets the value of AvgsecPerDataRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerDataRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerDataRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead_Base sets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead_Base", (value)) +} + +// GetAvgsecPerRead_Base gets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest sets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest", (value)) +} + +// GetAvgsecPerRequest gets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest_Base sets the value of AvgsecPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest_Base", (value)) +} + +// GetAvgsecPerRequest_Base gets the value of AvgsecPerRequest_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite_Base sets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgsecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite_Base", (value)) +} + +// GetAvgsecPerWrite_Base gets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgsecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentBypassOpenFileCount sets the value of CurrentBypassOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyCurrentBypassOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentBypassOpenFileCount", (value)) +} + +// GetCurrentBypassOpenFileCount gets the value of CurrentBypassOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyCurrentBypassOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentBypassOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDataQueueLength sets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyCurrentDataQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentDataQueueLength", (value)) +} + +// GetCurrentDataQueueLength gets the value of CurrentDataQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyCurrentDataQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDataQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDurableOpenFileCount sets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyCurrentDurableOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentDurableOpenFileCount", (value)) +} + +// GetCurrentDurableOpenFileCount gets the value of CurrentDurableOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyCurrentDurableOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentDurableOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentOpenFileCount sets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyCurrentOpenFileCount(value uint64) (err error) { + return instance.SetProperty("CurrentOpenFileCount", (value)) +} + +// GetCurrentOpenFileCount gets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyCurrentOpenFileCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPendingRequests sets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyCurrentPendingRequests(value uint64) (err error) { + return instance.SetProperty("CurrentPendingRequests", (value)) +} + +// GetCurrentPendingRequests gets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyCurrentPendingRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPendingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataBytesPersec sets the value of DataBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyDataBytesPersec(value uint64) (err error) { + return instance.SetProperty("DataBytesPersec", (value)) +} + +// GetDataBytesPersec gets the value of DataBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyDataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDataRequestsPersec sets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyDataRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DataRequestsPersec", (value)) +} + +// GetDataRequestsPersec gets the value of DataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyDataRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpenedPersec sets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyFilesOpenedPersec(value uint64) (err error) { + return instance.SetProperty("FilesOpenedPersec", (value)) +} + +// GetFilesOpenedPersec gets the value of FilesOpenedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyFilesOpenedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesOpenedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataRequestsPersec sets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyMetadataRequestsPersec(value uint64) (err error) { + return instance.SetProperty("MetadataRequestsPersec", (value)) +} + +// GetMetadataRequestsPersec gets the value of MetadataRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyMetadataRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPersistentHandles sets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyPercentPersistentHandles(value uint64) (err error) { + return instance.SetProperty("PercentPersistentHandles", (value)) +} + +// GetPercentPersistentHandles gets the value of PercentPersistentHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyPercentPersistentHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPersistentHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPersistentHandles_Base sets the value of PercentPersistentHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyPercentPersistentHandles_Base(value uint64) (err error) { + return instance.SetProperty("PercentPersistentHandles_Base", (value)) +} + +// GetPercentPersistentHandles_Base gets the value of PercentPersistentHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyPercentPersistentHandles_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPersistentHandles_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentResilientHandles sets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyPercentResilientHandles(value uint64) (err error) { + return instance.SetProperty("PercentResilientHandles", (value)) +} + +// GetPercentResilientHandles gets the value of PercentResilientHandles for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyPercentResilientHandles() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentResilientHandles_Base sets the value of PercentResilientHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyPercentResilientHandles_Base(value uint64) (err error) { + return instance.SetProperty("PercentResilientHandles_Base", (value)) +} + +// GetPercentResilientHandles_Base gets the value of PercentResilientHandles_Base for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyPercentResilientHandles_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentResilientHandles_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytestransmittedByPassCSVPersec sets the value of ReadBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReadBytestransmittedByPassCSVPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytestransmittedByPassCSVPersec", (value)) +} + +// GetReadBytestransmittedByPassCSVPersec gets the value of ReadBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReadBytestransmittedByPassCSVPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytestransmittedByPassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytestransmittedviaSMBDirectPersec sets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReadBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetReadBytestransmittedviaSMBDirectPersec gets the value of ReadBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReadBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequeststransmittedviaBypassCSVPersec sets the value of ReadRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReadRequeststransmittedviaBypassCSVPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequeststransmittedviaBypassCSVPersec", (value)) +} + +// GetReadRequeststransmittedviaBypassCSVPersec gets the value of ReadRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReadRequeststransmittedviaBypassCSVPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequeststransmittedviaBypassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequeststransmittedviaSMBDirectPersec sets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReadRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetReadRequeststransmittedviaSMBDirectPersec gets the value of ReadRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReadRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedBytesPersec sets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyReceivedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedBytesPersec", (value)) +} + +// GetReceivedBytesPersec gets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyReceivedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestsPersec sets the value of RequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyRequestsPersec(value uint64) (err error) { + return instance.SetProperty("RequestsPersec", (value)) +} + +// GetRequestsPersec gets the value of RequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyRequestsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentBytesPersec sets the value of SentBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertySentBytesPersec(value uint64) (err error) { + return instance.SetProperty("SentBytesPersec", (value)) +} + +// GetSentBytesPersec gets the value of SentBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertySentBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalDurableHandleReopenCount sets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalDurableHandleReopenCount", (value)) +} + +// GetTotalDurableHandleReopenCount gets the value of TotalDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedDurableHandleReopenCount sets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalFailedDurableHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedDurableHandleReopenCount", (value)) +} + +// GetTotalFailedDurableHandleReopenCount gets the value of TotalFailedDurableHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalFailedDurableHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedDurableHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedPersistentHandleReopenCount sets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalFailedPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedPersistentHandleReopenCount", (value)) +} + +// GetTotalFailedPersistentHandleReopenCount gets the value of TotalFailedPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalFailedPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFailedResilientHandleReopenCount sets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalFailedResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalFailedResilientHandleReopenCount", (value)) +} + +// GetTotalFailedResilientHandleReopenCount gets the value of TotalFailedResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalFailedResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFailedResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalFileOpenCount sets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalFileOpenCount(value uint64) (err error) { + return instance.SetProperty("TotalFileOpenCount", (value)) +} + +// GetTotalFileOpenCount gets the value of TotalFileOpenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalFileOpenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalFileOpenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPersistentHandleReopenCount sets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalPersistentHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalPersistentHandleReopenCount", (value)) +} + +// GetTotalPersistentHandleReopenCount gets the value of TotalPersistentHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalPersistentHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPersistentHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalResilientHandleReopenCount sets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTotalResilientHandleReopenCount(value uint64) (err error) { + return instance.SetProperty("TotalResilientHandleReopenCount", (value)) +} + +// GetTotalResilientHandleReopenCount gets the value of TotalResilientHandleReopenCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTotalResilientHandleReopenCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalResilientHandleReopenCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferredBytesPersec sets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTransferredBytesPersec(value uint64) (err error) { + return instance.SetProperty("TransferredBytesPersec", (value)) +} + +// GetTransferredBytesPersec gets the value of TransferredBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTransferredBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferredBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeConnectCount sets the value of TreeConnectCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyTreeConnectCount(value uint64) (err error) { + return instance.SetProperty("TreeConnectCount", (value)) +} + +// GetTreeConnectCount gets the value of TreeConnectCount for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyTreeConnectCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TreeConnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytestransmittedByPassCSVPersec sets the value of WriteBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyWriteBytestransmittedByPassCSVPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytestransmittedByPassCSVPersec", (value)) +} + +// GetWriteBytestransmittedByPassCSVPersec gets the value of WriteBytestransmittedByPassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyWriteBytestransmittedByPassCSVPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytestransmittedByPassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytestransmittedviaSMBDirectPersec sets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyWriteBytestransmittedviaSMBDirectPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytestransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteBytestransmittedviaSMBDirectPersec gets the value of WriteBytestransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyWriteBytestransmittedviaSMBDirectPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytestransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequeststransmittedviaBypassCSVPersec sets the value of WriteRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyWriteRequeststransmittedviaBypassCSVPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequeststransmittedviaBypassCSVPersec", (value)) +} + +// GetWriteRequeststransmittedviaBypassCSVPersec gets the value of WriteRequeststransmittedviaBypassCSVPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyWriteRequeststransmittedviaBypassCSVPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequeststransmittedviaBypassCSVPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequeststransmittedviaSMBDirectPersec sets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) SetPropertyWriteRequeststransmittedviaSMBDirectPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequeststransmittedviaSMBDirectPersec", (value)) +} + +// GetWriteRequeststransmittedviaSMBDirectPersec gets the value of WriteRequeststransmittedviaSMBDirectPersec for the instance +func (instance *Win32_PerfRawData_Counters_SMBServerShares) GetPropertyWriteRequeststransmittedviaSMBDirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequeststransmittedviaSMBDirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecurityPerProcessStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecurityPerProcessStatistics.go new file mode 100644 index 00000000..023f3099 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecurityPerProcessStatistics.go @@ -0,0 +1,90 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_Counters_SecurityPerProcessStatistics struct +type Win32_PerfRawData_Counters_SecurityPerProcessStatistics struct { + *Win32_PerfRawData + + // + ContextHandles uint32 + + // + CredentialHandles uint32 +} + +func NewWin32_PerfRawData_Counters_SecurityPerProcessStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SecurityPerProcessStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SecurityPerProcessStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SecurityPerProcessStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetContextHandles sets the value of ContextHandles for the instance +func (instance *Win32_PerfRawData_Counters_SecurityPerProcessStatistics) SetPropertyContextHandles(value uint32) (err error) { + return instance.SetProperty("ContextHandles", value) +} + +// GetContextHandles gets the value of ContextHandles for the instance +func (instance *Win32_PerfRawData_Counters_SecurityPerProcessStatistics) GetPropertyContextHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextHandles") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetCredentialHandles sets the value of CredentialHandles for the instance +func (instance *Win32_PerfRawData_Counters_SecurityPerProcessStatistics) SetPropertyCredentialHandles(value uint32) (err error) { + return instance.SetProperty("CredentialHandles", value) +} + +// GetCredentialHandles gets the value of CredentialHandles for the instance +func (instance *Win32_PerfRawData_Counters_SecurityPerProcessStatistics) GetPropertyCredentialHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("CredentialHandles") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecuritySystemWideStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecuritySystemWideStatistics.go new file mode 100644 index 00000000..c0424547 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SecuritySystemWideStatistics.go @@ -0,0 +1,468 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_Counters_SecuritySystemWideStatistics struct +type Win32_PerfRawData_Counters_SecuritySystemWideStatistics struct { + *Win32_PerfRawData + + // + ActiveSchannelSessionCacheEntries uint32 + + // + DigestAuthentications uint32 + + // + ForwardedKerberosRequests uint32 + + // + KDCarmoredASRequests uint32 + + // + KDCarmoredTGSRequests uint32 + + // + KDCASRequests uint32 + + // + KDCclaimsawareASRequests uint32 + + // + KDCclaimsawareserviceassertedidentityTGSrequests uint32 + + // + KDCclaimsawareTGSRequests uint32 + + // + KDCclassictypeconstraineddelegationTGSRequests uint32 + + // + KDCkeytrustASRequests uint32 + + // + KDCresourcetypeconstraineddelegationTGSRequests uint32 + + // + KDCTGSRequests uint32 + + // + KerberosAuthentications uint32 + + // + NTLMAuthentications uint32 + + // + SchannelSessionCacheEntries uint32 + + // + SSLClientSideFullHandshakes uint32 + + // + SSLClientSideReconnectHandshakes uint32 + + // + SSLServerSideFullHandshakes uint32 + + // + SSLServerSideReconnectHandshakes uint32 +} + +func NewWin32_PerfRawData_Counters_SecuritySystemWideStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SecuritySystemWideStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SecuritySystemWideStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SecuritySystemWideStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveSchannelSessionCacheEntries sets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyActiveSchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("ActiveSchannelSessionCacheEntries", value) +} + +// GetActiveSchannelSessionCacheEntries gets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyActiveSchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSchannelSessionCacheEntries") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetDigestAuthentications sets the value of DigestAuthentications for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyDigestAuthentications(value uint32) (err error) { + return instance.SetProperty("DigestAuthentications", value) +} + +// GetDigestAuthentications gets the value of DigestAuthentications for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyDigestAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("DigestAuthentications") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetForwardedKerberosRequests sets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyForwardedKerberosRequests(value uint32) (err error) { + return instance.SetProperty("ForwardedKerberosRequests", value) +} + +// GetForwardedKerberosRequests gets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyForwardedKerberosRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("ForwardedKerberosRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCarmoredASRequests sets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCarmoredASRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredASRequests", value) +} + +// GetKDCarmoredASRequests gets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCarmoredASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCarmoredTGSRequests sets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCarmoredTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredTGSRequests", value) +} + +// GetKDCarmoredTGSRequests gets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCarmoredTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCASRequests sets the value of KDCASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCASRequests(value uint32) (err error) { + return instance.SetProperty("KDCASRequests", value) +} + +// GetKDCASRequests gets the value of KDCASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclaimsawareASRequests sets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareASRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareASRequests", value) +} + +// GetKDCclaimsawareASRequests gets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclaimsawareserviceassertedidentityTGSrequests sets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareserviceassertedidentityTGSrequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareserviceassertedidentityTGSrequests", value) +} + +// GetKDCclaimsawareserviceassertedidentityTGSrequests gets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareserviceassertedidentityTGSrequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareserviceassertedidentityTGSrequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclaimsawareTGSRequests sets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareTGSRequests", value) +} + +// GetKDCclaimsawareTGSRequests gets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCclassictypeconstraineddelegationTGSRequests sets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCclassictypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclassictypeconstraineddelegationTGSRequests", value) +} + +// GetKDCclassictypeconstraineddelegationTGSRequests gets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCclassictypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclassictypeconstraineddelegationTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCkeytrustASRequests sets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCkeytrustASRequests(value uint32) (err error) { + return instance.SetProperty("KDCkeytrustASRequests", value) +} + +// GetKDCkeytrustASRequests gets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCkeytrustASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCkeytrustASRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCresourcetypeconstraineddelegationTGSRequests sets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCresourcetypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCresourcetypeconstraineddelegationTGSRequests", value) +} + +// GetKDCresourcetypeconstraineddelegationTGSRequests gets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCresourcetypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCresourcetypeconstraineddelegationTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKDCTGSRequests sets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKDCTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCTGSRequests", value) +} + +// GetKDCTGSRequests gets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKDCTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCTGSRequests") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetKerberosAuthentications sets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyKerberosAuthentications(value uint32) (err error) { + return instance.SetProperty("KerberosAuthentications", value) +} + +// GetKerberosAuthentications gets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyKerberosAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("KerberosAuthentications") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetNTLMAuthentications sets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertyNTLMAuthentications(value uint32) (err error) { + return instance.SetProperty("NTLMAuthentications", value) +} + +// GetNTLMAuthentications gets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertyNTLMAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("NTLMAuthentications") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSchannelSessionCacheEntries sets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertySchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("SchannelSessionCacheEntries", value) +} + +// GetSchannelSessionCacheEntries gets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertySchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SchannelSessionCacheEntries") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLClientSideFullHandshakes sets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertySSLClientSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideFullHandshakes", value) +} + +// GetSSLClientSideFullHandshakes gets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertySSLClientSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideFullHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLClientSideReconnectHandshakes sets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertySSLClientSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideReconnectHandshakes", value) +} + +// GetSSLClientSideReconnectHandshakes gets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertySSLClientSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideReconnectHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLServerSideFullHandshakes sets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertySSLServerSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideFullHandshakes", value) +} + +// GetSSLServerSideFullHandshakes gets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertySSLServerSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideFullHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} + +// SetSSLServerSideReconnectHandshakes sets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) SetPropertySSLServerSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideReconnectHandshakes", value) +} + +// GetSSLServerSideReconnectHandshakes gets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Counters_SecuritySystemWideStatistics) GetPropertySSLServerSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideReconnectHandshakes") + if err != nil { + return + } + value, ok := retValue.(uint32) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterFlow.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterFlow.go new file mode 100644 index 00000000..d218faac --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterFlow.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_StorageQoSFilterFlow struct +type Win32_PerfRawData_Counters_StorageQoSFilterFlow struct { + *Win32_PerfRawData + + // + AvgBandwidth uint64 + + // + AvgDeviceQueueLength uint64 + + // + AvgIOQuotaReplenishmentOperationsPersec uint64 + + // + AvgNormalizedIOPS uint64 + + // + AvgSchedulerQueueLength uint64 + + // + MaximumBandwidth uint64 + + // + NormalizedMaximumIORate uint64 + + // + NormalizedMinimumIORate uint64 + + // + TotalBandwidthquotaIncrementPersec uint64 + + // + TotalNormalizedIOQuotaIncrement uint64 +} + +func NewWin32_PerfRawData_Counters_StorageQoSFilterFlowEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_StorageQoSFilterFlow, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageQoSFilterFlow{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_StorageQoSFilterFlowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_StorageQoSFilterFlow, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageQoSFilterFlow{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBandwidth sets the value of AvgBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyAvgBandwidth(value uint64) (err error) { + return instance.SetProperty("AvgBandwidth", (value)) +} + +// GetAvgBandwidth gets the value of AvgBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyAvgBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDeviceQueueLength sets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyAvgDeviceQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDeviceQueueLength", (value)) +} + +// GetAvgDeviceQueueLength gets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyAvgDeviceQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDeviceQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgIOQuotaReplenishmentOperationsPersec sets the value of AvgIOQuotaReplenishmentOperationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyAvgIOQuotaReplenishmentOperationsPersec(value uint64) (err error) { + return instance.SetProperty("AvgIOQuotaReplenishmentOperationsPersec", (value)) +} + +// GetAvgIOQuotaReplenishmentOperationsPersec gets the value of AvgIOQuotaReplenishmentOperationsPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyAvgIOQuotaReplenishmentOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgIOQuotaReplenishmentOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgNormalizedIOPS sets the value of AvgNormalizedIOPS for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyAvgNormalizedIOPS(value uint64) (err error) { + return instance.SetProperty("AvgNormalizedIOPS", (value)) +} + +// GetAvgNormalizedIOPS gets the value of AvgNormalizedIOPS for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyAvgNormalizedIOPS() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgNormalizedIOPS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgSchedulerQueueLength sets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyAvgSchedulerQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgSchedulerQueueLength", (value)) +} + +// GetAvgSchedulerQueueLength gets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyAvgSchedulerQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgSchedulerQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaximumBandwidth sets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyMaximumBandwidth(value uint64) (err error) { + return instance.SetProperty("MaximumBandwidth", (value)) +} + +// GetMaximumBandwidth gets the value of MaximumBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyMaximumBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("MaximumBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedMaximumIORate sets the value of NormalizedMaximumIORate for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyNormalizedMaximumIORate(value uint64) (err error) { + return instance.SetProperty("NormalizedMaximumIORate", (value)) +} + +// GetNormalizedMaximumIORate gets the value of NormalizedMaximumIORate for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyNormalizedMaximumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedMaximumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedMinimumIORate sets the value of NormalizedMinimumIORate for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyNormalizedMinimumIORate(value uint64) (err error) { + return instance.SetProperty("NormalizedMinimumIORate", (value)) +} + +// GetNormalizedMinimumIORate gets the value of NormalizedMinimumIORate for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyNormalizedMinimumIORate() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedMinimumIORate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBandwidthquotaIncrementPersec sets the value of TotalBandwidthquotaIncrementPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyTotalBandwidthquotaIncrementPersec(value uint64) (err error) { + return instance.SetProperty("TotalBandwidthquotaIncrementPersec", (value)) +} + +// GetTotalBandwidthquotaIncrementPersec gets the value of TotalBandwidthquotaIncrementPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyTotalBandwidthquotaIncrementPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBandwidthquotaIncrementPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalNormalizedIOQuotaIncrement sets the value of TotalNormalizedIOQuotaIncrement for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) SetPropertyTotalNormalizedIOQuotaIncrement(value uint64) (err error) { + return instance.SetProperty("TotalNormalizedIOQuotaIncrement", (value)) +} + +// GetTotalNormalizedIOQuotaIncrement gets the value of TotalNormalizedIOQuotaIncrement for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterFlow) GetPropertyTotalNormalizedIOQuotaIncrement() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalNormalizedIOQuotaIncrement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterVolume.go new file mode 100644 index 00000000..c584f59f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageQoSFilterVolume.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_StorageQoSFilterVolume struct +type Win32_PerfRawData_Counters_StorageQoSFilterVolume struct { + *Win32_PerfRawData + + // + AllocationQuantum uint64 + + // + AvgBandwidth uint64 + + // + AvgDeviceLatency uint64 + + // + AvgDeviceQueueLength uint64 + + // + AvgIOCost uint64 + + // + AvgNormalizedIOCost uint64 + + // + AvgSchedulerQueueLength uint64 + + // + CongestionThreshold uint64 + + // + DelayedCost uint64 + + // + EstimatedCapacity uint64 + + // + FlowSwitchCost uint64 + + // + IssuedCost uint64 + + // + LatencyTarget uint64 + + // + LowerThreshold uint64 + + // + NormalizedThroughput uint64 + + // + OverheadCost uint64 + + // + SectorCost uint64 + + // + SeekCost uint64 +} + +func NewWin32_PerfRawData_Counters_StorageQoSFilterVolumeEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_StorageQoSFilterVolume, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageQoSFilterVolume{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_StorageQoSFilterVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_StorageQoSFilterVolume, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageQoSFilterVolume{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAllocationQuantum sets the value of AllocationQuantum for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAllocationQuantum(value uint64) (err error) { + return instance.SetProperty("AllocationQuantum", (value)) +} + +// GetAllocationQuantum gets the value of AllocationQuantum for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAllocationQuantum() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationQuantum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBandwidth sets the value of AvgBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAvgBandwidth(value uint64) (err error) { + return instance.SetProperty("AvgBandwidth", (value)) +} + +// GetAvgBandwidth gets the value of AvgBandwidth for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAvgBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDeviceLatency sets the value of AvgDeviceLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAvgDeviceLatency(value uint64) (err error) { + return instance.SetProperty("AvgDeviceLatency", (value)) +} + +// GetAvgDeviceLatency gets the value of AvgDeviceLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAvgDeviceLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDeviceLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDeviceQueueLength sets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAvgDeviceQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDeviceQueueLength", (value)) +} + +// GetAvgDeviceQueueLength gets the value of AvgDeviceQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAvgDeviceQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDeviceQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgIOCost sets the value of AvgIOCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAvgIOCost(value uint64) (err error) { + return instance.SetProperty("AvgIOCost", (value)) +} + +// GetAvgIOCost gets the value of AvgIOCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAvgIOCost() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgIOCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgNormalizedIOCost sets the value of AvgNormalizedIOCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAvgNormalizedIOCost(value uint64) (err error) { + return instance.SetProperty("AvgNormalizedIOCost", (value)) +} + +// GetAvgNormalizedIOCost gets the value of AvgNormalizedIOCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAvgNormalizedIOCost() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgNormalizedIOCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgSchedulerQueueLength sets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyAvgSchedulerQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgSchedulerQueueLength", (value)) +} + +// GetAvgSchedulerQueueLength gets the value of AvgSchedulerQueueLength for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyAvgSchedulerQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgSchedulerQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCongestionThreshold sets the value of CongestionThreshold for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyCongestionThreshold(value uint64) (err error) { + return instance.SetProperty("CongestionThreshold", (value)) +} + +// GetCongestionThreshold gets the value of CongestionThreshold for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyCongestionThreshold() (value uint64, err error) { + retValue, err := instance.GetProperty("CongestionThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDelayedCost sets the value of DelayedCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyDelayedCost(value uint64) (err error) { + return instance.SetProperty("DelayedCost", (value)) +} + +// GetDelayedCost gets the value of DelayedCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyDelayedCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DelayedCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEstimatedCapacity sets the value of EstimatedCapacity for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyEstimatedCapacity(value uint64) (err error) { + return instance.SetProperty("EstimatedCapacity", (value)) +} + +// GetEstimatedCapacity gets the value of EstimatedCapacity for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyEstimatedCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("EstimatedCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlowSwitchCost sets the value of FlowSwitchCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyFlowSwitchCost(value uint64) (err error) { + return instance.SetProperty("FlowSwitchCost", (value)) +} + +// GetFlowSwitchCost gets the value of FlowSwitchCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyFlowSwitchCost() (value uint64, err error) { + retValue, err := instance.GetProperty("FlowSwitchCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIssuedCost sets the value of IssuedCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyIssuedCost(value uint64) (err error) { + return instance.SetProperty("IssuedCost", (value)) +} + +// GetIssuedCost gets the value of IssuedCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyIssuedCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IssuedCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLatencyTarget sets the value of LatencyTarget for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyLatencyTarget(value uint64) (err error) { + return instance.SetProperty("LatencyTarget", (value)) +} + +// GetLatencyTarget gets the value of LatencyTarget for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyLatencyTarget() (value uint64, err error) { + retValue, err := instance.GetProperty("LatencyTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLowerThreshold sets the value of LowerThreshold for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyLowerThreshold(value uint64) (err error) { + return instance.SetProperty("LowerThreshold", (value)) +} + +// GetLowerThreshold gets the value of LowerThreshold for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyLowerThreshold() (value uint64, err error) { + retValue, err := instance.GetProperty("LowerThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNormalizedThroughput sets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyNormalizedThroughput(value uint64) (err error) { + return instance.SetProperty("NormalizedThroughput", (value)) +} + +// GetNormalizedThroughput gets the value of NormalizedThroughput for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyNormalizedThroughput() (value uint64, err error) { + retValue, err := instance.GetProperty("NormalizedThroughput") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOverheadCost sets the value of OverheadCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertyOverheadCost(value uint64) (err error) { + return instance.SetProperty("OverheadCost", (value)) +} + +// GetOverheadCost gets the value of OverheadCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertyOverheadCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OverheadCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSectorCost sets the value of SectorCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertySectorCost(value uint64) (err error) { + return instance.SetProperty("SectorCost", (value)) +} + +// GetSectorCost gets the value of SectorCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertySectorCost() (value uint64, err error) { + retValue, err := instance.GetProperty("SectorCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSeekCost sets the value of SeekCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) SetPropertySeekCost(value uint64) (err error) { + return instance.SetProperty("SeekCost", (value)) +} + +// GetSeekCost gets the value of SeekCost for the instance +func (instance *Win32_PerfRawData_Counters_StorageQoSFilterVolume) GetPropertySeekCost() (value uint64, err error) { + retValue, err := instance.GetProperty("SeekCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesDrt.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesDrt.go new file mode 100644 index 00000000..a55deab8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesDrt.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_StorageSpacesDrt struct +type Win32_PerfRawData_Counters_StorageSpacesDrt struct { + *Win32_PerfRawData + + // + CleanBytes uint64 + + // + CleanCandidateBytes uint64 + + // + CleanCandidateCount uint64 + + // + CleanCount uint64 + + // + DirtyBytes uint64 + + // + DirtyCount uint64 + + // + FlushingBytes uint64 + + // + FlushingCount uint64 + + // + Limit uint32 + + // + LockedBytes uint64 + + // + LockedCount uint64 + + // + NotTrackingBytes uint64 + + // + NotTrackingCount uint64 + + // + Status uint32 + + // + SynchronizingBytes uint64 + + // + SynchronizingCount uint64 +} + +func NewWin32_PerfRawData_Counters_StorageSpacesDrtEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_StorageSpacesDrt, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesDrt{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_StorageSpacesDrtEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_StorageSpacesDrt, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesDrt{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCleanBytes sets the value of CleanBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyCleanBytes(value uint64) (err error) { + return instance.SetProperty("CleanBytes", (value)) +} + +// GetCleanBytes gets the value of CleanBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyCleanBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanCandidateBytes sets the value of CleanCandidateBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyCleanCandidateBytes(value uint64) (err error) { + return instance.SetProperty("CleanCandidateBytes", (value)) +} + +// GetCleanCandidateBytes gets the value of CleanCandidateBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyCleanCandidateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanCandidateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanCandidateCount sets the value of CleanCandidateCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyCleanCandidateCount(value uint64) (err error) { + return instance.SetProperty("CleanCandidateCount", (value)) +} + +// GetCleanCandidateCount gets the value of CleanCandidateCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyCleanCandidateCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanCandidateCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCleanCount sets the value of CleanCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyCleanCount(value uint64) (err error) { + return instance.SetProperty("CleanCount", (value)) +} + +// GetCleanCount gets the value of CleanCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyCleanCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CleanCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyBytes sets the value of DirtyBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyDirtyBytes(value uint64) (err error) { + return instance.SetProperty("DirtyBytes", (value)) +} + +// GetDirtyBytes gets the value of DirtyBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyDirtyBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyCount sets the value of DirtyCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyDirtyCount(value uint64) (err error) { + return instance.SetProperty("DirtyCount", (value)) +} + +// GetDirtyCount gets the value of DirtyCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyDirtyCount() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushingBytes sets the value of FlushingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyFlushingBytes(value uint64) (err error) { + return instance.SetProperty("FlushingBytes", (value)) +} + +// GetFlushingBytes gets the value of FlushingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyFlushingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushingCount sets the value of FlushingCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyFlushingCount(value uint64) (err error) { + return instance.SetProperty("FlushingCount", (value)) +} + +// GetFlushingCount gets the value of FlushingCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyFlushingCount() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushingCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLimit sets the value of Limit for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyLimit(value uint32) (err error) { + return instance.SetProperty("Limit", (value)) +} + +// GetLimit gets the value of Limit for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("Limit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockedBytes sets the value of LockedBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyLockedBytes(value uint64) (err error) { + return instance.SetProperty("LockedBytes", (value)) +} + +// GetLockedBytes gets the value of LockedBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyLockedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LockedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLockedCount sets the value of LockedCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyLockedCount(value uint64) (err error) { + return instance.SetProperty("LockedCount", (value)) +} + +// GetLockedCount gets the value of LockedCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyLockedCount() (value uint64, err error) { + retValue, err := instance.GetProperty("LockedCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotTrackingBytes sets the value of NotTrackingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyNotTrackingBytes(value uint64) (err error) { + return instance.SetProperty("NotTrackingBytes", (value)) +} + +// GetNotTrackingBytes gets the value of NotTrackingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyNotTrackingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("NotTrackingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNotTrackingCount sets the value of NotTrackingCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyNotTrackingCount(value uint64) (err error) { + return instance.SetProperty("NotTrackingCount", (value)) +} + +// GetNotTrackingCount gets the value of NotTrackingCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyNotTrackingCount() (value uint64, err error) { + retValue, err := instance.GetProperty("NotTrackingCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertyStatus(value uint32) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertyStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSynchronizingBytes sets the value of SynchronizingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertySynchronizingBytes(value uint64) (err error) { + return instance.SetProperty("SynchronizingBytes", (value)) +} + +// GetSynchronizingBytes gets the value of SynchronizingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertySynchronizingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SynchronizingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSynchronizingCount sets the value of SynchronizingCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) SetPropertySynchronizingCount(value uint64) (err error) { + return instance.SetProperty("SynchronizingCount", (value)) +} + +// GetSynchronizingCount gets the value of SynchronizingCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesDrt) GetPropertySynchronizingCount() (value uint64, err error) { + retValue, err := instance.GetProperty("SynchronizingCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesTier.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesTier.go new file mode 100644 index 00000000..2d10384e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesTier.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_StorageSpacesTier struct +type Win32_PerfRawData_Counters_StorageSpacesTier struct { + *Win32_PerfRawData + + // + TierReadBytesAverage uint64 + + // + TierReadBytesAverage_Base uint32 + + // + TierReadBytesPersec uint64 + + // + TierReadLatency uint32 + + // + TierReadLatency_Base uint32 + + // + TierReadsAverage uint64 + + // + TierReadsPersec uint64 + + // + TierTransferBytesAverage uint64 + + // + TierTransferBytesAverage_Base uint32 + + // + TierTransferBytesPersec uint64 + + // + TierTransferLatency uint32 + + // + TierTransferLatency_Base uint32 + + // + TierTransfersAverage uint64 + + // + TierTransfersCurrent uint32 + + // + TierTransfersPersec uint64 + + // + TierWriteBytesAverage uint64 + + // + TierWriteBytesAverage_Base uint32 + + // + TierWriteBytesPersec uint64 + + // + TierWriteLatency uint32 + + // + TierWriteLatency_Base uint32 + + // + TierWritesAverage uint64 + + // + TierWritesPersec uint64 +} + +func NewWin32_PerfRawData_Counters_StorageSpacesTierEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_StorageSpacesTier, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesTier{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_StorageSpacesTierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_StorageSpacesTier, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesTier{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTierReadBytesAverage sets the value of TierReadBytesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadBytesAverage(value uint64) (err error) { + return instance.SetProperty("TierReadBytesAverage", (value)) +} + +// GetTierReadBytesAverage gets the value of TierReadBytesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadBytesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadBytesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierReadBytesAverage_Base sets the value of TierReadBytesAverage_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadBytesAverage_Base(value uint32) (err error) { + return instance.SetProperty("TierReadBytesAverage_Base", (value)) +} + +// GetTierReadBytesAverage_Base gets the value of TierReadBytesAverage_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadBytesAverage_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TierReadBytesAverage_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierReadBytesPersec sets the value of TierReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("TierReadBytesPersec", (value)) +} + +// GetTierReadBytesPersec gets the value of TierReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierReadLatency sets the value of TierReadLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadLatency(value uint32) (err error) { + return instance.SetProperty("TierReadLatency", (value)) +} + +// GetTierReadLatency gets the value of TierReadLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TierReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierReadLatency_Base sets the value of TierReadLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("TierReadLatency_Base", (value)) +} + +// GetTierReadLatency_Base gets the value of TierReadLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TierReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierReadsAverage sets the value of TierReadsAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadsAverage(value uint64) (err error) { + return instance.SetProperty("TierReadsAverage", (value)) +} + +// GetTierReadsAverage gets the value of TierReadsAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadsAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadsAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierReadsPersec sets the value of TierReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierReadsPersec(value uint64) (err error) { + return instance.SetProperty("TierReadsPersec", (value)) +} + +// GetTierReadsPersec gets the value of TierReadsPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransferBytesAverage sets the value of TierTransferBytesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransferBytesAverage(value uint64) (err error) { + return instance.SetProperty("TierTransferBytesAverage", (value)) +} + +// GetTierTransferBytesAverage gets the value of TierTransferBytesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransferBytesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransferBytesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransferBytesAverage_Base sets the value of TierTransferBytesAverage_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransferBytesAverage_Base(value uint32) (err error) { + return instance.SetProperty("TierTransferBytesAverage_Base", (value)) +} + +// GetTierTransferBytesAverage_Base gets the value of TierTransferBytesAverage_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransferBytesAverage_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TierTransferBytesAverage_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierTransferBytesPersec sets the value of TierTransferBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransferBytesPersec(value uint64) (err error) { + return instance.SetProperty("TierTransferBytesPersec", (value)) +} + +// GetTierTransferBytesPersec gets the value of TierTransferBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransferBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransferBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransferLatency sets the value of TierTransferLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransferLatency(value uint32) (err error) { + return instance.SetProperty("TierTransferLatency", (value)) +} + +// GetTierTransferLatency gets the value of TierTransferLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransferLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TierTransferLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierTransferLatency_Base sets the value of TierTransferLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransferLatency_Base(value uint32) (err error) { + return instance.SetProperty("TierTransferLatency_Base", (value)) +} + +// GetTierTransferLatency_Base gets the value of TierTransferLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransferLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TierTransferLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierTransfersAverage sets the value of TierTransfersAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransfersAverage(value uint64) (err error) { + return instance.SetProperty("TierTransfersAverage", (value)) +} + +// GetTierTransfersAverage gets the value of TierTransfersAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransfersAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransfersAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierTransfersCurrent sets the value of TierTransfersCurrent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransfersCurrent(value uint32) (err error) { + return instance.SetProperty("TierTransfersCurrent", (value)) +} + +// GetTierTransfersCurrent gets the value of TierTransfersCurrent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransfersCurrent() (value uint32, err error) { + retValue, err := instance.GetProperty("TierTransfersCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierTransfersPersec sets the value of TierTransfersPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierTransfersPersec(value uint64) (err error) { + return instance.SetProperty("TierTransfersPersec", (value)) +} + +// GetTierTransfersPersec gets the value of TierTransfersPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierTransfersPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWriteBytesAverage sets the value of TierWriteBytesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWriteBytesAverage(value uint64) (err error) { + return instance.SetProperty("TierWriteBytesAverage", (value)) +} + +// GetTierWriteBytesAverage gets the value of TierWriteBytesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWriteBytesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWriteBytesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWriteBytesAverage_Base sets the value of TierWriteBytesAverage_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWriteBytesAverage_Base(value uint32) (err error) { + return instance.SetProperty("TierWriteBytesAverage_Base", (value)) +} + +// GetTierWriteBytesAverage_Base gets the value of TierWriteBytesAverage_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWriteBytesAverage_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TierWriteBytesAverage_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierWriteBytesPersec sets the value of TierWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("TierWriteBytesPersec", (value)) +} + +// GetTierWriteBytesPersec gets the value of TierWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWriteLatency sets the value of TierWriteLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWriteLatency(value uint32) (err error) { + return instance.SetProperty("TierWriteLatency", (value)) +} + +// GetTierWriteLatency gets the value of TierWriteLatency for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TierWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierWriteLatency_Base sets the value of TierWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("TierWriteLatency_Base", (value)) +} + +// GetTierWriteLatency_Base gets the value of TierWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TierWriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTierWritesAverage sets the value of TierWritesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWritesAverage(value uint64) (err error) { + return instance.SetProperty("TierWritesAverage", (value)) +} + +// GetTierWritesAverage gets the value of TierWritesAverage for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWritesAverage() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWritesAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierWritesPersec sets the value of TierWritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) SetPropertyTierWritesPersec(value uint64) (err error) { + return instance.SetProperty("TierWritesPersec", (value)) +} + +// GetTierWritesPersec gets the value of TierWritesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesTier) GetPropertyTierWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TierWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesVirtualDisk.go new file mode 100644 index 00000000..0c0b2344 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesVirtualDisk.go @@ -0,0 +1,1670 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_StorageSpacesVirtualDisk struct +type Win32_PerfRawData_Counters_StorageSpacesVirtualDisk struct { + *Win32_PerfRawData + + // + VirtualDiskActive uint64 + + // + VirtualDiskActiveBytes uint64 + + // + VirtualDiskFailedReplacementBytes uint64 + + // + VirtualDiskFailedReplacementCount uint64 + + // + VirtualDiskMissing uint64 + + // + VirtualDiskMissingBytes uint64 + + // + VirtualDiskNeedReallocation uint64 + + // + VirtualDiskNeedReallocationBytes uint64 + + // + VirtualDiskNeedRegeneration uint64 + + // + VirtualDiskNeedRegenerationBytes uint64 + + // + VirtualDiskPendingDeletion uint64 + + // + VirtualDiskPendingDeletionBytes uint64 + + // + VirtualDiskReasonFailure uint64 + + // + VirtualDiskReasonFailureBytes uint64 + + // + VirtualDiskReasonHardwareError uint64 + + // + VirtualDiskReasonHardwareErrorBytes uint64 + + // + VirtualDiskReasonIoError uint64 + + // + VirtualDiskReasonIoErrorBytes uint64 + + // + VirtualDiskReasonMissing uint64 + + // + VirtualDiskReasonMissingBytes uint64 + + // + VirtualDiskReasonNew uint64 + + // + VirtualDiskReasonNewBytes uint64 + + // + VirtualDiskReasonRegenReadError uint64 + + // + VirtualDiskReasonRegenReadErrorBytes uint64 + + // + VirtualDiskReasonRegenWriteError uint64 + + // + VirtualDiskReasonRegenWriteErrorBytes uint64 + + // + VirtualDiskReasonRetired uint64 + + // + VirtualDiskReasonRetiredBytes uint64 + + // + VirtualDiskRebalanceReplacementBytes uint64 + + // + VirtualDiskRebalanceReplacementCount uint64 + + // + VirtualDiskRegenerating uint64 + + // + VirtualDiskRegeneratingBytes uint64 + + // + VirtualDiskRepairNeedPhase2Count uint64 + + // + VirtualDiskRepairNeedPhase6Count uint64 + + // + VirtualDiskRepairPhase1Count uint64 + + // + VirtualDiskRepairPhase1Status uint64 + + // + VirtualDiskRepairPhase2Count uint64 + + // + VirtualDiskRepairPhase2Status uint64 + + // + VirtualDiskRepairPhase3Count uint64 + + // + VirtualDiskRepairPhase3Status uint64 + + // + VirtualDiskRepairPhase4Count uint64 + + // + VirtualDiskRepairPhase4Status uint64 + + // + VirtualDiskRepairPhase5Count uint64 + + // + VirtualDiskRepairPhase5Status uint64 + + // + VirtualDiskRepairPhase6Count uint64 + + // + VirtualDiskRepairPhase6Status uint64 + + // + VirtualDiskRepairReplacementBytes uint64 + + // + VirtualDiskRepairReplacementCount uint64 + + // + VirtualDiskScopeRegenerationBytes uint64 + + // + VirtualDiskScopeRegenerationCount uint64 + + // + VirtualDiskStale uint64 + + // + VirtualDiskStaleBytes uint64 + + // + VirtualDiskTotal uint64 + + // + VirtualDiskTotalBytes uint64 +} + +func NewWin32_PerfRawData_Counters_StorageSpacesVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesVirtualDisk{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_StorageSpacesVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesVirtualDisk{ + Win32_PerfRawData: tmp, + } + return +} + +// SetVirtualDiskActive sets the value of VirtualDiskActive for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskActive(value uint64) (err error) { + return instance.SetProperty("VirtualDiskActive", (value)) +} + +// GetVirtualDiskActive gets the value of VirtualDiskActive for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskActive() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskActiveBytes sets the value of VirtualDiskActiveBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskActiveBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskActiveBytes", (value)) +} + +// GetVirtualDiskActiveBytes gets the value of VirtualDiskActiveBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskActiveBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskActiveBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskFailedReplacementBytes sets the value of VirtualDiskFailedReplacementBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskFailedReplacementBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskFailedReplacementBytes", (value)) +} + +// GetVirtualDiskFailedReplacementBytes gets the value of VirtualDiskFailedReplacementBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskFailedReplacementBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskFailedReplacementBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskFailedReplacementCount sets the value of VirtualDiskFailedReplacementCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskFailedReplacementCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskFailedReplacementCount", (value)) +} + +// GetVirtualDiskFailedReplacementCount gets the value of VirtualDiskFailedReplacementCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskFailedReplacementCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskFailedReplacementCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskMissing sets the value of VirtualDiskMissing for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskMissing(value uint64) (err error) { + return instance.SetProperty("VirtualDiskMissing", (value)) +} + +// GetVirtualDiskMissing gets the value of VirtualDiskMissing for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskMissingBytes sets the value of VirtualDiskMissingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskMissingBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskMissingBytes", (value)) +} + +// GetVirtualDiskMissingBytes gets the value of VirtualDiskMissingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskMissingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskMissingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedReallocation sets the value of VirtualDiskNeedReallocation for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedReallocation(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedReallocation", (value)) +} + +// GetVirtualDiskNeedReallocation gets the value of VirtualDiskNeedReallocation for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedReallocation() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedReallocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedReallocationBytes sets the value of VirtualDiskNeedReallocationBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedReallocationBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedReallocationBytes", (value)) +} + +// GetVirtualDiskNeedReallocationBytes gets the value of VirtualDiskNeedReallocationBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedReallocationBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedReallocationBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedRegeneration sets the value of VirtualDiskNeedRegeneration for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedRegeneration(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedRegeneration", (value)) +} + +// GetVirtualDiskNeedRegeneration gets the value of VirtualDiskNeedRegeneration for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedRegeneration() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedRegeneration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskNeedRegenerationBytes sets the value of VirtualDiskNeedRegenerationBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskNeedRegenerationBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskNeedRegenerationBytes", (value)) +} + +// GetVirtualDiskNeedRegenerationBytes gets the value of VirtualDiskNeedRegenerationBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskNeedRegenerationBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskNeedRegenerationBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskPendingDeletion sets the value of VirtualDiskPendingDeletion for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskPendingDeletion(value uint64) (err error) { + return instance.SetProperty("VirtualDiskPendingDeletion", (value)) +} + +// GetVirtualDiskPendingDeletion gets the value of VirtualDiskPendingDeletion for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskPendingDeletion() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskPendingDeletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskPendingDeletionBytes sets the value of VirtualDiskPendingDeletionBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskPendingDeletionBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskPendingDeletionBytes", (value)) +} + +// GetVirtualDiskPendingDeletionBytes gets the value of VirtualDiskPendingDeletionBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskPendingDeletionBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskPendingDeletionBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonFailure sets the value of VirtualDiskReasonFailure for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonFailure(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonFailure", (value)) +} + +// GetVirtualDiskReasonFailure gets the value of VirtualDiskReasonFailure for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonFailure() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonFailure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonFailureBytes sets the value of VirtualDiskReasonFailureBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonFailureBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonFailureBytes", (value)) +} + +// GetVirtualDiskReasonFailureBytes gets the value of VirtualDiskReasonFailureBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonFailureBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonFailureBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonHardwareError sets the value of VirtualDiskReasonHardwareError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonHardwareError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonHardwareError", (value)) +} + +// GetVirtualDiskReasonHardwareError gets the value of VirtualDiskReasonHardwareError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonHardwareError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonHardwareError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonHardwareErrorBytes sets the value of VirtualDiskReasonHardwareErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonHardwareErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonHardwareErrorBytes", (value)) +} + +// GetVirtualDiskReasonHardwareErrorBytes gets the value of VirtualDiskReasonHardwareErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonHardwareErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonHardwareErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonIoError sets the value of VirtualDiskReasonIoError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonIoError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonIoError", (value)) +} + +// GetVirtualDiskReasonIoError gets the value of VirtualDiskReasonIoError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonIoError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonIoError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonIoErrorBytes sets the value of VirtualDiskReasonIoErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonIoErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonIoErrorBytes", (value)) +} + +// GetVirtualDiskReasonIoErrorBytes gets the value of VirtualDiskReasonIoErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonIoErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonIoErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonMissing sets the value of VirtualDiskReasonMissing for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonMissing(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonMissing", (value)) +} + +// GetVirtualDiskReasonMissing gets the value of VirtualDiskReasonMissing for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonMissingBytes sets the value of VirtualDiskReasonMissingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonMissingBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonMissingBytes", (value)) +} + +// GetVirtualDiskReasonMissingBytes gets the value of VirtualDiskReasonMissingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonMissingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonMissingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonNew sets the value of VirtualDiskReasonNew for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonNew(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonNew", (value)) +} + +// GetVirtualDiskReasonNew gets the value of VirtualDiskReasonNew for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonNew() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonNew") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonNewBytes sets the value of VirtualDiskReasonNewBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonNewBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonNewBytes", (value)) +} + +// GetVirtualDiskReasonNewBytes gets the value of VirtualDiskReasonNewBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonNewBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonNewBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenReadError sets the value of VirtualDiskReasonRegenReadError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenReadError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenReadError", (value)) +} + +// GetVirtualDiskReasonRegenReadError gets the value of VirtualDiskReasonRegenReadError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenReadError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenReadError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenReadErrorBytes sets the value of VirtualDiskReasonRegenReadErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenReadErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenReadErrorBytes", (value)) +} + +// GetVirtualDiskReasonRegenReadErrorBytes gets the value of VirtualDiskReasonRegenReadErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenReadErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenReadErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenWriteError sets the value of VirtualDiskReasonRegenWriteError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenWriteError(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenWriteError", (value)) +} + +// GetVirtualDiskReasonRegenWriteError gets the value of VirtualDiskReasonRegenWriteError for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenWriteError() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenWriteError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRegenWriteErrorBytes sets the value of VirtualDiskReasonRegenWriteErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRegenWriteErrorBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRegenWriteErrorBytes", (value)) +} + +// GetVirtualDiskReasonRegenWriteErrorBytes gets the value of VirtualDiskReasonRegenWriteErrorBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRegenWriteErrorBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRegenWriteErrorBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRetired sets the value of VirtualDiskReasonRetired for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRetired(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRetired", (value)) +} + +// GetVirtualDiskReasonRetired gets the value of VirtualDiskReasonRetired for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRetired() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRetired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskReasonRetiredBytes sets the value of VirtualDiskReasonRetiredBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskReasonRetiredBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskReasonRetiredBytes", (value)) +} + +// GetVirtualDiskReasonRetiredBytes gets the value of VirtualDiskReasonRetiredBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskReasonRetiredBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskReasonRetiredBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRebalanceReplacementBytes sets the value of VirtualDiskRebalanceReplacementBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRebalanceReplacementBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRebalanceReplacementBytes", (value)) +} + +// GetVirtualDiskRebalanceReplacementBytes gets the value of VirtualDiskRebalanceReplacementBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRebalanceReplacementBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRebalanceReplacementBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRebalanceReplacementCount sets the value of VirtualDiskRebalanceReplacementCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRebalanceReplacementCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRebalanceReplacementCount", (value)) +} + +// GetVirtualDiskRebalanceReplacementCount gets the value of VirtualDiskRebalanceReplacementCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRebalanceReplacementCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRebalanceReplacementCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRegenerating sets the value of VirtualDiskRegenerating for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRegenerating(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRegenerating", (value)) +} + +// GetVirtualDiskRegenerating gets the value of VirtualDiskRegenerating for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRegenerating() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRegenerating") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRegeneratingBytes sets the value of VirtualDiskRegeneratingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRegeneratingBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRegeneratingBytes", (value)) +} + +// GetVirtualDiskRegeneratingBytes gets the value of VirtualDiskRegeneratingBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRegeneratingBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRegeneratingBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairNeedPhase2Count sets the value of VirtualDiskRepairNeedPhase2Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairNeedPhase2Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairNeedPhase2Count", (value)) +} + +// GetVirtualDiskRepairNeedPhase2Count gets the value of VirtualDiskRepairNeedPhase2Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairNeedPhase2Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairNeedPhase2Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairNeedPhase6Count sets the value of VirtualDiskRepairNeedPhase6Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairNeedPhase6Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairNeedPhase6Count", (value)) +} + +// GetVirtualDiskRepairNeedPhase6Count gets the value of VirtualDiskRepairNeedPhase6Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairNeedPhase6Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairNeedPhase6Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase1Count sets the value of VirtualDiskRepairPhase1Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase1Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase1Count", (value)) +} + +// GetVirtualDiskRepairPhase1Count gets the value of VirtualDiskRepairPhase1Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase1Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase1Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase1Status sets the value of VirtualDiskRepairPhase1Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase1Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase1Status", (value)) +} + +// GetVirtualDiskRepairPhase1Status gets the value of VirtualDiskRepairPhase1Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase1Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase1Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase2Count sets the value of VirtualDiskRepairPhase2Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase2Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase2Count", (value)) +} + +// GetVirtualDiskRepairPhase2Count gets the value of VirtualDiskRepairPhase2Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase2Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase2Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase2Status sets the value of VirtualDiskRepairPhase2Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase2Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase2Status", (value)) +} + +// GetVirtualDiskRepairPhase2Status gets the value of VirtualDiskRepairPhase2Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase2Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase2Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase3Count sets the value of VirtualDiskRepairPhase3Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase3Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase3Count", (value)) +} + +// GetVirtualDiskRepairPhase3Count gets the value of VirtualDiskRepairPhase3Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase3Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase3Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase3Status sets the value of VirtualDiskRepairPhase3Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase3Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase3Status", (value)) +} + +// GetVirtualDiskRepairPhase3Status gets the value of VirtualDiskRepairPhase3Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase3Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase3Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase4Count sets the value of VirtualDiskRepairPhase4Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase4Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase4Count", (value)) +} + +// GetVirtualDiskRepairPhase4Count gets the value of VirtualDiskRepairPhase4Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase4Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase4Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase4Status sets the value of VirtualDiskRepairPhase4Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase4Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase4Status", (value)) +} + +// GetVirtualDiskRepairPhase4Status gets the value of VirtualDiskRepairPhase4Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase4Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase4Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase5Count sets the value of VirtualDiskRepairPhase5Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase5Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase5Count", (value)) +} + +// GetVirtualDiskRepairPhase5Count gets the value of VirtualDiskRepairPhase5Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase5Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase5Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase5Status sets the value of VirtualDiskRepairPhase5Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase5Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase5Status", (value)) +} + +// GetVirtualDiskRepairPhase5Status gets the value of VirtualDiskRepairPhase5Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase5Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase5Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase6Count sets the value of VirtualDiskRepairPhase6Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase6Count(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase6Count", (value)) +} + +// GetVirtualDiskRepairPhase6Count gets the value of VirtualDiskRepairPhase6Count for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase6Count() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase6Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairPhase6Status sets the value of VirtualDiskRepairPhase6Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairPhase6Status(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairPhase6Status", (value)) +} + +// GetVirtualDiskRepairPhase6Status gets the value of VirtualDiskRepairPhase6Status for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairPhase6Status() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairPhase6Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairReplacementBytes sets the value of VirtualDiskRepairReplacementBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairReplacementBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairReplacementBytes", (value)) +} + +// GetVirtualDiskRepairReplacementBytes gets the value of VirtualDiskRepairReplacementBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairReplacementBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairReplacementBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskRepairReplacementCount sets the value of VirtualDiskRepairReplacementCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskRepairReplacementCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskRepairReplacementCount", (value)) +} + +// GetVirtualDiskRepairReplacementCount gets the value of VirtualDiskRepairReplacementCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskRepairReplacementCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskRepairReplacementCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskScopeRegenerationBytes sets the value of VirtualDiskScopeRegenerationBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskScopeRegenerationBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskScopeRegenerationBytes", (value)) +} + +// GetVirtualDiskScopeRegenerationBytes gets the value of VirtualDiskScopeRegenerationBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskScopeRegenerationBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskScopeRegenerationBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskScopeRegenerationCount sets the value of VirtualDiskScopeRegenerationCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskScopeRegenerationCount(value uint64) (err error) { + return instance.SetProperty("VirtualDiskScopeRegenerationCount", (value)) +} + +// GetVirtualDiskScopeRegenerationCount gets the value of VirtualDiskScopeRegenerationCount for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskScopeRegenerationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskScopeRegenerationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskStale sets the value of VirtualDiskStale for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskStale(value uint64) (err error) { + return instance.SetProperty("VirtualDiskStale", (value)) +} + +// GetVirtualDiskStale gets the value of VirtualDiskStale for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskStale() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskStale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskStaleBytes sets the value of VirtualDiskStaleBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskStaleBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskStaleBytes", (value)) +} + +// GetVirtualDiskStaleBytes gets the value of VirtualDiskStaleBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskStaleBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskStaleBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskTotal sets the value of VirtualDiskTotal for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskTotal(value uint64) (err error) { + return instance.SetProperty("VirtualDiskTotal", (value)) +} + +// GetVirtualDiskTotal gets the value of VirtualDiskTotal for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskTotalBytes sets the value of VirtualDiskTotalBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) SetPropertyVirtualDiskTotalBytes(value uint64) (err error) { + return instance.SetProperty("VirtualDiskTotalBytes", (value)) +} + +// GetVirtualDiskTotalBytes gets the value of VirtualDiskTotalBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesVirtualDisk) GetPropertyVirtualDiskTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesWriteCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesWriteCache.go new file mode 100644 index 00000000..0d510db2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_StorageSpacesWriteCache.go @@ -0,0 +1,1280 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_StorageSpacesWriteCache struct +type Win32_PerfRawData_Counters_StorageSpacesWriteCache struct { + *Win32_PerfRawData + + // + CacheAdvances uint32 + + // + CacheCheckpoints uint32 + + // + CacheDataBytes uint64 + + // + CacheDataPercent uint64 + + // + CacheDataPercent_Base uint64 + + // + CacheDestagesCurrent uint32 + + // + CacheReclaimableBytes uint64 + + // + CacheReclaimablePercent uint64 + + // + CacheReclaimablePercent_Base uint64 + + // + CacheSize uint64 + + // + CacheUsedBytes uint64 + + // + CacheUsedPercent uint64 + + // + CacheUsedPercent_Base uint64 + + // + EvictCacheBytesPersec uint64 + + // + EvictCacheDestagedBytesPersec uint64 + + // + EvictCacheDestagedPercent uint64 + + // + EvictCacheDestagedPercent_Base uint64 + + // + EvictCacheOverwriteBytesPersec uint64 + + // + EvictCacheOverwritePercent uint64 + + // + EvictCacheOverwritePercent_Base uint64 + + // + ReadBypassBytesPersec uint64 + + // + ReadBypassPercent uint64 + + // + ReadBypassPercent_Base uint64 + + // + ReadCacheBytesPersec uint64 + + // + ReadCachePercent uint64 + + // + ReadCachePercent_Base uint64 + + // + WriteBypassBytesPersec uint64 + + // + WriteBypassPercent uint64 + + // + WriteBypassPercent_Base uint64 + + // + WriteCacheBytesPersec uint64 + + // + WriteCacheOverlapBytesPersec uint64 + + // + WriteCacheOverlapPercent uint64 + + // + WriteCacheOverlapPercent_Base uint64 + + // + WriteCachePercent uint64 + + // + WriteCachePercent_Base uint64 + + // + WriteCacheUnalignedBytesPersec uint64 + + // + WriteCacheUnalignedPercent uint64 + + // + WriteCacheUnalignedPercent_Base uint64 + + // + WriteCacheUntrimmedBytesPersec uint64 + + // + WriteCacheUntrimmedPercent uint64 + + // + WriteCacheUntrimmedPercent_Base uint64 +} + +func NewWin32_PerfRawData_Counters_StorageSpacesWriteCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_StorageSpacesWriteCache, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesWriteCache{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_StorageSpacesWriteCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_StorageSpacesWriteCache, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_StorageSpacesWriteCache{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCacheAdvances sets the value of CacheAdvances for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheAdvances(value uint32) (err error) { + return instance.SetProperty("CacheAdvances", (value)) +} + +// GetCacheAdvances gets the value of CacheAdvances for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheAdvances() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheAdvances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheCheckpoints sets the value of CacheCheckpoints for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheCheckpoints(value uint32) (err error) { + return instance.SetProperty("CacheCheckpoints", (value)) +} + +// GetCacheCheckpoints gets the value of CacheCheckpoints for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheCheckpoints() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheCheckpoints") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheDataBytes sets the value of CacheDataBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheDataBytes(value uint64) (err error) { + return instance.SetProperty("CacheDataBytes", (value)) +} + +// GetCacheDataBytes gets the value of CacheDataBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheDataBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheDataBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheDataPercent sets the value of CacheDataPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheDataPercent(value uint64) (err error) { + return instance.SetProperty("CacheDataPercent", (value)) +} + +// GetCacheDataPercent gets the value of CacheDataPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheDataPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheDataPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheDataPercent_Base sets the value of CacheDataPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheDataPercent_Base(value uint64) (err error) { + return instance.SetProperty("CacheDataPercent_Base", (value)) +} + +// GetCacheDataPercent_Base gets the value of CacheDataPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheDataPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheDataPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheDestagesCurrent sets the value of CacheDestagesCurrent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheDestagesCurrent(value uint32) (err error) { + return instance.SetProperty("CacheDestagesCurrent", (value)) +} + +// GetCacheDestagesCurrent gets the value of CacheDestagesCurrent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheDestagesCurrent() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheDestagesCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheReclaimableBytes sets the value of CacheReclaimableBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheReclaimableBytes(value uint64) (err error) { + return instance.SetProperty("CacheReclaimableBytes", (value)) +} + +// GetCacheReclaimableBytes gets the value of CacheReclaimableBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheReclaimableBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReclaimableBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReclaimablePercent sets the value of CacheReclaimablePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheReclaimablePercent(value uint64) (err error) { + return instance.SetProperty("CacheReclaimablePercent", (value)) +} + +// GetCacheReclaimablePercent gets the value of CacheReclaimablePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheReclaimablePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReclaimablePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReclaimablePercent_Base sets the value of CacheReclaimablePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheReclaimablePercent_Base(value uint64) (err error) { + return instance.SetProperty("CacheReclaimablePercent_Base", (value)) +} + +// GetCacheReclaimablePercent_Base gets the value of CacheReclaimablePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheReclaimablePercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReclaimablePercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSize sets the value of CacheSize for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheSize(value uint64) (err error) { + return instance.SetProperty("CacheSize", (value)) +} + +// GetCacheSize gets the value of CacheSize for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsedBytes sets the value of CacheUsedBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheUsedBytes(value uint64) (err error) { + return instance.SetProperty("CacheUsedBytes", (value)) +} + +// GetCacheUsedBytes gets the value of CacheUsedBytes for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheUsedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsedPercent sets the value of CacheUsedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheUsedPercent(value uint64) (err error) { + return instance.SetProperty("CacheUsedPercent", (value)) +} + +// GetCacheUsedPercent gets the value of CacheUsedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheUsedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheUsedPercent_Base sets the value of CacheUsedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyCacheUsedPercent_Base(value uint64) (err error) { + return instance.SetProperty("CacheUsedPercent_Base", (value)) +} + +// GetCacheUsedPercent_Base gets the value of CacheUsedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyCacheUsedPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheUsedPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheBytesPersec sets the value of EvictCacheBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheBytesPersec(value uint64) (err error) { + return instance.SetProperty("EvictCacheBytesPersec", (value)) +} + +// GetEvictCacheBytesPersec gets the value of EvictCacheBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheDestagedBytesPersec sets the value of EvictCacheDestagedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheDestagedBytesPersec(value uint64) (err error) { + return instance.SetProperty("EvictCacheDestagedBytesPersec", (value)) +} + +// GetEvictCacheDestagedBytesPersec gets the value of EvictCacheDestagedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheDestagedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheDestagedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheDestagedPercent sets the value of EvictCacheDestagedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheDestagedPercent(value uint64) (err error) { + return instance.SetProperty("EvictCacheDestagedPercent", (value)) +} + +// GetEvictCacheDestagedPercent gets the value of EvictCacheDestagedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheDestagedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheDestagedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheDestagedPercent_Base sets the value of EvictCacheDestagedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheDestagedPercent_Base(value uint64) (err error) { + return instance.SetProperty("EvictCacheDestagedPercent_Base", (value)) +} + +// GetEvictCacheDestagedPercent_Base gets the value of EvictCacheDestagedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheDestagedPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheDestagedPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheOverwriteBytesPersec sets the value of EvictCacheOverwriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheOverwriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("EvictCacheOverwriteBytesPersec", (value)) +} + +// GetEvictCacheOverwriteBytesPersec gets the value of EvictCacheOverwriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheOverwriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheOverwriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheOverwritePercent sets the value of EvictCacheOverwritePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheOverwritePercent(value uint64) (err error) { + return instance.SetProperty("EvictCacheOverwritePercent", (value)) +} + +// GetEvictCacheOverwritePercent gets the value of EvictCacheOverwritePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheOverwritePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheOverwritePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEvictCacheOverwritePercent_Base sets the value of EvictCacheOverwritePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyEvictCacheOverwritePercent_Base(value uint64) (err error) { + return instance.SetProperty("EvictCacheOverwritePercent_Base", (value)) +} + +// GetEvictCacheOverwritePercent_Base gets the value of EvictCacheOverwritePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyEvictCacheOverwritePercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("EvictCacheOverwritePercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBypassBytesPersec sets the value of ReadBypassBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyReadBypassBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBypassBytesPersec", (value)) +} + +// GetReadBypassBytesPersec gets the value of ReadBypassBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyReadBypassBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBypassBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBypassPercent sets the value of ReadBypassPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyReadBypassPercent(value uint64) (err error) { + return instance.SetProperty("ReadBypassPercent", (value)) +} + +// GetReadBypassPercent gets the value of ReadBypassPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyReadBypassPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBypassPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBypassPercent_Base sets the value of ReadBypassPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyReadBypassPercent_Base(value uint64) (err error) { + return instance.SetProperty("ReadBypassPercent_Base", (value)) +} + +// GetReadBypassPercent_Base gets the value of ReadBypassPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyReadBypassPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBypassPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCacheBytesPersec sets the value of ReadCacheBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyReadCacheBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadCacheBytesPersec", (value)) +} + +// GetReadCacheBytesPersec gets the value of ReadCacheBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyReadCacheBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadCacheBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCachePercent sets the value of ReadCachePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyReadCachePercent(value uint64) (err error) { + return instance.SetProperty("ReadCachePercent", (value)) +} + +// GetReadCachePercent gets the value of ReadCachePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyReadCachePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadCachePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadCachePercent_Base sets the value of ReadCachePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyReadCachePercent_Base(value uint64) (err error) { + return instance.SetProperty("ReadCachePercent_Base", (value)) +} + +// GetReadCachePercent_Base gets the value of ReadCachePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyReadCachePercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadCachePercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBypassBytesPersec sets the value of WriteBypassBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteBypassBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBypassBytesPersec", (value)) +} + +// GetWriteBypassBytesPersec gets the value of WriteBypassBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteBypassBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBypassBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBypassPercent sets the value of WriteBypassPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteBypassPercent(value uint64) (err error) { + return instance.SetProperty("WriteBypassPercent", (value)) +} + +// GetWriteBypassPercent gets the value of WriteBypassPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteBypassPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBypassPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBypassPercent_Base sets the value of WriteBypassPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteBypassPercent_Base(value uint64) (err error) { + return instance.SetProperty("WriteBypassPercent_Base", (value)) +} + +// GetWriteBypassPercent_Base gets the value of WriteBypassPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteBypassPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBypassPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheBytesPersec sets the value of WriteCacheBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheBytesPersec", (value)) +} + +// GetWriteCacheBytesPersec gets the value of WriteCacheBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheOverlapBytesPersec sets the value of WriteCacheOverlapBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheOverlapBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheOverlapBytesPersec", (value)) +} + +// GetWriteCacheOverlapBytesPersec gets the value of WriteCacheOverlapBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheOverlapBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheOverlapBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheOverlapPercent sets the value of WriteCacheOverlapPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheOverlapPercent(value uint64) (err error) { + return instance.SetProperty("WriteCacheOverlapPercent", (value)) +} + +// GetWriteCacheOverlapPercent gets the value of WriteCacheOverlapPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheOverlapPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheOverlapPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheOverlapPercent_Base sets the value of WriteCacheOverlapPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheOverlapPercent_Base(value uint64) (err error) { + return instance.SetProperty("WriteCacheOverlapPercent_Base", (value)) +} + +// GetWriteCacheOverlapPercent_Base gets the value of WriteCacheOverlapPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheOverlapPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheOverlapPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCachePercent sets the value of WriteCachePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCachePercent(value uint64) (err error) { + return instance.SetProperty("WriteCachePercent", (value)) +} + +// GetWriteCachePercent gets the value of WriteCachePercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCachePercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCachePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCachePercent_Base sets the value of WriteCachePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCachePercent_Base(value uint64) (err error) { + return instance.SetProperty("WriteCachePercent_Base", (value)) +} + +// GetWriteCachePercent_Base gets the value of WriteCachePercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCachePercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCachePercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUnalignedBytesPersec sets the value of WriteCacheUnalignedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUnalignedBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheUnalignedBytesPersec", (value)) +} + +// GetWriteCacheUnalignedBytesPersec gets the value of WriteCacheUnalignedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUnalignedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUnalignedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUnalignedPercent sets the value of WriteCacheUnalignedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUnalignedPercent(value uint64) (err error) { + return instance.SetProperty("WriteCacheUnalignedPercent", (value)) +} + +// GetWriteCacheUnalignedPercent gets the value of WriteCacheUnalignedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUnalignedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUnalignedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUnalignedPercent_Base sets the value of WriteCacheUnalignedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUnalignedPercent_Base(value uint64) (err error) { + return instance.SetProperty("WriteCacheUnalignedPercent_Base", (value)) +} + +// GetWriteCacheUnalignedPercent_Base gets the value of WriteCacheUnalignedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUnalignedPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUnalignedPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUntrimmedBytesPersec sets the value of WriteCacheUntrimmedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUntrimmedBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteCacheUntrimmedBytesPersec", (value)) +} + +// GetWriteCacheUntrimmedBytesPersec gets the value of WriteCacheUntrimmedBytesPersec for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUntrimmedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUntrimmedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUntrimmedPercent sets the value of WriteCacheUntrimmedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUntrimmedPercent(value uint64) (err error) { + return instance.SetProperty("WriteCacheUntrimmedPercent", (value)) +} + +// GetWriteCacheUntrimmedPercent gets the value of WriteCacheUntrimmedPercent for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUntrimmedPercent() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUntrimmedPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheUntrimmedPercent_Base sets the value of WriteCacheUntrimmedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) SetPropertyWriteCacheUntrimmedPercent_Base(value uint64) (err error) { + return instance.SetProperty("WriteCacheUntrimmedPercent_Base", (value)) +} + +// GetWriteCacheUntrimmedPercent_Base gets the value of WriteCacheUntrimmedPercent_Base for the instance +func (instance *Win32_PerfRawData_Counters_StorageSpacesWriteCache) GetPropertyWriteCacheUntrimmedPercent_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheUntrimmedPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Synchronization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Synchronization.go new file mode 100644 index 00000000..70f56785 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_Synchronization.go @@ -0,0 +1,1310 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_Synchronization struct +type Win32_PerfRawData_Counters_Synchronization struct { + *Win32_PerfRawData + + // + ExecResourceAcquiresAcqExclLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceAttemptsAcqExclLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdStarveExclPersec uint32 + + // + ExecResourceAttemptsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceBoostExclOwnerPersec uint32 + + // + ExecResourceBoostSharedOwnersPersec uint32 + + // + ExecResourceContentionAcqExclLitePersec uint32 + + // + ExecResourceContentionAcqShrdLitePersec uint32 + + // + ExecResourceContentionAcqShrdStarveExclPersec uint32 + + // + ExecResourceContentionAcqShrdWaitForExclPersec uint32 + + // + ExecResourcenoWaitsAcqExclLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdStarveExclPersec uint32 + + // + ExecResourcenoWaitsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqExclLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceSetOwnerPointerExclusivePersec uint32 + + // + ExecResourceSetOwnerPointerSharedExistingOwnerPersec uint32 + + // + ExecResourceSetOwnerPointerSharedNewOwnerPersec uint32 + + // + ExecResourceTotalAcquiresPersec uint32 + + // + ExecResourceTotalContentionsPersec uint32 + + // + ExecResourceTotalConvExclusiveToSharedPersec uint32 + + // + ExecResourceTotalDeletePersec uint32 + + // + ExecResourceTotalExclusiveReleasesPersec uint32 + + // + ExecResourceTotalInitializePersec uint32 + + // + ExecResourceTotalReInitializePersec uint32 + + // + ExecResourceTotalSharedReleasesPersec uint32 + + // + IPISendBroadcastRequestsPersec uint32 + + // + IPISendRoutineRequestsPersec uint32 + + // + IPISendSoftwareInterruptsPersec uint32 + + // + SpinlockAcquiresPersec uint32 + + // + SpinlockContentionsPersec uint32 + + // + SpinlockSpinsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_SynchronizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_Synchronization, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_Synchronization{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SynchronizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_Synchronization, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_Synchronization{ + Win32_PerfRawData: tmp, + } + return +} + +// SetExecResourceAcquiresAcqExclLitePersec sets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqExclLitePersec gets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdLitePersec sets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdLitePersec gets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqExclLitePersec sets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqExclLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqExclLitePersec gets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdLitePersec sets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdLitePersec gets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdStarveExclPersec sets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdStarveExclPersec gets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdWaitForExclPersec sets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdWaitForExclPersec gets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostExclOwnerPersec sets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceBoostExclOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostExclOwnerPersec", (value)) +} + +// GetExecResourceBoostExclOwnerPersec gets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceBoostExclOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostExclOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostSharedOwnersPersec sets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceBoostSharedOwnersPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostSharedOwnersPersec", (value)) +} + +// GetExecResourceBoostSharedOwnersPersec gets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceBoostSharedOwnersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostSharedOwnersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqExclLitePersec sets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceContentionAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqExclLitePersec", (value)) +} + +// GetExecResourceContentionAcqExclLitePersec gets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceContentionAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdLitePersec sets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceContentionAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdLitePersec", (value)) +} + +// GetExecResourceContentionAcqShrdLitePersec gets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceContentionAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdStarveExclPersec sets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceContentionAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdStarveExclPersec gets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceContentionAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdWaitForExclPersec sets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceContentionAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdWaitForExclPersec gets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceContentionAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqExclLitePersec sets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqExclLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqExclLitePersec gets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdLitePersec sets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdLitePersec gets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdStarveExclPersec sets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdStarveExclPersec gets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdWaitForExclPersec sets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdWaitForExclPersec gets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqExclLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqExclLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerExclusivePersec sets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceSetOwnerPointerExclusivePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerExclusivePersec", (value)) +} + +// GetExecResourceSetOwnerPointerExclusivePersec gets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceSetOwnerPointerExclusivePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerExclusivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedExistingOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedExistingOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedNewOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedNewOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalAcquiresPersec sets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalAcquiresPersec", (value)) +} + +// GetExecResourceTotalAcquiresPersec gets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalContentionsPersec sets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalContentionsPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalContentionsPersec", (value)) +} + +// GetExecResourceTotalContentionsPersec gets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalConvExclusiveToSharedPersec sets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalConvExclusiveToSharedPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalConvExclusiveToSharedPersec", (value)) +} + +// GetExecResourceTotalConvExclusiveToSharedPersec gets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalConvExclusiveToSharedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalConvExclusiveToSharedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalDeletePersec sets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalDeletePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalDeletePersec", (value)) +} + +// GetExecResourceTotalDeletePersec gets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalDeletePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalDeletePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalExclusiveReleasesPersec sets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalExclusiveReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalExclusiveReleasesPersec", (value)) +} + +// GetExecResourceTotalExclusiveReleasesPersec gets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalExclusiveReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalExclusiveReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalInitializePersec sets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalInitializePersec", (value)) +} + +// GetExecResourceTotalInitializePersec gets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalReInitializePersec sets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalReInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalReInitializePersec", (value)) +} + +// GetExecResourceTotalReInitializePersec gets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalReInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalReInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalSharedReleasesPersec sets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyExecResourceTotalSharedReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalSharedReleasesPersec", (value)) +} + +// GetExecResourceTotalSharedReleasesPersec gets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyExecResourceTotalSharedReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalSharedReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendBroadcastRequestsPersec sets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyIPISendBroadcastRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendBroadcastRequestsPersec", (value)) +} + +// GetIPISendBroadcastRequestsPersec gets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyIPISendBroadcastRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendBroadcastRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendRoutineRequestsPersec sets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyIPISendRoutineRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendRoutineRequestsPersec", (value)) +} + +// GetIPISendRoutineRequestsPersec gets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyIPISendRoutineRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendRoutineRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendSoftwareInterruptsPersec sets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertyIPISendSoftwareInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendSoftwareInterruptsPersec", (value)) +} + +// GetIPISendSoftwareInterruptsPersec gets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertyIPISendSoftwareInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendSoftwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockAcquiresPersec sets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertySpinlockAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockAcquiresPersec", (value)) +} + +// GetSpinlockAcquiresPersec gets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertySpinlockAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockContentionsPersec sets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertySpinlockContentionsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockContentionsPersec", (value)) +} + +// GetSpinlockContentionsPersec gets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertySpinlockContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockSpinsPersec sets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) SetPropertySpinlockSpinsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockSpinsPersec", (value)) +} + +// GetSpinlockSpinsPersec gets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfRawData_Counters_Synchronization) GetPropertySpinlockSpinsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockSpinsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SynchronizationNuma.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SynchronizationNuma.go new file mode 100644 index 00000000..9138b2f2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_SynchronizationNuma.go @@ -0,0 +1,1310 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_SynchronizationNuma struct +type Win32_PerfRawData_Counters_SynchronizationNuma struct { + *Win32_PerfRawData + + // + ExecResourceAcquiresAcqExclLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceAttemptsAcqExclLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdLitePersec uint32 + + // + ExecResourceAttemptsAcqShrdStarveExclPersec uint32 + + // + ExecResourceAttemptsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceBoostExclOwnerPersec uint32 + + // + ExecResourceBoostSharedOwnersPersec uint32 + + // + ExecResourceContentionAcqExclLitePersec uint32 + + // + ExecResourceContentionAcqShrdLitePersec uint32 + + // + ExecResourceContentionAcqShrdStarveExclPersec uint32 + + // + ExecResourceContentionAcqShrdWaitForExclPersec uint32 + + // + ExecResourcenoWaitsAcqExclLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdLitePersec uint32 + + // + ExecResourcenoWaitsAcqShrdStarveExclPersec uint32 + + // + ExecResourcenoWaitsAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqExclLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdLitePersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec uint32 + + // + ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec uint32 + + // + ExecResourceSetOwnerPointerExclusivePersec uint32 + + // + ExecResourceSetOwnerPointerSharedExistingOwnerPersec uint32 + + // + ExecResourceSetOwnerPointerSharedNewOwnerPersec uint32 + + // + ExecResourceTotalAcquiresPersec uint32 + + // + ExecResourceTotalContentionsPersec uint32 + + // + ExecResourceTotalConvExclusiveToSharedPersec uint32 + + // + ExecResourceTotalDeletePersec uint32 + + // + ExecResourceTotalExclusiveReleasesPersec uint32 + + // + ExecResourceTotalInitializePersec uint32 + + // + ExecResourceTotalReInitializePersec uint32 + + // + ExecResourceTotalSharedReleasesPersec uint32 + + // + IPISendBroadcastRequestsPersec uint32 + + // + IPISendRoutineRequestsPersec uint32 + + // + IPISendSoftwareInterruptsPersec uint32 + + // + SpinlockAcquiresPersec uint32 + + // + SpinlockContentionsPersec uint32 + + // + SpinlockSpinsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_SynchronizationNumaEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_SynchronizationNuma, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SynchronizationNuma{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_SynchronizationNumaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_SynchronizationNuma, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_SynchronizationNuma{ + Win32_PerfRawData: tmp, + } + return +} + +// SetExecResourceAcquiresAcqExclLitePersec sets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqExclLitePersec gets the value of ExecResourceAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdLitePersec sets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdLitePersec gets the value of ExecResourceAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqExclLitePersec sets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqExclLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqExclLitePersec gets the value of ExecResourceAttemptsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdLitePersec sets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdLitePersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdLitePersec gets the value of ExecResourceAttemptsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdStarveExclPersec sets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdStarveExclPersec gets the value of ExecResourceAttemptsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceAttemptsAcqShrdWaitForExclPersec sets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceAttemptsAcqShrdWaitForExclPersec gets the value of ExecResourceAttemptsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceAttemptsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceAttemptsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostExclOwnerPersec sets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceBoostExclOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostExclOwnerPersec", (value)) +} + +// GetExecResourceBoostExclOwnerPersec gets the value of ExecResourceBoostExclOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceBoostExclOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostExclOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceBoostSharedOwnersPersec sets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceBoostSharedOwnersPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceBoostSharedOwnersPersec", (value)) +} + +// GetExecResourceBoostSharedOwnersPersec gets the value of ExecResourceBoostSharedOwnersPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceBoostSharedOwnersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceBoostSharedOwnersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqExclLitePersec sets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqExclLitePersec", (value)) +} + +// GetExecResourceContentionAcqExclLitePersec gets the value of ExecResourceContentionAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdLitePersec sets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdLitePersec", (value)) +} + +// GetExecResourceContentionAcqShrdLitePersec gets the value of ExecResourceContentionAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdStarveExclPersec sets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdStarveExclPersec gets the value of ExecResourceContentionAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceContentionAcqShrdWaitForExclPersec sets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceContentionAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceContentionAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceContentionAcqShrdWaitForExclPersec gets the value of ExecResourceContentionAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceContentionAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceContentionAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqExclLitePersec sets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqExclLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqExclLitePersec gets the value of ExecResourcenoWaitsAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdLitePersec sets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdLitePersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdLitePersec gets the value of ExecResourcenoWaitsAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdStarveExclPersec sets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdStarveExclPersec gets the value of ExecResourcenoWaitsAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourcenoWaitsAcqShrdWaitForExclPersec sets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourcenoWaitsAcqShrdWaitForExclPersec gets the value of ExecResourcenoWaitsAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourcenoWaitsAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourcenoWaitsAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqExclLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqExclLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqExclLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqExclLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqExclLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveExclAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdLitePersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdLitePersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdLitePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveShAcquiresAcqShrdLitePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdLitePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdStarveExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec sets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec", (value)) +} + +// GetExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec gets the value of ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceRecursiveShAcquiresAcqShrdWaitForExclPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerExclusivePersec sets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceSetOwnerPointerExclusivePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerExclusivePersec", (value)) +} + +// GetExecResourceSetOwnerPointerExclusivePersec gets the value of ExecResourceSetOwnerPointerExclusivePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceSetOwnerPointerExclusivePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerExclusivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedExistingOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedExistingOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedExistingOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceSetOwnerPointerSharedExistingOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedExistingOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceSetOwnerPointerSharedNewOwnerPersec sets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec", (value)) +} + +// GetExecResourceSetOwnerPointerSharedNewOwnerPersec gets the value of ExecResourceSetOwnerPointerSharedNewOwnerPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceSetOwnerPointerSharedNewOwnerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceSetOwnerPointerSharedNewOwnerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalAcquiresPersec sets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalAcquiresPersec", (value)) +} + +// GetExecResourceTotalAcquiresPersec gets the value of ExecResourceTotalAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalContentionsPersec sets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalContentionsPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalContentionsPersec", (value)) +} + +// GetExecResourceTotalContentionsPersec gets the value of ExecResourceTotalContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalConvExclusiveToSharedPersec sets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalConvExclusiveToSharedPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalConvExclusiveToSharedPersec", (value)) +} + +// GetExecResourceTotalConvExclusiveToSharedPersec gets the value of ExecResourceTotalConvExclusiveToSharedPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalConvExclusiveToSharedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalConvExclusiveToSharedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalDeletePersec sets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalDeletePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalDeletePersec", (value)) +} + +// GetExecResourceTotalDeletePersec gets the value of ExecResourceTotalDeletePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalDeletePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalDeletePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalExclusiveReleasesPersec sets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalExclusiveReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalExclusiveReleasesPersec", (value)) +} + +// GetExecResourceTotalExclusiveReleasesPersec gets the value of ExecResourceTotalExclusiveReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalExclusiveReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalExclusiveReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalInitializePersec sets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalInitializePersec", (value)) +} + +// GetExecResourceTotalInitializePersec gets the value of ExecResourceTotalInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalReInitializePersec sets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalReInitializePersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalReInitializePersec", (value)) +} + +// GetExecResourceTotalReInitializePersec gets the value of ExecResourceTotalReInitializePersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalReInitializePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalReInitializePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExecResourceTotalSharedReleasesPersec sets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyExecResourceTotalSharedReleasesPersec(value uint32) (err error) { + return instance.SetProperty("ExecResourceTotalSharedReleasesPersec", (value)) +} + +// GetExecResourceTotalSharedReleasesPersec gets the value of ExecResourceTotalSharedReleasesPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyExecResourceTotalSharedReleasesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExecResourceTotalSharedReleasesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendBroadcastRequestsPersec sets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyIPISendBroadcastRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendBroadcastRequestsPersec", (value)) +} + +// GetIPISendBroadcastRequestsPersec gets the value of IPISendBroadcastRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyIPISendBroadcastRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendBroadcastRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendRoutineRequestsPersec sets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyIPISendRoutineRequestsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendRoutineRequestsPersec", (value)) +} + +// GetIPISendRoutineRequestsPersec gets the value of IPISendRoutineRequestsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyIPISendRoutineRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendRoutineRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPISendSoftwareInterruptsPersec sets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertyIPISendSoftwareInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("IPISendSoftwareInterruptsPersec", (value)) +} + +// GetIPISendSoftwareInterruptsPersec gets the value of IPISendSoftwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertyIPISendSoftwareInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IPISendSoftwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockAcquiresPersec sets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertySpinlockAcquiresPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockAcquiresPersec", (value)) +} + +// GetSpinlockAcquiresPersec gets the value of SpinlockAcquiresPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertySpinlockAcquiresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockAcquiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockContentionsPersec sets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertySpinlockContentionsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockContentionsPersec", (value)) +} + +// GetSpinlockContentionsPersec gets the value of SpinlockContentionsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertySpinlockContentionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockContentionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpinlockSpinsPersec sets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) SetPropertySpinlockSpinsPersec(value uint32) (err error) { + return instance.SetProperty("SpinlockSpinsPersec", (value)) +} + +// GetSpinlockSpinsPersec gets the value of SpinlockSpinsPersec for the instance +func (instance *Win32_PerfRawData_Counters_SynchronizationNuma) GetPropertySpinlockSpinsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SpinlockSpinsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoClient.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoClient.go new file mode 100644 index 00000000..190cc4ff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoClient.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_TeredoClient struct +type Win32_PerfRawData_Counters_TeredoClient struct { + *Win32_PerfRawData + + // + InTeredoBubble uint32 + + // + InTeredoData uint64 + + // + InTeredoDataKernelMode uint64 + + // + InTeredoDataUserMode uint64 + + // + InTeredoInvalid uint32 + + // + InTeredoRouterAdvertisement uint32 + + // + OutTeredoBubble uint32 + + // + OutTeredoData uint64 + + // + OutTeredoDataKernelMode uint64 + + // + OutTeredoDataUserMode uint64 + + // + OutTeredoRouterSolicitation uint32 +} + +func NewWin32_PerfRawData_Counters_TeredoClientEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_TeredoClient, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_TeredoClient{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_TeredoClientEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_TeredoClient, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_TeredoClient{ + Win32_PerfRawData: tmp, + } + return +} + +// SetInTeredoBubble sets the value of InTeredoBubble for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyInTeredoBubble(value uint32) (err error) { + return instance.SetProperty("InTeredoBubble", (value)) +} + +// GetInTeredoBubble gets the value of InTeredoBubble for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyInTeredoBubble() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoBubble") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoData sets the value of InTeredoData for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyInTeredoData(value uint64) (err error) { + return instance.SetProperty("InTeredoData", (value)) +} + +// GetInTeredoData gets the value of InTeredoData for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyInTeredoData() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoDataKernelMode sets the value of InTeredoDataKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyInTeredoDataKernelMode(value uint64) (err error) { + return instance.SetProperty("InTeredoDataKernelMode", (value)) +} + +// GetInTeredoDataKernelMode gets the value of InTeredoDataKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyInTeredoDataKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoDataKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoDataUserMode sets the value of InTeredoDataUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyInTeredoDataUserMode(value uint64) (err error) { + return instance.SetProperty("InTeredoDataUserMode", (value)) +} + +// GetInTeredoDataUserMode gets the value of InTeredoDataUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyInTeredoDataUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoDataUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoInvalid sets the value of InTeredoInvalid for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyInTeredoInvalid(value uint32) (err error) { + return instance.SetProperty("InTeredoInvalid", (value)) +} + +// GetInTeredoInvalid gets the value of InTeredoInvalid for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyInTeredoInvalid() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoInvalid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRouterAdvertisement sets the value of InTeredoRouterAdvertisement for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyInTeredoRouterAdvertisement(value uint32) (err error) { + return instance.SetProperty("InTeredoRouterAdvertisement", (value)) +} + +// GetInTeredoRouterAdvertisement gets the value of InTeredoRouterAdvertisement for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyInTeredoRouterAdvertisement() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRouterAdvertisement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoBubble sets the value of OutTeredoBubble for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyOutTeredoBubble(value uint32) (err error) { + return instance.SetProperty("OutTeredoBubble", (value)) +} + +// GetOutTeredoBubble gets the value of OutTeredoBubble for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyOutTeredoBubble() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoBubble") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoData sets the value of OutTeredoData for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyOutTeredoData(value uint64) (err error) { + return instance.SetProperty("OutTeredoData", (value)) +} + +// GetOutTeredoData gets the value of OutTeredoData for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyOutTeredoData() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoDataKernelMode sets the value of OutTeredoDataKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyOutTeredoDataKernelMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoDataKernelMode", (value)) +} + +// GetOutTeredoDataKernelMode gets the value of OutTeredoDataKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyOutTeredoDataKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoDataKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoDataUserMode sets the value of OutTeredoDataUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyOutTeredoDataUserMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoDataUserMode", (value)) +} + +// GetOutTeredoDataUserMode gets the value of OutTeredoDataUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyOutTeredoDataUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoDataUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRouterSolicitation sets the value of OutTeredoRouterSolicitation for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) SetPropertyOutTeredoRouterSolicitation(value uint32) (err error) { + return instance.SetProperty("OutTeredoRouterSolicitation", (value)) +} + +// GetOutTeredoRouterSolicitation gets the value of OutTeredoRouterSolicitation for the instance +func (instance *Win32_PerfRawData_Counters_TeredoClient) GetPropertyOutTeredoRouterSolicitation() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRouterSolicitation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoRelay.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoRelay.go new file mode 100644 index 00000000..26553804 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoRelay.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_TeredoRelay struct +type Win32_PerfRawData_Counters_TeredoRelay struct { + *Win32_PerfRawData + + // + InTeredoRelayErrorPacketsDestinationError uint32 + + // + InTeredoRelayErrorPacketsHeaderError uint32 + + // + InTeredoRelayErrorPacketsSourceError uint32 + + // + InTeredoRelayErrorPacketsTotal uint32 + + // + InTeredoRelaySuccessPacketsBubbles uint32 + + // + InTeredoRelaySuccessPacketsDataPackets uint64 + + // + InTeredoRelaySuccessPacketsDataPacketsKernelMode uint64 + + // + InTeredoRelaySuccessPacketsDataPacketsUserMode uint64 + + // + InTeredoRelaySuccessPacketsTotal uint64 + + // + InTeredoRelayTotalPacketsSuccessError uint32 + + // + InTeredoRelayTotalPacketsSuccessErrorPersec uint32 + + // + OutTeredoRelayErrorPackets uint32 + + // + OutTeredoRelayErrorPacketsDestinationError uint32 + + // + OutTeredoRelayErrorPacketsHeaderError uint32 + + // + OutTeredoRelayErrorPacketsSourceError uint32 + + // + OutTeredoRelaySuccessPackets uint64 + + // + OutTeredoRelaySuccessPacketsBubbles uint32 + + // + OutTeredoRelaySuccessPacketsDataPackets uint64 + + // + OutTeredoRelaySuccessPacketsDataPacketsKernelMode uint64 + + // + OutTeredoRelaySuccessPacketsDataPacketsUserMode uint64 + + // + OutTeredoRelayTotalPacketsSuccessError uint32 + + // + OutTeredoRelayTotalPacketsSuccessErrorPersec uint32 +} + +func NewWin32_PerfRawData_Counters_TeredoRelayEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_TeredoRelay, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_TeredoRelay{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_TeredoRelayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_TeredoRelay, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_TeredoRelay{ + Win32_PerfRawData: tmp, + } + return +} + +// SetInTeredoRelayErrorPacketsDestinationError sets the value of InTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsDestinationError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsDestinationError", (value)) +} + +// GetInTeredoRelayErrorPacketsDestinationError gets the value of InTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsDestinationError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsDestinationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayErrorPacketsHeaderError sets the value of InTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsHeaderError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsHeaderError", (value)) +} + +// GetInTeredoRelayErrorPacketsHeaderError gets the value of InTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsHeaderError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsHeaderError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayErrorPacketsSourceError sets the value of InTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsSourceError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsSourceError", (value)) +} + +// GetInTeredoRelayErrorPacketsSourceError gets the value of InTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsSourceError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsSourceError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayErrorPacketsTotal sets the value of InTeredoRelayErrorPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelayErrorPacketsTotal(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayErrorPacketsTotal", (value)) +} + +// GetInTeredoRelayErrorPacketsTotal gets the value of InTeredoRelayErrorPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelayErrorPacketsTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayErrorPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsBubbles sets the value of InTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsBubbles(value uint32) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsBubbles", (value)) +} + +// GetInTeredoRelaySuccessPacketsBubbles gets the value of InTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsBubbles() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsBubbles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsDataPackets sets the value of InTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsDataPackets(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsDataPackets", (value)) +} + +// GetInTeredoRelaySuccessPacketsDataPackets gets the value of InTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsDataPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsDataPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsDataPacketsKernelMode sets the value of InTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsDataPacketsKernelMode(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsDataPacketsKernelMode", (value)) +} + +// GetInTeredoRelaySuccessPacketsDataPacketsKernelMode gets the value of InTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsDataPacketsKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsDataPacketsKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsDataPacketsUserMode sets the value of InTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsDataPacketsUserMode(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsDataPacketsUserMode", (value)) +} + +// GetInTeredoRelaySuccessPacketsDataPacketsUserMode gets the value of InTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsDataPacketsUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsDataPacketsUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelaySuccessPacketsTotal sets the value of InTeredoRelaySuccessPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelaySuccessPacketsTotal(value uint64) (err error) { + return instance.SetProperty("InTeredoRelaySuccessPacketsTotal", (value)) +} + +// GetInTeredoRelaySuccessPacketsTotal gets the value of InTeredoRelaySuccessPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelaySuccessPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("InTeredoRelaySuccessPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInTeredoRelayTotalPacketsSuccessError sets the value of InTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelayTotalPacketsSuccessError(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayTotalPacketsSuccessError", (value)) +} + +// GetInTeredoRelayTotalPacketsSuccessError gets the value of InTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelayTotalPacketsSuccessError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayTotalPacketsSuccessError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoRelayTotalPacketsSuccessErrorPersec sets the value of InTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyInTeredoRelayTotalPacketsSuccessErrorPersec(value uint32) (err error) { + return instance.SetProperty("InTeredoRelayTotalPacketsSuccessErrorPersec", (value)) +} + +// GetInTeredoRelayTotalPacketsSuccessErrorPersec gets the value of InTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyInTeredoRelayTotalPacketsSuccessErrorPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoRelayTotalPacketsSuccessErrorPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPackets sets the value of OutTeredoRelayErrorPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPackets(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPackets", (value)) +} + +// GetOutTeredoRelayErrorPackets gets the value of OutTeredoRelayErrorPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPacketsDestinationError sets the value of OutTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPacketsDestinationError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPacketsDestinationError", (value)) +} + +// GetOutTeredoRelayErrorPacketsDestinationError gets the value of OutTeredoRelayErrorPacketsDestinationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPacketsDestinationError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPacketsDestinationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPacketsHeaderError sets the value of OutTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPacketsHeaderError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPacketsHeaderError", (value)) +} + +// GetOutTeredoRelayErrorPacketsHeaderError gets the value of OutTeredoRelayErrorPacketsHeaderError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPacketsHeaderError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPacketsHeaderError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayErrorPacketsSourceError sets the value of OutTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelayErrorPacketsSourceError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayErrorPacketsSourceError", (value)) +} + +// GetOutTeredoRelayErrorPacketsSourceError gets the value of OutTeredoRelayErrorPacketsSourceError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelayErrorPacketsSourceError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayErrorPacketsSourceError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPackets sets the value of OutTeredoRelaySuccessPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPackets(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPackets", (value)) +} + +// GetOutTeredoRelaySuccessPackets gets the value of OutTeredoRelaySuccessPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsBubbles sets the value of OutTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsBubbles(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsBubbles", (value)) +} + +// GetOutTeredoRelaySuccessPacketsBubbles gets the value of OutTeredoRelaySuccessPacketsBubbles for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsBubbles() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsBubbles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsDataPackets sets the value of OutTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsDataPackets(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsDataPackets", (value)) +} + +// GetOutTeredoRelaySuccessPacketsDataPackets gets the value of OutTeredoRelaySuccessPacketsDataPackets for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsDataPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsDataPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsDataPacketsKernelMode sets the value of OutTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsDataPacketsKernelMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsDataPacketsKernelMode", (value)) +} + +// GetOutTeredoRelaySuccessPacketsDataPacketsKernelMode gets the value of OutTeredoRelaySuccessPacketsDataPacketsKernelMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsDataPacketsKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsDataPacketsKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelaySuccessPacketsDataPacketsUserMode sets the value of OutTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelaySuccessPacketsDataPacketsUserMode(value uint64) (err error) { + return instance.SetProperty("OutTeredoRelaySuccessPacketsDataPacketsUserMode", (value)) +} + +// GetOutTeredoRelaySuccessPacketsDataPacketsUserMode gets the value of OutTeredoRelaySuccessPacketsDataPacketsUserMode for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelaySuccessPacketsDataPacketsUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("OutTeredoRelaySuccessPacketsDataPacketsUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutTeredoRelayTotalPacketsSuccessError sets the value of OutTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelayTotalPacketsSuccessError(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayTotalPacketsSuccessError", (value)) +} + +// GetOutTeredoRelayTotalPacketsSuccessError gets the value of OutTeredoRelayTotalPacketsSuccessError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelayTotalPacketsSuccessError() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayTotalPacketsSuccessError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoRelayTotalPacketsSuccessErrorPersec sets the value of OutTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) SetPropertyOutTeredoRelayTotalPacketsSuccessErrorPersec(value uint32) (err error) { + return instance.SetProperty("OutTeredoRelayTotalPacketsSuccessErrorPersec", (value)) +} + +// GetOutTeredoRelayTotalPacketsSuccessErrorPersec gets the value of OutTeredoRelayTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfRawData_Counters_TeredoRelay) GetPropertyOutTeredoRelayTotalPacketsSuccessErrorPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoRelayTotalPacketsSuccessErrorPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoServer.go new file mode 100644 index 00000000..7ca42139 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_TeredoServer.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_TeredoServer struct +type Win32_PerfRawData_Counters_TeredoServer struct { + *Win32_PerfRawData + + // + InTeredoServerErrorPacketsAuthenticationError uint32 + + // + InTeredoServerErrorPacketsDestinationError uint32 + + // + InTeredoServerErrorPacketsHeaderError uint32 + + // + InTeredoServerErrorPacketsSourceError uint32 + + // + InTeredoServerErrorPacketsTotal uint32 + + // + InTeredoServerSuccessPacketsBubbles uint32 + + // + InTeredoServerSuccessPacketsEcho uint32 + + // + InTeredoServerSuccessPacketsRSPrimary uint32 + + // + InTeredoServerSuccessPacketsRSSecondary uint32 + + // + InTeredoServerSuccessPacketsTotal uint32 + + // + InTeredoServerTotalPacketsSuccessError uint32 + + // + InTeredoServerTotalPacketsSuccessErrorPersec uint32 + + // + OutTeredoServerRAPrimary uint32 + + // + OutTeredoServerRASecondary uint32 +} + +func NewWin32_PerfRawData_Counters_TeredoServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_TeredoServer, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_TeredoServer{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_TeredoServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_TeredoServer, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_TeredoServer{ + Win32_PerfRawData: tmp, + } + return +} + +// SetInTeredoServerErrorPacketsAuthenticationError sets the value of InTeredoServerErrorPacketsAuthenticationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsAuthenticationError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsAuthenticationError", (value)) +} + +// GetInTeredoServerErrorPacketsAuthenticationError gets the value of InTeredoServerErrorPacketsAuthenticationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsAuthenticationError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsAuthenticationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsDestinationError sets the value of InTeredoServerErrorPacketsDestinationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsDestinationError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsDestinationError", (value)) +} + +// GetInTeredoServerErrorPacketsDestinationError gets the value of InTeredoServerErrorPacketsDestinationError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsDestinationError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsDestinationError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsHeaderError sets the value of InTeredoServerErrorPacketsHeaderError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsHeaderError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsHeaderError", (value)) +} + +// GetInTeredoServerErrorPacketsHeaderError gets the value of InTeredoServerErrorPacketsHeaderError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsHeaderError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsHeaderError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsSourceError sets the value of InTeredoServerErrorPacketsSourceError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsSourceError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsSourceError", (value)) +} + +// GetInTeredoServerErrorPacketsSourceError gets the value of InTeredoServerErrorPacketsSourceError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsSourceError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsSourceError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerErrorPacketsTotal sets the value of InTeredoServerErrorPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerErrorPacketsTotal(value uint32) (err error) { + return instance.SetProperty("InTeredoServerErrorPacketsTotal", (value)) +} + +// GetInTeredoServerErrorPacketsTotal gets the value of InTeredoServerErrorPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerErrorPacketsTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerErrorPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsBubbles sets the value of InTeredoServerSuccessPacketsBubbles for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsBubbles(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsBubbles", (value)) +} + +// GetInTeredoServerSuccessPacketsBubbles gets the value of InTeredoServerSuccessPacketsBubbles for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsBubbles() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsBubbles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsEcho sets the value of InTeredoServerSuccessPacketsEcho for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsEcho(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsEcho", (value)) +} + +// GetInTeredoServerSuccessPacketsEcho gets the value of InTeredoServerSuccessPacketsEcho for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsEcho() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsEcho") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsRSPrimary sets the value of InTeredoServerSuccessPacketsRSPrimary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsRSPrimary(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsRSPrimary", (value)) +} + +// GetInTeredoServerSuccessPacketsRSPrimary gets the value of InTeredoServerSuccessPacketsRSPrimary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsRSPrimary() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsRSPrimary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsRSSecondary sets the value of InTeredoServerSuccessPacketsRSSecondary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsRSSecondary(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsRSSecondary", (value)) +} + +// GetInTeredoServerSuccessPacketsRSSecondary gets the value of InTeredoServerSuccessPacketsRSSecondary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsRSSecondary() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsRSSecondary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerSuccessPacketsTotal sets the value of InTeredoServerSuccessPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerSuccessPacketsTotal(value uint32) (err error) { + return instance.SetProperty("InTeredoServerSuccessPacketsTotal", (value)) +} + +// GetInTeredoServerSuccessPacketsTotal gets the value of InTeredoServerSuccessPacketsTotal for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerSuccessPacketsTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerSuccessPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerTotalPacketsSuccessError sets the value of InTeredoServerTotalPacketsSuccessError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerTotalPacketsSuccessError(value uint32) (err error) { + return instance.SetProperty("InTeredoServerTotalPacketsSuccessError", (value)) +} + +// GetInTeredoServerTotalPacketsSuccessError gets the value of InTeredoServerTotalPacketsSuccessError for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerTotalPacketsSuccessError() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerTotalPacketsSuccessError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInTeredoServerTotalPacketsSuccessErrorPersec sets the value of InTeredoServerTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyInTeredoServerTotalPacketsSuccessErrorPersec(value uint32) (err error) { + return instance.SetProperty("InTeredoServerTotalPacketsSuccessErrorPersec", (value)) +} + +// GetInTeredoServerTotalPacketsSuccessErrorPersec gets the value of InTeredoServerTotalPacketsSuccessErrorPersec for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyInTeredoServerTotalPacketsSuccessErrorPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InTeredoServerTotalPacketsSuccessErrorPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoServerRAPrimary sets the value of OutTeredoServerRAPrimary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyOutTeredoServerRAPrimary(value uint32) (err error) { + return instance.SetProperty("OutTeredoServerRAPrimary", (value)) +} + +// GetOutTeredoServerRAPrimary gets the value of OutTeredoServerRAPrimary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyOutTeredoServerRAPrimary() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoServerRAPrimary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutTeredoServerRASecondary sets the value of OutTeredoServerRASecondary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) SetPropertyOutTeredoServerRASecondary(value uint32) (err error) { + return instance.SetProperty("OutTeredoServerRASecondary", (value)) +} + +// GetOutTeredoServerRASecondary gets the value of OutTeredoServerRASecondary for the instance +func (instance *Win32_PerfRawData_Counters_TeredoServer) GetPropertyOutTeredoServerRASecondary() (value uint32, err error) { + retValue, err := instance.GetProperty("OutTeredoServerRASecondary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ThermalZoneInformation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ThermalZoneInformation.go new file mode 100644 index 00000000..62df8bca --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_ThermalZoneInformation.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_ThermalZoneInformation struct +type Win32_PerfRawData_Counters_ThermalZoneInformation struct { + *Win32_PerfRawData + + // + HighPrecisionTemperature uint32 + + // + PercentPassiveLimit uint32 + + // + Temperature uint32 + + // + ThrottleReasons uint32 +} + +func NewWin32_PerfRawData_Counters_ThermalZoneInformationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_ThermalZoneInformation, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_ThermalZoneInformation{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_ThermalZoneInformationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_ThermalZoneInformation, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_ThermalZoneInformation{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHighPrecisionTemperature sets the value of HighPrecisionTemperature for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) SetPropertyHighPrecisionTemperature(value uint32) (err error) { + return instance.SetProperty("HighPrecisionTemperature", (value)) +} + +// GetHighPrecisionTemperature gets the value of HighPrecisionTemperature for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) GetPropertyHighPrecisionTemperature() (value uint32, err error) { + retValue, err := instance.GetProperty("HighPrecisionTemperature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPassiveLimit sets the value of PercentPassiveLimit for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) SetPropertyPercentPassiveLimit(value uint32) (err error) { + return instance.SetProperty("PercentPassiveLimit", (value)) +} + +// GetPercentPassiveLimit gets the value of PercentPassiveLimit for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) GetPropertyPercentPassiveLimit() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentPassiveLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTemperature sets the value of Temperature for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) SetPropertyTemperature(value uint32) (err error) { + return instance.SetProperty("Temperature", (value)) +} + +// GetTemperature gets the value of Temperature for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) GetPropertyTemperature() (value uint32, err error) { + retValue, err := instance.GetProperty("Temperature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThrottleReasons sets the value of ThrottleReasons for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) SetPropertyThrottleReasons(value uint32) (err error) { + return instance.SetProperty("ThrottleReasons", (value)) +} + +// GetThrottleReasons gets the value of ThrottleReasons for the instance +func (instance *Win32_PerfRawData_Counters_ThermalZoneInformation) GetPropertyThrottleReasons() (value uint32, err error) { + retValue, err := instance.GetProperty("ThrottleReasons") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic.go new file mode 100644 index 00000000..5646fc38 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic struct { + *Win32_PerfRawData + + // + AverageInboundBytes uint64 + + // + AverageInboundForwardedMulticastPackets uint64 + + // + AverageInboundForwardedUnicastPackets uint64 + + // + AverageInboundGFTCopyFINPackets uint64 + + // + AverageInboundGFTCopyPackets uint64 + + // + AverageInboundGFTCopyResetPackets uint64 + + // + AverageInboundGFTExceptionPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadFailedPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadPendingPackets uint64 + + // + AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets uint64 + + // + AverageInboundGFTExceptionUFPackets uint64 + + // + AverageInboundGFTTotalBytes uint64 + + // + AverageInboundGFTTotalPackets uint64 + + // + AverageInboundHairPinnedPackets uint64 + + // + AverageInboundInterceptedPackets uint64 + + // + AverageInboundMissedInterceptedPackets uint64 + + // + AverageInboundNonIPPackets uint64 + + // + AverageInboundPackets uint64 + + // + AverageInboundPendingPackets uint64 + + // + AverageInboundTCPSYNACKPackets uint64 + + // + AverageInboundTCPSYNPackets uint64 + + // + AverageInboundThrottledPackets uint64 + + // + AverageInboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfRawData_Counters_VFPPortAverageInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPPortAverageInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageInboundBytes sets the value of AverageInboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundBytes(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytes", (value)) +} + +// GetAverageInboundBytes gets the value of AverageInboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundForwardedMulticastPackets sets the value of AverageInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundForwardedMulticastPackets", (value)) +} + +// GetAverageInboundForwardedMulticastPackets gets the value of AverageInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundForwardedUnicastPackets sets the value of AverageInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundForwardedUnicastPackets", (value)) +} + +// GetAverageInboundForwardedUnicastPackets gets the value of AverageInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTCopyFINPackets sets the value of AverageInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTCopyFINPackets", (value)) +} + +// GetAverageInboundGFTCopyFINPackets gets the value of AverageInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTCopyPackets sets the value of AverageInboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTCopyPackets", (value)) +} + +// GetAverageInboundGFTCopyPackets gets the value of AverageInboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTCopyResetPackets sets the value of AverageInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTCopyResetPackets", (value)) +} + +// GetAverageInboundGFTCopyResetPackets gets the value of AverageInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionPackets sets the value of AverageInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionPackets", (value)) +} + +// GetAverageInboundGFTExceptionPackets gets the value of AverageInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadBlockedPackets sets the value of AverageInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadBlockedPackets gets the value of AverageInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadDeferredPackets sets the value of AverageInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadDeferredPackets gets the value of AverageInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadedTCPPackets sets the value of AverageInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadedTCPPackets gets the value of AverageInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadedUDPPackets sets the value of AverageInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadedUDPPackets gets the value of AverageInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadFailedPackets sets the value of AverageInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadFailedPackets gets the value of AverageInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadPendingPackets sets the value of AverageInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadPendingPackets gets the value of AverageInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets sets the value of AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets gets the value of AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFOffloadRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFOffloadRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTExceptionUFPackets sets the value of AverageInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTExceptionUFPackets", (value)) +} + +// GetAverageInboundGFTExceptionUFPackets gets the value of AverageInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTTotalBytes sets the value of AverageInboundGFTTotalBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTTotalBytes(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTTotalBytes", (value)) +} + +// GetAverageInboundGFTTotalBytes gets the value of AverageInboundGFTTotalBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundGFTTotalPackets sets the value of AverageInboundGFTTotalPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundGFTTotalPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundGFTTotalPackets", (value)) +} + +// GetAverageInboundGFTTotalPackets gets the value of AverageInboundGFTTotalPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundGFTTotalPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundGFTTotalPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundHairPinnedPackets sets the value of AverageInboundHairPinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundHairPinnedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundHairPinnedPackets", (value)) +} + +// GetAverageInboundHairPinnedPackets gets the value of AverageInboundHairPinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundHairPinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundHairPinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundInterceptedPackets sets the value of AverageInboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundInterceptedPackets", (value)) +} + +// GetAverageInboundInterceptedPackets gets the value of AverageInboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundMissedInterceptedPackets sets the value of AverageInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundMissedInterceptedPackets", (value)) +} + +// GetAverageInboundMissedInterceptedPackets gets the value of AverageInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundNonIPPackets sets the value of AverageInboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundNonIPPackets", (value)) +} + +// GetAverageInboundNonIPPackets gets the value of AverageInboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPackets sets the value of AverageInboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundPackets", (value)) +} + +// GetAverageInboundPackets gets the value of AverageInboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPendingPackets sets the value of AverageInboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundPendingPackets", (value)) +} + +// GetAverageInboundPendingPackets gets the value of AverageInboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundTCPSYNACKPackets sets the value of AverageInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundTCPSYNACKPackets", (value)) +} + +// GetAverageInboundTCPSYNACKPackets gets the value of AverageInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundTCPSYNPackets sets the value of AverageInboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundTCPSYNPackets", (value)) +} + +// GetAverageInboundTCPSYNPackets gets the value of AverageInboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundThrottledPackets sets the value of AverageInboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundThrottledPackets", (value)) +} + +// GetAverageInboundThrottledPackets gets the value of AverageInboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundUnicastForwardedGFTExceptionPackets sets the value of AverageInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) SetPropertyAverageInboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageInboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetAverageInboundUnicastForwardedGFTExceptionPackets gets the value of AverageInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageInboundNetworkTraffic) GetPropertyAverageInboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic.go new file mode 100644 index 00000000..969bf5af --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic struct { + *Win32_PerfRawData + + // + AverageGFTOutboundBytes uint64 + + // + AverageOutboundBytes uint64 + + // + AverageOutboundForwardedMulticastPackets uint64 + + // + AverageOutboundForwardedUnicastPackets uint64 + + // + AverageOutboundGFTCopyFINPackets uint64 + + // + AverageOutboundGFTCopyPackets uint64 + + // + AverageOutboundGFTCopyResetPackets uint64 + + // + AverageOutboundGFTExceptionPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadFailedPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadPendingPackets uint64 + + // + AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets uint64 + + // + AverageOutboundGFTExceptionUFPackets uint64 + + // + AverageOutboundGFTPackets uint64 + + // + AverageOutboundHairpinnedPackets uint64 + + // + AverageOutboundInterceptedPackets uint64 + + // + AverageOutboundMissedInterceptedPackets uint64 + + // + AverageOutboundNonIPPackets uint64 + + // + AverageOutboundPackets uint64 + + // + AverageOutboundPendingPackets uint64 + + // + AverageOutboundTCPSYNACKPackets uint64 + + // + AverageOutboundTCPSYNPackets uint64 + + // + AverageOutboundThrottledPackets uint64 + + // + AverageOutboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageGFTOutboundBytes sets the value of AverageGFTOutboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageGFTOutboundBytes(value uint64) (err error) { + return instance.SetProperty("AverageGFTOutboundBytes", (value)) +} + +// GetAverageGFTOutboundBytes gets the value of AverageGFTOutboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageGFTOutboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageGFTOutboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytes sets the value of AverageOutboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytes(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytes", (value)) +} + +// GetAverageOutboundBytes gets the value of AverageOutboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundForwardedMulticastPackets sets the value of AverageOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundForwardedMulticastPackets", (value)) +} + +// GetAverageOutboundForwardedMulticastPackets gets the value of AverageOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundForwardedUnicastPackets sets the value of AverageOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundForwardedUnicastPackets", (value)) +} + +// GetAverageOutboundForwardedUnicastPackets gets the value of AverageOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTCopyFINPackets sets the value of AverageOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTCopyFINPackets", (value)) +} + +// GetAverageOutboundGFTCopyFINPackets gets the value of AverageOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTCopyPackets sets the value of AverageOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTCopyPackets", (value)) +} + +// GetAverageOutboundGFTCopyPackets gets the value of AverageOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTCopyResetPackets sets the value of AverageOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTCopyResetPackets", (value)) +} + +// GetAverageOutboundGFTCopyResetPackets gets the value of AverageOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionPackets sets the value of AverageOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionPackets", (value)) +} + +// GetAverageOutboundGFTExceptionPackets gets the value of AverageOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadBlockedPackets sets the value of AverageOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadBlockedPackets gets the value of AverageOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadDeferredPackets sets the value of AverageOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadDeferredPackets gets the value of AverageOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadedTCPPackets sets the value of AverageOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadedTCPPackets gets the value of AverageOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadedUDPPackets sets the value of AverageOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadedUDPPackets gets the value of AverageOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadFailedPackets sets the value of AverageOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadFailedPackets gets the value of AverageOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadPendingPackets sets the value of AverageOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadPendingPackets gets the value of AverageOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets sets the value of AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets gets the value of AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFOffloadRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTExceptionUFPackets sets the value of AverageOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTExceptionUFPackets", (value)) +} + +// GetAverageOutboundGFTExceptionUFPackets gets the value of AverageOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundGFTPackets sets the value of AverageOutboundGFTPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundGFTPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundGFTPackets", (value)) +} + +// GetAverageOutboundGFTPackets gets the value of AverageOutboundGFTPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundGFTPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundGFTPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundHairpinnedPackets sets the value of AverageOutboundHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundHairpinnedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundHairpinnedPackets", (value)) +} + +// GetAverageOutboundHairpinnedPackets gets the value of AverageOutboundHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundHairpinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundInterceptedPackets sets the value of AverageOutboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundInterceptedPackets", (value)) +} + +// GetAverageOutboundInterceptedPackets gets the value of AverageOutboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundMissedInterceptedPackets sets the value of AverageOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundMissedInterceptedPackets", (value)) +} + +// GetAverageOutboundMissedInterceptedPackets gets the value of AverageOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundNonIPPackets sets the value of AverageOutboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundNonIPPackets", (value)) +} + +// GetAverageOutboundNonIPPackets gets the value of AverageOutboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPackets sets the value of AverageOutboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPackets", (value)) +} + +// GetAverageOutboundPackets gets the value of AverageOutboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPendingPackets sets the value of AverageOutboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPendingPackets", (value)) +} + +// GetAverageOutboundPendingPackets gets the value of AverageOutboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundTCPSYNACKPackets sets the value of AverageOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundTCPSYNACKPackets", (value)) +} + +// GetAverageOutboundTCPSYNACKPackets gets the value of AverageOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundTCPSYNPackets sets the value of AverageOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundTCPSYNPackets", (value)) +} + +// GetAverageOutboundTCPSYNPackets gets the value of AverageOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundThrottledPackets sets the value of AverageOutboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundThrottledPackets", (value)) +} + +// GetAverageOutboundThrottledPackets gets the value of AverageOutboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundUnicastForwardedGFTExceptionPackets sets the value of AverageOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) SetPropertyAverageOutboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("AverageOutboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetAverageOutboundUnicastForwardedGFTExceptionPackets gets the value of AverageOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortAverageOutboundNetworkTraffic) GetPropertyAverageOutboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go new file mode 100644 index 00000000..5b4048ad --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets struct +type Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets struct { + *Win32_PerfRawData + + // + TotalInboundDroppedACLPackets uint64 + + // + TotalInboundDroppedARPFilterPackets uint64 + + // + TotalInboundDroppedARPGuardPackets uint64 + + // + TotalInboundDroppedARPLimiterPackets uint64 + + // + TotalInboundDroppedBlockedPackets uint64 + + // + TotalInboundDroppedBroadcastPackets uint64 + + // + TotalInboundDroppedDHCPGuardPackets uint64 + + // + TotalInboundDroppedDHCPLimiterPackets uint64 + + // + TotalInboundDroppedForwardingPackets uint64 + + // + TotalInboundDroppedGFTCopyPackets uint64 + + // + TotalInboundDroppedGFTExceptionPackets uint64 + + // + TotalInboundDroppedInvalidPackets uint64 + + // + TotalInboundDroppedInvalidRuleMatchPackets uint64 + + // + TotalInboundDroppedIPV4SpoofingPackets uint64 + + // + TotalInboundDroppedIPV6SpoofingPackets uint64 + + // + TotalInboundDroppedMACSpoofingPackets uint64 + + // + TotalInboundDroppedMalformedPackets uint64 + + // + TotalInboundDroppedMonitoringPingPackets uint64 + + // + TotalInboundDroppedNonIPPackets uint64 + + // + TotalInboundDroppedNoResourcePackets uint64 + + // + TotalInboundDroppedPackets uint64 + + // + TotalInboundDroppedPendingPackets uint64 + + // + TotalInboundDroppedSimulationPackets uint64 +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPacketsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPacketsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalInboundDroppedACLPackets sets the value of TotalInboundDroppedACLPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedACLPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedACLPackets", (value)) +} + +// GetTotalInboundDroppedACLPackets gets the value of TotalInboundDroppedACLPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedACLPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedACLPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedARPFilterPackets sets the value of TotalInboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedARPFilterPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedARPFilterPackets", (value)) +} + +// GetTotalInboundDroppedARPFilterPackets gets the value of TotalInboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedARPFilterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedARPFilterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedARPGuardPackets sets the value of TotalInboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedARPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedARPGuardPackets", (value)) +} + +// GetTotalInboundDroppedARPGuardPackets gets the value of TotalInboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedARPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedARPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedARPLimiterPackets sets the value of TotalInboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedARPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedARPLimiterPackets", (value)) +} + +// GetTotalInboundDroppedARPLimiterPackets gets the value of TotalInboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedARPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedARPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedBlockedPackets sets the value of TotalInboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedBlockedPackets", (value)) +} + +// GetTotalInboundDroppedBlockedPackets gets the value of TotalInboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedBroadcastPackets sets the value of TotalInboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedBroadcastPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedBroadcastPackets", (value)) +} + +// GetTotalInboundDroppedBroadcastPackets gets the value of TotalInboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedBroadcastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedBroadcastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedDHCPGuardPackets sets the value of TotalInboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedDHCPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedDHCPGuardPackets", (value)) +} + +// GetTotalInboundDroppedDHCPGuardPackets gets the value of TotalInboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedDHCPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedDHCPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedDHCPLimiterPackets sets the value of TotalInboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedDHCPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedDHCPLimiterPackets", (value)) +} + +// GetTotalInboundDroppedDHCPLimiterPackets gets the value of TotalInboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedDHCPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedDHCPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedForwardingPackets sets the value of TotalInboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedForwardingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedForwardingPackets", (value)) +} + +// GetTotalInboundDroppedForwardingPackets gets the value of TotalInboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedForwardingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedForwardingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedGFTCopyPackets sets the value of TotalInboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedGFTCopyPackets", (value)) +} + +// GetTotalInboundDroppedGFTCopyPackets gets the value of TotalInboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedGFTExceptionPackets sets the value of TotalInboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedGFTExceptionPackets", (value)) +} + +// GetTotalInboundDroppedGFTExceptionPackets gets the value of TotalInboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedInvalidPackets sets the value of TotalInboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedInvalidPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedInvalidPackets", (value)) +} + +// GetTotalInboundDroppedInvalidPackets gets the value of TotalInboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedInvalidPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedInvalidPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedInvalidRuleMatchPackets sets the value of TotalInboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedInvalidRuleMatchPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedInvalidRuleMatchPackets", (value)) +} + +// GetTotalInboundDroppedInvalidRuleMatchPackets gets the value of TotalInboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedInvalidRuleMatchPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedInvalidRuleMatchPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedIPV4SpoofingPackets sets the value of TotalInboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedIPV4SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedIPV4SpoofingPackets", (value)) +} + +// GetTotalInboundDroppedIPV4SpoofingPackets gets the value of TotalInboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedIPV4SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedIPV4SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedIPV6SpoofingPackets sets the value of TotalInboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedIPV6SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedIPV6SpoofingPackets", (value)) +} + +// GetTotalInboundDroppedIPV6SpoofingPackets gets the value of TotalInboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedIPV6SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedIPV6SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedMACSpoofingPackets sets the value of TotalInboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedMACSpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedMACSpoofingPackets", (value)) +} + +// GetTotalInboundDroppedMACSpoofingPackets gets the value of TotalInboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedMACSpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedMACSpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedMalformedPackets sets the value of TotalInboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedMalformedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedMalformedPackets", (value)) +} + +// GetTotalInboundDroppedMalformedPackets gets the value of TotalInboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedMalformedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedMalformedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedMonitoringPingPackets sets the value of TotalInboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedMonitoringPingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedMonitoringPingPackets", (value)) +} + +// GetTotalInboundDroppedMonitoringPingPackets gets the value of TotalInboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedMonitoringPingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedMonitoringPingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedNonIPPackets sets the value of TotalInboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedNonIPPackets", (value)) +} + +// GetTotalInboundDroppedNonIPPackets gets the value of TotalInboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedNoResourcePackets sets the value of TotalInboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedNoResourcePackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedNoResourcePackets", (value)) +} + +// GetTotalInboundDroppedNoResourcePackets gets the value of TotalInboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedNoResourcePackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedNoResourcePackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedPackets sets the value of TotalInboundDroppedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedPackets", (value)) +} + +// GetTotalInboundDroppedPackets gets the value of TotalInboundDroppedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedPendingPackets sets the value of TotalInboundDroppedPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedPendingPackets", (value)) +} + +// GetTotalInboundDroppedPendingPackets gets the value of TotalInboundDroppedPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundDroppedSimulationPackets sets the value of TotalInboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) SetPropertyTotalInboundDroppedSimulationPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundDroppedSimulationPackets", (value)) +} + +// GetTotalInboundDroppedSimulationPackets gets the value of TotalInboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundDroppedNetworkPackets) GetPropertyTotalInboundDroppedSimulationPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundDroppedSimulationPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic.go new file mode 100644 index 00000000..59a37328 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic struct { + *Win32_PerfRawData + + // + TotalInboundBytes uint64 + + // + TotalInboundForwardedMulticastPackets uint64 + + // + TotalInboundForwardedUnicastPackets uint64 + + // + TotalInboundGFTBytes uint64 + + // + TotalInboundGFTCopyFINPackets uint64 + + // + TotalInboundGFTCopyPackets uint64 + + // + TotalInboundGFTCopyResetPackets uint64 + + // + TotalInboundGFTExceptionPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadFailedPackets uint64 + + // + TotalInboundGFTExceptionUFOffloadPendingPackets uint64 + + // + TotalInboundGFTExceptionUFPackets uint64 + + // + TotalInboundGFTExceptionUFRetryAwaitingPackets uint64 + + // + TotalInboundGFTPackets uint64 + + // + TotalInboundHairpinnedPackets uint64 + + // + TotalInboundInterceptedPackets uint64 + + // + TotalInboundMissedInterceptedPackets uint64 + + // + TotalInboundNonIPPackets uint64 + + // + TotalInboundPackets uint64 + + // + TotalInboundPendingPackets uint64 + + // + TotalInboundTCPSYNACKPackets uint64 + + // + TotalInboundTCPSYNPackets uint64 + + // + TotalInboundThrottledPackets uint64 + + // + TotalInboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalInboundBytes sets the value of TotalInboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundBytes(value uint64) (err error) { + return instance.SetProperty("TotalInboundBytes", (value)) +} + +// GetTotalInboundBytes gets the value of TotalInboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundForwardedMulticastPackets sets the value of TotalInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundForwardedMulticastPackets", (value)) +} + +// GetTotalInboundForwardedMulticastPackets gets the value of TotalInboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundForwardedUnicastPackets sets the value of TotalInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundForwardedUnicastPackets", (value)) +} + +// GetTotalInboundForwardedUnicastPackets gets the value of TotalInboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTBytes sets the value of TotalInboundGFTBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTBytes(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTBytes", (value)) +} + +// GetTotalInboundGFTBytes gets the value of TotalInboundGFTBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTCopyFINPackets sets the value of TotalInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTCopyFINPackets", (value)) +} + +// GetTotalInboundGFTCopyFINPackets gets the value of TotalInboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTCopyPackets sets the value of TotalInboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTCopyPackets", (value)) +} + +// GetTotalInboundGFTCopyPackets gets the value of TotalInboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTCopyResetPackets sets the value of TotalInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTCopyResetPackets", (value)) +} + +// GetTotalInboundGFTCopyResetPackets gets the value of TotalInboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionPackets sets the value of TotalInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionPackets", (value)) +} + +// GetTotalInboundGFTExceptionPackets gets the value of TotalInboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadBlockedPackets sets the value of TotalInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadBlockedPackets gets the value of TotalInboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadDeferredPackets sets the value of TotalInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadDeferredPackets gets the value of TotalInboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadedTCPPackets sets the value of TotalInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadedTCPPackets gets the value of TotalInboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadedUDPPackets sets the value of TotalInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadedUDPPackets gets the value of TotalInboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadFailedPackets sets the value of TotalInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadFailedPackets gets the value of TotalInboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFOffloadPendingPackets sets the value of TotalInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFOffloadPendingPackets gets the value of TotalInboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFPackets sets the value of TotalInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFPackets gets the value of TotalInboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTExceptionUFRetryAwaitingPackets sets the value of TotalInboundGFTExceptionUFRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTExceptionUFRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTExceptionUFRetryAwaitingPackets", (value)) +} + +// GetTotalInboundGFTExceptionUFRetryAwaitingPackets gets the value of TotalInboundGFTExceptionUFRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTExceptionUFRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTExceptionUFRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundGFTPackets sets the value of TotalInboundGFTPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundGFTPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundGFTPackets", (value)) +} + +// GetTotalInboundGFTPackets gets the value of TotalInboundGFTPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundGFTPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundGFTPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundHairpinnedPackets sets the value of TotalInboundHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundHairpinnedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundHairpinnedPackets", (value)) +} + +// GetTotalInboundHairpinnedPackets gets the value of TotalInboundHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundHairpinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundInterceptedPackets sets the value of TotalInboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundInterceptedPackets", (value)) +} + +// GetTotalInboundInterceptedPackets gets the value of TotalInboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundMissedInterceptedPackets sets the value of TotalInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundMissedInterceptedPackets", (value)) +} + +// GetTotalInboundMissedInterceptedPackets gets the value of TotalInboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundNonIPPackets sets the value of TotalInboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundNonIPPackets", (value)) +} + +// GetTotalInboundNonIPPackets gets the value of TotalInboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundPackets sets the value of TotalInboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundPackets", (value)) +} + +// GetTotalInboundPackets gets the value of TotalInboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundPendingPackets sets the value of TotalInboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundPendingPackets", (value)) +} + +// GetTotalInboundPendingPackets gets the value of TotalInboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundTCPSYNACKPackets sets the value of TotalInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundTCPSYNACKPackets", (value)) +} + +// GetTotalInboundTCPSYNACKPackets gets the value of TotalInboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundTCPSYNPackets sets the value of TotalInboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundTCPSYNPackets", (value)) +} + +// GetTotalInboundTCPSYNPackets gets the value of TotalInboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundThrottledPackets sets the value of TotalInboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundThrottledPackets", (value)) +} + +// GetTotalInboundThrottledPackets gets the value of TotalInboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundUnicastForwardedGFTExceptionPackets sets the value of TotalInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) SetPropertyTotalInboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalInboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetTotalInboundUnicastForwardedGFTExceptionPackets gets the value of TotalInboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalInboundNetworkTraffic) GetPropertyTotalInboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go new file mode 100644 index 00000000..51689ee6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets struct +type Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets struct { + *Win32_PerfRawData + + // + TotalOutboundDroppedACLPackets uint64 + + // + TotalOutboundDroppedARPFilterPackets uint64 + + // + TotalOutboundDroppedARPGuardPackets uint64 + + // + TotalOutboundDroppedARPLimiterPackets uint64 + + // + TotalOutboundDroppedBlockedPackets uint64 + + // + TotalOutboundDroppedBroadcastPackets uint64 + + // + TotalOutboundDroppedDHCPGuardPackets uint64 + + // + TotalOutboundDroppedDHCPLimiterPackets uint64 + + // + TotalOutboundDroppedForwardingPackets uint64 + + // + TotalOutboundDroppedGFTCopyPackets uint64 + + // + TotalOutboundDroppedGFTExceptionPackets uint64 + + // + TotalOutboundDroppedInvalidPackets uint64 + + // + TotalOutboundDroppedInvalidRuleMatchPackets uint64 + + // + TotalOutboundDroppedIPV4SpoofingPackets uint64 + + // + TotalOutboundDroppedIPV6SpoofingPackets uint64 + + // + TotalOutboundDroppedMACSpoofingPackets uint64 + + // + TotalOutboundDroppedMalformedPackets uint64 + + // + TotalOutboundDroppedMonitoringPingPackets uint64 + + // + TotalOutboundDroppedNonIPPackets uint64 + + // + TotalOutboundDroppedNoResourcePackets uint64 + + // + TotalOutboundDroppedPackets uint64 + + // + TotalOutboundDroppedPendingPackets uint64 + + // + TotalOutboundDroppedSimulationPackets uint64 +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPacketsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPacketsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalOutboundDroppedACLPackets sets the value of TotalOutboundDroppedACLPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedACLPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedACLPackets", (value)) +} + +// GetTotalOutboundDroppedACLPackets gets the value of TotalOutboundDroppedACLPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedACLPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedACLPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedARPFilterPackets sets the value of TotalOutboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedARPFilterPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedARPFilterPackets", (value)) +} + +// GetTotalOutboundDroppedARPFilterPackets gets the value of TotalOutboundDroppedARPFilterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedARPFilterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedARPFilterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedARPGuardPackets sets the value of TotalOutboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedARPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedARPGuardPackets", (value)) +} + +// GetTotalOutboundDroppedARPGuardPackets gets the value of TotalOutboundDroppedARPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedARPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedARPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedARPLimiterPackets sets the value of TotalOutboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedARPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedARPLimiterPackets", (value)) +} + +// GetTotalOutboundDroppedARPLimiterPackets gets the value of TotalOutboundDroppedARPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedARPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedARPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedBlockedPackets sets the value of TotalOutboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedBlockedPackets", (value)) +} + +// GetTotalOutboundDroppedBlockedPackets gets the value of TotalOutboundDroppedBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedBroadcastPackets sets the value of TotalOutboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedBroadcastPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedBroadcastPackets", (value)) +} + +// GetTotalOutboundDroppedBroadcastPackets gets the value of TotalOutboundDroppedBroadcastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedBroadcastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedBroadcastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedDHCPGuardPackets sets the value of TotalOutboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedDHCPGuardPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedDHCPGuardPackets", (value)) +} + +// GetTotalOutboundDroppedDHCPGuardPackets gets the value of TotalOutboundDroppedDHCPGuardPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedDHCPGuardPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedDHCPGuardPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedDHCPLimiterPackets sets the value of TotalOutboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedDHCPLimiterPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedDHCPLimiterPackets", (value)) +} + +// GetTotalOutboundDroppedDHCPLimiterPackets gets the value of TotalOutboundDroppedDHCPLimiterPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedDHCPLimiterPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedDHCPLimiterPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedForwardingPackets sets the value of TotalOutboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedForwardingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedForwardingPackets", (value)) +} + +// GetTotalOutboundDroppedForwardingPackets gets the value of TotalOutboundDroppedForwardingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedForwardingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedForwardingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedGFTCopyPackets sets the value of TotalOutboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedGFTCopyPackets", (value)) +} + +// GetTotalOutboundDroppedGFTCopyPackets gets the value of TotalOutboundDroppedGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedGFTExceptionPackets sets the value of TotalOutboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedGFTExceptionPackets", (value)) +} + +// GetTotalOutboundDroppedGFTExceptionPackets gets the value of TotalOutboundDroppedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedInvalidPackets sets the value of TotalOutboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedInvalidPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedInvalidPackets", (value)) +} + +// GetTotalOutboundDroppedInvalidPackets gets the value of TotalOutboundDroppedInvalidPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedInvalidPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedInvalidPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedInvalidRuleMatchPackets sets the value of TotalOutboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedInvalidRuleMatchPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedInvalidRuleMatchPackets", (value)) +} + +// GetTotalOutboundDroppedInvalidRuleMatchPackets gets the value of TotalOutboundDroppedInvalidRuleMatchPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedInvalidRuleMatchPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedInvalidRuleMatchPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedIPV4SpoofingPackets sets the value of TotalOutboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedIPV4SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedIPV4SpoofingPackets", (value)) +} + +// GetTotalOutboundDroppedIPV4SpoofingPackets gets the value of TotalOutboundDroppedIPV4SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedIPV4SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedIPV4SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedIPV6SpoofingPackets sets the value of TotalOutboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedIPV6SpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedIPV6SpoofingPackets", (value)) +} + +// GetTotalOutboundDroppedIPV6SpoofingPackets gets the value of TotalOutboundDroppedIPV6SpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedIPV6SpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedIPV6SpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedMACSpoofingPackets sets the value of TotalOutboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedMACSpoofingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedMACSpoofingPackets", (value)) +} + +// GetTotalOutboundDroppedMACSpoofingPackets gets the value of TotalOutboundDroppedMACSpoofingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedMACSpoofingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedMACSpoofingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedMalformedPackets sets the value of TotalOutboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedMalformedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedMalformedPackets", (value)) +} + +// GetTotalOutboundDroppedMalformedPackets gets the value of TotalOutboundDroppedMalformedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedMalformedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedMalformedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedMonitoringPingPackets sets the value of TotalOutboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedMonitoringPingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedMonitoringPingPackets", (value)) +} + +// GetTotalOutboundDroppedMonitoringPingPackets gets the value of TotalOutboundDroppedMonitoringPingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedMonitoringPingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedMonitoringPingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedNonIPPackets sets the value of TotalOutboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedNonIPPackets", (value)) +} + +// GetTotalOutboundDroppedNonIPPackets gets the value of TotalOutboundDroppedNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedNoResourcePackets sets the value of TotalOutboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedNoResourcePackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedNoResourcePackets", (value)) +} + +// GetTotalOutboundDroppedNoResourcePackets gets the value of TotalOutboundDroppedNoResourcePackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedNoResourcePackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedNoResourcePackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedPackets sets the value of TotalOutboundDroppedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedPackets", (value)) +} + +// GetTotalOutboundDroppedPackets gets the value of TotalOutboundDroppedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedPendingPackets sets the value of TotalOutboundDroppedPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedPendingPackets", (value)) +} + +// GetTotalOutboundDroppedPendingPackets gets the value of TotalOutboundDroppedPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundDroppedSimulationPackets sets the value of TotalOutboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) SetPropertyTotalOutboundDroppedSimulationPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundDroppedSimulationPackets", (value)) +} + +// GetTotalOutboundDroppedSimulationPackets gets the value of TotalOutboundDroppedSimulationPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundDroppedNetworkPackets) GetPropertyTotalOutboundDroppedSimulationPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundDroppedSimulationPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic.go new file mode 100644 index 00000000..19dfa327 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic struct { + *Win32_PerfRawData + + // + TotalOutboundBytes uint64 + + // + TotalOutboundForwardedMulticastPackets uint64 + + // + TotalOutboundForwardedUnicastPackets uint64 + + // + TotalOutboundGFTBytes uint64 + + // + TotalOutboundGFTCopyFINPackets uint64 + + // + TotalOutboundGFTCopyPackets uint64 + + // + TotalOutboundGFTCopyResetPackets uint64 + + // + TotalOutboundGFTExceptionPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadBlockedPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadDeferredPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadedTCPPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadedUDPPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadFailedPackets uint64 + + // + TotalOutboundGFTExceptionUFOffloadPendingPackets uint64 + + // + TotalOutboundGFTExceptionUFPackets uint64 + + // + TotalOutboundGFTRetryAwaitingPackets uint64 + + // + TotalOutboundGftTotalPackets uint64 + + // + TotalOutboundHairPinnedPackets uint64 + + // + TotalOutboundInterceptedPackets uint64 + + // + TotalOutboundMissedInterceptedPackets uint64 + + // + TotalOutboundNonIPPackets uint64 + + // + TotalOutboundPackets uint64 + + // + TotalOutboundPendingPackets uint64 + + // + TotalOutboundTCPSYNACKPackets uint64 + + // + TotalOutboundTCPSYNPackets uint64 + + // + TotalOutboundThrottledPackets uint64 + + // + TotalOutboundUnicastForwardedGFTExceptionPackets uint64 +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalOutboundBytes sets the value of TotalOutboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundBytes(value uint64) (err error) { + return instance.SetProperty("TotalOutboundBytes", (value)) +} + +// GetTotalOutboundBytes gets the value of TotalOutboundBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundForwardedMulticastPackets sets the value of TotalOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundForwardedMulticastPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundForwardedMulticastPackets", (value)) +} + +// GetTotalOutboundForwardedMulticastPackets gets the value of TotalOutboundForwardedMulticastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundForwardedMulticastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundForwardedMulticastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundForwardedUnicastPackets sets the value of TotalOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundForwardedUnicastPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundForwardedUnicastPackets", (value)) +} + +// GetTotalOutboundForwardedUnicastPackets gets the value of TotalOutboundForwardedUnicastPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundForwardedUnicastPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundForwardedUnicastPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTBytes sets the value of TotalOutboundGFTBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTBytes(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTBytes", (value)) +} + +// GetTotalOutboundGFTBytes gets the value of TotalOutboundGFTBytes for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTCopyFINPackets sets the value of TotalOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTCopyFINPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTCopyFINPackets", (value)) +} + +// GetTotalOutboundGFTCopyFINPackets gets the value of TotalOutboundGFTCopyFINPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTCopyFINPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTCopyFINPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTCopyPackets sets the value of TotalOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTCopyPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTCopyPackets", (value)) +} + +// GetTotalOutboundGFTCopyPackets gets the value of TotalOutboundGFTCopyPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTCopyPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTCopyPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTCopyResetPackets sets the value of TotalOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTCopyResetPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTCopyResetPackets", (value)) +} + +// GetTotalOutboundGFTCopyResetPackets gets the value of TotalOutboundGFTCopyResetPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTCopyResetPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTCopyResetPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionPackets sets the value of TotalOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionPackets", (value)) +} + +// GetTotalOutboundGFTExceptionPackets gets the value of TotalOutboundGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadBlockedPackets sets the value of TotalOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadBlockedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadBlockedPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadBlockedPackets gets the value of TotalOutboundGFTExceptionUFOffloadBlockedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadBlockedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadBlockedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadDeferredPackets sets the value of TotalOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadDeferredPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadDeferredPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadDeferredPackets gets the value of TotalOutboundGFTExceptionUFOffloadDeferredPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadDeferredPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadDeferredPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadedTCPPackets sets the value of TotalOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadedTCPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadedTCPPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadedTCPPackets gets the value of TotalOutboundGFTExceptionUFOffloadedTCPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadedTCPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadedTCPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadedUDPPackets sets the value of TotalOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadedUDPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadedUDPPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadedUDPPackets gets the value of TotalOutboundGFTExceptionUFOffloadedUDPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadedUDPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadedUDPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadFailedPackets sets the value of TotalOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadFailedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadFailedPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadFailedPackets gets the value of TotalOutboundGFTExceptionUFOffloadFailedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadFailedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadFailedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFOffloadPendingPackets sets the value of TotalOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFOffloadPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFOffloadPendingPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFOffloadPendingPackets gets the value of TotalOutboundGFTExceptionUFOffloadPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFOffloadPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFOffloadPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTExceptionUFPackets sets the value of TotalOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTExceptionUFPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTExceptionUFPackets", (value)) +} + +// GetTotalOutboundGFTExceptionUFPackets gets the value of TotalOutboundGFTExceptionUFPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTExceptionUFPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTExceptionUFPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGFTRetryAwaitingPackets sets the value of TotalOutboundGFTRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGFTRetryAwaitingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGFTRetryAwaitingPackets", (value)) +} + +// GetTotalOutboundGFTRetryAwaitingPackets gets the value of TotalOutboundGFTRetryAwaitingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGFTRetryAwaitingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGFTRetryAwaitingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundGftTotalPackets sets the value of TotalOutboundGftTotalPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundGftTotalPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundGftTotalPackets", (value)) +} + +// GetTotalOutboundGftTotalPackets gets the value of TotalOutboundGftTotalPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundGftTotalPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundGftTotalPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundHairPinnedPackets sets the value of TotalOutboundHairPinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundHairPinnedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundHairPinnedPackets", (value)) +} + +// GetTotalOutboundHairPinnedPackets gets the value of TotalOutboundHairPinnedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundHairPinnedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundHairPinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundInterceptedPackets sets the value of TotalOutboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundInterceptedPackets", (value)) +} + +// GetTotalOutboundInterceptedPackets gets the value of TotalOutboundInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundMissedInterceptedPackets sets the value of TotalOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundMissedInterceptedPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundMissedInterceptedPackets", (value)) +} + +// GetTotalOutboundMissedInterceptedPackets gets the value of TotalOutboundMissedInterceptedPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundMissedInterceptedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundMissedInterceptedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundNonIPPackets sets the value of TotalOutboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundNonIPPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundNonIPPackets", (value)) +} + +// GetTotalOutboundNonIPPackets gets the value of TotalOutboundNonIPPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundNonIPPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundNonIPPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundPackets sets the value of TotalOutboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundPackets", (value)) +} + +// GetTotalOutboundPackets gets the value of TotalOutboundPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundPendingPackets sets the value of TotalOutboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundPendingPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundPendingPackets", (value)) +} + +// GetTotalOutboundPendingPackets gets the value of TotalOutboundPendingPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundPendingPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundPendingPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundTCPSYNACKPackets sets the value of TotalOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundTCPSYNACKPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundTCPSYNACKPackets", (value)) +} + +// GetTotalOutboundTCPSYNACKPackets gets the value of TotalOutboundTCPSYNACKPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundTCPSYNACKPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundTCPSYNACKPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundTCPSYNPackets sets the value of TotalOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundTCPSYNPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundTCPSYNPackets", (value)) +} + +// GetTotalOutboundTCPSYNPackets gets the value of TotalOutboundTCPSYNPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundTCPSYNPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundTCPSYNPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundThrottledPackets sets the value of TotalOutboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundThrottledPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundThrottledPackets", (value)) +} + +// GetTotalOutboundThrottledPackets gets the value of TotalOutboundThrottledPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundThrottledPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundThrottledPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundUnicastForwardedGFTExceptionPackets sets the value of TotalOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) SetPropertyTotalOutboundUnicastForwardedGFTExceptionPackets(value uint64) (err error) { + return instance.SetProperty("TotalOutboundUnicastForwardedGFTExceptionPackets", (value)) +} + +// GetTotalOutboundUnicastForwardedGFTExceptionPackets gets the value of TotalOutboundUnicastForwardedGFTExceptionPackets for the instance +func (instance *Win32_PerfRawData_Counters_VFPPortTotalOutboundNetworkTraffic) GetPropertyTotalOutboundUnicastForwardedGFTExceptionPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundUnicastForwardedGFTExceptionPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go new file mode 100644 index 00000000..1e9a77e6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic struct { + *Win32_PerfRawData + + // + AverageInboundBytesAllowedThroughtheQueue uint64 + + // + AverageInboundBytesDropped uint64 + + // + AverageInboundBytesEnteringtheQueue uint64 + + // + AverageInboundBytesQueuedduetoBacklog uint64 + + // + AverageInboundBytesQueuedduetoInsufficientTokens uint64 + + // + AverageInboundBytesResumed uint64 + + // + AverageInboundPacketsAllowedThroughtheQueue uint64 + + // + AverageInboundPacketsDropped uint64 + + // + AverageInboundPacketsEnteringtheQueue uint64 + + // + AverageInboundPacketsQueuedduetoBacklog uint64 + + // + AverageInboundPacketsQueuedduetoInsufficientTokens uint64 + + // + AverageInboundPacketsResumed uint64 +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageInboundBytesAllowedThroughtheQueue sets the value of AverageInboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesAllowedThroughtheQueue", (value)) +} + +// GetAverageInboundBytesAllowedThroughtheQueue gets the value of AverageInboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesDropped sets the value of AverageInboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesDropped", (value)) +} + +// GetAverageInboundBytesDropped gets the value of AverageInboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesEnteringtheQueue sets the value of AverageInboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesEnteringtheQueue", (value)) +} + +// GetAverageInboundBytesEnteringtheQueue gets the value of AverageInboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesQueuedduetoBacklog sets the value of AverageInboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesQueuedduetoBacklog", (value)) +} + +// GetAverageInboundBytesQueuedduetoBacklog gets the value of AverageInboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesQueuedduetoInsufficientTokens sets the value of AverageInboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageInboundBytesQueuedduetoInsufficientTokens gets the value of AverageInboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundBytesResumed sets the value of AverageInboundBytesResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundBytesResumed(value uint64) (err error) { + return instance.SetProperty("AverageInboundBytesResumed", (value)) +} + +// GetAverageInboundBytesResumed gets the value of AverageInboundBytesResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundBytesResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundBytesResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsAllowedThroughtheQueue sets the value of AverageInboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsAllowedThroughtheQueue", (value)) +} + +// GetAverageInboundPacketsAllowedThroughtheQueue gets the value of AverageInboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsDropped sets the value of AverageInboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsDropped", (value)) +} + +// GetAverageInboundPacketsDropped gets the value of AverageInboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsEnteringtheQueue sets the value of AverageInboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsEnteringtheQueue", (value)) +} + +// GetAverageInboundPacketsEnteringtheQueue gets the value of AverageInboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsQueuedduetoBacklog sets the value of AverageInboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsQueuedduetoBacklog", (value)) +} + +// GetAverageInboundPacketsQueuedduetoBacklog gets the value of AverageInboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsQueuedduetoInsufficientTokens sets the value of AverageInboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageInboundPacketsQueuedduetoInsufficientTokens gets the value of AverageInboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageInboundPacketsResumed sets the value of AverageInboundPacketsResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) SetPropertyAverageInboundPacketsResumed(value uint64) (err error) { + return instance.SetProperty("AverageInboundPacketsResumed", (value)) +} + +// GetAverageInboundPacketsResumed gets the value of AverageInboundPacketsResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageInboundNetworkTraffic) GetPropertyAverageInboundPacketsResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageInboundPacketsResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go new file mode 100644 index 00000000..5a6677ab --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic struct { + *Win32_PerfRawData + + // + AverageOutboundBytesAllowedThroughtheQueue uint64 + + // + AverageOutboundBytesDropped uint64 + + // + AverageOutboundBytesEnteringtheQueue uint64 + + // + AverageOutboundBytesQueuedduetoBacklog uint64 + + // + AverageOutboundBytesQueuedduetoInsufficientTokens uint64 + + // + AverageOutboundBytesResumed uint64 + + // + AverageOutboundPacketsAllowedThroughtheQueue uint64 + + // + AverageOutboundPacketsDropped uint64 + + // + AverageOutboundPacketsEnteringtheQueue uint64 + + // + AverageOutboundPacketsQueuedduetoBacklog uint64 + + // + AverageOutboundPacketsQueuedduetoInsufficientTokens uint64 + + // + AverageOutboundPacketsResumed uint64 +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageOutboundBytesAllowedThroughtheQueue sets the value of AverageOutboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesAllowedThroughtheQueue", (value)) +} + +// GetAverageOutboundBytesAllowedThroughtheQueue gets the value of AverageOutboundBytesAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesDropped sets the value of AverageOutboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesDropped", (value)) +} + +// GetAverageOutboundBytesDropped gets the value of AverageOutboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesEnteringtheQueue sets the value of AverageOutboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesEnteringtheQueue", (value)) +} + +// GetAverageOutboundBytesEnteringtheQueue gets the value of AverageOutboundBytesEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesQueuedduetoBacklog sets the value of AverageOutboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesQueuedduetoBacklog", (value)) +} + +// GetAverageOutboundBytesQueuedduetoBacklog gets the value of AverageOutboundBytesQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesQueuedduetoInsufficientTokens sets the value of AverageOutboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageOutboundBytesQueuedduetoInsufficientTokens gets the value of AverageOutboundBytesQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundBytesResumed sets the value of AverageOutboundBytesResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundBytesResumed(value uint64) (err error) { + return instance.SetProperty("AverageOutboundBytesResumed", (value)) +} + +// GetAverageOutboundBytesResumed gets the value of AverageOutboundBytesResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundBytesResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundBytesResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsAllowedThroughtheQueue sets the value of AverageOutboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsAllowedThroughtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsAllowedThroughtheQueue", (value)) +} + +// GetAverageOutboundPacketsAllowedThroughtheQueue gets the value of AverageOutboundPacketsAllowedThroughtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsAllowedThroughtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsAllowedThroughtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsDropped sets the value of AverageOutboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsDropped", (value)) +} + +// GetAverageOutboundPacketsDropped gets the value of AverageOutboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsEnteringtheQueue sets the value of AverageOutboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsEnteringtheQueue(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsEnteringtheQueue", (value)) +} + +// GetAverageOutboundPacketsEnteringtheQueue gets the value of AverageOutboundPacketsEnteringtheQueue for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsEnteringtheQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsEnteringtheQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsQueuedduetoBacklog sets the value of AverageOutboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsQueuedduetoBacklog(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsQueuedduetoBacklog", (value)) +} + +// GetAverageOutboundPacketsQueuedduetoBacklog gets the value of AverageOutboundPacketsQueuedduetoBacklog for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsQueuedduetoBacklog() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsQueuedduetoBacklog") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsQueuedduetoInsufficientTokens sets the value of AverageOutboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsQueuedduetoInsufficientTokens(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsQueuedduetoInsufficientTokens", (value)) +} + +// GetAverageOutboundPacketsQueuedduetoInsufficientTokens gets the value of AverageOutboundPacketsQueuedduetoInsufficientTokens for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsQueuedduetoInsufficientTokens() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsQueuedduetoInsufficientTokens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageOutboundPacketsResumed sets the value of AverageOutboundPacketsResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) SetPropertyAverageOutboundPacketsResumed(value uint64) (err error) { + return instance.SetProperty("AverageOutboundPacketsResumed", (value)) +} + +// GetAverageOutboundPacketsResumed gets the value of AverageOutboundPacketsResumed for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueAverageOutboundNetworkTraffic) GetPropertyAverageOutboundPacketsResumed() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageOutboundPacketsResumed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go new file mode 100644 index 00000000..fd81d659 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic struct { + *Win32_PerfRawData + + // + TotalInboundBytesDropped uint64 + + // + TotalInboundPacketsDropped uint64 +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalInboundBytesDropped sets the value of TotalInboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) SetPropertyTotalInboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("TotalInboundBytesDropped", (value)) +} + +// GetTotalInboundBytesDropped gets the value of TotalInboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) GetPropertyTotalInboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInboundPacketsDropped sets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) SetPropertyTotalInboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("TotalInboundPacketsDropped", (value)) +} + +// GetTotalInboundPacketsDropped gets the value of TotalInboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalInboundNetworkTraffic) GetPropertyTotalInboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go new file mode 100644 index 00000000..be155fb2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic struct +type Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic struct { + *Win32_PerfRawData + + // + TotalOutboundBytesDropped uint64 + + // + TotalOutboundPacketsDropped uint64 +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTrafficEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTrafficEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalOutboundBytesDropped sets the value of TotalOutboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) SetPropertyTotalOutboundBytesDropped(value uint64) (err error) { + return instance.SetProperty("TotalOutboundBytesDropped", (value)) +} + +// GetTotalOutboundBytesDropped gets the value of TotalOutboundBytesDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) GetPropertyTotalOutboundBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundBytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOutboundPacketsDropped sets the value of TotalOutboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) SetPropertyTotalOutboundPacketsDropped(value uint64) (err error) { + return instance.SetProperty("TotalOutboundPacketsDropped", (value)) +} + +// GetTotalOutboundPacketsDropped gets the value of TotalOutboundPacketsDropped for the instance +func (instance *Win32_PerfRawData_Counters_VFPQoSQueueTotalOutboundNetworkTraffic) GetPropertyTotalOutboundPacketsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOutboundPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFP.go new file mode 100644 index 00000000..86131488 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFP.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_WFP struct +type Win32_PerfRawData_Counters_WFP struct { + *Win32_PerfRawData + + // + ProviderCount uint32 +} + +func NewWin32_PerfRawData_Counters_WFPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_WFP, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFP{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_WFPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_WFP, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFP{ + Win32_PerfRawData: tmp, + } + return +} + +// SetProviderCount sets the value of ProviderCount for the instance +func (instance *Win32_PerfRawData_Counters_WFP) SetPropertyProviderCount(value uint32) (err error) { + return instance.SetProperty("ProviderCount", (value)) +} + +// GetProviderCount gets the value of ProviderCount for the instance +func (instance *Win32_PerfRawData_Counters_WFP) GetPropertyProviderCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ProviderCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPClassify.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPClassify.go new file mode 100644 index 00000000..656ad33b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPClassify.go @@ -0,0 +1,3170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_WFPClassify struct +type Win32_PerfRawData_Counters_WFPClassify struct { + *Win32_PerfRawData + + // + FWPMLAYERALEAUTHCONNECTV4 uint64 + + // + FWPMLAYERALEAUTHCONNECTV4DISCARD uint64 + + // + FWPMLAYERALEAUTHCONNECTV6 uint64 + + // + FWPMLAYERALEAUTHCONNECTV6DISCARD uint64 + + // + FWPMLAYERALEAUTHLISTENV4 uint64 + + // + FWPMLAYERALEAUTHLISTENV4DISCARD uint64 + + // + FWPMLAYERALEAUTHLISTENV6 uint64 + + // + FWPMLAYERALEAUTHLISTENV6DISCARD uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV4 uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV4DISCARD uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV6 uint64 + + // + FWPMLAYERALEAUTHRECVACCEPTV6DISCARD uint64 + + // + FWPMLAYERALEBINDREDIRECTV4 uint64 + + // + FWPMLAYERALEBINDREDIRECTV6 uint64 + + // + FWPMLAYERALECONNECTREDIRECTV4 uint64 + + // + FWPMLAYERALECONNECTREDIRECTV6 uint64 + + // + FWPMLAYERALEENDPOINTCLOSUREV4 uint64 + + // + FWPMLAYERALEENDPOINTCLOSUREV6 uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV4 uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV4DISCARD uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV6 uint64 + + // + FWPMLAYERALEFLOWESTABLISHEDV6DISCARD uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 uint64 + + // + FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV4 uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV6 uint64 + + // + FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD uint64 + + // + FWPMLAYERALERESOURCERELEASEV4 uint64 + + // + FWPMLAYERALERESOURCERELEASEV6 uint64 + + // + FWPMLAYERDATAGRAMDATAV4 uint64 + + // + FWPMLAYERDATAGRAMDATAV4DISCARD uint64 + + // + FWPMLAYERDATAGRAMDATAV6 uint64 + + // + FWPMLAYERDATAGRAMDATAV6DISCARD uint64 + + // + FWPMLAYEREGRESSVSWITCHETHERNET uint64 + + // + FWPMLAYEREGRESSVSWITCHTRANSPORTV4 uint64 + + // + FWPMLAYEREGRESSVSWITCHTRANSPORTV6 uint64 + + // + FWPMLAYERIKEEXTV4 uint64 + + // + FWPMLAYERIKEEXTV6 uint64 + + // + FWPMLAYERINBOUNDICMPERRORV4 uint64 + + // + FWPMLAYERINBOUNDICMPERRORV4DISCARD uint64 + + // + FWPMLAYERINBOUNDICMPERRORV6 uint64 + + // + FWPMLAYERINBOUNDICMPERRORV6DISCARD uint64 + + // + FWPMLAYERINBOUNDIPPACKETV4 uint64 + + // + FWPMLAYERINBOUNDIPPACKETV4DISCARD uint64 + + // + FWPMLAYERINBOUNDIPPACKETV6 uint64 + + // + FWPMLAYERINBOUNDIPPACKETV6DISCARD uint64 + + // + FWPMLAYERINBOUNDMACFRAMEETHERNET uint64 + + // + FWPMLAYERINBOUNDMACFRAMENATIVE uint64 + + // + FWPMLAYERINBOUNDMACFRAMENATIVEFAST uint64 + + // + FWPMLAYERINBOUNDSSLTHROTTLING uint64 + + // + FWPMLAYERINBOUNDTRANSPORTFAST uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV4 uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV4DISCARD uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV6 uint64 + + // + FWPMLAYERINBOUNDTRANSPORTV6DISCARD uint64 + + // + FWPMLAYERINGRESSVSWITCHETHERNET uint64 + + // + FWPMLAYERINGRESSVSWITCHTRANSPORTV4 uint64 + + // + FWPMLAYERINGRESSVSWITCHTRANSPORTV6 uint64 + + // + FWPMLAYERIPFORWARDV4 uint64 + + // + FWPMLAYERIPFORWARDV4DISCARD uint64 + + // + FWPMLAYERIPFORWARDV6 uint64 + + // + FWPMLAYERIPFORWARDV6DISCARD uint64 + + // + FWPMLAYERIPSECKMDEMUXV4 uint64 + + // + FWPMLAYERIPSECKMDEMUXV6 uint64 + + // + FWPMLAYERIPSECV4 uint64 + + // + FWPMLAYERIPSECV6 uint64 + + // + FWPMLAYERKMAUTHORIZATION uint64 + + // + FWPMLAYERNAMERESOLUTIONCACHEV4 uint64 + + // + FWPMLAYERNAMERESOLUTIONCACHEV6 uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV4 uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV4DISCARD uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV6 uint64 + + // + FWPMLAYEROUTBOUNDICMPERRORV6DISCARD uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV4 uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV4DISCARD uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV6 uint64 + + // + FWPMLAYEROUTBOUNDIPPACKETV6DISCARD uint64 + + // + FWPMLAYEROUTBOUNDMACFRAMEETHERNET uint64 + + // + FWPMLAYEROUTBOUNDMACFRAMENATIVE uint64 + + // + FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTFAST uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV4 uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV6 uint64 + + // + FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD uint64 + + // + FWPMLAYERRPCEPADD uint64 + + // + FWPMLAYERRPCEPMAP uint64 + + // + FWPMLAYERRPCPROXYCONN uint64 + + // + FWPMLAYERRPCPROXYIF uint64 + + // + FWPMLAYERRPCUM uint64 + + // + FWPMLAYERSTREAMPACKETV4 uint64 + + // + FWPMLAYERSTREAMPACKETV6 uint64 + + // + FWPMLAYERSTREAMV4 uint64 + + // + FWPMLAYERSTREAMV4DISCARD uint64 + + // + FWPMLAYERSTREAMV6 uint64 + + // + FWPMLAYERSTREAMV6DISCARD uint64 + + // + Total uint64 +} + +func NewWin32_PerfRawData_Counters_WFPClassifyEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_WFPClassify, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPClassify{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_WFPClassifyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_WFPClassify, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPClassify{ + Win32_PerfRawData: tmp, + } + return +} + +// SetFWPMLAYERALEAUTHCONNECTV4 sets the value of FWPMLAYERALEAUTHCONNECTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV4", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV4 gets the value of FWPMLAYERALEAUTHCONNECTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHCONNECTV4DISCARD sets the value of FWPMLAYERALEAUTHCONNECTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV4DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV4DISCARD gets the value of FWPMLAYERALEAUTHCONNECTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHCONNECTV6 sets the value of FWPMLAYERALEAUTHCONNECTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV6", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV6 gets the value of FWPMLAYERALEAUTHCONNECTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHCONNECTV6DISCARD sets the value of FWPMLAYERALEAUTHCONNECTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHCONNECTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHCONNECTV6DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHCONNECTV6DISCARD gets the value of FWPMLAYERALEAUTHCONNECTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHCONNECTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHCONNECTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV4 sets the value of FWPMLAYERALEAUTHLISTENV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV4", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV4 gets the value of FWPMLAYERALEAUTHLISTENV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV4DISCARD sets the value of FWPMLAYERALEAUTHLISTENV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV4DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV4DISCARD gets the value of FWPMLAYERALEAUTHLISTENV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV6 sets the value of FWPMLAYERALEAUTHLISTENV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV6", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV6 gets the value of FWPMLAYERALEAUTHLISTENV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHLISTENV6DISCARD sets the value of FWPMLAYERALEAUTHLISTENV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHLISTENV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHLISTENV6DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHLISTENV6DISCARD gets the value of FWPMLAYERALEAUTHLISTENV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHLISTENV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHLISTENV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV4 sets the value of FWPMLAYERALEAUTHRECVACCEPTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV4", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV4 gets the value of FWPMLAYERALEAUTHRECVACCEPTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV4DISCARD sets the value of FWPMLAYERALEAUTHRECVACCEPTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV4DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV4DISCARD gets the value of FWPMLAYERALEAUTHRECVACCEPTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV6 sets the value of FWPMLAYERALEAUTHRECVACCEPTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV6", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV6 gets the value of FWPMLAYERALEAUTHRECVACCEPTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEAUTHRECVACCEPTV6DISCARD sets the value of FWPMLAYERALEAUTHRECVACCEPTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEAUTHRECVACCEPTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEAUTHRECVACCEPTV6DISCARD", (value)) +} + +// GetFWPMLAYERALEAUTHRECVACCEPTV6DISCARD gets the value of FWPMLAYERALEAUTHRECVACCEPTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEAUTHRECVACCEPTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEAUTHRECVACCEPTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEBINDREDIRECTV4 sets the value of FWPMLAYERALEBINDREDIRECTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEBINDREDIRECTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEBINDREDIRECTV4", (value)) +} + +// GetFWPMLAYERALEBINDREDIRECTV4 gets the value of FWPMLAYERALEBINDREDIRECTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEBINDREDIRECTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEBINDREDIRECTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEBINDREDIRECTV6 sets the value of FWPMLAYERALEBINDREDIRECTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEBINDREDIRECTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEBINDREDIRECTV6", (value)) +} + +// GetFWPMLAYERALEBINDREDIRECTV6 gets the value of FWPMLAYERALEBINDREDIRECTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEBINDREDIRECTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEBINDREDIRECTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALECONNECTREDIRECTV4 sets the value of FWPMLAYERALECONNECTREDIRECTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALECONNECTREDIRECTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALECONNECTREDIRECTV4", (value)) +} + +// GetFWPMLAYERALECONNECTREDIRECTV4 gets the value of FWPMLAYERALECONNECTREDIRECTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALECONNECTREDIRECTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALECONNECTREDIRECTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALECONNECTREDIRECTV6 sets the value of FWPMLAYERALECONNECTREDIRECTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALECONNECTREDIRECTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALECONNECTREDIRECTV6", (value)) +} + +// GetFWPMLAYERALECONNECTREDIRECTV6 gets the value of FWPMLAYERALECONNECTREDIRECTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALECONNECTREDIRECTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALECONNECTREDIRECTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEENDPOINTCLOSUREV4 sets the value of FWPMLAYERALEENDPOINTCLOSUREV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEENDPOINTCLOSUREV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEENDPOINTCLOSUREV4", (value)) +} + +// GetFWPMLAYERALEENDPOINTCLOSUREV4 gets the value of FWPMLAYERALEENDPOINTCLOSUREV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEENDPOINTCLOSUREV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEENDPOINTCLOSUREV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEENDPOINTCLOSUREV6 sets the value of FWPMLAYERALEENDPOINTCLOSUREV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEENDPOINTCLOSUREV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEENDPOINTCLOSUREV6", (value)) +} + +// GetFWPMLAYERALEENDPOINTCLOSUREV6 gets the value of FWPMLAYERALEENDPOINTCLOSUREV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEENDPOINTCLOSUREV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEENDPOINTCLOSUREV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV4 sets the value of FWPMLAYERALEFLOWESTABLISHEDV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV4", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV4 gets the value of FWPMLAYERALEFLOWESTABLISHEDV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV4DISCARD sets the value of FWPMLAYERALEFLOWESTABLISHEDV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV4DISCARD", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV4DISCARD gets the value of FWPMLAYERALEFLOWESTABLISHEDV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV6 sets the value of FWPMLAYERALEFLOWESTABLISHEDV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV6", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV6 gets the value of FWPMLAYERALEFLOWESTABLISHEDV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEFLOWESTABLISHEDV6DISCARD sets the value of FWPMLAYERALEFLOWESTABLISHEDV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEFLOWESTABLISHEDV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEFLOWESTABLISHEDV6DISCARD", (value)) +} + +// GetFWPMLAYERALEFLOWESTABLISHEDV6DISCARD gets the value of FWPMLAYERALEFLOWESTABLISHEDV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEFLOWESTABLISHEDV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEFLOWESTABLISHEDV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALADDRESSV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 sets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 gets the value of FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPLOCALPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPLOCALPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEADDRESSV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 sets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6", (value)) +} + +// GetFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 gets the value of FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALEPRECLASSIFYIPREMOTEPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV4 sets the value of FWPMLAYERALERESOURCEASSIGNMENTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV4 gets the value of FWPMLAYERALERESOURCEASSIGNMENTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD sets the value of FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD gets the value of FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV6 sets the value of FWPMLAYERALERESOURCEASSIGNMENTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV6 gets the value of FWPMLAYERALERESOURCEASSIGNMENTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD sets the value of FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD", (value)) +} + +// GetFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD gets the value of FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCEASSIGNMENTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCEASSIGNMENTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCERELEASEV4 sets the value of FWPMLAYERALERESOURCERELEASEV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCERELEASEV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCERELEASEV4", (value)) +} + +// GetFWPMLAYERALERESOURCERELEASEV4 gets the value of FWPMLAYERALERESOURCERELEASEV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCERELEASEV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCERELEASEV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERALERESOURCERELEASEV6 sets the value of FWPMLAYERALERESOURCERELEASEV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERALERESOURCERELEASEV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERALERESOURCERELEASEV6", (value)) +} + +// GetFWPMLAYERALERESOURCERELEASEV6 gets the value of FWPMLAYERALERESOURCERELEASEV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERALERESOURCERELEASEV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERALERESOURCERELEASEV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV4 sets the value of FWPMLAYERDATAGRAMDATAV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV4", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV4 gets the value of FWPMLAYERDATAGRAMDATAV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV4DISCARD sets the value of FWPMLAYERDATAGRAMDATAV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV4DISCARD", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV4DISCARD gets the value of FWPMLAYERDATAGRAMDATAV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV6 sets the value of FWPMLAYERDATAGRAMDATAV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV6", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV6 gets the value of FWPMLAYERDATAGRAMDATAV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERDATAGRAMDATAV6DISCARD sets the value of FWPMLAYERDATAGRAMDATAV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERDATAGRAMDATAV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERDATAGRAMDATAV6DISCARD", (value)) +} + +// GetFWPMLAYERDATAGRAMDATAV6DISCARD gets the value of FWPMLAYERDATAGRAMDATAV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERDATAGRAMDATAV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERDATAGRAMDATAV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEREGRESSVSWITCHETHERNET sets the value of FWPMLAYEREGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEREGRESSVSWITCHETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEREGRESSVSWITCHETHERNET", (value)) +} + +// GetFWPMLAYEREGRESSVSWITCHETHERNET gets the value of FWPMLAYEREGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEREGRESSVSWITCHETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEREGRESSVSWITCHETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEREGRESSVSWITCHTRANSPORTV4 sets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV4", (value)) +} + +// GetFWPMLAYEREGRESSVSWITCHTRANSPORTV4 gets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEREGRESSVSWITCHTRANSPORTV6 sets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV6", (value)) +} + +// GetFWPMLAYEREGRESSVSWITCHTRANSPORTV6 gets the value of FWPMLAYEREGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEREGRESSVSWITCHTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEREGRESSVSWITCHTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIKEEXTV4 sets the value of FWPMLAYERIKEEXTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIKEEXTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIKEEXTV4", (value)) +} + +// GetFWPMLAYERIKEEXTV4 gets the value of FWPMLAYERIKEEXTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIKEEXTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIKEEXTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIKEEXTV6 sets the value of FWPMLAYERIKEEXTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIKEEXTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIKEEXTV6", (value)) +} + +// GetFWPMLAYERIKEEXTV6 gets the value of FWPMLAYERIKEEXTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIKEEXTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIKEEXTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV4 sets the value of FWPMLAYERINBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV4", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV4 gets the value of FWPMLAYERINBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV4DISCARD sets the value of FWPMLAYERINBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV4DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV4DISCARD gets the value of FWPMLAYERINBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV6 sets the value of FWPMLAYERINBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV6", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV6 gets the value of FWPMLAYERINBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDICMPERRORV6DISCARD sets the value of FWPMLAYERINBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDICMPERRORV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDICMPERRORV6DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDICMPERRORV6DISCARD gets the value of FWPMLAYERINBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDICMPERRORV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDICMPERRORV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV4 sets the value of FWPMLAYERINBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV4", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV4 gets the value of FWPMLAYERINBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV4DISCARD sets the value of FWPMLAYERINBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV4DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV4DISCARD gets the value of FWPMLAYERINBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV6 sets the value of FWPMLAYERINBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV6", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV6 gets the value of FWPMLAYERINBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDIPPACKETV6DISCARD sets the value of FWPMLAYERINBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDIPPACKETV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDIPPACKETV6DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDIPPACKETV6DISCARD gets the value of FWPMLAYERINBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDIPPACKETV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDIPPACKETV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDMACFRAMEETHERNET sets the value of FWPMLAYERINBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDMACFRAMEETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDMACFRAMEETHERNET", (value)) +} + +// GetFWPMLAYERINBOUNDMACFRAMEETHERNET gets the value of FWPMLAYERINBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDMACFRAMEETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDMACFRAMEETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDMACFRAMENATIVE sets the value of FWPMLAYERINBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDMACFRAMENATIVE(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDMACFRAMENATIVE", (value)) +} + +// GetFWPMLAYERINBOUNDMACFRAMENATIVE gets the value of FWPMLAYERINBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDMACFRAMENATIVE() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDMACFRAMENATIVE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDMACFRAMENATIVEFAST sets the value of FWPMLAYERINBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDMACFRAMENATIVEFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDMACFRAMENATIVEFAST", (value)) +} + +// GetFWPMLAYERINBOUNDMACFRAMENATIVEFAST gets the value of FWPMLAYERINBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDMACFRAMENATIVEFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDMACFRAMENATIVEFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDSSLTHROTTLING sets the value of FWPMLAYERINBOUNDSSLTHROTTLING for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDSSLTHROTTLING(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDSSLTHROTTLING", (value)) +} + +// GetFWPMLAYERINBOUNDSSLTHROTTLING gets the value of FWPMLAYERINBOUNDSSLTHROTTLING for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDSSLTHROTTLING() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDSSLTHROTTLING") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTFAST sets the value of FWPMLAYERINBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTFAST", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTFAST gets the value of FWPMLAYERINBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV4 sets the value of FWPMLAYERINBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV4", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV4 gets the value of FWPMLAYERINBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV4DISCARD sets the value of FWPMLAYERINBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV4DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV4DISCARD gets the value of FWPMLAYERINBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV6 sets the value of FWPMLAYERINBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV6", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV6 gets the value of FWPMLAYERINBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINBOUNDTRANSPORTV6DISCARD sets the value of FWPMLAYERINBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINBOUNDTRANSPORTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINBOUNDTRANSPORTV6DISCARD", (value)) +} + +// GetFWPMLAYERINBOUNDTRANSPORTV6DISCARD gets the value of FWPMLAYERINBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINBOUNDTRANSPORTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINBOUNDTRANSPORTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINGRESSVSWITCHETHERNET sets the value of FWPMLAYERINGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINGRESSVSWITCHETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINGRESSVSWITCHETHERNET", (value)) +} + +// GetFWPMLAYERINGRESSVSWITCHETHERNET gets the value of FWPMLAYERINGRESSVSWITCHETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINGRESSVSWITCHETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINGRESSVSWITCHETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINGRESSVSWITCHTRANSPORTV4 sets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV4", (value)) +} + +// GetFWPMLAYERINGRESSVSWITCHTRANSPORTV4 gets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERINGRESSVSWITCHTRANSPORTV6 sets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV6", (value)) +} + +// GetFWPMLAYERINGRESSVSWITCHTRANSPORTV6 gets the value of FWPMLAYERINGRESSVSWITCHTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERINGRESSVSWITCHTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERINGRESSVSWITCHTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV4 sets the value of FWPMLAYERIPFORWARDV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV4", (value)) +} + +// GetFWPMLAYERIPFORWARDV4 gets the value of FWPMLAYERIPFORWARDV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV4DISCARD sets the value of FWPMLAYERIPFORWARDV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV4DISCARD", (value)) +} + +// GetFWPMLAYERIPFORWARDV4DISCARD gets the value of FWPMLAYERIPFORWARDV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV6 sets the value of FWPMLAYERIPFORWARDV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV6", (value)) +} + +// GetFWPMLAYERIPFORWARDV6 gets the value of FWPMLAYERIPFORWARDV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPFORWARDV6DISCARD sets the value of FWPMLAYERIPFORWARDV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPFORWARDV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPFORWARDV6DISCARD", (value)) +} + +// GetFWPMLAYERIPFORWARDV6DISCARD gets the value of FWPMLAYERIPFORWARDV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPFORWARDV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPFORWARDV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECKMDEMUXV4 sets the value of FWPMLAYERIPSECKMDEMUXV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECKMDEMUXV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECKMDEMUXV4", (value)) +} + +// GetFWPMLAYERIPSECKMDEMUXV4 gets the value of FWPMLAYERIPSECKMDEMUXV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECKMDEMUXV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECKMDEMUXV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECKMDEMUXV6 sets the value of FWPMLAYERIPSECKMDEMUXV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECKMDEMUXV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECKMDEMUXV6", (value)) +} + +// GetFWPMLAYERIPSECKMDEMUXV6 gets the value of FWPMLAYERIPSECKMDEMUXV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECKMDEMUXV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECKMDEMUXV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECV4 sets the value of FWPMLAYERIPSECV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECV4", (value)) +} + +// GetFWPMLAYERIPSECV4 gets the value of FWPMLAYERIPSECV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERIPSECV6 sets the value of FWPMLAYERIPSECV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERIPSECV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERIPSECV6", (value)) +} + +// GetFWPMLAYERIPSECV6 gets the value of FWPMLAYERIPSECV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERIPSECV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERIPSECV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERKMAUTHORIZATION sets the value of FWPMLAYERKMAUTHORIZATION for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERKMAUTHORIZATION(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERKMAUTHORIZATION", (value)) +} + +// GetFWPMLAYERKMAUTHORIZATION gets the value of FWPMLAYERKMAUTHORIZATION for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERKMAUTHORIZATION() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERKMAUTHORIZATION") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERNAMERESOLUTIONCACHEV4 sets the value of FWPMLAYERNAMERESOLUTIONCACHEV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERNAMERESOLUTIONCACHEV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERNAMERESOLUTIONCACHEV4", (value)) +} + +// GetFWPMLAYERNAMERESOLUTIONCACHEV4 gets the value of FWPMLAYERNAMERESOLUTIONCACHEV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERNAMERESOLUTIONCACHEV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERNAMERESOLUTIONCACHEV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERNAMERESOLUTIONCACHEV6 sets the value of FWPMLAYERNAMERESOLUTIONCACHEV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERNAMERESOLUTIONCACHEV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERNAMERESOLUTIONCACHEV6", (value)) +} + +// GetFWPMLAYERNAMERESOLUTIONCACHEV6 gets the value of FWPMLAYERNAMERESOLUTIONCACHEV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERNAMERESOLUTIONCACHEV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERNAMERESOLUTIONCACHEV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV4 sets the value of FWPMLAYEROUTBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV4", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV4 gets the value of FWPMLAYEROUTBOUNDICMPERRORV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV4DISCARD sets the value of FWPMLAYEROUTBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV4DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV4DISCARD gets the value of FWPMLAYEROUTBOUNDICMPERRORV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV6 sets the value of FWPMLAYEROUTBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV6", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV6 gets the value of FWPMLAYEROUTBOUNDICMPERRORV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDICMPERRORV6DISCARD sets the value of FWPMLAYEROUTBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDICMPERRORV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDICMPERRORV6DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDICMPERRORV6DISCARD gets the value of FWPMLAYEROUTBOUNDICMPERRORV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDICMPERRORV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDICMPERRORV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV4 sets the value of FWPMLAYEROUTBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV4", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV4 gets the value of FWPMLAYEROUTBOUNDIPPACKETV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV4DISCARD sets the value of FWPMLAYEROUTBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV4DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV4DISCARD gets the value of FWPMLAYEROUTBOUNDIPPACKETV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV6 sets the value of FWPMLAYEROUTBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV6", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV6 gets the value of FWPMLAYEROUTBOUNDIPPACKETV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDIPPACKETV6DISCARD sets the value of FWPMLAYEROUTBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDIPPACKETV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDIPPACKETV6DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDIPPACKETV6DISCARD gets the value of FWPMLAYEROUTBOUNDIPPACKETV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDIPPACKETV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDIPPACKETV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDMACFRAMEETHERNET sets the value of FWPMLAYEROUTBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDMACFRAMEETHERNET(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDMACFRAMEETHERNET", (value)) +} + +// GetFWPMLAYEROUTBOUNDMACFRAMEETHERNET gets the value of FWPMLAYEROUTBOUNDMACFRAMEETHERNET for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDMACFRAMEETHERNET() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDMACFRAMEETHERNET") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDMACFRAMENATIVE sets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVE(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVE", (value)) +} + +// GetFWPMLAYEROUTBOUNDMACFRAMENATIVE gets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVE for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVE() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST sets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST", (value)) +} + +// GetFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST gets the value of FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDMACFRAMENATIVEFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDMACFRAMENATIVEFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTFAST sets the value of FWPMLAYEROUTBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTFAST(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTFAST", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTFAST gets the value of FWPMLAYEROUTBOUNDTRANSPORTFAST for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTFAST() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTFAST") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV4 sets the value of FWPMLAYEROUTBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV4 gets the value of FWPMLAYEROUTBOUNDTRANSPORTV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD sets the value of FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD gets the value of FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV6 sets the value of FWPMLAYEROUTBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV6 gets the value of FWPMLAYEROUTBOUNDTRANSPORTV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD sets the value of FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD", (value)) +} + +// GetFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD gets the value of FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYEROUTBOUNDTRANSPORTV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYEROUTBOUNDTRANSPORTV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCEPADD sets the value of FWPMLAYERRPCEPADD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCEPADD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCEPADD", (value)) +} + +// GetFWPMLAYERRPCEPADD gets the value of FWPMLAYERRPCEPADD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCEPADD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCEPADD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCEPMAP sets the value of FWPMLAYERRPCEPMAP for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCEPMAP(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCEPMAP", (value)) +} + +// GetFWPMLAYERRPCEPMAP gets the value of FWPMLAYERRPCEPMAP for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCEPMAP() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCEPMAP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCPROXYCONN sets the value of FWPMLAYERRPCPROXYCONN for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCPROXYCONN(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCPROXYCONN", (value)) +} + +// GetFWPMLAYERRPCPROXYCONN gets the value of FWPMLAYERRPCPROXYCONN for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCPROXYCONN() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCPROXYCONN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCPROXYIF sets the value of FWPMLAYERRPCPROXYIF for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCPROXYIF(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCPROXYIF", (value)) +} + +// GetFWPMLAYERRPCPROXYIF gets the value of FWPMLAYERRPCPROXYIF for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCPROXYIF() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCPROXYIF") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERRPCUM sets the value of FWPMLAYERRPCUM for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERRPCUM(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERRPCUM", (value)) +} + +// GetFWPMLAYERRPCUM gets the value of FWPMLAYERRPCUM for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERRPCUM() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERRPCUM") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMPACKETV4 sets the value of FWPMLAYERSTREAMPACKETV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMPACKETV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMPACKETV4", (value)) +} + +// GetFWPMLAYERSTREAMPACKETV4 gets the value of FWPMLAYERSTREAMPACKETV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMPACKETV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMPACKETV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMPACKETV6 sets the value of FWPMLAYERSTREAMPACKETV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMPACKETV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMPACKETV6", (value)) +} + +// GetFWPMLAYERSTREAMPACKETV6 gets the value of FWPMLAYERSTREAMPACKETV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMPACKETV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMPACKETV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV4 sets the value of FWPMLAYERSTREAMV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV4(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV4", (value)) +} + +// GetFWPMLAYERSTREAMV4 gets the value of FWPMLAYERSTREAMV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV4DISCARD sets the value of FWPMLAYERSTREAMV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV4DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV4DISCARD", (value)) +} + +// GetFWPMLAYERSTREAMV4DISCARD gets the value of FWPMLAYERSTREAMV4DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV4DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV4DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV6 sets the value of FWPMLAYERSTREAMV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV6(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV6", (value)) +} + +// GetFWPMLAYERSTREAMV6 gets the value of FWPMLAYERSTREAMV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFWPMLAYERSTREAMV6DISCARD sets the value of FWPMLAYERSTREAMV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyFWPMLAYERSTREAMV6DISCARD(value uint64) (err error) { + return instance.SetProperty("FWPMLAYERSTREAMV6DISCARD", (value)) +} + +// GetFWPMLAYERSTREAMV6DISCARD gets the value of FWPMLAYERSTREAMV6DISCARD for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyFWPMLAYERSTREAMV6DISCARD() (value uint64, err error) { + retValue, err := instance.GetProperty("FWPMLAYERSTREAMV6DISCARD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotal sets the value of Total for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) SetPropertyTotal(value uint64) (err error) { + return instance.SetProperty("Total", (value)) +} + +// GetTotal gets the value of Total for the instance +func (instance *Win32_PerfRawData_Counters_WFPClassify) GetPropertyTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("Total") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPReauthorization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPReauthorization.go new file mode 100644 index 00000000..c81b6615 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPReauthorization.go @@ -0,0 +1,830 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_WFPReauthorization struct +type Win32_PerfRawData_Counters_WFPReauthorization struct { + *Win32_PerfRawData + + // + FamilyV4 uint64 + + // + FamilyV6 uint64 + + // + Inbound uint64 + + // + Outbound uint64 + + // + ProtocolICMP uint64 + + // + ProtocolICMP6 uint64 + + // + ProtocolIPv4 uint64 + + // + ProtocolIPv6 uint64 + + // + ProtocolOther uint64 + + // + ProtocolTCP uint64 + + // + ProtocolUDP uint64 + + // + ReasonClassifyCompletion uint64 + + // + ReasonEDPPolicyChanged uint64 + + // + ReasonIPSecPropertiesChanged uint64 + + // + ReasonMidStreamInspection uint64 + + // + ReasonNewArrivalInterface uint64 + + // + ReasonNewInboundMCastBCastPacket uint64 + + // + ReasonNewNextHopInterface uint64 + + // + ReasonPolicyChange uint64 + + // + ReasonPreclassifyLocalAddressDimensionPolicyChanged uint64 + + // + ReasonPreclassifyLocalPortDimensionPolicyChanged uint64 + + // + ReasonPreclassifyRemoteAddressDimensionPolicyChanged uint64 + + // + ReasonPreclassifyRemotePortDimensionPolicyChanged uint64 + + // + ReasonProfileCrossing uint64 + + // + ReasonProxyHandleChanged uint64 + + // + ReasonSocketPropertyChanged uint64 +} + +func NewWin32_PerfRawData_Counters_WFPReauthorizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_WFPReauthorization, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPReauthorization{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_WFPReauthorizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_WFPReauthorization, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPReauthorization{ + Win32_PerfRawData: tmp, + } + return +} + +// SetFamilyV4 sets the value of FamilyV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyFamilyV4(value uint64) (err error) { + return instance.SetProperty("FamilyV4", (value)) +} + +// GetFamilyV4 gets the value of FamilyV4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyFamilyV4() (value uint64, err error) { + retValue, err := instance.GetProperty("FamilyV4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFamilyV6 sets the value of FamilyV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyFamilyV6(value uint64) (err error) { + return instance.SetProperty("FamilyV6", (value)) +} + +// GetFamilyV6 gets the value of FamilyV6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyFamilyV6() (value uint64, err error) { + retValue, err := instance.GetProperty("FamilyV6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInbound sets the value of Inbound for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyInbound(value uint64) (err error) { + return instance.SetProperty("Inbound", (value)) +} + +// GetInbound gets the value of Inbound for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyInbound() (value uint64, err error) { + retValue, err := instance.GetProperty("Inbound") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutbound sets the value of Outbound for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyOutbound(value uint64) (err error) { + return instance.SetProperty("Outbound", (value)) +} + +// GetOutbound gets the value of Outbound for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyOutbound() (value uint64, err error) { + retValue, err := instance.GetProperty("Outbound") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolICMP sets the value of ProtocolICMP for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolICMP(value uint64) (err error) { + return instance.SetProperty("ProtocolICMP", (value)) +} + +// GetProtocolICMP gets the value of ProtocolICMP for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolICMP() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolICMP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolICMP6 sets the value of ProtocolICMP6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolICMP6(value uint64) (err error) { + return instance.SetProperty("ProtocolICMP6", (value)) +} + +// GetProtocolICMP6 gets the value of ProtocolICMP6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolICMP6() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolICMP6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolIPv4 sets the value of ProtocolIPv4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolIPv4(value uint64) (err error) { + return instance.SetProperty("ProtocolIPv4", (value)) +} + +// GetProtocolIPv4 gets the value of ProtocolIPv4 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolIPv4() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolIPv4") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolIPv6 sets the value of ProtocolIPv6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolIPv6(value uint64) (err error) { + return instance.SetProperty("ProtocolIPv6", (value)) +} + +// GetProtocolIPv6 gets the value of ProtocolIPv6 for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolIPv6() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolIPv6") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolOther sets the value of ProtocolOther for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolOther(value uint64) (err error) { + return instance.SetProperty("ProtocolOther", (value)) +} + +// GetProtocolOther gets the value of ProtocolOther for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolOther() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolTCP sets the value of ProtocolTCP for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolTCP(value uint64) (err error) { + return instance.SetProperty("ProtocolTCP", (value)) +} + +// GetProtocolTCP gets the value of ProtocolTCP for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolTCP() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolTCP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProtocolUDP sets the value of ProtocolUDP for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyProtocolUDP(value uint64) (err error) { + return instance.SetProperty("ProtocolUDP", (value)) +} + +// GetProtocolUDP gets the value of ProtocolUDP for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyProtocolUDP() (value uint64, err error) { + retValue, err := instance.GetProperty("ProtocolUDP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonClassifyCompletion sets the value of ReasonClassifyCompletion for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonClassifyCompletion(value uint64) (err error) { + return instance.SetProperty("ReasonClassifyCompletion", (value)) +} + +// GetReasonClassifyCompletion gets the value of ReasonClassifyCompletion for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonClassifyCompletion() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonClassifyCompletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonEDPPolicyChanged sets the value of ReasonEDPPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonEDPPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonEDPPolicyChanged", (value)) +} + +// GetReasonEDPPolicyChanged gets the value of ReasonEDPPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonEDPPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonEDPPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonIPSecPropertiesChanged sets the value of ReasonIPSecPropertiesChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonIPSecPropertiesChanged(value uint64) (err error) { + return instance.SetProperty("ReasonIPSecPropertiesChanged", (value)) +} + +// GetReasonIPSecPropertiesChanged gets the value of ReasonIPSecPropertiesChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonIPSecPropertiesChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonIPSecPropertiesChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonMidStreamInspection sets the value of ReasonMidStreamInspection for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonMidStreamInspection(value uint64) (err error) { + return instance.SetProperty("ReasonMidStreamInspection", (value)) +} + +// GetReasonMidStreamInspection gets the value of ReasonMidStreamInspection for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonMidStreamInspection() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonMidStreamInspection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonNewArrivalInterface sets the value of ReasonNewArrivalInterface for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonNewArrivalInterface(value uint64) (err error) { + return instance.SetProperty("ReasonNewArrivalInterface", (value)) +} + +// GetReasonNewArrivalInterface gets the value of ReasonNewArrivalInterface for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonNewArrivalInterface() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonNewArrivalInterface") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonNewInboundMCastBCastPacket sets the value of ReasonNewInboundMCastBCastPacket for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonNewInboundMCastBCastPacket(value uint64) (err error) { + return instance.SetProperty("ReasonNewInboundMCastBCastPacket", (value)) +} + +// GetReasonNewInboundMCastBCastPacket gets the value of ReasonNewInboundMCastBCastPacket for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonNewInboundMCastBCastPacket() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonNewInboundMCastBCastPacket") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonNewNextHopInterface sets the value of ReasonNewNextHopInterface for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonNewNextHopInterface(value uint64) (err error) { + return instance.SetProperty("ReasonNewNextHopInterface", (value)) +} + +// GetReasonNewNextHopInterface gets the value of ReasonNewNextHopInterface for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonNewNextHopInterface() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonNewNextHopInterface") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPolicyChange sets the value of ReasonPolicyChange for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonPolicyChange(value uint64) (err error) { + return instance.SetProperty("ReasonPolicyChange", (value)) +} + +// GetReasonPolicyChange gets the value of ReasonPolicyChange for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonPolicyChange() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPolicyChange") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyLocalAddressDimensionPolicyChanged sets the value of ReasonPreclassifyLocalAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyLocalAddressDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyLocalAddressDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyLocalAddressDimensionPolicyChanged gets the value of ReasonPreclassifyLocalAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyLocalAddressDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyLocalAddressDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyLocalPortDimensionPolicyChanged sets the value of ReasonPreclassifyLocalPortDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyLocalPortDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyLocalPortDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyLocalPortDimensionPolicyChanged gets the value of ReasonPreclassifyLocalPortDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyLocalPortDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyLocalPortDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyRemoteAddressDimensionPolicyChanged sets the value of ReasonPreclassifyRemoteAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyRemoteAddressDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyRemoteAddressDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyRemoteAddressDimensionPolicyChanged gets the value of ReasonPreclassifyRemoteAddressDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyRemoteAddressDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyRemoteAddressDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonPreclassifyRemotePortDimensionPolicyChanged sets the value of ReasonPreclassifyRemotePortDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonPreclassifyRemotePortDimensionPolicyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonPreclassifyRemotePortDimensionPolicyChanged", (value)) +} + +// GetReasonPreclassifyRemotePortDimensionPolicyChanged gets the value of ReasonPreclassifyRemotePortDimensionPolicyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonPreclassifyRemotePortDimensionPolicyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonPreclassifyRemotePortDimensionPolicyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonProfileCrossing sets the value of ReasonProfileCrossing for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonProfileCrossing(value uint64) (err error) { + return instance.SetProperty("ReasonProfileCrossing", (value)) +} + +// GetReasonProfileCrossing gets the value of ReasonProfileCrossing for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonProfileCrossing() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonProfileCrossing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonProxyHandleChanged sets the value of ReasonProxyHandleChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonProxyHandleChanged(value uint64) (err error) { + return instance.SetProperty("ReasonProxyHandleChanged", (value)) +} + +// GetReasonProxyHandleChanged gets the value of ReasonProxyHandleChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonProxyHandleChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonProxyHandleChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReasonSocketPropertyChanged sets the value of ReasonSocketPropertyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) SetPropertyReasonSocketPropertyChanged(value uint64) (err error) { + return instance.SetProperty("ReasonSocketPropertyChanged", (value)) +} + +// GetReasonSocketPropertyChanged gets the value of ReasonSocketPropertyChanged for the instance +func (instance *Win32_PerfRawData_Counters_WFPReauthorization) GetPropertyReasonSocketPropertyChanged() (value uint64, err error) { + retValue, err := instance.GetProperty("ReasonSocketPropertyChanged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv4.go new file mode 100644 index 00000000..ada93368 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv4.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_WFPv4 struct +type Win32_PerfRawData_Counters_WFPv4 struct { + *Win32_PerfRawData + + // + ActiveInboundConnections uint32 + + // + ActiveOutboundConnections uint32 + + // + AllowedClassifiesPersec uint32 + + // + BlockedBinds uint32 + + // + InboundConnections uint32 + + // + InboundConnectionsAllowedPersec uint32 + + // + InboundConnectionsBlockedPersec uint32 + + // + InboundPacketsDiscardedPersec uint32 + + // + OutboundConnections uint32 + + // + OutboundConnectionsAllowedPersec uint32 + + // + OutboundConnectionsBlockedPersec uint32 + + // + OutboundPacketsDiscardedPersec uint32 + + // + PacketsDiscardedPersec uint32 +} + +func NewWin32_PerfRawData_Counters_WFPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_WFPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_WFPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_WFPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveInboundConnections sets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyActiveInboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveInboundConnections", (value)) +} + +// GetActiveInboundConnections gets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyActiveInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveInboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveOutboundConnections sets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyActiveOutboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveOutboundConnections", (value)) +} + +// GetActiveOutboundConnections gets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyActiveOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveOutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAllowedClassifiesPersec sets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyAllowedClassifiesPersec(value uint32) (err error) { + return instance.SetProperty("AllowedClassifiesPersec", (value)) +} + +// GetAllowedClassifiesPersec gets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyAllowedClassifiesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AllowedClassifiesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBlockedBinds sets the value of BlockedBinds for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyBlockedBinds(value uint32) (err error) { + return instance.SetProperty("BlockedBinds", (value)) +} + +// GetBlockedBinds gets the value of BlockedBinds for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyBlockedBinds() (value uint32, err error) { + retValue, err := instance.GetProperty("BlockedBinds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnections sets the value of InboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyInboundConnections(value uint32) (err error) { + return instance.SetProperty("InboundConnections", (value)) +} + +// GetInboundConnections gets the value of InboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsAllowedPersec sets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyInboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsAllowedPersec", (value)) +} + +// GetInboundConnectionsAllowedPersec gets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyInboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsBlockedPersec sets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyInboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsBlockedPersec", (value)) +} + +// GetInboundConnectionsBlockedPersec gets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyInboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsDiscardedPersec sets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyInboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsDiscardedPersec", (value)) +} + +// GetInboundPacketsDiscardedPersec gets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyInboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnections sets the value of OutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyOutboundConnections(value uint32) (err error) { + return instance.SetProperty("OutboundConnections", (value)) +} + +// GetOutboundConnections gets the value of OutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsAllowedPersec sets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyOutboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsAllowedPersec", (value)) +} + +// GetOutboundConnectionsAllowedPersec gets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyOutboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsBlockedPersec sets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyOutboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsBlockedPersec", (value)) +} + +// GetOutboundConnectionsBlockedPersec gets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyOutboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundPacketsDiscardedPersec sets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyOutboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundPacketsDiscardedPersec", (value)) +} + +// GetOutboundPacketsDiscardedPersec gets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyOutboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsDiscardedPersec sets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) SetPropertyPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsDiscardedPersec", (value)) +} + +// GetPacketsDiscardedPersec gets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv4) GetPropertyPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv6.go new file mode 100644 index 00000000..050ce63e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WFPv6.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_WFPv6 struct +type Win32_PerfRawData_Counters_WFPv6 struct { + *Win32_PerfRawData + + // + ActiveInboundConnections uint32 + + // + ActiveOutboundConnections uint32 + + // + AllowedClassifiesPersec uint32 + + // + BlockedBinds uint32 + + // + InboundConnections uint32 + + // + InboundConnectionsAllowedPersec uint32 + + // + InboundConnectionsBlockedPersec uint32 + + // + InboundPacketsDiscardedPersec uint32 + + // + OutboundConnections uint32 + + // + OutboundConnectionsAllowedPersec uint32 + + // + OutboundConnectionsBlockedPersec uint32 + + // + OutboundPacketsDiscardedPersec uint32 + + // + PacketsDiscardedPersec uint32 +} + +func NewWin32_PerfRawData_Counters_WFPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_WFPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_WFPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_WFPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WFPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveInboundConnections sets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyActiveInboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveInboundConnections", (value)) +} + +// GetActiveInboundConnections gets the value of ActiveInboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyActiveInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveInboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveOutboundConnections sets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyActiveOutboundConnections(value uint32) (err error) { + return instance.SetProperty("ActiveOutboundConnections", (value)) +} + +// GetActiveOutboundConnections gets the value of ActiveOutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyActiveOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveOutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAllowedClassifiesPersec sets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyAllowedClassifiesPersec(value uint32) (err error) { + return instance.SetProperty("AllowedClassifiesPersec", (value)) +} + +// GetAllowedClassifiesPersec gets the value of AllowedClassifiesPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyAllowedClassifiesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AllowedClassifiesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBlockedBinds sets the value of BlockedBinds for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyBlockedBinds(value uint32) (err error) { + return instance.SetProperty("BlockedBinds", (value)) +} + +// GetBlockedBinds gets the value of BlockedBinds for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyBlockedBinds() (value uint32, err error) { + retValue, err := instance.GetProperty("BlockedBinds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnections sets the value of InboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyInboundConnections(value uint32) (err error) { + return instance.SetProperty("InboundConnections", (value)) +} + +// GetInboundConnections gets the value of InboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyInboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsAllowedPersec sets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyInboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsAllowedPersec", (value)) +} + +// GetInboundConnectionsAllowedPersec gets the value of InboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyInboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundConnectionsBlockedPersec sets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyInboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("InboundConnectionsBlockedPersec", (value)) +} + +// GetInboundConnectionsBlockedPersec gets the value of InboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyInboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInboundPacketsDiscardedPersec sets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyInboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("InboundPacketsDiscardedPersec", (value)) +} + +// GetInboundPacketsDiscardedPersec gets the value of InboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyInboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnections sets the value of OutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyOutboundConnections(value uint32) (err error) { + return instance.SetProperty("OutboundConnections", (value)) +} + +// GetOutboundConnections gets the value of OutboundConnections for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyOutboundConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsAllowedPersec sets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyOutboundConnectionsAllowedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsAllowedPersec", (value)) +} + +// GetOutboundConnectionsAllowedPersec gets the value of OutboundConnectionsAllowedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyOutboundConnectionsAllowedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsAllowedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundConnectionsBlockedPersec sets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyOutboundConnectionsBlockedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundConnectionsBlockedPersec", (value)) +} + +// GetOutboundConnectionsBlockedPersec gets the value of OutboundConnectionsBlockedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyOutboundConnectionsBlockedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundConnectionsBlockedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutboundPacketsDiscardedPersec sets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyOutboundPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("OutboundPacketsDiscardedPersec", (value)) +} + +// GetOutboundPacketsDiscardedPersec gets the value of OutboundPacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyOutboundPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutboundPacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsDiscardedPersec sets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) SetPropertyPacketsDiscardedPersec(value uint32) (err error) { + return instance.SetProperty("PacketsDiscardedPersec", (value)) +} + +// GetPacketsDiscardedPersec gets the value of PacketsDiscardedPersec for the instance +func (instance *Win32_PerfRawData_Counters_WFPv6) GetPropertyPacketsDiscardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsDiscardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WSManQuotaStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WSManQuotaStatistics.go new file mode 100644 index 00000000..7bace0ec --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_WSManQuotaStatistics.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_WSManQuotaStatistics struct +type Win32_PerfRawData_Counters_WSManQuotaStatistics struct { + *Win32_PerfRawData + + // + ActiveOperations uint32 + + // + ActiveShells uint32 + + // + ActiveUsers uint32 + + // + ProcessID uint32 + + // + SystemQuotaViolationsPerSecond uint32 + + // + TotalRequestsPerSecond uint32 + + // + UserQuotaViolationsPerSecond uint32 +} + +func NewWin32_PerfRawData_Counters_WSManQuotaStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_WSManQuotaStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WSManQuotaStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_WSManQuotaStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_WSManQuotaStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_WSManQuotaStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveOperations sets the value of ActiveOperations for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertyActiveOperations(value uint32) (err error) { + return instance.SetProperty("ActiveOperations", (value)) +} + +// GetActiveOperations gets the value of ActiveOperations for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertyActiveOperations() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveOperations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveShells sets the value of ActiveShells for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertyActiveShells(value uint32) (err error) { + return instance.SetProperty("ActiveShells", (value)) +} + +// GetActiveShells gets the value of ActiveShells for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertyActiveShells() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveShells") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveUsers sets the value of ActiveUsers for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertyActiveUsers(value uint32) (err error) { + return instance.SetProperty("ActiveUsers", (value)) +} + +// GetActiveUsers gets the value of ActiveUsers for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertyActiveUsers() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveUsers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemQuotaViolationsPerSecond sets the value of SystemQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertySystemQuotaViolationsPerSecond(value uint32) (err error) { + return instance.SetProperty("SystemQuotaViolationsPerSecond", (value)) +} + +// GetSystemQuotaViolationsPerSecond gets the value of SystemQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertySystemQuotaViolationsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemQuotaViolationsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalRequestsPerSecond sets the value of TotalRequestsPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertyTotalRequestsPerSecond(value uint32) (err error) { + return instance.SetProperty("TotalRequestsPerSecond", (value)) +} + +// GetTotalRequestsPerSecond gets the value of TotalRequestsPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertyTotalRequestsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRequestsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUserQuotaViolationsPerSecond sets the value of UserQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) SetPropertyUserQuotaViolationsPerSecond(value uint32) (err error) { + return instance.SetProperty("UserQuotaViolationsPerSecond", (value)) +} + +// GetUserQuotaViolationsPerSecond gets the value of UserQuotaViolationsPerSecond for the instance +func (instance *Win32_PerfRawData_Counters_WSManQuotaStatistics) GetPropertyUserQuotaViolationsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("UserQuotaViolationsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCICommonBuffer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCICommonBuffer.go new file mode 100644 index 00000000..156b1f81 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCICommonBuffer.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_XHCICommonBuffer struct +type Win32_PerfRawData_Counters_XHCICommonBuffer struct { + *Win32_PerfRawData + + // + AllocationCount uint32 + + // + FreeCount uint32 + + // + PagesInUse uint32 + + // + PagesTotal uint32 +} + +func NewWin32_PerfRawData_Counters_XHCICommonBufferEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_XHCICommonBuffer, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_XHCICommonBuffer{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_XHCICommonBufferEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_XHCICommonBuffer, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_XHCICommonBuffer{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAllocationCount sets the value of AllocationCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) SetPropertyAllocationCount(value uint32) (err error) { + return instance.SetProperty("AllocationCount", (value)) +} + +// GetAllocationCount gets the value of AllocationCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) GetPropertyAllocationCount() (value uint32, err error) { + retValue, err := instance.GetProperty("AllocationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeCount sets the value of FreeCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) SetPropertyFreeCount(value uint32) (err error) { + return instance.SetProperty("FreeCount", (value)) +} + +// GetFreeCount gets the value of FreeCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) GetPropertyFreeCount() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesInUse sets the value of PagesInUse for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) SetPropertyPagesInUse(value uint32) (err error) { + return instance.SetProperty("PagesInUse", (value)) +} + +// GetPagesInUse gets the value of PagesInUse for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) GetPropertyPagesInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesTotal sets the value of PagesTotal for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) SetPropertyPagesTotal(value uint32) (err error) { + return instance.SetProperty("PagesTotal", (value)) +} + +// GetPagesTotal gets the value of PagesTotal for the instance +func (instance *Win32_PerfRawData_Counters_XHCICommonBuffer) GetPropertyPagesTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCIInterrupter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCIInterrupter.go new file mode 100644 index 00000000..bfc6ee33 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCIInterrupter.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_XHCIInterrupter struct +type Win32_PerfRawData_Counters_XHCIInterrupter struct { + *Win32_PerfRawData + + // + DpcRequeueCount uint32 + + // + DPCsPersec uint32 + + // + EventRingFullCount uint32 + + // + EventsprocessedDPC uint64 + + // + EventsprocessedDPC_Base uint32 + + // + InterruptsPersec uint32 +} + +func NewWin32_PerfRawData_Counters_XHCIInterrupterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_XHCIInterrupter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_XHCIInterrupter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_XHCIInterrupterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_XHCIInterrupter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_XHCIInterrupter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDpcRequeueCount sets the value of DpcRequeueCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) SetPropertyDpcRequeueCount(value uint32) (err error) { + return instance.SetProperty("DpcRequeueCount", (value)) +} + +// GetDpcRequeueCount gets the value of DpcRequeueCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) GetPropertyDpcRequeueCount() (value uint32, err error) { + retValue, err := instance.GetProperty("DpcRequeueCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCsPersec sets the value of DPCsPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) SetPropertyDPCsPersec(value uint32) (err error) { + return instance.SetProperty("DPCsPersec", (value)) +} + +// GetDPCsPersec gets the value of DPCsPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) GetPropertyDPCsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventRingFullCount sets the value of EventRingFullCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) SetPropertyEventRingFullCount(value uint32) (err error) { + return instance.SetProperty("EventRingFullCount", (value)) +} + +// GetEventRingFullCount gets the value of EventRingFullCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) GetPropertyEventRingFullCount() (value uint32, err error) { + retValue, err := instance.GetProperty("EventRingFullCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEventsprocessedDPC sets the value of EventsprocessedDPC for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) SetPropertyEventsprocessedDPC(value uint64) (err error) { + return instance.SetProperty("EventsprocessedDPC", (value)) +} + +// GetEventsprocessedDPC gets the value of EventsprocessedDPC for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) GetPropertyEventsprocessedDPC() (value uint64, err error) { + retValue, err := instance.GetProperty("EventsprocessedDPC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEventsprocessedDPC_Base sets the value of EventsprocessedDPC_Base for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) SetPropertyEventsprocessedDPC_Base(value uint32) (err error) { + return instance.SetProperty("EventsprocessedDPC_Base", (value)) +} + +// GetEventsprocessedDPC_Base gets the value of EventsprocessedDPC_Base for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) GetPropertyEventsprocessedDPC_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("EventsprocessedDPC_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) SetPropertyInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCIInterrupter) GetPropertyInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCITransferRing.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCITransferRing.go new file mode 100644 index 00000000..7251eaa9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Counters_XHCITransferRing.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Counters_XHCITransferRing struct +type Win32_PerfRawData_Counters_XHCITransferRing struct { + *Win32_PerfRawData + + // + BytesPerSec uint32 + + // + FailedTransferCount uint32 + + // + IsochTDFailuresPersec uint32 + + // + IsochTDPersec uint32 + + // + MissedServiceErrorCount uint32 + + // + TransfersPersec uint32 + + // + UnderrunOverruncount uint32 +} + +func NewWin32_PerfRawData_Counters_XHCITransferRingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Counters_XHCITransferRing, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_XHCITransferRing{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Counters_XHCITransferRingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Counters_XHCITransferRing, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Counters_XHCITransferRing{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesPerSec sets the value of BytesPerSec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyBytesPerSec(value uint32) (err error) { + return instance.SetProperty("BytesPerSec", (value)) +} + +// GetBytesPerSec gets the value of BytesPerSec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFailedTransferCount sets the value of FailedTransferCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyFailedTransferCount(value uint32) (err error) { + return instance.SetProperty("FailedTransferCount", (value)) +} + +// GetFailedTransferCount gets the value of FailedTransferCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyFailedTransferCount() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsochTDFailuresPersec sets the value of IsochTDFailuresPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyIsochTDFailuresPersec(value uint32) (err error) { + return instance.SetProperty("IsochTDFailuresPersec", (value)) +} + +// GetIsochTDFailuresPersec gets the value of IsochTDFailuresPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyIsochTDFailuresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsochTDFailuresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsochTDPersec sets the value of IsochTDPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyIsochTDPersec(value uint32) (err error) { + return instance.SetProperty("IsochTDPersec", (value)) +} + +// GetIsochTDPersec gets the value of IsochTDPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyIsochTDPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsochTDPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedServiceErrorCount sets the value of MissedServiceErrorCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyMissedServiceErrorCount(value uint32) (err error) { + return instance.SetProperty("MissedServiceErrorCount", (value)) +} + +// GetMissedServiceErrorCount gets the value of MissedServiceErrorCount for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyMissedServiceErrorCount() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedServiceErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransfersPersec sets the value of TransfersPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyTransfersPersec(value uint32) (err error) { + return instance.SetProperty("TransfersPersec", (value)) +} + +// GetTransfersPersec gets the value of TransfersPersec for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyTransfersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUnderrunOverruncount sets the value of UnderrunOverruncount for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) SetPropertyUnderrunOverruncount(value uint32) (err error) { + return instance.SetProperty("UnderrunOverruncount", (value)) +} + +// GetUnderrunOverruncount gets the value of UnderrunOverruncount for the instance +func (instance *Win32_PerfRawData_Counters_XHCITransferRing) GetPropertyUnderrunOverruncount() (value uint32, err error) { + retValue, err := instance.GetProperty("UnderrunOverruncount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go new file mode 100644 index 00000000..82587bba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator struct +type Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator struct { + *Win32_PerfRawData + + // + CreateFile uint64 + + // + CreateFilePersec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWrites uint64 + + // + IOWritesBytes uint64 + + // + IOWritesPersec uint64 + + // + MetadataIO uint64 + + // + MetadataIOPersec uint64 +} + +func NewWin32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinatorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinatorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCreateFile sets the value of CreateFile for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyCreateFile(value uint64) (err error) { + return instance.SetProperty("CreateFile", (value)) +} + +// GetCreateFile gets the value of CreateFile for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyCreateFile() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFilePersec sets the value of CreateFilePersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyCreateFilePersec(value uint64) (err error) { + return instance.SetProperty("CreateFilePersec", (value)) +} + +// GetCreateFilePersec gets the value of CreateFilePersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyCreateFilePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFilePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesBytes sets the value of IOWritesBytes for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWritesBytes(value uint64) (err error) { + return instance.SetProperty("IOWritesBytes", (value)) +} + +// GetIOWritesBytes gets the value of IOWritesBytes for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWritesBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIO sets the value of MetadataIO for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyMetadataIO(value uint64) (err error) { + return instance.SetProperty("MetadataIO", (value)) +} + +// GetMetadataIO gets the value of MetadataIO for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyMetadataIO() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIOPersec sets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) SetPropertyMetadataIOPersec(value uint64) (err error) { + return instance.SetProperty("MetadataIOPersec", (value)) +} + +// GetMetadataIOPersec gets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfRawData_Csv20FilterPerfProvider_ClusterCSVCoordinator) GetPropertyMetadataIOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS.go new file mode 100644 index 00000000..8bc75c6d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS.go @@ -0,0 +1,1010 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS struct +type Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS struct { + *Win32_PerfRawData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerRead_Base uint32 + + // + AvgBytesPerWrite uint64 + + // + AvgBytesPerWrite_Base uint32 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRead_Base uint32 + + // + AvgsecPerWrite uint32 + + // + AvgsecPerWrite_Base uint32 + + // + AvgWriteQueueLength uint64 + + // + CreateFile uint64 + + // + CreateFilePersec uint64 + + // + CurrentReadQueueLength uint64 + + // + CurrentWriteQueueLength uint64 + + // + FilesInvalidatedDuringResume uint64 + + // + FilesInvalidatedOther uint64 + + // + FilesOpened uint32 + + // + Flushes uint64 + + // + FlushesPersec uint64 + + // + MetadataIO uint64 + + // + MetadataIOPersec uint64 + + // + ReadBytesPersec uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + VolumePauseCountDisk uint64 + + // + VolumePauseCountNetwork uint64 + + // + VolumePauseCountOther uint64 + + // + VolumePauseCountTotal uint64 + + // + VolumeState uint32 + + // + WriteBytesPersec uint64 + + // + Writes uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerRead_Base sets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerRead_Base", (value)) +} + +// GetAvgBytesPerRead_Base gets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite_Base sets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerWrite_Base", (value)) +} + +// GetAvgBytesPerWrite_Base gets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead_Base sets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgsecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead_Base", (value)) +} + +// GetAvgsecPerRead_Base gets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgsecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite_Base sets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgsecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite_Base", (value)) +} + +// GetAvgsecPerWrite_Base gets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgsecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFile sets the value of CreateFile for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCreateFile(value uint64) (err error) { + return instance.SetProperty("CreateFile", (value)) +} + +// GetCreateFile gets the value of CreateFile for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCreateFile() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFilePersec sets the value of CreateFilePersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCreateFilePersec(value uint64) (err error) { + return instance.SetProperty("CreateFilePersec", (value)) +} + +// GetCreateFilePersec gets the value of CreateFilePersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCreateFilePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFilePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentReadQueueLength sets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCurrentReadQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentReadQueueLength", (value)) +} + +// GetCurrentReadQueueLength gets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCurrentReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentWriteQueueLength sets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyCurrentWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentWriteQueueLength", (value)) +} + +// GetCurrentWriteQueueLength gets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyCurrentWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedDuringResume sets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFilesInvalidatedDuringResume(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedDuringResume", (value)) +} + +// GetFilesInvalidatedDuringResume gets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFilesInvalidatedDuringResume() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedDuringResume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedOther sets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFilesInvalidatedOther(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedOther", (value)) +} + +// GetFilesInvalidatedOther gets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFilesInvalidatedOther() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesOpened sets the value of FilesOpened for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFilesOpened(value uint32) (err error) { + return instance.SetProperty("FilesOpened", (value)) +} + +// GetFilesOpened gets the value of FilesOpened for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFilesOpened() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushes sets the value of Flushes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFlushes(value uint64) (err error) { + return instance.SetProperty("Flushes", (value)) +} + +// GetFlushes gets the value of Flushes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFlushes() (value uint64, err error) { + retValue, err := instance.GetProperty("Flushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushesPersec sets the value of FlushesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyFlushesPersec(value uint64) (err error) { + return instance.SetProperty("FlushesPersec", (value)) +} + +// GetFlushesPersec gets the value of FlushesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIO sets the value of MetadataIO for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyMetadataIO(value uint64) (err error) { + return instance.SetProperty("MetadataIO", (value)) +} + +// GetMetadataIO gets the value of MetadataIO for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyMetadataIO() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIOPersec sets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyMetadataIOPersec(value uint64) (err error) { + return instance.SetProperty("MetadataIOPersec", (value)) +} + +// GetMetadataIOPersec gets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyMetadataIOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountDisk sets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountDisk(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountDisk", (value)) +} + +// GetVolumePauseCountDisk gets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountDisk() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountNetwork sets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountNetwork(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountNetwork", (value)) +} + +// GetVolumePauseCountNetwork gets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountNetwork() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountNetwork") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountOther sets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountOther(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountOther", (value)) +} + +// GetVolumePauseCountOther gets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountOther() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountTotal sets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumePauseCountTotal(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountTotal", (value)) +} + +// GetVolumePauseCountTotal gets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumePauseCountTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeState sets the value of VolumeState for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyVolumeState(value uint32) (err error) { + return instance.SetProperty("VolumeState", (value)) +} + +// GetVolumeState gets the value of VolumeState for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyVolumeState() (value uint32, err error) { + retValue, err := instance.GetProperty("VolumeState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFS) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go new file mode 100644 index 00000000..44c88c1b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache struct +type Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache struct { + *Win32_PerfRawData + + // + CacheIOReadBytes uint64 + + // + CacheIOReadBytesPersec uint64 + + // + CacheRead uint64 + + // + CacheReadPerSec uint64 + + // + CacheSizeConfigured uint64 + + // + CacheSizeCurrent uint64 + + // + CacheState uint64 + + // + DiskIOReadBytes uint64 + + // + DiskIOReadBytesPerSec uint64 + + // + DiskIOReads uint64 + + // + DiskIOReadsPerSec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPerSec uint64 + + // + IOReads uint64 + + // + IOReadsPerSec uint64 + + // + LRUCacheSizeCurrent uint64 + + // + LRUCacheSizeTarget uint64 + + // + PartialRead uint64 + + // + PartialReadPersec uint64 + + // + PercentCacheValid uint64 + + // + PercentCacheValid_Base uint64 + + // + ValidCacheSize uint64 +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCacheIOReadBytes sets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheIOReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytes", (value)) +} + +// GetCacheIOReadBytes gets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheIOReadBytesPersec sets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytesPersec", (value)) +} + +// GetCacheIOReadBytesPersec gets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheRead sets the value of CacheRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheRead(value uint64) (err error) { + return instance.SetProperty("CacheRead", (value)) +} + +// GetCacheRead gets the value of CacheRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheRead() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReadPerSec sets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheReadPerSec(value uint64) (err error) { + return instance.SetProperty("CacheReadPerSec", (value)) +} + +// GetCacheReadPerSec gets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheReadPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReadPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeConfigured sets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheSizeConfigured(value uint64) (err error) { + return instance.SetProperty("CacheSizeConfigured", (value)) +} + +// GetCacheSizeConfigured gets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheSizeConfigured() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeCurrent sets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("CacheSizeCurrent", (value)) +} + +// GetCacheSizeCurrent gets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheState sets the value of CacheState for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyCacheState(value uint64) (err error) { + return instance.SetProperty("CacheState", (value)) +} + +// GetCacheState gets the value of CacheState for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyCacheState() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytes sets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReadBytes(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytes", (value)) +} + +// GetDiskIOReadBytes gets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytesPerSec sets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytesPerSec", (value)) +} + +// GetDiskIOReadBytesPerSec gets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReads sets the value of DiskIOReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReads(value uint64) (err error) { + return instance.SetProperty("DiskIOReads", (value)) +} + +// GetDiskIOReads gets the value of DiskIOReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadsPerSec sets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyDiskIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadsPerSec", (value)) +} + +// GetDiskIOReadsPerSec gets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyDiskIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPerSec sets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPerSec", (value)) +} + +// GetIOReadBytesPerSec gets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPerSec sets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadsPerSec", (value)) +} + +// GetIOReadsPerSec gets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeCurrent sets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyLRUCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeCurrent", (value)) +} + +// GetLRUCacheSizeCurrent gets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyLRUCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeTarget sets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyLRUCacheSizeTarget(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeTarget", (value)) +} + +// GetLRUCacheSizeTarget gets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyLRUCacheSizeTarget() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialRead sets the value of PartialRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPartialRead(value uint64) (err error) { + return instance.SetProperty("PartialRead", (value)) +} + +// GetPartialRead gets the value of PartialRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPartialRead() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialReadPersec sets the value of PartialReadPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPartialReadPersec(value uint64) (err error) { + return instance.SetProperty("PartialReadPersec", (value)) +} + +// GetPartialReadPersec gets the value of PartialReadPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPartialReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentCacheValid sets the value of PercentCacheValid for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPercentCacheValid(value uint64) (err error) { + return instance.SetProperty("PercentCacheValid", (value)) +} + +// GetPercentCacheValid gets the value of PercentCacheValid for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPercentCacheValid() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentCacheValid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentCacheValid_Base sets the value of PercentCacheValid_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyPercentCacheValid_Base(value uint64) (err error) { + return instance.SetProperty("PercentCacheValid_Base", (value)) +} + +// GetPercentCacheValid_Base gets the value of PercentCacheValid_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyPercentCacheValid_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentCacheValid_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValidCacheSize sets the value of ValidCacheSize for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) SetPropertyValidCacheSize(value uint64) (err error) { + return instance.SetProperty("ValidCacheSize", (value)) +} + +// GetValidCacheSize gets the value of ValidCacheSize for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSBlockCache) GetPropertyValidCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ValidCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go new file mode 100644 index 00000000..d78a4ddb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO struct +type Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO struct { + *Win32_PerfRawData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerRead_Base uint32 + + // + AvgBytesPerWrite uint64 + + // + AvgBytesPerWrite_Base uint32 + + // + AvgReadQueueLength uint64 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRead_Base uint32 + + // + AvgsecPerWrite uint32 + + // + AvgsecPerWrite_Base uint32 + + // + AvgWriteQueueLength uint64 + + // + CurrentReadQueueLength uint64 + + // + CurrentWriteQueueLength uint64 + + // + NonSplitReads uint64 + + // + NonSplitReadsPersec uint64 + + // + NonSplitWrites uint64 + + // + NonSplitWritesPersec uint64 + + // + ReadBytes uint64 + + // + ReadBytesPersec uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + SplitReads uint64 + + // + SplitReadsPersec uint64 + + // + SplitWrites uint64 + + // + SplitWritesPersec uint64 + + // + WriteBytes uint64 + + // + WriteBytesPersec uint64 + + // + Writes uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIOEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerRead_Base sets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerRead_Base", (value)) +} + +// GetAvgBytesPerRead_Base gets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite_Base sets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerWrite_Base", (value)) +} + +// GetAvgBytesPerWrite_Base gets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgReadQueueLength sets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadQueueLength", (value)) +} + +// GetAvgReadQueueLength gets the value of AvgReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead_Base sets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgsecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead_Base", (value)) +} + +// GetAvgsecPerRead_Base gets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgsecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite_Base sets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgsecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite_Base", (value)) +} + +// GetAvgsecPerWrite_Base gets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgsecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgWriteQueueLength sets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyAvgWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWriteQueueLength", (value)) +} + +// GetAvgWriteQueueLength gets the value of AvgWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyAvgWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentReadQueueLength sets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyCurrentReadQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentReadQueueLength", (value)) +} + +// GetCurrentReadQueueLength gets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyCurrentReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentWriteQueueLength sets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyCurrentWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentWriteQueueLength", (value)) +} + +// GetCurrentWriteQueueLength gets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyCurrentWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitReads sets the value of NonSplitReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitReads(value uint64) (err error) { + return instance.SetProperty("NonSplitReads", (value)) +} + +// GetNonSplitReads gets the value of NonSplitReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitReadsPersec sets the value of NonSplitReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitReadsPersec(value uint64) (err error) { + return instance.SetProperty("NonSplitReadsPersec", (value)) +} + +// GetNonSplitReadsPersec gets the value of NonSplitReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitWrites sets the value of NonSplitWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitWrites(value uint64) (err error) { + return instance.SetProperty("NonSplitWrites", (value)) +} + +// GetNonSplitWrites gets the value of NonSplitWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonSplitWritesPersec sets the value of NonSplitWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyNonSplitWritesPersec(value uint64) (err error) { + return instance.SetProperty("NonSplitWritesPersec", (value)) +} + +// GetNonSplitWritesPersec gets the value of NonSplitWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyNonSplitWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NonSplitWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytes sets the value of ReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReadBytes(value uint64) (err error) { + return instance.SetProperty("ReadBytes", (value)) +} + +// GetReadBytes gets the value of ReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitReads sets the value of SplitReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitReads(value uint64) (err error) { + return instance.SetProperty("SplitReads", (value)) +} + +// GetSplitReads gets the value of SplitReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitReadsPersec sets the value of SplitReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitReadsPersec(value uint64) (err error) { + return instance.SetProperty("SplitReadsPersec", (value)) +} + +// GetSplitReadsPersec gets the value of SplitReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitWrites sets the value of SplitWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitWrites(value uint64) (err error) { + return instance.SetProperty("SplitWrites", (value)) +} + +// GetSplitWrites gets the value of SplitWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitWritesPersec sets the value of SplitWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertySplitWritesPersec(value uint64) (err error) { + return instance.SetProperty("SplitWritesPersec", (value)) +} + +// GetSplitWritesPersec gets the value of SplitWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertySplitWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SplitWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytes sets the value of WriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWriteBytes(value uint64) (err error) { + return instance.SetProperty("WriteBytes", (value)) +} + +// GetWriteBytes gets the value of WriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSDirectIO) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go new file mode 100644 index 00000000..fdf54aac --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO.go @@ -0,0 +1,770 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO struct +type Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO struct { + *Win32_PerfRawData + + // + AvgBytesPerRead uint64 + + // + AvgBytesPerRead_Base uint32 + + // + AvgBytesPerWrite uint64 + + // + AvgBytesPerWrite_Base uint32 + + // + AvgReadsQueueLength uint64 + + // + AvgsecPerRead uint32 + + // + AvgsecPerRead_Base uint32 + + // + AvgsecPerWrite uint32 + + // + AvgsecPerWrite_Base uint32 + + // + AvgTrimQueueLength uint64 + + // + AvgWritesQueueLength uint64 + + // + CurrentReadQueueLength uint64 + + // + CurrentTrimQueueLength uint64 + + // + CurrentWriteQueueLength uint64 + + // + ReadBytes uint64 + + // + ReadBytesPersec uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + TrimLatency uint32 + + // + TrimLatency_Base uint32 + + // + TrimPersec uint64 + + // + WriteBytes uint64 + + // + WriteBytesPersec uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIOEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerRead sets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerRead", (value)) +} + +// GetAvgBytesPerRead gets the value of AvgBytesPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerRead_Base sets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerRead_Base", (value)) +} + +// GetAvgBytesPerRead_Base gets the value of AvgBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgBytesPerWrite sets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerWrite", (value)) +} + +// GetAvgBytesPerWrite gets the value of AvgBytesPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerWrite_Base sets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerWrite_Base", (value)) +} + +// GetAvgBytesPerWrite_Base gets the value of AvgBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgReadsQueueLength sets the value of AvgReadsQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgReadsQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgReadsQueueLength", (value)) +} + +// GetAvgReadsQueueLength gets the value of AvgReadsQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgReadsQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgReadsQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgsecPerRead sets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgsecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead", (value)) +} + +// GetAvgsecPerRead gets the value of AvgsecPerRead for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgsecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRead_Base sets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgsecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRead_Base", (value)) +} + +// GetAvgsecPerRead_Base gets the value of AvgsecPerRead_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgsecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite sets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgsecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite", (value)) +} + +// GetAvgsecPerWrite gets the value of AvgsecPerWrite for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgsecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerWrite_Base sets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgsecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerWrite_Base", (value)) +} + +// GetAvgsecPerWrite_Base gets the value of AvgsecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgsecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgTrimQueueLength sets the value of AvgTrimQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgTrimQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgTrimQueueLength", (value)) +} + +// GetAvgTrimQueueLength gets the value of AvgTrimQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgTrimQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgTrimQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgWritesQueueLength sets the value of AvgWritesQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyAvgWritesQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgWritesQueueLength", (value)) +} + +// GetAvgWritesQueueLength gets the value of AvgWritesQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyAvgWritesQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgWritesQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentReadQueueLength sets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyCurrentReadQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentReadQueueLength", (value)) +} + +// GetCurrentReadQueueLength gets the value of CurrentReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyCurrentReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentTrimQueueLength sets the value of CurrentTrimQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyCurrentTrimQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentTrimQueueLength", (value)) +} + +// GetCurrentTrimQueueLength gets the value of CurrentTrimQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyCurrentTrimQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentTrimQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentWriteQueueLength sets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyCurrentWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("CurrentWriteQueueLength", (value)) +} + +// GetCurrentWriteQueueLength gets the value of CurrentWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyCurrentWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytes sets the value of ReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReadBytes(value uint64) (err error) { + return instance.SetProperty("ReadBytes", (value)) +} + +// GetReadBytes gets the value of ReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrimLatency sets the value of TrimLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyTrimLatency(value uint32) (err error) { + return instance.SetProperty("TrimLatency", (value)) +} + +// GetTrimLatency gets the value of TrimLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyTrimLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("TrimLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTrimLatency_Base sets the value of TrimLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyTrimLatency_Base(value uint32) (err error) { + return instance.SetProperty("TrimLatency_Base", (value)) +} + +// GetTrimLatency_Base gets the value of TrimLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyTrimLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TrimLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTrimPersec sets the value of TrimPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyTrimPersec(value uint64) (err error) { + return instance.SetProperty("TrimPersec", (value)) +} + +// GetTrimPersec gets the value of TrimPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyTrimPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TrimPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytes sets the value of WriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyWriteBytes(value uint64) (err error) { + return instance.SetProperty("WriteBytes", (value)) +} + +// GetWriteBytes gets the value of WriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFSRedirectedIO) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem.go new file mode 100644 index 00000000..006b3f97 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem.go @@ -0,0 +1,1970 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem struct +type Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem struct { + *Win32_PerfRawData + + // + CreateFile uint64 + + // + CreateFilePersec uint64 + + // + FilesInvalidatedDuringResume uint64 + + // + FilesInvalidatedOther uint64 + + // + FilesOpened uint32 + + // + Flushes uint64 + + // + FlushesPersec uint64 + + // + IOReadAvgQueueLength uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadLatency uint32 + + // + IOReadLatency_Base uint32 + + // + IOReadQueueLength uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOSingleReads uint64 + + // + IOSingleReadsPersec uint64 + + // + IOSingleWrites uint64 + + // + IOSingleWritesPersec uint64 + + // + IOSplitReads uint64 + + // + IOSplitReadsPersec uint64 + + // + IOSplitWrites uint64 + + // + IOSplitWritesPersec uint64 + + // + IOWriteAvgQueueLength uint64 + + // + IOWriteBytes uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteLatency uint32 + + // + IOWriteLatency_Base uint32 + + // + IOWriteQueueLength uint64 + + // + IOWrites uint64 + + // + IOWritesPersec uint64 + + // + MetadataIO uint64 + + // + MetadataIOPersec uint64 + + // + ReadLatency uint32 + + // + ReadLatency_Base uint32 + + // + ReadQueueLength uint64 + + // + Reads uint64 + + // + ReadsPersec uint64 + + // + RedirectedReadBytes uint64 + + // + RedirectedReadBytesPersec uint64 + + // + RedirectedReadLatency uint32 + + // + RedirectedReadLatency_Base uint32 + + // + RedirectedReadQueueLength uint64 + + // + RedirectedReads uint64 + + // + RedirectedReadsAvgQueueLength uint64 + + // + RedirectedReadsPersec uint64 + + // + RedirectedWriteBytes uint64 + + // + RedirectedWriteBytesPersec uint64 + + // + RedirectedWriteLatency uint32 + + // + RedirectedWriteLatency_Base uint32 + + // + RedirectedWriteQueueLength uint64 + + // + RedirectedWrites uint64 + + // + RedirectedWritesAvgQueueLength uint64 + + // + RedirectedWritesPersec uint64 + + // + VolumePauseCountDisk uint64 + + // + VolumePauseCountNetwork uint64 + + // + VolumePauseCountOther uint64 + + // + VolumePauseCountTotal uint64 + + // + VolumeState uint32 + + // + WriteLatency uint32 + + // + WriteLatency_Base uint32 + + // + WriteQueueLength uint64 + + // + Writes uint64 + + // + WritesPersec uint64 +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystemEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCreateFile sets the value of CreateFile for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyCreateFile(value uint64) (err error) { + return instance.SetProperty("CreateFile", (value)) +} + +// GetCreateFile gets the value of CreateFile for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyCreateFile() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCreateFilePersec sets the value of CreateFilePersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyCreateFilePersec(value uint64) (err error) { + return instance.SetProperty("CreateFilePersec", (value)) +} + +// GetCreateFilePersec gets the value of CreateFilePersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyCreateFilePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CreateFilePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedDuringResume sets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFilesInvalidatedDuringResume(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedDuringResume", (value)) +} + +// GetFilesInvalidatedDuringResume gets the value of FilesInvalidatedDuringResume for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFilesInvalidatedDuringResume() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedDuringResume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesInvalidatedOther sets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFilesInvalidatedOther(value uint64) (err error) { + return instance.SetProperty("FilesInvalidatedOther", (value)) +} + +// GetFilesInvalidatedOther gets the value of FilesInvalidatedOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFilesInvalidatedOther() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesInvalidatedOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesOpened sets the value of FilesOpened for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFilesOpened(value uint32) (err error) { + return instance.SetProperty("FilesOpened", (value)) +} + +// GetFilesOpened gets the value of FilesOpened for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFilesOpened() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushes sets the value of Flushes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFlushes(value uint64) (err error) { + return instance.SetProperty("Flushes", (value)) +} + +// GetFlushes gets the value of Flushes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFlushes() (value uint64, err error) { + retValue, err := instance.GetProperty("Flushes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushesPersec sets the value of FlushesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyFlushesPersec(value uint64) (err error) { + return instance.SetProperty("FlushesPersec", (value)) +} + +// GetFlushesPersec gets the value of FlushesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadAvgQueueLength sets the value of IOReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("IOReadAvgQueueLength", (value)) +} + +// GetIOReadAvgQueueLength gets the value of IOReadAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadLatency sets the value of IOReadLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadLatency(value uint32) (err error) { + return instance.SetProperty("IOReadLatency", (value)) +} + +// GetIOReadLatency gets the value of IOReadLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("IOReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOReadLatency_Base sets the value of IOReadLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOReadLatency_Base", (value)) +} + +// GetIOReadLatency_Base gets the value of IOReadLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOReadQueueLength sets the value of IOReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadQueueLength(value uint64) (err error) { + return instance.SetProperty("IOReadQueueLength", (value)) +} + +// GetIOReadQueueLength gets the value of IOReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleReads sets the value of IOSingleReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleReads(value uint64) (err error) { + return instance.SetProperty("IOSingleReads", (value)) +} + +// GetIOSingleReads gets the value of IOSingleReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleReadsPersec sets the value of IOSingleReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOSingleReadsPersec", (value)) +} + +// GetIOSingleReadsPersec gets the value of IOSingleReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleWrites sets the value of IOSingleWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleWrites(value uint64) (err error) { + return instance.SetProperty("IOSingleWrites", (value)) +} + +// GetIOSingleWrites gets the value of IOSingleWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSingleWritesPersec sets the value of IOSingleWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSingleWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOSingleWritesPersec", (value)) +} + +// GetIOSingleWritesPersec gets the value of IOSingleWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSingleWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSingleWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitReads sets the value of IOSplitReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitReads(value uint64) (err error) { + return instance.SetProperty("IOSplitReads", (value)) +} + +// GetIOSplitReads gets the value of IOSplitReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitReadsPersec sets the value of IOSplitReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOSplitReadsPersec", (value)) +} + +// GetIOSplitReadsPersec gets the value of IOSplitReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitWrites sets the value of IOSplitWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitWrites(value uint64) (err error) { + return instance.SetProperty("IOSplitWrites", (value)) +} + +// GetIOSplitWrites gets the value of IOSplitWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOSplitWritesPersec sets the value of IOSplitWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOSplitWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOSplitWritesPersec", (value)) +} + +// GetIOSplitWritesPersec gets the value of IOSplitWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOSplitWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOSplitWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteAvgQueueLength sets the value of IOWriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("IOWriteAvgQueueLength", (value)) +} + +// GetIOWriteAvgQueueLength gets the value of IOWriteAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytes sets the value of IOWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteBytes(value uint64) (err error) { + return instance.SetProperty("IOWriteBytes", (value)) +} + +// GetIOWriteBytes gets the value of IOWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteLatency sets the value of IOWriteLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteLatency(value uint32) (err error) { + return instance.SetProperty("IOWriteLatency", (value)) +} + +// GetIOWriteLatency gets the value of IOWriteLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("IOWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOWriteLatency_Base sets the value of IOWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOWriteLatency_Base", (value)) +} + +// GetIOWriteLatency_Base gets the value of IOWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOWriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOWriteQueueLength sets the value of IOWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("IOWriteQueueLength", (value)) +} + +// GetIOWriteQueueLength gets the value of IOWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIO sets the value of MetadataIO for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyMetadataIO(value uint64) (err error) { + return instance.SetProperty("MetadataIO", (value)) +} + +// GetMetadataIO gets the value of MetadataIO for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyMetadataIO() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMetadataIOPersec sets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyMetadataIOPersec(value uint64) (err error) { + return instance.SetProperty("MetadataIOPersec", (value)) +} + +// GetMetadataIOPersec gets the value of MetadataIOPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyMetadataIOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MetadataIOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadLatency sets the value of ReadLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadLatency(value uint32) (err error) { + return instance.SetProperty("ReadLatency", (value)) +} + +// GetReadLatency gets the value of ReadLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadLatency_Base sets the value of ReadLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("ReadLatency_Base", (value)) +} + +// GetReadLatency_Base gets the value of ReadLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadQueueLength sets the value of ReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadQueueLength(value uint64) (err error) { + return instance.SetProperty("ReadQueueLength", (value)) +} + +// GetReadQueueLength gets the value of ReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReads sets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReads(value uint64) (err error) { + return instance.SetProperty("Reads", (value)) +} + +// GetReads gets the value of Reads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReads() (value uint64, err error) { + retValue, err := instance.GetProperty("Reads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadsPersec sets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyReadsPersec(value uint64) (err error) { + return instance.SetProperty("ReadsPersec", (value)) +} + +// GetReadsPersec gets the value of ReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadBytes sets the value of RedirectedReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadBytes(value uint64) (err error) { + return instance.SetProperty("RedirectedReadBytes", (value)) +} + +// GetRedirectedReadBytes gets the value of RedirectedReadBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadBytesPersec sets the value of RedirectedReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedReadBytesPersec", (value)) +} + +// GetRedirectedReadBytesPersec gets the value of RedirectedReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadLatency sets the value of RedirectedReadLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadLatency(value uint32) (err error) { + return instance.SetProperty("RedirectedReadLatency", (value)) +} + +// GetRedirectedReadLatency gets the value of RedirectedReadLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RedirectedReadLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRedirectedReadLatency_Base sets the value of RedirectedReadLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadLatency_Base(value uint32) (err error) { + return instance.SetProperty("RedirectedReadLatency_Base", (value)) +} + +// GetRedirectedReadLatency_Base gets the value of RedirectedReadLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RedirectedReadLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRedirectedReadQueueLength sets the value of RedirectedReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedReadQueueLength", (value)) +} + +// GetRedirectedReadQueueLength gets the value of RedirectedReadQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReads sets the value of RedirectedReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReads(value uint64) (err error) { + return instance.SetProperty("RedirectedReads", (value)) +} + +// GetRedirectedReads gets the value of RedirectedReads for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReads() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadsAvgQueueLength sets the value of RedirectedReadsAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadsAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedReadsAvgQueueLength", (value)) +} + +// GetRedirectedReadsAvgQueueLength gets the value of RedirectedReadsAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadsAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadsAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedReadsPersec sets the value of RedirectedReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedReadsPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedReadsPersec", (value)) +} + +// GetRedirectedReadsPersec gets the value of RedirectedReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWriteBytes sets the value of RedirectedWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteBytes(value uint64) (err error) { + return instance.SetProperty("RedirectedWriteBytes", (value)) +} + +// GetRedirectedWriteBytes gets the value of RedirectedWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWriteBytesPersec sets the value of RedirectedWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedWriteBytesPersec", (value)) +} + +// GetRedirectedWriteBytesPersec gets the value of RedirectedWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWriteLatency sets the value of RedirectedWriteLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteLatency(value uint32) (err error) { + return instance.SetProperty("RedirectedWriteLatency", (value)) +} + +// GetRedirectedWriteLatency gets the value of RedirectedWriteLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("RedirectedWriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRedirectedWriteLatency_Base sets the value of RedirectedWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("RedirectedWriteLatency_Base", (value)) +} + +// GetRedirectedWriteLatency_Base gets the value of RedirectedWriteLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("RedirectedWriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRedirectedWriteQueueLength sets the value of RedirectedWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedWriteQueueLength", (value)) +} + +// GetRedirectedWriteQueueLength gets the value of RedirectedWriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWrites sets the value of RedirectedWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWrites(value uint64) (err error) { + return instance.SetProperty("RedirectedWrites", (value)) +} + +// GetRedirectedWrites gets the value of RedirectedWrites for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWritesAvgQueueLength sets the value of RedirectedWritesAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWritesAvgQueueLength(value uint64) (err error) { + return instance.SetProperty("RedirectedWritesAvgQueueLength", (value)) +} + +// GetRedirectedWritesAvgQueueLength gets the value of RedirectedWritesAvgQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWritesAvgQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWritesAvgQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRedirectedWritesPersec sets the value of RedirectedWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyRedirectedWritesPersec(value uint64) (err error) { + return instance.SetProperty("RedirectedWritesPersec", (value)) +} + +// GetRedirectedWritesPersec gets the value of RedirectedWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyRedirectedWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("RedirectedWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountDisk sets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountDisk(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountDisk", (value)) +} + +// GetVolumePauseCountDisk gets the value of VolumePauseCountDisk for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountDisk() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountNetwork sets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountNetwork(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountNetwork", (value)) +} + +// GetVolumePauseCountNetwork gets the value of VolumePauseCountNetwork for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountNetwork() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountNetwork") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountOther sets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountOther(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountOther", (value)) +} + +// GetVolumePauseCountOther gets the value of VolumePauseCountOther for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountOther() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountOther") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumePauseCountTotal sets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumePauseCountTotal(value uint64) (err error) { + return instance.SetProperty("VolumePauseCountTotal", (value)) +} + +// GetVolumePauseCountTotal gets the value of VolumePauseCountTotal for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumePauseCountTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("VolumePauseCountTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeState sets the value of VolumeState for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyVolumeState(value uint32) (err error) { + return instance.SetProperty("VolumeState", (value)) +} + +// GetVolumeState gets the value of VolumeState for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyVolumeState() (value uint32, err error) { + retValue, err := instance.GetProperty("VolumeState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteLatency sets the value of WriteLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWriteLatency(value uint32) (err error) { + return instance.SetProperty("WriteLatency", (value)) +} + +// GetWriteLatency gets the value of WriteLatency for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWriteLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteLatency_Base sets the value of WriteLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWriteLatency_Base(value uint32) (err error) { + return instance.SetProperty("WriteLatency_Base", (value)) +} + +// GetWriteLatency_Base gets the value of WriteLatency_Base for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWriteLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteQueueLength sets the value of WriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("WriteQueueLength", (value)) +} + +// GetWriteQueueLength gets the value of WriteQueueLength for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrites sets the value of Writes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWrites(value uint64) (err error) { + return instance.SetProperty("Writes", (value)) +} + +// GetWrites gets the value of Writes for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("Writes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWritesPersec sets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) SetPropertyWritesPersec(value uint64) (err error) { + return instance.SetProperty("WritesPersec", (value)) +} + +// GetWritesPersec gets the value of WritesPersec for the instance +func (instance *Win32_PerfRawData_CsvFsPerfProvider_ClusterCSVFileSystem) GetPropertyWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go new file mode 100644 index 00000000..41c118d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection struct +type Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection struct { + *Win32_PerfRawData + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOWriteBytes uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWrites uint64 + + // + IOWritesPersec uint64 +} + +func NewWin32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection{ + Win32_PerfRawData: tmp, + } + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytes sets the value of IOWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWriteBytes(value uint64) (err error) { + return instance.SetProperty("IOWriteBytes", (value)) +} + +// GetIOWriteBytes gets the value of IOWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvNfltPerfProvider_ClusterCSVBlockRedirection) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go new file mode 100644 index 00000000..72e44c86 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache struct +type Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache struct { + *Win32_PerfRawData + + // + CacheIOReadBytes uint64 + + // + CacheIOReadBytesPersec uint64 + + // + CacheRead uint64 + + // + CacheReadPerSec uint64 + + // + CacheSizeConfigured uint64 + + // + CacheSizeCurrent uint64 + + // + CacheState uint64 + + // + DiskIOReadBytes uint64 + + // + DiskIOReadBytesPerSec uint64 + + // + DiskIOReads uint64 + + // + DiskIOReadsPerSec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPerSec uint64 + + // + IOReads uint64 + + // + IOReadsPerSec uint64 + + // + LRUCacheSizeCurrent uint64 + + // + LRUCacheSizeTarget uint64 + + // + PartialRead uint64 + + // + PartialReadPersec uint64 + + // + PercentCacheValid uint64 + + // + PercentCacheValid_Base uint64 + + // + ValidCacheSize uint64 +} + +func NewWin32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCacheIOReadBytes sets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheIOReadBytes(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytes", (value)) +} + +// GetCacheIOReadBytes gets the value of CacheIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheIOReadBytesPersec sets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("CacheIOReadBytesPersec", (value)) +} + +// GetCacheIOReadBytesPersec gets the value of CacheIOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheIOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheRead sets the value of CacheRead for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheRead(value uint64) (err error) { + return instance.SetProperty("CacheRead", (value)) +} + +// GetCacheRead gets the value of CacheRead for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheRead() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheReadPerSec sets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheReadPerSec(value uint64) (err error) { + return instance.SetProperty("CacheReadPerSec", (value)) +} + +// GetCacheReadPerSec gets the value of CacheReadPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheReadPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheReadPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeConfigured sets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheSizeConfigured(value uint64) (err error) { + return instance.SetProperty("CacheSizeConfigured", (value)) +} + +// GetCacheSizeConfigured gets the value of CacheSizeConfigured for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheSizeConfigured() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheSizeCurrent sets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("CacheSizeCurrent", (value)) +} + +// GetCacheSizeCurrent gets the value of CacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheState sets the value of CacheState for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyCacheState(value uint64) (err error) { + return instance.SetProperty("CacheState", (value)) +} + +// GetCacheState gets the value of CacheState for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyCacheState() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytes sets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReadBytes(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytes", (value)) +} + +// GetDiskIOReadBytes gets the value of DiskIOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadBytesPerSec sets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadBytesPerSec", (value)) +} + +// GetDiskIOReadBytesPerSec gets the value of DiskIOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReads sets the value of DiskIOReads for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReads(value uint64) (err error) { + return instance.SetProperty("DiskIOReads", (value)) +} + +// GetDiskIOReads gets the value of DiskIOReads for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskIOReadsPerSec sets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyDiskIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("DiskIOReadsPerSec", (value)) +} + +// GetDiskIOReadsPerSec gets the value of DiskIOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyDiskIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskIOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPerSec sets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReadBytesPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPerSec", (value)) +} + +// GetIOReadBytesPerSec gets the value of IOReadBytesPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReadBytesPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPerSec sets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyIOReadsPerSec(value uint64) (err error) { + return instance.SetProperty("IOReadsPerSec", (value)) +} + +// GetIOReadsPerSec gets the value of IOReadsPerSec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyIOReadsPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeCurrent sets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyLRUCacheSizeCurrent(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeCurrent", (value)) +} + +// GetLRUCacheSizeCurrent gets the value of LRUCacheSizeCurrent for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyLRUCacheSizeCurrent() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLRUCacheSizeTarget sets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyLRUCacheSizeTarget(value uint64) (err error) { + return instance.SetProperty("LRUCacheSizeTarget", (value)) +} + +// GetLRUCacheSizeTarget gets the value of LRUCacheSizeTarget for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyLRUCacheSizeTarget() (value uint64, err error) { + retValue, err := instance.GetProperty("LRUCacheSizeTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialRead sets the value of PartialRead for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPartialRead(value uint64) (err error) { + return instance.SetProperty("PartialRead", (value)) +} + +// GetPartialRead gets the value of PartialRead for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPartialRead() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartialReadPersec sets the value of PartialReadPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPartialReadPersec(value uint64) (err error) { + return instance.SetProperty("PartialReadPersec", (value)) +} + +// GetPartialReadPersec gets the value of PartialReadPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPartialReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PartialReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentCacheValid sets the value of PercentCacheValid for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPercentCacheValid(value uint64) (err error) { + return instance.SetProperty("PercentCacheValid", (value)) +} + +// GetPercentCacheValid gets the value of PercentCacheValid for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPercentCacheValid() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentCacheValid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentCacheValid_Base sets the value of PercentCacheValid_Base for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyPercentCacheValid_Base(value uint64) (err error) { + return instance.SetProperty("PercentCacheValid_Base", (value)) +} + +// GetPercentCacheValid_Base gets the value of PercentCacheValid_Base for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyPercentCacheValid_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentCacheValid_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValidCacheSize sets the value of ValidCacheSize for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) SetPropertyValidCacheSize(value uint64) (err error) { + return instance.SetProperty("ValidCacheSize", (value)) +} + +// GetValidCacheSize gets the value of ValidCacheSize for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeCache) GetPropertyValidCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ValidCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go new file mode 100644 index 00000000..3e2209bb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager struct +type Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager struct { + *Win32_PerfRawData + + // + DirectIOFailureRedirection uint64 + + // + DirectIOFailureRedirectionPersec uint64 + + // + IOReadBytes uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadBytesPersecRedirected uint64 + + // + IOReadBytesRedirected uint64 + + // + IOReadPersecRedirected uint64 + + // + IOReads uint64 + + // + IOReadsPersec uint64 + + // + IOReadsRedirected uint64 + + // + IOWriteBytes uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteBytesPersecRedirected uint64 + + // + IOWriteBytesRedirected uint64 + + // + IOWrites uint64 + + // + IOWritesPersec uint64 + + // + IOWritesPersecRedirected uint64 + + // + IOWritesRedirected uint64 +} + +func NewWin32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDirectIOFailureRedirection sets the value of DirectIOFailureRedirection for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyDirectIOFailureRedirection(value uint64) (err error) { + return instance.SetProperty("DirectIOFailureRedirection", (value)) +} + +// GetDirectIOFailureRedirection gets the value of DirectIOFailureRedirection for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyDirectIOFailureRedirection() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectIOFailureRedirection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectIOFailureRedirectionPersec sets the value of DirectIOFailureRedirectionPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyDirectIOFailureRedirectionPersec(value uint64) (err error) { + return instance.SetProperty("DirectIOFailureRedirectionPersec", (value)) +} + +// GetDirectIOFailureRedirectionPersec gets the value of DirectIOFailureRedirectionPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyDirectIOFailureRedirectionPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectIOFailureRedirectionPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytes sets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytes(value uint64) (err error) { + return instance.SetProperty("IOReadBytes", (value)) +} + +// GetIOReadBytes gets the value of IOReadBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersecRedirected sets the value of IOReadBytesPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytesPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersecRedirected", (value)) +} + +// GetIOReadBytesPersecRedirected gets the value of IOReadBytesPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytesPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesRedirected sets the value of IOReadBytesRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadBytesRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadBytesRedirected", (value)) +} + +// GetIOReadBytesRedirected gets the value of IOReadBytesRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadBytesRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadPersecRedirected sets the value of IOReadPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadPersecRedirected", (value)) +} + +// GetIOReadPersecRedirected gets the value of IOReadPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReads sets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReads(value uint64) (err error) { + return instance.SetProperty("IOReads", (value)) +} + +// GetIOReads gets the value of IOReads for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReads() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsPersec sets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadsPersec", (value)) +} + +// GetIOReadsPersec gets the value of IOReadsPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadsRedirected sets the value of IOReadsRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOReadsRedirected(value uint64) (err error) { + return instance.SetProperty("IOReadsRedirected", (value)) +} + +// GetIOReadsRedirected gets the value of IOReadsRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOReadsRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadsRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytes sets the value of IOWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytes(value uint64) (err error) { + return instance.SetProperty("IOWriteBytes", (value)) +} + +// GetIOWriteBytes gets the value of IOWriteBytes for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersecRedirected sets the value of IOWriteBytesPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytesPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersecRedirected", (value)) +} + +// GetIOWriteBytesPersecRedirected gets the value of IOWriteBytesPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytesPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesRedirected sets the value of IOWriteBytesRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWriteBytesRedirected(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesRedirected", (value)) +} + +// GetIOWriteBytesRedirected gets the value of IOWriteBytesRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWriteBytesRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWrites sets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWrites(value uint64) (err error) { + return instance.SetProperty("IOWrites", (value)) +} + +// GetIOWrites gets the value of IOWrites for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWrites() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWrites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersec sets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWritesPersec(value uint64) (err error) { + return instance.SetProperty("IOWritesPersec", (value)) +} + +// GetIOWritesPersec gets the value of IOWritesPersec for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWritesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesPersecRedirected sets the value of IOWritesPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWritesPersecRedirected(value uint64) (err error) { + return instance.SetProperty("IOWritesPersecRedirected", (value)) +} + +// GetIOWritesPersecRedirected gets the value of IOWritesPersecRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWritesPersecRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesPersecRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWritesRedirected sets the value of IOWritesRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) SetPropertyIOWritesRedirected(value uint64) (err error) { + return instance.SetProperty("IOWritesRedirected", (value)) +} + +// GetIOWritesRedirected gets the value of IOWritesRedirected for the instance +func (instance *Win32_PerfRawData_CsvVolumePerfProvider_ClusterCSVVolumeManager) GetPropertyIOWritesRedirected() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWritesRedirected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_DdmCounterProvider_RAS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_DdmCounterProvider_RAS.go new file mode 100644 index 00000000..5d9493ba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_DdmCounterProvider_RAS.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_DdmCounterProvider_RAS struct +type Win32_PerfRawData_DdmCounterProvider_RAS struct { + *Win32_PerfRawData + + // + BytesReceivedByDisconnectedClients uint64 + + // + BytesTransmittedByDisconnectedClients uint64 + + // + FailedAuthentications uint32 + + // + MaxClients uint32 + + // + TotalClients uint32 +} + +func NewWin32_PerfRawData_DdmCounterProvider_RASEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_DdmCounterProvider_RAS, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_DdmCounterProvider_RAS{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_DdmCounterProvider_RASEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_DdmCounterProvider_RAS, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_DdmCounterProvider_RAS{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceivedByDisconnectedClients sets the value of BytesReceivedByDisconnectedClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) SetPropertyBytesReceivedByDisconnectedClients(value uint64) (err error) { + return instance.SetProperty("BytesReceivedByDisconnectedClients", (value)) +} + +// GetBytesReceivedByDisconnectedClients gets the value of BytesReceivedByDisconnectedClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) GetPropertyBytesReceivedByDisconnectedClients() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedByDisconnectedClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedByDisconnectedClients sets the value of BytesTransmittedByDisconnectedClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) SetPropertyBytesTransmittedByDisconnectedClients(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedByDisconnectedClients", (value)) +} + +// GetBytesTransmittedByDisconnectedClients gets the value of BytesTransmittedByDisconnectedClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) GetPropertyBytesTransmittedByDisconnectedClients() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedByDisconnectedClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFailedAuthentications sets the value of FailedAuthentications for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) SetPropertyFailedAuthentications(value uint32) (err error) { + return instance.SetProperty("FailedAuthentications", (value)) +} + +// GetFailedAuthentications gets the value of FailedAuthentications for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) GetPropertyFailedAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("FailedAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxClients sets the value of MaxClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) SetPropertyMaxClients(value uint32) (err error) { + return instance.SetProperty("MaxClients", (value)) +} + +// GetMaxClients gets the value of MaxClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) GetPropertyMaxClients() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalClients sets the value of TotalClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) SetPropertyTotalClients(value uint32) (err error) { + return instance.SetProperty("TotalClients", (value)) +} + +// GetTotalClients gets the value of TotalClients for the instance +func (instance *Win32_PerfRawData_DdmCounterProvider_RAS) GetPropertyTotalClients() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_Database.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_Database.go new file mode 100644 index 00000000..5ebef923 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_Database.go @@ -0,0 +1,2150 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ESENT_Database struct +type Win32_PerfRawData_ESENT_Database struct { + *Win32_PerfRawData + + // + DatabaseCacheMemoryCommitted uint64 + + // + DatabaseCacheMemoryCommittedMB uint64 + + // + DatabaseCacheMemoryReserved uint64 + + // + DatabaseCacheMemoryReservedMB uint64 + + // + DatabaseCacheMissAttachedAverageLatency uint64 + + // + DatabaseCacheMissAttachedAverageLatency_Base uint32 + + // + DatabaseCacheMissesPersec uint32 + + // + DatabaseCachePercentDehydrated uint32 + + // + DatabaseCachePercentDehydrated_Base uint32 + + // + DatabaseCachePercentHit uint32 + + // + DatabaseCachePercentHit_Base uint32 + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCachePercentHitUnique_Base uint32 + + // + DatabaseCacheRequestsPersec uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSize uint64 + + // + DatabaseCacheSizeEffective uint64 + + // + DatabaseCacheSizeEffectiveMB uint64 + + // + DatabaseCacheSizeMB uint64 + + // + DatabaseCacheSizeResident uint64 + + // + DatabaseCacheSizeResidentMB uint64 + + // + DatabaseMaintenanceDuration uint32 + + // + DatabasePageEvictionsPersec uint32 + + // + DatabasePageFaultsPersec uint32 + + // + DatabasePageFaultStallsPersec uint32 + + // + DefragmentationTasks uint32 + + // + DefragmentationTasksPending uint32 + + // + IODatabaseReadsAttachedAverageLatency uint64 + + // + IODatabaseReadsAttachedAverageLatency_Base uint32 + + // + IODatabaseReadsAttachedPersec uint32 + + // + IODatabaseReadsAverageLatency uint64 + + // + IODatabaseReadsAverageLatency_Base uint32 + + // + IODatabaseReadsPersec uint32 + + // + IODatabaseReadsRecoveryAverageLatency uint64 + + // + IODatabaseReadsRecoveryAverageLatency_Base uint32 + + // + IODatabaseReadsRecoveryPersec uint32 + + // + IODatabaseWritesAttachedAverageLatency uint64 + + // + IODatabaseWritesAttachedAverageLatency_Base uint32 + + // + IODatabaseWritesAttachedPersec uint32 + + // + IODatabaseWritesAverageLatency uint64 + + // + IODatabaseWritesAverageLatency_Base uint32 + + // + IODatabaseWritesPersec uint32 + + // + IODatabaseWritesRecoveryAverageLatency uint64 + + // + IODatabaseWritesRecoveryAverageLatency_Base uint32 + + // + IODatabaseWritesRecoveryPersec uint32 + + // + IOFlushMapWritesAverageLatency uint64 + + // + IOFlushMapWritesAverageLatency_Base uint32 + + // + IOFlushMapWritesPersec uint32 + + // + IOLogReadsAverageLatency uint64 + + // + IOLogReadsAverageLatency_Base uint32 + + // + IOLogReadsPersec uint32 + + // + IOLogWritesAverageLatency uint64 + + // + IOLogWritesAverageLatency_Base uint32 + + // + IOLogWritesPersec uint32 + + // + LogBytesGeneratedPersec uint32 + + // + LogBytesWritePersec uint32 + + // + LogRecordStallsPersec uint32 + + // + LogThreadsWaiting uint32 + + // + LogWritesPersec uint32 + + // + SessionsInUse uint32 + + // + SessionsPercentUsed uint32 + + // + SessionsPercentUsed_Base uint32 + + // + TableClosesPersec uint32 + + // + TableOpenCacheHitsPersec uint32 + + // + TableOpenCacheMissesPersec uint32 + + // + TableOpenCachePercentHit uint32 + + // + TableOpenCachePercentHit_Base uint32 + + // + TableOpensPersec uint32 + + // + TablesOpen uint32 + + // + VersionBucketsAllocated uint32 +} + +func NewWin32_PerfRawData_ESENT_DatabaseEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ESENT_Database, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_Database{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ESENT_DatabaseEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ESENT_Database, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_Database{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatabaseCacheMemoryCommitted sets the value of DatabaseCacheMemoryCommitted for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMemoryCommitted(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryCommitted", (value)) +} + +// GetDatabaseCacheMemoryCommitted gets the value of DatabaseCacheMemoryCommitted for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMemoryCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMemoryCommittedMB sets the value of DatabaseCacheMemoryCommittedMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMemoryCommittedMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryCommittedMB", (value)) +} + +// GetDatabaseCacheMemoryCommittedMB gets the value of DatabaseCacheMemoryCommittedMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMemoryCommittedMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryCommittedMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMemoryReserved sets the value of DatabaseCacheMemoryReserved for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMemoryReserved(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryReserved", (value)) +} + +// GetDatabaseCacheMemoryReserved gets the value of DatabaseCacheMemoryReserved for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMemoryReserved() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryReserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMemoryReservedMB sets the value of DatabaseCacheMemoryReservedMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMemoryReservedMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMemoryReservedMB", (value)) +} + +// GetDatabaseCacheMemoryReservedMB gets the value of DatabaseCacheMemoryReservedMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMemoryReservedMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMemoryReservedMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissAttachedAverageLatency sets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMissAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency gets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMissAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissAttachedAverageLatency_Base sets the value of DatabaseCacheMissAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMissAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency_Base", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency_Base gets the value of DatabaseCacheMissAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMissAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheMissesPersec sets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissesPersec", (value)) +} + +// GetDatabaseCacheMissesPersec gets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentDehydrated sets the value of DatabaseCachePercentDehydrated for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCachePercentDehydrated(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentDehydrated", (value)) +} + +// GetDatabaseCachePercentDehydrated gets the value of DatabaseCachePercentDehydrated for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCachePercentDehydrated() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentDehydrated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentDehydrated_Base sets the value of DatabaseCachePercentDehydrated_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCachePercentDehydrated_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentDehydrated_Base", (value)) +} + +// GetDatabaseCachePercentDehydrated_Base gets the value of DatabaseCachePercentDehydrated_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCachePercentDehydrated_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentDehydrated_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit sets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCachePercentHit(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit", (value)) +} + +// GetDatabaseCachePercentHit gets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit_Base sets the value of DatabaseCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCachePercentHit_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit_Base", (value)) +} + +// GetDatabaseCachePercentHit_Base gets the value of DatabaseCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCachePercentHit_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique_Base sets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCachePercentHitUnique_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique_Base", (value)) +} + +// GetDatabaseCachePercentHitUnique_Base gets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCachePercentHitUnique_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersec sets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersec", (value)) +} + +// GetDatabaseCacheRequestsPersec gets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSize sets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheSize(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSize", (value)) +} + +// GetDatabaseCacheSize gets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeEffective sets the value of DatabaseCacheSizeEffective for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheSizeEffective(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeEffective", (value)) +} + +// GetDatabaseCacheSizeEffective gets the value of DatabaseCacheSizeEffective for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheSizeEffective() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeEffective") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeEffectiveMB sets the value of DatabaseCacheSizeEffectiveMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheSizeEffectiveMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeEffectiveMB", (value)) +} + +// GetDatabaseCacheSizeEffectiveMB gets the value of DatabaseCacheSizeEffectiveMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheSizeEffectiveMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeEffectiveMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeResident sets the value of DatabaseCacheSizeResident for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheSizeResident(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeResident", (value)) +} + +// GetDatabaseCacheSizeResident gets the value of DatabaseCacheSizeResident for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheSizeResident() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeResident") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeResidentMB sets the value of DatabaseCacheSizeResidentMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseCacheSizeResidentMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeResidentMB", (value)) +} + +// GetDatabaseCacheSizeResidentMB gets the value of DatabaseCacheSizeResidentMB for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseCacheSizeResidentMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeResidentMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseMaintenanceDuration sets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabaseMaintenanceDuration(value uint32) (err error) { + return instance.SetProperty("DatabaseMaintenanceDuration", (value)) +} + +// GetDatabaseMaintenanceDuration gets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabaseMaintenanceDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseMaintenanceDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabasePageEvictionsPersec sets the value of DatabasePageEvictionsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabasePageEvictionsPersec(value uint32) (err error) { + return instance.SetProperty("DatabasePageEvictionsPersec", (value)) +} + +// GetDatabasePageEvictionsPersec gets the value of DatabasePageEvictionsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabasePageEvictionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabasePageEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabasePageFaultsPersec sets the value of DatabasePageFaultsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabasePageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("DatabasePageFaultsPersec", (value)) +} + +// GetDatabasePageFaultsPersec gets the value of DatabasePageFaultsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabasePageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabasePageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabasePageFaultStallsPersec sets the value of DatabasePageFaultStallsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDatabasePageFaultStallsPersec(value uint32) (err error) { + return instance.SetProperty("DatabasePageFaultStallsPersec", (value)) +} + +// GetDatabasePageFaultStallsPersec gets the value of DatabasePageFaultStallsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDatabasePageFaultStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabasePageFaultStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefragmentationTasks sets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDefragmentationTasks(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasks", (value)) +} + +// GetDefragmentationTasks gets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDefragmentationTasks() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefragmentationTasksPending sets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyDefragmentationTasksPending(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasksPending", (value)) +} + +// GetDefragmentationTasksPending gets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyDefragmentationTasksPending() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasksPending") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedAverageLatency sets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedAverageLatency", (value)) +} + +// GetIODatabaseReadsAttachedAverageLatency gets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedAverageLatency_Base sets the value of IODatabaseReadsAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsAttachedAverageLatency_Base gets the value of IODatabaseReadsAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedPersec sets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedPersec", (value)) +} + +// GetIODatabaseReadsAttachedPersec gets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency sets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency", (value)) +} + +// GetIODatabaseReadsAverageLatency gets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency_Base sets the value of IODatabaseReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsAverageLatency_Base gets the value of IODatabaseReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsPersec sets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsPersec", (value)) +} + +// GetIODatabaseReadsPersec gets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryAverageLatency sets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryAverageLatency", (value)) +} + +// GetIODatabaseReadsRecoveryAverageLatency gets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryAverageLatency_Base sets the value of IODatabaseReadsRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsRecoveryAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsRecoveryAverageLatency_Base gets the value of IODatabaseReadsRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsRecoveryAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryPersec sets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseReadsRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryPersec", (value)) +} + +// GetIODatabaseReadsRecoveryPersec gets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseReadsRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedAverageLatency sets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedAverageLatency", (value)) +} + +// GetIODatabaseWritesAttachedAverageLatency gets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedAverageLatency_Base sets the value of IODatabaseWritesAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesAttachedAverageLatency_Base gets the value of IODatabaseWritesAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedPersec sets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedPersec", (value)) +} + +// GetIODatabaseWritesAttachedPersec gets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency sets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency", (value)) +} + +// GetIODatabaseWritesAverageLatency gets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency_Base sets the value of IODatabaseWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesAverageLatency_Base gets the value of IODatabaseWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesPersec sets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesPersec", (value)) +} + +// GetIODatabaseWritesPersec gets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryAverageLatency sets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryAverageLatency", (value)) +} + +// GetIODatabaseWritesRecoveryAverageLatency gets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryAverageLatency_Base sets the value of IODatabaseWritesRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesRecoveryAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesRecoveryAverageLatency_Base gets the value of IODatabaseWritesRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesRecoveryAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryPersec sets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIODatabaseWritesRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryPersec", (value)) +} + +// GetIODatabaseWritesRecoveryPersec gets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIODatabaseWritesRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOFlushMapWritesAverageLatency sets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOFlushMapWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOFlushMapWritesAverageLatency", (value)) +} + +// GetIOFlushMapWritesAverageLatency gets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOFlushMapWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOFlushMapWritesAverageLatency_Base sets the value of IOFlushMapWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOFlushMapWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOFlushMapWritesAverageLatency_Base", (value)) +} + +// GetIOFlushMapWritesAverageLatency_Base gets the value of IOFlushMapWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOFlushMapWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOFlushMapWritesPersec sets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOFlushMapWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOFlushMapWritesPersec", (value)) +} + +// GetIOFlushMapWritesPersec gets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOFlushMapWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogReadsAverageLatency sets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOLogReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogReadsAverageLatency", (value)) +} + +// GetIOLogReadsAverageLatency gets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOLogReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogReadsAverageLatency_Base sets the value of IOLogReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOLogReadsAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOLogReadsAverageLatency_Base", (value)) +} + +// GetIOLogReadsAverageLatency_Base gets the value of IOLogReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOLogReadsAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogReadsAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogReadsPersec sets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOLogReadsPersec(value uint32) (err error) { + return instance.SetProperty("IOLogReadsPersec", (value)) +} + +// GetIOLogReadsPersec gets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOLogReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogWritesAverageLatency sets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOLogWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogWritesAverageLatency", (value)) +} + +// GetIOLogWritesAverageLatency gets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOLogWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogWritesAverageLatency_Base sets the value of IOLogWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOLogWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOLogWritesAverageLatency_Base", (value)) +} + +// GetIOLogWritesAverageLatency_Base gets the value of IOLogWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOLogWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogWritesPersec sets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyIOLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOLogWritesPersec", (value)) +} + +// GetIOLogWritesPersec gets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyIOLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesGeneratedPersec sets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyLogBytesGeneratedPersec(value uint32) (err error) { + return instance.SetProperty("LogBytesGeneratedPersec", (value)) +} + +// GetLogBytesGeneratedPersec gets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyLogBytesGeneratedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesGeneratedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesWritePersec sets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyLogBytesWritePersec(value uint32) (err error) { + return instance.SetProperty("LogBytesWritePersec", (value)) +} + +// GetLogBytesWritePersec gets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyLogBytesWritePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesWritePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogRecordStallsPersec sets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyLogRecordStallsPersec(value uint32) (err error) { + return instance.SetProperty("LogRecordStallsPersec", (value)) +} + +// GetLogRecordStallsPersec gets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyLogRecordStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogRecordStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogThreadsWaiting sets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyLogThreadsWaiting(value uint32) (err error) { + return instance.SetProperty("LogThreadsWaiting", (value)) +} + +// GetLogThreadsWaiting gets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyLogThreadsWaiting() (value uint32, err error) { + retValue, err := instance.GetProperty("LogThreadsWaiting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogWritesPersec sets the value of LogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("LogWritesPersec", (value)) +} + +// GetLogWritesPersec gets the value of LogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsInUse sets the value of SessionsInUse for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertySessionsInUse(value uint32) (err error) { + return instance.SetProperty("SessionsInUse", (value)) +} + +// GetSessionsInUse gets the value of SessionsInUse for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertySessionsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPercentUsed sets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertySessionsPercentUsed(value uint32) (err error) { + return instance.SetProperty("SessionsPercentUsed", (value)) +} + +// GetSessionsPercentUsed gets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertySessionsPercentUsed() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPercentUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPercentUsed_Base sets the value of SessionsPercentUsed_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertySessionsPercentUsed_Base(value uint32) (err error) { + return instance.SetProperty("SessionsPercentUsed_Base", (value)) +} + +// GetSessionsPercentUsed_Base gets the value of SessionsPercentUsed_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertySessionsPercentUsed_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPercentUsed_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableClosesPersec sets the value of TableClosesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTableClosesPersec(value uint32) (err error) { + return instance.SetProperty("TableClosesPersec", (value)) +} + +// GetTableClosesPersec gets the value of TableClosesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTableClosesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableClosesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheHitsPersec sets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTableOpenCacheHitsPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheHitsPersec", (value)) +} + +// GetTableOpenCacheHitsPersec gets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTableOpenCacheHitsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheHitsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheMissesPersec sets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTableOpenCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheMissesPersec", (value)) +} + +// GetTableOpenCacheMissesPersec gets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTableOpenCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCachePercentHit sets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTableOpenCachePercentHit(value uint32) (err error) { + return instance.SetProperty("TableOpenCachePercentHit", (value)) +} + +// GetTableOpenCachePercentHit gets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTableOpenCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCachePercentHit_Base sets the value of TableOpenCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTableOpenCachePercentHit_Base(value uint32) (err error) { + return instance.SetProperty("TableOpenCachePercentHit_Base", (value)) +} + +// GetTableOpenCachePercentHit_Base gets the value of TableOpenCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTableOpenCachePercentHit_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCachePercentHit_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpensPersec sets the value of TableOpensPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTableOpensPersec(value uint32) (err error) { + return instance.SetProperty("TableOpensPersec", (value)) +} + +// GetTableOpensPersec gets the value of TableOpensPersec for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTableOpensPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpensPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTablesOpen sets the value of TablesOpen for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyTablesOpen(value uint32) (err error) { + return instance.SetProperty("TablesOpen", (value)) +} + +// GetTablesOpen gets the value of TablesOpen for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyTablesOpen() (value uint32, err error) { + retValue, err := instance.GetProperty("TablesOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersionBucketsAllocated sets the value of VersionBucketsAllocated for the instance +func (instance *Win32_PerfRawData_ESENT_Database) SetPropertyVersionBucketsAllocated(value uint32) (err error) { + return instance.SetProperty("VersionBucketsAllocated", (value)) +} + +// GetVersionBucketsAllocated gets the value of VersionBucketsAllocated for the instance +func (instance *Win32_PerfRawData_ESENT_Database) GetPropertyVersionBucketsAllocated() (value uint32, err error) { + retValue, err := instance.GetProperty("VersionBucketsAllocated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseDatabases.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseDatabases.go new file mode 100644 index 00000000..00ef7e4c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseDatabases.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ESENT_DatabaseDatabases struct +type Win32_PerfRawData_ESENT_DatabaseDatabases struct { + *Win32_PerfRawData + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCachePercentHitUnique_Base uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSizeMB uint64 + + // + IODatabaseReadsAverageLatency uint64 + + // + IODatabaseReadsAverageLatency_Base uint32 + + // + IODatabaseReadsPersec uint32 + + // + IODatabaseWritesAverageLatency uint64 + + // + IODatabaseWritesAverageLatency_Base uint32 + + // + IODatabaseWritesPersec uint32 +} + +func NewWin32_PerfRawData_ESENT_DatabaseDatabasesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ESENT_DatabaseDatabases, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_DatabaseDatabases{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ESENT_DatabaseDatabasesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ESENT_DatabaseDatabases, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_DatabaseDatabases{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique_Base sets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyDatabaseCachePercentHitUnique_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique_Base", (value)) +} + +// GetDatabaseCachePercentHitUnique_Base gets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyDatabaseCachePercentHitUnique_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency sets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyIODatabaseReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency", (value)) +} + +// GetIODatabaseReadsAverageLatency gets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyIODatabaseReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency_Base sets the value of IODatabaseReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyIODatabaseReadsAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsAverageLatency_Base gets the value of IODatabaseReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyIODatabaseReadsAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsPersec sets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyIODatabaseReadsPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsPersec", (value)) +} + +// GetIODatabaseReadsPersec gets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyIODatabaseReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency sets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyIODatabaseWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency", (value)) +} + +// GetIODatabaseWritesAverageLatency gets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyIODatabaseWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency_Base sets the value of IODatabaseWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyIODatabaseWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesAverageLatency_Base gets the value of IODatabaseWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyIODatabaseWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesPersec sets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) SetPropertyIODatabaseWritesPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesPersec", (value)) +} + +// GetIODatabaseWritesPersec gets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseDatabases) GetPropertyIODatabaseWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseInstances.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseInstances.go new file mode 100644 index 00000000..d1f16090 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseInstances.go @@ -0,0 +1,2060 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ESENT_DatabaseInstances struct +type Win32_PerfRawData_ESENT_DatabaseInstances struct { + *Win32_PerfRawData + + // + DatabaseCacheMissAttachedAverageLatency uint64 + + // + DatabaseCacheMissAttachedAverageLatency_Base uint32 + + // + DatabaseCacheMissesPersec uint32 + + // + DatabaseCachePercentHit uint32 + + // + DatabaseCachePercentHit_Base uint32 + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCachePercentHitUnique_Base uint32 + + // + DatabaseCacheRequestsPersec uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSizeMB uint64 + + // + DatabaseMaintenanceDuration uint32 + + // + DatabaseOldestTransaction uint64 + + // + DefragmentationTasks uint32 + + // + DefragmentationTasksPending uint32 + + // + IODatabaseReadsAttachedAverageLatency uint64 + + // + IODatabaseReadsAttachedAverageLatency_Base uint32 + + // + IODatabaseReadsAttachedPersec uint32 + + // + IODatabaseReadsAverageLatency uint64 + + // + IODatabaseReadsAverageLatency_Base uint32 + + // + IODatabaseReadsPersec uint32 + + // + IODatabaseReadsRecoveryAverageLatency uint64 + + // + IODatabaseReadsRecoveryAverageLatency_Base uint32 + + // + IODatabaseReadsRecoveryPersec uint32 + + // + IODatabaseWritesAttachedAverageLatency uint64 + + // + IODatabaseWritesAttachedAverageLatency_Base uint32 + + // + IODatabaseWritesAttachedPersec uint32 + + // + IODatabaseWritesAverageLatency uint64 + + // + IODatabaseWritesAverageLatency_Base uint32 + + // + IODatabaseWritesPersec uint32 + + // + IODatabaseWritesRecoveryAverageLatency uint64 + + // + IODatabaseWritesRecoveryAverageLatency_Base uint32 + + // + IODatabaseWritesRecoveryPersec uint32 + + // + IOFlushMapWritesAverageLatency uint64 + + // + IOFlushMapWritesAverageLatency_Base uint32 + + // + IOFlushMapWritesPersec uint32 + + // + IOLogReadsAverageLatency uint64 + + // + IOLogReadsAverageLatency_Base uint32 + + // + IOLogReadsPersec uint32 + + // + IOLogWritesAverageLatency uint64 + + // + IOLogWritesAverageLatency_Base uint32 + + // + IOLogWritesPersec uint32 + + // + LogBytesGeneratedPersec uint32 + + // + LogBytesWritePersec uint32 + + // + LogCheckpointDepthasaPercentofTarget uint32 + + // + LogCheckpointDepthasaPercentofTarget_Base uint32 + + // + LogFileCurrentGeneration uint32 + + // + LogFilesGenerated uint32 + + // + LogFilesGeneratedPrematurely uint32 + + // + LogGenerationCheckpointDepth uint32 + + // + LogGenerationCheckpointDepthMax uint32 + + // + LogGenerationCheckpointDepthTarget uint32 + + // + LogGenerationLossResiliencyDepth uint32 + + // + LogRecordStallsPersec uint32 + + // + LogThreadsWaiting uint32 + + // + LogWritesPersec uint32 + + // + SessionsInUse uint32 + + // + SessionsPercentUsed uint32 + + // + SessionsPercentUsed_Base uint32 + + // + StreamingBackupPagesReadPersec uint32 + + // + TableClosesPersec uint32 + + // + TableOpenCacheHitsPersec uint32 + + // + TableOpenCacheMissesPersec uint32 + + // + TableOpenCachePercentHit uint32 + + // + TableOpenCachePercentHit_Base uint32 + + // + TableOpensPersec uint32 + + // + TablesOpen uint32 + + // + Versionbucketsallocated uint32 +} + +func NewWin32_PerfRawData_ESENT_DatabaseInstancesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ESENT_DatabaseInstances, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_DatabaseInstances{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ESENT_DatabaseInstancesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ESENT_DatabaseInstances, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_DatabaseInstances{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatabaseCacheMissAttachedAverageLatency sets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheMissAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency gets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheMissAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissAttachedAverageLatency_Base sets the value of DatabaseCacheMissAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheMissAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency_Base", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency_Base gets the value of DatabaseCacheMissAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheMissAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheMissesPersec sets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissesPersec", (value)) +} + +// GetDatabaseCacheMissesPersec gets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit sets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCachePercentHit(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit", (value)) +} + +// GetDatabaseCachePercentHit gets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit_Base sets the value of DatabaseCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCachePercentHit_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit_Base", (value)) +} + +// GetDatabaseCachePercentHit_Base gets the value of DatabaseCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCachePercentHit_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique_Base sets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCachePercentHitUnique_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique_Base", (value)) +} + +// GetDatabaseCachePercentHitUnique_Base gets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCachePercentHitUnique_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersec sets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersec", (value)) +} + +// GetDatabaseCacheRequestsPersec gets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseMaintenanceDuration sets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseMaintenanceDuration(value uint32) (err error) { + return instance.SetProperty("DatabaseMaintenanceDuration", (value)) +} + +// GetDatabaseMaintenanceDuration gets the value of DatabaseMaintenanceDuration for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseMaintenanceDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseMaintenanceDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseOldestTransaction sets the value of DatabaseOldestTransaction for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDatabaseOldestTransaction(value uint64) (err error) { + return instance.SetProperty("DatabaseOldestTransaction", (value)) +} + +// GetDatabaseOldestTransaction gets the value of DatabaseOldestTransaction for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDatabaseOldestTransaction() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseOldestTransaction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDefragmentationTasks sets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDefragmentationTasks(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasks", (value)) +} + +// GetDefragmentationTasks gets the value of DefragmentationTasks for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDefragmentationTasks() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDefragmentationTasksPending sets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyDefragmentationTasksPending(value uint32) (err error) { + return instance.SetProperty("DefragmentationTasksPending", (value)) +} + +// GetDefragmentationTasksPending gets the value of DefragmentationTasksPending for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyDefragmentationTasksPending() (value uint32, err error) { + retValue, err := instance.GetProperty("DefragmentationTasksPending") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedAverageLatency sets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedAverageLatency", (value)) +} + +// GetIODatabaseReadsAttachedAverageLatency gets the value of IODatabaseReadsAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedAverageLatency_Base sets the value of IODatabaseReadsAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsAttachedAverageLatency_Base gets the value of IODatabaseReadsAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAttachedPersec sets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAttachedPersec", (value)) +} + +// GetIODatabaseReadsAttachedPersec gets the value of IODatabaseReadsAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency sets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency", (value)) +} + +// GetIODatabaseReadsAverageLatency gets the value of IODatabaseReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsAverageLatency_Base sets the value of IODatabaseReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsAverageLatency_Base gets the value of IODatabaseReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsPersec sets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsPersec", (value)) +} + +// GetIODatabaseReadsPersec gets the value of IODatabaseReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryAverageLatency sets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryAverageLatency", (value)) +} + +// GetIODatabaseReadsRecoveryAverageLatency gets the value of IODatabaseReadsRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryAverageLatency_Base sets the value of IODatabaseReadsRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsRecoveryAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryAverageLatency_Base", (value)) +} + +// GetIODatabaseReadsRecoveryAverageLatency_Base gets the value of IODatabaseReadsRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsRecoveryAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseReadsRecoveryPersec sets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseReadsRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseReadsRecoveryPersec", (value)) +} + +// GetIODatabaseReadsRecoveryPersec gets the value of IODatabaseReadsRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseReadsRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseReadsRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedAverageLatency sets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedAverageLatency", (value)) +} + +// GetIODatabaseWritesAttachedAverageLatency gets the value of IODatabaseWritesAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedAverageLatency_Base sets the value of IODatabaseWritesAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesAttachedAverageLatency_Base gets the value of IODatabaseWritesAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAttachedPersec sets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAttachedPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAttachedPersec", (value)) +} + +// GetIODatabaseWritesAttachedPersec gets the value of IODatabaseWritesAttachedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAttachedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAttachedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency sets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency", (value)) +} + +// GetIODatabaseWritesAverageLatency gets the value of IODatabaseWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesAverageLatency_Base sets the value of IODatabaseWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesAverageLatency_Base gets the value of IODatabaseWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesPersec sets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesPersec", (value)) +} + +// GetIODatabaseWritesPersec gets the value of IODatabaseWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryAverageLatency sets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesRecoveryAverageLatency(value uint64) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryAverageLatency", (value)) +} + +// GetIODatabaseWritesRecoveryAverageLatency gets the value of IODatabaseWritesRecoveryAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesRecoveryAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryAverageLatency_Base sets the value of IODatabaseWritesRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesRecoveryAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryAverageLatency_Base", (value)) +} + +// GetIODatabaseWritesRecoveryAverageLatency_Base gets the value of IODatabaseWritesRecoveryAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesRecoveryAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODatabaseWritesRecoveryPersec sets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIODatabaseWritesRecoveryPersec(value uint32) (err error) { + return instance.SetProperty("IODatabaseWritesRecoveryPersec", (value)) +} + +// GetIODatabaseWritesRecoveryPersec gets the value of IODatabaseWritesRecoveryPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIODatabaseWritesRecoveryPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IODatabaseWritesRecoveryPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOFlushMapWritesAverageLatency sets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOFlushMapWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOFlushMapWritesAverageLatency", (value)) +} + +// GetIOFlushMapWritesAverageLatency gets the value of IOFlushMapWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOFlushMapWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOFlushMapWritesAverageLatency_Base sets the value of IOFlushMapWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOFlushMapWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOFlushMapWritesAverageLatency_Base", (value)) +} + +// GetIOFlushMapWritesAverageLatency_Base gets the value of IOFlushMapWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOFlushMapWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOFlushMapWritesPersec sets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOFlushMapWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOFlushMapWritesPersec", (value)) +} + +// GetIOFlushMapWritesPersec gets the value of IOFlushMapWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOFlushMapWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOFlushMapWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogReadsAverageLatency sets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOLogReadsAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogReadsAverageLatency", (value)) +} + +// GetIOLogReadsAverageLatency gets the value of IOLogReadsAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOLogReadsAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogReadsAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogReadsAverageLatency_Base sets the value of IOLogReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOLogReadsAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOLogReadsAverageLatency_Base", (value)) +} + +// GetIOLogReadsAverageLatency_Base gets the value of IOLogReadsAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOLogReadsAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogReadsAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogReadsPersec sets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOLogReadsPersec(value uint32) (err error) { + return instance.SetProperty("IOLogReadsPersec", (value)) +} + +// GetIOLogReadsPersec gets the value of IOLogReadsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOLogReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogWritesAverageLatency sets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOLogWritesAverageLatency(value uint64) (err error) { + return instance.SetProperty("IOLogWritesAverageLatency", (value)) +} + +// GetIOLogWritesAverageLatency gets the value of IOLogWritesAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOLogWritesAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("IOLogWritesAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOLogWritesAverageLatency_Base sets the value of IOLogWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOLogWritesAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("IOLogWritesAverageLatency_Base", (value)) +} + +// GetIOLogWritesAverageLatency_Base gets the value of IOLogWritesAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOLogWritesAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogWritesAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIOLogWritesPersec sets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyIOLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("IOLogWritesPersec", (value)) +} + +// GetIOLogWritesPersec gets the value of IOLogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyIOLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IOLogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesGeneratedPersec sets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogBytesGeneratedPersec(value uint32) (err error) { + return instance.SetProperty("LogBytesGeneratedPersec", (value)) +} + +// GetLogBytesGeneratedPersec gets the value of LogBytesGeneratedPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogBytesGeneratedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesGeneratedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogBytesWritePersec sets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogBytesWritePersec(value uint32) (err error) { + return instance.SetProperty("LogBytesWritePersec", (value)) +} + +// GetLogBytesWritePersec gets the value of LogBytesWritePersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogBytesWritePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogBytesWritePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogCheckpointDepthasaPercentofTarget sets the value of LogCheckpointDepthasaPercentofTarget for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogCheckpointDepthasaPercentofTarget(value uint32) (err error) { + return instance.SetProperty("LogCheckpointDepthasaPercentofTarget", (value)) +} + +// GetLogCheckpointDepthasaPercentofTarget gets the value of LogCheckpointDepthasaPercentofTarget for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogCheckpointDepthasaPercentofTarget() (value uint32, err error) { + retValue, err := instance.GetProperty("LogCheckpointDepthasaPercentofTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogCheckpointDepthasaPercentofTarget_Base sets the value of LogCheckpointDepthasaPercentofTarget_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogCheckpointDepthasaPercentofTarget_Base(value uint32) (err error) { + return instance.SetProperty("LogCheckpointDepthasaPercentofTarget_Base", (value)) +} + +// GetLogCheckpointDepthasaPercentofTarget_Base gets the value of LogCheckpointDepthasaPercentofTarget_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogCheckpointDepthasaPercentofTarget_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LogCheckpointDepthasaPercentofTarget_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogFileCurrentGeneration sets the value of LogFileCurrentGeneration for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogFileCurrentGeneration(value uint32) (err error) { + return instance.SetProperty("LogFileCurrentGeneration", (value)) +} + +// GetLogFileCurrentGeneration gets the value of LogFileCurrentGeneration for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogFileCurrentGeneration() (value uint32, err error) { + retValue, err := instance.GetProperty("LogFileCurrentGeneration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogFilesGenerated sets the value of LogFilesGenerated for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogFilesGenerated(value uint32) (err error) { + return instance.SetProperty("LogFilesGenerated", (value)) +} + +// GetLogFilesGenerated gets the value of LogFilesGenerated for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogFilesGenerated() (value uint32, err error) { + retValue, err := instance.GetProperty("LogFilesGenerated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogFilesGeneratedPrematurely sets the value of LogFilesGeneratedPrematurely for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogFilesGeneratedPrematurely(value uint32) (err error) { + return instance.SetProperty("LogFilesGeneratedPrematurely", (value)) +} + +// GetLogFilesGeneratedPrematurely gets the value of LogFilesGeneratedPrematurely for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogFilesGeneratedPrematurely() (value uint32, err error) { + retValue, err := instance.GetProperty("LogFilesGeneratedPrematurely") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationCheckpointDepth sets the value of LogGenerationCheckpointDepth for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogGenerationCheckpointDepth(value uint32) (err error) { + return instance.SetProperty("LogGenerationCheckpointDepth", (value)) +} + +// GetLogGenerationCheckpointDepth gets the value of LogGenerationCheckpointDepth for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogGenerationCheckpointDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationCheckpointDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationCheckpointDepthMax sets the value of LogGenerationCheckpointDepthMax for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogGenerationCheckpointDepthMax(value uint32) (err error) { + return instance.SetProperty("LogGenerationCheckpointDepthMax", (value)) +} + +// GetLogGenerationCheckpointDepthMax gets the value of LogGenerationCheckpointDepthMax for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogGenerationCheckpointDepthMax() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationCheckpointDepthMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationCheckpointDepthTarget sets the value of LogGenerationCheckpointDepthTarget for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogGenerationCheckpointDepthTarget(value uint32) (err error) { + return instance.SetProperty("LogGenerationCheckpointDepthTarget", (value)) +} + +// GetLogGenerationCheckpointDepthTarget gets the value of LogGenerationCheckpointDepthTarget for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogGenerationCheckpointDepthTarget() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationCheckpointDepthTarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogGenerationLossResiliencyDepth sets the value of LogGenerationLossResiliencyDepth for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogGenerationLossResiliencyDepth(value uint32) (err error) { + return instance.SetProperty("LogGenerationLossResiliencyDepth", (value)) +} + +// GetLogGenerationLossResiliencyDepth gets the value of LogGenerationLossResiliencyDepth for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogGenerationLossResiliencyDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("LogGenerationLossResiliencyDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogRecordStallsPersec sets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogRecordStallsPersec(value uint32) (err error) { + return instance.SetProperty("LogRecordStallsPersec", (value)) +} + +// GetLogRecordStallsPersec gets the value of LogRecordStallsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogRecordStallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogRecordStallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogThreadsWaiting sets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogThreadsWaiting(value uint32) (err error) { + return instance.SetProperty("LogThreadsWaiting", (value)) +} + +// GetLogThreadsWaiting gets the value of LogThreadsWaiting for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogThreadsWaiting() (value uint32, err error) { + retValue, err := instance.GetProperty("LogThreadsWaiting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogWritesPersec sets the value of LogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyLogWritesPersec(value uint32) (err error) { + return instance.SetProperty("LogWritesPersec", (value)) +} + +// GetLogWritesPersec gets the value of LogWritesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyLogWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsInUse sets the value of SessionsInUse for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertySessionsInUse(value uint32) (err error) { + return instance.SetProperty("SessionsInUse", (value)) +} + +// GetSessionsInUse gets the value of SessionsInUse for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertySessionsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPercentUsed sets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertySessionsPercentUsed(value uint32) (err error) { + return instance.SetProperty("SessionsPercentUsed", (value)) +} + +// GetSessionsPercentUsed gets the value of SessionsPercentUsed for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertySessionsPercentUsed() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPercentUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPercentUsed_Base sets the value of SessionsPercentUsed_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertySessionsPercentUsed_Base(value uint32) (err error) { + return instance.SetProperty("SessionsPercentUsed_Base", (value)) +} + +// GetSessionsPercentUsed_Base gets the value of SessionsPercentUsed_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertySessionsPercentUsed_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPercentUsed_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStreamingBackupPagesReadPersec sets the value of StreamingBackupPagesReadPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyStreamingBackupPagesReadPersec(value uint32) (err error) { + return instance.SetProperty("StreamingBackupPagesReadPersec", (value)) +} + +// GetStreamingBackupPagesReadPersec gets the value of StreamingBackupPagesReadPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyStreamingBackupPagesReadPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("StreamingBackupPagesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableClosesPersec sets the value of TableClosesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTableClosesPersec(value uint32) (err error) { + return instance.SetProperty("TableClosesPersec", (value)) +} + +// GetTableClosesPersec gets the value of TableClosesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTableClosesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableClosesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheHitsPersec sets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTableOpenCacheHitsPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheHitsPersec", (value)) +} + +// GetTableOpenCacheHitsPersec gets the value of TableOpenCacheHitsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTableOpenCacheHitsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheHitsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCacheMissesPersec sets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTableOpenCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("TableOpenCacheMissesPersec", (value)) +} + +// GetTableOpenCacheMissesPersec gets the value of TableOpenCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTableOpenCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCachePercentHit sets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTableOpenCachePercentHit(value uint32) (err error) { + return instance.SetProperty("TableOpenCachePercentHit", (value)) +} + +// GetTableOpenCachePercentHit gets the value of TableOpenCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTableOpenCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpenCachePercentHit_Base sets the value of TableOpenCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTableOpenCachePercentHit_Base(value uint32) (err error) { + return instance.SetProperty("TableOpenCachePercentHit_Base", (value)) +} + +// GetTableOpenCachePercentHit_Base gets the value of TableOpenCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTableOpenCachePercentHit_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpenCachePercentHit_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTableOpensPersec sets the value of TableOpensPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTableOpensPersec(value uint32) (err error) { + return instance.SetProperty("TableOpensPersec", (value)) +} + +// GetTableOpensPersec gets the value of TableOpensPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTableOpensPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TableOpensPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTablesOpen sets the value of TablesOpen for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyTablesOpen(value uint32) (err error) { + return instance.SetProperty("TablesOpen", (value)) +} + +// GetTablesOpen gets the value of TablesOpen for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyTablesOpen() (value uint32, err error) { + retValue, err := instance.GetProperty("TablesOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersionbucketsallocated sets the value of Versionbucketsallocated for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) SetPropertyVersionbucketsallocated(value uint32) (err error) { + return instance.SetProperty("Versionbucketsallocated", (value)) +} + +// GetVersionbucketsallocated gets the value of Versionbucketsallocated for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseInstances) GetPropertyVersionbucketsallocated() (value uint32, err error) { + retValue, err := instance.GetProperty("Versionbucketsallocated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseTableClasses.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseTableClasses.go new file mode 100644 index 00000000..0722684b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ESENT_DatabaseTableClasses.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ESENT_DatabaseTableClasses struct +type Win32_PerfRawData_ESENT_DatabaseTableClasses struct { + *Win32_PerfRawData + + // + DatabaseCacheMissAttachedAverageLatency uint64 + + // + DatabaseCacheMissAttachedAverageLatency_Base uint32 + + // + DatabaseCacheMissesPersec uint32 + + // + DatabaseCachePercentHit uint32 + + // + DatabaseCachePercentHit_Base uint32 + + // + DatabaseCachePercentHitUnique uint32 + + // + DatabaseCachePercentHitUnique_Base uint32 + + // + DatabaseCacheRequestsPersec uint32 + + // + DatabaseCacheRequestsPersecUnique uint32 + + // + DatabaseCacheSize uint64 + + // + DatabaseCacheSizeMB uint64 +} + +func NewWin32_PerfRawData_ESENT_DatabaseTableClassesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ESENT_DatabaseTableClasses, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_DatabaseTableClasses{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ESENT_DatabaseTableClassesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ESENT_DatabaseTableClasses, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ESENT_DatabaseTableClasses{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatabaseCacheMissAttachedAverageLatency sets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheMissAttachedAverageLatency(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency gets the value of DatabaseCacheMissAttachedAverageLatency for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheMissAttachedAverageLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheMissAttachedAverageLatency_Base sets the value of DatabaseCacheMissAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheMissAttachedAverageLatency_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissAttachedAverageLatency_Base", (value)) +} + +// GetDatabaseCacheMissAttachedAverageLatency_Base gets the value of DatabaseCacheMissAttachedAverageLatency_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheMissAttachedAverageLatency_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissAttachedAverageLatency_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheMissesPersec sets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheMissesPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheMissesPersec", (value)) +} + +// GetDatabaseCacheMissesPersec gets the value of DatabaseCacheMissesPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit sets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCachePercentHit(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit", (value)) +} + +// GetDatabaseCachePercentHit gets the value of DatabaseCachePercentHit for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCachePercentHit() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHit_Base sets the value of DatabaseCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCachePercentHit_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHit_Base", (value)) +} + +// GetDatabaseCachePercentHit_Base gets the value of DatabaseCachePercentHit_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCachePercentHit_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHit_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique sets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCachePercentHitUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique", (value)) +} + +// GetDatabaseCachePercentHitUnique gets the value of DatabaseCachePercentHitUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCachePercentHitUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCachePercentHitUnique_Base sets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCachePercentHitUnique_Base(value uint32) (err error) { + return instance.SetProperty("DatabaseCachePercentHitUnique_Base", (value)) +} + +// GetDatabaseCachePercentHitUnique_Base gets the value of DatabaseCachePercentHitUnique_Base for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCachePercentHitUnique_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCachePercentHitUnique_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersec sets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheRequestsPersec(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersec", (value)) +} + +// GetDatabaseCacheRequestsPersec gets the value of DatabaseCacheRequestsPersec for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheRequestsPersecUnique sets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheRequestsPersecUnique(value uint32) (err error) { + return instance.SetProperty("DatabaseCacheRequestsPersecUnique", (value)) +} + +// GetDatabaseCacheRequestsPersecUnique gets the value of DatabaseCacheRequestsPersecUnique for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheRequestsPersecUnique() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseCacheRequestsPersecUnique") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatabaseCacheSize sets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheSize(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSize", (value)) +} + +// GetDatabaseCacheSize gets the value of DatabaseCacheSize for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDatabaseCacheSizeMB sets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) SetPropertyDatabaseCacheSizeMB(value uint64) (err error) { + return instance.SetProperty("DatabaseCacheSizeMB", (value)) +} + +// GetDatabaseCacheSizeMB gets the value of DatabaseCacheSizeMB for the instance +func (instance *Win32_PerfRawData_ESENT_DatabaseTableClasses) GetPropertyDatabaseCacheSizeMB() (value uint64, err error) { + retValue, err := instance.GetProperty("DatabaseCacheSizeMB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go new file mode 100644 index 00000000..421b68d5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter struct +type Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter struct { + *Win32_PerfRawData + + // + BytesDropped uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + FramesDropped uint64 + + // + FramesReceivedPersec uint64 + + // + FramesSentPersec uint64 +} + +func NewWin32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesDropped sets the value of BytesDropped for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyBytesDropped(value uint64) (err error) { + return instance.SetProperty("BytesDropped", (value)) +} + +// GetBytesDropped gets the value of BytesDropped for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyBytesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFramesDropped sets the value of FramesDropped for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyFramesDropped(value uint64) (err error) { + return instance.SetProperty("FramesDropped", (value)) +} + +// GetFramesDropped gets the value of FramesDropped for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyFramesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("FramesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFramesReceivedPersec sets the value of FramesReceivedPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyFramesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("FramesReceivedPersec", (value)) +} + +// GetFramesReceivedPersec gets the value of FramesReceivedPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyFramesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FramesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFramesSentPersec sets the value of FramesSentPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) SetPropertyFramesSentPersec(value uint64) (err error) { + return instance.SetProperty("FramesSentPersec", (value)) +} + +// GetFramesSentPersec gets the value of FramesSentPersec for the instance +func (instance *Win32_PerfRawData_EthernetPerfProvider_HyperVLegacyNetworkAdapter) GetPropertyFramesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FramesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory.go new file mode 100644 index 00000000..40a0b1d2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory struct +type Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory struct { + *Win32_PerfRawData + + // + DedicatedUsage uint64 + + // + SharedUsage uint64 + + // + TotalCommitted uint64 +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDedicatedUsage sets the value of DedicatedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory) SetPropertyDedicatedUsage(value uint64) (err error) { + return instance.SetProperty("DedicatedUsage", (value)) +} + +// GetDedicatedUsage gets the value of DedicatedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory) GetPropertyDedicatedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("DedicatedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSharedUsage sets the value of SharedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory) SetPropertySharedUsage(value uint64) (err error) { + return instance.SetProperty("SharedUsage", (value)) +} + +// GetSharedUsage gets the value of SharedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory) GetPropertySharedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("SharedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalCommitted sets the value of TotalCommitted for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory) SetPropertyTotalCommitted(value uint64) (err error) { + return instance.SetProperty("TotalCommitted", (value)) +} + +// GetTotalCommitted gets the value of TotalCommitted for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUAdapterMemory) GetPropertyTotalCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUEngine.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUEngine.go new file mode 100644 index 00000000..371b257e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUEngine.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_GPUPerformanceCounters_GPUEngine struct +type Win32_PerfRawData_GPUPerformanceCounters_GPUEngine struct { + *Win32_PerfRawData + + // + RunningTime uint64 + + // + UtilizationPercentage uint64 +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUEngineEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUEngine, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUEngine{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUEngineEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUEngine, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUEngine{ + Win32_PerfRawData: tmp, + } + return +} + +// SetRunningTime sets the value of RunningTime for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUEngine) SetPropertyRunningTime(value uint64) (err error) { + return instance.SetProperty("RunningTime", (value)) +} + +// GetRunningTime gets the value of RunningTime for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUEngine) GetPropertyRunningTime() (value uint64, err error) { + retValue, err := instance.GetProperty("RunningTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUtilizationPercentage sets the value of UtilizationPercentage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUEngine) SetPropertyUtilizationPercentage(value uint64) (err error) { + return instance.SetProperty("UtilizationPercentage", (value)) +} + +// GetUtilizationPercentage gets the value of UtilizationPercentage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUEngine) GetPropertyUtilizationPercentage() (value uint64, err error) { + retValue, err := instance.GetProperty("UtilizationPercentage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory.go new file mode 100644 index 00000000..e7e49a38 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory struct +type Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory struct { + *Win32_PerfRawData + + // + LocalUsage uint64 +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetLocalUsage sets the value of LocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory) SetPropertyLocalUsage(value uint64) (err error) { + return instance.SetProperty("LocalUsage", (value)) +} + +// GetLocalUsage gets the value of LocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPULocalAdapterMemory) GetPropertyLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go new file mode 100644 index 00000000..76456558 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory struct +type Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory struct { + *Win32_PerfRawData + + // + NonLocalUsage uint64 +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNonLocalUsage sets the value of NonLocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory) SetPropertyNonLocalUsage(value uint64) (err error) { + return instance.SetProperty("NonLocalUsage", (value)) +} + +// GetNonLocalUsage gets the value of NonLocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUNonLocalAdapterMemory) GetPropertyNonLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("NonLocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory.go new file mode 100644 index 00000000..2318ce79 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory struct +type Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory struct { + *Win32_PerfRawData + + // + DedicatedUsage uint64 + + // + LocalUsage uint64 + + // + NonLocalUsage uint64 + + // + SharedUsage uint64 + + // + TotalCommitted uint64 +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUProcessMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_GPUPerformanceCounters_GPUProcessMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDedicatedUsage sets the value of DedicatedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyDedicatedUsage(value uint64) (err error) { + return instance.SetProperty("DedicatedUsage", (value)) +} + +// GetDedicatedUsage gets the value of DedicatedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyDedicatedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("DedicatedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalUsage sets the value of LocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyLocalUsage(value uint64) (err error) { + return instance.SetProperty("LocalUsage", (value)) +} + +// GetLocalUsage gets the value of LocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonLocalUsage sets the value of NonLocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyNonLocalUsage(value uint64) (err error) { + return instance.SetProperty("NonLocalUsage", (value)) +} + +// GetNonLocalUsage gets the value of NonLocalUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyNonLocalUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("NonLocalUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSharedUsage sets the value of SharedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) SetPropertySharedUsage(value uint64) (err error) { + return instance.SetProperty("SharedUsage", (value)) +} + +// GetSharedUsage gets the value of SharedUsage for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) GetPropertySharedUsage() (value uint64, err error) { + retValue, err := instance.GetProperty("SharedUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalCommitted sets the value of TotalCommitted for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) SetPropertyTotalCommitted(value uint64) (err error) { + return instance.SetProperty("TotalCommitted", (value)) +} + +// GetTotalCommitted gets the value of TotalCommitted for the instance +func (instance *Win32_PerfRawData_GPUPerformanceCounters_GPUProcessMemory) GetPropertyTotalCommitted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go new file mode 100644 index 00000000..bfcb281e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore struct +type Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore struct { + *Win32_PerfRawData + + // + OperationTime uint32 + + // + RequestsActive uint32 + + // + RequestsDispatched uint32 + + // + RequestsHighPriority uint32 + + // + RequestsProcessed uint32 + + // + ThreadsSpawned uint32 +} + +func NewWin32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestoreEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestoreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore{ + Win32_PerfRawData: tmp, + } + return +} + +// SetOperationTime sets the value of OperationTime for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyOperationTime(value uint32) (err error) { + return instance.SetProperty("OperationTime", (value)) +} + +// GetOperationTime gets the value of OperationTime for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyOperationTime() (value uint32, err error) { + retValue, err := instance.GetProperty("OperationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsActive sets the value of RequestsActive for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsActive(value uint32) (err error) { + return instance.SetProperty("RequestsActive", (value)) +} + +// GetRequestsActive gets the value of RequestsActive for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsActive() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsDispatched sets the value of RequestsDispatched for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsDispatched(value uint32) (err error) { + return instance.SetProperty("RequestsDispatched", (value)) +} + +// GetRequestsDispatched gets the value of RequestsDispatched for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsDispatched() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsDispatched") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsHighPriority sets the value of RequestsHighPriority for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsHighPriority(value uint32) (err error) { + return instance.SetProperty("RequestsHighPriority", (value)) +} + +// GetRequestsHighPriority gets the value of RequestsHighPriority for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsHighPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsHighPriority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequestsProcessed sets the value of RequestsProcessed for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyRequestsProcessed(value uint32) (err error) { + return instance.SetProperty("RequestsProcessed", (value)) +} + +// GetRequestsProcessed gets the value of RequestsProcessed for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyRequestsProcessed() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadsSpawned sets the value of ThreadsSpawned for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) SetPropertyThreadsSpawned(value uint32) (err error) { + return instance.SetProperty("ThreadsSpawned", (value)) +} + +// GetThreadsSpawned gets the value of ThreadsSpawned for the instance +func (instance *Win32_PerfRawData_GmoPerfProvider_HyperVVMSaveSnapshotandRestore) GetPropertyThreadsSpawned() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadsSpawned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisor.go new file mode 100644 index 00000000..ba9c7088 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisor.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HvStats_HyperVHypervisor struct +type Win32_PerfRawData_HvStats_HyperVHypervisor struct { + *Win32_PerfRawData + + // + HypervisorStartupCost uint64 + + // + LogicalProcessors uint64 + + // + ModernStandbyEntries uint64 + + // + MonitoredNotifications uint64 + + // + Partitions uint64 + + // + PlatformIdleTransitions uint64 + + // + TotalPages uint64 + + // + VirtualProcessors uint64 +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHypervisorStartupCost sets the value of HypervisorStartupCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyHypervisorStartupCost(value uint64) (err error) { + return instance.SetProperty("HypervisorStartupCost", (value)) +} + +// GetHypervisorStartupCost gets the value of HypervisorStartupCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyHypervisorStartupCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorStartupCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessors sets the value of LogicalProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyLogicalProcessors(value uint64) (err error) { + return instance.SetProperty("LogicalProcessors", (value)) +} + +// GetLogicalProcessors gets the value of LogicalProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyLogicalProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetModernStandbyEntries sets the value of ModernStandbyEntries for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyModernStandbyEntries(value uint64) (err error) { + return instance.SetProperty("ModernStandbyEntries", (value)) +} + +// GetModernStandbyEntries gets the value of ModernStandbyEntries for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyModernStandbyEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("ModernStandbyEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMonitoredNotifications sets the value of MonitoredNotifications for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyMonitoredNotifications(value uint64) (err error) { + return instance.SetProperty("MonitoredNotifications", (value)) +} + +// GetMonitoredNotifications gets the value of MonitoredNotifications for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyMonitoredNotifications() (value uint64, err error) { + retValue, err := instance.GetProperty("MonitoredNotifications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPartitions sets the value of Partitions for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyPartitions(value uint64) (err error) { + return instance.SetProperty("Partitions", (value)) +} + +// GetPartitions gets the value of Partitions for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyPartitions() (value uint64, err error) { + retValue, err := instance.GetProperty("Partitions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPlatformIdleTransitions sets the value of PlatformIdleTransitions for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyPlatformIdleTransitions(value uint64) (err error) { + return instance.SetProperty("PlatformIdleTransitions", (value)) +} + +// GetPlatformIdleTransitions gets the value of PlatformIdleTransitions for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyPlatformIdleTransitions() (value uint64, err error) { + retValue, err := instance.GetProperty("PlatformIdleTransitions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalPages sets the value of TotalPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyTotalPages(value uint64) (err error) { + return instance.SetProperty("TotalPages", (value)) +} + +// GetTotalPages gets the value of TotalPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyTotalPages() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessors sets the value of VirtualProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) SetPropertyVirtualProcessors(value uint64) (err error) { + return instance.SetProperty("VirtualProcessors", (value)) +} + +// GetVirtualProcessors gets the value of VirtualProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisor) GetPropertyVirtualProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor.go new file mode 100644 index 00000000..42391f1b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor.go @@ -0,0 +1,1070 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor struct +type Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor struct { + *Win32_PerfRawData + + // + C1TransitionsPersec uint64 + + // + C2TransitionsPersec uint64 + + // + C3TransitionsPersec uint64 + + // + ContextSwitchesPersec uint64 + + // + Frequency uint64 + + // + HardwareInterruptsPersec uint64 + + // + HypervisorBranchPredictorFlushesPersec uint64 + + // + HypervisorImmediateL1DataCacheFlushesPersec uint64 + + // + HypervisorL1DataCacheFlushesPersec uint64 + + // + InterProcessorInterruptsPersec uint64 + + // + InterProcessorInterruptsSentPersec uint64 + + // + MonitorTransitionCost uint64 + + // + ParkingStatus uint64 + + // + PercentC1Time uint64 + + // + PercentC1Time_Base uint64 + + // + PercentC2Time uint64 + + // + PercentC2Time_Base uint64 + + // + PercentC3Time uint64 + + // + PercentC3Time_Base uint64 + + // + PercentGuestRunTime uint64 + + // + PercentGuestRunTime_Base uint64 + + // + PercentHypervisorRunTime uint64 + + // + PercentHypervisorRunTime_Base uint64 + + // + PercentIdleTime uint64 + + // + PercentIdleTime_Base uint64 + + // + PercentofMaxFrequency uint64 + + // + PercentTotalRunTime uint64 + + // + PercentTotalRunTime_Base uint64 + + // + PostedInterruptNotificationsPersec uint64 + + // + ProcessorStateFlags uint64 + + // + RootVpIndex uint64 + + // + SchedulerInterruptsPersec uint64 + + // + TimerInterruptsPersec uint64 + + // + TotalInterruptsPersec uint64 +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetC1TransitionsPersec sets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyC1TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C1TransitionsPersec", (value)) +} + +// GetC1TransitionsPersec gets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyC1TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C1TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC2TransitionsPersec sets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyC2TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C2TransitionsPersec", (value)) +} + +// GetC2TransitionsPersec gets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyC2TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C2TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC3TransitionsPersec sets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyC3TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C3TransitionsPersec", (value)) +} + +// GetC3TransitionsPersec gets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyC3TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C3TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextSwitchesPersec sets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyContextSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("ContextSwitchesPersec", (value)) +} + +// GetContextSwitchesPersec gets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyContextSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ContextSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFrequency sets the value of Frequency for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyFrequency(value uint64) (err error) { + return instance.SetProperty("Frequency", (value)) +} + +// GetFrequency gets the value of Frequency for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyFrequency() (value uint64, err error) { + retValue, err := instance.GetProperty("Frequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHardwareInterruptsPersec sets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHardwareInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("HardwareInterruptsPersec", (value)) +} + +// GetHardwareInterruptsPersec gets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHardwareInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HardwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypervisorBranchPredictorFlushesPersec sets the value of HypervisorBranchPredictorFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHypervisorBranchPredictorFlushesPersec(value uint64) (err error) { + return instance.SetProperty("HypervisorBranchPredictorFlushesPersec", (value)) +} + +// GetHypervisorBranchPredictorFlushesPersec gets the value of HypervisorBranchPredictorFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHypervisorBranchPredictorFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorBranchPredictorFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypervisorImmediateL1DataCacheFlushesPersec sets the value of HypervisorImmediateL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHypervisorImmediateL1DataCacheFlushesPersec(value uint64) (err error) { + return instance.SetProperty("HypervisorImmediateL1DataCacheFlushesPersec", (value)) +} + +// GetHypervisorImmediateL1DataCacheFlushesPersec gets the value of HypervisorImmediateL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHypervisorImmediateL1DataCacheFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorImmediateL1DataCacheFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypervisorL1DataCacheFlushesPersec sets the value of HypervisorL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyHypervisorL1DataCacheFlushesPersec(value uint64) (err error) { + return instance.SetProperty("HypervisorL1DataCacheFlushesPersec", (value)) +} + +// GetHypervisorL1DataCacheFlushesPersec gets the value of HypervisorL1DataCacheFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyHypervisorL1DataCacheFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypervisorL1DataCacheFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterProcessorInterruptsPersec sets the value of InterProcessorInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyInterProcessorInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("InterProcessorInterruptsPersec", (value)) +} + +// GetInterProcessorInterruptsPersec gets the value of InterProcessorInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyInterProcessorInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterProcessorInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterProcessorInterruptsSentPersec sets the value of InterProcessorInterruptsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyInterProcessorInterruptsSentPersec(value uint64) (err error) { + return instance.SetProperty("InterProcessorInterruptsSentPersec", (value)) +} + +// GetInterProcessorInterruptsSentPersec gets the value of InterProcessorInterruptsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyInterProcessorInterruptsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InterProcessorInterruptsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMonitorTransitionCost sets the value of MonitorTransitionCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyMonitorTransitionCost(value uint64) (err error) { + return instance.SetProperty("MonitorTransitionCost", (value)) +} + +// GetMonitorTransitionCost gets the value of MonitorTransitionCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyMonitorTransitionCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MonitorTransitionCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetParkingStatus sets the value of ParkingStatus for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyParkingStatus(value uint64) (err error) { + return instance.SetProperty("ParkingStatus", (value)) +} + +// GetParkingStatus gets the value of ParkingStatus for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyParkingStatus() (value uint64, err error) { + retValue, err := instance.GetProperty("ParkingStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC1Time sets the value of PercentC1Time for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC1Time(value uint64) (err error) { + return instance.SetProperty("PercentC1Time", (value)) +} + +// GetPercentC1Time gets the value of PercentC1Time for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC1Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC1Time_Base sets the value of PercentC1Time_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC1Time_Base(value uint64) (err error) { + return instance.SetProperty("PercentC1Time_Base", (value)) +} + +// GetPercentC1Time_Base gets the value of PercentC1Time_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC1Time_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time sets the value of PercentC2Time for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC2Time(value uint64) (err error) { + return instance.SetProperty("PercentC2Time", (value)) +} + +// GetPercentC2Time gets the value of PercentC2Time for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC2Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time_Base sets the value of PercentC2Time_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC2Time_Base(value uint64) (err error) { + return instance.SetProperty("PercentC2Time_Base", (value)) +} + +// GetPercentC2Time_Base gets the value of PercentC2Time_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC2Time_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time sets the value of PercentC3Time for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC3Time(value uint64) (err error) { + return instance.SetProperty("PercentC3Time", (value)) +} + +// GetPercentC3Time gets the value of PercentC3Time for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC3Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time_Base sets the value of PercentC3Time_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentC3Time_Base(value uint64) (err error) { + return instance.SetProperty("PercentC3Time_Base", (value)) +} + +// GetPercentC3Time_Base gets the value of PercentC3Time_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentC3Time_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime sets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentGuestRunTime(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime", (value)) +} + +// GetPercentGuestRunTime gets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentGuestRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime_Base sets the value of PercentGuestRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentGuestRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime_Base", (value)) +} + +// GetPercentGuestRunTime_Base gets the value of PercentGuestRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentGuestRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime sets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentHypervisorRunTime(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime", (value)) +} + +// GetPercentHypervisorRunTime gets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentHypervisorRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime_Base sets the value of PercentHypervisorRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentHypervisorRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime_Base", (value)) +} + +// GetPercentHypervisorRunTime_Base gets the value of PercentHypervisorRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentHypervisorRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime_Base sets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentIdleTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime_Base", (value)) +} + +// GetPercentIdleTime_Base gets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentIdleTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentofMaxFrequency sets the value of PercentofMaxFrequency for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentofMaxFrequency(value uint64) (err error) { + return instance.SetProperty("PercentofMaxFrequency", (value)) +} + +// GetPercentofMaxFrequency gets the value of PercentofMaxFrequency for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentofMaxFrequency() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentofMaxFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime sets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentTotalRunTime(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime", (value)) +} + +// GetPercentTotalRunTime gets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentTotalRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime_Base sets the value of PercentTotalRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPercentTotalRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime_Base", (value)) +} + +// GetPercentTotalRunTime_Base gets the value of PercentTotalRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPercentTotalRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptNotificationsPersec sets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyPostedInterruptNotificationsPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptNotificationsPersec", (value)) +} + +// GetPostedInterruptNotificationsPersec gets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyPostedInterruptNotificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptNotificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessorStateFlags sets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyProcessorStateFlags(value uint64) (err error) { + return instance.SetProperty("ProcessorStateFlags", (value)) +} + +// GetProcessorStateFlags gets the value of ProcessorStateFlags for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyProcessorStateFlags() (value uint64, err error) { + retValue, err := instance.GetProperty("ProcessorStateFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRootVpIndex sets the value of RootVpIndex for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyRootVpIndex(value uint64) (err error) { + return instance.SetProperty("RootVpIndex", (value)) +} + +// GetRootVpIndex gets the value of RootVpIndex for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyRootVpIndex() (value uint64, err error) { + retValue, err := instance.GetProperty("RootVpIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSchedulerInterruptsPersec sets the value of SchedulerInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertySchedulerInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("SchedulerInterruptsPersec", (value)) +} + +// GetSchedulerInterruptsPersec gets the value of SchedulerInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertySchedulerInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SchedulerInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTimerInterruptsPersec sets the value of TimerInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyTimerInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("TimerInterruptsPersec", (value)) +} + +// GetTimerInterruptsPersec gets the value of TimerInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyTimerInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TimerInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterruptsPersec sets the value of TotalInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) SetPropertyTotalInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("TotalInterruptsPersec", (value)) +} + +// GetTotalInterruptsPersec gets the value of TotalInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorLogicalProcessor) GetPropertyTotalInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorPartition.go new file mode 100644 index 00000000..f86d76e0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorPartition.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HvStats_HyperVHypervisorPartition struct +type Win32_PerfRawData_HvStats_HyperVHypervisorPartition struct { + *Win32_PerfRawData + + // + AddressSpaces uint64 + + // + AttachedDevices uint64 + + // + DepositedPages uint64 + + // + DeviceDMAErrors uint64 + + // + DeviceInterruptErrors uint64 + + // + DeviceInterruptMappings uint64 + + // + DeviceInterruptThrottleEvents uint64 + + // + GPAPages uint64 + + // + GPASpaceModificationsPersec uint64 + + // + IOTLBFlushCost uint64 + + // + IOTLBFlushCost_Base uint64 + + // + IOTLBFlushesPersec uint64 + + // + NestedTLBFreeListSize uint64 + + // + NestedTLBSize uint64 + + // + NestedTLBTrimmedPagesPersec uint64 + + // + pagesrecombinedPersec uint64 + + // + pagesshatteredPersec uint64 + + // + RecommendedNestedTLBSize uint64 + + // + RecommendedVirtualTLBSize uint64 + + // + SkippedTimerTicks uint64 + + // + Value1Gdevicepages uint64 + + // + Value1GGPApages uint64 + + // + Value2Mdevicepages uint64 + + // + Value2MGPApages uint64 + + // + Value4Kdevicepages uint64 + + // + Value4KGPApages uint64 + + // + VirtualProcessors uint64 + + // + VirtualTLBFlushEntiresPersec uint64 + + // + VirtualTLBPages uint64 +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorPartition{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorPartition{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAddressSpaces sets the value of AddressSpaces for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyAddressSpaces(value uint64) (err error) { + return instance.SetProperty("AddressSpaces", (value)) +} + +// GetAddressSpaces gets the value of AddressSpaces for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyAddressSpaces() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaces") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAttachedDevices sets the value of AttachedDevices for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyAttachedDevices(value uint64) (err error) { + return instance.SetProperty("AttachedDevices", (value)) +} + +// GetAttachedDevices gets the value of AttachedDevices for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyAttachedDevices() (value uint64, err error) { + retValue, err := instance.GetProperty("AttachedDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDepositedPages sets the value of DepositedPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyDepositedPages(value uint64) (err error) { + return instance.SetProperty("DepositedPages", (value)) +} + +// GetDepositedPages gets the value of DepositedPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyDepositedPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DepositedPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceDMAErrors sets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceDMAErrors(value uint64) (err error) { + return instance.SetProperty("DeviceDMAErrors", (value)) +} + +// GetDeviceDMAErrors gets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceDMAErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceDMAErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptErrors sets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceInterruptErrors(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptErrors", (value)) +} + +// GetDeviceInterruptErrors gets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceInterruptErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptMappings sets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceInterruptMappings(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptMappings", (value)) +} + +// GetDeviceInterruptMappings gets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceInterruptMappings() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptMappings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptThrottleEvents sets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyDeviceInterruptThrottleEvents(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptThrottleEvents", (value)) +} + +// GetDeviceInterruptThrottleEvents gets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyDeviceInterruptThrottleEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptThrottleEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPAPages sets the value of GPAPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyGPAPages(value uint64) (err error) { + return instance.SetProperty("GPAPages", (value)) +} + +// GetGPAPages gets the value of GPAPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyGPAPages() (value uint64, err error) { + retValue, err := instance.GetProperty("GPAPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceModificationsPersec sets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyGPASpaceModificationsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceModificationsPersec", (value)) +} + +// GetGPASpaceModificationsPersec gets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyGPASpaceModificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceModificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushCost sets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushCost", (value)) +} + +// GetIOTLBFlushCost gets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushCost_Base sets the value of IOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyIOTLBFlushCost_Base(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushCost_Base", (value)) +} + +// GetIOTLBFlushCost_Base gets the value of IOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyIOTLBFlushCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushesPersec sets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushesPersec", (value)) +} + +// GetIOTLBFlushesPersec gets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBFreeListSize sets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyNestedTLBFreeListSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBFreeListSize", (value)) +} + +// GetNestedTLBFreeListSize gets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyNestedTLBFreeListSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBFreeListSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBSize sets the value of NestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBSize", (value)) +} + +// GetNestedTLBSize gets the value of NestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBTrimmedPagesPersec sets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyNestedTLBTrimmedPagesPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBTrimmedPagesPersec", (value)) +} + +// GetNestedTLBTrimmedPagesPersec gets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyNestedTLBTrimmedPagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBTrimmedPagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesrecombinedPersec sets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertypagesrecombinedPersec(value uint64) (err error) { + return instance.SetProperty("pagesrecombinedPersec", (value)) +} + +// GetpagesrecombinedPersec gets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertypagesrecombinedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesrecombinedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesshatteredPersec sets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertypagesshatteredPersec(value uint64) (err error) { + return instance.SetProperty("pagesshatteredPersec", (value)) +} + +// GetpagesshatteredPersec gets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertypagesshatteredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesshatteredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedNestedTLBSize sets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyRecommendedNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedNestedTLBSize", (value)) +} + +// GetRecommendedNestedTLBSize gets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyRecommendedNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedNestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedVirtualTLBSize sets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyRecommendedVirtualTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedVirtualTLBSize", (value)) +} + +// GetRecommendedVirtualTLBSize gets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyRecommendedVirtualTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedVirtualTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSkippedTimerTicks sets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertySkippedTimerTicks(value uint64) (err error) { + return instance.SetProperty("SkippedTimerTicks", (value)) +} + +// GetSkippedTimerTicks gets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertySkippedTimerTicks() (value uint64, err error) { + retValue, err := instance.GetProperty("SkippedTimerTicks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1Gdevicepages sets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyValue1Gdevicepages(value uint64) (err error) { + return instance.SetProperty("Value1Gdevicepages", (value)) +} + +// GetValue1Gdevicepages gets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyValue1Gdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1Gdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1GGPApages sets the value of Value1GGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyValue1GGPApages(value uint64) (err error) { + return instance.SetProperty("Value1GGPApages", (value)) +} + +// GetValue1GGPApages gets the value of Value1GGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyValue1GGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1GGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2Mdevicepages sets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyValue2Mdevicepages(value uint64) (err error) { + return instance.SetProperty("Value2Mdevicepages", (value)) +} + +// GetValue2Mdevicepages gets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyValue2Mdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2Mdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2MGPApages sets the value of Value2MGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyValue2MGPApages(value uint64) (err error) { + return instance.SetProperty("Value2MGPApages", (value)) +} + +// GetValue2MGPApages gets the value of Value2MGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyValue2MGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2MGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4Kdevicepages sets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyValue4Kdevicepages(value uint64) (err error) { + return instance.SetProperty("Value4Kdevicepages", (value)) +} + +// GetValue4Kdevicepages gets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyValue4Kdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4Kdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4KGPApages sets the value of Value4KGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyValue4KGPApages(value uint64) (err error) { + return instance.SetProperty("Value4KGPApages", (value)) +} + +// GetValue4KGPApages gets the value of Value4KGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyValue4KGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4KGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessors sets the value of VirtualProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyVirtualProcessors(value uint64) (err error) { + return instance.SetProperty("VirtualProcessors", (value)) +} + +// GetVirtualProcessors gets the value of VirtualProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyVirtualProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBFlushEntiresPersec sets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyVirtualTLBFlushEntiresPersec(value uint64) (err error) { + return instance.SetProperty("VirtualTLBFlushEntiresPersec", (value)) +} + +// GetVirtualTLBFlushEntiresPersec gets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyVirtualTLBFlushEntiresPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBFlushEntiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBPages sets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) SetPropertyVirtualTLBPages(value uint64) (err error) { + return instance.SetProperty("VirtualTLBPages", (value)) +} + +// GetVirtualTLBPages gets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorPartition) GetPropertyVirtualTLBPages() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition.go new file mode 100644 index 00000000..09fbdba7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition.go @@ -0,0 +1,920 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition struct +type Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition struct { + *Win32_PerfRawData + + // + AddressSpaces uint64 + + // + AttachedDevices uint64 + + // + DepositedPages uint64 + + // + DeviceDMAErrors uint64 + + // + DeviceInterruptErrors uint64 + + // + DeviceInterruptMappings uint64 + + // + DeviceInterruptThrottleEvents uint64 + + // + GPAPages uint64 + + // + GPASpaceModificationsPersec uint64 + + // + IOTLBFlushCost uint64 + + // + IOTLBFlushCost_Base uint64 + + // + IOTLBFlushesPersec uint64 + + // + NestedTLBFreeListSize uint64 + + // + NestedTLBSize uint64 + + // + NestedTLBTrimmedPagesPersec uint64 + + // + pagesrecombinedPersec uint64 + + // + pagesshatteredPersec uint64 + + // + RecommendedNestedTLBSize uint64 + + // + RecommendedVirtualTLBSize uint64 + + // + SkippedTimerTicks uint64 + + // + Value1Gdevicepages uint64 + + // + Value1GGPApages uint64 + + // + Value2Mdevicepages uint64 + + // + Value2MGPApages uint64 + + // + Value4Kdevicepages uint64 + + // + Value4KGPApages uint64 + + // + VirtualProcessors uint64 + + // + VirtualTLBFlushEntiresPersec uint64 + + // + VirtualTLBPages uint64 +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorRootPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorRootPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAddressSpaces sets the value of AddressSpaces for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyAddressSpaces(value uint64) (err error) { + return instance.SetProperty("AddressSpaces", (value)) +} + +// GetAddressSpaces gets the value of AddressSpaces for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyAddressSpaces() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaces") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAttachedDevices sets the value of AttachedDevices for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyAttachedDevices(value uint64) (err error) { + return instance.SetProperty("AttachedDevices", (value)) +} + +// GetAttachedDevices gets the value of AttachedDevices for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyAttachedDevices() (value uint64, err error) { + retValue, err := instance.GetProperty("AttachedDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDepositedPages sets the value of DepositedPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyDepositedPages(value uint64) (err error) { + return instance.SetProperty("DepositedPages", (value)) +} + +// GetDepositedPages gets the value of DepositedPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyDepositedPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DepositedPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceDMAErrors sets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceDMAErrors(value uint64) (err error) { + return instance.SetProperty("DeviceDMAErrors", (value)) +} + +// GetDeviceDMAErrors gets the value of DeviceDMAErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceDMAErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceDMAErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptErrors sets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceInterruptErrors(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptErrors", (value)) +} + +// GetDeviceInterruptErrors gets the value of DeviceInterruptErrors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceInterruptErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptMappings sets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceInterruptMappings(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptMappings", (value)) +} + +// GetDeviceInterruptMappings gets the value of DeviceInterruptMappings for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceInterruptMappings() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptMappings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeviceInterruptThrottleEvents sets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyDeviceInterruptThrottleEvents(value uint64) (err error) { + return instance.SetProperty("DeviceInterruptThrottleEvents", (value)) +} + +// GetDeviceInterruptThrottleEvents gets the value of DeviceInterruptThrottleEvents for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyDeviceInterruptThrottleEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("DeviceInterruptThrottleEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPAPages sets the value of GPAPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyGPAPages(value uint64) (err error) { + return instance.SetProperty("GPAPages", (value)) +} + +// GetGPAPages gets the value of GPAPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyGPAPages() (value uint64, err error) { + retValue, err := instance.GetProperty("GPAPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceModificationsPersec sets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyGPASpaceModificationsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceModificationsPersec", (value)) +} + +// GetGPASpaceModificationsPersec gets the value of GPASpaceModificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyGPASpaceModificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceModificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushCost sets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushCost", (value)) +} + +// GetIOTLBFlushCost gets the value of IOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushCost_Base sets the value of IOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyIOTLBFlushCost_Base(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushCost_Base", (value)) +} + +// GetIOTLBFlushCost_Base gets the value of IOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyIOTLBFlushCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOTLBFlushesPersec sets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("IOTLBFlushesPersec", (value)) +} + +// GetIOTLBFlushesPersec gets the value of IOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBFreeListSize sets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyNestedTLBFreeListSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBFreeListSize", (value)) +} + +// GetNestedTLBFreeListSize gets the value of NestedTLBFreeListSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyNestedTLBFreeListSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBFreeListSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBSize sets the value of NestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("NestedTLBSize", (value)) +} + +// GetNestedTLBSize gets the value of NestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBTrimmedPagesPersec sets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyNestedTLBTrimmedPagesPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBTrimmedPagesPersec", (value)) +} + +// GetNestedTLBTrimmedPagesPersec gets the value of NestedTLBTrimmedPagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyNestedTLBTrimmedPagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBTrimmedPagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesrecombinedPersec sets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertypagesrecombinedPersec(value uint64) (err error) { + return instance.SetProperty("pagesrecombinedPersec", (value)) +} + +// GetpagesrecombinedPersec gets the value of pagesrecombinedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertypagesrecombinedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesrecombinedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetpagesshatteredPersec sets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertypagesshatteredPersec(value uint64) (err error) { + return instance.SetProperty("pagesshatteredPersec", (value)) +} + +// GetpagesshatteredPersec gets the value of pagesshatteredPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertypagesshatteredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("pagesshatteredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedNestedTLBSize sets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyRecommendedNestedTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedNestedTLBSize", (value)) +} + +// GetRecommendedNestedTLBSize gets the value of RecommendedNestedTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyRecommendedNestedTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedNestedTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRecommendedVirtualTLBSize sets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyRecommendedVirtualTLBSize(value uint64) (err error) { + return instance.SetProperty("RecommendedVirtualTLBSize", (value)) +} + +// GetRecommendedVirtualTLBSize gets the value of RecommendedVirtualTLBSize for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyRecommendedVirtualTLBSize() (value uint64, err error) { + retValue, err := instance.GetProperty("RecommendedVirtualTLBSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSkippedTimerTicks sets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertySkippedTimerTicks(value uint64) (err error) { + return instance.SetProperty("SkippedTimerTicks", (value)) +} + +// GetSkippedTimerTicks gets the value of SkippedTimerTicks for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertySkippedTimerTicks() (value uint64, err error) { + retValue, err := instance.GetProperty("SkippedTimerTicks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1Gdevicepages sets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue1Gdevicepages(value uint64) (err error) { + return instance.SetProperty("Value1Gdevicepages", (value)) +} + +// GetValue1Gdevicepages gets the value of Value1Gdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue1Gdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1Gdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue1GGPApages sets the value of Value1GGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue1GGPApages(value uint64) (err error) { + return instance.SetProperty("Value1GGPApages", (value)) +} + +// GetValue1GGPApages gets the value of Value1GGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue1GGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value1GGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2Mdevicepages sets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue2Mdevicepages(value uint64) (err error) { + return instance.SetProperty("Value2Mdevicepages", (value)) +} + +// GetValue2Mdevicepages gets the value of Value2Mdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue2Mdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2Mdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue2MGPApages sets the value of Value2MGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue2MGPApages(value uint64) (err error) { + return instance.SetProperty("Value2MGPApages", (value)) +} + +// GetValue2MGPApages gets the value of Value2MGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue2MGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value2MGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4Kdevicepages sets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue4Kdevicepages(value uint64) (err error) { + return instance.SetProperty("Value4Kdevicepages", (value)) +} + +// GetValue4Kdevicepages gets the value of Value4Kdevicepages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue4Kdevicepages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4Kdevicepages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetValue4KGPApages sets the value of Value4KGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyValue4KGPApages(value uint64) (err error) { + return instance.SetProperty("Value4KGPApages", (value)) +} + +// GetValue4KGPApages gets the value of Value4KGPApages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyValue4KGPApages() (value uint64, err error) { + retValue, err := instance.GetProperty("Value4KGPApages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessors sets the value of VirtualProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyVirtualProcessors(value uint64) (err error) { + return instance.SetProperty("VirtualProcessors", (value)) +} + +// GetVirtualProcessors gets the value of VirtualProcessors for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyVirtualProcessors() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBFlushEntiresPersec sets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyVirtualTLBFlushEntiresPersec(value uint64) (err error) { + return instance.SetProperty("VirtualTLBFlushEntiresPersec", (value)) +} + +// GetVirtualTLBFlushEntiresPersec gets the value of VirtualTLBFlushEntiresPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyVirtualTLBFlushEntiresPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBFlushEntiresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualTLBPages sets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) SetPropertyVirtualTLBPages(value uint64) (err error) { + return instance.SetProperty("VirtualTLBPages", (value)) +} + +// GetVirtualTLBPages gets the value of VirtualTLBPages for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootPartition) GetPropertyVirtualTLBPages() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualTLBPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor.go new file mode 100644 index 00000000..6c507208 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor.go @@ -0,0 +1,6080 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor struct +type Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor struct { + *Win32_PerfRawData + + // + AddressDomainFlushesPersec uint64 + + // + AddressSpaceEvictionsPersec uint64 + + // + AddressSpaceFlushesPersec uint64 + + // + AddressSpaceSwitchesPersec uint64 + + // + APICEOIAccessesPersec uint64 + + // + APICIPIsSentPersec uint64 + + // + APICMMIOAccessesPersec uint64 + + // + APICSelfIPIsSentPersec uint64 + + // + APICTPRAccessesPersec uint64 + + // + ControlRegisterAccessesCost uint64 + + // + ControlRegisterAccessesCost_Base uint64 + + // + ControlRegisterAccessesForwardedPersec uint64 + + // + ControlRegisterAccessesForwardingCost uint64 + + // + ControlRegisterAccessesForwardingCost_Base uint64 + + // + ControlRegisterAccessesPersec uint64 + + // + CPUIDInstructionsCost uint64 + + // + CPUIDInstructionsCost_Base uint64 + + // + CPUIDInstructionsForwardedPersec uint64 + + // + CPUIDInstructionsForwardingCost uint64 + + // + CPUIDInstructionsForwardingCost_Base uint64 + + // + CPUIDInstructionsPersec uint64 + + // + CPUWaitTimePerDispatch uint64 + + // + CPUWaitTimePerDispatch_Base uint64 + + // + DebugRegisterAccessesCost uint64 + + // + DebugRegisterAccessesCost_Base uint64 + + // + DebugRegisterAccessesForwardedPersec uint64 + + // + DebugRegisterAccessesForwardingCost uint64 + + // + DebugRegisterAccessesForwardingCost_Base uint64 + + // + DebugRegisterAccessesPersec uint64 + + // + EmulatedInstructionsCost uint64 + + // + EmulatedInstructionsCost_Base uint64 + + // + EmulatedInstructionsForwardedPersec uint64 + + // + EmulatedInstructionsForwardingCost uint64 + + // + EmulatedInstructionsForwardingCost_Base uint64 + + // + EmulatedInstructionsPersec uint64 + + // + ExtendedHypercallInterceptMessagesPersec uint64 + + // + ExtendedHypercallsPersec uint64 + + // + ExternalInterruptsCost uint64 + + // + ExternalInterruptsCost_Base uint64 + + // + ExternalInterruptsForwardedPersec uint64 + + // + ExternalInterruptsPersec uint64 + + // + FlushPhysicalAddressListHypercallsPersec uint64 + + // + FlushPhysicalAddressSpaceHypercallsPersec uint64 + + // + GlobalGVARangeFlushesPersec uint64 + + // + GlobalIOTLBFlushCost uint64 + + // + GlobalIOTLBFlushCost_Base uint64 + + // + GlobalIOTLBFlushesPersec uint64 + + // + GPASpaceHypercallsPersec uint64 + + // + GuestPageTableMapsPersec uint64 + + // + HardwareInterruptsPersec uint64 + + // + HLTInstructionsCost uint64 + + // + HLTInstructionsCost_Base uint64 + + // + HLTInstructionsForwardedPersec uint64 + + // + HLTInstructionsForwardingCost uint64 + + // + HLTInstructionsForwardingCost_Base uint64 + + // + HLTInstructionsPersec uint64 + + // + HypercallsCost uint64 + + // + HypercallsCost_Base uint64 + + // + HypercallsForwardedPersec uint64 + + // + HypercallsForwardingCost uint64 + + // + HypercallsForwardingCost_Base uint64 + + // + HypercallsPersec uint64 + + // + InvEptAllContextEmulationInterceptsPersec uint64 + + // + InvEptAllContextInstructionEmulationCost uint64 + + // + InvEptAllContextInstructionEmulationCost_Base uint64 + + // + InvEptSingleContextEmulationInterceptsPersec uint64 + + // + InvEptSingleContextInstructionEmulationCost uint64 + + // + InvEptSingleContextInstructionEmulationCost_Base uint64 + + // + InvVpidAllContextEmulationInterceptsPersec uint64 + + // + InvVpidAllContextInstructionEmulationCost uint64 + + // + InvVpidAllContextInstructionEmulationCost_Base uint64 + + // + InvVpidSingleAddressEmulationInterceptsPersec uint64 + + // + InvVpidSingleAddressInstructionEmulationCost uint64 + + // + InvVpidSingleAddressInstructionEmulationCost_Base uint64 + + // + InvVpidSingleContextEmulationInterceptsPersec uint64 + + // + InvVpidSingleContextInstructionEmulationCost uint64 + + // + InvVpidSingleContextInstructionEmulationCost_Base uint64 + + // + IOInstructionsCost uint64 + + // + IOInstructionsCost_Base uint64 + + // + IOInstructionsForwardedPersec uint64 + + // + IOInstructionsForwardingCost uint64 + + // + IOInstructionsForwardingCost_Base uint64 + + // + IOInstructionsPersec uint64 + + // + IOInterceptMessagesPersec uint64 + + // + LargePageTLBFillsPersec uint64 + + // + LocalFlushedGVARangesPersec uint64 + + // + LocalIOTLBFlushCost uint64 + + // + LocalIOTLBFlushCost_Base uint64 + + // + LocalIOTLBFlushesPersec uint64 + + // + LogicalProcessorDispatchesPersec uint64 + + // + LogicalProcessorHypercallsPersec uint64 + + // + LogicalProcessorMigrationsPersec uint64 + + // + LongSpinWaitHypercallsPersec uint64 + + // + MBECNestedPageTableSwitchesPersec uint64 + + // + MemoryInterceptMessagesPersec uint64 + + // + MSRAccessesCost uint64 + + // + MSRAccessesCost_Base uint64 + + // + MSRAccessesForwardedPersec uint64 + + // + MSRAccessesForwardingCost uint64 + + // + MSRAccessesForwardingCost_Base uint64 + + // + MSRAccessesPersec uint64 + + // + MWAITInstructionsCost uint64 + + // + MWAITInstructionsCost_Base uint64 + + // + MWAITInstructionsForwardedPersec uint64 + + // + MWAITInstructionsForwardingCost uint64 + + // + MWAITInstructionsForwardingCost_Base uint64 + + // + MWAITInstructionsPersec uint64 + + // + NestedPageFaultInterceptsCost uint64 + + // + NestedPageFaultInterceptsCost_Base uint64 + + // + NestedPageFaultInterceptsPersec uint64 + + // + NestedSLATHardPageFaultsCost uint64 + + // + NestedSLATHardPageFaultsCost_Base uint64 + + // + NestedSLATHardPageFaultsPersec uint64 + + // + NestedSLATSoftPageFaultsCost uint64 + + // + NestedSLATSoftPageFaultsCost_Base uint64 + + // + NestedSLATSoftPageFaultsPersec uint64 + + // + NestedTLBPageTableEvictionsPersec uint64 + + // + NestedTLBPageTableReclamationsPersec uint64 + + // + NestedVMEntriesCost uint64 + + // + NestedVMEntriesCost_Base uint64 + + // + NestedVMEntriesPersec uint64 + + // + OtherHypercallsPersec uint64 + + // + OtherInterceptsCost uint64 + + // + OtherInterceptsCost_Base uint64 + + // + OtherInterceptsForwardedPersec uint64 + + // + OtherInterceptsForwardingCost uint64 + + // + OtherInterceptsForwardingCost_Base uint64 + + // + OtherInterceptsPersec uint64 + + // + OtherMessagesPersec uint64 + + // + OtherReflectedGuestExceptionsPersec uint64 + + // + PageFaultInterceptsCost uint64 + + // + PageFaultInterceptsCost_Base uint64 + + // + PageFaultInterceptsForwardedPersec uint64 + + // + PageFaultInterceptsForwardingCost uint64 + + // + PageFaultInterceptsForwardingCost_Base uint64 + + // + PageFaultInterceptsPersec uint64 + + // + PageInvalidationsCost uint64 + + // + PageInvalidationsCost_Base uint64 + + // + PageInvalidationsForwardedPersec uint64 + + // + PageInvalidationsForwardingCost uint64 + + // + PageInvalidationsForwardingCost_Base uint64 + + // + PageInvalidationsPersec uint64 + + // + PageScansPersec uint64 + + // + PageTableAllocationsPersec uint64 + + // + PageTableEvictionsPersec uint64 + + // + PageTableReclamationsPersec uint64 + + // + PageTableResetsPersec uint64 + + // + PageTableValidationsPersec uint64 + + // + PageTableWriteInterceptsPersec uint64 + + // + PendingInterruptsCost uint64 + + // + PendingInterruptsCost_Base uint64 + + // + PendingInterruptsForwardedPersec uint64 + + // + PendingInterruptsForwardingCost uint64 + + // + PendingInterruptsForwardingCost_Base uint64 + + // + PendingInterruptsPersec uint64 + + // + PercentGuestRunTime uint64 + + // + PercentGuestRunTime_Base uint64 + + // + PercentHypervisorRunTime uint64 + + // + PercentHypervisorRunTime_Base uint64 + + // + PercentRemoteRunTime uint64 + + // + PercentRemoteRunTime_Base uint64 + + // + PercentTotalRunTime uint64 + + // + PercentTotalRunTime_Base uint64 + + // + PostedInterruptNotificationsPersec uint64 + + // + PostedInterruptScansPersec uint64 + + // + ReflectedGuestPageFaultsPersec uint64 + + // + SmallPageTLBFillsPersec uint64 + + // + SyntheticInterruptHypercallsPersec uint64 + + // + SyntheticInterruptsPersec uint64 + + // + TotalInterceptsCost uint64 + + // + TotalInterceptsCost_Base uint64 + + // + TotalInterceptsPersec uint64 + + // + TotalMessagesPersec uint64 + + // + TotalVirtualizationInstructionsEmulatedPersec uint64 + + // + TotalVirtualizationInstructionsEmulationCost uint64 + + // + TotalVirtualizationInstructionsEmulationCost_Base uint64 + + // + VirtualInterruptHypercallsPersec uint64 + + // + VirtualInterruptsPersec uint64 + + // + VirtualMMUHypercallsPersec uint64 + + // + VirtualProcessorHypercallsPersec uint64 + + // + VMCLEAREmulationInterceptsPersec uint64 + + // + VMCLEARInstructionEmulationCost uint64 + + // + VMCLEARInstructionEmulationCost_Base uint64 + + // + VMPTRLDEmulationInterceptsPersec uint64 + + // + VMPTRLDInstructionEmulationCost uint64 + + // + VMPTRLDInstructionEmulationCost_Base uint64 + + // + VMPTRSTEmulationInterceptsPersec uint64 + + // + VMPTRSTInstructionEmulationCost uint64 + + // + VMPTRSTInstructionEmulationCost_Base uint64 + + // + VMREADEmulationInterceptsPersec uint64 + + // + VMREADInstructionEmulationCost uint64 + + // + VMREADInstructionEmulationCost_Base uint64 + + // + VMWRITEEmulationInterceptsPersec uint64 + + // + VMWRITEInstructionEmulationCost uint64 + + // + VMWRITEInstructionEmulationCost_Base uint64 + + // + VMXOFFEmulationInterceptsPersec uint64 + + // + VMXOFFInstructionEmulationCost uint64 + + // + VMXOFFInstructionEmulationCost_Base uint64 + + // + VMXONEmulationInterceptsPersec uint64 + + // + VMXONInstructionEmulationCost uint64 + + // + VMXONInstructionEmulationCost_Base uint64 +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAddressDomainFlushesPersec sets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressDomainFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressDomainFlushesPersec", (value)) +} + +// GetAddressDomainFlushesPersec gets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressDomainFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressDomainFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceEvictionsPersec sets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressSpaceEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceEvictionsPersec", (value)) +} + +// GetAddressSpaceEvictionsPersec gets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressSpaceEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceFlushesPersec sets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressSpaceFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceFlushesPersec", (value)) +} + +// GetAddressSpaceFlushesPersec gets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressSpaceFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceSwitchesPersec sets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAddressSpaceSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceSwitchesPersec", (value)) +} + +// GetAddressSpaceSwitchesPersec gets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAddressSpaceSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICEOIAccessesPersec sets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICEOIAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICEOIAccessesPersec", (value)) +} + +// GetAPICEOIAccessesPersec gets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICEOIAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICEOIAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICIPIsSentPersec sets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICIPIsSentPersec", (value)) +} + +// GetAPICIPIsSentPersec gets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICMMIOAccessesPersec sets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICMMIOAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICMMIOAccessesPersec", (value)) +} + +// GetAPICMMIOAccessesPersec gets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICMMIOAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICMMIOAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICSelfIPIsSentPersec sets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICSelfIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICSelfIPIsSentPersec", (value)) +} + +// GetAPICSelfIPIsSentPersec gets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICSelfIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICSelfIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICTPRAccessesPersec sets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyAPICTPRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICTPRAccessesPersec", (value)) +} + +// GetAPICTPRAccessesPersec gets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyAPICTPRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICTPRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesCost sets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesCost", (value)) +} + +// GetControlRegisterAccessesCost gets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesCost_Base sets the value of ControlRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesCost_Base(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesCost_Base", (value)) +} + +// GetControlRegisterAccessesCost_Base gets the value of ControlRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardedPersec sets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardedPersec", (value)) +} + +// GetControlRegisterAccessesForwardedPersec gets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardingCost sets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardingCost", (value)) +} + +// GetControlRegisterAccessesForwardingCost gets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardingCost_Base sets the value of ControlRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardingCost_Base", (value)) +} + +// GetControlRegisterAccessesForwardingCost_Base gets the value of ControlRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesPersec sets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyControlRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesPersec", (value)) +} + +// GetControlRegisterAccessesPersec gets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyControlRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsCost sets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsCost", (value)) +} + +// GetCPUIDInstructionsCost gets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsCost_Base sets the value of CPUIDInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsCost_Base", (value)) +} + +// GetCPUIDInstructionsCost_Base gets the value of CPUIDInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardedPersec sets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardedPersec", (value)) +} + +// GetCPUIDInstructionsForwardedPersec gets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardingCost sets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardingCost", (value)) +} + +// GetCPUIDInstructionsForwardingCost gets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardingCost_Base sets the value of CPUIDInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardingCost_Base", (value)) +} + +// GetCPUIDInstructionsForwardingCost_Base gets the value of CPUIDInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsPersec sets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUIDInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsPersec", (value)) +} + +// GetCPUIDInstructionsPersec gets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUIDInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUWaitTimePerDispatch sets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUWaitTimePerDispatch(value uint64) (err error) { + return instance.SetProperty("CPUWaitTimePerDispatch", (value)) +} + +// GetCPUWaitTimePerDispatch gets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUWaitTimePerDispatch() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUWaitTimePerDispatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUWaitTimePerDispatch_Base sets the value of CPUWaitTimePerDispatch_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyCPUWaitTimePerDispatch_Base(value uint64) (err error) { + return instance.SetProperty("CPUWaitTimePerDispatch_Base", (value)) +} + +// GetCPUWaitTimePerDispatch_Base gets the value of CPUWaitTimePerDispatch_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyCPUWaitTimePerDispatch_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUWaitTimePerDispatch_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesCost sets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesCost", (value)) +} + +// GetDebugRegisterAccessesCost gets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesCost_Base sets the value of DebugRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesCost_Base(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesCost_Base", (value)) +} + +// GetDebugRegisterAccessesCost_Base gets the value of DebugRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardedPersec sets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardedPersec", (value)) +} + +// GetDebugRegisterAccessesForwardedPersec gets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardingCost sets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardingCost", (value)) +} + +// GetDebugRegisterAccessesForwardingCost gets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardingCost_Base sets the value of DebugRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardingCost_Base", (value)) +} + +// GetDebugRegisterAccessesForwardingCost_Base gets the value of DebugRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesPersec sets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyDebugRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesPersec", (value)) +} + +// GetDebugRegisterAccessesPersec gets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyDebugRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsCost sets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsCost", (value)) +} + +// GetEmulatedInstructionsCost gets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsCost_Base sets the value of EmulatedInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsCost_Base", (value)) +} + +// GetEmulatedInstructionsCost_Base gets the value of EmulatedInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardedPersec sets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardedPersec", (value)) +} + +// GetEmulatedInstructionsForwardedPersec gets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardingCost sets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardingCost", (value)) +} + +// GetEmulatedInstructionsForwardingCost gets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardingCost_Base sets the value of EmulatedInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardingCost_Base", (value)) +} + +// GetEmulatedInstructionsForwardingCost_Base gets the value of EmulatedInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsPersec sets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyEmulatedInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsPersec", (value)) +} + +// GetEmulatedInstructionsPersec gets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyEmulatedInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallInterceptMessagesPersec sets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExtendedHypercallInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallInterceptMessagesPersec", (value)) +} + +// GetExtendedHypercallInterceptMessagesPersec gets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExtendedHypercallInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallsPersec sets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExtendedHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallsPersec", (value)) +} + +// GetExtendedHypercallsPersec gets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExtendedHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsCost sets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsCost(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsCost", (value)) +} + +// GetExternalInterruptsCost gets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsCost_Base sets the value of ExternalInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsCost_Base(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsCost_Base", (value)) +} + +// GetExternalInterruptsCost_Base gets the value of ExternalInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsForwardedPersec sets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsForwardedPersec", (value)) +} + +// GetExternalInterruptsForwardedPersec gets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsPersec sets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyExternalInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsPersec", (value)) +} + +// GetExternalInterruptsPersec gets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyExternalInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressListHypercallsPersec sets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyFlushPhysicalAddressListHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressListHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressListHypercallsPersec gets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyFlushPhysicalAddressListHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressListHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressSpaceHypercallsPersec sets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyFlushPhysicalAddressSpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressSpaceHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressSpaceHypercallsPersec gets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyFlushPhysicalAddressSpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressSpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalGVARangeFlushesPersec sets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalGVARangeFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalGVARangeFlushesPersec", (value)) +} + +// GetGlobalGVARangeFlushesPersec gets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalGVARangeFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalGVARangeFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushCost sets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushCost", (value)) +} + +// GetGlobalIOTLBFlushCost gets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushCost_Base sets the value of GlobalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalIOTLBFlushCost_Base(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushCost_Base", (value)) +} + +// GetGlobalIOTLBFlushCost_Base gets the value of GlobalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalIOTLBFlushCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushesPersec sets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGlobalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushesPersec", (value)) +} + +// GetGlobalIOTLBFlushesPersec gets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGlobalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceHypercallsPersec sets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGPASpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceHypercallsPersec", (value)) +} + +// GetGPASpaceHypercallsPersec gets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGPASpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGuestPageTableMapsPersec sets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyGuestPageTableMapsPersec(value uint64) (err error) { + return instance.SetProperty("GuestPageTableMapsPersec", (value)) +} + +// GetGuestPageTableMapsPersec gets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyGuestPageTableMapsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GuestPageTableMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHardwareInterruptsPersec sets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHardwareInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("HardwareInterruptsPersec", (value)) +} + +// GetHardwareInterruptsPersec gets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHardwareInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HardwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsCost sets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsCost", (value)) +} + +// GetHLTInstructionsCost gets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsCost_Base sets the value of HLTInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsCost_Base", (value)) +} + +// GetHLTInstructionsCost_Base gets the value of HLTInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardedPersec sets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardedPersec", (value)) +} + +// GetHLTInstructionsForwardedPersec gets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardingCost sets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardingCost", (value)) +} + +// GetHLTInstructionsForwardingCost gets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardingCost_Base sets the value of HLTInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardingCost_Base", (value)) +} + +// GetHLTInstructionsForwardingCost_Base gets the value of HLTInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsPersec sets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHLTInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsPersec", (value)) +} + +// GetHLTInstructionsPersec gets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHLTInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsCost sets the value of HypercallsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsCost(value uint64) (err error) { + return instance.SetProperty("HypercallsCost", (value)) +} + +// GetHypercallsCost gets the value of HypercallsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsCost_Base sets the value of HypercallsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsCost_Base(value uint64) (err error) { + return instance.SetProperty("HypercallsCost_Base", (value)) +} + +// GetHypercallsCost_Base gets the value of HypercallsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardedPersec sets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardedPersec", (value)) +} + +// GetHypercallsForwardedPersec gets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardingCost sets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardingCost", (value)) +} + +// GetHypercallsForwardingCost gets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardingCost_Base sets the value of HypercallsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardingCost_Base", (value)) +} + +// GetHypercallsForwardingCost_Base gets the value of HypercallsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsPersec sets the value of HypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsPersec", (value)) +} + +// GetHypercallsPersec gets the value of HypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextEmulationInterceptsPersec sets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptAllContextEmulationInterceptsPersec gets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextInstructionEmulationCost sets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextInstructionEmulationCost", (value)) +} + +// GetInvEptAllContextInstructionEmulationCost gets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextInstructionEmulationCost_Base sets the value of InvEptAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptAllContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextInstructionEmulationCost_Base", (value)) +} + +// GetInvEptAllContextInstructionEmulationCost_Base gets the value of InvEptAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptAllContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextEmulationInterceptsPersec sets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptSingleContextEmulationInterceptsPersec gets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextInstructionEmulationCost sets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextInstructionEmulationCost", (value)) +} + +// GetInvEptSingleContextInstructionEmulationCost gets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextInstructionEmulationCost_Base sets the value of InvEptSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvEptSingleContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextInstructionEmulationCost_Base", (value)) +} + +// GetInvEptSingleContextInstructionEmulationCost_Base gets the value of InvEptSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvEptSingleContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextEmulationInterceptsPersec sets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidAllContextEmulationInterceptsPersec gets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextInstructionEmulationCost sets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextInstructionEmulationCost", (value)) +} + +// GetInvVpidAllContextInstructionEmulationCost gets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextInstructionEmulationCost_Base sets the value of InvVpidAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidAllContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextInstructionEmulationCost_Base", (value)) +} + +// GetInvVpidAllContextInstructionEmulationCost_Base gets the value of InvVpidAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidAllContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressEmulationInterceptsPersec sets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleAddressEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleAddressEmulationInterceptsPersec gets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleAddressEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressInstructionEmulationCost sets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleAddressInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleAddressInstructionEmulationCost gets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleAddressInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressInstructionEmulationCost_Base sets the value of InvVpidSingleAddressInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleAddressInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressInstructionEmulationCost_Base", (value)) +} + +// GetInvVpidSingleAddressInstructionEmulationCost_Base gets the value of InvVpidSingleAddressInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleAddressInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextEmulationInterceptsPersec sets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleContextEmulationInterceptsPersec gets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextInstructionEmulationCost sets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleContextInstructionEmulationCost gets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextInstructionEmulationCost_Base sets the value of InvVpidSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyInvVpidSingleContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextInstructionEmulationCost_Base", (value)) +} + +// GetInvVpidSingleContextInstructionEmulationCost_Base gets the value of InvVpidSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyInvVpidSingleContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsCost sets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsCost", (value)) +} + +// GetIOInstructionsCost gets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsCost_Base sets the value of IOInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("IOInstructionsCost_Base", (value)) +} + +// GetIOInstructionsCost_Base gets the value of IOInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardedPersec sets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardedPersec", (value)) +} + +// GetIOInstructionsForwardedPersec gets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardingCost sets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardingCost", (value)) +} + +// GetIOInstructionsForwardingCost gets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardingCost_Base sets the value of IOInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardingCost_Base", (value)) +} + +// GetIOInstructionsForwardingCost_Base gets the value of IOInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsPersec sets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsPersec", (value)) +} + +// GetIOInstructionsPersec gets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInterceptMessagesPersec sets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyIOInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("IOInterceptMessagesPersec", (value)) +} + +// GetIOInterceptMessagesPersec gets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyIOInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLargePageTLBFillsPersec sets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLargePageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("LargePageTLBFillsPersec", (value)) +} + +// GetLargePageTLBFillsPersec gets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLargePageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LargePageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalFlushedGVARangesPersec sets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalFlushedGVARangesPersec(value uint64) (err error) { + return instance.SetProperty("LocalFlushedGVARangesPersec", (value)) +} + +// GetLocalFlushedGVARangesPersec gets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalFlushedGVARangesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalFlushedGVARangesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushCost sets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushCost", (value)) +} + +// GetLocalIOTLBFlushCost gets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushCost_Base sets the value of LocalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalIOTLBFlushCost_Base(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushCost_Base", (value)) +} + +// GetLocalIOTLBFlushCost_Base gets the value of LocalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalIOTLBFlushCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushesPersec sets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLocalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushesPersec", (value)) +} + +// GetLocalIOTLBFlushesPersec gets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLocalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorDispatchesPersec sets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLogicalProcessorDispatchesPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorDispatchesPersec", (value)) +} + +// GetLogicalProcessorDispatchesPersec gets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLogicalProcessorDispatchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorDispatchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorHypercallsPersec sets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLogicalProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorHypercallsPersec", (value)) +} + +// GetLogicalProcessorHypercallsPersec gets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLogicalProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorMigrationsPersec sets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLogicalProcessorMigrationsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorMigrationsPersec", (value)) +} + +// GetLogicalProcessorMigrationsPersec gets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLogicalProcessorMigrationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorMigrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLongSpinWaitHypercallsPersec sets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyLongSpinWaitHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LongSpinWaitHypercallsPersec", (value)) +} + +// GetLongSpinWaitHypercallsPersec gets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyLongSpinWaitHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LongSpinWaitHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMBECNestedPageTableSwitchesPersec sets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMBECNestedPageTableSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("MBECNestedPageTableSwitchesPersec", (value)) +} + +// GetMBECNestedPageTableSwitchesPersec gets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMBECNestedPageTableSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MBECNestedPageTableSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryInterceptMessagesPersec sets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMemoryInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("MemoryInterceptMessagesPersec", (value)) +} + +// GetMemoryInterceptMessagesPersec gets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMemoryInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesCost sets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesCost", (value)) +} + +// GetMSRAccessesCost gets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesCost_Base sets the value of MSRAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesCost_Base(value uint64) (err error) { + return instance.SetProperty("MSRAccessesCost_Base", (value)) +} + +// GetMSRAccessesCost_Base gets the value of MSRAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardedPersec sets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardedPersec", (value)) +} + +// GetMSRAccessesForwardedPersec gets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardingCost sets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardingCost", (value)) +} + +// GetMSRAccessesForwardingCost gets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardingCost_Base sets the value of MSRAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardingCost_Base", (value)) +} + +// GetMSRAccessesForwardingCost_Base gets the value of MSRAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesPersec sets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMSRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesPersec", (value)) +} + +// GetMSRAccessesPersec gets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMSRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsCost sets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsCost", (value)) +} + +// GetMWAITInstructionsCost gets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsCost_Base sets the value of MWAITInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsCost_Base", (value)) +} + +// GetMWAITInstructionsCost_Base gets the value of MWAITInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardedPersec sets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardedPersec", (value)) +} + +// GetMWAITInstructionsForwardedPersec gets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardingCost sets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardingCost", (value)) +} + +// GetMWAITInstructionsForwardingCost gets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardingCost_Base sets the value of MWAITInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardingCost_Base", (value)) +} + +// GetMWAITInstructionsForwardingCost_Base gets the value of MWAITInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsPersec sets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyMWAITInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsPersec", (value)) +} + +// GetMWAITInstructionsPersec gets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyMWAITInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsCost sets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsCost", (value)) +} + +// GetNestedPageFaultInterceptsCost gets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsCost_Base sets the value of NestedPageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedPageFaultInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsCost_Base", (value)) +} + +// GetNestedPageFaultInterceptsCost_Base gets the value of NestedPageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedPageFaultInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsPersec sets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsPersec", (value)) +} + +// GetNestedPageFaultInterceptsPersec gets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsCost sets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATHardPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsCost", (value)) +} + +// GetNestedSLATHardPageFaultsCost gets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATHardPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsCost_Base sets the value of NestedSLATHardPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATHardPageFaultsCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsCost_Base", (value)) +} + +// GetNestedSLATHardPageFaultsCost_Base gets the value of NestedSLATHardPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATHardPageFaultsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsPersec sets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATHardPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsPersec", (value)) +} + +// GetNestedSLATHardPageFaultsPersec gets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATHardPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsCost sets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsCost", (value)) +} + +// GetNestedSLATSoftPageFaultsCost gets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsCost_Base sets the value of NestedSLATSoftPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsCost_Base", (value)) +} + +// GetNestedSLATSoftPageFaultsCost_Base gets the value of NestedSLATSoftPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsPersec sets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsPersec", (value)) +} + +// GetNestedSLATSoftPageFaultsPersec gets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableEvictionsPersec sets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedTLBPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableEvictionsPersec", (value)) +} + +// GetNestedTLBPageTableEvictionsPersec gets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedTLBPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableReclamationsPersec sets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedTLBPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableReclamationsPersec", (value)) +} + +// GetNestedTLBPageTableReclamationsPersec gets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedTLBPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesCost sets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedVMEntriesCost(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesCost", (value)) +} + +// GetNestedVMEntriesCost gets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedVMEntriesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesCost_Base sets the value of NestedVMEntriesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedVMEntriesCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesCost_Base", (value)) +} + +// GetNestedVMEntriesCost_Base gets the value of NestedVMEntriesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedVMEntriesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesPersec sets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyNestedVMEntriesPersec(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesPersec", (value)) +} + +// GetNestedVMEntriesPersec gets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyNestedVMEntriesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherHypercallsPersec sets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("OtherHypercallsPersec", (value)) +} + +// GetOtherHypercallsPersec gets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsCost sets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsCost", (value)) +} + +// GetOtherInterceptsCost gets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsCost_Base sets the value of OtherInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsCost_Base", (value)) +} + +// GetOtherInterceptsCost_Base gets the value of OtherInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardedPersec sets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardedPersec", (value)) +} + +// GetOtherInterceptsForwardedPersec gets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardingCost sets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardingCost", (value)) +} + +// GetOtherInterceptsForwardingCost gets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardingCost_Base sets the value of OtherInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardingCost_Base", (value)) +} + +// GetOtherInterceptsForwardingCost_Base gets the value of OtherInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsPersec sets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsPersec", (value)) +} + +// GetOtherInterceptsPersec gets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherMessagesPersec sets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherMessagesPersec(value uint64) (err error) { + return instance.SetProperty("OtherMessagesPersec", (value)) +} + +// GetOtherMessagesPersec gets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherReflectedGuestExceptionsPersec sets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyOtherReflectedGuestExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("OtherReflectedGuestExceptionsPersec", (value)) +} + +// GetOtherReflectedGuestExceptionsPersec gets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyOtherReflectedGuestExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherReflectedGuestExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsCost sets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsCost", (value)) +} + +// GetPageFaultInterceptsCost gets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsCost_Base sets the value of PageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsCost_Base", (value)) +} + +// GetPageFaultInterceptsCost_Base gets the value of PageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardedPersec sets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardedPersec", (value)) +} + +// GetPageFaultInterceptsForwardedPersec gets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardingCost sets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardingCost", (value)) +} + +// GetPageFaultInterceptsForwardingCost gets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardingCost_Base sets the value of PageFaultInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardingCost_Base", (value)) +} + +// GetPageFaultInterceptsForwardingCost_Base gets the value of PageFaultInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsPersec sets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsPersec", (value)) +} + +// GetPageFaultInterceptsPersec gets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsCost sets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsCost", (value)) +} + +// GetPageInvalidationsCost gets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsCost_Base sets the value of PageInvalidationsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsCost_Base(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsCost_Base", (value)) +} + +// GetPageInvalidationsCost_Base gets the value of PageInvalidationsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardedPersec sets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardedPersec", (value)) +} + +// GetPageInvalidationsForwardedPersec gets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardingCost sets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardingCost", (value)) +} + +// GetPageInvalidationsForwardingCost gets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardingCost_Base sets the value of PageInvalidationsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardingCost_Base", (value)) +} + +// GetPageInvalidationsForwardingCost_Base gets the value of PageInvalidationsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsPersec sets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageInvalidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsPersec", (value)) +} + +// GetPageInvalidationsPersec gets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageInvalidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageScansPersec sets the value of PageScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageScansPersec(value uint64) (err error) { + return instance.SetProperty("PageScansPersec", (value)) +} + +// GetPageScansPersec gets the value of PageScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableAllocationsPersec sets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableAllocationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableAllocationsPersec", (value)) +} + +// GetPageTableAllocationsPersec gets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableAllocationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableAllocationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableEvictionsPersec sets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableEvictionsPersec", (value)) +} + +// GetPageTableEvictionsPersec gets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableReclamationsPersec sets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableReclamationsPersec", (value)) +} + +// GetPageTableReclamationsPersec gets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableResetsPersec sets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableResetsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableResetsPersec", (value)) +} + +// GetPageTableResetsPersec gets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableResetsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableResetsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableValidationsPersec sets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableValidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableValidationsPersec", (value)) +} + +// GetPageTableValidationsPersec gets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableValidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableValidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableWriteInterceptsPersec sets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPageTableWriteInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableWriteInterceptsPersec", (value)) +} + +// GetPageTableWriteInterceptsPersec gets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPageTableWriteInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableWriteInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsCost sets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsCost", (value)) +} + +// GetPendingInterruptsCost gets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsCost_Base sets the value of PendingInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsCost_Base(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsCost_Base", (value)) +} + +// GetPendingInterruptsCost_Base gets the value of PendingInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardedPersec sets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardedPersec", (value)) +} + +// GetPendingInterruptsForwardedPersec gets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardingCost sets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardingCost", (value)) +} + +// GetPendingInterruptsForwardingCost gets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardingCost_Base sets the value of PendingInterruptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardingCost_Base", (value)) +} + +// GetPendingInterruptsForwardingCost_Base gets the value of PendingInterruptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsPersec sets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPendingInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsPersec", (value)) +} + +// GetPendingInterruptsPersec gets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPendingInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime sets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentGuestRunTime(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime", (value)) +} + +// GetPercentGuestRunTime gets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentGuestRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime_Base sets the value of PercentGuestRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentGuestRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime_Base", (value)) +} + +// GetPercentGuestRunTime_Base gets the value of PercentGuestRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentGuestRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime sets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentHypervisorRunTime(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime", (value)) +} + +// GetPercentHypervisorRunTime gets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentHypervisorRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime_Base sets the value of PercentHypervisorRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentHypervisorRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime_Base", (value)) +} + +// GetPercentHypervisorRunTime_Base gets the value of PercentHypervisorRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentHypervisorRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentRemoteRunTime sets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentRemoteRunTime(value uint64) (err error) { + return instance.SetProperty("PercentRemoteRunTime", (value)) +} + +// GetPercentRemoteRunTime gets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentRemoteRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentRemoteRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentRemoteRunTime_Base sets the value of PercentRemoteRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentRemoteRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentRemoteRunTime_Base", (value)) +} + +// GetPercentRemoteRunTime_Base gets the value of PercentRemoteRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentRemoteRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentRemoteRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime sets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentTotalRunTime(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime", (value)) +} + +// GetPercentTotalRunTime gets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentTotalRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime_Base sets the value of PercentTotalRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPercentTotalRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime_Base", (value)) +} + +// GetPercentTotalRunTime_Base gets the value of PercentTotalRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPercentTotalRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptNotificationsPersec sets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPostedInterruptNotificationsPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptNotificationsPersec", (value)) +} + +// GetPostedInterruptNotificationsPersec gets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPostedInterruptNotificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptNotificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptScansPersec sets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyPostedInterruptScansPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptScansPersec", (value)) +} + +// GetPostedInterruptScansPersec gets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyPostedInterruptScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReflectedGuestPageFaultsPersec sets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyReflectedGuestPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("ReflectedGuestPageFaultsPersec", (value)) +} + +// GetReflectedGuestPageFaultsPersec gets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyReflectedGuestPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReflectedGuestPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSmallPageTLBFillsPersec sets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertySmallPageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("SmallPageTLBFillsPersec", (value)) +} + +// GetSmallPageTLBFillsPersec gets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertySmallPageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SmallPageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptHypercallsPersec sets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertySyntheticInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptHypercallsPersec", (value)) +} + +// GetSyntheticInterruptHypercallsPersec gets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertySyntheticInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptsPersec sets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertySyntheticInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptsPersec", (value)) +} + +// GetSyntheticInterruptsPersec gets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertySyntheticInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsCost sets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalInterceptsCost(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsCost", (value)) +} + +// GetTotalInterceptsCost gets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsCost_Base sets the value of TotalInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsCost_Base", (value)) +} + +// GetTotalInterceptsCost_Base gets the value of TotalInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsPersec sets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsPersec", (value)) +} + +// GetTotalInterceptsPersec gets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalMessagesPersec sets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalMessagesPersec(value uint64) (err error) { + return instance.SetProperty("TotalMessagesPersec", (value)) +} + +// GetTotalMessagesPersec gets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulatedPersec sets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulatedPersec(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulatedPersec", (value)) +} + +// GetTotalVirtualizationInstructionsEmulatedPersec gets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulatedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulationCost sets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulationCost(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulationCost", (value)) +} + +// GetTotalVirtualizationInstructionsEmulationCost gets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulationCost_Base sets the value of TotalVirtualizationInstructionsEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulationCost_Base", (value)) +} + +// GetTotalVirtualizationInstructionsEmulationCost_Base gets the value of TotalVirtualizationInstructionsEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptHypercallsPersec sets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptHypercallsPersec", (value)) +} + +// GetVirtualInterruptHypercallsPersec gets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptsPersec sets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptsPersec", (value)) +} + +// GetVirtualInterruptsPersec gets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualMMUHypercallsPersec sets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualMMUHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualMMUHypercallsPersec", (value)) +} + +// GetVirtualMMUHypercallsPersec gets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualMMUHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualMMUHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessorHypercallsPersec sets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVirtualProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualProcessorHypercallsPersec", (value)) +} + +// GetVirtualProcessorHypercallsPersec gets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVirtualProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEAREmulationInterceptsPersec sets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMCLEAREmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMCLEAREmulationInterceptsPersec", (value)) +} + +// GetVMCLEAREmulationInterceptsPersec gets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMCLEAREmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEAREmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEARInstructionEmulationCost sets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMCLEARInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMCLEARInstructionEmulationCost", (value)) +} + +// GetVMCLEARInstructionEmulationCost gets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMCLEARInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEARInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEARInstructionEmulationCost_Base sets the value of VMCLEARInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMCLEARInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMCLEARInstructionEmulationCost_Base", (value)) +} + +// GetVMCLEARInstructionEmulationCost_Base gets the value of VMCLEARInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMCLEARInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEARInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDEmulationInterceptsPersec sets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRLDEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRLDEmulationInterceptsPersec", (value)) +} + +// GetVMPTRLDEmulationInterceptsPersec gets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRLDEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDInstructionEmulationCost sets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRLDInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRLDInstructionEmulationCost", (value)) +} + +// GetVMPTRLDInstructionEmulationCost gets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRLDInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDInstructionEmulationCost_Base sets the value of VMPTRLDInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRLDInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMPTRLDInstructionEmulationCost_Base", (value)) +} + +// GetVMPTRLDInstructionEmulationCost_Base gets the value of VMPTRLDInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRLDInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTEmulationInterceptsPersec sets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRSTEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRSTEmulationInterceptsPersec", (value)) +} + +// GetVMPTRSTEmulationInterceptsPersec gets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRSTEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTInstructionEmulationCost sets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRSTInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRSTInstructionEmulationCost", (value)) +} + +// GetVMPTRSTInstructionEmulationCost gets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRSTInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTInstructionEmulationCost_Base sets the value of VMPTRSTInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMPTRSTInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMPTRSTInstructionEmulationCost_Base", (value)) +} + +// GetVMPTRSTInstructionEmulationCost_Base gets the value of VMPTRSTInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMPTRSTInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADEmulationInterceptsPersec sets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMREADEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMREADEmulationInterceptsPersec", (value)) +} + +// GetVMREADEmulationInterceptsPersec gets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMREADEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADInstructionEmulationCost sets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMREADInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMREADInstructionEmulationCost", (value)) +} + +// GetVMREADInstructionEmulationCost gets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMREADInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADInstructionEmulationCost_Base sets the value of VMREADInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMREADInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMREADInstructionEmulationCost_Base", (value)) +} + +// GetVMREADInstructionEmulationCost_Base gets the value of VMREADInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMREADInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEEmulationInterceptsPersec sets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMWRITEEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMWRITEEmulationInterceptsPersec", (value)) +} + +// GetVMWRITEEmulationInterceptsPersec gets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMWRITEEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEInstructionEmulationCost sets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMWRITEInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMWRITEInstructionEmulationCost", (value)) +} + +// GetVMWRITEInstructionEmulationCost gets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMWRITEInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEInstructionEmulationCost_Base sets the value of VMWRITEInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMWRITEInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMWRITEInstructionEmulationCost_Base", (value)) +} + +// GetVMWRITEInstructionEmulationCost_Base gets the value of VMWRITEInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMWRITEInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFEmulationInterceptsPersec sets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXOFFEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXOFFEmulationInterceptsPersec", (value)) +} + +// GetVMXOFFEmulationInterceptsPersec gets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXOFFEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFInstructionEmulationCost sets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXOFFInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXOFFInstructionEmulationCost", (value)) +} + +// GetVMXOFFInstructionEmulationCost gets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXOFFInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFInstructionEmulationCost_Base sets the value of VMXOFFInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXOFFInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMXOFFInstructionEmulationCost_Base", (value)) +} + +// GetVMXOFFInstructionEmulationCost_Base gets the value of VMXOFFInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXOFFInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONEmulationInterceptsPersec sets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXONEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXONEmulationInterceptsPersec", (value)) +} + +// GetVMXONEmulationInterceptsPersec gets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXONEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONInstructionEmulationCost sets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXONInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXONInstructionEmulationCost", (value)) +} + +// GetVMXONInstructionEmulationCost gets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXONInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONInstructionEmulationCost_Base sets the value of VMXONInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) SetPropertyVMXONInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMXONInstructionEmulationCost_Base", (value)) +} + +// GetVMXONInstructionEmulationCost_Base gets the value of VMXONInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorRootVirtualProcessor) GetPropertyVMXONInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor.go new file mode 100644 index 00000000..862979b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor.go @@ -0,0 +1,6080 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor struct +type Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor struct { + *Win32_PerfRawData + + // + AddressDomainFlushesPersec uint64 + + // + AddressSpaceEvictionsPersec uint64 + + // + AddressSpaceFlushesPersec uint64 + + // + AddressSpaceSwitchesPersec uint64 + + // + APICEOIAccessesPersec uint64 + + // + APICIPIsSentPersec uint64 + + // + APICMMIOAccessesPersec uint64 + + // + APICSelfIPIsSentPersec uint64 + + // + APICTPRAccessesPersec uint64 + + // + ControlRegisterAccessesCost uint64 + + // + ControlRegisterAccessesCost_Base uint64 + + // + ControlRegisterAccessesForwardedPersec uint64 + + // + ControlRegisterAccessesForwardingCost uint64 + + // + ControlRegisterAccessesForwardingCost_Base uint64 + + // + ControlRegisterAccessesPersec uint64 + + // + CPUIDInstructionsCost uint64 + + // + CPUIDInstructionsCost_Base uint64 + + // + CPUIDInstructionsForwardedPersec uint64 + + // + CPUIDInstructionsForwardingCost uint64 + + // + CPUIDInstructionsForwardingCost_Base uint64 + + // + CPUIDInstructionsPersec uint64 + + // + CPUWaitTimePerDispatch uint64 + + // + CPUWaitTimePerDispatch_Base uint64 + + // + DebugRegisterAccessesCost uint64 + + // + DebugRegisterAccessesCost_Base uint64 + + // + DebugRegisterAccessesForwardedPersec uint64 + + // + DebugRegisterAccessesForwardingCost uint64 + + // + DebugRegisterAccessesForwardingCost_Base uint64 + + // + DebugRegisterAccessesPersec uint64 + + // + EmulatedInstructionsCost uint64 + + // + EmulatedInstructionsCost_Base uint64 + + // + EmulatedInstructionsForwardedPersec uint64 + + // + EmulatedInstructionsForwardingCost uint64 + + // + EmulatedInstructionsForwardingCost_Base uint64 + + // + EmulatedInstructionsPersec uint64 + + // + ExtendedHypercallInterceptMessagesPersec uint64 + + // + ExtendedHypercallsPersec uint64 + + // + ExternalInterruptsCost uint64 + + // + ExternalInterruptsCost_Base uint64 + + // + ExternalInterruptsForwardedPersec uint64 + + // + ExternalInterruptsPersec uint64 + + // + FlushPhysicalAddressListHypercallsPersec uint64 + + // + FlushPhysicalAddressSpaceHypercallsPersec uint64 + + // + GlobalGVARangeFlushesPersec uint64 + + // + GlobalIOTLBFlushCost uint64 + + // + GlobalIOTLBFlushCost_Base uint64 + + // + GlobalIOTLBFlushesPersec uint64 + + // + GPASpaceHypercallsPersec uint64 + + // + GuestPageTableMapsPersec uint64 + + // + HardwareInterruptsPersec uint64 + + // + HLTInstructionsCost uint64 + + // + HLTInstructionsCost_Base uint64 + + // + HLTInstructionsForwardedPersec uint64 + + // + HLTInstructionsForwardingCost uint64 + + // + HLTInstructionsForwardingCost_Base uint64 + + // + HLTInstructionsPersec uint64 + + // + HypercallsCost uint64 + + // + HypercallsCost_Base uint64 + + // + HypercallsForwardedPersec uint64 + + // + HypercallsForwardingCost uint64 + + // + HypercallsForwardingCost_Base uint64 + + // + HypercallsPersec uint64 + + // + InvEptAllContextEmulationInterceptsPersec uint64 + + // + InvEptAllContextInstructionEmulationCost uint64 + + // + InvEptAllContextInstructionEmulationCost_Base uint64 + + // + InvEptSingleContextEmulationInterceptsPersec uint64 + + // + InvEptSingleContextInstructionEmulationCost uint64 + + // + InvEptSingleContextInstructionEmulationCost_Base uint64 + + // + InvVpidAllContextEmulationInterceptsPersec uint64 + + // + InvVpidAllContextInstructionEmulationCost uint64 + + // + InvVpidAllContextInstructionEmulationCost_Base uint64 + + // + InvVpidSingleAddressEmulationInterceptsPersec uint64 + + // + InvVpidSingleAddressInstructionEmulationCost uint64 + + // + InvVpidSingleAddressInstructionEmulationCost_Base uint64 + + // + InvVpidSingleContextEmulationInterceptsPersec uint64 + + // + InvVpidSingleContextInstructionEmulationCost uint64 + + // + InvVpidSingleContextInstructionEmulationCost_Base uint64 + + // + IOInstructionsCost uint64 + + // + IOInstructionsCost_Base uint64 + + // + IOInstructionsForwardedPersec uint64 + + // + IOInstructionsForwardingCost uint64 + + // + IOInstructionsForwardingCost_Base uint64 + + // + IOInstructionsPersec uint64 + + // + IOInterceptMessagesPersec uint64 + + // + LargePageTLBFillsPersec uint64 + + // + LocalFlushedGVARangesPersec uint64 + + // + LocalIOTLBFlushCost uint64 + + // + LocalIOTLBFlushCost_Base uint64 + + // + LocalIOTLBFlushesPersec uint64 + + // + LogicalProcessorDispatchesPersec uint64 + + // + LogicalProcessorHypercallsPersec uint64 + + // + LogicalProcessorMigrationsPersec uint64 + + // + LongSpinWaitHypercallsPersec uint64 + + // + MBECNestedPageTableSwitchesPersec uint64 + + // + MemoryInterceptMessagesPersec uint64 + + // + MSRAccessesCost uint64 + + // + MSRAccessesCost_Base uint64 + + // + MSRAccessesForwardedPersec uint64 + + // + MSRAccessesForwardingCost uint64 + + // + MSRAccessesForwardingCost_Base uint64 + + // + MSRAccessesPersec uint64 + + // + MWAITInstructionsCost uint64 + + // + MWAITInstructionsCost_Base uint64 + + // + MWAITInstructionsForwardedPersec uint64 + + // + MWAITInstructionsForwardingCost uint64 + + // + MWAITInstructionsForwardingCost_Base uint64 + + // + MWAITInstructionsPersec uint64 + + // + NestedPageFaultInterceptsCost uint64 + + // + NestedPageFaultInterceptsCost_Base uint64 + + // + NestedPageFaultInterceptsPersec uint64 + + // + NestedSLATHardPageFaultsCost uint64 + + // + NestedSLATHardPageFaultsCost_Base uint64 + + // + NestedSLATHardPageFaultsPersec uint64 + + // + NestedSLATSoftPageFaultsCost uint64 + + // + NestedSLATSoftPageFaultsCost_Base uint64 + + // + NestedSLATSoftPageFaultsPersec uint64 + + // + NestedTLBPageTableEvictionsPersec uint64 + + // + NestedTLBPageTableReclamationsPersec uint64 + + // + NestedVMEntriesCost uint64 + + // + NestedVMEntriesCost_Base uint64 + + // + NestedVMEntriesPersec uint64 + + // + OtherHypercallsPersec uint64 + + // + OtherInterceptsCost uint64 + + // + OtherInterceptsCost_Base uint64 + + // + OtherInterceptsForwardedPersec uint64 + + // + OtherInterceptsForwardingCost uint64 + + // + OtherInterceptsForwardingCost_Base uint64 + + // + OtherInterceptsPersec uint64 + + // + OtherMessagesPersec uint64 + + // + OtherReflectedGuestExceptionsPersec uint64 + + // + PageFaultInterceptsCost uint64 + + // + PageFaultInterceptsCost_Base uint64 + + // + PageFaultInterceptsForwardedPersec uint64 + + // + PageFaultInterceptsForwardingCost uint64 + + // + PageFaultInterceptsForwardingCost_Base uint64 + + // + PageFaultInterceptsPersec uint64 + + // + PageInvalidationsCost uint64 + + // + PageInvalidationsCost_Base uint64 + + // + PageInvalidationsForwardedPersec uint64 + + // + PageInvalidationsForwardingCost uint64 + + // + PageInvalidationsForwardingCost_Base uint64 + + // + PageInvalidationsPersec uint64 + + // + PageScansPersec uint64 + + // + PageTableAllocationsPersec uint64 + + // + PageTableEvictionsPersec uint64 + + // + PageTableReclamationsPersec uint64 + + // + PageTableResetsPersec uint64 + + // + PageTableValidationsPersec uint64 + + // + PageTableWriteInterceptsPersec uint64 + + // + PendingInterruptsCost uint64 + + // + PendingInterruptsCost_Base uint64 + + // + PendingInterruptsForwardedPersec uint64 + + // + PendingInterruptsForwardingCost uint64 + + // + PendingInterruptsForwardingCost_Base uint64 + + // + PendingInterruptsPersec uint64 + + // + PercentGuestRunTime uint64 + + // + PercentGuestRunTime_Base uint64 + + // + PercentHypervisorRunTime uint64 + + // + PercentHypervisorRunTime_Base uint64 + + // + PercentRemoteRunTime uint64 + + // + PercentRemoteRunTime_Base uint64 + + // + PercentTotalRunTime uint64 + + // + PercentTotalRunTime_Base uint64 + + // + PostedInterruptNotificationsPersec uint64 + + // + PostedInterruptScansPersec uint64 + + // + ReflectedGuestPageFaultsPersec uint64 + + // + SmallPageTLBFillsPersec uint64 + + // + SyntheticInterruptHypercallsPersec uint64 + + // + SyntheticInterruptsPersec uint64 + + // + TotalInterceptsCost uint64 + + // + TotalInterceptsCost_Base uint64 + + // + TotalInterceptsPersec uint64 + + // + TotalMessagesPersec uint64 + + // + TotalVirtualizationInstructionsEmulatedPersec uint64 + + // + TotalVirtualizationInstructionsEmulationCost uint64 + + // + TotalVirtualizationInstructionsEmulationCost_Base uint64 + + // + VirtualInterruptHypercallsPersec uint64 + + // + VirtualInterruptsPersec uint64 + + // + VirtualMMUHypercallsPersec uint64 + + // + VirtualProcessorHypercallsPersec uint64 + + // + VMCLEAREmulationInterceptsPersec uint64 + + // + VMCLEARInstructionEmulationCost uint64 + + // + VMCLEARInstructionEmulationCost_Base uint64 + + // + VMPTRLDEmulationInterceptsPersec uint64 + + // + VMPTRLDInstructionEmulationCost uint64 + + // + VMPTRLDInstructionEmulationCost_Base uint64 + + // + VMPTRSTEmulationInterceptsPersec uint64 + + // + VMPTRSTInstructionEmulationCost uint64 + + // + VMPTRSTInstructionEmulationCost_Base uint64 + + // + VMREADEmulationInterceptsPersec uint64 + + // + VMREADInstructionEmulationCost uint64 + + // + VMREADInstructionEmulationCost_Base uint64 + + // + VMWRITEEmulationInterceptsPersec uint64 + + // + VMWRITEInstructionEmulationCost uint64 + + // + VMWRITEInstructionEmulationCost_Base uint64 + + // + VMXOFFEmulationInterceptsPersec uint64 + + // + VMXOFFInstructionEmulationCost uint64 + + // + VMXOFFInstructionEmulationCost_Base uint64 + + // + VMXONEmulationInterceptsPersec uint64 + + // + VMXONInstructionEmulationCost uint64 + + // + VMXONInstructionEmulationCost_Base uint64 +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAddressDomainFlushesPersec sets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressDomainFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressDomainFlushesPersec", (value)) +} + +// GetAddressDomainFlushesPersec gets the value of AddressDomainFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressDomainFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressDomainFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceEvictionsPersec sets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressSpaceEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceEvictionsPersec", (value)) +} + +// GetAddressSpaceEvictionsPersec gets the value of AddressSpaceEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressSpaceEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceFlushesPersec sets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressSpaceFlushesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceFlushesPersec", (value)) +} + +// GetAddressSpaceFlushesPersec gets the value of AddressSpaceFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressSpaceFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAddressSpaceSwitchesPersec sets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAddressSpaceSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("AddressSpaceSwitchesPersec", (value)) +} + +// GetAddressSpaceSwitchesPersec gets the value of AddressSpaceSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAddressSpaceSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AddressSpaceSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICEOIAccessesPersec sets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICEOIAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICEOIAccessesPersec", (value)) +} + +// GetAPICEOIAccessesPersec gets the value of APICEOIAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICEOIAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICEOIAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICIPIsSentPersec sets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICIPIsSentPersec", (value)) +} + +// GetAPICIPIsSentPersec gets the value of APICIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICMMIOAccessesPersec sets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICMMIOAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICMMIOAccessesPersec", (value)) +} + +// GetAPICMMIOAccessesPersec gets the value of APICMMIOAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICMMIOAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICMMIOAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICSelfIPIsSentPersec sets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICSelfIPIsSentPersec(value uint64) (err error) { + return instance.SetProperty("APICSelfIPIsSentPersec", (value)) +} + +// GetAPICSelfIPIsSentPersec gets the value of APICSelfIPIsSentPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICSelfIPIsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICSelfIPIsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAPICTPRAccessesPersec sets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyAPICTPRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("APICTPRAccessesPersec", (value)) +} + +// GetAPICTPRAccessesPersec gets the value of APICTPRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyAPICTPRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("APICTPRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesCost sets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesCost", (value)) +} + +// GetControlRegisterAccessesCost gets the value of ControlRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesCost_Base sets the value of ControlRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesCost_Base(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesCost_Base", (value)) +} + +// GetControlRegisterAccessesCost_Base gets the value of ControlRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardedPersec sets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardedPersec", (value)) +} + +// GetControlRegisterAccessesForwardedPersec gets the value of ControlRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardingCost sets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardingCost", (value)) +} + +// GetControlRegisterAccessesForwardingCost gets the value of ControlRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesForwardingCost_Base sets the value of ControlRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesForwardingCost_Base", (value)) +} + +// GetControlRegisterAccessesForwardingCost_Base gets the value of ControlRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlRegisterAccessesPersec sets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyControlRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("ControlRegisterAccessesPersec", (value)) +} + +// GetControlRegisterAccessesPersec gets the value of ControlRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyControlRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsCost sets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsCost", (value)) +} + +// GetCPUIDInstructionsCost gets the value of CPUIDInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsCost_Base sets the value of CPUIDInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsCost_Base", (value)) +} + +// GetCPUIDInstructionsCost_Base gets the value of CPUIDInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardedPersec sets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardedPersec", (value)) +} + +// GetCPUIDInstructionsForwardedPersec gets the value of CPUIDInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardingCost sets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardingCost", (value)) +} + +// GetCPUIDInstructionsForwardingCost gets the value of CPUIDInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsForwardingCost_Base sets the value of CPUIDInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsForwardingCost_Base", (value)) +} + +// GetCPUIDInstructionsForwardingCost_Base gets the value of CPUIDInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUIDInstructionsPersec sets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUIDInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("CPUIDInstructionsPersec", (value)) +} + +// GetCPUIDInstructionsPersec gets the value of CPUIDInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUIDInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUIDInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUWaitTimePerDispatch sets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUWaitTimePerDispatch(value uint64) (err error) { + return instance.SetProperty("CPUWaitTimePerDispatch", (value)) +} + +// GetCPUWaitTimePerDispatch gets the value of CPUWaitTimePerDispatch for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUWaitTimePerDispatch() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUWaitTimePerDispatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUWaitTimePerDispatch_Base sets the value of CPUWaitTimePerDispatch_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyCPUWaitTimePerDispatch_Base(value uint64) (err error) { + return instance.SetProperty("CPUWaitTimePerDispatch_Base", (value)) +} + +// GetCPUWaitTimePerDispatch_Base gets the value of CPUWaitTimePerDispatch_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyCPUWaitTimePerDispatch_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("CPUWaitTimePerDispatch_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesCost sets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesCost", (value)) +} + +// GetDebugRegisterAccessesCost gets the value of DebugRegisterAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesCost_Base sets the value of DebugRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesCost_Base(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesCost_Base", (value)) +} + +// GetDebugRegisterAccessesCost_Base gets the value of DebugRegisterAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardedPersec sets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardedPersec", (value)) +} + +// GetDebugRegisterAccessesForwardedPersec gets the value of DebugRegisterAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardingCost sets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardingCost", (value)) +} + +// GetDebugRegisterAccessesForwardingCost gets the value of DebugRegisterAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesForwardingCost_Base sets the value of DebugRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesForwardingCost_Base", (value)) +} + +// GetDebugRegisterAccessesForwardingCost_Base gets the value of DebugRegisterAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDebugRegisterAccessesPersec sets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyDebugRegisterAccessesPersec(value uint64) (err error) { + return instance.SetProperty("DebugRegisterAccessesPersec", (value)) +} + +// GetDebugRegisterAccessesPersec gets the value of DebugRegisterAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyDebugRegisterAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DebugRegisterAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsCost sets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsCost", (value)) +} + +// GetEmulatedInstructionsCost gets the value of EmulatedInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsCost_Base sets the value of EmulatedInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsCost_Base", (value)) +} + +// GetEmulatedInstructionsCost_Base gets the value of EmulatedInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardedPersec sets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardedPersec", (value)) +} + +// GetEmulatedInstructionsForwardedPersec gets the value of EmulatedInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardingCost sets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardingCost", (value)) +} + +// GetEmulatedInstructionsForwardingCost gets the value of EmulatedInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsForwardingCost_Base sets the value of EmulatedInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsForwardingCost_Base", (value)) +} + +// GetEmulatedInstructionsForwardingCost_Base gets the value of EmulatedInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEmulatedInstructionsPersec sets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyEmulatedInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("EmulatedInstructionsPersec", (value)) +} + +// GetEmulatedInstructionsPersec gets the value of EmulatedInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyEmulatedInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("EmulatedInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallInterceptMessagesPersec sets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExtendedHypercallInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallInterceptMessagesPersec", (value)) +} + +// GetExtendedHypercallInterceptMessagesPersec gets the value of ExtendedHypercallInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExtendedHypercallInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtendedHypercallsPersec sets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExtendedHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("ExtendedHypercallsPersec", (value)) +} + +// GetExtendedHypercallsPersec gets the value of ExtendedHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExtendedHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtendedHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsCost sets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsCost(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsCost", (value)) +} + +// GetExternalInterruptsCost gets the value of ExternalInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsCost_Base sets the value of ExternalInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsCost_Base(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsCost_Base", (value)) +} + +// GetExternalInterruptsCost_Base gets the value of ExternalInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsForwardedPersec sets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsForwardedPersec", (value)) +} + +// GetExternalInterruptsForwardedPersec gets the value of ExternalInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExternalInterruptsPersec sets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyExternalInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("ExternalInterruptsPersec", (value)) +} + +// GetExternalInterruptsPersec gets the value of ExternalInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyExternalInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExternalInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressListHypercallsPersec sets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyFlushPhysicalAddressListHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressListHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressListHypercallsPersec gets the value of FlushPhysicalAddressListHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyFlushPhysicalAddressListHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressListHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlushPhysicalAddressSpaceHypercallsPersec sets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyFlushPhysicalAddressSpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("FlushPhysicalAddressSpaceHypercallsPersec", (value)) +} + +// GetFlushPhysicalAddressSpaceHypercallsPersec gets the value of FlushPhysicalAddressSpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyFlushPhysicalAddressSpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushPhysicalAddressSpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalGVARangeFlushesPersec sets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalGVARangeFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalGVARangeFlushesPersec", (value)) +} + +// GetGlobalGVARangeFlushesPersec gets the value of GlobalGVARangeFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalGVARangeFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalGVARangeFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushCost sets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushCost", (value)) +} + +// GetGlobalIOTLBFlushCost gets the value of GlobalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushCost_Base sets the value of GlobalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalIOTLBFlushCost_Base(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushCost_Base", (value)) +} + +// GetGlobalIOTLBFlushCost_Base gets the value of GlobalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalIOTLBFlushCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGlobalIOTLBFlushesPersec sets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGlobalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("GlobalIOTLBFlushesPersec", (value)) +} + +// GetGlobalIOTLBFlushesPersec gets the value of GlobalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGlobalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GlobalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGPASpaceHypercallsPersec sets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGPASpaceHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("GPASpaceHypercallsPersec", (value)) +} + +// GetGPASpaceHypercallsPersec gets the value of GPASpaceHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGPASpaceHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GPASpaceHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGuestPageTableMapsPersec sets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyGuestPageTableMapsPersec(value uint64) (err error) { + return instance.SetProperty("GuestPageTableMapsPersec", (value)) +} + +// GetGuestPageTableMapsPersec gets the value of GuestPageTableMapsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyGuestPageTableMapsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("GuestPageTableMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHardwareInterruptsPersec sets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHardwareInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("HardwareInterruptsPersec", (value)) +} + +// GetHardwareInterruptsPersec gets the value of HardwareInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHardwareInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HardwareInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsCost sets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsCost", (value)) +} + +// GetHLTInstructionsCost gets the value of HLTInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsCost_Base sets the value of HLTInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsCost_Base", (value)) +} + +// GetHLTInstructionsCost_Base gets the value of HLTInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardedPersec sets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardedPersec", (value)) +} + +// GetHLTInstructionsForwardedPersec gets the value of HLTInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardingCost sets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardingCost", (value)) +} + +// GetHLTInstructionsForwardingCost gets the value of HLTInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsForwardingCost_Base sets the value of HLTInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsForwardingCost_Base", (value)) +} + +// GetHLTInstructionsForwardingCost_Base gets the value of HLTInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHLTInstructionsPersec sets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHLTInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("HLTInstructionsPersec", (value)) +} + +// GetHLTInstructionsPersec gets the value of HLTInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHLTInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HLTInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsCost sets the value of HypercallsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsCost(value uint64) (err error) { + return instance.SetProperty("HypercallsCost", (value)) +} + +// GetHypercallsCost gets the value of HypercallsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsCost_Base sets the value of HypercallsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsCost_Base(value uint64) (err error) { + return instance.SetProperty("HypercallsCost_Base", (value)) +} + +// GetHypercallsCost_Base gets the value of HypercallsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardedPersec sets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardedPersec", (value)) +} + +// GetHypercallsForwardedPersec gets the value of HypercallsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardingCost sets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsForwardingCost(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardingCost", (value)) +} + +// GetHypercallsForwardingCost gets the value of HypercallsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsForwardingCost_Base sets the value of HypercallsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("HypercallsForwardingCost_Base", (value)) +} + +// GetHypercallsForwardingCost_Base gets the value of HypercallsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHypercallsPersec sets the value of HypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("HypercallsPersec", (value)) +} + +// GetHypercallsPersec gets the value of HypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("HypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextEmulationInterceptsPersec sets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptAllContextEmulationInterceptsPersec gets the value of InvEptAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextInstructionEmulationCost sets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextInstructionEmulationCost", (value)) +} + +// GetInvEptAllContextInstructionEmulationCost gets the value of InvEptAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptAllContextInstructionEmulationCost_Base sets the value of InvEptAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptAllContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvEptAllContextInstructionEmulationCost_Base", (value)) +} + +// GetInvEptAllContextInstructionEmulationCost_Base gets the value of InvEptAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptAllContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptAllContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextEmulationInterceptsPersec sets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvEptSingleContextEmulationInterceptsPersec gets the value of InvEptSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextInstructionEmulationCost sets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextInstructionEmulationCost", (value)) +} + +// GetInvEptSingleContextInstructionEmulationCost gets the value of InvEptSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvEptSingleContextInstructionEmulationCost_Base sets the value of InvEptSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvEptSingleContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvEptSingleContextInstructionEmulationCost_Base", (value)) +} + +// GetInvEptSingleContextInstructionEmulationCost_Base gets the value of InvEptSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvEptSingleContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvEptSingleContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextEmulationInterceptsPersec sets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidAllContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidAllContextEmulationInterceptsPersec gets the value of InvVpidAllContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidAllContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextInstructionEmulationCost sets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidAllContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextInstructionEmulationCost", (value)) +} + +// GetInvVpidAllContextInstructionEmulationCost gets the value of InvVpidAllContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidAllContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidAllContextInstructionEmulationCost_Base sets the value of InvVpidAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidAllContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvVpidAllContextInstructionEmulationCost_Base", (value)) +} + +// GetInvVpidAllContextInstructionEmulationCost_Base gets the value of InvVpidAllContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidAllContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidAllContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressEmulationInterceptsPersec sets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleAddressEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleAddressEmulationInterceptsPersec gets the value of InvVpidSingleAddressEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleAddressEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressInstructionEmulationCost sets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleAddressInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleAddressInstructionEmulationCost gets the value of InvVpidSingleAddressInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleAddressInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleAddressInstructionEmulationCost_Base sets the value of InvVpidSingleAddressInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleAddressInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleAddressInstructionEmulationCost_Base", (value)) +} + +// GetInvVpidSingleAddressInstructionEmulationCost_Base gets the value of InvVpidSingleAddressInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleAddressInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleAddressInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextEmulationInterceptsPersec sets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleContextEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextEmulationInterceptsPersec", (value)) +} + +// GetInvVpidSingleContextEmulationInterceptsPersec gets the value of InvVpidSingleContextEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleContextEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextInstructionEmulationCost sets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleContextInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextInstructionEmulationCost", (value)) +} + +// GetInvVpidSingleContextInstructionEmulationCost gets the value of InvVpidSingleContextInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleContextInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInvVpidSingleContextInstructionEmulationCost_Base sets the value of InvVpidSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyInvVpidSingleContextInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("InvVpidSingleContextInstructionEmulationCost_Base", (value)) +} + +// GetInvVpidSingleContextInstructionEmulationCost_Base gets the value of InvVpidSingleContextInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyInvVpidSingleContextInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("InvVpidSingleContextInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsCost sets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsCost", (value)) +} + +// GetIOInstructionsCost gets the value of IOInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsCost_Base sets the value of IOInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("IOInstructionsCost_Base", (value)) +} + +// GetIOInstructionsCost_Base gets the value of IOInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardedPersec sets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardedPersec", (value)) +} + +// GetIOInstructionsForwardedPersec gets the value of IOInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardingCost sets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardingCost", (value)) +} + +// GetIOInstructionsForwardingCost gets the value of IOInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsForwardingCost_Base sets the value of IOInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("IOInstructionsForwardingCost_Base", (value)) +} + +// GetIOInstructionsForwardingCost_Base gets the value of IOInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInstructionsPersec sets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("IOInstructionsPersec", (value)) +} + +// GetIOInstructionsPersec gets the value of IOInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOInterceptMessagesPersec sets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyIOInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("IOInterceptMessagesPersec", (value)) +} + +// GetIOInterceptMessagesPersec gets the value of IOInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyIOInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLargePageTLBFillsPersec sets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLargePageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("LargePageTLBFillsPersec", (value)) +} + +// GetLargePageTLBFillsPersec gets the value of LargePageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLargePageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LargePageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalFlushedGVARangesPersec sets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalFlushedGVARangesPersec(value uint64) (err error) { + return instance.SetProperty("LocalFlushedGVARangesPersec", (value)) +} + +// GetLocalFlushedGVARangesPersec gets the value of LocalFlushedGVARangesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalFlushedGVARangesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalFlushedGVARangesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushCost sets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalIOTLBFlushCost(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushCost", (value)) +} + +// GetLocalIOTLBFlushCost gets the value of LocalIOTLBFlushCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalIOTLBFlushCost() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushCost_Base sets the value of LocalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalIOTLBFlushCost_Base(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushCost_Base", (value)) +} + +// GetLocalIOTLBFlushCost_Base gets the value of LocalIOTLBFlushCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalIOTLBFlushCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocalIOTLBFlushesPersec sets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLocalIOTLBFlushesPersec(value uint64) (err error) { + return instance.SetProperty("LocalIOTLBFlushesPersec", (value)) +} + +// GetLocalIOTLBFlushesPersec gets the value of LocalIOTLBFlushesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLocalIOTLBFlushesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LocalIOTLBFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorDispatchesPersec sets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLogicalProcessorDispatchesPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorDispatchesPersec", (value)) +} + +// GetLogicalProcessorDispatchesPersec gets the value of LogicalProcessorDispatchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLogicalProcessorDispatchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorDispatchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorHypercallsPersec sets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLogicalProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorHypercallsPersec", (value)) +} + +// GetLogicalProcessorHypercallsPersec gets the value of LogicalProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLogicalProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLogicalProcessorMigrationsPersec sets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLogicalProcessorMigrationsPersec(value uint64) (err error) { + return instance.SetProperty("LogicalProcessorMigrationsPersec", (value)) +} + +// GetLogicalProcessorMigrationsPersec gets the value of LogicalProcessorMigrationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLogicalProcessorMigrationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalProcessorMigrationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLongSpinWaitHypercallsPersec sets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyLongSpinWaitHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("LongSpinWaitHypercallsPersec", (value)) +} + +// GetLongSpinWaitHypercallsPersec gets the value of LongSpinWaitHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyLongSpinWaitHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LongSpinWaitHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMBECNestedPageTableSwitchesPersec sets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMBECNestedPageTableSwitchesPersec(value uint64) (err error) { + return instance.SetProperty("MBECNestedPageTableSwitchesPersec", (value)) +} + +// GetMBECNestedPageTableSwitchesPersec gets the value of MBECNestedPageTableSwitchesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMBECNestedPageTableSwitchesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MBECNestedPageTableSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryInterceptMessagesPersec sets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMemoryInterceptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("MemoryInterceptMessagesPersec", (value)) +} + +// GetMemoryInterceptMessagesPersec gets the value of MemoryInterceptMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMemoryInterceptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryInterceptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesCost sets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesCost", (value)) +} + +// GetMSRAccessesCost gets the value of MSRAccessesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesCost_Base sets the value of MSRAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesCost_Base(value uint64) (err error) { + return instance.SetProperty("MSRAccessesCost_Base", (value)) +} + +// GetMSRAccessesCost_Base gets the value of MSRAccessesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardedPersec sets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardedPersec", (value)) +} + +// GetMSRAccessesForwardedPersec gets the value of MSRAccessesForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardingCost sets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesForwardingCost(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardingCost", (value)) +} + +// GetMSRAccessesForwardingCost gets the value of MSRAccessesForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesForwardingCost_Base sets the value of MSRAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("MSRAccessesForwardingCost_Base", (value)) +} + +// GetMSRAccessesForwardingCost_Base gets the value of MSRAccessesForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMSRAccessesPersec sets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMSRAccessesPersec(value uint64) (err error) { + return instance.SetProperty("MSRAccessesPersec", (value)) +} + +// GetMSRAccessesPersec gets the value of MSRAccessesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMSRAccessesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MSRAccessesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsCost sets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsCost", (value)) +} + +// GetMWAITInstructionsCost gets the value of MWAITInstructionsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsCost_Base sets the value of MWAITInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsCost_Base(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsCost_Base", (value)) +} + +// GetMWAITInstructionsCost_Base gets the value of MWAITInstructionsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardedPersec sets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardedPersec", (value)) +} + +// GetMWAITInstructionsForwardedPersec gets the value of MWAITInstructionsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardingCost sets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsForwardingCost(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardingCost", (value)) +} + +// GetMWAITInstructionsForwardingCost gets the value of MWAITInstructionsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsForwardingCost_Base sets the value of MWAITInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsForwardingCost_Base", (value)) +} + +// GetMWAITInstructionsForwardingCost_Base gets the value of MWAITInstructionsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMWAITInstructionsPersec sets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyMWAITInstructionsPersec(value uint64) (err error) { + return instance.SetProperty("MWAITInstructionsPersec", (value)) +} + +// GetMWAITInstructionsPersec gets the value of MWAITInstructionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyMWAITInstructionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MWAITInstructionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsCost sets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsCost", (value)) +} + +// GetNestedPageFaultInterceptsCost gets the value of NestedPageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsCost_Base sets the value of NestedPageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedPageFaultInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsCost_Base", (value)) +} + +// GetNestedPageFaultInterceptsCost_Base gets the value of NestedPageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedPageFaultInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedPageFaultInterceptsPersec sets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("NestedPageFaultInterceptsPersec", (value)) +} + +// GetNestedPageFaultInterceptsPersec gets the value of NestedPageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedPageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsCost sets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATHardPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsCost", (value)) +} + +// GetNestedSLATHardPageFaultsCost gets the value of NestedSLATHardPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATHardPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsCost_Base sets the value of NestedSLATHardPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATHardPageFaultsCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsCost_Base", (value)) +} + +// GetNestedSLATHardPageFaultsCost_Base gets the value of NestedSLATHardPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATHardPageFaultsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATHardPageFaultsPersec sets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATHardPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATHardPageFaultsPersec", (value)) +} + +// GetNestedSLATHardPageFaultsPersec gets the value of NestedSLATHardPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATHardPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATHardPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsCost sets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsCost(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsCost", (value)) +} + +// GetNestedSLATSoftPageFaultsCost gets the value of NestedSLATSoftPageFaultsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsCost_Base sets the value of NestedSLATSoftPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsCost_Base", (value)) +} + +// GetNestedSLATSoftPageFaultsCost_Base gets the value of NestedSLATSoftPageFaultsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedSLATSoftPageFaultsPersec sets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedSLATSoftPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("NestedSLATSoftPageFaultsPersec", (value)) +} + +// GetNestedSLATSoftPageFaultsPersec gets the value of NestedSLATSoftPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedSLATSoftPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedSLATSoftPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableEvictionsPersec sets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedTLBPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableEvictionsPersec", (value)) +} + +// GetNestedTLBPageTableEvictionsPersec gets the value of NestedTLBPageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedTLBPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedTLBPageTableReclamationsPersec sets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedTLBPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("NestedTLBPageTableReclamationsPersec", (value)) +} + +// GetNestedTLBPageTableReclamationsPersec gets the value of NestedTLBPageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedTLBPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedTLBPageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesCost sets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedVMEntriesCost(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesCost", (value)) +} + +// GetNestedVMEntriesCost gets the value of NestedVMEntriesCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedVMEntriesCost() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesCost_Base sets the value of NestedVMEntriesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedVMEntriesCost_Base(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesCost_Base", (value)) +} + +// GetNestedVMEntriesCost_Base gets the value of NestedVMEntriesCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedVMEntriesCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNestedVMEntriesPersec sets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyNestedVMEntriesPersec(value uint64) (err error) { + return instance.SetProperty("NestedVMEntriesPersec", (value)) +} + +// GetNestedVMEntriesPersec gets the value of NestedVMEntriesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyNestedVMEntriesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NestedVMEntriesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherHypercallsPersec sets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("OtherHypercallsPersec", (value)) +} + +// GetOtherHypercallsPersec gets the value of OtherHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsCost sets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsCost", (value)) +} + +// GetOtherInterceptsCost gets the value of OtherInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsCost_Base sets the value of OtherInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsCost_Base", (value)) +} + +// GetOtherInterceptsCost_Base gets the value of OtherInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardedPersec sets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardedPersec", (value)) +} + +// GetOtherInterceptsForwardedPersec gets the value of OtherInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardingCost sets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardingCost", (value)) +} + +// GetOtherInterceptsForwardingCost gets the value of OtherInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsForwardingCost_Base sets the value of OtherInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsForwardingCost_Base", (value)) +} + +// GetOtherInterceptsForwardingCost_Base gets the value of OtherInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherInterceptsPersec sets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("OtherInterceptsPersec", (value)) +} + +// GetOtherInterceptsPersec gets the value of OtherInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherMessagesPersec sets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherMessagesPersec(value uint64) (err error) { + return instance.SetProperty("OtherMessagesPersec", (value)) +} + +// GetOtherMessagesPersec gets the value of OtherMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherReflectedGuestExceptionsPersec sets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyOtherReflectedGuestExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("OtherReflectedGuestExceptionsPersec", (value)) +} + +// GetOtherReflectedGuestExceptionsPersec gets the value of OtherReflectedGuestExceptionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyOtherReflectedGuestExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherReflectedGuestExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsCost sets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsCost", (value)) +} + +// GetPageFaultInterceptsCost gets the value of PageFaultInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsCost_Base sets the value of PageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsCost_Base", (value)) +} + +// GetPageFaultInterceptsCost_Base gets the value of PageFaultInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardedPersec sets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardedPersec", (value)) +} + +// GetPageFaultInterceptsForwardedPersec gets the value of PageFaultInterceptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardingCost sets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardingCost", (value)) +} + +// GetPageFaultInterceptsForwardingCost gets the value of PageFaultInterceptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsForwardingCost_Base sets the value of PageFaultInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsForwardingCost_Base", (value)) +} + +// GetPageFaultInterceptsForwardingCost_Base gets the value of PageFaultInterceptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultInterceptsPersec sets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageFaultInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageFaultInterceptsPersec", (value)) +} + +// GetPageFaultInterceptsPersec gets the value of PageFaultInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageFaultInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFaultInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsCost sets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsCost", (value)) +} + +// GetPageInvalidationsCost gets the value of PageInvalidationsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsCost_Base sets the value of PageInvalidationsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsCost_Base(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsCost_Base", (value)) +} + +// GetPageInvalidationsCost_Base gets the value of PageInvalidationsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardedPersec sets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardedPersec", (value)) +} + +// GetPageInvalidationsForwardedPersec gets the value of PageInvalidationsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardingCost sets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardingCost", (value)) +} + +// GetPageInvalidationsForwardingCost gets the value of PageInvalidationsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsForwardingCost_Base sets the value of PageInvalidationsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsForwardingCost_Base", (value)) +} + +// GetPageInvalidationsForwardingCost_Base gets the value of PageInvalidationsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageInvalidationsPersec sets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageInvalidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageInvalidationsPersec", (value)) +} + +// GetPageInvalidationsPersec gets the value of PageInvalidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageInvalidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageInvalidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageScansPersec sets the value of PageScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageScansPersec(value uint64) (err error) { + return instance.SetProperty("PageScansPersec", (value)) +} + +// GetPageScansPersec gets the value of PageScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableAllocationsPersec sets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableAllocationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableAllocationsPersec", (value)) +} + +// GetPageTableAllocationsPersec gets the value of PageTableAllocationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableAllocationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableAllocationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableEvictionsPersec sets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableEvictionsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableEvictionsPersec", (value)) +} + +// GetPageTableEvictionsPersec gets the value of PageTableEvictionsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableEvictionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableEvictionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableReclamationsPersec sets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableReclamationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableReclamationsPersec", (value)) +} + +// GetPageTableReclamationsPersec gets the value of PageTableReclamationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableReclamationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableReclamationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableResetsPersec sets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableResetsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableResetsPersec", (value)) +} + +// GetPageTableResetsPersec gets the value of PageTableResetsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableResetsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableResetsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableValidationsPersec sets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableValidationsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableValidationsPersec", (value)) +} + +// GetPageTableValidationsPersec gets the value of PageTableValidationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableValidationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableValidationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageTableWriteInterceptsPersec sets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPageTableWriteInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("PageTableWriteInterceptsPersec", (value)) +} + +// GetPageTableWriteInterceptsPersec gets the value of PageTableWriteInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPageTableWriteInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PageTableWriteInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsCost sets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsCost", (value)) +} + +// GetPendingInterruptsCost gets the value of PendingInterruptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsCost_Base sets the value of PendingInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsCost_Base(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsCost_Base", (value)) +} + +// GetPendingInterruptsCost_Base gets the value of PendingInterruptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardedPersec sets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsForwardedPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardedPersec", (value)) +} + +// GetPendingInterruptsForwardedPersec gets the value of PendingInterruptsForwardedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsForwardedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardingCost sets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsForwardingCost(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardingCost", (value)) +} + +// GetPendingInterruptsForwardingCost gets the value of PendingInterruptsForwardingCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsForwardingCost() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardingCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsForwardingCost_Base sets the value of PendingInterruptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsForwardingCost_Base(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsForwardingCost_Base", (value)) +} + +// GetPendingInterruptsForwardingCost_Base gets the value of PendingInterruptsForwardingCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsForwardingCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsForwardingCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPendingInterruptsPersec sets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPendingInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("PendingInterruptsPersec", (value)) +} + +// GetPendingInterruptsPersec gets the value of PendingInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPendingInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PendingInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime sets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentGuestRunTime(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime", (value)) +} + +// GetPercentGuestRunTime gets the value of PercentGuestRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentGuestRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentGuestRunTime_Base sets the value of PercentGuestRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentGuestRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentGuestRunTime_Base", (value)) +} + +// GetPercentGuestRunTime_Base gets the value of PercentGuestRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentGuestRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentGuestRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime sets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentHypervisorRunTime(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime", (value)) +} + +// GetPercentHypervisorRunTime gets the value of PercentHypervisorRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentHypervisorRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentHypervisorRunTime_Base sets the value of PercentHypervisorRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentHypervisorRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentHypervisorRunTime_Base", (value)) +} + +// GetPercentHypervisorRunTime_Base gets the value of PercentHypervisorRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentHypervisorRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentHypervisorRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentRemoteRunTime sets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentRemoteRunTime(value uint64) (err error) { + return instance.SetProperty("PercentRemoteRunTime", (value)) +} + +// GetPercentRemoteRunTime gets the value of PercentRemoteRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentRemoteRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentRemoteRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentRemoteRunTime_Base sets the value of PercentRemoteRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentRemoteRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentRemoteRunTime_Base", (value)) +} + +// GetPercentRemoteRunTime_Base gets the value of PercentRemoteRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentRemoteRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentRemoteRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime sets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentTotalRunTime(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime", (value)) +} + +// GetPercentTotalRunTime gets the value of PercentTotalRunTime for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentTotalRunTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentTotalRunTime_Base sets the value of PercentTotalRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPercentTotalRunTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentTotalRunTime_Base", (value)) +} + +// GetPercentTotalRunTime_Base gets the value of PercentTotalRunTime_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPercentTotalRunTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTotalRunTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptNotificationsPersec sets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPostedInterruptNotificationsPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptNotificationsPersec", (value)) +} + +// GetPostedInterruptNotificationsPersec gets the value of PostedInterruptNotificationsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPostedInterruptNotificationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptNotificationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostedInterruptScansPersec sets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyPostedInterruptScansPersec(value uint64) (err error) { + return instance.SetProperty("PostedInterruptScansPersec", (value)) +} + +// GetPostedInterruptScansPersec gets the value of PostedInterruptScansPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyPostedInterruptScansPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PostedInterruptScansPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReflectedGuestPageFaultsPersec sets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyReflectedGuestPageFaultsPersec(value uint64) (err error) { + return instance.SetProperty("ReflectedGuestPageFaultsPersec", (value)) +} + +// GetReflectedGuestPageFaultsPersec gets the value of ReflectedGuestPageFaultsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyReflectedGuestPageFaultsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReflectedGuestPageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSmallPageTLBFillsPersec sets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertySmallPageTLBFillsPersec(value uint64) (err error) { + return instance.SetProperty("SmallPageTLBFillsPersec", (value)) +} + +// GetSmallPageTLBFillsPersec gets the value of SmallPageTLBFillsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertySmallPageTLBFillsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SmallPageTLBFillsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptHypercallsPersec sets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertySyntheticInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptHypercallsPersec", (value)) +} + +// GetSyntheticInterruptHypercallsPersec gets the value of SyntheticInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertySyntheticInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSyntheticInterruptsPersec sets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertySyntheticInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("SyntheticInterruptsPersec", (value)) +} + +// GetSyntheticInterruptsPersec gets the value of SyntheticInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertySyntheticInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SyntheticInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsCost sets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalInterceptsCost(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsCost", (value)) +} + +// GetTotalInterceptsCost gets the value of TotalInterceptsCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalInterceptsCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsCost_Base sets the value of TotalInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalInterceptsCost_Base(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsCost_Base", (value)) +} + +// GetTotalInterceptsCost_Base gets the value of TotalInterceptsCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalInterceptsCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalInterceptsPersec sets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("TotalInterceptsPersec", (value)) +} + +// GetTotalInterceptsPersec gets the value of TotalInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalMessagesPersec sets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalMessagesPersec(value uint64) (err error) { + return instance.SetProperty("TotalMessagesPersec", (value)) +} + +// GetTotalMessagesPersec gets the value of TotalMessagesPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulatedPersec sets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulatedPersec(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulatedPersec", (value)) +} + +// GetTotalVirtualizationInstructionsEmulatedPersec gets the value of TotalVirtualizationInstructionsEmulatedPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulatedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulationCost sets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulationCost(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulationCost", (value)) +} + +// GetTotalVirtualizationInstructionsEmulationCost gets the value of TotalVirtualizationInstructionsEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalVirtualizationInstructionsEmulationCost_Base sets the value of TotalVirtualizationInstructionsEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyTotalVirtualizationInstructionsEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("TotalVirtualizationInstructionsEmulationCost_Base", (value)) +} + +// GetTotalVirtualizationInstructionsEmulationCost_Base gets the value of TotalVirtualizationInstructionsEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyTotalVirtualizationInstructionsEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalVirtualizationInstructionsEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptHypercallsPersec sets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualInterruptHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptHypercallsPersec", (value)) +} + +// GetVirtualInterruptHypercallsPersec gets the value of VirtualInterruptHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualInterruptHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualInterruptsPersec sets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualInterruptsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualInterruptsPersec", (value)) +} + +// GetVirtualInterruptsPersec gets the value of VirtualInterruptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualInterruptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualInterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualMMUHypercallsPersec sets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualMMUHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualMMUHypercallsPersec", (value)) +} + +// GetVirtualMMUHypercallsPersec gets the value of VirtualMMUHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualMMUHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualMMUHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualProcessorHypercallsPersec sets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVirtualProcessorHypercallsPersec(value uint64) (err error) { + return instance.SetProperty("VirtualProcessorHypercallsPersec", (value)) +} + +// GetVirtualProcessorHypercallsPersec gets the value of VirtualProcessorHypercallsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVirtualProcessorHypercallsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualProcessorHypercallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEAREmulationInterceptsPersec sets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMCLEAREmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMCLEAREmulationInterceptsPersec", (value)) +} + +// GetVMCLEAREmulationInterceptsPersec gets the value of VMCLEAREmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMCLEAREmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEAREmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEARInstructionEmulationCost sets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMCLEARInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMCLEARInstructionEmulationCost", (value)) +} + +// GetVMCLEARInstructionEmulationCost gets the value of VMCLEARInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMCLEARInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEARInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMCLEARInstructionEmulationCost_Base sets the value of VMCLEARInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMCLEARInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMCLEARInstructionEmulationCost_Base", (value)) +} + +// GetVMCLEARInstructionEmulationCost_Base gets the value of VMCLEARInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMCLEARInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMCLEARInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDEmulationInterceptsPersec sets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRLDEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRLDEmulationInterceptsPersec", (value)) +} + +// GetVMPTRLDEmulationInterceptsPersec gets the value of VMPTRLDEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRLDEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDInstructionEmulationCost sets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRLDInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRLDInstructionEmulationCost", (value)) +} + +// GetVMPTRLDInstructionEmulationCost gets the value of VMPTRLDInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRLDInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRLDInstructionEmulationCost_Base sets the value of VMPTRLDInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRLDInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMPTRLDInstructionEmulationCost_Base", (value)) +} + +// GetVMPTRLDInstructionEmulationCost_Base gets the value of VMPTRLDInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRLDInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRLDInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTEmulationInterceptsPersec sets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRSTEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMPTRSTEmulationInterceptsPersec", (value)) +} + +// GetVMPTRSTEmulationInterceptsPersec gets the value of VMPTRSTEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRSTEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTInstructionEmulationCost sets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRSTInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMPTRSTInstructionEmulationCost", (value)) +} + +// GetVMPTRSTInstructionEmulationCost gets the value of VMPTRSTInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRSTInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMPTRSTInstructionEmulationCost_Base sets the value of VMPTRSTInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMPTRSTInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMPTRSTInstructionEmulationCost_Base", (value)) +} + +// GetVMPTRSTInstructionEmulationCost_Base gets the value of VMPTRSTInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMPTRSTInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMPTRSTInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADEmulationInterceptsPersec sets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMREADEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMREADEmulationInterceptsPersec", (value)) +} + +// GetVMREADEmulationInterceptsPersec gets the value of VMREADEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMREADEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADInstructionEmulationCost sets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMREADInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMREADInstructionEmulationCost", (value)) +} + +// GetVMREADInstructionEmulationCost gets the value of VMREADInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMREADInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMREADInstructionEmulationCost_Base sets the value of VMREADInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMREADInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMREADInstructionEmulationCost_Base", (value)) +} + +// GetVMREADInstructionEmulationCost_Base gets the value of VMREADInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMREADInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMREADInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEEmulationInterceptsPersec sets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMWRITEEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMWRITEEmulationInterceptsPersec", (value)) +} + +// GetVMWRITEEmulationInterceptsPersec gets the value of VMWRITEEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMWRITEEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEInstructionEmulationCost sets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMWRITEInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMWRITEInstructionEmulationCost", (value)) +} + +// GetVMWRITEInstructionEmulationCost gets the value of VMWRITEInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMWRITEInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMWRITEInstructionEmulationCost_Base sets the value of VMWRITEInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMWRITEInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMWRITEInstructionEmulationCost_Base", (value)) +} + +// GetVMWRITEInstructionEmulationCost_Base gets the value of VMWRITEInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMWRITEInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMWRITEInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFEmulationInterceptsPersec sets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXOFFEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXOFFEmulationInterceptsPersec", (value)) +} + +// GetVMXOFFEmulationInterceptsPersec gets the value of VMXOFFEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXOFFEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFInstructionEmulationCost sets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXOFFInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXOFFInstructionEmulationCost", (value)) +} + +// GetVMXOFFInstructionEmulationCost gets the value of VMXOFFInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXOFFInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXOFFInstructionEmulationCost_Base sets the value of VMXOFFInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXOFFInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMXOFFInstructionEmulationCost_Base", (value)) +} + +// GetVMXOFFInstructionEmulationCost_Base gets the value of VMXOFFInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXOFFInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXOFFInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONEmulationInterceptsPersec sets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXONEmulationInterceptsPersec(value uint64) (err error) { + return instance.SetProperty("VMXONEmulationInterceptsPersec", (value)) +} + +// GetVMXONEmulationInterceptsPersec gets the value of VMXONEmulationInterceptsPersec for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXONEmulationInterceptsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONEmulationInterceptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONInstructionEmulationCost sets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXONInstructionEmulationCost(value uint64) (err error) { + return instance.SetProperty("VMXONInstructionEmulationCost", (value)) +} + +// GetVMXONInstructionEmulationCost gets the value of VMXONInstructionEmulationCost for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXONInstructionEmulationCost() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONInstructionEmulationCost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVMXONInstructionEmulationCost_Base sets the value of VMXONInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) SetPropertyVMXONInstructionEmulationCost_Base(value uint64) (err error) { + return instance.SetProperty("VMXONInstructionEmulationCost_Base", (value)) +} + +// GetVMXONInstructionEmulationCost_Base gets the value of VMXONInstructionEmulationCost_Base for the instance +func (instance *Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) GetPropertyVMXONInstructionEmulationCost_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VMXONInstructionEmulationCost_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM.go new file mode 100644 index 00000000..8e1d3a60 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM struct +type Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM struct { + *Win32_PerfRawData + + // + AverageReplicationLatency uint64 + + // + AverageReplicationSize uint64 + + // + CompressionEfficiency uint64 + + // + LastReplicationSize uint64 + + // + NetworkBytesRecv uint64 + + // + NetworkBytesSent uint64 + + // + ReplicationCount uint32 + + // + ReplicationLatency uint64 + + // + ResynchronizedBytes uint64 +} + +func NewWin32_PerfRawData_HyperVReplicaStats_HyperVReplicaVMEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HyperVReplicaStats_HyperVReplicaVMEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageReplicationLatency sets the value of AverageReplicationLatency for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyAverageReplicationLatency(value uint64) (err error) { + return instance.SetProperty("AverageReplicationLatency", (value)) +} + +// GetAverageReplicationLatency gets the value of AverageReplicationLatency for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyAverageReplicationLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageReplicationLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageReplicationSize sets the value of AverageReplicationSize for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyAverageReplicationSize(value uint64) (err error) { + return instance.SetProperty("AverageReplicationSize", (value)) +} + +// GetAverageReplicationSize gets the value of AverageReplicationSize for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyAverageReplicationSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageReplicationSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressionEfficiency sets the value of CompressionEfficiency for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyCompressionEfficiency(value uint64) (err error) { + return instance.SetProperty("CompressionEfficiency", (value)) +} + +// GetCompressionEfficiency gets the value of CompressionEfficiency for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyCompressionEfficiency() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressionEfficiency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLastReplicationSize sets the value of LastReplicationSize for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyLastReplicationSize(value uint64) (err error) { + return instance.SetProperty("LastReplicationSize", (value)) +} + +// GetLastReplicationSize gets the value of LastReplicationSize for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyLastReplicationSize() (value uint64, err error) { + retValue, err := instance.GetProperty("LastReplicationSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkBytesRecv sets the value of NetworkBytesRecv for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyNetworkBytesRecv(value uint64) (err error) { + return instance.SetProperty("NetworkBytesRecv", (value)) +} + +// GetNetworkBytesRecv gets the value of NetworkBytesRecv for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyNetworkBytesRecv() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkBytesRecv") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkBytesSent sets the value of NetworkBytesSent for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyNetworkBytesSent(value uint64) (err error) { + return instance.SetProperty("NetworkBytesSent", (value)) +} + +// GetNetworkBytesSent gets the value of NetworkBytesSent for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyNetworkBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("NetworkBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReplicationCount sets the value of ReplicationCount for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyReplicationCount(value uint32) (err error) { + return instance.SetProperty("ReplicationCount", (value)) +} + +// GetReplicationCount gets the value of ReplicationCount for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyReplicationCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ReplicationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReplicationLatency sets the value of ReplicationLatency for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyReplicationLatency(value uint64) (err error) { + return instance.SetProperty("ReplicationLatency", (value)) +} + +// GetReplicationLatency gets the value of ReplicationLatency for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyReplicationLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("ReplicationLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResynchronizedBytes sets the value of ResynchronizedBytes for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) SetPropertyResynchronizedBytes(value uint64) (err error) { + return instance.SetProperty("ResynchronizedBytes", (value)) +} + +// GetResynchronizedBytes gets the value of ResynchronizedBytes for the instance +func (instance *Win32_PerfRawData_HyperVReplicaStats_HyperVReplicaVM) GetPropertyResynchronizedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ResynchronizedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration.go new file mode 100644 index 00000000..a2094eb9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration.go @@ -0,0 +1,1010 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration struct +type Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration struct { + *Win32_PerfRawData + + // + Cacheupdateaveragemilliseconds uint32 + + // + Cacheupdatecount uint32 + + // + Commitaveragemilliseconds uint32 + + // + Commitbytespersecondaverage uint32 + + // + Commitcount uint32 + + // + Compactaveragemilliseconds uint32 + + // + Compactcount uint32 + + // + Configlockacquireaveragemilliseconds uint32 + + // + Configlockcount uint32 + + // + Filelockacquireaveragemilliseconds uint32 + + // + Filelockreleaseaveragemilliseconds uint32 + + // + Getaveragemilliseconds uint32 + + // + Getcount uint32 + + // + Loadfileaveragemilliseconds uint32 + + // + Lockacquireaveragemilliseconds uint32 + + // + Lockcount uint32 + + // + Lockreleaseaveragemilliseconds uint32 + + // + Querysizeaveragesizemilliseconds uint32 + + // + Querysizecount uint32 + + // + Readbytes uint32 + + // + Readbytespersecondaverage uint32 + + // + Readfilebytes uint32 + + // + Readfilebytespersecondaverage uint32 + + // + Readfilecount uint32 + + // + Removeaveragemilliseconds uint32 + + // + Removecount uint32 + + // + Setaveragemilliseconds uint32 + + // + Setcount uint32 + + // + Writebytes uint32 + + // + Writebytespersecondaverage uint32 + + // + Writefilebytes uint32 + + // + Writefilecount uint32 +} + +func NewWin32_PerfRawData_HyperVStorageStats_HyperVConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_HyperVStorageStats_HyperVConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCacheupdateaveragemilliseconds sets the value of Cacheupdateaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCacheupdateaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Cacheupdateaveragemilliseconds", (value)) +} + +// GetCacheupdateaveragemilliseconds gets the value of Cacheupdateaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCacheupdateaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Cacheupdateaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheupdatecount sets the value of Cacheupdatecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCacheupdatecount(value uint32) (err error) { + return instance.SetProperty("Cacheupdatecount", (value)) +} + +// GetCacheupdatecount gets the value of Cacheupdatecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCacheupdatecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Cacheupdatecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitaveragemilliseconds sets the value of Commitaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCommitaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Commitaveragemilliseconds", (value)) +} + +// GetCommitaveragemilliseconds gets the value of Commitaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCommitaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Commitaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitbytespersecondaverage sets the value of Commitbytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCommitbytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Commitbytespersecondaverage", (value)) +} + +// GetCommitbytespersecondaverage gets the value of Commitbytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCommitbytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Commitbytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitcount sets the value of Commitcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCommitcount(value uint32) (err error) { + return instance.SetProperty("Commitcount", (value)) +} + +// GetCommitcount gets the value of Commitcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCommitcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Commitcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactaveragemilliseconds sets the value of Compactaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCompactaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Compactaveragemilliseconds", (value)) +} + +// GetCompactaveragemilliseconds gets the value of Compactaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCompactaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCompactcount sets the value of Compactcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyCompactcount(value uint32) (err error) { + return instance.SetProperty("Compactcount", (value)) +} + +// GetCompactcount gets the value of Compactcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyCompactcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Compactcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfiglockacquireaveragemilliseconds sets the value of Configlockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyConfiglockacquireaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Configlockacquireaveragemilliseconds", (value)) +} + +// GetConfiglockacquireaveragemilliseconds gets the value of Configlockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyConfiglockacquireaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Configlockacquireaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfiglockcount sets the value of Configlockcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyConfiglockcount(value uint32) (err error) { + return instance.SetProperty("Configlockcount", (value)) +} + +// GetConfiglockcount gets the value of Configlockcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyConfiglockcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Configlockcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilelockacquireaveragemilliseconds sets the value of Filelockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyFilelockacquireaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Filelockacquireaveragemilliseconds", (value)) +} + +// GetFilelockacquireaveragemilliseconds gets the value of Filelockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyFilelockacquireaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Filelockacquireaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilelockreleaseaveragemilliseconds sets the value of Filelockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyFilelockreleaseaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Filelockreleaseaveragemilliseconds", (value)) +} + +// GetFilelockreleaseaveragemilliseconds gets the value of Filelockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyFilelockreleaseaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Filelockreleaseaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGetaveragemilliseconds sets the value of Getaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyGetaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Getaveragemilliseconds", (value)) +} + +// GetGetaveragemilliseconds gets the value of Getaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyGetaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Getaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGetcount sets the value of Getcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyGetcount(value uint32) (err error) { + return instance.SetProperty("Getcount", (value)) +} + +// GetGetcount gets the value of Getcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyGetcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Getcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLoadfileaveragemilliseconds sets the value of Loadfileaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyLoadfileaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Loadfileaveragemilliseconds", (value)) +} + +// GetLoadfileaveragemilliseconds gets the value of Loadfileaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyLoadfileaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Loadfileaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockacquireaveragemilliseconds sets the value of Lockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyLockacquireaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Lockacquireaveragemilliseconds", (value)) +} + +// GetLockacquireaveragemilliseconds gets the value of Lockacquireaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyLockacquireaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Lockacquireaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockcount sets the value of Lockcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyLockcount(value uint32) (err error) { + return instance.SetProperty("Lockcount", (value)) +} + +// GetLockcount gets the value of Lockcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyLockcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Lockcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLockreleaseaveragemilliseconds sets the value of Lockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyLockreleaseaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Lockreleaseaveragemilliseconds", (value)) +} + +// GetLockreleaseaveragemilliseconds gets the value of Lockreleaseaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyLockreleaseaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Lockreleaseaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuerysizeaveragesizemilliseconds sets the value of Querysizeaveragesizemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyQuerysizeaveragesizemilliseconds(value uint32) (err error) { + return instance.SetProperty("Querysizeaveragesizemilliseconds", (value)) +} + +// GetQuerysizeaveragesizemilliseconds gets the value of Querysizeaveragesizemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyQuerysizeaveragesizemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Querysizeaveragesizemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuerysizecount sets the value of Querysizecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyQuerysizecount(value uint32) (err error) { + return instance.SetProperty("Querysizecount", (value)) +} + +// GetQuerysizecount gets the value of Querysizecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyQuerysizecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Querysizecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadbytes sets the value of Readbytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadbytes(value uint32) (err error) { + return instance.SetProperty("Readbytes", (value)) +} + +// GetReadbytes gets the value of Readbytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadbytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Readbytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadbytespersecondaverage sets the value of Readbytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadbytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Readbytespersecondaverage", (value)) +} + +// GetReadbytespersecondaverage gets the value of Readbytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadbytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Readbytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadfilebytes sets the value of Readfilebytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadfilebytes(value uint32) (err error) { + return instance.SetProperty("Readfilebytes", (value)) +} + +// GetReadfilebytes gets the value of Readfilebytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadfilebytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Readfilebytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadfilebytespersecondaverage sets the value of Readfilebytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadfilebytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Readfilebytespersecondaverage", (value)) +} + +// GetReadfilebytespersecondaverage gets the value of Readfilebytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadfilebytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Readfilebytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadfilecount sets the value of Readfilecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyReadfilecount(value uint32) (err error) { + return instance.SetProperty("Readfilecount", (value)) +} + +// GetReadfilecount gets the value of Readfilecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyReadfilecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Readfilecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoveaveragemilliseconds sets the value of Removeaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyRemoveaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Removeaveragemilliseconds", (value)) +} + +// GetRemoveaveragemilliseconds gets the value of Removeaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyRemoveaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Removeaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemovecount sets the value of Removecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyRemovecount(value uint32) (err error) { + return instance.SetProperty("Removecount", (value)) +} + +// GetRemovecount gets the value of Removecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyRemovecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Removecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSetaveragemilliseconds sets the value of Setaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertySetaveragemilliseconds(value uint32) (err error) { + return instance.SetProperty("Setaveragemilliseconds", (value)) +} + +// GetSetaveragemilliseconds gets the value of Setaveragemilliseconds for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertySetaveragemilliseconds() (value uint32, err error) { + retValue, err := instance.GetProperty("Setaveragemilliseconds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSetcount sets the value of Setcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertySetcount(value uint32) (err error) { + return instance.SetProperty("Setcount", (value)) +} + +// GetSetcount gets the value of Setcount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertySetcount() (value uint32, err error) { + retValue, err := instance.GetProperty("Setcount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritebytes sets the value of Writebytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritebytes(value uint32) (err error) { + return instance.SetProperty("Writebytes", (value)) +} + +// GetWritebytes gets the value of Writebytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritebytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Writebytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritebytespersecondaverage sets the value of Writebytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritebytespersecondaverage(value uint32) (err error) { + return instance.SetProperty("Writebytespersecondaverage", (value)) +} + +// GetWritebytespersecondaverage gets the value of Writebytespersecondaverage for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritebytespersecondaverage() (value uint32, err error) { + retValue, err := instance.GetProperty("Writebytespersecondaverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritefilebytes sets the value of Writefilebytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritefilebytes(value uint32) (err error) { + return instance.SetProperty("Writefilebytes", (value)) +} + +// GetWritefilebytes gets the value of Writefilebytes for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritefilebytes() (value uint32, err error) { + retValue, err := instance.GetProperty("Writefilebytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritefilecount sets the value of Writefilecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) SetPropertyWritefilecount(value uint32) (err error) { + return instance.SetProperty("Writefilecount", (value)) +} + +// GetWritefilecount gets the value of Writefilecount for the instance +func (instance *Win32_PerfRawData_HyperVStorageStats_HyperVConfiguration) GetPropertyWritefilecount() (value uint32, err error) { + retValue, err := instance.GetProperty("Writefilecount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go new file mode 100644 index 00000000..b522bc9f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated struct +type Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated struct { + *Win32_PerfRawData + + // + ReadBytesPersec uint64 + + // + ReadSectorsPersec uint64 + + // + WriteBytesPersec uint64 + + // + WrittenSectorsPersec uint64 +} + +func NewWin32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulatedEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated{ + Win32_PerfRawData: tmp, + } + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadSectorsPersec sets the value of ReadSectorsPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyReadSectorsPersec(value uint64) (err error) { + return instance.SetProperty("ReadSectorsPersec", (value)) +} + +// GetReadSectorsPersec gets the value of ReadSectorsPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyReadSectorsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadSectorsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWrittenSectorsPersec sets the value of WrittenSectorsPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) SetPropertyWrittenSectorsPersec(value uint64) (err error) { + return instance.SetProperty("WrittenSectorsPersec", (value)) +} + +// GetWrittenSectorsPersec gets the value of WrittenSectorsPersec for the instance +func (instance *Win32_PerfRawData_IdePerfProvider_HyperVVirtualIDEControllerEmulated) GetPropertyWrittenSectorsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WrittenSectorsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperProcess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperProcess.go new file mode 100644 index 00000000..7d26d4cb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperProcess.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_LSM_UserInputDelayperProcess struct +type Win32_PerfRawData_LSM_UserInputDelayperProcess struct { + *Win32_PerfRawData + + // + MaxInputDelay uint64 + + // + MaxInputDelay_Base uint32 +} + +func NewWin32_PerfRawData_LSM_UserInputDelayperProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_LSM_UserInputDelayperProcess, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LSM_UserInputDelayperProcess{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_LSM_UserInputDelayperProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_LSM_UserInputDelayperProcess, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LSM_UserInputDelayperProcess{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMaxInputDelay sets the value of MaxInputDelay for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperProcess) SetPropertyMaxInputDelay(value uint64) (err error) { + return instance.SetProperty("MaxInputDelay", (value)) +} + +// GetMaxInputDelay gets the value of MaxInputDelay for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperProcess) GetPropertyMaxInputDelay() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxInputDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaxInputDelay_Base sets the value of MaxInputDelay_Base for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperProcess) SetPropertyMaxInputDelay_Base(value uint32) (err error) { + return instance.SetProperty("MaxInputDelay_Base", (value)) +} + +// GetMaxInputDelay_Base gets the value of MaxInputDelay_Base for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperProcess) GetPropertyMaxInputDelay_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxInputDelay_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperSession.go new file mode 100644 index 00000000..9198c4e0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LSM_UserInputDelayperSession.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_LSM_UserInputDelayperSession struct +type Win32_PerfRawData_LSM_UserInputDelayperSession struct { + *Win32_PerfRawData + + // + MaxInputDelay uint64 + + // + MaxInputDelay_Base uint32 +} + +func NewWin32_PerfRawData_LSM_UserInputDelayperSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_LSM_UserInputDelayperSession, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LSM_UserInputDelayperSession{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_LSM_UserInputDelayperSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_LSM_UserInputDelayperSession, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LSM_UserInputDelayperSession{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMaxInputDelay sets the value of MaxInputDelay for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperSession) SetPropertyMaxInputDelay(value uint64) (err error) { + return instance.SetProperty("MaxInputDelay", (value)) +} + +// GetMaxInputDelay gets the value of MaxInputDelay for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperSession) GetPropertyMaxInputDelay() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxInputDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMaxInputDelay_Base sets the value of MaxInputDelay_Base for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperSession) SetPropertyMaxInputDelay_Base(value uint32) (err error) { + return instance.SetProperty("MaxInputDelay_Base", (value)) +} + +// GetMaxInputDelay_Base gets the value of MaxInputDelay_Base for the instance +func (instance *Win32_PerfRawData_LSM_UserInputDelayperSession) GetPropertyMaxInputDelay_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxInputDelay_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration.go new file mode 100644 index 00000000..f14adeb4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration.go @@ -0,0 +1,1040 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration struct +type Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration struct { + *Win32_PerfRawData + + // + CompressorBytestobeCompressed uint64 + + // + CompressorCompressedBytesSent uint64 + + // + CompressorCompressedBytesSentPersec uint64 + + // + CompressorEnabledThreads uint64 + + // + CompressorMaximumThreads uint64 + + // + MemoryWalkerBytesReadPersec uint64 + + // + MemoryWalkerBytesSentforCompression uint64 + + // + MemoryWalkerBytesSentforCompressionPersec uint64 + + // + MemoryWalkerMaximumThreads uint64 + + // + MemoryWalkerUncompressedBytesSent uint64 + + // + MemoryWalkerUncompressedBytesSentPersec uint64 + + // + ReceiverBytesPendingDecompression uint64 + + // + ReceiverBytesPendingWrite uint64 + + // + ReceiverBytesWrittenPersec uint64 + + // + ReceiverCompressedBytesReceivedPersec uint64 + + // + ReceiverDecompressedBytesPersec uint64 + + // + ReceiverMaximumThreadpoolThreadCount uint64 + + // + ReceiverUncompressedBytesReceivedPersec uint64 + + // + SMBTransportBytesSent uint64 + + // + SMBTransportBytesSentPersec uint64 + + // + SMBTransportPendingSendBytes uint64 + + // + SMBTransportPendingSendCount uint64 + + // + TCPTransportBytesPendingProcessing uint64 + + // + TCPTransportBytesPendingSend uint64 + + // + TCPTransportBytesReceivedPersec uint64 + + // + TCPTransportBytesSentPersec uint64 + + // + TCPTransportPendingSendCount uint64 + + // + TCPTransportPostedReceiveBufferCount uint64 + + // + TCPTransportTotalbuffercount uint64 + + // + TransferpassCPUCap uint64 + + // + TransferpassDirtyPageCount uint64 + + // + TransferPassIsblackout uint64 + + // + TransferPassNumber uint64 +} + +func NewWin32_PerfRawData_LmPerfProvider_HyperVVMLiveMigrationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_LmPerfProvider_HyperVVMLiveMigrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCompressorBytestobeCompressed sets the value of CompressorBytestobeCompressed for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorBytestobeCompressed(value uint64) (err error) { + return instance.SetProperty("CompressorBytestobeCompressed", (value)) +} + +// GetCompressorBytestobeCompressed gets the value of CompressorBytestobeCompressed for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorBytestobeCompressed() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorBytestobeCompressed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorCompressedBytesSent sets the value of CompressorCompressedBytesSent for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorCompressedBytesSent(value uint64) (err error) { + return instance.SetProperty("CompressorCompressedBytesSent", (value)) +} + +// GetCompressorCompressedBytesSent gets the value of CompressorCompressedBytesSent for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorCompressedBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorCompressedBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorCompressedBytesSentPersec sets the value of CompressorCompressedBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorCompressedBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("CompressorCompressedBytesSentPersec", (value)) +} + +// GetCompressorCompressedBytesSentPersec gets the value of CompressorCompressedBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorCompressedBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorCompressedBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorEnabledThreads sets the value of CompressorEnabledThreads for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorEnabledThreads(value uint64) (err error) { + return instance.SetProperty("CompressorEnabledThreads", (value)) +} + +// GetCompressorEnabledThreads gets the value of CompressorEnabledThreads for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorEnabledThreads() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorEnabledThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressorMaximumThreads sets the value of CompressorMaximumThreads for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyCompressorMaximumThreads(value uint64) (err error) { + return instance.SetProperty("CompressorMaximumThreads", (value)) +} + +// GetCompressorMaximumThreads gets the value of CompressorMaximumThreads for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyCompressorMaximumThreads() (value uint64, err error) { + retValue, err := instance.GetProperty("CompressorMaximumThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerBytesReadPersec sets the value of MemoryWalkerBytesReadPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerBytesReadPersec(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerBytesReadPersec", (value)) +} + +// GetMemoryWalkerBytesReadPersec gets the value of MemoryWalkerBytesReadPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerBytesReadPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerBytesReadPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerBytesSentforCompression sets the value of MemoryWalkerBytesSentforCompression for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerBytesSentforCompression(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerBytesSentforCompression", (value)) +} + +// GetMemoryWalkerBytesSentforCompression gets the value of MemoryWalkerBytesSentforCompression for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerBytesSentforCompression() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerBytesSentforCompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerBytesSentforCompressionPersec sets the value of MemoryWalkerBytesSentforCompressionPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerBytesSentforCompressionPersec(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerBytesSentforCompressionPersec", (value)) +} + +// GetMemoryWalkerBytesSentforCompressionPersec gets the value of MemoryWalkerBytesSentforCompressionPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerBytesSentforCompressionPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerBytesSentforCompressionPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerMaximumThreads sets the value of MemoryWalkerMaximumThreads for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerMaximumThreads(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerMaximumThreads", (value)) +} + +// GetMemoryWalkerMaximumThreads gets the value of MemoryWalkerMaximumThreads for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerMaximumThreads() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerMaximumThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerUncompressedBytesSent sets the value of MemoryWalkerUncompressedBytesSent for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerUncompressedBytesSent(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerUncompressedBytesSent", (value)) +} + +// GetMemoryWalkerUncompressedBytesSent gets the value of MemoryWalkerUncompressedBytesSent for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerUncompressedBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerUncompressedBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryWalkerUncompressedBytesSentPersec sets the value of MemoryWalkerUncompressedBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyMemoryWalkerUncompressedBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("MemoryWalkerUncompressedBytesSentPersec", (value)) +} + +// GetMemoryWalkerUncompressedBytesSentPersec gets the value of MemoryWalkerUncompressedBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyMemoryWalkerUncompressedBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryWalkerUncompressedBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverBytesPendingDecompression sets the value of ReceiverBytesPendingDecompression for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverBytesPendingDecompression(value uint64) (err error) { + return instance.SetProperty("ReceiverBytesPendingDecompression", (value)) +} + +// GetReceiverBytesPendingDecompression gets the value of ReceiverBytesPendingDecompression for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverBytesPendingDecompression() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverBytesPendingDecompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverBytesPendingWrite sets the value of ReceiverBytesPendingWrite for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverBytesPendingWrite(value uint64) (err error) { + return instance.SetProperty("ReceiverBytesPendingWrite", (value)) +} + +// GetReceiverBytesPendingWrite gets the value of ReceiverBytesPendingWrite for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverBytesPendingWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverBytesPendingWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverBytesWrittenPersec sets the value of ReceiverBytesWrittenPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverBytesWrittenPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverBytesWrittenPersec", (value)) +} + +// GetReceiverBytesWrittenPersec gets the value of ReceiverBytesWrittenPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverBytesWrittenPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverBytesWrittenPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverCompressedBytesReceivedPersec sets the value of ReceiverCompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverCompressedBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverCompressedBytesReceivedPersec", (value)) +} + +// GetReceiverCompressedBytesReceivedPersec gets the value of ReceiverCompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverCompressedBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverCompressedBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverDecompressedBytesPersec sets the value of ReceiverDecompressedBytesPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverDecompressedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverDecompressedBytesPersec", (value)) +} + +// GetReceiverDecompressedBytesPersec gets the value of ReceiverDecompressedBytesPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverDecompressedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverDecompressedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverMaximumThreadpoolThreadCount sets the value of ReceiverMaximumThreadpoolThreadCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverMaximumThreadpoolThreadCount(value uint64) (err error) { + return instance.SetProperty("ReceiverMaximumThreadpoolThreadCount", (value)) +} + +// GetReceiverMaximumThreadpoolThreadCount gets the value of ReceiverMaximumThreadpoolThreadCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverMaximumThreadpoolThreadCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverMaximumThreadpoolThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiverUncompressedBytesReceivedPersec sets the value of ReceiverUncompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyReceiverUncompressedBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("ReceiverUncompressedBytesReceivedPersec", (value)) +} + +// GetReceiverUncompressedBytesReceivedPersec gets the value of ReceiverUncompressedBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyReceiverUncompressedBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiverUncompressedBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportBytesSent sets the value of SMBTransportBytesSent for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportBytesSent(value uint64) (err error) { + return instance.SetProperty("SMBTransportBytesSent", (value)) +} + +// GetSMBTransportBytesSent gets the value of SMBTransportBytesSent for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportBytesSentPersec sets the value of SMBTransportBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("SMBTransportBytesSentPersec", (value)) +} + +// GetSMBTransportBytesSentPersec gets the value of SMBTransportBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportPendingSendBytes sets the value of SMBTransportPendingSendBytes for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportPendingSendBytes(value uint64) (err error) { + return instance.SetProperty("SMBTransportPendingSendBytes", (value)) +} + +// GetSMBTransportPendingSendBytes gets the value of SMBTransportPendingSendBytes for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportPendingSendBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportPendingSendBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBTransportPendingSendCount sets the value of SMBTransportPendingSendCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertySMBTransportPendingSendCount(value uint64) (err error) { + return instance.SetProperty("SMBTransportPendingSendCount", (value)) +} + +// GetSMBTransportPendingSendCount gets the value of SMBTransportPendingSendCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertySMBTransportPendingSendCount() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBTransportPendingSendCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesPendingProcessing sets the value of TCPTransportBytesPendingProcessing for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesPendingProcessing(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesPendingProcessing", (value)) +} + +// GetTCPTransportBytesPendingProcessing gets the value of TCPTransportBytesPendingProcessing for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesPendingProcessing() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesPendingProcessing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesPendingSend sets the value of TCPTransportBytesPendingSend for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesPendingSend(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesPendingSend", (value)) +} + +// GetTCPTransportBytesPendingSend gets the value of TCPTransportBytesPendingSend for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesPendingSend() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesPendingSend") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesReceivedPersec sets the value of TCPTransportBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesReceivedPersec", (value)) +} + +// GetTCPTransportBytesReceivedPersec gets the value of TCPTransportBytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportBytesSentPersec sets the value of TCPTransportBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("TCPTransportBytesSentPersec", (value)) +} + +// GetTCPTransportBytesSentPersec gets the value of TCPTransportBytesSentPersec for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportPendingSendCount sets the value of TCPTransportPendingSendCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportPendingSendCount(value uint64) (err error) { + return instance.SetProperty("TCPTransportPendingSendCount", (value)) +} + +// GetTCPTransportPendingSendCount gets the value of TCPTransportPendingSendCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportPendingSendCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportPendingSendCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportPostedReceiveBufferCount sets the value of TCPTransportPostedReceiveBufferCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportPostedReceiveBufferCount(value uint64) (err error) { + return instance.SetProperty("TCPTransportPostedReceiveBufferCount", (value)) +} + +// GetTCPTransportPostedReceiveBufferCount gets the value of TCPTransportPostedReceiveBufferCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportPostedReceiveBufferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportPostedReceiveBufferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPTransportTotalbuffercount sets the value of TCPTransportTotalbuffercount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTCPTransportTotalbuffercount(value uint64) (err error) { + return instance.SetProperty("TCPTransportTotalbuffercount", (value)) +} + +// GetTCPTransportTotalbuffercount gets the value of TCPTransportTotalbuffercount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTCPTransportTotalbuffercount() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPTransportTotalbuffercount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferpassCPUCap sets the value of TransferpassCPUCap for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferpassCPUCap(value uint64) (err error) { + return instance.SetProperty("TransferpassCPUCap", (value)) +} + +// GetTransferpassCPUCap gets the value of TransferpassCPUCap for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferpassCPUCap() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferpassCPUCap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferpassDirtyPageCount sets the value of TransferpassDirtyPageCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferpassDirtyPageCount(value uint64) (err error) { + return instance.SetProperty("TransferpassDirtyPageCount", (value)) +} + +// GetTransferpassDirtyPageCount gets the value of TransferpassDirtyPageCount for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferpassDirtyPageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferpassDirtyPageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferPassIsblackout sets the value of TransferPassIsblackout for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferPassIsblackout(value uint64) (err error) { + return instance.SetProperty("TransferPassIsblackout", (value)) +} + +// GetTransferPassIsblackout gets the value of TransferPassIsblackout for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferPassIsblackout() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferPassIsblackout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransferPassNumber sets the value of TransferPassNumber for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) SetPropertyTransferPassNumber(value uint64) (err error) { + return instance.SetProperty("TransferPassNumber", (value)) +} + +// GetTransferPassNumber gets the value of TransferPassNumber for the instance +func (instance *Win32_PerfRawData_LmPerfProvider_HyperVVMLiveMigration) GetPropertyTransferPassNumber() (value uint64, err error) { + retValue, err := instance.GetProperty("TransferPassNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LocalSessionManager_TerminalServices.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LocalSessionManager_TerminalServices.go new file mode 100644 index 00000000..f6268197 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_LocalSessionManager_TerminalServices.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_LocalSessionManager_TerminalServices struct +type Win32_PerfRawData_LocalSessionManager_TerminalServices struct { + *Win32_PerfRawData + + // + ActiveSessions uint32 + + // + InactiveSessions uint32 + + // + TotalSessions uint32 +} + +func NewWin32_PerfRawData_LocalSessionManager_TerminalServicesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_LocalSessionManager_TerminalServices, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LocalSessionManager_TerminalServices{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_LocalSessionManager_TerminalServicesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_LocalSessionManager_TerminalServices, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_LocalSessionManager_TerminalServices{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveSessions sets the value of ActiveSessions for the instance +func (instance *Win32_PerfRawData_LocalSessionManager_TerminalServices) SetPropertyActiveSessions(value uint32) (err error) { + return instance.SetProperty("ActiveSessions", (value)) +} + +// GetActiveSessions gets the value of ActiveSessions for the instance +func (instance *Win32_PerfRawData_LocalSessionManager_TerminalServices) GetPropertyActiveSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInactiveSessions sets the value of InactiveSessions for the instance +func (instance *Win32_PerfRawData_LocalSessionManager_TerminalServices) SetPropertyInactiveSessions(value uint32) (err error) { + return instance.SetProperty("InactiveSessions", (value)) +} + +// GetInactiveSessions gets the value of InactiveSessions for the instance +func (instance *Win32_PerfRawData_LocalSessionManager_TerminalServices) GetPropertyInactiveSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("InactiveSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSessions sets the value of TotalSessions for the instance +func (instance *Win32_PerfRawData_LocalSessionManager_TerminalServices) SetPropertyTotalSessions(value uint32) (err error) { + return instance.SetProperty("TotalSessions", (value)) +} + +// GetTotalSessions gets the value of TotalSessions for the instance +func (instance *Win32_PerfRawData_LocalSessionManager_TerminalServices) GetPropertyTotalSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecurityPerProcessStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecurityPerProcessStatistics.go new file mode 100644 index 00000000..be47f144 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecurityPerProcessStatistics.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Lsa_SecurityPerProcessStatistics struct +type Win32_PerfRawData_Lsa_SecurityPerProcessStatistics struct { + *Win32_PerfRawData + + // + ContextHandles uint32 + + // + CredentialHandles uint32 +} + +func NewWin32_PerfRawData_Lsa_SecurityPerProcessStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Lsa_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Lsa_SecurityPerProcessStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Lsa_SecurityPerProcessStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Lsa_SecurityPerProcessStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Lsa_SecurityPerProcessStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetContextHandles sets the value of ContextHandles for the instance +func (instance *Win32_PerfRawData_Lsa_SecurityPerProcessStatistics) SetPropertyContextHandles(value uint32) (err error) { + return instance.SetProperty("ContextHandles", (value)) +} + +// GetContextHandles gets the value of ContextHandles for the instance +func (instance *Win32_PerfRawData_Lsa_SecurityPerProcessStatistics) GetPropertyContextHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCredentialHandles sets the value of CredentialHandles for the instance +func (instance *Win32_PerfRawData_Lsa_SecurityPerProcessStatistics) SetPropertyCredentialHandles(value uint32) (err error) { + return instance.SetProperty("CredentialHandles", (value)) +} + +// GetCredentialHandles gets the value of CredentialHandles for the instance +func (instance *Win32_PerfRawData_Lsa_SecurityPerProcessStatistics) GetPropertyCredentialHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("CredentialHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecuritySystemWideStatistics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecuritySystemWideStatistics.go new file mode 100644 index 00000000..12db60de --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Lsa_SecuritySystemWideStatistics.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Lsa_SecuritySystemWideStatistics struct +type Win32_PerfRawData_Lsa_SecuritySystemWideStatistics struct { + *Win32_PerfRawData + + // + ActiveSchannelSessionCacheEntries uint32 + + // + DigestAuthentications uint32 + + // + ForwardedKerberosRequests uint32 + + // + KDCarmoredASRequests uint32 + + // + KDCarmoredTGSRequests uint32 + + // + KDCASRequests uint32 + + // + KDCclaimsawareASRequests uint32 + + // + KDCclaimsawareserviceassertedidentityTGSrequests uint32 + + // + KDCclaimsawareTGSRequests uint32 + + // + KDCclassictypeconstraineddelegationTGSRequests uint32 + + // + KDCkeytrustASRequests uint32 + + // + KDCresourcetypeconstraineddelegationTGSRequests uint32 + + // + KDCTGSRequests uint32 + + // + KerberosAuthentications uint32 + + // + NTLMAuthentications uint32 + + // + SchannelSessionCacheEntries uint32 + + // + SSLClientSideFullHandshakes uint32 + + // + SSLClientSideReconnectHandshakes uint32 + + // + SSLServerSideFullHandshakes uint32 + + // + SSLServerSideReconnectHandshakes uint32 +} + +func NewWin32_PerfRawData_Lsa_SecuritySystemWideStatisticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Lsa_SecuritySystemWideStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Lsa_SecuritySystemWideStatisticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Lsa_SecuritySystemWideStatistics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveSchannelSessionCacheEntries sets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyActiveSchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("ActiveSchannelSessionCacheEntries", (value)) +} + +// GetActiveSchannelSessionCacheEntries gets the value of ActiveSchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyActiveSchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveSchannelSessionCacheEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDigestAuthentications sets the value of DigestAuthentications for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyDigestAuthentications(value uint32) (err error) { + return instance.SetProperty("DigestAuthentications", (value)) +} + +// GetDigestAuthentications gets the value of DigestAuthentications for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyDigestAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("DigestAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForwardedKerberosRequests sets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyForwardedKerberosRequests(value uint32) (err error) { + return instance.SetProperty("ForwardedKerberosRequests", (value)) +} + +// GetForwardedKerberosRequests gets the value of ForwardedKerberosRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyForwardedKerberosRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("ForwardedKerberosRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCarmoredASRequests sets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCarmoredASRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredASRequests", (value)) +} + +// GetKDCarmoredASRequests gets the value of KDCarmoredASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCarmoredASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCarmoredTGSRequests sets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCarmoredTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCarmoredTGSRequests", (value)) +} + +// GetKDCarmoredTGSRequests gets the value of KDCarmoredTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCarmoredTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCarmoredTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCASRequests sets the value of KDCASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCASRequests(value uint32) (err error) { + return instance.SetProperty("KDCASRequests", (value)) +} + +// GetKDCASRequests gets the value of KDCASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclaimsawareASRequests sets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareASRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareASRequests", (value)) +} + +// GetKDCclaimsawareASRequests gets the value of KDCclaimsawareASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclaimsawareserviceassertedidentityTGSrequests sets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareserviceassertedidentityTGSrequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareserviceassertedidentityTGSrequests", (value)) +} + +// GetKDCclaimsawareserviceassertedidentityTGSrequests gets the value of KDCclaimsawareserviceassertedidentityTGSrequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareserviceassertedidentityTGSrequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareserviceassertedidentityTGSrequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclaimsawareTGSRequests sets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclaimsawareTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclaimsawareTGSRequests", (value)) +} + +// GetKDCclaimsawareTGSRequests gets the value of KDCclaimsawareTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclaimsawareTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclaimsawareTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCclassictypeconstraineddelegationTGSRequests sets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCclassictypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCclassictypeconstraineddelegationTGSRequests", (value)) +} + +// GetKDCclassictypeconstraineddelegationTGSRequests gets the value of KDCclassictypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCclassictypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCclassictypeconstraineddelegationTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCkeytrustASRequests sets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCkeytrustASRequests(value uint32) (err error) { + return instance.SetProperty("KDCkeytrustASRequests", (value)) +} + +// GetKDCkeytrustASRequests gets the value of KDCkeytrustASRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCkeytrustASRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCkeytrustASRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCresourcetypeconstraineddelegationTGSRequests sets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCresourcetypeconstraineddelegationTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCresourcetypeconstraineddelegationTGSRequests", (value)) +} + +// GetKDCresourcetypeconstraineddelegationTGSRequests gets the value of KDCresourcetypeconstraineddelegationTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCresourcetypeconstraineddelegationTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCresourcetypeconstraineddelegationTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKDCTGSRequests sets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKDCTGSRequests(value uint32) (err error) { + return instance.SetProperty("KDCTGSRequests", (value)) +} + +// GetKDCTGSRequests gets the value of KDCTGSRequests for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKDCTGSRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("KDCTGSRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKerberosAuthentications sets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyKerberosAuthentications(value uint32) (err error) { + return instance.SetProperty("KerberosAuthentications", (value)) +} + +// GetKerberosAuthentications gets the value of KerberosAuthentications for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyKerberosAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("KerberosAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNTLMAuthentications sets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertyNTLMAuthentications(value uint32) (err error) { + return instance.SetProperty("NTLMAuthentications", (value)) +} + +// GetNTLMAuthentications gets the value of NTLMAuthentications for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertyNTLMAuthentications() (value uint32, err error) { + retValue, err := instance.GetProperty("NTLMAuthentications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSchannelSessionCacheEntries sets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertySchannelSessionCacheEntries(value uint32) (err error) { + return instance.SetProperty("SchannelSessionCacheEntries", (value)) +} + +// GetSchannelSessionCacheEntries gets the value of SchannelSessionCacheEntries for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertySchannelSessionCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SchannelSessionCacheEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLClientSideFullHandshakes sets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertySSLClientSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideFullHandshakes", (value)) +} + +// GetSSLClientSideFullHandshakes gets the value of SSLClientSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertySSLClientSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideFullHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLClientSideReconnectHandshakes sets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertySSLClientSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLClientSideReconnectHandshakes", (value)) +} + +// GetSSLClientSideReconnectHandshakes gets the value of SSLClientSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertySSLClientSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLClientSideReconnectHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLServerSideFullHandshakes sets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertySSLServerSideFullHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideFullHandshakes", (value)) +} + +// GetSSLServerSideFullHandshakes gets the value of SSLServerSideFullHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertySSLServerSideFullHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideFullHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSSLServerSideReconnectHandshakes sets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) SetPropertySSLServerSideReconnectHandshakes(value uint32) (err error) { + return instance.SetProperty("SSLServerSideReconnectHandshakes", (value)) +} + +// GetSSLServerSideReconnectHandshakes gets the value of SSLServerSideReconnectHandshakes for the instance +func (instance *Win32_PerfRawData_Lsa_SecuritySystemWideStatistics) GetPropertySSLServerSideReconnectHandshakes() (value uint32, err error) { + retValue, err := instance.GetProperty("SSLServerSideReconnectHandshakes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000.go new file mode 100644 index 00000000..e19dcb28 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000.go @@ -0,0 +1,380 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000 struct +type Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000 struct { + *Win32_PerfRawData + + // + Averageparticipantcommitresponsetime uint32 + + // + Averageparticipantcommitresponsetime_Base uint32 + + // + Averageparticipantprepareresponsetime uint32 + + // + Averageparticipantprepareresponsetime_Base uint32 + + // + CommitretrycountPersec uint32 + + // + FaultsreceivedcountPersec uint32 + + // + FaultssentcountPersec uint32 + + // + MessagesendfailuresPersec uint32 + + // + PreparedretrycountPersec uint32 + + // + PrepareretrycountPersec uint32 + + // + ReplayretrycountPersec uint32 +} + +func NewWin32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageparticipantcommitresponsetime sets the value of Averageparticipantcommitresponsetime for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyAverageparticipantcommitresponsetime(value uint32) (err error) { + return instance.SetProperty("Averageparticipantcommitresponsetime", (value)) +} + +// GetAverageparticipantcommitresponsetime gets the value of Averageparticipantcommitresponsetime for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyAverageparticipantcommitresponsetime() (value uint32, err error) { + retValue, err := instance.GetProperty("Averageparticipantcommitresponsetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageparticipantcommitresponsetime_Base sets the value of Averageparticipantcommitresponsetime_Base for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyAverageparticipantcommitresponsetime_Base(value uint32) (err error) { + return instance.SetProperty("Averageparticipantcommitresponsetime_Base", (value)) +} + +// GetAverageparticipantcommitresponsetime_Base gets the value of Averageparticipantcommitresponsetime_Base for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyAverageparticipantcommitresponsetime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averageparticipantcommitresponsetime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageparticipantprepareresponsetime sets the value of Averageparticipantprepareresponsetime for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyAverageparticipantprepareresponsetime(value uint32) (err error) { + return instance.SetProperty("Averageparticipantprepareresponsetime", (value)) +} + +// GetAverageparticipantprepareresponsetime gets the value of Averageparticipantprepareresponsetime for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyAverageparticipantprepareresponsetime() (value uint32, err error) { + retValue, err := instance.GetProperty("Averageparticipantprepareresponsetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageparticipantprepareresponsetime_Base sets the value of Averageparticipantprepareresponsetime_Base for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyAverageparticipantprepareresponsetime_Base(value uint32) (err error) { + return instance.SetProperty("Averageparticipantprepareresponsetime_Base", (value)) +} + +// GetAverageparticipantprepareresponsetime_Base gets the value of Averageparticipantprepareresponsetime_Base for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyAverageparticipantprepareresponsetime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averageparticipantprepareresponsetime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitretrycountPersec sets the value of CommitretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyCommitretrycountPersec(value uint32) (err error) { + return instance.SetProperty("CommitretrycountPersec", (value)) +} + +// GetCommitretrycountPersec gets the value of CommitretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyCommitretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CommitretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFaultsreceivedcountPersec sets the value of FaultsreceivedcountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyFaultsreceivedcountPersec(value uint32) (err error) { + return instance.SetProperty("FaultsreceivedcountPersec", (value)) +} + +// GetFaultsreceivedcountPersec gets the value of FaultsreceivedcountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyFaultsreceivedcountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FaultsreceivedcountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFaultssentcountPersec sets the value of FaultssentcountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyFaultssentcountPersec(value uint32) (err error) { + return instance.SetProperty("FaultssentcountPersec", (value)) +} + +// GetFaultssentcountPersec gets the value of FaultssentcountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyFaultssentcountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FaultssentcountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesendfailuresPersec sets the value of MessagesendfailuresPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyMessagesendfailuresPersec(value uint32) (err error) { + return instance.SetProperty("MessagesendfailuresPersec", (value)) +} + +// GetMessagesendfailuresPersec gets the value of MessagesendfailuresPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyMessagesendfailuresPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesendfailuresPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPreparedretrycountPersec sets the value of PreparedretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyPreparedretrycountPersec(value uint32) (err error) { + return instance.SetProperty("PreparedretrycountPersec", (value)) +} + +// GetPreparedretrycountPersec gets the value of PreparedretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyPreparedretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PreparedretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrepareretrycountPersec sets the value of PrepareretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyPrepareretrycountPersec(value uint32) (err error) { + return instance.SetProperty("PrepareretrycountPersec", (value)) +} + +// GetPrepareretrycountPersec gets the value of PrepareretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyPrepareretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PrepareretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReplayretrycountPersec sets the value of ReplayretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) SetPropertyReplayretrycountPersec(value uint32) (err error) { + return instance.SetProperty("ReplayretrycountPersec", (value)) +} + +// GetReplayretrycountPersec gets the value of ReplayretrycountPersec for the instance +func (instance *Win32_PerfRawData_MSDTCBridge4000_MSDTCBridge4000) GetPropertyReplayretrycountPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReplayretrycountPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator.go new file mode 100644 index 00000000..af502fcf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator struct +type Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator struct { + *Win32_PerfRawData + + // + AbortedTransactions uint32 + + // + AbortedTransactionsPersec uint32 + + // + ActiveTransactions uint32 + + // + ActiveTransactionsMaximum uint32 + + // + CommittedTransactions uint32 + + // + CommittedTransactionsPersec uint32 + + // + ForceAbortedTransactions uint32 + + // + ForceCommittedTransactions uint32 + + // + InDoubtTransactions uint32 + + // + ResponseTimeAverage uint32 + + // + ResponseTimeMaximum uint32 + + // + ResponseTimeMinimum uint32 + + // + TransactionsPersec uint32 +} + +func NewWin32_PerfRawData_MSDTC_DistributedTransactionCoordinatorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_MSDTC_DistributedTransactionCoordinatorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAbortedTransactions sets the value of AbortedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyAbortedTransactions(value uint32) (err error) { + return instance.SetProperty("AbortedTransactions", (value)) +} + +// GetAbortedTransactions gets the value of AbortedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyAbortedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("AbortedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAbortedTransactionsPersec sets the value of AbortedTransactionsPersec for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyAbortedTransactionsPersec(value uint32) (err error) { + return instance.SetProperty("AbortedTransactionsPersec", (value)) +} + +// GetAbortedTransactionsPersec gets the value of AbortedTransactionsPersec for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyAbortedTransactionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AbortedTransactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveTransactions sets the value of ActiveTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyActiveTransactions(value uint32) (err error) { + return instance.SetProperty("ActiveTransactions", (value)) +} + +// GetActiveTransactions gets the value of ActiveTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyActiveTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveTransactionsMaximum sets the value of ActiveTransactionsMaximum for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyActiveTransactionsMaximum(value uint32) (err error) { + return instance.SetProperty("ActiveTransactionsMaximum", (value)) +} + +// GetActiveTransactionsMaximum gets the value of ActiveTransactionsMaximum for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyActiveTransactionsMaximum() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTransactionsMaximum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommittedTransactions sets the value of CommittedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyCommittedTransactions(value uint32) (err error) { + return instance.SetProperty("CommittedTransactions", (value)) +} + +// GetCommittedTransactions gets the value of CommittedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyCommittedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("CommittedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommittedTransactionsPersec sets the value of CommittedTransactionsPersec for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyCommittedTransactionsPersec(value uint32) (err error) { + return instance.SetProperty("CommittedTransactionsPersec", (value)) +} + +// GetCommittedTransactionsPersec gets the value of CommittedTransactionsPersec for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyCommittedTransactionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CommittedTransactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForceAbortedTransactions sets the value of ForceAbortedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyForceAbortedTransactions(value uint32) (err error) { + return instance.SetProperty("ForceAbortedTransactions", (value)) +} + +// GetForceAbortedTransactions gets the value of ForceAbortedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyForceAbortedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("ForceAbortedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetForceCommittedTransactions sets the value of ForceCommittedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyForceCommittedTransactions(value uint32) (err error) { + return instance.SetProperty("ForceCommittedTransactions", (value)) +} + +// GetForceCommittedTransactions gets the value of ForceCommittedTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyForceCommittedTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("ForceCommittedTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInDoubtTransactions sets the value of InDoubtTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyInDoubtTransactions(value uint32) (err error) { + return instance.SetProperty("InDoubtTransactions", (value)) +} + +// GetInDoubtTransactions gets the value of InDoubtTransactions for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyInDoubtTransactions() (value uint32, err error) { + retValue, err := instance.GetProperty("InDoubtTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeAverage sets the value of ResponseTimeAverage for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyResponseTimeAverage(value uint32) (err error) { + return instance.SetProperty("ResponseTimeAverage", (value)) +} + +// GetResponseTimeAverage gets the value of ResponseTimeAverage for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyResponseTimeAverage() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeAverage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeMaximum sets the value of ResponseTimeMaximum for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyResponseTimeMaximum(value uint32) (err error) { + return instance.SetProperty("ResponseTimeMaximum", (value)) +} + +// GetResponseTimeMaximum gets the value of ResponseTimeMaximum for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyResponseTimeMaximum() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeMaximum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeMinimum sets the value of ResponseTimeMinimum for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyResponseTimeMinimum(value uint32) (err error) { + return instance.SetProperty("ResponseTimeMinimum", (value)) +} + +// GetResponseTimeMinimum gets the value of ResponseTimeMinimum for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyResponseTimeMinimum() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeMinimum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsPersec sets the value of TransactionsPersec for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) SetPropertyTransactionsPersec(value uint32) (err error) { + return instance.SetProperty("TransactionsPersec", (value)) +} + +// GetTransactionsPersec gets the value of TransactionsPersec for the instance +func (instance *Win32_PerfRawData_MSDTC_DistributedTransactionCoordinator) GetPropertyTransactionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go new file mode 100644 index 00000000..a70c2d26 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice struct +type Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice struct { + *Win32_PerfRawData + + // + NumberofconnectedVMTchannels uint32 + + // + NumberofcreatedVMTchannels uint32 + + // + NumberofdisconnectedVMTchannels uint32 + + // + NumberofRDVGMrestartednotifications uint32 + + // + NumberofwaitingVMTchannels uint32 + + // + TotalnumberofcreatedVMTchannels uint32 +} + +func NewWin32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberofconnectedVMTchannels sets the value of NumberofconnectedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofconnectedVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofconnectedVMTchannels", (value)) +} + +// GetNumberofconnectedVMTchannels gets the value of NumberofconnectedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofconnectedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofconnectedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcreatedVMTchannels sets the value of NumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofcreatedVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofcreatedVMTchannels", (value)) +} + +// GetNumberofcreatedVMTchannels gets the value of NumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofcreatedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofcreatedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdisconnectedVMTchannels sets the value of NumberofdisconnectedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofdisconnectedVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofdisconnectedVMTchannels", (value)) +} + +// GetNumberofdisconnectedVMTchannels gets the value of NumberofdisconnectedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofdisconnectedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofdisconnectedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofRDVGMrestartednotifications sets the value of NumberofRDVGMrestartednotifications for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofRDVGMrestartednotifications(value uint32) (err error) { + return instance.SetProperty("NumberofRDVGMrestartednotifications", (value)) +} + +// GetNumberofRDVGMrestartednotifications gets the value of NumberofRDVGMrestartednotifications for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofRDVGMrestartednotifications() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofRDVGMrestartednotifications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofwaitingVMTchannels sets the value of NumberofwaitingVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyNumberofwaitingVMTchannels(value uint32) (err error) { + return instance.SetProperty("NumberofwaitingVMTchannels", (value)) +} + +// GetNumberofwaitingVMTchannels gets the value of NumberofwaitingVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyNumberofwaitingVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofwaitingVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalnumberofcreatedVMTchannels sets the value of TotalnumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) SetPropertyTotalnumberofcreatedVMTchannels(value uint32) (err error) { + return instance.SetProperty("TotalnumberofcreatedVMTchannels", (value)) +} + +// GetTotalnumberofcreatedVMTchannels gets the value of TotalnumberofcreatedVMTchannels for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMDevice) GetPropertyTotalnumberofcreatedVMTchannels() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalnumberofcreatedVMTchannels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go new file mode 100644 index 00000000..0f375943 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel struct +type Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel struct { + *Win32_PerfRawData + + // + Numberofdataavailableeventwasreset uint32 + + // + Numberofdataavailableeventwasresetpersecond uint64 + + // + Numberofdataavailablesignalsreceived uint32 + + // + Numberofdataavailablesignalsreceivedpersecond uint64 + + // + Numberofdataavailablesignalssent uint32 + + // + Numberofdataavailablesignalssentpersecond uint64 + + // + Numberofspaceavailableeventwasreset uint32 + + // + Numberofspaceavailableeventwasresetpersecond uint64 + + // + Numberofspaceavailablesignalsreceived uint32 + + // + Numberofspaceavailablesignalsreceivedpersecond uint64 + + // + Numberofspaceavailablesignalssent uint32 + + // + Numberofspaceavailablesignalssentpersecond uint64 +} + +func NewWin32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannelEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannelEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberofdataavailableeventwasreset sets the value of Numberofdataavailableeventwasreset for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailableeventwasreset(value uint32) (err error) { + return instance.SetProperty("Numberofdataavailableeventwasreset", (value)) +} + +// GetNumberofdataavailableeventwasreset gets the value of Numberofdataavailableeventwasreset for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailableeventwasreset() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofdataavailableeventwasreset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdataavailableeventwasresetpersecond sets the value of Numberofdataavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailableeventwasresetpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofdataavailableeventwasresetpersecond", (value)) +} + +// GetNumberofdataavailableeventwasresetpersecond gets the value of Numberofdataavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailableeventwasresetpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofdataavailableeventwasresetpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofdataavailablesignalsreceived sets the value of Numberofdataavailablesignalsreceived for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalsreceived(value uint32) (err error) { + return instance.SetProperty("Numberofdataavailablesignalsreceived", (value)) +} + +// GetNumberofdataavailablesignalsreceived gets the value of Numberofdataavailablesignalsreceived for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalsreceived() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdataavailablesignalsreceivedpersecond sets the value of Numberofdataavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalsreceivedpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofdataavailablesignalsreceivedpersecond", (value)) +} + +// GetNumberofdataavailablesignalsreceivedpersecond gets the value of Numberofdataavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalsreceivedpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalsreceivedpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofdataavailablesignalssent sets the value of Numberofdataavailablesignalssent for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalssent(value uint32) (err error) { + return instance.SetProperty("Numberofdataavailablesignalssent", (value)) +} + +// GetNumberofdataavailablesignalssent gets the value of Numberofdataavailablesignalssent for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalssent() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofdataavailablesignalssentpersecond sets the value of Numberofdataavailablesignalssentpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofdataavailablesignalssentpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofdataavailablesignalssentpersecond", (value)) +} + +// GetNumberofdataavailablesignalssentpersecond gets the value of Numberofdataavailablesignalssentpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofdataavailablesignalssentpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofdataavailablesignalssentpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofspaceavailableeventwasreset sets the value of Numberofspaceavailableeventwasreset for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailableeventwasreset(value uint32) (err error) { + return instance.SetProperty("Numberofspaceavailableeventwasreset", (value)) +} + +// GetNumberofspaceavailableeventwasreset gets the value of Numberofspaceavailableeventwasreset for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailableeventwasreset() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailableeventwasreset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofspaceavailableeventwasresetpersecond sets the value of Numberofspaceavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailableeventwasresetpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofspaceavailableeventwasresetpersecond", (value)) +} + +// GetNumberofspaceavailableeventwasresetpersecond gets the value of Numberofspaceavailableeventwasresetpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailableeventwasresetpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailableeventwasresetpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalsreceived sets the value of Numberofspaceavailablesignalsreceived for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalsreceived(value uint32) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalsreceived", (value)) +} + +// GetNumberofspaceavailablesignalsreceived gets the value of Numberofspaceavailablesignalsreceived for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalsreceived() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalsreceivedpersecond sets the value of Numberofspaceavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalsreceivedpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalsreceivedpersecond", (value)) +} + +// GetNumberofspaceavailablesignalsreceivedpersecond gets the value of Numberofspaceavailablesignalsreceivedpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalsreceivedpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalsreceivedpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalssent sets the value of Numberofspaceavailablesignalssent for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalssent(value uint32) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalssent", (value)) +} + +// GetNumberofspaceavailablesignalssent gets the value of Numberofspaceavailablesignalssent for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalssent() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofspaceavailablesignalssentpersecond sets the value of Numberofspaceavailablesignalssentpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) SetPropertyNumberofspaceavailablesignalssentpersecond(value uint64) (err error) { + return instance.SetProperty("Numberofspaceavailablesignalssentpersecond", (value)) +} + +// GetNumberofspaceavailablesignalssentpersecond gets the value of Numberofspaceavailablesignalssentpersecond for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsRemoteDesktopServicesRemoteFXSynth3dvsc_RemoteFXSynth3DVSCVMTransportChannel) GetPropertyNumberofspaceavailablesignalssentpersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Numberofspaceavailablesignalssentpersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go new file mode 100644 index 00000000..735e8293 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService struct +type Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService struct { + *Win32_PerfRawData + + // + ClockFrequencyAdjustment uint32 + + // + ClockFrequencyAdjustmentPPB uint32 + + // + ComputedTimeOffset uint64 + + // + NTPClientTimeSourceCount uint32 + + // + NTPRoundtripDelay uint32 + + // + NTPServerIncomingRequests uint64 + + // + NTPServerOutgoingResponses uint64 +} + +func NewWin32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService{ + Win32_PerfRawData: tmp, + } + return +} + +// SetClockFrequencyAdjustment sets the value of ClockFrequencyAdjustment for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyClockFrequencyAdjustment(value uint32) (err error) { + return instance.SetProperty("ClockFrequencyAdjustment", (value)) +} + +// GetClockFrequencyAdjustment gets the value of ClockFrequencyAdjustment for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyClockFrequencyAdjustment() (value uint32, err error) { + retValue, err := instance.GetProperty("ClockFrequencyAdjustment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClockFrequencyAdjustmentPPB sets the value of ClockFrequencyAdjustmentPPB for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyClockFrequencyAdjustmentPPB(value uint32) (err error) { + return instance.SetProperty("ClockFrequencyAdjustmentPPB", (value)) +} + +// GetClockFrequencyAdjustmentPPB gets the value of ClockFrequencyAdjustmentPPB for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyClockFrequencyAdjustmentPPB() (value uint32, err error) { + retValue, err := instance.GetProperty("ClockFrequencyAdjustmentPPB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetComputedTimeOffset sets the value of ComputedTimeOffset for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyComputedTimeOffset(value uint64) (err error) { + return instance.SetProperty("ComputedTimeOffset", (value)) +} + +// GetComputedTimeOffset gets the value of ComputedTimeOffset for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyComputedTimeOffset() (value uint64, err error) { + retValue, err := instance.GetProperty("ComputedTimeOffset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNTPClientTimeSourceCount sets the value of NTPClientTimeSourceCount for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPClientTimeSourceCount(value uint32) (err error) { + return instance.SetProperty("NTPClientTimeSourceCount", (value)) +} + +// GetNTPClientTimeSourceCount gets the value of NTPClientTimeSourceCount for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPClientTimeSourceCount() (value uint32, err error) { + retValue, err := instance.GetProperty("NTPClientTimeSourceCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNTPRoundtripDelay sets the value of NTPRoundtripDelay for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPRoundtripDelay(value uint32) (err error) { + return instance.SetProperty("NTPRoundtripDelay", (value)) +} + +// GetNTPRoundtripDelay gets the value of NTPRoundtripDelay for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPRoundtripDelay() (value uint32, err error) { + retValue, err := instance.GetProperty("NTPRoundtripDelay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNTPServerIncomingRequests sets the value of NTPServerIncomingRequests for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPServerIncomingRequests(value uint64) (err error) { + return instance.SetProperty("NTPServerIncomingRequests", (value)) +} + +// GetNTPServerIncomingRequests gets the value of NTPServerIncomingRequests for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPServerIncomingRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("NTPServerIncomingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNTPServerOutgoingResponses sets the value of NTPServerOutgoingResponses for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) SetPropertyNTPServerOutgoingResponses(value uint64) (err error) { + return instance.SetProperty("NTPServerOutgoingResponses", (value)) +} + +// GetNTPServerOutgoingResponses gets the value of NTPServerOutgoingResponses for the instance +func (instance *Win32_PerfRawData_MicrosoftWindowsW32TimePerf_WindowsTimeService) GetPropertyNTPServerOutgoingResponses() (value uint64, err error) { + retValue, err := instance.GetProperty("NTPServerOutgoingResponses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go new file mode 100644 index 00000000..f0d722b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters.go @@ -0,0 +1,1520 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters struct +type Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters struct { + *Win32_PerfRawData + + // + ArrivedRDMACNPs uint64 + + // + CPUMEMpages4KmappedbyTPTforCQ uint32 + + // + CPUMEMpages4KmappedbyTPTforEQ uint32 + + // + CPUMEMpages4KmappedbyTPTforMR uint32 + + // + CPUMEMpages4KmappedbyTPTforQP uint32 + + // + CQMissPersec uint32 + + // + Currentqpsinerrorstate uint32 + + // + Currentqpsinlimitedstate uint32 + + // + Dcqcnreactionpointnewqprejectevents uint32 + + // + Dcqcnreactionpointnewqpshapedevents uint32 + + // + Dcqcnreactionpointqprateupdateevents uint32 + + // + Dcqcnreactionpointqpscheduleddelayedevents uint32 + + // + Dcqcnreactionpointqpschedulednotshapedevents uint32 + + // + Dcqcnreactionpointqpscheduledpermitedevents uint32 + + // + EQMissPersec uint32 + + // + ExternalBlueflamehitPersec uint32 + + // + ExternalBlueflameReplacePersec uint32 + + // + ExternalDoorbellDropPersec uint32 + + // + ExternalDoorbellPushPersec uint32 + + // + InternalProcessor0MaximumLatency uint32 + + // + InternalProcessor1MaximumLatency uint32 + + // + InternalProcessor2MaximumLatency uint32 + + // + InternalProcessor3MaximumLatency uint32 + + // + Internalprocessorexecutedcommands uint32 + + // + LastRestransmittedQP uint32 + + // + Maximumqpsinlimitedstate uint32 + + // + MPTentriesusedforCQ uint32 + + // + MPTentriesusedforEQ uint32 + + // + MPTentriesusedforMR uint32 + + // + MPTentriesusedforQP uint32 + + // + MPTMissPersec uint32 + + // + MTTentriesusedforCQ uint32 + + // + MTTentriesusedforEQ uint32 + + // + MTTentriesusedforMR uint32 + + // + MTTentriesusedforQP uint32 + + // + MTTMissPersec uint32 + + // + NoWQEDropsPersec uint32 + + // + Packetsdiscardedduetoinvalidqp uint64 + + // + PCIBackpressurePersec uint32 + + // + Qppriorityupdateflowevents uint32 + + // + ReceiveWQEcachehitPersec uint32 + + // + ReceiveWQEcachelookupPersec uint32 + + // + RQMissPersec uint32 + + // + ScatterBackpressurePersec uint32 + + // + SQMissPersec uint32 + + // + SteeringQPCBackpressurePersec uint32 + + // + Totalqpsinlimitedstate uint32 + + // + Transmissionenginehangevents uint32 + + // + WQEfetchPerAtomicBackpressurePersec uint32 +} + +func NewWin32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetArrivedRDMACNPs sets the value of ArrivedRDMACNPs for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyArrivedRDMACNPs(value uint64) (err error) { + return instance.SetProperty("ArrivedRDMACNPs", (value)) +} + +// GetArrivedRDMACNPs gets the value of ArrivedRDMACNPs for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyArrivedRDMACNPs() (value uint64, err error) { + retValue, err := instance.GetProperty("ArrivedRDMACNPs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforCQ sets the value of CPUMEMpages4KmappedbyTPTforCQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforCQ(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforCQ", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforCQ gets the value of CPUMEMpages4KmappedbyTPTforCQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforCQ() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforCQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforEQ sets the value of CPUMEMpages4KmappedbyTPTforEQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforEQ(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforEQ", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforEQ gets the value of CPUMEMpages4KmappedbyTPTforEQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforEQ() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforEQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforMR sets the value of CPUMEMpages4KmappedbyTPTforMR for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforMR(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforMR", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforMR gets the value of CPUMEMpages4KmappedbyTPTforMR for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforMR() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforMR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCPUMEMpages4KmappedbyTPTforQP sets the value of CPUMEMpages4KmappedbyTPTforQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCPUMEMpages4KmappedbyTPTforQP(value uint32) (err error) { + return instance.SetProperty("CPUMEMpages4KmappedbyTPTforQP", (value)) +} + +// GetCPUMEMpages4KmappedbyTPTforQP gets the value of CPUMEMpages4KmappedbyTPTforQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCPUMEMpages4KmappedbyTPTforQP() (value uint32, err error) { + retValue, err := instance.GetProperty("CPUMEMpages4KmappedbyTPTforQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCQMissPersec sets the value of CQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCQMissPersec(value uint32) (err error) { + return instance.SetProperty("CQMissPersec", (value)) +} + +// GetCQMissPersec gets the value of CQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentqpsinerrorstate sets the value of Currentqpsinerrorstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCurrentqpsinerrorstate(value uint32) (err error) { + return instance.SetProperty("Currentqpsinerrorstate", (value)) +} + +// GetCurrentqpsinerrorstate gets the value of Currentqpsinerrorstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCurrentqpsinerrorstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentqpsinerrorstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentqpsinlimitedstate sets the value of Currentqpsinlimitedstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyCurrentqpsinlimitedstate(value uint32) (err error) { + return instance.SetProperty("Currentqpsinlimitedstate", (value)) +} + +// GetCurrentqpsinlimitedstate gets the value of Currentqpsinlimitedstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyCurrentqpsinlimitedstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentqpsinlimitedstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointnewqprejectevents sets the value of Dcqcnreactionpointnewqprejectevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointnewqprejectevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointnewqprejectevents", (value)) +} + +// GetDcqcnreactionpointnewqprejectevents gets the value of Dcqcnreactionpointnewqprejectevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointnewqprejectevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointnewqprejectevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointnewqpshapedevents sets the value of Dcqcnreactionpointnewqpshapedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointnewqpshapedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointnewqpshapedevents", (value)) +} + +// GetDcqcnreactionpointnewqpshapedevents gets the value of Dcqcnreactionpointnewqpshapedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointnewqpshapedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointnewqpshapedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqprateupdateevents sets the value of Dcqcnreactionpointqprateupdateevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqprateupdateevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqprateupdateevents", (value)) +} + +// GetDcqcnreactionpointqprateupdateevents gets the value of Dcqcnreactionpointqprateupdateevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqprateupdateevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqprateupdateevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqpscheduleddelayedevents sets the value of Dcqcnreactionpointqpscheduleddelayedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqpscheduleddelayedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqpscheduleddelayedevents", (value)) +} + +// GetDcqcnreactionpointqpscheduleddelayedevents gets the value of Dcqcnreactionpointqpscheduleddelayedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqpscheduleddelayedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqpscheduleddelayedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqpschedulednotshapedevents sets the value of Dcqcnreactionpointqpschedulednotshapedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqpschedulednotshapedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqpschedulednotshapedevents", (value)) +} + +// GetDcqcnreactionpointqpschedulednotshapedevents gets the value of Dcqcnreactionpointqpschedulednotshapedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqpschedulednotshapedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqpschedulednotshapedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDcqcnreactionpointqpscheduledpermitedevents sets the value of Dcqcnreactionpointqpscheduledpermitedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyDcqcnreactionpointqpscheduledpermitedevents(value uint32) (err error) { + return instance.SetProperty("Dcqcnreactionpointqpscheduledpermitedevents", (value)) +} + +// GetDcqcnreactionpointqpscheduledpermitedevents gets the value of Dcqcnreactionpointqpscheduledpermitedevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyDcqcnreactionpointqpscheduledpermitedevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Dcqcnreactionpointqpscheduledpermitedevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEQMissPersec sets the value of EQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyEQMissPersec(value uint32) (err error) { + return instance.SetProperty("EQMissPersec", (value)) +} + +// GetEQMissPersec gets the value of EQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyEQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalBlueflamehitPersec sets the value of ExternalBlueflamehitPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalBlueflamehitPersec(value uint32) (err error) { + return instance.SetProperty("ExternalBlueflamehitPersec", (value)) +} + +// GetExternalBlueflamehitPersec gets the value of ExternalBlueflamehitPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalBlueflamehitPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalBlueflamehitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalBlueflameReplacePersec sets the value of ExternalBlueflameReplacePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalBlueflameReplacePersec(value uint32) (err error) { + return instance.SetProperty("ExternalBlueflameReplacePersec", (value)) +} + +// GetExternalBlueflameReplacePersec gets the value of ExternalBlueflameReplacePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalBlueflameReplacePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalBlueflameReplacePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalDoorbellDropPersec sets the value of ExternalDoorbellDropPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalDoorbellDropPersec(value uint32) (err error) { + return instance.SetProperty("ExternalDoorbellDropPersec", (value)) +} + +// GetExternalDoorbellDropPersec gets the value of ExternalDoorbellDropPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalDoorbellDropPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalDoorbellDropPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExternalDoorbellPushPersec sets the value of ExternalDoorbellPushPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyExternalDoorbellPushPersec(value uint32) (err error) { + return instance.SetProperty("ExternalDoorbellPushPersec", (value)) +} + +// GetExternalDoorbellPushPersec gets the value of ExternalDoorbellPushPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyExternalDoorbellPushPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExternalDoorbellPushPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor0MaximumLatency sets the value of InternalProcessor0MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor0MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor0MaximumLatency", (value)) +} + +// GetInternalProcessor0MaximumLatency gets the value of InternalProcessor0MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor0MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor0MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor1MaximumLatency sets the value of InternalProcessor1MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor1MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor1MaximumLatency", (value)) +} + +// GetInternalProcessor1MaximumLatency gets the value of InternalProcessor1MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor1MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor1MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor2MaximumLatency sets the value of InternalProcessor2MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor2MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor2MaximumLatency", (value)) +} + +// GetInternalProcessor2MaximumLatency gets the value of InternalProcessor2MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor2MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor2MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalProcessor3MaximumLatency sets the value of InternalProcessor3MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalProcessor3MaximumLatency(value uint32) (err error) { + return instance.SetProperty("InternalProcessor3MaximumLatency", (value)) +} + +// GetInternalProcessor3MaximumLatency gets the value of InternalProcessor3MaximumLatency for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalProcessor3MaximumLatency() (value uint32, err error) { + retValue, err := instance.GetProperty("InternalProcessor3MaximumLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInternalprocessorexecutedcommands sets the value of Internalprocessorexecutedcommands for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyInternalprocessorexecutedcommands(value uint32) (err error) { + return instance.SetProperty("Internalprocessorexecutedcommands", (value)) +} + +// GetInternalprocessorexecutedcommands gets the value of Internalprocessorexecutedcommands for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyInternalprocessorexecutedcommands() (value uint32, err error) { + retValue, err := instance.GetProperty("Internalprocessorexecutedcommands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLastRestransmittedQP sets the value of LastRestransmittedQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyLastRestransmittedQP(value uint32) (err error) { + return instance.SetProperty("LastRestransmittedQP", (value)) +} + +// GetLastRestransmittedQP gets the value of LastRestransmittedQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyLastRestransmittedQP() (value uint32, err error) { + retValue, err := instance.GetProperty("LastRestransmittedQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumqpsinlimitedstate sets the value of Maximumqpsinlimitedstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMaximumqpsinlimitedstate(value uint32) (err error) { + return instance.SetProperty("Maximumqpsinlimitedstate", (value)) +} + +// GetMaximumqpsinlimitedstate gets the value of Maximumqpsinlimitedstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMaximumqpsinlimitedstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Maximumqpsinlimitedstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforCQ sets the value of MPTentriesusedforCQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforCQ(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforCQ", (value)) +} + +// GetMPTentriesusedforCQ gets the value of MPTentriesusedforCQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforCQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforCQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforEQ sets the value of MPTentriesusedforEQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforEQ(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforEQ", (value)) +} + +// GetMPTentriesusedforEQ gets the value of MPTentriesusedforEQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforEQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforEQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforMR sets the value of MPTentriesusedforMR for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforMR(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforMR", (value)) +} + +// GetMPTentriesusedforMR gets the value of MPTentriesusedforMR for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforMR() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforMR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTentriesusedforQP sets the value of MPTentriesusedforQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTentriesusedforQP(value uint32) (err error) { + return instance.SetProperty("MPTentriesusedforQP", (value)) +} + +// GetMPTentriesusedforQP gets the value of MPTentriesusedforQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTentriesusedforQP() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTentriesusedforQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMPTMissPersec sets the value of MPTMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMPTMissPersec(value uint32) (err error) { + return instance.SetProperty("MPTMissPersec", (value)) +} + +// GetMPTMissPersec gets the value of MPTMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMPTMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MPTMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforCQ sets the value of MTTentriesusedforCQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforCQ(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforCQ", (value)) +} + +// GetMTTentriesusedforCQ gets the value of MTTentriesusedforCQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforCQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforCQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforEQ sets the value of MTTentriesusedforEQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforEQ(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforEQ", (value)) +} + +// GetMTTentriesusedforEQ gets the value of MTTentriesusedforEQ for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforEQ() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforEQ") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforMR sets the value of MTTentriesusedforMR for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforMR(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforMR", (value)) +} + +// GetMTTentriesusedforMR gets the value of MTTentriesusedforMR for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforMR() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforMR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTentriesusedforQP sets the value of MTTentriesusedforQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTentriesusedforQP(value uint32) (err error) { + return instance.SetProperty("MTTentriesusedforQP", (value)) +} + +// GetMTTentriesusedforQP gets the value of MTTentriesusedforQP for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTentriesusedforQP() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTentriesusedforQP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMTTMissPersec sets the value of MTTMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyMTTMissPersec(value uint32) (err error) { + return instance.SetProperty("MTTMissPersec", (value)) +} + +// GetMTTMissPersec gets the value of MTTMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyMTTMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MTTMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNoWQEDropsPersec sets the value of NoWQEDropsPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyNoWQEDropsPersec(value uint32) (err error) { + return instance.SetProperty("NoWQEDropsPersec", (value)) +} + +// GetNoWQEDropsPersec gets the value of NoWQEDropsPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyNoWQEDropsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NoWQEDropsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsdiscardedduetoinvalidqp sets the value of Packetsdiscardedduetoinvalidqp for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyPacketsdiscardedduetoinvalidqp(value uint64) (err error) { + return instance.SetProperty("Packetsdiscardedduetoinvalidqp", (value)) +} + +// GetPacketsdiscardedduetoinvalidqp gets the value of Packetsdiscardedduetoinvalidqp for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyPacketsdiscardedduetoinvalidqp() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsdiscardedduetoinvalidqp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPCIBackpressurePersec sets the value of PCIBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyPCIBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("PCIBackpressurePersec", (value)) +} + +// GetPCIBackpressurePersec gets the value of PCIBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyPCIBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PCIBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQppriorityupdateflowevents sets the value of Qppriorityupdateflowevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyQppriorityupdateflowevents(value uint32) (err error) { + return instance.SetProperty("Qppriorityupdateflowevents", (value)) +} + +// GetQppriorityupdateflowevents gets the value of Qppriorityupdateflowevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyQppriorityupdateflowevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Qppriorityupdateflowevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceiveWQEcachehitPersec sets the value of ReceiveWQEcachehitPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyReceiveWQEcachehitPersec(value uint32) (err error) { + return instance.SetProperty("ReceiveWQEcachehitPersec", (value)) +} + +// GetReceiveWQEcachehitPersec gets the value of ReceiveWQEcachehitPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyReceiveWQEcachehitPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveWQEcachehitPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceiveWQEcachelookupPersec sets the value of ReceiveWQEcachelookupPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyReceiveWQEcachelookupPersec(value uint32) (err error) { + return instance.SetProperty("ReceiveWQEcachelookupPersec", (value)) +} + +// GetReceiveWQEcachelookupPersec gets the value of ReceiveWQEcachelookupPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyReceiveWQEcachelookupPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveWQEcachelookupPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRQMissPersec sets the value of RQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyRQMissPersec(value uint32) (err error) { + return instance.SetProperty("RQMissPersec", (value)) +} + +// GetRQMissPersec gets the value of RQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyRQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScatterBackpressurePersec sets the value of ScatterBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyScatterBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("ScatterBackpressurePersec", (value)) +} + +// GetScatterBackpressurePersec gets the value of ScatterBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyScatterBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ScatterBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSQMissPersec sets the value of SQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertySQMissPersec(value uint32) (err error) { + return instance.SetProperty("SQMissPersec", (value)) +} + +// GetSQMissPersec gets the value of SQMissPersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertySQMissPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SQMissPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSteeringQPCBackpressurePersec sets the value of SteeringQPCBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertySteeringQPCBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("SteeringQPCBackpressurePersec", (value)) +} + +// GetSteeringQPCBackpressurePersec gets the value of SteeringQPCBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertySteeringQPCBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SteeringQPCBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalqpsinlimitedstate sets the value of Totalqpsinlimitedstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyTotalqpsinlimitedstate(value uint32) (err error) { + return instance.SetProperty("Totalqpsinlimitedstate", (value)) +} + +// GetTotalqpsinlimitedstate gets the value of Totalqpsinlimitedstate for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyTotalqpsinlimitedstate() (value uint32, err error) { + retValue, err := instance.GetProperty("Totalqpsinlimitedstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransmissionenginehangevents sets the value of Transmissionenginehangevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyTransmissionenginehangevents(value uint32) (err error) { + return instance.SetProperty("Transmissionenginehangevents", (value)) +} + +// GetTransmissionenginehangevents gets the value of Transmissionenginehangevents for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyTransmissionenginehangevents() (value uint32, err error) { + retValue, err := instance.GetProperty("Transmissionenginehangevents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWQEfetchPerAtomicBackpressurePersec sets the value of WQEfetchPerAtomicBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) SetPropertyWQEfetchPerAtomicBackpressurePersec(value uint32) (err error) { + return instance.SetProperty("WQEfetchPerAtomicBackpressurePersec", (value)) +} + +// GetWQEfetchPerAtomicBackpressurePersec gets the value of WQEfetchPerAtomicBackpressurePersec for the instance +func (instance *Win32_PerfRawData_Mlx4DeviceProvider_MellanoxWinOFBusCounters) GetPropertyWQEfetchPerAtomicBackpressurePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WQEfetchPerAtomicBackpressurePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go new file mode 100644 index 00000000..d9b2f8eb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters.go @@ -0,0 +1,1130 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters struct +type Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters struct { + *Win32_PerfRawData + + // + CQOverflows uint64 + + // + Devicedetectedstalledstate uint64 + + // + DroplessModeEntries uint64 + + // + DroplessModeExits uint64 + + // + Linkdowneventsphy uint64 + + // + Packetdetectedasstalled uint64 + + // + PacketsdiscardedduetoHeadOfQueuelifetimelimit uint64 + + // + PacketsdiscardedduetoTCinstalledstate uint64 + + // + RequesterCQEErrors uint64 + + // + RequesterInvalidRequestErrors uint64 + + // + RequesterLengthErrors uint64 + + // + RequesterOutoforderSequenceNAK uint64 + + // + RequesterProtectionErrors uint64 + + // + RequesterQPOperationErrors uint64 + + // + RequesterQPTransportRetriesExceededErrors uint64 + + // + RequesterRemoteAccessErrors uint64 + + // + RequesterRemoteOperationErrors uint64 + + // + RequesterRNRNAK uint64 + + // + RequesterRNRNAKRetriesExceededErrors uint64 + + // + RequesterTimeoutReceived uint64 + + // + RequesterTransportRetriesExceededErrors uint64 + + // + ResponderCQEErrors uint64 + + // + ResponderDuplicateRequestReceived uint64 + + // + ResponderInvalidRequestErrors uint64 + + // + ResponderLengthErrors uint64 + + // + ResponderOutoforderSequenceReceived uint64 + + // + ResponderProtectionErrors uint64 + + // + ResponderQPOperationErrors uint64 + + // + ResponderRemoteAccessErrors uint64 + + // + ResponderRNRNAK uint64 + + // + RscAborts uint64 + + // + RscCoalesceEvents uint64 + + // + RscCoalesceOctets uint64 + + // + RscCoalescePackets uint64 + + // + TXCopiedPackets uint64 + + // + TXRingIsFullPackets uint64 +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCQOverflows sets the value of CQOverflows for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyCQOverflows(value uint64) (err error) { + return instance.SetProperty("CQOverflows", (value)) +} + +// GetCQOverflows gets the value of CQOverflows for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyCQOverflows() (value uint64, err error) { + retValue, err := instance.GetProperty("CQOverflows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicedetectedstalledstate sets the value of Devicedetectedstalledstate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyDevicedetectedstalledstate(value uint64) (err error) { + return instance.SetProperty("Devicedetectedstalledstate", (value)) +} + +// GetDevicedetectedstalledstate gets the value of Devicedetectedstalledstate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyDevicedetectedstalledstate() (value uint64, err error) { + retValue, err := instance.GetProperty("Devicedetectedstalledstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroplessModeEntries sets the value of DroplessModeEntries for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyDroplessModeEntries(value uint64) (err error) { + return instance.SetProperty("DroplessModeEntries", (value)) +} + +// GetDroplessModeEntries gets the value of DroplessModeEntries for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyDroplessModeEntries() (value uint64, err error) { + retValue, err := instance.GetProperty("DroplessModeEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroplessModeExits sets the value of DroplessModeExits for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyDroplessModeExits(value uint64) (err error) { + return instance.SetProperty("DroplessModeExits", (value)) +} + +// GetDroplessModeExits gets the value of DroplessModeExits for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyDroplessModeExits() (value uint64, err error) { + retValue, err := instance.GetProperty("DroplessModeExits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLinkdowneventsphy sets the value of Linkdowneventsphy for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyLinkdowneventsphy(value uint64) (err error) { + return instance.SetProperty("Linkdowneventsphy", (value)) +} + +// GetLinkdowneventsphy gets the value of Linkdowneventsphy for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyLinkdowneventsphy() (value uint64, err error) { + retValue, err := instance.GetProperty("Linkdowneventsphy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketdetectedasstalled sets the value of Packetdetectedasstalled for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyPacketdetectedasstalled(value uint64) (err error) { + return instance.SetProperty("Packetdetectedasstalled", (value)) +} + +// GetPacketdetectedasstalled gets the value of Packetdetectedasstalled for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyPacketdetectedasstalled() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetdetectedasstalled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsdiscardedduetoHeadOfQueuelifetimelimit sets the value of PacketsdiscardedduetoHeadOfQueuelifetimelimit for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyPacketsdiscardedduetoHeadOfQueuelifetimelimit(value uint64) (err error) { + return instance.SetProperty("PacketsdiscardedduetoHeadOfQueuelifetimelimit", (value)) +} + +// GetPacketsdiscardedduetoHeadOfQueuelifetimelimit gets the value of PacketsdiscardedduetoHeadOfQueuelifetimelimit for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyPacketsdiscardedduetoHeadOfQueuelifetimelimit() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsdiscardedduetoHeadOfQueuelifetimelimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsdiscardedduetoTCinstalledstate sets the value of PacketsdiscardedduetoTCinstalledstate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyPacketsdiscardedduetoTCinstalledstate(value uint64) (err error) { + return instance.SetProperty("PacketsdiscardedduetoTCinstalledstate", (value)) +} + +// GetPacketsdiscardedduetoTCinstalledstate gets the value of PacketsdiscardedduetoTCinstalledstate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyPacketsdiscardedduetoTCinstalledstate() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsdiscardedduetoTCinstalledstate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterCQEErrors sets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterCQEErrors(value uint64) (err error) { + return instance.SetProperty("RequesterCQEErrors", (value)) +} + +// GetRequesterCQEErrors gets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterInvalidRequestErrors sets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("RequesterInvalidRequestErrors", (value)) +} + +// GetRequesterInvalidRequestErrors gets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterLengthErrors sets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterLengthErrors(value uint64) (err error) { + return instance.SetProperty("RequesterLengthErrors", (value)) +} + +// GetRequesterLengthErrors gets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterOutoforderSequenceNAK sets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterOutoforderSequenceNAK(value uint64) (err error) { + return instance.SetProperty("RequesterOutoforderSequenceNAK", (value)) +} + +// GetRequesterOutoforderSequenceNAK gets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterOutoforderSequenceNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterOutoforderSequenceNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterProtectionErrors sets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterProtectionErrors(value uint64) (err error) { + return instance.SetProperty("RequesterProtectionErrors", (value)) +} + +// GetRequesterProtectionErrors gets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterQPOperationErrors sets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterQPOperationErrors", (value)) +} + +// GetRequesterQPOperationErrors gets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterQPTransportRetriesExceededErrors sets the value of RequesterQPTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterQPTransportRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterQPTransportRetriesExceededErrors", (value)) +} + +// GetRequesterQPTransportRetriesExceededErrors gets the value of RequesterQPTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterQPTransportRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterQPTransportRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteAccessErrors sets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteAccessErrors", (value)) +} + +// GetRequesterRemoteAccessErrors gets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteOperationErrors sets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRemoteOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteOperationErrors", (value)) +} + +// GetRequesterRemoteOperationErrors gets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRemoteOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAK sets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRNRNAK(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAK", (value)) +} + +// GetRequesterRNRNAK gets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAKRetriesExceededErrors sets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterRNRNAKRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAKRetriesExceededErrors", (value)) +} + +// GetRequesterRNRNAKRetriesExceededErrors gets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterRNRNAKRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAKRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTimeoutReceived sets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterTimeoutReceived(value uint64) (err error) { + return instance.SetProperty("RequesterTimeoutReceived", (value)) +} + +// GetRequesterTimeoutReceived gets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterTimeoutReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTimeoutReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTransportRetriesExceededErrors sets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRequesterTransportRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterTransportRetriesExceededErrors", (value)) +} + +// GetRequesterTransportRetriesExceededErrors gets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRequesterTransportRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTransportRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderCQEErrors sets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderCQEErrors(value uint64) (err error) { + return instance.SetProperty("ResponderCQEErrors", (value)) +} + +// GetResponderCQEErrors gets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderDuplicateRequestReceived sets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderDuplicateRequestReceived(value uint64) (err error) { + return instance.SetProperty("ResponderDuplicateRequestReceived", (value)) +} + +// GetResponderDuplicateRequestReceived gets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderDuplicateRequestReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderDuplicateRequestReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderInvalidRequestErrors sets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("ResponderInvalidRequestErrors", (value)) +} + +// GetResponderInvalidRequestErrors gets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderLengthErrors sets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderLengthErrors(value uint64) (err error) { + return instance.SetProperty("ResponderLengthErrors", (value)) +} + +// GetResponderLengthErrors gets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderOutoforderSequenceReceived sets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderOutoforderSequenceReceived(value uint64) (err error) { + return instance.SetProperty("ResponderOutoforderSequenceReceived", (value)) +} + +// GetResponderOutoforderSequenceReceived gets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderOutoforderSequenceReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderOutoforderSequenceReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderProtectionErrors sets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderProtectionErrors(value uint64) (err error) { + return instance.SetProperty("ResponderProtectionErrors", (value)) +} + +// GetResponderProtectionErrors gets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderQPOperationErrors sets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("ResponderQPOperationErrors", (value)) +} + +// GetResponderQPOperationErrors gets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRemoteAccessErrors sets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("ResponderRemoteAccessErrors", (value)) +} + +// GetResponderRemoteAccessErrors gets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRNRNAK sets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyResponderRNRNAK(value uint64) (err error) { + return instance.SetProperty("ResponderRNRNAK", (value)) +} + +// GetResponderRNRNAK gets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyResponderRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscAborts sets the value of RscAborts for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscAborts(value uint64) (err error) { + return instance.SetProperty("RscAborts", (value)) +} + +// GetRscAborts gets the value of RscAborts for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscAborts() (value uint64, err error) { + retValue, err := instance.GetProperty("RscAborts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscCoalesceEvents sets the value of RscCoalesceEvents for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscCoalesceEvents(value uint64) (err error) { + return instance.SetProperty("RscCoalesceEvents", (value)) +} + +// GetRscCoalesceEvents gets the value of RscCoalesceEvents for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscCoalesceEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("RscCoalesceEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscCoalesceOctets sets the value of RscCoalesceOctets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscCoalesceOctets(value uint64) (err error) { + return instance.SetProperty("RscCoalesceOctets", (value)) +} + +// GetRscCoalesceOctets gets the value of RscCoalesceOctets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscCoalesceOctets() (value uint64, err error) { + retValue, err := instance.GetProperty("RscCoalesceOctets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRscCoalescePackets sets the value of RscCoalescePackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyRscCoalescePackets(value uint64) (err error) { + return instance.SetProperty("RscCoalescePackets", (value)) +} + +// GetRscCoalescePackets gets the value of RscCoalescePackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyRscCoalescePackets() (value uint64, err error) { + retValue, err := instance.GetProperty("RscCoalescePackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXCopiedPackets sets the value of TXCopiedPackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyTXCopiedPackets(value uint64) (err error) { + return instance.SetProperty("TXCopiedPackets", (value)) +} + +// GetTXCopiedPackets gets the value of TXCopiedPackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyTXCopiedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TXCopiedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXRingIsFullPackets sets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) SetPropertyTXRingIsFullPackets(value uint64) (err error) { + return instance.SetProperty("TXRingIsFullPackets", (value)) +} + +// GetTXRingIsFullPackets gets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterDiagnosticCounters) GetPropertyTXRingIsFullPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TXRingIsFullPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go new file mode 100644 index 00000000..14bfc877 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters.go @@ -0,0 +1,950 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters struct +type Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + BytesTotal uint64 + + // + KBytesReceivedPerSec uint32 + + // + KBytesSentPerSec uint32 + + // + KBytesTotalPerSec uint32 + + // + PacketsReceived uint64 + + // + PacketsReceivedPerSec uint32 + + // + PacketsSent uint64 + + // + PacketsSentPerSec uint32 + + // + PacketsTotal uint64 + + // + PacketsTotalPerSec uint32 + + // + RcvPauseDuration uint64 + + // + RcvPauseFrames uint64 + + // + RequesterAllocatedRateLimiters uint64 + + // + RequesterAverageTotalRate uint64 + + // + RequesterCurrentTotalRate uint64 + + // + RequesterIgnoredLimitationRequest uint64 + + // + RequesterSuccessfullyHandledLimitationRequest uint64 + + // + RequesterTotalAllocatedRateLimiters uint32 + + // + RequesterTrafficRateHighPeak uint64 + + // + RequesterTrafficRateLowPeak uint64 + + // + ResponderActiveCNP uint64 + + // + ResponderCNPSentSuccessfully uint64 + + // + ResponderECNHandledSuccessfully uint64 + + // + ResponderIgnoredECN uint64 + + // + ResponderIgnoredECNdueCNPcoalesce uint64 + + // + SentDiscardFrames uint64 + + // + SentPauseDuration uint64 + + // + SentPauseFrames uint64 +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKBytesReceivedPerSec sets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyKBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesReceivedPerSec", (value)) +} + +// GetKBytesReceivedPerSec gets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyKBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesSentPerSec sets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyKBytesSentPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesSentPerSec", (value)) +} + +// GetKBytesSentPerSec gets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyKBytesSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesTotalPerSec sets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyKBytesTotalPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesTotalPerSec", (value)) +} + +// GetKBytesTotalPerSec gets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyKBytesTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPerSec sets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPerSec", (value)) +} + +// GetPacketsReceivedPerSec gets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsSent sets the value of PacketsSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsSent(value uint64) (err error) { + return instance.SetProperty("PacketsSent", (value)) +} + +// GetPacketsSent gets the value of PacketsSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPerSec sets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsSentPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsSentPerSec", (value)) +} + +// GetPacketsSentPerSec gets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsTotal sets the value of PacketsTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PacketsTotal", (value)) +} + +// GetPacketsTotal gets the value of PacketsTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTotalPerSec sets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyPacketsTotalPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsTotalPerSec", (value)) +} + +// GetPacketsTotalPerSec gets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyPacketsTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRcvPauseDuration sets the value of RcvPauseDuration for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRcvPauseDuration(value uint64) (err error) { + return instance.SetProperty("RcvPauseDuration", (value)) +} + +// GetRcvPauseDuration gets the value of RcvPauseDuration for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRcvPauseDuration() (value uint64, err error) { + retValue, err := instance.GetProperty("RcvPauseDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRcvPauseFrames sets the value of RcvPauseFrames for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRcvPauseFrames(value uint64) (err error) { + return instance.SetProperty("RcvPauseFrames", (value)) +} + +// GetRcvPauseFrames gets the value of RcvPauseFrames for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRcvPauseFrames() (value uint64, err error) { + retValue, err := instance.GetProperty("RcvPauseFrames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterAllocatedRateLimiters sets the value of RequesterAllocatedRateLimiters for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterAllocatedRateLimiters(value uint64) (err error) { + return instance.SetProperty("RequesterAllocatedRateLimiters", (value)) +} + +// GetRequesterAllocatedRateLimiters gets the value of RequesterAllocatedRateLimiters for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterAllocatedRateLimiters() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterAllocatedRateLimiters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterAverageTotalRate sets the value of RequesterAverageTotalRate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterAverageTotalRate(value uint64) (err error) { + return instance.SetProperty("RequesterAverageTotalRate", (value)) +} + +// GetRequesterAverageTotalRate gets the value of RequesterAverageTotalRate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterAverageTotalRate() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterAverageTotalRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterCurrentTotalRate sets the value of RequesterCurrentTotalRate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterCurrentTotalRate(value uint64) (err error) { + return instance.SetProperty("RequesterCurrentTotalRate", (value)) +} + +// GetRequesterCurrentTotalRate gets the value of RequesterCurrentTotalRate for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterCurrentTotalRate() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterCurrentTotalRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterIgnoredLimitationRequest sets the value of RequesterIgnoredLimitationRequest for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterIgnoredLimitationRequest(value uint64) (err error) { + return instance.SetProperty("RequesterIgnoredLimitationRequest", (value)) +} + +// GetRequesterIgnoredLimitationRequest gets the value of RequesterIgnoredLimitationRequest for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterIgnoredLimitationRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterIgnoredLimitationRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterSuccessfullyHandledLimitationRequest sets the value of RequesterSuccessfullyHandledLimitationRequest for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterSuccessfullyHandledLimitationRequest(value uint64) (err error) { + return instance.SetProperty("RequesterSuccessfullyHandledLimitationRequest", (value)) +} + +// GetRequesterSuccessfullyHandledLimitationRequest gets the value of RequesterSuccessfullyHandledLimitationRequest for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterSuccessfullyHandledLimitationRequest() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterSuccessfullyHandledLimitationRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTotalAllocatedRateLimiters sets the value of RequesterTotalAllocatedRateLimiters for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterTotalAllocatedRateLimiters(value uint32) (err error) { + return instance.SetProperty("RequesterTotalAllocatedRateLimiters", (value)) +} + +// GetRequesterTotalAllocatedRateLimiters gets the value of RequesterTotalAllocatedRateLimiters for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterTotalAllocatedRateLimiters() (value uint32, err error) { + retValue, err := instance.GetProperty("RequesterTotalAllocatedRateLimiters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRequesterTrafficRateHighPeak sets the value of RequesterTrafficRateHighPeak for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterTrafficRateHighPeak(value uint64) (err error) { + return instance.SetProperty("RequesterTrafficRateHighPeak", (value)) +} + +// GetRequesterTrafficRateHighPeak gets the value of RequesterTrafficRateHighPeak for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterTrafficRateHighPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTrafficRateHighPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTrafficRateLowPeak sets the value of RequesterTrafficRateLowPeak for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyRequesterTrafficRateLowPeak(value uint64) (err error) { + return instance.SetProperty("RequesterTrafficRateLowPeak", (value)) +} + +// GetRequesterTrafficRateLowPeak gets the value of RequesterTrafficRateLowPeak for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyRequesterTrafficRateLowPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTrafficRateLowPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderActiveCNP sets the value of ResponderActiveCNP for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderActiveCNP(value uint64) (err error) { + return instance.SetProperty("ResponderActiveCNP", (value)) +} + +// GetResponderActiveCNP gets the value of ResponderActiveCNP for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderActiveCNP() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderActiveCNP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderCNPSentSuccessfully sets the value of ResponderCNPSentSuccessfully for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderCNPSentSuccessfully(value uint64) (err error) { + return instance.SetProperty("ResponderCNPSentSuccessfully", (value)) +} + +// GetResponderCNPSentSuccessfully gets the value of ResponderCNPSentSuccessfully for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderCNPSentSuccessfully() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderCNPSentSuccessfully") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderECNHandledSuccessfully sets the value of ResponderECNHandledSuccessfully for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderECNHandledSuccessfully(value uint64) (err error) { + return instance.SetProperty("ResponderECNHandledSuccessfully", (value)) +} + +// GetResponderECNHandledSuccessfully gets the value of ResponderECNHandledSuccessfully for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderECNHandledSuccessfully() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderECNHandledSuccessfully") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderIgnoredECN sets the value of ResponderIgnoredECN for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderIgnoredECN(value uint64) (err error) { + return instance.SetProperty("ResponderIgnoredECN", (value)) +} + +// GetResponderIgnoredECN gets the value of ResponderIgnoredECN for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderIgnoredECN() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderIgnoredECN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderIgnoredECNdueCNPcoalesce sets the value of ResponderIgnoredECNdueCNPcoalesce for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertyResponderIgnoredECNdueCNPcoalesce(value uint64) (err error) { + return instance.SetProperty("ResponderIgnoredECNdueCNPcoalesce", (value)) +} + +// GetResponderIgnoredECNdueCNPcoalesce gets the value of ResponderIgnoredECNdueCNPcoalesce for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertyResponderIgnoredECNdueCNPcoalesce() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderIgnoredECNdueCNPcoalesce") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentDiscardFrames sets the value of SentDiscardFrames for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertySentDiscardFrames(value uint64) (err error) { + return instance.SetProperty("SentDiscardFrames", (value)) +} + +// GetSentDiscardFrames gets the value of SentDiscardFrames for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertySentDiscardFrames() (value uint64, err error) { + retValue, err := instance.GetProperty("SentDiscardFrames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentPauseDuration sets the value of SentPauseDuration for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertySentPauseDuration(value uint64) (err error) { + return instance.SetProperty("SentPauseDuration", (value)) +} + +// GetSentPauseDuration gets the value of SentPauseDuration for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertySentPauseDuration() (value uint64, err error) { + retValue, err := instance.GetProperty("SentPauseDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSentPauseFrames sets the value of SentPauseFrames for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) SetPropertySentPauseFrames(value uint64) (err error) { + return instance.SetProperty("SentPauseFrames", (value)) +} + +// GetSentPauseFrames gets the value of SentPauseFrames for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterQoSCounters) GetPropertySentPauseFrames() (value uint64, err error) { + retValue, err := instance.GetProperty("SentPauseFrames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters.go new file mode 100644 index 00000000..4d1e3182 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters struct +type Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters struct { + *Win32_PerfRawData + + // + EncapsulatedNonRssIPv4Only uint64 + + // + EncapsulatedNonRssIPv4PerTcp uint32 + + // + EncapsulatedNonRssIPv4PerUdp uint32 + + // + EncapsulatedNonRssIPv6Only uint64 + + // + EncapsulatedNonRssIPv6PerTcp uint32 + + // + EncapsulatedNonRssIPv6PerUdp uint32 + + // + EncapsulatedNonRssMisc uint32 + + // + EncapsulatedRssIPv4Only uint64 + + // + EncapsulatedRssIPv4PerTcp uint32 + + // + EncapsulatedRssIPv4PerUdp uint32 + + // + EncapsulatedRssIPv6Only uint64 + + // + EncapsulatedRssIPv6PerTcp uint32 + + // + EncapsulatedRssIPv6PerUdp uint32 + + // + EncapsulatedRssMisc uint32 + + // + NonRssIPv4Only uint64 + + // + NonRssIPv4PerTcp uint32 + + // + NonRssIPv4PerUdp uint32 + + // + NonRssIPv6Only uint64 + + // + NonRssIPv6PerTcp uint32 + + // + NonRssIPv6PerUdp uint32 + + // + NonRssMisc uint32 + + // + RssIPv4Only uint64 + + // + RssIPv4PerTcp uint32 + + // + RssIPv4PerUdp uint32 + + // + RssIPv6Only uint64 + + // + RssIPv6PerTcp uint32 + + // + RssIPv6PerUdp uint32 + + // + RssMisc uint32 +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetEncapsulatedNonRssIPv4Only sets the value of EncapsulatedNonRssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv4Only", (value)) +} + +// GetEncapsulatedNonRssIPv4Only gets the value of EncapsulatedNonRssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv4PerTcp sets the value of EncapsulatedNonRssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv4PerTcp", (value)) +} + +// GetEncapsulatedNonRssIPv4PerTcp gets the value of EncapsulatedNonRssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv4PerUdp sets the value of EncapsulatedNonRssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv4PerUdp", (value)) +} + +// GetEncapsulatedNonRssIPv4PerUdp gets the value of EncapsulatedNonRssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv6Only sets the value of EncapsulatedNonRssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv6Only", (value)) +} + +// GetEncapsulatedNonRssIPv6Only gets the value of EncapsulatedNonRssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv6PerTcp sets the value of EncapsulatedNonRssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv6PerTcp", (value)) +} + +// GetEncapsulatedNonRssIPv6PerTcp gets the value of EncapsulatedNonRssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssIPv6PerUdp sets the value of EncapsulatedNonRssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssIPv6PerUdp", (value)) +} + +// GetEncapsulatedNonRssIPv6PerUdp gets the value of EncapsulatedNonRssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedNonRssMisc sets the value of EncapsulatedNonRssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedNonRssMisc(value uint32) (err error) { + return instance.SetProperty("EncapsulatedNonRssMisc", (value)) +} + +// GetEncapsulatedNonRssMisc gets the value of EncapsulatedNonRssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedNonRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedNonRssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv4Only sets the value of EncapsulatedRssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedRssIPv4Only", (value)) +} + +// GetEncapsulatedRssIPv4Only gets the value of EncapsulatedRssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedRssIPv4PerTcp sets the value of EncapsulatedRssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv4PerTcp", (value)) +} + +// GetEncapsulatedRssIPv4PerTcp gets the value of EncapsulatedRssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv4PerUdp sets the value of EncapsulatedRssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv4PerUdp", (value)) +} + +// GetEncapsulatedRssIPv4PerUdp gets the value of EncapsulatedRssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv6Only sets the value of EncapsulatedRssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("EncapsulatedRssIPv6Only", (value)) +} + +// GetEncapsulatedRssIPv6Only gets the value of EncapsulatedRssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEncapsulatedRssIPv6PerTcp sets the value of EncapsulatedRssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv6PerTcp", (value)) +} + +// GetEncapsulatedRssIPv6PerTcp gets the value of EncapsulatedRssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssIPv6PerUdp sets the value of EncapsulatedRssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssIPv6PerUdp", (value)) +} + +// GetEncapsulatedRssIPv6PerUdp gets the value of EncapsulatedRssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEncapsulatedRssMisc sets the value of EncapsulatedRssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyEncapsulatedRssMisc(value uint32) (err error) { + return instance.SetProperty("EncapsulatedRssMisc", (value)) +} + +// GetEncapsulatedRssMisc gets the value of EncapsulatedRssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyEncapsulatedRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("EncapsulatedRssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv4Only sets the value of NonRssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("NonRssIPv4Only", (value)) +} + +// GetNonRssIPv4Only gets the value of NonRssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("NonRssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonRssIPv4PerTcp sets the value of NonRssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv4PerTcp", (value)) +} + +// GetNonRssIPv4PerTcp gets the value of NonRssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv4PerUdp sets the value of NonRssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv4PerUdp", (value)) +} + +// GetNonRssIPv4PerUdp gets the value of NonRssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv6Only sets the value of NonRssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("NonRssIPv6Only", (value)) +} + +// GetNonRssIPv6Only gets the value of NonRssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("NonRssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNonRssIPv6PerTcp sets the value of NonRssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv6PerTcp", (value)) +} + +// GetNonRssIPv6PerTcp gets the value of NonRssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssIPv6PerUdp sets the value of NonRssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("NonRssIPv6PerUdp", (value)) +} + +// GetNonRssIPv6PerUdp gets the value of NonRssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNonRssMisc sets the value of NonRssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyNonRssMisc(value uint32) (err error) { + return instance.SetProperty("NonRssMisc", (value)) +} + +// GetNonRssMisc gets the value of NonRssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyNonRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("NonRssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv4Only sets the value of RssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv4Only(value uint64) (err error) { + return instance.SetProperty("RssIPv4Only", (value)) +} + +// GetRssIPv4Only gets the value of RssIPv4Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv4Only() (value uint64, err error) { + retValue, err := instance.GetProperty("RssIPv4Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRssIPv4PerTcp sets the value of RssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv4PerTcp(value uint32) (err error) { + return instance.SetProperty("RssIPv4PerTcp", (value)) +} + +// GetRssIPv4PerTcp gets the value of RssIPv4PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv4PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv4PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv4PerUdp sets the value of RssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv4PerUdp(value uint32) (err error) { + return instance.SetProperty("RssIPv4PerUdp", (value)) +} + +// GetRssIPv4PerUdp gets the value of RssIPv4PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv4PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv4PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv6Only sets the value of RssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv6Only(value uint64) (err error) { + return instance.SetProperty("RssIPv6Only", (value)) +} + +// GetRssIPv6Only gets the value of RssIPv6Only for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv6Only() (value uint64, err error) { + retValue, err := instance.GetProperty("RssIPv6Only") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRssIPv6PerTcp sets the value of RssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv6PerTcp(value uint32) (err error) { + return instance.SetProperty("RssIPv6PerTcp", (value)) +} + +// GetRssIPv6PerTcp gets the value of RssIPv6PerTcp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv6PerTcp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv6PerTcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssIPv6PerUdp sets the value of RssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssIPv6PerUdp(value uint32) (err error) { + return instance.SetProperty("RssIPv6PerUdp", (value)) +} + +// GetRssIPv6PerUdp gets the value of RssIPv6PerUdp for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssIPv6PerUdp() (value uint32, err error) { + retValue, err := instance.GetProperty("RssIPv6PerUdp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRssMisc sets the value of RssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) SetPropertyRssMisc(value uint32) (err error) { + return instance.SetProperty("RssMisc", (value)) +} + +// GetRssMisc gets the value of RssMisc for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterRssCounters) GetPropertyRssMisc() (value uint32, err error) { + retValue, err := instance.GetProperty("RssMisc") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go new file mode 100644 index 00000000..e4974c36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters struct +type Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + BytesTotal uint64 + + // + ControlPackets uint64 + + // + KBytesReceivedPerSec uint32 + + // + KBytesSentPerSec uint32 + + // + KBytesTotalPerSec uint32 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsReceived uint64 + + // + PacketsReceivedBadCRCError uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedFrameLengthError uint64 + + // + PacketsReceivedPerSec uint32 + + // + PacketsReceivedSymbolError uint64 + + // + PacketsSent uint64 + + // + PacketsSentPerSec uint32 + + // + PacketsTotal uint64 + + // + PacketsTotalPerSec uint32 +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlPackets sets the value of ControlPackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyControlPackets(value uint64) (err error) { + return instance.SetProperty("ControlPackets", (value)) +} + +// GetControlPackets gets the value of ControlPackets for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyControlPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKBytesReceivedPerSec sets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyKBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesReceivedPerSec", (value)) +} + +// GetKBytesReceivedPerSec gets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyKBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesSentPerSec sets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyKBytesSentPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesSentPerSec", (value)) +} + +// GetKBytesSentPerSec gets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyKBytesSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesTotalPerSec sets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyKBytesTotalPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesTotalPerSec", (value)) +} + +// GetKBytesTotalPerSec gets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyKBytesTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedBadCRCError sets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedBadCRCError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedBadCRCError", (value)) +} + +// GetPacketsReceivedBadCRCError gets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedBadCRCError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedBadCRCError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedFrameLengthError sets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedFrameLengthError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedFrameLengthError", (value)) +} + +// GetPacketsReceivedFrameLengthError gets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedFrameLengthError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedFrameLengthError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPerSec sets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPerSec", (value)) +} + +// GetPacketsReceivedPerSec gets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedSymbolError sets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsReceivedSymbolError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedSymbolError", (value)) +} + +// GetPacketsReceivedSymbolError gets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsReceivedSymbolError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedSymbolError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSent sets the value of PacketsSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsSent(value uint64) (err error) { + return instance.SetProperty("PacketsSent", (value)) +} + +// GetPacketsSent gets the value of PacketsSent for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPerSec sets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsSentPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsSentPerSec", (value)) +} + +// GetPacketsSentPerSec gets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsTotal sets the value of PacketsTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PacketsTotal", (value)) +} + +// GetPacketsTotal gets the value of PacketsTotal for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTotalPerSec sets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) SetPropertyPacketsTotalPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsTotalPerSec", (value)) +} + +// GetPacketsTotalPerSec gets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4EthProvider_MellanoxAdapterTrafficCounters) GetPropertyPacketsTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go new file mode 100644 index 00000000..cc6dbd43 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters struct +type Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters struct { + *Win32_PerfRawData + + // + CQOverflows uint64 + + // + RequesterCQEErrors uint64 + + // + RequesterInvalidRequestErrors uint64 + + // + RequesterLengthErrors uint64 + + // + RequesterOutoforderSequenceNAK uint64 + + // + RequesterProtectionErrors uint64 + + // + RequesterQPOperationErrors uint64 + + // + RequesterRemoteAccessErrors uint64 + + // + RequesterRemoteOperationErrors uint64 + + // + RequesterRNRNAK uint64 + + // + RequesterRNRNAKRetriesExceededErrors uint64 + + // + RequesterTimeoutReceived uint64 + + // + RequesterTransportRetriesExceededErrors uint64 + + // + ResponderCQEErrors uint64 + + // + ResponderDuplicateRequestReceived uint64 + + // + ResponderInvalidRequestErrors uint64 + + // + ResponderLengthErrors uint64 + + // + ResponderOutoforderSequenceReceived uint64 + + // + ResponderProtectionErrors uint64 + + // + ResponderQPOperationErrors uint64 + + // + ResponderRemoteAccessErrors uint64 + + // + ResponderRNRNAK uint64 + + // + TXRingIsFullPackets uint64 +} + +func NewWin32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCQOverflows sets the value of CQOverflows for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyCQOverflows(value uint64) (err error) { + return instance.SetProperty("CQOverflows", (value)) +} + +// GetCQOverflows gets the value of CQOverflows for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyCQOverflows() (value uint64, err error) { + retValue, err := instance.GetProperty("CQOverflows") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterCQEErrors sets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterCQEErrors(value uint64) (err error) { + return instance.SetProperty("RequesterCQEErrors", (value)) +} + +// GetRequesterCQEErrors gets the value of RequesterCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterInvalidRequestErrors sets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("RequesterInvalidRequestErrors", (value)) +} + +// GetRequesterInvalidRequestErrors gets the value of RequesterInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterLengthErrors sets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterLengthErrors(value uint64) (err error) { + return instance.SetProperty("RequesterLengthErrors", (value)) +} + +// GetRequesterLengthErrors gets the value of RequesterLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterOutoforderSequenceNAK sets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterOutoforderSequenceNAK(value uint64) (err error) { + return instance.SetProperty("RequesterOutoforderSequenceNAK", (value)) +} + +// GetRequesterOutoforderSequenceNAK gets the value of RequesterOutoforderSequenceNAK for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterOutoforderSequenceNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterOutoforderSequenceNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterProtectionErrors sets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterProtectionErrors(value uint64) (err error) { + return instance.SetProperty("RequesterProtectionErrors", (value)) +} + +// GetRequesterProtectionErrors gets the value of RequesterProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterQPOperationErrors sets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterQPOperationErrors", (value)) +} + +// GetRequesterQPOperationErrors gets the value of RequesterQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteAccessErrors sets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteAccessErrors", (value)) +} + +// GetRequesterRemoteAccessErrors gets the value of RequesterRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRemoteOperationErrors sets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRemoteOperationErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRemoteOperationErrors", (value)) +} + +// GetRequesterRemoteOperationErrors gets the value of RequesterRemoteOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRemoteOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRemoteOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAK sets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRNRNAK(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAK", (value)) +} + +// GetRequesterRNRNAK gets the value of RequesterRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterRNRNAKRetriesExceededErrors sets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterRNRNAKRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterRNRNAKRetriesExceededErrors", (value)) +} + +// GetRequesterRNRNAKRetriesExceededErrors gets the value of RequesterRNRNAKRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterRNRNAKRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterRNRNAKRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTimeoutReceived sets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterTimeoutReceived(value uint64) (err error) { + return instance.SetProperty("RequesterTimeoutReceived", (value)) +} + +// GetRequesterTimeoutReceived gets the value of RequesterTimeoutReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterTimeoutReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTimeoutReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequesterTransportRetriesExceededErrors sets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyRequesterTransportRetriesExceededErrors(value uint64) (err error) { + return instance.SetProperty("RequesterTransportRetriesExceededErrors", (value)) +} + +// GetRequesterTransportRetriesExceededErrors gets the value of RequesterTransportRetriesExceededErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyRequesterTransportRetriesExceededErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("RequesterTransportRetriesExceededErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderCQEErrors sets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderCQEErrors(value uint64) (err error) { + return instance.SetProperty("ResponderCQEErrors", (value)) +} + +// GetResponderCQEErrors gets the value of ResponderCQEErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderCQEErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderCQEErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderDuplicateRequestReceived sets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderDuplicateRequestReceived(value uint64) (err error) { + return instance.SetProperty("ResponderDuplicateRequestReceived", (value)) +} + +// GetResponderDuplicateRequestReceived gets the value of ResponderDuplicateRequestReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderDuplicateRequestReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderDuplicateRequestReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderInvalidRequestErrors sets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderInvalidRequestErrors(value uint64) (err error) { + return instance.SetProperty("ResponderInvalidRequestErrors", (value)) +} + +// GetResponderInvalidRequestErrors gets the value of ResponderInvalidRequestErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderInvalidRequestErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderInvalidRequestErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderLengthErrors sets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderLengthErrors(value uint64) (err error) { + return instance.SetProperty("ResponderLengthErrors", (value)) +} + +// GetResponderLengthErrors gets the value of ResponderLengthErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderLengthErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderLengthErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderOutoforderSequenceReceived sets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderOutoforderSequenceReceived(value uint64) (err error) { + return instance.SetProperty("ResponderOutoforderSequenceReceived", (value)) +} + +// GetResponderOutoforderSequenceReceived gets the value of ResponderOutoforderSequenceReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderOutoforderSequenceReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderOutoforderSequenceReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderProtectionErrors sets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderProtectionErrors(value uint64) (err error) { + return instance.SetProperty("ResponderProtectionErrors", (value)) +} + +// GetResponderProtectionErrors gets the value of ResponderProtectionErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderProtectionErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderProtectionErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderQPOperationErrors sets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderQPOperationErrors(value uint64) (err error) { + return instance.SetProperty("ResponderQPOperationErrors", (value)) +} + +// GetResponderQPOperationErrors gets the value of ResponderQPOperationErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderQPOperationErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderQPOperationErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRemoteAccessErrors sets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderRemoteAccessErrors(value uint64) (err error) { + return instance.SetProperty("ResponderRemoteAccessErrors", (value)) +} + +// GetResponderRemoteAccessErrors gets the value of ResponderRemoteAccessErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderRemoteAccessErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRemoteAccessErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResponderRNRNAK sets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyResponderRNRNAK(value uint64) (err error) { + return instance.SetProperty("ResponderRNRNAK", (value)) +} + +// GetResponderRNRNAK gets the value of ResponderRNRNAK for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyResponderRNRNAK() (value uint64, err error) { + retValue, err := instance.GetProperty("ResponderRNRNAK") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTXRingIsFullPackets sets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) SetPropertyTXRingIsFullPackets(value uint64) (err error) { + return instance.SetProperty("TXRingIsFullPackets", (value)) +} + +// GetTXRingIsFullPackets gets the value of TXRingIsFullPackets for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterDiagnosticCounters) GetPropertyTXRingIsFullPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("TXRingIsFullPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go new file mode 100644 index 00000000..10ad071a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters struct +type Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + BytesTotal uint64 + + // + ControlPackets uint64 + + // + KBytesReceivedPerSec uint32 + + // + KBytesSentPerSec uint32 + + // + KBytesTotalPerSec uint32 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsReceived uint64 + + // + PacketsReceivedBadCRCError uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedFrameLengthError uint64 + + // + PacketsReceivedPerSec uint32 + + // + PacketsReceivedSymbolError uint64 + + // + PacketsSent uint64 + + // + PacketsSentPerSec uint32 + + // + PacketsTotal uint64 + + // + PacketsTotalPerSec uint32 +} + +func NewWin32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCountersEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCountersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetControlPackets sets the value of ControlPackets for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyControlPackets(value uint64) (err error) { + return instance.SetProperty("ControlPackets", (value)) +} + +// GetControlPackets gets the value of ControlPackets for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyControlPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("ControlPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetKBytesReceivedPerSec sets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyKBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesReceivedPerSec", (value)) +} + +// GetKBytesReceivedPerSec gets the value of KBytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyKBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesSentPerSec sets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyKBytesSentPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesSentPerSec", (value)) +} + +// GetKBytesSentPerSec gets the value of KBytesSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyKBytesSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetKBytesTotalPerSec sets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyKBytesTotalPerSec(value uint32) (err error) { + return instance.SetProperty("KBytesTotalPerSec", (value)) +} + +// GetKBytesTotalPerSec gets the value of KBytesTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyKBytesTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("KBytesTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceived sets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceived(value uint64) (err error) { + return instance.SetProperty("PacketsReceived", (value)) +} + +// GetPacketsReceived gets the value of PacketsReceived for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedBadCRCError sets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedBadCRCError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedBadCRCError", (value)) +} + +// GetPacketsReceivedBadCRCError gets the value of PacketsReceivedBadCRCError for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedBadCRCError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedBadCRCError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedFrameLengthError sets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedFrameLengthError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedFrameLengthError", (value)) +} + +// GetPacketsReceivedFrameLengthError gets the value of PacketsReceivedFrameLengthError for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedFrameLengthError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedFrameLengthError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPerSec sets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsReceivedPerSec", (value)) +} + +// GetPacketsReceivedPerSec gets the value of PacketsReceivedPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsReceivedSymbolError sets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsReceivedSymbolError(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedSymbolError", (value)) +} + +// GetPacketsReceivedSymbolError gets the value of PacketsReceivedSymbolError for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsReceivedSymbolError() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedSymbolError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSent sets the value of PacketsSent for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsSent(value uint64) (err error) { + return instance.SetProperty("PacketsSent", (value)) +} + +// GetPacketsSent gets the value of PacketsSent for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPerSec sets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsSentPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsSentPerSec", (value)) +} + +// GetPacketsSentPerSec gets the value of PacketsSentPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsSentPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsSentPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsTotal sets the value of PacketsTotal for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PacketsTotal", (value)) +} + +// GetPacketsTotal gets the value of PacketsTotal for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTotalPerSec sets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) SetPropertyPacketsTotalPerSec(value uint32) (err error) { + return instance.SetProperty("PacketsTotalPerSec", (value)) +} + +// GetPacketsTotalPerSec gets the value of PacketsTotalPerSec for the instance +func (instance *Win32_PerfRawData_Mlx4IBProvider_MellanoxIBAdapterTrafficCounters) GetPropertyPacketsTotalPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsTotalPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go new file mode 100644 index 00000000..d0bec4dc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager.go @@ -0,0 +1,69 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager struct +type Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager struct { + *Win32_PerfRawData + + // + MemoryBlockCount uint64 +} + +func NewWin32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManagerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManagerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMemoryBlockCount sets the value of MemoryBlockCount for the instance +func (instance *Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager) SetPropertyMemoryBlockCount(value uint64) (err error) { + return instance.SetProperty("MemoryBlockCount", value) +} + +// GetMemoryBlockCount gets the value of MemoryBlockCount for the instance +func (instance *Win32_PerfRawData_MmPerfProvider_HyperVVMWorkerProcessMemoryManager) GetPropertyMemoryBlockCount() (value uint64, err error) { + retValue, err := instance.GetProperty("MemoryBlockCount") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRData_NETCLRData.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRData_NETCLRData.go new file mode 100644 index 00000000..5cea7dee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRData_NETCLRData.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETCLRData_NETCLRData struct +type Win32_PerfRawData_NETCLRData_NETCLRData struct { + *Win32_PerfRawData + + // + SqlClientCurrentNumberconnectionpools uint32 + + // + SqlClientCurrentNumberpooledandnonpooledconnections uint32 + + // + SqlClientCurrentNumberpooledconnections uint32 + + // + SqlClientPeakNumberpooledconnections uint32 + + // + SqlClientTotalNumberfailedcommands uint32 + + // + SqlClientTotalNumberfailedconnects uint32 +} + +func NewWin32_PerfRawData_NETCLRData_NETCLRDataEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETCLRData_NETCLRData, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETCLRData_NETCLRData{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETCLRData_NETCLRDataEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETCLRData_NETCLRData, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETCLRData_NETCLRData{ + Win32_PerfRawData: tmp, + } + return +} + +// SetSqlClientCurrentNumberconnectionpools sets the value of SqlClientCurrentNumberconnectionpools for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) SetPropertySqlClientCurrentNumberconnectionpools(value uint32) (err error) { + return instance.SetProperty("SqlClientCurrentNumberconnectionpools", (value)) +} + +// GetSqlClientCurrentNumberconnectionpools gets the value of SqlClientCurrentNumberconnectionpools for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) GetPropertySqlClientCurrentNumberconnectionpools() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientCurrentNumberconnectionpools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientCurrentNumberpooledandnonpooledconnections sets the value of SqlClientCurrentNumberpooledandnonpooledconnections for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) SetPropertySqlClientCurrentNumberpooledandnonpooledconnections(value uint32) (err error) { + return instance.SetProperty("SqlClientCurrentNumberpooledandnonpooledconnections", (value)) +} + +// GetSqlClientCurrentNumberpooledandnonpooledconnections gets the value of SqlClientCurrentNumberpooledandnonpooledconnections for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) GetPropertySqlClientCurrentNumberpooledandnonpooledconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientCurrentNumberpooledandnonpooledconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientCurrentNumberpooledconnections sets the value of SqlClientCurrentNumberpooledconnections for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) SetPropertySqlClientCurrentNumberpooledconnections(value uint32) (err error) { + return instance.SetProperty("SqlClientCurrentNumberpooledconnections", (value)) +} + +// GetSqlClientCurrentNumberpooledconnections gets the value of SqlClientCurrentNumberpooledconnections for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) GetPropertySqlClientCurrentNumberpooledconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientCurrentNumberpooledconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientPeakNumberpooledconnections sets the value of SqlClientPeakNumberpooledconnections for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) SetPropertySqlClientPeakNumberpooledconnections(value uint32) (err error) { + return instance.SetProperty("SqlClientPeakNumberpooledconnections", (value)) +} + +// GetSqlClientPeakNumberpooledconnections gets the value of SqlClientPeakNumberpooledconnections for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) GetPropertySqlClientPeakNumberpooledconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientPeakNumberpooledconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientTotalNumberfailedcommands sets the value of SqlClientTotalNumberfailedcommands for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) SetPropertySqlClientTotalNumberfailedcommands(value uint32) (err error) { + return instance.SetProperty("SqlClientTotalNumberfailedcommands", (value)) +} + +// GetSqlClientTotalNumberfailedcommands gets the value of SqlClientTotalNumberfailedcommands for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) GetPropertySqlClientTotalNumberfailedcommands() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientTotalNumberfailedcommands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSqlClientTotalNumberfailedconnects sets the value of SqlClientTotalNumberfailedconnects for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) SetPropertySqlClientTotalNumberfailedconnects(value uint32) (err error) { + return instance.SetProperty("SqlClientTotalNumberfailedconnects", (value)) +} + +// GetSqlClientTotalNumberfailedconnects gets the value of SqlClientTotalNumberfailedconnects for the instance +func (instance *Win32_PerfRawData_NETCLRData_NETCLRData) GetPropertySqlClientTotalNumberfailedconnects() (value uint32, err error) { + retValue, err := instance.GetProperty("SqlClientTotalNumberfailedconnects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000.go new file mode 100644 index 00000000..9d3821e6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000 struct +type Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000 struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + ConnectionsEstablished uint32 + + // + DatagramsReceived uint32 + + // + DatagramsSent uint32 + + // + HttpWebRequestsAbortedPerSec uint32 + + // + HttpWebRequestsAverageLifetime uint64 + + // + HttpWebRequestsAverageLifetime_Base uint32 + + // + HttpWebRequestsAverageQueueTime uint64 + + // + HttpWebRequestsAverageQueueTime_Base uint32 + + // + HttpWebRequestsCreatedPerSec uint32 + + // + HttpWebRequestsFailedPerSec uint32 + + // + HttpWebRequestsQueuedPerSec uint32 +} + +func NewWin32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceived sets the value of DatagramsReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyDatagramsReceived(value uint32) (err error) { + return instance.SetProperty("DatagramsReceived", (value)) +} + +// GetDatagramsReceived gets the value of DatagramsReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyDatagramsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSent sets the value of DatagramsSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyDatagramsSent(value uint32) (err error) { + return instance.SetProperty("DatagramsSent", (value)) +} + +// GetDatagramsSent gets the value of DatagramsSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyDatagramsSent() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsAbortedPerSec sets the value of HttpWebRequestsAbortedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAbortedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsAbortedPerSec", (value)) +} + +// GetHttpWebRequestsAbortedPerSec gets the value of HttpWebRequestsAbortedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAbortedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAbortedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsAverageLifetime sets the value of HttpWebRequestsAverageLifetime for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAverageLifetime(value uint64) (err error) { + return instance.SetProperty("HttpWebRequestsAverageLifetime", (value)) +} + +// GetHttpWebRequestsAverageLifetime gets the value of HttpWebRequestsAverageLifetime for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAverageLifetime() (value uint64, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAverageLifetime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHttpWebRequestsAverageLifetime_Base sets the value of HttpWebRequestsAverageLifetime_Base for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAverageLifetime_Base(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsAverageLifetime_Base", (value)) +} + +// GetHttpWebRequestsAverageLifetime_Base gets the value of HttpWebRequestsAverageLifetime_Base for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAverageLifetime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAverageLifetime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsAverageQueueTime sets the value of HttpWebRequestsAverageQueueTime for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAverageQueueTime(value uint64) (err error) { + return instance.SetProperty("HttpWebRequestsAverageQueueTime", (value)) +} + +// GetHttpWebRequestsAverageQueueTime gets the value of HttpWebRequestsAverageQueueTime for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAverageQueueTime() (value uint64, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAverageQueueTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHttpWebRequestsAverageQueueTime_Base sets the value of HttpWebRequestsAverageQueueTime_Base for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsAverageQueueTime_Base(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsAverageQueueTime_Base", (value)) +} + +// GetHttpWebRequestsAverageQueueTime_Base gets the value of HttpWebRequestsAverageQueueTime_Base for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsAverageQueueTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsAverageQueueTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsCreatedPerSec sets the value of HttpWebRequestsCreatedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsCreatedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsCreatedPerSec", (value)) +} + +// GetHttpWebRequestsCreatedPerSec gets the value of HttpWebRequestsCreatedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsCreatedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsCreatedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsFailedPerSec sets the value of HttpWebRequestsFailedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsFailedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsFailedPerSec", (value)) +} + +// GetHttpWebRequestsFailedPerSec gets the value of HttpWebRequestsFailedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsFailedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsFailedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHttpWebRequestsQueuedPerSec sets the value of HttpWebRequestsQueuedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) SetPropertyHttpWebRequestsQueuedPerSec(value uint32) (err error) { + return instance.SetProperty("HttpWebRequestsQueuedPerSec", (value)) +} + +// GetHttpWebRequestsQueuedPerSec gets the value of HttpWebRequestsQueuedPerSec for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking4000_NETCLRNetworking4000) GetPropertyHttpWebRequestsQueuedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("HttpWebRequestsQueuedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking.go new file mode 100644 index 00000000..7c6d32aa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking struct +type Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesSent uint64 + + // + ConnectionsEstablished uint32 + + // + DatagramsReceived uint32 + + // + DatagramsSent uint32 +} + +func NewWin32_PerfRawData_NETCLRNetworking_NETCLRNetworkingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETCLRNetworking_NETCLRNetworkingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSent sets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) SetPropertyBytesSent(value uint64) (err error) { + return instance.SetProperty("BytesSent", (value)) +} + +// GetBytesSent gets the value of BytesSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) GetPropertyBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceived sets the value of DatagramsReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) SetPropertyDatagramsReceived(value uint32) (err error) { + return instance.SetProperty("DatagramsReceived", (value)) +} + +// GetDatagramsReceived gets the value of DatagramsReceived for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) GetPropertyDatagramsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSent sets the value of DatagramsSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) SetPropertyDatagramsSent(value uint32) (err error) { + return instance.SetProperty("DatagramsSent", (value)) +} + +// GetDatagramsSent gets the value of DatagramsSent for the instance +func (instance *Win32_PerfRawData_NETCLRNetworking_NETCLRNetworking) GetPropertyDatagramsSent() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle.go new file mode 100644 index 00000000..34652025 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle struct +type Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle struct { + *Win32_PerfRawData + + // + HardConnectsPerSecond uint32 + + // + HardDisconnectsPerSecond uint32 + + // + NumberOfActiveConnectionPoolGroups uint32 + + // + NumberOfActiveConnectionPools uint32 + + // + NumberOfActiveConnections uint32 + + // + NumberOfFreeConnections uint32 + + // + NumberOfInactiveConnectionPoolGroups uint32 + + // + NumberOfInactiveConnectionPools uint32 + + // + NumberOfNonPooledConnections uint32 + + // + NumberOfPooledConnections uint32 + + // + NumberOfReclaimedConnections uint32 + + // + NumberOfStasisConnections uint32 + + // + SoftConnectsPerSecond uint32 + + // + SoftDisconnectsPerSecond uint32 +} + +func NewWin32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracleEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracleEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHardConnectsPerSecond sets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyHardConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardConnectsPerSecond", (value)) +} + +// GetHardConnectsPerSecond gets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyHardConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHardDisconnectsPerSecond sets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyHardDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardDisconnectsPerSecond", (value)) +} + +// GetHardDisconnectsPerSecond gets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyHardDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPoolGroups sets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfActiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPoolGroups", (value)) +} + +// GetNumberOfActiveConnectionPoolGroups gets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfActiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPools sets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfActiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPools", (value)) +} + +// GetNumberOfActiveConnectionPools gets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfActiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnections sets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfActiveConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnections", (value)) +} + +// GetNumberOfActiveConnections gets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfActiveConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfFreeConnections sets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfFreeConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfFreeConnections", (value)) +} + +// GetNumberOfFreeConnections gets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfFreeConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfFreeConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPoolGroups sets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfInactiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPoolGroups", (value)) +} + +// GetNumberOfInactiveConnectionPoolGroups gets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfInactiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPools sets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfInactiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPools", (value)) +} + +// GetNumberOfInactiveConnectionPools gets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfInactiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfNonPooledConnections sets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfNonPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfNonPooledConnections", (value)) +} + +// GetNumberOfNonPooledConnections gets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfNonPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfNonPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfPooledConnections sets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfPooledConnections", (value)) +} + +// GetNumberOfPooledConnections gets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfReclaimedConnections sets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfReclaimedConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfReclaimedConnections", (value)) +} + +// GetNumberOfReclaimedConnections gets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfReclaimedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfReclaimedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfStasisConnections sets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertyNumberOfStasisConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfStasisConnections", (value)) +} + +// GetNumberOfStasisConnections gets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertyNumberOfStasisConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfStasisConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftConnectsPerSecond sets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertySoftConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftConnectsPerSecond", (value)) +} + +// GetSoftConnectsPerSecond gets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertySoftConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftDisconnectsPerSecond sets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) SetPropertySoftDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftDisconnectsPerSecond", (value)) +} + +// GetSoftDisconnectsPerSecond gets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforOracle_NETDataProviderforOracle) GetPropertySoftDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go new file mode 100644 index 00000000..b9477188 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer struct +type Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer struct { + *Win32_PerfRawData + + // + HardConnectsPerSecond uint32 + + // + HardDisconnectsPerSecond uint32 + + // + NumberOfActiveConnectionPoolGroups uint32 + + // + NumberOfActiveConnectionPools uint32 + + // + NumberOfActiveConnections uint32 + + // + NumberOfFreeConnections uint32 + + // + NumberOfInactiveConnectionPoolGroups uint32 + + // + NumberOfInactiveConnectionPools uint32 + + // + NumberOfNonPooledConnections uint32 + + // + NumberOfPooledConnections uint32 + + // + NumberOfReclaimedConnections uint32 + + // + NumberOfStasisConnections uint32 + + // + SoftConnectsPerSecond uint32 + + // + SoftDisconnectsPerSecond uint32 +} + +func NewWin32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHardConnectsPerSecond sets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyHardConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardConnectsPerSecond", (value)) +} + +// GetHardConnectsPerSecond gets the value of HardConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyHardConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHardDisconnectsPerSecond sets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyHardDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("HardDisconnectsPerSecond", (value)) +} + +// GetHardDisconnectsPerSecond gets the value of HardDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyHardDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("HardDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPoolGroups sets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfActiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPoolGroups", (value)) +} + +// GetNumberOfActiveConnectionPoolGroups gets the value of NumberOfActiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfActiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnectionPools sets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfActiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnectionPools", (value)) +} + +// GetNumberOfActiveConnectionPools gets the value of NumberOfActiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfActiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfActiveConnections sets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfActiveConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfActiveConnections", (value)) +} + +// GetNumberOfActiveConnections gets the value of NumberOfActiveConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfActiveConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfActiveConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfFreeConnections sets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfFreeConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfFreeConnections", (value)) +} + +// GetNumberOfFreeConnections gets the value of NumberOfFreeConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfFreeConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfFreeConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPoolGroups sets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfInactiveConnectionPoolGroups(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPoolGroups", (value)) +} + +// GetNumberOfInactiveConnectionPoolGroups gets the value of NumberOfInactiveConnectionPoolGroups for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfInactiveConnectionPoolGroups() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPoolGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfInactiveConnectionPools sets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfInactiveConnectionPools(value uint32) (err error) { + return instance.SetProperty("NumberOfInactiveConnectionPools", (value)) +} + +// GetNumberOfInactiveConnectionPools gets the value of NumberOfInactiveConnectionPools for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfInactiveConnectionPools() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfInactiveConnectionPools") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfNonPooledConnections sets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfNonPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfNonPooledConnections", (value)) +} + +// GetNumberOfNonPooledConnections gets the value of NumberOfNonPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfNonPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfNonPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfPooledConnections sets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfPooledConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfPooledConnections", (value)) +} + +// GetNumberOfPooledConnections gets the value of NumberOfPooledConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfPooledConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfPooledConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfReclaimedConnections sets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfReclaimedConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfReclaimedConnections", (value)) +} + +// GetNumberOfReclaimedConnections gets the value of NumberOfReclaimedConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfReclaimedConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfReclaimedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfStasisConnections sets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertyNumberOfStasisConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfStasisConnections", (value)) +} + +// GetNumberOfStasisConnections gets the value of NumberOfStasisConnections for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertyNumberOfStasisConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfStasisConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftConnectsPerSecond sets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertySoftConnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftConnectsPerSecond", (value)) +} + +// GetSoftConnectsPerSecond gets the value of SoftConnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertySoftConnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftConnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSoftDisconnectsPerSecond sets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) SetPropertySoftDisconnectsPerSecond(value uint32) (err error) { + return instance.SetProperty("SoftDisconnectsPerSecond", (value)) +} + +// GetSoftDisconnectsPerSecond gets the value of SoftDisconnectsPerSecond for the instance +func (instance *Win32_PerfRawData_NETDataProviderforSqlServer_NETDataProviderforSqlServer) GetPropertySoftDisconnectsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SoftDisconnectsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRExceptions.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRExceptions.go new file mode 100644 index 00000000..b773ca19 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRExceptions.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRExceptions struct +type Win32_PerfRawData_NETFramework_NETCLRExceptions struct { + *Win32_PerfRawData + + // + NumberofExcepsThrown uint32 + + // + NumberofExcepsThrownPersec uint32 + + // + NumberofFiltersPersec uint32 + + // + NumberofFinallysPersec uint32 + + // + ThrowToCatchDepthPersec uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRExceptionsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRExceptions, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRExceptions{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRExceptionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRExceptions, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRExceptions{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberofExcepsThrown sets the value of NumberofExcepsThrown for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) SetPropertyNumberofExcepsThrown(value uint32) (err error) { + return instance.SetProperty("NumberofExcepsThrown", (value)) +} + +// GetNumberofExcepsThrown gets the value of NumberofExcepsThrown for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) GetPropertyNumberofExcepsThrown() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofExcepsThrown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofExcepsThrownPersec sets the value of NumberofExcepsThrownPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) SetPropertyNumberofExcepsThrownPersec(value uint32) (err error) { + return instance.SetProperty("NumberofExcepsThrownPersec", (value)) +} + +// GetNumberofExcepsThrownPersec gets the value of NumberofExcepsThrownPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) GetPropertyNumberofExcepsThrownPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofExcepsThrownPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofFiltersPersec sets the value of NumberofFiltersPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) SetPropertyNumberofFiltersPersec(value uint32) (err error) { + return instance.SetProperty("NumberofFiltersPersec", (value)) +} + +// GetNumberofFiltersPersec gets the value of NumberofFiltersPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) GetPropertyNumberofFiltersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofFiltersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofFinallysPersec sets the value of NumberofFinallysPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) SetPropertyNumberofFinallysPersec(value uint32) (err error) { + return instance.SetProperty("NumberofFinallysPersec", (value)) +} + +// GetNumberofFinallysPersec gets the value of NumberofFinallysPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) GetPropertyNumberofFinallysPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofFinallysPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThrowToCatchDepthPersec sets the value of ThrowToCatchDepthPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) SetPropertyThrowToCatchDepthPersec(value uint32) (err error) { + return instance.SetProperty("ThrowToCatchDepthPersec", (value)) +} + +// GetThrowToCatchDepthPersec gets the value of ThrowToCatchDepthPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRExceptions) GetPropertyThrowToCatchDepthPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ThrowToCatchDepthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRInterop.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRInterop.go new file mode 100644 index 00000000..77b3e913 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRInterop.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRInterop struct +type Win32_PerfRawData_NETFramework_NETCLRInterop struct { + *Win32_PerfRawData + + // + NumberofCCWs uint32 + + // + Numberofmarshalling uint32 + + // + NumberofStubs uint32 + + // + NumberofTLBexportsPersec uint32 + + // + NumberofTLBimportsPersec uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRInteropEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRInterop, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRInterop{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRInteropEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRInterop, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRInterop{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberofCCWs sets the value of NumberofCCWs for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) SetPropertyNumberofCCWs(value uint32) (err error) { + return instance.SetProperty("NumberofCCWs", (value)) +} + +// GetNumberofCCWs gets the value of NumberofCCWs for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) GetPropertyNumberofCCWs() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofCCWs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofmarshalling sets the value of Numberofmarshalling for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) SetPropertyNumberofmarshalling(value uint32) (err error) { + return instance.SetProperty("Numberofmarshalling", (value)) +} + +// GetNumberofmarshalling gets the value of Numberofmarshalling for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) GetPropertyNumberofmarshalling() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofmarshalling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofStubs sets the value of NumberofStubs for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) SetPropertyNumberofStubs(value uint32) (err error) { + return instance.SetProperty("NumberofStubs", (value)) +} + +// GetNumberofStubs gets the value of NumberofStubs for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) GetPropertyNumberofStubs() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofStubs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofTLBexportsPersec sets the value of NumberofTLBexportsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) SetPropertyNumberofTLBexportsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofTLBexportsPersec", (value)) +} + +// GetNumberofTLBexportsPersec gets the value of NumberofTLBexportsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) GetPropertyNumberofTLBexportsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofTLBexportsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofTLBimportsPersec sets the value of NumberofTLBimportsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) SetPropertyNumberofTLBimportsPersec(value uint32) (err error) { + return instance.SetProperty("NumberofTLBimportsPersec", (value)) +} + +// GetNumberofTLBimportsPersec gets the value of NumberofTLBimportsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRInterop) GetPropertyNumberofTLBimportsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofTLBimportsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRJit.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRJit.go new file mode 100644 index 00000000..284ab2be --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRJit.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRJit struct +type Win32_PerfRawData_NETFramework_NETCLRJit struct { + *Win32_PerfRawData + + // + ILBytesJittedPersec uint32 + + // + NumberofILBytesJitted uint32 + + // + NumberofMethodsJitted uint32 + + // + PercentTimeinJit uint32 + + // + PercentTimeinJit_Base uint32 + + // + StandardJitFailures uint32 + + // + TotalNumberofILBytesJitted uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRJitEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRJit, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRJit{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRJitEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRJit, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRJit{ + Win32_PerfRawData: tmp, + } + return +} + +// SetILBytesJittedPersec sets the value of ILBytesJittedPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyILBytesJittedPersec(value uint32) (err error) { + return instance.SetProperty("ILBytesJittedPersec", (value)) +} + +// GetILBytesJittedPersec gets the value of ILBytesJittedPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyILBytesJittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ILBytesJittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofILBytesJitted sets the value of NumberofILBytesJitted for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyNumberofILBytesJitted(value uint32) (err error) { + return instance.SetProperty("NumberofILBytesJitted", (value)) +} + +// GetNumberofILBytesJitted gets the value of NumberofILBytesJitted for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyNumberofILBytesJitted() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofILBytesJitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofMethodsJitted sets the value of NumberofMethodsJitted for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyNumberofMethodsJitted(value uint32) (err error) { + return instance.SetProperty("NumberofMethodsJitted", (value)) +} + +// GetNumberofMethodsJitted gets the value of NumberofMethodsJitted for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyNumberofMethodsJitted() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofMethodsJitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinJit sets the value of PercentTimeinJit for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyPercentTimeinJit(value uint32) (err error) { + return instance.SetProperty("PercentTimeinJit", (value)) +} + +// GetPercentTimeinJit gets the value of PercentTimeinJit for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyPercentTimeinJit() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinJit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinJit_Base sets the value of PercentTimeinJit_Base for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyPercentTimeinJit_Base(value uint32) (err error) { + return instance.SetProperty("PercentTimeinJit_Base", (value)) +} + +// GetPercentTimeinJit_Base gets the value of PercentTimeinJit_Base for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyPercentTimeinJit_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinJit_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardJitFailures sets the value of StandardJitFailures for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyStandardJitFailures(value uint32) (err error) { + return instance.SetProperty("StandardJitFailures", (value)) +} + +// GetStandardJitFailures gets the value of StandardJitFailures for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyStandardJitFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardJitFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofILBytesJitted sets the value of TotalNumberofILBytesJitted for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) SetPropertyTotalNumberofILBytesJitted(value uint32) (err error) { + return instance.SetProperty("TotalNumberofILBytesJitted", (value)) +} + +// GetTotalNumberofILBytesJitted gets the value of TotalNumberofILBytesJitted for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRJit) GetPropertyTotalNumberofILBytesJitted() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofILBytesJitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLoading.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLoading.go new file mode 100644 index 00000000..e30aee29 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLoading.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRLoading struct +type Win32_PerfRawData_NETFramework_NETCLRLoading struct { + *Win32_PerfRawData + + // + AssemblySearchLength uint32 + + // + BytesinLoaderHeap uint32 + + // + Currentappdomains uint32 + + // + CurrentAssemblies uint32 + + // + CurrentClassesLoaded uint32 + + // + PercentTimeLoading uint64 + + // + Rateofappdomains uint32 + + // + Rateofappdomainsunloaded uint32 + + // + RateofAssemblies uint32 + + // + RateofClassesLoaded uint32 + + // + RateofLoadFailures uint32 + + // + TotalAppdomains uint32 + + // + Totalappdomainsunloaded uint32 + + // + TotalAssemblies uint32 + + // + TotalClassesLoaded uint32 + + // + TotalNumberofLoadFailures uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRLoadingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRLoading, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRLoading{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRLoadingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRLoading, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRLoading{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAssemblySearchLength sets the value of AssemblySearchLength for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyAssemblySearchLength(value uint32) (err error) { + return instance.SetProperty("AssemblySearchLength", (value)) +} + +// GetAssemblySearchLength gets the value of AssemblySearchLength for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyAssemblySearchLength() (value uint32, err error) { + retValue, err := instance.GetProperty("AssemblySearchLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesinLoaderHeap sets the value of BytesinLoaderHeap for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyBytesinLoaderHeap(value uint32) (err error) { + return instance.SetProperty("BytesinLoaderHeap", (value)) +} + +// GetBytesinLoaderHeap gets the value of BytesinLoaderHeap for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyBytesinLoaderHeap() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesinLoaderHeap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentappdomains sets the value of Currentappdomains for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyCurrentappdomains(value uint32) (err error) { + return instance.SetProperty("Currentappdomains", (value)) +} + +// GetCurrentappdomains gets the value of Currentappdomains for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyCurrentappdomains() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentappdomains") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentAssemblies sets the value of CurrentAssemblies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyCurrentAssemblies(value uint32) (err error) { + return instance.SetProperty("CurrentAssemblies", (value)) +} + +// GetCurrentAssemblies gets the value of CurrentAssemblies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyCurrentAssemblies() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentAssemblies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentClassesLoaded sets the value of CurrentClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyCurrentClassesLoaded(value uint32) (err error) { + return instance.SetProperty("CurrentClassesLoaded", (value)) +} + +// GetCurrentClassesLoaded gets the value of CurrentClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyCurrentClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeLoading sets the value of PercentTimeLoading for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyPercentTimeLoading(value uint64) (err error) { + return instance.SetProperty("PercentTimeLoading", (value)) +} + +// GetPercentTimeLoading gets the value of PercentTimeLoading for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyPercentTimeLoading() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeLoading") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRateofappdomains sets the value of Rateofappdomains for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyRateofappdomains(value uint32) (err error) { + return instance.SetProperty("Rateofappdomains", (value)) +} + +// GetRateofappdomains gets the value of Rateofappdomains for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyRateofappdomains() (value uint32, err error) { + retValue, err := instance.GetProperty("Rateofappdomains") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofappdomainsunloaded sets the value of Rateofappdomainsunloaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyRateofappdomainsunloaded(value uint32) (err error) { + return instance.SetProperty("Rateofappdomainsunloaded", (value)) +} + +// GetRateofappdomainsunloaded gets the value of Rateofappdomainsunloaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyRateofappdomainsunloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("Rateofappdomainsunloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofAssemblies sets the value of RateofAssemblies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyRateofAssemblies(value uint32) (err error) { + return instance.SetProperty("RateofAssemblies", (value)) +} + +// GetRateofAssemblies gets the value of RateofAssemblies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyRateofAssemblies() (value uint32, err error) { + retValue, err := instance.GetProperty("RateofAssemblies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofClassesLoaded sets the value of RateofClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyRateofClassesLoaded(value uint32) (err error) { + return instance.SetProperty("RateofClassesLoaded", (value)) +} + +// GetRateofClassesLoaded gets the value of RateofClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyRateofClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("RateofClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRateofLoadFailures sets the value of RateofLoadFailures for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyRateofLoadFailures(value uint32) (err error) { + return instance.SetProperty("RateofLoadFailures", (value)) +} + +// GetRateofLoadFailures gets the value of RateofLoadFailures for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyRateofLoadFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("RateofLoadFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalAppdomains sets the value of TotalAppdomains for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyTotalAppdomains(value uint32) (err error) { + return instance.SetProperty("TotalAppdomains", (value)) +} + +// GetTotalAppdomains gets the value of TotalAppdomains for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyTotalAppdomains() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalAppdomains") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalappdomainsunloaded sets the value of Totalappdomainsunloaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyTotalappdomainsunloaded(value uint32) (err error) { + return instance.SetProperty("Totalappdomainsunloaded", (value)) +} + +// GetTotalappdomainsunloaded gets the value of Totalappdomainsunloaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyTotalappdomainsunloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("Totalappdomainsunloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalAssemblies sets the value of TotalAssemblies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyTotalAssemblies(value uint32) (err error) { + return instance.SetProperty("TotalAssemblies", (value)) +} + +// GetTotalAssemblies gets the value of TotalAssemblies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyTotalAssemblies() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalAssemblies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalClassesLoaded sets the value of TotalClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyTotalClassesLoaded(value uint32) (err error) { + return instance.SetProperty("TotalClassesLoaded", (value)) +} + +// GetTotalClassesLoaded gets the value of TotalClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyTotalClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofLoadFailures sets the value of TotalNumberofLoadFailures for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) SetPropertyTotalNumberofLoadFailures(value uint32) (err error) { + return instance.SetProperty("TotalNumberofLoadFailures", (value)) +} + +// GetTotalNumberofLoadFailures gets the value of TotalNumberofLoadFailures for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLoading) GetPropertyTotalNumberofLoadFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofLoadFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads.go new file mode 100644 index 00000000..691ebe6a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads.go @@ -0,0 +1,350 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads struct +type Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads struct { + *Win32_PerfRawData + + // + ContentionRatePersec uint32 + + // + CurrentQueueLength uint32 + + // + NumberofcurrentlogicalThreads uint32 + + // + NumberofcurrentphysicalThreads uint32 + + // + Numberofcurrentrecognizedthreads uint32 + + // + Numberoftotalrecognizedthreads uint32 + + // + QueueLengthPeak uint32 + + // + QueueLengthPersec uint32 + + // + rateofrecognizedthreadsPersec uint32 + + // + TotalNumberofContentions uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRLocksAndThreadsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRLocksAndThreadsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads{ + Win32_PerfRawData: tmp, + } + return +} + +// SetContentionRatePersec sets the value of ContentionRatePersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyContentionRatePersec(value uint32) (err error) { + return instance.SetProperty("ContentionRatePersec", (value)) +} + +// GetContentionRatePersec gets the value of ContentionRatePersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyContentionRatePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContentionRatePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentQueueLength sets the value of CurrentQueueLength for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyCurrentQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentQueueLength", (value)) +} + +// GetCurrentQueueLength gets the value of CurrentQueueLength for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyCurrentQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcurrentlogicalThreads sets the value of NumberofcurrentlogicalThreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberofcurrentlogicalThreads(value uint32) (err error) { + return instance.SetProperty("NumberofcurrentlogicalThreads", (value)) +} + +// GetNumberofcurrentlogicalThreads gets the value of NumberofcurrentlogicalThreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberofcurrentlogicalThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofcurrentlogicalThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcurrentphysicalThreads sets the value of NumberofcurrentphysicalThreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberofcurrentphysicalThreads(value uint32) (err error) { + return instance.SetProperty("NumberofcurrentphysicalThreads", (value)) +} + +// GetNumberofcurrentphysicalThreads gets the value of NumberofcurrentphysicalThreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberofcurrentphysicalThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofcurrentphysicalThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofcurrentrecognizedthreads sets the value of Numberofcurrentrecognizedthreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberofcurrentrecognizedthreads(value uint32) (err error) { + return instance.SetProperty("Numberofcurrentrecognizedthreads", (value)) +} + +// GetNumberofcurrentrecognizedthreads gets the value of Numberofcurrentrecognizedthreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberofcurrentrecognizedthreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberofcurrentrecognizedthreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberoftotalrecognizedthreads sets the value of Numberoftotalrecognizedthreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyNumberoftotalrecognizedthreads(value uint32) (err error) { + return instance.SetProperty("Numberoftotalrecognizedthreads", (value)) +} + +// GetNumberoftotalrecognizedthreads gets the value of Numberoftotalrecognizedthreads for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyNumberoftotalrecognizedthreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Numberoftotalrecognizedthreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueueLengthPeak sets the value of QueueLengthPeak for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyQueueLengthPeak(value uint32) (err error) { + return instance.SetProperty("QueueLengthPeak", (value)) +} + +// GetQueueLengthPeak gets the value of QueueLengthPeak for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyQueueLengthPeak() (value uint32, err error) { + retValue, err := instance.GetProperty("QueueLengthPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueueLengthPersec sets the value of QueueLengthPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyQueueLengthPersec(value uint32) (err error) { + return instance.SetProperty("QueueLengthPersec", (value)) +} + +// GetQueueLengthPersec gets the value of QueueLengthPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyQueueLengthPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("QueueLengthPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetrateofrecognizedthreadsPersec sets the value of rateofrecognizedthreadsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyrateofrecognizedthreadsPersec(value uint32) (err error) { + return instance.SetProperty("rateofrecognizedthreadsPersec", (value)) +} + +// GetrateofrecognizedthreadsPersec gets the value of rateofrecognizedthreadsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyrateofrecognizedthreadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("rateofrecognizedthreadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalNumberofContentions sets the value of TotalNumberofContentions for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) SetPropertyTotalNumberofContentions(value uint32) (err error) { + return instance.SetProperty("TotalNumberofContentions", (value)) +} + +// GetTotalNumberofContentions gets the value of TotalNumberofContentions for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRLocksAndThreads) GetPropertyTotalNumberofContentions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalNumberofContentions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRMemory.go new file mode 100644 index 00000000..f5e47d70 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRMemory.go @@ -0,0 +1,770 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRMemory struct +type Win32_PerfRawData_NETFramework_NETCLRMemory struct { + *Win32_PerfRawData + + // + AllocatedBytesPersec uint32 + + // + FinalizationSurvivors uint32 + + // + Gen0heapsize uint32 + + // + Gen0PromotedBytesPerSec uint32 + + // + Gen1heapsize uint32 + + // + Gen1PromotedBytesPerSec uint32 + + // + Gen2heapsize uint32 + + // + LargeObjectHeapsize uint32 + + // + NumberBytesinallHeaps uint32 + + // + NumberGCHandles uint32 + + // + NumberGen0Collections uint32 + + // + NumberGen1Collections uint32 + + // + NumberGen2Collections uint32 + + // + NumberInducedGC uint32 + + // + NumberofPinnedObjects uint32 + + // + NumberofSinkBlocksinuse uint32 + + // + NumberTotalcommittedBytes uint32 + + // + NumberTotalreservedBytes uint32 + + // + PercentTimeinGC uint32 + + // + PercentTimeinGC_Base uint32 + + // + ProcessID uint32 + + // + PromotedFinalizationMemoryfromGen0 uint32 + + // + PromotedMemoryfromGen0 uint32 + + // + PromotedMemoryfromGen1 uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRMemory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRMemory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAllocatedBytesPersec sets the value of AllocatedBytesPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyAllocatedBytesPersec(value uint32) (err error) { + return instance.SetProperty("AllocatedBytesPersec", (value)) +} + +// GetAllocatedBytesPersec gets the value of AllocatedBytesPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyAllocatedBytesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AllocatedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFinalizationSurvivors sets the value of FinalizationSurvivors for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyFinalizationSurvivors(value uint32) (err error) { + return instance.SetProperty("FinalizationSurvivors", (value)) +} + +// GetFinalizationSurvivors gets the value of FinalizationSurvivors for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyFinalizationSurvivors() (value uint32, err error) { + retValue, err := instance.GetProperty("FinalizationSurvivors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen0heapsize sets the value of Gen0heapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyGen0heapsize(value uint32) (err error) { + return instance.SetProperty("Gen0heapsize", (value)) +} + +// GetGen0heapsize gets the value of Gen0heapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyGen0heapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen0heapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen0PromotedBytesPerSec sets the value of Gen0PromotedBytesPerSec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyGen0PromotedBytesPerSec(value uint32) (err error) { + return instance.SetProperty("Gen0PromotedBytesPerSec", (value)) +} + +// GetGen0PromotedBytesPerSec gets the value of Gen0PromotedBytesPerSec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyGen0PromotedBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen0PromotedBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen1heapsize sets the value of Gen1heapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyGen1heapsize(value uint32) (err error) { + return instance.SetProperty("Gen1heapsize", (value)) +} + +// GetGen1heapsize gets the value of Gen1heapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyGen1heapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen1heapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen1PromotedBytesPerSec sets the value of Gen1PromotedBytesPerSec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyGen1PromotedBytesPerSec(value uint32) (err error) { + return instance.SetProperty("Gen1PromotedBytesPerSec", (value)) +} + +// GetGen1PromotedBytesPerSec gets the value of Gen1PromotedBytesPerSec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyGen1PromotedBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen1PromotedBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGen2heapsize sets the value of Gen2heapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyGen2heapsize(value uint32) (err error) { + return instance.SetProperty("Gen2heapsize", (value)) +} + +// GetGen2heapsize gets the value of Gen2heapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyGen2heapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("Gen2heapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLargeObjectHeapsize sets the value of LargeObjectHeapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyLargeObjectHeapsize(value uint32) (err error) { + return instance.SetProperty("LargeObjectHeapsize", (value)) +} + +// GetLargeObjectHeapsize gets the value of LargeObjectHeapsize for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyLargeObjectHeapsize() (value uint32, err error) { + retValue, err := instance.GetProperty("LargeObjectHeapsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberBytesinallHeaps sets the value of NumberBytesinallHeaps for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberBytesinallHeaps(value uint32) (err error) { + return instance.SetProperty("NumberBytesinallHeaps", (value)) +} + +// GetNumberBytesinallHeaps gets the value of NumberBytesinallHeaps for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberBytesinallHeaps() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberBytesinallHeaps") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGCHandles sets the value of NumberGCHandles for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberGCHandles(value uint32) (err error) { + return instance.SetProperty("NumberGCHandles", (value)) +} + +// GetNumberGCHandles gets the value of NumberGCHandles for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberGCHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGCHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGen0Collections sets the value of NumberGen0Collections for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberGen0Collections(value uint32) (err error) { + return instance.SetProperty("NumberGen0Collections", (value)) +} + +// GetNumberGen0Collections gets the value of NumberGen0Collections for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberGen0Collections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGen0Collections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGen1Collections sets the value of NumberGen1Collections for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberGen1Collections(value uint32) (err error) { + return instance.SetProperty("NumberGen1Collections", (value)) +} + +// GetNumberGen1Collections gets the value of NumberGen1Collections for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberGen1Collections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGen1Collections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberGen2Collections sets the value of NumberGen2Collections for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberGen2Collections(value uint32) (err error) { + return instance.SetProperty("NumberGen2Collections", (value)) +} + +// GetNumberGen2Collections gets the value of NumberGen2Collections for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberGen2Collections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberGen2Collections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberInducedGC sets the value of NumberInducedGC for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberInducedGC(value uint32) (err error) { + return instance.SetProperty("NumberInducedGC", (value)) +} + +// GetNumberInducedGC gets the value of NumberInducedGC for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberInducedGC() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberInducedGC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofPinnedObjects sets the value of NumberofPinnedObjects for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberofPinnedObjects(value uint32) (err error) { + return instance.SetProperty("NumberofPinnedObjects", (value)) +} + +// GetNumberofPinnedObjects gets the value of NumberofPinnedObjects for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberofPinnedObjects() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofPinnedObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberofSinkBlocksinuse sets the value of NumberofSinkBlocksinuse for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberofSinkBlocksinuse(value uint32) (err error) { + return instance.SetProperty("NumberofSinkBlocksinuse", (value)) +} + +// GetNumberofSinkBlocksinuse gets the value of NumberofSinkBlocksinuse for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberofSinkBlocksinuse() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberofSinkBlocksinuse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberTotalcommittedBytes sets the value of NumberTotalcommittedBytes for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberTotalcommittedBytes(value uint32) (err error) { + return instance.SetProperty("NumberTotalcommittedBytes", (value)) +} + +// GetNumberTotalcommittedBytes gets the value of NumberTotalcommittedBytes for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberTotalcommittedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberTotalcommittedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberTotalreservedBytes sets the value of NumberTotalreservedBytes for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyNumberTotalreservedBytes(value uint32) (err error) { + return instance.SetProperty("NumberTotalreservedBytes", (value)) +} + +// GetNumberTotalreservedBytes gets the value of NumberTotalreservedBytes for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyNumberTotalreservedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberTotalreservedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinGC sets the value of PercentTimeinGC for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyPercentTimeinGC(value uint32) (err error) { + return instance.SetProperty("PercentTimeinGC", (value)) +} + +// GetPercentTimeinGC gets the value of PercentTimeinGC for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyPercentTimeinGC() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinGC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinGC_Base sets the value of PercentTimeinGC_Base for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyPercentTimeinGC_Base(value uint32) (err error) { + return instance.SetProperty("PercentTimeinGC_Base", (value)) +} + +// GetPercentTimeinGC_Base gets the value of PercentTimeinGC_Base for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyPercentTimeinGC_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinGC_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPromotedFinalizationMemoryfromGen0 sets the value of PromotedFinalizationMemoryfromGen0 for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyPromotedFinalizationMemoryfromGen0(value uint32) (err error) { + return instance.SetProperty("PromotedFinalizationMemoryfromGen0", (value)) +} + +// GetPromotedFinalizationMemoryfromGen0 gets the value of PromotedFinalizationMemoryfromGen0 for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyPromotedFinalizationMemoryfromGen0() (value uint32, err error) { + retValue, err := instance.GetProperty("PromotedFinalizationMemoryfromGen0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPromotedMemoryfromGen0 sets the value of PromotedMemoryfromGen0 for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyPromotedMemoryfromGen0(value uint32) (err error) { + return instance.SetProperty("PromotedMemoryfromGen0", (value)) +} + +// GetPromotedMemoryfromGen0 gets the value of PromotedMemoryfromGen0 for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyPromotedMemoryfromGen0() (value uint32, err error) { + retValue, err := instance.GetProperty("PromotedMemoryfromGen0") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPromotedMemoryfromGen1 sets the value of PromotedMemoryfromGen1 for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) SetPropertyPromotedMemoryfromGen1(value uint32) (err error) { + return instance.SetProperty("PromotedMemoryfromGen1", (value)) +} + +// GetPromotedMemoryfromGen1 gets the value of PromotedMemoryfromGen1 for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRMemory) GetPropertyPromotedMemoryfromGen1() (value uint32, err error) { + retValue, err := instance.GetProperty("PromotedMemoryfromGen1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRRemoting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRRemoting.go new file mode 100644 index 00000000..19e13c27 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRRemoting.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRRemoting struct +type Win32_PerfRawData_NETFramework_NETCLRRemoting struct { + *Win32_PerfRawData + + // + Channels uint32 + + // + ContextBoundClassesLoaded uint32 + + // + ContextBoundObjectsAllocPersec uint32 + + // + ContextProxies uint32 + + // + Contexts uint32 + + // + RemoteCallsPersec uint32 + + // + TotalRemoteCalls uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRRemotingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRRemoting, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRRemoting{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRRemotingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRRemoting, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRRemoting{ + Win32_PerfRawData: tmp, + } + return +} + +// SetChannels sets the value of Channels for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyChannels(value uint32) (err error) { + return instance.SetProperty("Channels", (value)) +} + +// GetChannels gets the value of Channels for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyChannels() (value uint32, err error) { + retValue, err := instance.GetProperty("Channels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextBoundClassesLoaded sets the value of ContextBoundClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyContextBoundClassesLoaded(value uint32) (err error) { + return instance.SetProperty("ContextBoundClassesLoaded", (value)) +} + +// GetContextBoundClassesLoaded gets the value of ContextBoundClassesLoaded for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyContextBoundClassesLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBoundClassesLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextBoundObjectsAllocPersec sets the value of ContextBoundObjectsAllocPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyContextBoundObjectsAllocPersec(value uint32) (err error) { + return instance.SetProperty("ContextBoundObjectsAllocPersec", (value)) +} + +// GetContextBoundObjectsAllocPersec gets the value of ContextBoundObjectsAllocPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyContextBoundObjectsAllocPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBoundObjectsAllocPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextProxies sets the value of ContextProxies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyContextProxies(value uint32) (err error) { + return instance.SetProperty("ContextProxies", (value)) +} + +// GetContextProxies gets the value of ContextProxies for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyContextProxies() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextProxies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContexts sets the value of Contexts for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyContexts(value uint32) (err error) { + return instance.SetProperty("Contexts", (value)) +} + +// GetContexts gets the value of Contexts for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyContexts() (value uint32, err error) { + retValue, err := instance.GetProperty("Contexts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRemoteCallsPersec sets the value of RemoteCallsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyRemoteCallsPersec(value uint32) (err error) { + return instance.SetProperty("RemoteCallsPersec", (value)) +} + +// GetRemoteCallsPersec gets the value of RemoteCallsPersec for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyRemoteCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RemoteCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalRemoteCalls sets the value of TotalRemoteCalls for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) SetPropertyTotalRemoteCalls(value uint32) (err error) { + return instance.SetProperty("TotalRemoteCalls", (value)) +} + +// GetTotalRemoteCalls gets the value of TotalRemoteCalls for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRRemoting) GetPropertyTotalRemoteCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRemoteCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRSecurity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRSecurity.go new file mode 100644 index 00000000..2648f95f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETFramework_NETCLRSecurity.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETFramework_NETCLRSecurity struct +type Win32_PerfRawData_NETFramework_NETCLRSecurity struct { + *Win32_PerfRawData + + // + NumberLinkTimeChecks uint32 + + // + PercentTimeinRTchecks uint32 + + // + PercentTimeinRTchecks_Base uint32 + + // + PercentTimeSigAuthenticating uint64 + + // + StackWalkDepth uint32 + + // + TotalRuntimeChecks uint32 +} + +func NewWin32_PerfRawData_NETFramework_NETCLRSecurityEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETFramework_NETCLRSecurity, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRSecurity{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETFramework_NETCLRSecurityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETFramework_NETCLRSecurity, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETFramework_NETCLRSecurity{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberLinkTimeChecks sets the value of NumberLinkTimeChecks for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) SetPropertyNumberLinkTimeChecks(value uint32) (err error) { + return instance.SetProperty("NumberLinkTimeChecks", (value)) +} + +// GetNumberLinkTimeChecks gets the value of NumberLinkTimeChecks for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) GetPropertyNumberLinkTimeChecks() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberLinkTimeChecks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinRTchecks sets the value of PercentTimeinRTchecks for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) SetPropertyPercentTimeinRTchecks(value uint32) (err error) { + return instance.SetProperty("PercentTimeinRTchecks", (value)) +} + +// GetPercentTimeinRTchecks gets the value of PercentTimeinRTchecks for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) GetPropertyPercentTimeinRTchecks() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinRTchecks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeinRTchecks_Base sets the value of PercentTimeinRTchecks_Base for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) SetPropertyPercentTimeinRTchecks_Base(value uint32) (err error) { + return instance.SetProperty("PercentTimeinRTchecks_Base", (value)) +} + +// GetPercentTimeinRTchecks_Base gets the value of PercentTimeinRTchecks_Base for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) GetPropertyPercentTimeinRTchecks_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTimeinRTchecks_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTimeSigAuthenticating sets the value of PercentTimeSigAuthenticating for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) SetPropertyPercentTimeSigAuthenticating(value uint64) (err error) { + return instance.SetProperty("PercentTimeSigAuthenticating", (value)) +} + +// GetPercentTimeSigAuthenticating gets the value of PercentTimeSigAuthenticating for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) GetPropertyPercentTimeSigAuthenticating() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentTimeSigAuthenticating") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackWalkDepth sets the value of StackWalkDepth for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) SetPropertyStackWalkDepth(value uint32) (err error) { + return instance.SetProperty("StackWalkDepth", (value)) +} + +// GetStackWalkDepth gets the value of StackWalkDepth for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) GetPropertyStackWalkDepth() (value uint32, err error) { + retValue, err := instance.GetProperty("StackWalkDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalRuntimeChecks sets the value of TotalRuntimeChecks for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) SetPropertyTotalRuntimeChecks(value uint32) (err error) { + return instance.SetProperty("TotalRuntimeChecks", (value)) +} + +// GetTotalRuntimeChecks gets the value of TotalRuntimeChecks for the instance +func (instance *Win32_PerfRawData_NETFramework_NETCLRSecurity) GetPropertyTotalRuntimeChecks() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRuntimeChecks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40.go new file mode 100644 index 00000000..b301a655 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40 struct +type Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40 struct { + *Win32_PerfRawData + + // + CacheEntries uint32 + + // + CacheHitRatio uint32 + + // + CacheHitRatio_Base uint32 + + // + CacheHits uint32 + + // + CacheMisses uint32 + + // + CacheTrims uint32 + + // + CacheTurnoverRate uint32 +} + +func NewWin32_PerfRawData_NETMemoryCache40_NETMemoryCache40Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NETMemoryCache40_NETMemoryCache40Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCacheEntries sets the value of CacheEntries for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheEntries(value uint32) (err error) { + return instance.SetProperty("CacheEntries", (value)) +} + +// GetCacheEntries gets the value of CacheEntries for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheHitRatio sets the value of CacheHitRatio for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheHitRatio(value uint32) (err error) { + return instance.SetProperty("CacheHitRatio", (value)) +} + +// GetCacheHitRatio gets the value of CacheHitRatio for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheHitRatio() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheHitRatio") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheHitRatio_Base sets the value of CacheHitRatio_Base for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheHitRatio_Base(value uint32) (err error) { + return instance.SetProperty("CacheHitRatio_Base", (value)) +} + +// GetCacheHitRatio_Base gets the value of CacheHitRatio_Base for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheHitRatio_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheHitRatio_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheHits sets the value of CacheHits for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheHits(value uint32) (err error) { + return instance.SetProperty("CacheHits", (value)) +} + +// GetCacheHits gets the value of CacheHits for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheHits() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheHits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheMisses sets the value of CacheMisses for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheMisses(value uint32) (err error) { + return instance.SetProperty("CacheMisses", (value)) +} + +// GetCacheMisses gets the value of CacheMisses for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheMisses() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheMisses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheTrims sets the value of CacheTrims for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheTrims(value uint32) (err error) { + return instance.SetProperty("CacheTrims", (value)) +} + +// GetCacheTrims gets the value of CacheTrims for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheTrims() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheTrims") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCacheTurnoverRate sets the value of CacheTurnoverRate for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) SetPropertyCacheTurnoverRate(value uint32) (err error) { + return instance.SetProperty("CacheTurnoverRate", (value)) +} + +// GetCacheTurnoverRate gets the value of CacheTurnoverRate for the instance +func (instance *Win32_PerfRawData_NETMemoryCache40_NETMemoryCache40) GetPropertyCacheTurnoverRate() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheTurnoverRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats.go new file mode 100644 index 00000000..774c3bee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats struct +type Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats struct { + *Win32_PerfRawData + + // + Missingheartbeats uint32 + + // + Missingheartbeatslimit uint32 +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeatsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeatsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMissingheartbeats sets the value of Missingheartbeats for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats) SetPropertyMissingheartbeats(value uint32) (err error) { + return instance.SetProperty("Missingheartbeats", (value)) +} + +// GetMissingheartbeats gets the value of Missingheartbeats for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats) GetPropertyMissingheartbeats() (value uint32, err error) { + retValue, err := instance.GetProperty("Missingheartbeats") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissingheartbeatslimit sets the value of Missingheartbeatslimit for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats) SetPropertyMissingheartbeatslimit(value uint32) (err error) { + return instance.SetProperty("Missingheartbeatslimit", (value)) +} + +// GetMissingheartbeatslimit gets the value of Missingheartbeatslimit for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetFtHeartbeats) GetPropertyMissingheartbeatslimit() (value uint32, err error) { + retValue, err := instance.GetProperty("Missingheartbeatslimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go new file mode 100644 index 00000000..ffda0308 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter struct +type Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter struct { + *Win32_PerfRawData + + // + TotalReceives uint64 + + // + TotalReceivesAccepted uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequests uint64 + + // + TotalSendRequestsAccepted uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalReceives sets the value of TotalReceives for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalReceives(value uint64) (err error) { + return instance.SetProperty("TotalReceives", value) +} + +// GetTotalReceives gets the value of TotalReceives for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalReceives() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceives") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesAccepted sets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalReceivesAccepted(value uint64) (err error) { + return instance.SetProperty("TotalReceivesAccepted", value) +} + +// GetTotalReceivesAccepted gets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalReceivesAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequests sets the value of TotalSendRequests for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalSendRequests(value uint64) (err error) { + return instance.SetProperty("TotalSendRequests", value) +} + +// GetTotalSendRequests gets the value of TotalSendRequests for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalSendRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequests") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsAccepted sets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalSendRequestsAccepted(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsAccepted", value) +} + +// GetTotalSendRequestsAccepted gets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalSendRequestsAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftMiniportAdapter) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go new file mode 100644 index 00000000..abeb87cb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter.go @@ -0,0 +1,258 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter struct +type Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter struct { + *Win32_PerfRawData + + // + ACKRecievedPerSec uint64 + + // + ACKSentPerSec uint64 + + // + HeartbeatsRecievedPerSec uint64 + + // + HeartbeatsSentPerSec uint64 + + // + TotalACKRecieved uint64 + + // + TotalACKSent uint64 + + // + TotalHeartbeatsRecieved uint64 + + // + TotalHeartbeatsSent uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetACKRecievedPerSec sets the value of ACKRecievedPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyACKRecievedPerSec(value uint64) (err error) { + return instance.SetProperty("ACKRecievedPerSec", value) +} + +// GetACKRecievedPerSec gets the value of ACKRecievedPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyACKRecievedPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("ACKRecievedPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetACKSentPerSec sets the value of ACKSentPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyACKSentPerSec(value uint64) (err error) { + return instance.SetProperty("ACKSentPerSec", value) +} + +// GetACKSentPerSec gets the value of ACKSentPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyACKSentPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("ACKSentPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetHeartbeatsRecievedPerSec sets the value of HeartbeatsRecievedPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyHeartbeatsRecievedPerSec(value uint64) (err error) { + return instance.SetProperty("HeartbeatsRecievedPerSec", value) +} + +// GetHeartbeatsRecievedPerSec gets the value of HeartbeatsRecievedPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyHeartbeatsRecievedPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("HeartbeatsRecievedPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetHeartbeatsSentPerSec sets the value of HeartbeatsSentPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyHeartbeatsSentPerSec(value uint64) (err error) { + return instance.SetProperty("HeartbeatsSentPerSec", value) +} + +// GetHeartbeatsSentPerSec gets the value of HeartbeatsSentPerSec for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyHeartbeatsSentPerSec() (value uint64, err error) { + retValue, err := instance.GetProperty("HeartbeatsSentPerSec") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalACKRecieved sets the value of TotalACKRecieved for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalACKRecieved(value uint64) (err error) { + return instance.SetProperty("TotalACKRecieved", value) +} + +// GetTotalACKRecieved gets the value of TotalACKRecieved for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalACKRecieved() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalACKRecieved") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalACKSent sets the value of TotalACKSent for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalACKSent(value uint64) (err error) { + return instance.SetProperty("TotalACKSent", value) +} + +// GetTotalACKSent gets the value of TotalACKSent for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalACKSent() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalACKSent") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalHeartbeatsRecieved sets the value of TotalHeartbeatsRecieved for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalHeartbeatsRecieved(value uint64) (err error) { + return instance.SetProperty("TotalHeartbeatsRecieved", value) +} + +// GetTotalHeartbeatsRecieved gets the value of TotalHeartbeatsRecieved for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalHeartbeatsRecieved() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalHeartbeatsRecieved") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalHeartbeatsSent sets the value of TotalHeartbeatsSent for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalHeartbeatsSent(value uint64) (err error) { + return instance.SetProperty("TotalHeartbeatsSent", value) +} + +// GetTotalHeartbeatsSent gets the value of TotalHeartbeatsSent for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalHeartbeatsSent() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalHeartbeatsSent") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftRouteMonitorAdapter) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go new file mode 100644 index 00000000..00926fe4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter struct +type Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter struct { + *Win32_PerfRawData + + // + TotalReceives uint64 + + // + TotalReceivesAccepted uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequests uint64 + + // + TotalSendRequestsAccepted uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalReceives sets the value of TotalReceives for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalReceives(value uint64) (err error) { + return instance.SetProperty("TotalReceives", value) +} + +// GetTotalReceives gets the value of TotalReceives for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalReceives() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceives") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesAccepted sets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalReceivesAccepted(value uint64) (err error) { + return instance.SetProperty("TotalReceivesAccepted", value) +} + +// GetTotalReceivesAccepted gets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalReceivesAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequests sets the value of TotalSendRequests for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalSendRequests(value uint64) (err error) { + return instance.SetProperty("TotalSendRequests", value) +} + +// GetTotalSendRequests gets the value of TotalSendRequests for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalSendRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequests") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsAccepted sets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalSendRequestsAccepted(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsAccepted", value) +} + +// GetTotalSendRequestsAccepted gets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalSendRequestsAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftTunnelAdapter) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface.go new file mode 100644 index 00000000..2a108527 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface.go @@ -0,0 +1,174 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface struct +type Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface struct { + *Win32_PerfRawData + + // + TotalReceives uint64 + + // + TotalReceivesAccepted uint64 + + // + TotalReceivesDropped uint64 + + // + TotalSendRequests uint64 + + // + TotalSendRequestsAccepted uint64 + + // + TotalSendRequestsDropped uint64 +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterfaceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterfaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTotalReceives sets the value of TotalReceives for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalReceives(value uint64) (err error) { + return instance.SetProperty("TotalReceives", value) +} + +// GetTotalReceives gets the value of TotalReceives for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalReceives() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceives") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesAccepted sets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalReceivesAccepted(value uint64) (err error) { + return instance.SetProperty("TotalReceivesAccepted", value) +} + +// GetTotalReceivesAccepted gets the value of TotalReceivesAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalReceivesAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalReceivesDropped sets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalReceivesDropped(value uint64) (err error) { + return instance.SetProperty("TotalReceivesDropped", value) +} + +// GetTotalReceivesDropped gets the value of TotalReceivesDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalReceivesDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalReceivesDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequests sets the value of TotalSendRequests for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalSendRequests(value uint64) (err error) { + return instance.SetProperty("TotalSendRequests", value) +} + +// GetTotalSendRequests gets the value of TotalSendRequests for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalSendRequests() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequests") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsAccepted sets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalSendRequestsAccepted(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsAccepted", value) +} + +// GetTotalSendRequestsAccepted gets the value of TotalSendRequestsAccepted for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalSendRequestsAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsAccepted") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} + +// SetTotalSendRequestsDropped sets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) SetPropertyTotalSendRequestsDropped(value uint64) (err error) { + return instance.SetProperty("TotalSendRequestsDropped", value) +} + +// GetTotalSendRequestsDropped gets the value of TotalSendRequestsDropped for the instance +func (instance *Win32_PerfRawData_NetFtPerfProvider_ClusterNetftWskInterface) GetPropertyTotalSendRequestsDropped() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalSendRequestsDropped") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go new file mode 100644 index 00000000..b41e666f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons.go @@ -0,0 +1,2390 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons struct +type Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons struct { + *Win32_PerfRawData + + // + IncomingBridgeReserved uint64 + + // + IncomingBusy uint64 + + // + IncomingDhcpGuard uint64 + + // + IncomingDisconnected uint64 + + // + IncomingFailedDestinationListUpdate uint64 + + // + IncomingFailedPacketFilter uint64 + + // + IncomingFailedPvlanSetting uint64 + + // + IncomingFailedSecurityPolicy uint64 + + // + IncomingFiltered uint64 + + // + IncomingFilteredIsolationUntagged uint64 + + // + IncomingFilteredVLAN uint64 + + // + IncomingInjectedIcmp uint64 + + // + IncomingInvalidConfig uint64 + + // + IncomingInvalidData uint64 + + // + IncomingInvalidDestMac uint64 + + // + IncomingInvalidFirstNBTooSmall uint64 + + // + IncomingInvalidPacket uint64 + + // + IncomingInvalidPDQueue uint64 + + // + IncomingInvalidSourceMac uint64 + + // + IncomingInvalidVlanFormat uint64 + + // + IncomingIpsec uint64 + + // + IncomingLowPowerPacketFilter uint64 + + // + IncomingMacSpoofing uint64 + + // + IncomingMTUMismatch uint64 + + // + IncomingNativeFwdingReq uint64 + + // + IncomingNicDisabled uint64 + + // + IncomingNotAccepted uint64 + + // + IncomingNotReady uint64 + + // + IncomingQos uint64 + + // + IncomingRequiredExtensionMissing uint64 + + // + IncomingResources uint64 + + // + IncomingRouterGuard uint64 + + // + IncomingStormLimit uint64 + + // + IncomingSwitchDataFlowDisabled uint64 + + // + IncomingUnauthorizedMAC uint64 + + // + IncomingUnauthorizedVLAN uint64 + + // + IncomingUnknown uint64 + + // + IncomingVirtualSubnetId uint64 + + // + IncomingWnv uint64 + + // + OutgoingBridgeReserved uint64 + + // + OutgoingBusy uint64 + + // + OutgoingDhcpGuard uint64 + + // + OutgoingDisconnected uint64 + + // + OutgoingFailedDestinationListUpdate uint64 + + // + OutgoingFailedPacketFilter uint64 + + // + OutgoingFailedPvlanSetting uint64 + + // + OutgoingFailedSecurityPolicy uint64 + + // + OutgoingFiltered uint64 + + // + OutgoingFilteredIsolationUntagged uint64 + + // + OutgoingFilteredVLAN uint64 + + // + OutgoingInjectedIcmp uint64 + + // + OutgoingInvalidConfig uint64 + + // + OutgoingInvalidData uint64 + + // + OutgoingInvalidDestMac uint64 + + // + OutgoingInvalidFirstNBTooSmall uint64 + + // + OutgoingInvalidPacket uint64 + + // + OutgoingInvalidPDQueue uint64 + + // + OutgoingInvalidSourceMac uint64 + + // + OutgoingInvalidVlanFormat uint64 + + // + OutgoingIpsec uint64 + + // + OutgoingLowPowerPacketFilter uint64 + + // + OutgoingMacSpoofing uint64 + + // + OutgoingMTUMismatch uint64 + + // + OutgoingNativeFwdingReq uint64 + + // + OutgoingNicDisabled uint64 + + // + OutgoingNotAccepted uint64 + + // + OutgoingNotReady uint64 + + // + OutgoingQos uint64 + + // + OutgoingRequiredExtensionMissing uint64 + + // + OutgoingResources uint64 + + // + OutgoingRouterGuard uint64 + + // + OutgoingStormLimit uint64 + + // + OutgoingSwitchDataFlowDisabled uint64 + + // + OutgoingUnauthorizedMAC uint64 + + // + OutgoingUnauthorizedVLAN uint64 + + // + OutgoingUnknown uint64 + + // + OutgoingVirtualSubnetId uint64 + + // + OutgoingWnv uint64 +} + +func NewWin32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasonsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasonsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons{ + Win32_PerfRawData: tmp, + } + return +} + +// SetIncomingBridgeReserved sets the value of IncomingBridgeReserved for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingBridgeReserved(value uint64) (err error) { + return instance.SetProperty("IncomingBridgeReserved", (value)) +} + +// GetIncomingBridgeReserved gets the value of IncomingBridgeReserved for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingBridgeReserved() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingBridgeReserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingBusy sets the value of IncomingBusy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingBusy(value uint64) (err error) { + return instance.SetProperty("IncomingBusy", (value)) +} + +// GetIncomingBusy gets the value of IncomingBusy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingBusy() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingBusy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingDhcpGuard sets the value of IncomingDhcpGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingDhcpGuard(value uint64) (err error) { + return instance.SetProperty("IncomingDhcpGuard", (value)) +} + +// GetIncomingDhcpGuard gets the value of IncomingDhcpGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingDhcpGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingDhcpGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingDisconnected sets the value of IncomingDisconnected for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingDisconnected(value uint64) (err error) { + return instance.SetProperty("IncomingDisconnected", (value)) +} + +// GetIncomingDisconnected gets the value of IncomingDisconnected for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingDisconnected() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingDisconnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedDestinationListUpdate sets the value of IncomingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedDestinationListUpdate(value uint64) (err error) { + return instance.SetProperty("IncomingFailedDestinationListUpdate", (value)) +} + +// GetIncomingFailedDestinationListUpdate gets the value of IncomingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedDestinationListUpdate() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedDestinationListUpdate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedPacketFilter sets the value of IncomingFailedPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedPacketFilter(value uint64) (err error) { + return instance.SetProperty("IncomingFailedPacketFilter", (value)) +} + +// GetIncomingFailedPacketFilter gets the value of IncomingFailedPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedPvlanSetting sets the value of IncomingFailedPvlanSetting for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedPvlanSetting(value uint64) (err error) { + return instance.SetProperty("IncomingFailedPvlanSetting", (value)) +} + +// GetIncomingFailedPvlanSetting gets the value of IncomingFailedPvlanSetting for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedPvlanSetting() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedPvlanSetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFailedSecurityPolicy sets the value of IncomingFailedSecurityPolicy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFailedSecurityPolicy(value uint64) (err error) { + return instance.SetProperty("IncomingFailedSecurityPolicy", (value)) +} + +// GetIncomingFailedSecurityPolicy gets the value of IncomingFailedSecurityPolicy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFailedSecurityPolicy() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFailedSecurityPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFiltered sets the value of IncomingFiltered for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFiltered(value uint64) (err error) { + return instance.SetProperty("IncomingFiltered", (value)) +} + +// GetIncomingFiltered gets the value of IncomingFiltered for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFiltered() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFiltered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFilteredIsolationUntagged sets the value of IncomingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFilteredIsolationUntagged(value uint64) (err error) { + return instance.SetProperty("IncomingFilteredIsolationUntagged", (value)) +} + +// GetIncomingFilteredIsolationUntagged gets the value of IncomingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFilteredIsolationUntagged() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFilteredIsolationUntagged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingFilteredVLAN sets the value of IncomingFilteredVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingFilteredVLAN(value uint64) (err error) { + return instance.SetProperty("IncomingFilteredVLAN", (value)) +} + +// GetIncomingFilteredVLAN gets the value of IncomingFilteredVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingFilteredVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingFilteredVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInjectedIcmp sets the value of IncomingInjectedIcmp for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInjectedIcmp(value uint64) (err error) { + return instance.SetProperty("IncomingInjectedIcmp", (value)) +} + +// GetIncomingInjectedIcmp gets the value of IncomingInjectedIcmp for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInjectedIcmp() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInjectedIcmp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidConfig sets the value of IncomingInvalidConfig for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidConfig(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidConfig", (value)) +} + +// GetIncomingInvalidConfig gets the value of IncomingInvalidConfig for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidConfig() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidConfig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidData sets the value of IncomingInvalidData for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidData(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidData", (value)) +} + +// GetIncomingInvalidData gets the value of IncomingInvalidData for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidData() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidDestMac sets the value of IncomingInvalidDestMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidDestMac(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidDestMac", (value)) +} + +// GetIncomingInvalidDestMac gets the value of IncomingInvalidDestMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidDestMac() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidDestMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidFirstNBTooSmall sets the value of IncomingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidFirstNBTooSmall(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidFirstNBTooSmall", (value)) +} + +// GetIncomingInvalidFirstNBTooSmall gets the value of IncomingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidFirstNBTooSmall() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidFirstNBTooSmall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidPacket sets the value of IncomingInvalidPacket for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidPacket(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidPacket", (value)) +} + +// GetIncomingInvalidPacket gets the value of IncomingInvalidPacket for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidPacket() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidPacket") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidPDQueue sets the value of IncomingInvalidPDQueue for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidPDQueue(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidPDQueue", (value)) +} + +// GetIncomingInvalidPDQueue gets the value of IncomingInvalidPDQueue for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidPDQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidPDQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidSourceMac sets the value of IncomingInvalidSourceMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidSourceMac(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidSourceMac", (value)) +} + +// GetIncomingInvalidSourceMac gets the value of IncomingInvalidSourceMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidSourceMac() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidSourceMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingInvalidVlanFormat sets the value of IncomingInvalidVlanFormat for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingInvalidVlanFormat(value uint64) (err error) { + return instance.SetProperty("IncomingInvalidVlanFormat", (value)) +} + +// GetIncomingInvalidVlanFormat gets the value of IncomingInvalidVlanFormat for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingInvalidVlanFormat() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingInvalidVlanFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingIpsec sets the value of IncomingIpsec for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingIpsec(value uint64) (err error) { + return instance.SetProperty("IncomingIpsec", (value)) +} + +// GetIncomingIpsec gets the value of IncomingIpsec for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingIpsec() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingIpsec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingLowPowerPacketFilter sets the value of IncomingLowPowerPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingLowPowerPacketFilter(value uint64) (err error) { + return instance.SetProperty("IncomingLowPowerPacketFilter", (value)) +} + +// GetIncomingLowPowerPacketFilter gets the value of IncomingLowPowerPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingLowPowerPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingLowPowerPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingMacSpoofing sets the value of IncomingMacSpoofing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingMacSpoofing(value uint64) (err error) { + return instance.SetProperty("IncomingMacSpoofing", (value)) +} + +// GetIncomingMacSpoofing gets the value of IncomingMacSpoofing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingMacSpoofing() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingMacSpoofing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingMTUMismatch sets the value of IncomingMTUMismatch for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingMTUMismatch(value uint64) (err error) { + return instance.SetProperty("IncomingMTUMismatch", (value)) +} + +// GetIncomingMTUMismatch gets the value of IncomingMTUMismatch for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingMTUMismatch() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingMTUMismatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNativeFwdingReq sets the value of IncomingNativeFwdingReq for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNativeFwdingReq(value uint64) (err error) { + return instance.SetProperty("IncomingNativeFwdingReq", (value)) +} + +// GetIncomingNativeFwdingReq gets the value of IncomingNativeFwdingReq for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNativeFwdingReq() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNativeFwdingReq") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNicDisabled sets the value of IncomingNicDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNicDisabled(value uint64) (err error) { + return instance.SetProperty("IncomingNicDisabled", (value)) +} + +// GetIncomingNicDisabled gets the value of IncomingNicDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNicDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNicDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNotAccepted sets the value of IncomingNotAccepted for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNotAccepted(value uint64) (err error) { + return instance.SetProperty("IncomingNotAccepted", (value)) +} + +// GetIncomingNotAccepted gets the value of IncomingNotAccepted for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNotAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNotAccepted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingNotReady sets the value of IncomingNotReady for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingNotReady(value uint64) (err error) { + return instance.SetProperty("IncomingNotReady", (value)) +} + +// GetIncomingNotReady gets the value of IncomingNotReady for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingNotReady() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingNotReady") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingQos sets the value of IncomingQos for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingQos(value uint64) (err error) { + return instance.SetProperty("IncomingQos", (value)) +} + +// GetIncomingQos gets the value of IncomingQos for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingQos() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingQos") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingRequiredExtensionMissing sets the value of IncomingRequiredExtensionMissing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingRequiredExtensionMissing(value uint64) (err error) { + return instance.SetProperty("IncomingRequiredExtensionMissing", (value)) +} + +// GetIncomingRequiredExtensionMissing gets the value of IncomingRequiredExtensionMissing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingRequiredExtensionMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingRequiredExtensionMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingResources sets the value of IncomingResources for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingResources(value uint64) (err error) { + return instance.SetProperty("IncomingResources", (value)) +} + +// GetIncomingResources gets the value of IncomingResources for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingResources() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingRouterGuard sets the value of IncomingRouterGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingRouterGuard(value uint64) (err error) { + return instance.SetProperty("IncomingRouterGuard", (value)) +} + +// GetIncomingRouterGuard gets the value of IncomingRouterGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingRouterGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingRouterGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingStormLimit sets the value of IncomingStormLimit for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingStormLimit(value uint64) (err error) { + return instance.SetProperty("IncomingStormLimit", (value)) +} + +// GetIncomingStormLimit gets the value of IncomingStormLimit for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingStormLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingStormLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingSwitchDataFlowDisabled sets the value of IncomingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingSwitchDataFlowDisabled(value uint64) (err error) { + return instance.SetProperty("IncomingSwitchDataFlowDisabled", (value)) +} + +// GetIncomingSwitchDataFlowDisabled gets the value of IncomingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingSwitchDataFlowDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingSwitchDataFlowDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingUnauthorizedMAC sets the value of IncomingUnauthorizedMAC for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingUnauthorizedMAC(value uint64) (err error) { + return instance.SetProperty("IncomingUnauthorizedMAC", (value)) +} + +// GetIncomingUnauthorizedMAC gets the value of IncomingUnauthorizedMAC for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingUnauthorizedMAC() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingUnauthorizedMAC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingUnauthorizedVLAN sets the value of IncomingUnauthorizedVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingUnauthorizedVLAN(value uint64) (err error) { + return instance.SetProperty("IncomingUnauthorizedVLAN", (value)) +} + +// GetIncomingUnauthorizedVLAN gets the value of IncomingUnauthorizedVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingUnauthorizedVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingUnauthorizedVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingUnknown sets the value of IncomingUnknown for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingUnknown(value uint64) (err error) { + return instance.SetProperty("IncomingUnknown", (value)) +} + +// GetIncomingUnknown gets the value of IncomingUnknown for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingVirtualSubnetId sets the value of IncomingVirtualSubnetId for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingVirtualSubnetId(value uint64) (err error) { + return instance.SetProperty("IncomingVirtualSubnetId", (value)) +} + +// GetIncomingVirtualSubnetId gets the value of IncomingVirtualSubnetId for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingVirtualSubnetId() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingVirtualSubnetId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIncomingWnv sets the value of IncomingWnv for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyIncomingWnv(value uint64) (err error) { + return instance.SetProperty("IncomingWnv", (value)) +} + +// GetIncomingWnv gets the value of IncomingWnv for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyIncomingWnv() (value uint64, err error) { + retValue, err := instance.GetProperty("IncomingWnv") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingBridgeReserved sets the value of OutgoingBridgeReserved for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingBridgeReserved(value uint64) (err error) { + return instance.SetProperty("OutgoingBridgeReserved", (value)) +} + +// GetOutgoingBridgeReserved gets the value of OutgoingBridgeReserved for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingBridgeReserved() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingBridgeReserved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingBusy sets the value of OutgoingBusy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingBusy(value uint64) (err error) { + return instance.SetProperty("OutgoingBusy", (value)) +} + +// GetOutgoingBusy gets the value of OutgoingBusy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingBusy() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingBusy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingDhcpGuard sets the value of OutgoingDhcpGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingDhcpGuard(value uint64) (err error) { + return instance.SetProperty("OutgoingDhcpGuard", (value)) +} + +// GetOutgoingDhcpGuard gets the value of OutgoingDhcpGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingDhcpGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingDhcpGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingDisconnected sets the value of OutgoingDisconnected for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingDisconnected(value uint64) (err error) { + return instance.SetProperty("OutgoingDisconnected", (value)) +} + +// GetOutgoingDisconnected gets the value of OutgoingDisconnected for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingDisconnected() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingDisconnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedDestinationListUpdate sets the value of OutgoingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedDestinationListUpdate(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedDestinationListUpdate", (value)) +} + +// GetOutgoingFailedDestinationListUpdate gets the value of OutgoingFailedDestinationListUpdate for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedDestinationListUpdate() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedDestinationListUpdate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedPacketFilter sets the value of OutgoingFailedPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedPacketFilter(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedPacketFilter", (value)) +} + +// GetOutgoingFailedPacketFilter gets the value of OutgoingFailedPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedPvlanSetting sets the value of OutgoingFailedPvlanSetting for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedPvlanSetting(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedPvlanSetting", (value)) +} + +// GetOutgoingFailedPvlanSetting gets the value of OutgoingFailedPvlanSetting for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedPvlanSetting() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedPvlanSetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFailedSecurityPolicy sets the value of OutgoingFailedSecurityPolicy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFailedSecurityPolicy(value uint64) (err error) { + return instance.SetProperty("OutgoingFailedSecurityPolicy", (value)) +} + +// GetOutgoingFailedSecurityPolicy gets the value of OutgoingFailedSecurityPolicy for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFailedSecurityPolicy() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFailedSecurityPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFiltered sets the value of OutgoingFiltered for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFiltered(value uint64) (err error) { + return instance.SetProperty("OutgoingFiltered", (value)) +} + +// GetOutgoingFiltered gets the value of OutgoingFiltered for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFiltered() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFiltered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFilteredIsolationUntagged sets the value of OutgoingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFilteredIsolationUntagged(value uint64) (err error) { + return instance.SetProperty("OutgoingFilteredIsolationUntagged", (value)) +} + +// GetOutgoingFilteredIsolationUntagged gets the value of OutgoingFilteredIsolationUntagged for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFilteredIsolationUntagged() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFilteredIsolationUntagged") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingFilteredVLAN sets the value of OutgoingFilteredVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingFilteredVLAN(value uint64) (err error) { + return instance.SetProperty("OutgoingFilteredVLAN", (value)) +} + +// GetOutgoingFilteredVLAN gets the value of OutgoingFilteredVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingFilteredVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingFilteredVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInjectedIcmp sets the value of OutgoingInjectedIcmp for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInjectedIcmp(value uint64) (err error) { + return instance.SetProperty("OutgoingInjectedIcmp", (value)) +} + +// GetOutgoingInjectedIcmp gets the value of OutgoingInjectedIcmp for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInjectedIcmp() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInjectedIcmp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidConfig sets the value of OutgoingInvalidConfig for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidConfig(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidConfig", (value)) +} + +// GetOutgoingInvalidConfig gets the value of OutgoingInvalidConfig for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidConfig() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidConfig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidData sets the value of OutgoingInvalidData for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidData(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidData", (value)) +} + +// GetOutgoingInvalidData gets the value of OutgoingInvalidData for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidData() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidDestMac sets the value of OutgoingInvalidDestMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidDestMac(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidDestMac", (value)) +} + +// GetOutgoingInvalidDestMac gets the value of OutgoingInvalidDestMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidDestMac() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidDestMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidFirstNBTooSmall sets the value of OutgoingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidFirstNBTooSmall(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidFirstNBTooSmall", (value)) +} + +// GetOutgoingInvalidFirstNBTooSmall gets the value of OutgoingInvalidFirstNBTooSmall for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidFirstNBTooSmall() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidFirstNBTooSmall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidPacket sets the value of OutgoingInvalidPacket for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidPacket(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidPacket", (value)) +} + +// GetOutgoingInvalidPacket gets the value of OutgoingInvalidPacket for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidPacket() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidPacket") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidPDQueue sets the value of OutgoingInvalidPDQueue for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidPDQueue(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidPDQueue", (value)) +} + +// GetOutgoingInvalidPDQueue gets the value of OutgoingInvalidPDQueue for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidPDQueue() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidPDQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidSourceMac sets the value of OutgoingInvalidSourceMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidSourceMac(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidSourceMac", (value)) +} + +// GetOutgoingInvalidSourceMac gets the value of OutgoingInvalidSourceMac for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidSourceMac() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidSourceMac") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingInvalidVlanFormat sets the value of OutgoingInvalidVlanFormat for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingInvalidVlanFormat(value uint64) (err error) { + return instance.SetProperty("OutgoingInvalidVlanFormat", (value)) +} + +// GetOutgoingInvalidVlanFormat gets the value of OutgoingInvalidVlanFormat for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingInvalidVlanFormat() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingInvalidVlanFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingIpsec sets the value of OutgoingIpsec for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingIpsec(value uint64) (err error) { + return instance.SetProperty("OutgoingIpsec", (value)) +} + +// GetOutgoingIpsec gets the value of OutgoingIpsec for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingIpsec() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingIpsec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingLowPowerPacketFilter sets the value of OutgoingLowPowerPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingLowPowerPacketFilter(value uint64) (err error) { + return instance.SetProperty("OutgoingLowPowerPacketFilter", (value)) +} + +// GetOutgoingLowPowerPacketFilter gets the value of OutgoingLowPowerPacketFilter for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingLowPowerPacketFilter() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingLowPowerPacketFilter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingMacSpoofing sets the value of OutgoingMacSpoofing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingMacSpoofing(value uint64) (err error) { + return instance.SetProperty("OutgoingMacSpoofing", (value)) +} + +// GetOutgoingMacSpoofing gets the value of OutgoingMacSpoofing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingMacSpoofing() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingMacSpoofing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingMTUMismatch sets the value of OutgoingMTUMismatch for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingMTUMismatch(value uint64) (err error) { + return instance.SetProperty("OutgoingMTUMismatch", (value)) +} + +// GetOutgoingMTUMismatch gets the value of OutgoingMTUMismatch for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingMTUMismatch() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingMTUMismatch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNativeFwdingReq sets the value of OutgoingNativeFwdingReq for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNativeFwdingReq(value uint64) (err error) { + return instance.SetProperty("OutgoingNativeFwdingReq", (value)) +} + +// GetOutgoingNativeFwdingReq gets the value of OutgoingNativeFwdingReq for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNativeFwdingReq() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNativeFwdingReq") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNicDisabled sets the value of OutgoingNicDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNicDisabled(value uint64) (err error) { + return instance.SetProperty("OutgoingNicDisabled", (value)) +} + +// GetOutgoingNicDisabled gets the value of OutgoingNicDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNicDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNicDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNotAccepted sets the value of OutgoingNotAccepted for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNotAccepted(value uint64) (err error) { + return instance.SetProperty("OutgoingNotAccepted", (value)) +} + +// GetOutgoingNotAccepted gets the value of OutgoingNotAccepted for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNotAccepted() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNotAccepted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingNotReady sets the value of OutgoingNotReady for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingNotReady(value uint64) (err error) { + return instance.SetProperty("OutgoingNotReady", (value)) +} + +// GetOutgoingNotReady gets the value of OutgoingNotReady for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingNotReady() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingNotReady") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingQos sets the value of OutgoingQos for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingQos(value uint64) (err error) { + return instance.SetProperty("OutgoingQos", (value)) +} + +// GetOutgoingQos gets the value of OutgoingQos for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingQos() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingQos") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingRequiredExtensionMissing sets the value of OutgoingRequiredExtensionMissing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingRequiredExtensionMissing(value uint64) (err error) { + return instance.SetProperty("OutgoingRequiredExtensionMissing", (value)) +} + +// GetOutgoingRequiredExtensionMissing gets the value of OutgoingRequiredExtensionMissing for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingRequiredExtensionMissing() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingRequiredExtensionMissing") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingResources sets the value of OutgoingResources for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingResources(value uint64) (err error) { + return instance.SetProperty("OutgoingResources", (value)) +} + +// GetOutgoingResources gets the value of OutgoingResources for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingResources() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingResources") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingRouterGuard sets the value of OutgoingRouterGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingRouterGuard(value uint64) (err error) { + return instance.SetProperty("OutgoingRouterGuard", (value)) +} + +// GetOutgoingRouterGuard gets the value of OutgoingRouterGuard for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingRouterGuard() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingRouterGuard") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingStormLimit sets the value of OutgoingStormLimit for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingStormLimit(value uint64) (err error) { + return instance.SetProperty("OutgoingStormLimit", (value)) +} + +// GetOutgoingStormLimit gets the value of OutgoingStormLimit for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingStormLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingStormLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingSwitchDataFlowDisabled sets the value of OutgoingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingSwitchDataFlowDisabled(value uint64) (err error) { + return instance.SetProperty("OutgoingSwitchDataFlowDisabled", (value)) +} + +// GetOutgoingSwitchDataFlowDisabled gets the value of OutgoingSwitchDataFlowDisabled for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingSwitchDataFlowDisabled() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingSwitchDataFlowDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingUnauthorizedMAC sets the value of OutgoingUnauthorizedMAC for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingUnauthorizedMAC(value uint64) (err error) { + return instance.SetProperty("OutgoingUnauthorizedMAC", (value)) +} + +// GetOutgoingUnauthorizedMAC gets the value of OutgoingUnauthorizedMAC for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingUnauthorizedMAC() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingUnauthorizedMAC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingUnauthorizedVLAN sets the value of OutgoingUnauthorizedVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingUnauthorizedVLAN(value uint64) (err error) { + return instance.SetProperty("OutgoingUnauthorizedVLAN", (value)) +} + +// GetOutgoingUnauthorizedVLAN gets the value of OutgoingUnauthorizedVLAN for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingUnauthorizedVLAN() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingUnauthorizedVLAN") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingUnknown sets the value of OutgoingUnknown for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingUnknown(value uint64) (err error) { + return instance.SetProperty("OutgoingUnknown", (value)) +} + +// GetOutgoingUnknown gets the value of OutgoingUnknown for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingVirtualSubnetId sets the value of OutgoingVirtualSubnetId for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingVirtualSubnetId(value uint64) (err error) { + return instance.SetProperty("OutgoingVirtualSubnetId", (value)) +} + +// GetOutgoingVirtualSubnetId gets the value of OutgoingVirtualSubnetId for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingVirtualSubnetId() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingVirtualSubnetId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutgoingWnv sets the value of OutgoingWnv for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) SetPropertyOutgoingWnv(value uint64) (err error) { + return instance.SetProperty("OutgoingWnv", (value)) +} + +// GetOutgoingWnv gets the value of OutgoingWnv for the instance +func (instance *Win32_PerfRawData_NvspNicDropReasonsStats_HyperVVirtualNetworkAdapterDropReasons) GetPropertyOutgoingWnv() (value uint64, err error) { + retValue, err := instance.GetProperty("OutgoingWnv") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter.go new file mode 100644 index 00000000..ea2f1a66 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter.go @@ -0,0 +1,1460 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter struct +type Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter struct { + *Win32_PerfRawData + + // + BroadcastPacketsReceivedPersec uint64 + + // + BroadcastPacketsSentPersec uint64 + + // + BytesPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + DirectedPacketsReceivedPersec uint64 + + // + DirectedPacketsSentPersec uint64 + + // + DroppedPacketsIncomingPersec uint64 + + // + DroppedPacketsOutgoingPersec uint64 + + // + ExtensionsDroppedPacketsIncomingPersec uint64 + + // + ExtensionsDroppedPacketsOutgoingPersec uint64 + + // + IPsecoffloadBytesReceivePersec uint64 + + // + IPsecoffloadBytesSentPersec uint64 + + // + MulticastPacketsReceivedPersec uint64 + + // + MulticastPacketsSentPersec uint64 + + // + PacketsFailedSoftwareIPRxCSO uint64 + + // + PacketsFailedSoftwareIPRxCSOPersec uint64 + + // + PacketsFailedSoftwareRxCSOParsingPersec uint64 + + // + PacketsFailedSoftwareTCPRxCSO uint64 + + // + PacketsFailedSoftwareTCPRxCSOPersec uint64 + + // + PacketsFailedSoftwareUDPRxCSO uint64 + + // + PacketsFailedSoftwareUDPRxCSOPersec uint64 + + // + PacketsPassedSoftwareIPRxCSOPersec uint64 + + // + PacketsPassedSoftwareTCPRxCSOPersec uint64 + + // + PacketsPassedSoftwareUDPRxCSOPersec uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsSentPersec uint64 + + // + PacketsWithSoftwareIPTxCSOPersec uint64 + + // + PacketsWithSoftwareTCPTxCSOPersec uint64 + + // + PacketsWithSoftwareUDPTxCSOPersec uint64 + + // + RSCCoalescedBytes uint64 + + // + RSCCoalescedEventBucket10To1 uint64 + + // + RSCCoalescedEventBucket22To3 uint64 + + // + RSCCoalescedEventBucket34To7 uint64 + + // + RSCCoalescedEventBucket48To15 uint64 + + // + RSCCoalescedEventBucket516To31 uint64 + + // + RSCCoalescedEventBucket632To63 uint64 + + // + RSCCoalescedPacketBucket10To1 uint64 + + // + RSCCoalescedPacketBucket22To3 uint64 + + // + RSCCoalescedPacketBucket34To7 uint64 + + // + RSCCoalescedPacketBucket48To15 uint64 + + // + RSCCoalescedPacketBucket516To31 uint64 + + // + RSCCoalescedPacketBucket632To63 uint64 + + // + RSCCoalescedPackets uint64 + + // + RSCCoalesceEvents uint64 + + // + RSCPacketsProcessed uint64 +} + +func NewWin32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBroadcastPacketsReceivedPersec sets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBroadcastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsReceivedPersec", (value)) +} + +// GetBroadcastPacketsReceivedPersec gets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBroadcastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastPacketsSentPersec sets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBroadcastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsSentPersec", (value)) +} + +// GetBroadcastPacketsSentPersec gets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBroadcastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesPersec sets the value of BytesPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBytesPersec(value uint64) (err error) { + return instance.SetProperty("BytesPersec", (value)) +} + +// GetBytesPersec gets the value of BytesPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsReceivedPersec sets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDirectedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsReceivedPersec", (value)) +} + +// GetDirectedPacketsReceivedPersec gets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDirectedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsSentPersec sets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDirectedPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsSentPersec", (value)) +} + +// GetDirectedPacketsSentPersec gets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDirectedPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsIncomingPersec sets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsIncomingPersec", (value)) +} + +// GetDroppedPacketsIncomingPersec gets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsOutgoingPersec sets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsOutgoingPersec", (value)) +} + +// GetDroppedPacketsOutgoingPersec gets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsIncomingPersec sets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyExtensionsDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsIncomingPersec", (value)) +} + +// GetExtensionsDroppedPacketsIncomingPersec gets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyExtensionsDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsOutgoingPersec sets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyExtensionsDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsOutgoingPersec", (value)) +} + +// GetExtensionsDroppedPacketsOutgoingPersec gets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyExtensionsDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesReceivePersec sets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyIPsecoffloadBytesReceivePersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesReceivePersec", (value)) +} + +// GetIPsecoffloadBytesReceivePersec gets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyIPsecoffloadBytesReceivePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesReceivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesSentPersec sets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyIPsecoffloadBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesSentPersec", (value)) +} + +// GetIPsecoffloadBytesSentPersec gets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyIPsecoffloadBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsReceivedPersec sets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyMulticastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsReceivedPersec", (value)) +} + +// GetMulticastPacketsReceivedPersec gets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyMulticastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsSentPersec sets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyMulticastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsSentPersec", (value)) +} + +// GetMulticastPacketsSentPersec gets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyMulticastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareIPRxCSO sets the value of PacketsFailedSoftwareIPRxCSO for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareIPRxCSO(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareIPRxCSO", (value)) +} + +// GetPacketsFailedSoftwareIPRxCSO gets the value of PacketsFailedSoftwareIPRxCSO for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareIPRxCSO() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareIPRxCSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareIPRxCSOPersec sets the value of PacketsFailedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareIPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareIPRxCSOPersec", (value)) +} + +// GetPacketsFailedSoftwareIPRxCSOPersec gets the value of PacketsFailedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareIPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareIPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareRxCSOParsingPersec sets the value of PacketsFailedSoftwareRxCSOParsingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareRxCSOParsingPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareRxCSOParsingPersec", (value)) +} + +// GetPacketsFailedSoftwareRxCSOParsingPersec gets the value of PacketsFailedSoftwareRxCSOParsingPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareRxCSOParsingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareRxCSOParsingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareTCPRxCSO sets the value of PacketsFailedSoftwareTCPRxCSO for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareTCPRxCSO(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareTCPRxCSO", (value)) +} + +// GetPacketsFailedSoftwareTCPRxCSO gets the value of PacketsFailedSoftwareTCPRxCSO for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareTCPRxCSO() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareTCPRxCSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareTCPRxCSOPersec sets the value of PacketsFailedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareTCPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareTCPRxCSOPersec", (value)) +} + +// GetPacketsFailedSoftwareTCPRxCSOPersec gets the value of PacketsFailedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareTCPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareTCPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareUDPRxCSO sets the value of PacketsFailedSoftwareUDPRxCSO for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareUDPRxCSO(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareUDPRxCSO", (value)) +} + +// GetPacketsFailedSoftwareUDPRxCSO gets the value of PacketsFailedSoftwareUDPRxCSO for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareUDPRxCSO() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareUDPRxCSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFailedSoftwareUDPRxCSOPersec sets the value of PacketsFailedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsFailedSoftwareUDPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFailedSoftwareUDPRxCSOPersec", (value)) +} + +// GetPacketsFailedSoftwareUDPRxCSOPersec gets the value of PacketsFailedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsFailedSoftwareUDPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFailedSoftwareUDPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPassedSoftwareIPRxCSOPersec sets the value of PacketsPassedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPassedSoftwareIPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPassedSoftwareIPRxCSOPersec", (value)) +} + +// GetPacketsPassedSoftwareIPRxCSOPersec gets the value of PacketsPassedSoftwareIPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPassedSoftwareIPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPassedSoftwareIPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPassedSoftwareTCPRxCSOPersec sets the value of PacketsPassedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPassedSoftwareTCPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPassedSoftwareTCPRxCSOPersec", (value)) +} + +// GetPacketsPassedSoftwareTCPRxCSOPersec gets the value of PacketsPassedSoftwareTCPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPassedSoftwareTCPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPassedSoftwareTCPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPassedSoftwareUDPRxCSOPersec sets the value of PacketsPassedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPassedSoftwareUDPRxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPassedSoftwareUDPRxCSOPersec", (value)) +} + +// GetPacketsPassedSoftwareUDPRxCSOPersec gets the value of PacketsPassedSoftwareUDPRxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPassedSoftwareUDPRxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPassedSoftwareUDPRxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsWithSoftwareIPTxCSOPersec sets the value of PacketsWithSoftwareIPTxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsWithSoftwareIPTxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsWithSoftwareIPTxCSOPersec", (value)) +} + +// GetPacketsWithSoftwareIPTxCSOPersec gets the value of PacketsWithSoftwareIPTxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsWithSoftwareIPTxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsWithSoftwareIPTxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsWithSoftwareTCPTxCSOPersec sets the value of PacketsWithSoftwareTCPTxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsWithSoftwareTCPTxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsWithSoftwareTCPTxCSOPersec", (value)) +} + +// GetPacketsWithSoftwareTCPTxCSOPersec gets the value of PacketsWithSoftwareTCPTxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsWithSoftwareTCPTxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsWithSoftwareTCPTxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsWithSoftwareUDPTxCSOPersec sets the value of PacketsWithSoftwareUDPTxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyPacketsWithSoftwareUDPTxCSOPersec(value uint64) (err error) { + return instance.SetProperty("PacketsWithSoftwareUDPTxCSOPersec", (value)) +} + +// GetPacketsWithSoftwareUDPTxCSOPersec gets the value of PacketsWithSoftwareUDPTxCSOPersec for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyPacketsWithSoftwareUDPTxCSOPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsWithSoftwareUDPTxCSOPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedBytes sets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedBytes(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedBytes", (value)) +} + +// GetRSCCoalescedBytes gets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket10To1 sets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket10To1", (value)) +} + +// GetRSCCoalescedEventBucket10To1 gets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket22To3 sets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket22To3", (value)) +} + +// GetRSCCoalescedEventBucket22To3 gets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket34To7 sets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket34To7", (value)) +} + +// GetRSCCoalescedEventBucket34To7 gets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket48To15 sets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket48To15", (value)) +} + +// GetRSCCoalescedEventBucket48To15 gets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket516To31 sets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket516To31", (value)) +} + +// GetRSCCoalescedEventBucket516To31 gets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket632To63 sets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedEventBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket632To63", (value)) +} + +// GetRSCCoalescedEventBucket632To63 gets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedEventBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket10To1 sets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket10To1", (value)) +} + +// GetRSCCoalescedPacketBucket10To1 gets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket22To3 sets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket22To3", (value)) +} + +// GetRSCCoalescedPacketBucket22To3 gets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket34To7 sets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket34To7", (value)) +} + +// GetRSCCoalescedPacketBucket34To7 gets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket48To15 sets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket48To15", (value)) +} + +// GetRSCCoalescedPacketBucket48To15 gets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket516To31 sets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket516To31", (value)) +} + +// GetRSCCoalescedPacketBucket516To31 gets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket632To63 sets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPacketBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket632To63", (value)) +} + +// GetRSCCoalescedPacketBucket632To63 gets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPacketBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPackets sets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalescedPackets(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPackets", (value)) +} + +// GetRSCCoalescedPackets gets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalescedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalesceEvents sets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCCoalesceEvents(value uint64) (err error) { + return instance.SetProperty("RSCCoalesceEvents", (value)) +} + +// GetRSCCoalesceEvents gets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCCoalesceEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalesceEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCPacketsProcessed sets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) SetPropertyRSCPacketsProcessed(value uint64) (err error) { + return instance.SetProperty("RSCPacketsProcessed", (value)) +} + +// GetRSCPacketsProcessed gets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfRawData_NvspNicStats_HyperVVirtualNetworkAdapter) GetPropertyRSCPacketsProcessed() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCPacketsProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go new file mode 100644 index 00000000..d037ae22 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS.go @@ -0,0 +1,530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS struct +type Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS struct { + *Win32_PerfRawData + + // + PostmoveReceivePacketsPerSecond uint64 + + // + PostmoveReceivePacketsTotal uint64 + + // + PostmoveSendPacketCompletionsPerSecond uint64 + + // + PostmoveSendPacketCompletionsTotal uint64 + + // + PostmoveSendPacketsPerSecond uint64 + + // + PostmoveSendPacketsTotal uint64 + + // + ReceivePacketPerSecond uint64 + + // + ReceivePacketTotal uint64 + + // + ReceiveProcessor uint32 + + // + ReceiveProcessorGroup uint32 + + // + SendPacketCompletionsPerSecond uint64 + + // + SendPacketCompletionsTotal uint64 + + // + SendPacketPerSecond uint64 + + // + SendPacketTotal uint64 + + // + SendProcessor uint32 + + // + SendProcessorGroup uint32 +} + +func NewWin32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSSEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS{ + Win32_PerfRawData: tmp, + } + return +} + +// SetPostmoveReceivePacketsPerSecond sets the value of PostmoveReceivePacketsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveReceivePacketsPerSecond(value uint64) (err error) { + return instance.SetProperty("PostmoveReceivePacketsPerSecond", (value)) +} + +// GetPostmoveReceivePacketsPerSecond gets the value of PostmoveReceivePacketsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveReceivePacketsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveReceivePacketsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveReceivePacketsTotal sets the value of PostmoveReceivePacketsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveReceivePacketsTotal(value uint64) (err error) { + return instance.SetProperty("PostmoveReceivePacketsTotal", (value)) +} + +// GetPostmoveReceivePacketsTotal gets the value of PostmoveReceivePacketsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveReceivePacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveReceivePacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketCompletionsPerSecond sets the value of PostmoveSendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketCompletionsPerSecond(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketCompletionsPerSecond", (value)) +} + +// GetPostmoveSendPacketCompletionsPerSecond gets the value of PostmoveSendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketCompletionsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketCompletionsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketCompletionsTotal sets the value of PostmoveSendPacketCompletionsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketCompletionsTotal(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketCompletionsTotal", (value)) +} + +// GetPostmoveSendPacketCompletionsTotal gets the value of PostmoveSendPacketCompletionsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketCompletionsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketCompletionsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketsPerSecond sets the value of PostmoveSendPacketsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketsPerSecond(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketsPerSecond", (value)) +} + +// GetPostmoveSendPacketsPerSecond gets the value of PostmoveSendPacketsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPostmoveSendPacketsTotal sets the value of PostmoveSendPacketsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyPostmoveSendPacketsTotal(value uint64) (err error) { + return instance.SetProperty("PostmoveSendPacketsTotal", (value)) +} + +// GetPostmoveSendPacketsTotal gets the value of PostmoveSendPacketsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyPostmoveSendPacketsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("PostmoveSendPacketsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceivePacketPerSecond sets the value of ReceivePacketPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceivePacketPerSecond(value uint64) (err error) { + return instance.SetProperty("ReceivePacketPerSecond", (value)) +} + +// GetReceivePacketPerSecond gets the value of ReceivePacketPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceivePacketPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivePacketPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceivePacketTotal sets the value of ReceivePacketTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceivePacketTotal(value uint64) (err error) { + return instance.SetProperty("ReceivePacketTotal", (value)) +} + +// GetReceivePacketTotal gets the value of ReceivePacketTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceivePacketTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivePacketTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveProcessor sets the value of ReceiveProcessor for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceiveProcessor(value uint32) (err error) { + return instance.SetProperty("ReceiveProcessor", (value)) +} + +// GetReceiveProcessor gets the value of ReceiveProcessor for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceiveProcessor() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceiveProcessorGroup sets the value of ReceiveProcessorGroup for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertyReceiveProcessorGroup(value uint32) (err error) { + return instance.SetProperty("ReceiveProcessorGroup", (value)) +} + +// GetReceiveProcessorGroup gets the value of ReceiveProcessorGroup for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertyReceiveProcessorGroup() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceiveProcessorGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSendPacketCompletionsPerSecond sets the value of SendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketCompletionsPerSecond(value uint64) (err error) { + return instance.SetProperty("SendPacketCompletionsPerSecond", (value)) +} + +// GetSendPacketCompletionsPerSecond gets the value of SendPacketCompletionsPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketCompletionsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketCompletionsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendPacketCompletionsTotal sets the value of SendPacketCompletionsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketCompletionsTotal(value uint64) (err error) { + return instance.SetProperty("SendPacketCompletionsTotal", (value)) +} + +// GetSendPacketCompletionsTotal gets the value of SendPacketCompletionsTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketCompletionsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketCompletionsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendPacketPerSecond sets the value of SendPacketPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketPerSecond(value uint64) (err error) { + return instance.SetProperty("SendPacketPerSecond", (value)) +} + +// GetSendPacketPerSecond gets the value of SendPacketPerSecond for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendPacketTotal sets the value of SendPacketTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendPacketTotal(value uint64) (err error) { + return instance.SetProperty("SendPacketTotal", (value)) +} + +// GetSendPacketTotal gets the value of SendPacketTotal for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendPacketTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("SendPacketTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSendProcessor sets the value of SendProcessor for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendProcessor(value uint32) (err error) { + return instance.SetProperty("SendProcessor", (value)) +} + +// GetSendProcessor gets the value of SendProcessor for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendProcessor() (value uint32, err error) { + retValue, err := instance.GetProperty("SendProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSendProcessorGroup sets the value of SendProcessorGroup for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) SetPropertySendProcessorGroup(value uint32) (err error) { + return instance.SetProperty("SendProcessorGroup", (value)) +} + +// GetSendProcessorGroup gets the value of SendProcessorGroup for the instance +func (instance *Win32_PerfRawData_NvspNicVRSSStats_HyperVVirtualNetworkAdapterVRSS) GetPropertySendProcessorGroup() (value uint32, err error) { + retValue, err := instance.GetProperty("SendProcessorGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort.go new file mode 100644 index 00000000..74fcd1aa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort struct +type Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort struct { + *Win32_PerfRawData + + // + BroadcastPacketsReceivedPersec uint64 + + // + BroadcastPacketsSentPersec uint64 + + // + BytesPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + DirectedPacketsReceivedPersec uint64 + + // + DirectedPacketsSentPersec uint64 + + // + DroppedPacketsIncomingPersec uint64 + + // + DroppedPacketsOutgoingPersec uint64 + + // + ExtensionsDroppedPacketsIncomingPersec uint64 + + // + ExtensionsDroppedPacketsOutgoingPersec uint64 + + // + IPsecoffloadBytesReceivePersec uint64 + + // + IPsecoffloadBytesSentPersec uint64 + + // + IPsecSAsOffloaded uint64 + + // + MulticastPacketsReceivedPersec uint64 + + // + MulticastPacketsSentPersec uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsSentPersec uint64 + + // + UnhashedPacketsReceivedPersec uint64 + + // + UnhashedPacketsSendCompletedPersec uint64 +} + +func NewWin32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPortEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBroadcastPacketsReceivedPersec sets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBroadcastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsReceivedPersec", (value)) +} + +// GetBroadcastPacketsReceivedPersec gets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBroadcastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastPacketsSentPersec sets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBroadcastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsSentPersec", (value)) +} + +// GetBroadcastPacketsSentPersec gets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBroadcastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesPersec sets the value of BytesPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBytesPersec(value uint64) (err error) { + return instance.SetProperty("BytesPersec", (value)) +} + +// GetBytesPersec gets the value of BytesPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsReceivedPersec sets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDirectedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsReceivedPersec", (value)) +} + +// GetDirectedPacketsReceivedPersec gets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDirectedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsSentPersec sets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDirectedPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsSentPersec", (value)) +} + +// GetDirectedPacketsSentPersec gets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDirectedPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsIncomingPersec sets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsIncomingPersec", (value)) +} + +// GetDroppedPacketsIncomingPersec gets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsOutgoingPersec sets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsOutgoingPersec", (value)) +} + +// GetDroppedPacketsOutgoingPersec gets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsIncomingPersec sets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyExtensionsDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsIncomingPersec", (value)) +} + +// GetExtensionsDroppedPacketsIncomingPersec gets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyExtensionsDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsOutgoingPersec sets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyExtensionsDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsOutgoingPersec", (value)) +} + +// GetExtensionsDroppedPacketsOutgoingPersec gets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyExtensionsDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesReceivePersec sets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyIPsecoffloadBytesReceivePersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesReceivePersec", (value)) +} + +// GetIPsecoffloadBytesReceivePersec gets the value of IPsecoffloadBytesReceivePersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyIPsecoffloadBytesReceivePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesReceivePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecoffloadBytesSentPersec sets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyIPsecoffloadBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("IPsecoffloadBytesSentPersec", (value)) +} + +// GetIPsecoffloadBytesSentPersec gets the value of IPsecoffloadBytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyIPsecoffloadBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecoffloadBytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIPsecSAsOffloaded sets the value of IPsecSAsOffloaded for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyIPsecSAsOffloaded(value uint64) (err error) { + return instance.SetProperty("IPsecSAsOffloaded", (value)) +} + +// GetIPsecSAsOffloaded gets the value of IPsecSAsOffloaded for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyIPsecSAsOffloaded() (value uint64, err error) { + retValue, err := instance.GetProperty("IPsecSAsOffloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsReceivedPersec sets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyMulticastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsReceivedPersec", (value)) +} + +// GetMulticastPacketsReceivedPersec gets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyMulticastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsSentPersec sets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyMulticastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsSentPersec", (value)) +} + +// GetMulticastPacketsSentPersec gets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyMulticastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnhashedPacketsReceivedPersec sets the value of UnhashedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyUnhashedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("UnhashedPacketsReceivedPersec", (value)) +} + +// GetUnhashedPacketsReceivedPersec gets the value of UnhashedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyUnhashedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UnhashedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnhashedPacketsSendCompletedPersec sets the value of UnhashedPacketsSendCompletedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) SetPropertyUnhashedPacketsSendCompletedPersec(value uint64) (err error) { + return instance.SetProperty("UnhashedPacketsSendCompletedPersec", (value)) +} + +// GetUnhashedPacketsSendCompletedPersec gets the value of UnhashedPacketsSendCompletedPersec for the instance +func (instance *Win32_PerfRawData_NvspPortStats_HyperVVirtualSwitchPort) GetPropertyUnhashedPacketsSendCompletedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("UnhashedPacketsSendCompletedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go new file mode 100644 index 00000000..0aa5b219 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor struct +type Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor struct { + *Win32_PerfRawData + + // + NumberofTransmitCompletesPersec uint64 + + // + NumberofVMQs uint64 + + // + PacketsfromExternalPersec uint64 + + // + PacketsfromInternalPersec uint64 +} + +func NewWin32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberofTransmitCompletesPersec sets the value of NumberofTransmitCompletesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyNumberofTransmitCompletesPersec(value uint64) (err error) { + return instance.SetProperty("NumberofTransmitCompletesPersec", (value)) +} + +// GetNumberofTransmitCompletesPersec gets the value of NumberofTransmitCompletesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyNumberofTransmitCompletesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofTransmitCompletesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofVMQs sets the value of NumberofVMQs for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyNumberofVMQs(value uint64) (err error) { + return instance.SetProperty("NumberofVMQs", (value)) +} + +// GetNumberofVMQs gets the value of NumberofVMQs for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyNumberofVMQs() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofVMQs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsfromExternalPersec sets the value of PacketsfromExternalPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyPacketsfromExternalPersec(value uint64) (err error) { + return instance.SetProperty("PacketsfromExternalPersec", (value)) +} + +// GetPacketsfromExternalPersec gets the value of PacketsfromExternalPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyPacketsfromExternalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsfromExternalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsfromInternalPersec sets the value of PacketsfromInternalPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) SetPropertyPacketsfromInternalPersec(value uint64) (err error) { + return instance.SetProperty("PacketsfromInternalPersec", (value)) +} + +// GetPacketsfromInternalPersec gets the value of PacketsfromInternalPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchProcStats_HyperVVirtualSwitchProcessor) GetPropertyPacketsfromInternalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsfromInternalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch.go new file mode 100644 index 00000000..c2e026fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch.go @@ -0,0 +1,1250 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch struct +type Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch struct { + *Win32_PerfRawData + + // + BroadcastPacketsReceivedPersec uint64 + + // + BroadcastPacketsSentPersec uint64 + + // + BytesPersec uint64 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + DirectedPacketsReceivedPersec uint64 + + // + DirectedPacketsSentPersec uint64 + + // + DroppedPacketsIncomingPersec uint64 + + // + DroppedPacketsOutgoingPersec uint64 + + // + ExtensionsDroppedPacketsIncomingPersec uint64 + + // + ExtensionsDroppedPacketsOutgoingPersec uint64 + + // + LearnedMacAddresses uint64 + + // + LearnedMacAddressesPersec uint64 + + // + MulticastPacketsReceivedPersec uint64 + + // + MulticastPacketsSentPersec uint64 + + // + NumberofSendChannelMovesPersec uint64 + + // + NumberofVMQMovesPersec uint64 + + // + PacketsFlooded uint64 + + // + PacketsFloodedPersec uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsSentPersec uint64 + + // + PurgedMacAddresses uint64 + + // + PurgedMacAddressesPersec uint64 + + // + RSCCoalescedBytes uint64 + + // + RSCCoalescedEventBucket10To1 uint64 + + // + RSCCoalescedEventBucket22To3 uint64 + + // + RSCCoalescedEventBucket34To7 uint64 + + // + RSCCoalescedEventBucket48To15 uint64 + + // + RSCCoalescedEventBucket516To31 uint64 + + // + RSCCoalescedEventBucket632To63 uint64 + + // + RSCCoalescedPacketBucket10To1 uint64 + + // + RSCCoalescedPacketBucket22To3 uint64 + + // + RSCCoalescedPacketBucket34To7 uint64 + + // + RSCCoalescedPacketBucket48To15 uint64 + + // + RSCCoalescedPacketBucket516To31 uint64 + + // + RSCCoalescedPacketBucket632To63 uint64 + + // + RSCCoalescedPackets uint64 + + // + RSCCoalesceEvents uint64 + + // + RSCPacketsProcessed uint64 +} + +func NewWin32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitchEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitchEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBroadcastPacketsReceivedPersec sets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBroadcastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsReceivedPersec", (value)) +} + +// GetBroadcastPacketsReceivedPersec gets the value of BroadcastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBroadcastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastPacketsSentPersec sets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBroadcastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("BroadcastPacketsSentPersec", (value)) +} + +// GetBroadcastPacketsSentPersec gets the value of BroadcastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBroadcastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BroadcastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesPersec sets the value of BytesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBytesPersec(value uint64) (err error) { + return instance.SetProperty("BytesPersec", (value)) +} + +// GetBytesPersec gets the value of BytesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsReceivedPersec sets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDirectedPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsReceivedPersec", (value)) +} + +// GetDirectedPacketsReceivedPersec gets the value of DirectedPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDirectedPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectedPacketsSentPersec sets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDirectedPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("DirectedPacketsSentPersec", (value)) +} + +// GetDirectedPacketsSentPersec gets the value of DirectedPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDirectedPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectedPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsIncomingPersec sets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsIncomingPersec", (value)) +} + +// GetDroppedPacketsIncomingPersec gets the value of DroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDroppedPacketsOutgoingPersec sets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("DroppedPacketsOutgoingPersec", (value)) +} + +// GetDroppedPacketsOutgoingPersec gets the value of DroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsIncomingPersec sets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyExtensionsDroppedPacketsIncomingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsIncomingPersec", (value)) +} + +// GetExtensionsDroppedPacketsIncomingPersec gets the value of ExtensionsDroppedPacketsIncomingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyExtensionsDroppedPacketsIncomingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsIncomingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetExtensionsDroppedPacketsOutgoingPersec sets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyExtensionsDroppedPacketsOutgoingPersec(value uint64) (err error) { + return instance.SetProperty("ExtensionsDroppedPacketsOutgoingPersec", (value)) +} + +// GetExtensionsDroppedPacketsOutgoingPersec gets the value of ExtensionsDroppedPacketsOutgoingPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyExtensionsDroppedPacketsOutgoingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ExtensionsDroppedPacketsOutgoingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLearnedMacAddresses sets the value of LearnedMacAddresses for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyLearnedMacAddresses(value uint64) (err error) { + return instance.SetProperty("LearnedMacAddresses", (value)) +} + +// GetLearnedMacAddresses gets the value of LearnedMacAddresses for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyLearnedMacAddresses() (value uint64, err error) { + retValue, err := instance.GetProperty("LearnedMacAddresses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLearnedMacAddressesPersec sets the value of LearnedMacAddressesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyLearnedMacAddressesPersec(value uint64) (err error) { + return instance.SetProperty("LearnedMacAddressesPersec", (value)) +} + +// GetLearnedMacAddressesPersec gets the value of LearnedMacAddressesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyLearnedMacAddressesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("LearnedMacAddressesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsReceivedPersec sets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyMulticastPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsReceivedPersec", (value)) +} + +// GetMulticastPacketsReceivedPersec gets the value of MulticastPacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyMulticastPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastPacketsSentPersec sets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyMulticastPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("MulticastPacketsSentPersec", (value)) +} + +// GetMulticastPacketsSentPersec gets the value of MulticastPacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyMulticastPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("MulticastPacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofSendChannelMovesPersec sets the value of NumberofSendChannelMovesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyNumberofSendChannelMovesPersec(value uint64) (err error) { + return instance.SetProperty("NumberofSendChannelMovesPersec", (value)) +} + +// GetNumberofSendChannelMovesPersec gets the value of NumberofSendChannelMovesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyNumberofSendChannelMovesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofSendChannelMovesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumberofVMQMovesPersec sets the value of NumberofVMQMovesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyNumberofVMQMovesPersec(value uint64) (err error) { + return instance.SetProperty("NumberofVMQMovesPersec", (value)) +} + +// GetNumberofVMQMovesPersec gets the value of NumberofVMQMovesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyNumberofVMQMovesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("NumberofVMQMovesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFlooded sets the value of PacketsFlooded for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsFlooded(value uint64) (err error) { + return instance.SetProperty("PacketsFlooded", (value)) +} + +// GetPacketsFlooded gets the value of PacketsFlooded for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsFlooded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFlooded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsFloodedPersec sets the value of PacketsFloodedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsFloodedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsFloodedPersec", (value)) +} + +// GetPacketsFloodedPersec gets the value of PacketsFloodedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsFloodedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsFloodedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPurgedMacAddresses sets the value of PurgedMacAddresses for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPurgedMacAddresses(value uint64) (err error) { + return instance.SetProperty("PurgedMacAddresses", (value)) +} + +// GetPurgedMacAddresses gets the value of PurgedMacAddresses for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPurgedMacAddresses() (value uint64, err error) { + retValue, err := instance.GetProperty("PurgedMacAddresses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPurgedMacAddressesPersec sets the value of PurgedMacAddressesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyPurgedMacAddressesPersec(value uint64) (err error) { + return instance.SetProperty("PurgedMacAddressesPersec", (value)) +} + +// GetPurgedMacAddressesPersec gets the value of PurgedMacAddressesPersec for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyPurgedMacAddressesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PurgedMacAddressesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedBytes sets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedBytes(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedBytes", (value)) +} + +// GetRSCCoalescedBytes gets the value of RSCCoalescedBytes for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket10To1 sets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket10To1", (value)) +} + +// GetRSCCoalescedEventBucket10To1 gets the value of RSCCoalescedEventBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket22To3 sets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket22To3", (value)) +} + +// GetRSCCoalescedEventBucket22To3 gets the value of RSCCoalescedEventBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket34To7 sets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket34To7", (value)) +} + +// GetRSCCoalescedEventBucket34To7 gets the value of RSCCoalescedEventBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket48To15 sets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket48To15", (value)) +} + +// GetRSCCoalescedEventBucket48To15 gets the value of RSCCoalescedEventBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket516To31 sets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket516To31", (value)) +} + +// GetRSCCoalescedEventBucket516To31 gets the value of RSCCoalescedEventBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedEventBucket632To63 sets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedEventBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedEventBucket632To63", (value)) +} + +// GetRSCCoalescedEventBucket632To63 gets the value of RSCCoalescedEventBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedEventBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedEventBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket10To1 sets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket10To1(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket10To1", (value)) +} + +// GetRSCCoalescedPacketBucket10To1 gets the value of RSCCoalescedPacketBucket10To1 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket10To1() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket10To1") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket22To3 sets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket22To3(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket22To3", (value)) +} + +// GetRSCCoalescedPacketBucket22To3 gets the value of RSCCoalescedPacketBucket22To3 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket22To3() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket22To3") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket34To7 sets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket34To7(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket34To7", (value)) +} + +// GetRSCCoalescedPacketBucket34To7 gets the value of RSCCoalescedPacketBucket34To7 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket34To7() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket34To7") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket48To15 sets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket48To15(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket48To15", (value)) +} + +// GetRSCCoalescedPacketBucket48To15 gets the value of RSCCoalescedPacketBucket48To15 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket48To15() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket48To15") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket516To31 sets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket516To31(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket516To31", (value)) +} + +// GetRSCCoalescedPacketBucket516To31 gets the value of RSCCoalescedPacketBucket516To31 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket516To31() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket516To31") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPacketBucket632To63 sets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPacketBucket632To63(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPacketBucket632To63", (value)) +} + +// GetRSCCoalescedPacketBucket632To63 gets the value of RSCCoalescedPacketBucket632To63 for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPacketBucket632To63() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPacketBucket632To63") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalescedPackets sets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalescedPackets(value uint64) (err error) { + return instance.SetProperty("RSCCoalescedPackets", (value)) +} + +// GetRSCCoalescedPackets gets the value of RSCCoalescedPackets for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalescedPackets() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalescedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCCoalesceEvents sets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCCoalesceEvents(value uint64) (err error) { + return instance.SetProperty("RSCCoalesceEvents", (value)) +} + +// GetRSCCoalesceEvents gets the value of RSCCoalesceEvents for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCCoalesceEvents() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCCoalesceEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRSCPacketsProcessed sets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) SetPropertyRSCPacketsProcessed(value uint64) (err error) { + return instance.SetProperty("RSCPacketsProcessed", (value)) +} + +// GetRSCPacketsProcessed gets the value of RSCPacketsProcessed for the instance +func (instance *Win32_PerfRawData_NvspSwitchStats_HyperVVirtualSwitch) GetPropertyRSCPacketsProcessed() (value uint64, err error) { + retValue, err := instance.GetProperty("RSCPacketsProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_ClientSideCaching.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_ClientSideCaching.go new file mode 100644 index 00000000..ee5f3dd5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_ClientSideCaching.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_OfflineFiles_ClientSideCaching struct +type Win32_PerfRawData_OfflineFiles_ClientSideCaching struct { + *Win32_PerfRawData + + // + ApplicationBytesReadFromCache uint64 + + // + ApplicationBytesReadFromServer uint64 + + // + ApplicationBytesReadFromServerNotCached uint64 + + // + PrefetchBytesReadFromCache uint64 + + // + PrefetchBytesReadFromServer uint64 + + // + PrefetchOperationsQueued uint32 + + // + SMBBranchCacheBytesPublished uint64 + + // + SMBBranchCacheBytesReceived uint64 + + // + SMBBranchCacheBytesRequested uint64 + + // + SMBBranchCacheBytesRequestedFromServer uint64 + + // + SMBBranchCacheHashBytesReceived uint64 + + // + SMBBranchCacheHashesReceived uint32 + + // + SMBBranchCacheHashesRequested uint32 +} + +func NewWin32_PerfRawData_OfflineFiles_ClientSideCachingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_OfflineFiles_ClientSideCaching, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_OfflineFiles_ClientSideCaching{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_OfflineFiles_ClientSideCachingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_OfflineFiles_ClientSideCaching, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_OfflineFiles_ClientSideCaching{ + Win32_PerfRawData: tmp, + } + return +} + +// SetApplicationBytesReadFromCache sets the value of ApplicationBytesReadFromCache for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertyApplicationBytesReadFromCache(value uint64) (err error) { + return instance.SetProperty("ApplicationBytesReadFromCache", (value)) +} + +// GetApplicationBytesReadFromCache gets the value of ApplicationBytesReadFromCache for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertyApplicationBytesReadFromCache() (value uint64, err error) { + retValue, err := instance.GetProperty("ApplicationBytesReadFromCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetApplicationBytesReadFromServer sets the value of ApplicationBytesReadFromServer for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertyApplicationBytesReadFromServer(value uint64) (err error) { + return instance.SetProperty("ApplicationBytesReadFromServer", (value)) +} + +// GetApplicationBytesReadFromServer gets the value of ApplicationBytesReadFromServer for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertyApplicationBytesReadFromServer() (value uint64, err error) { + retValue, err := instance.GetProperty("ApplicationBytesReadFromServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetApplicationBytesReadFromServerNotCached sets the value of ApplicationBytesReadFromServerNotCached for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertyApplicationBytesReadFromServerNotCached(value uint64) (err error) { + return instance.SetProperty("ApplicationBytesReadFromServerNotCached", (value)) +} + +// GetApplicationBytesReadFromServerNotCached gets the value of ApplicationBytesReadFromServerNotCached for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertyApplicationBytesReadFromServerNotCached() (value uint64, err error) { + retValue, err := instance.GetProperty("ApplicationBytesReadFromServerNotCached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPrefetchBytesReadFromCache sets the value of PrefetchBytesReadFromCache for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertyPrefetchBytesReadFromCache(value uint64) (err error) { + return instance.SetProperty("PrefetchBytesReadFromCache", (value)) +} + +// GetPrefetchBytesReadFromCache gets the value of PrefetchBytesReadFromCache for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertyPrefetchBytesReadFromCache() (value uint64, err error) { + retValue, err := instance.GetProperty("PrefetchBytesReadFromCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPrefetchBytesReadFromServer sets the value of PrefetchBytesReadFromServer for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertyPrefetchBytesReadFromServer(value uint64) (err error) { + return instance.SetProperty("PrefetchBytesReadFromServer", (value)) +} + +// GetPrefetchBytesReadFromServer gets the value of PrefetchBytesReadFromServer for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertyPrefetchBytesReadFromServer() (value uint64, err error) { + retValue, err := instance.GetProperty("PrefetchBytesReadFromServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPrefetchOperationsQueued sets the value of PrefetchOperationsQueued for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertyPrefetchOperationsQueued(value uint32) (err error) { + return instance.SetProperty("PrefetchOperationsQueued", (value)) +} + +// GetPrefetchOperationsQueued gets the value of PrefetchOperationsQueued for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertyPrefetchOperationsQueued() (value uint32, err error) { + retValue, err := instance.GetProperty("PrefetchOperationsQueued") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheBytesPublished sets the value of SMBBranchCacheBytesPublished for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesPublished(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesPublished", (value)) +} + +// GetSMBBranchCacheBytesPublished gets the value of SMBBranchCacheBytesPublished for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesPublished() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesPublished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheBytesReceived sets the value of SMBBranchCacheBytesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesReceived(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesReceived", (value)) +} + +// GetSMBBranchCacheBytesReceived gets the value of SMBBranchCacheBytesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheBytesRequested sets the value of SMBBranchCacheBytesRequested for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesRequested(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesRequested", (value)) +} + +// GetSMBBranchCacheBytesRequested gets the value of SMBBranchCacheBytesRequested for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesRequested() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesRequested") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheBytesRequestedFromServer sets the value of SMBBranchCacheBytesRequestedFromServer for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheBytesRequestedFromServer(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheBytesRequestedFromServer", (value)) +} + +// GetSMBBranchCacheBytesRequestedFromServer gets the value of SMBBranchCacheBytesRequestedFromServer for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheBytesRequestedFromServer() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheBytesRequestedFromServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashBytesReceived sets the value of SMBBranchCacheHashBytesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheHashBytesReceived(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheHashBytesReceived", (value)) +} + +// GetSMBBranchCacheHashBytesReceived gets the value of SMBBranchCacheHashBytesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheHashBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashBytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashesReceived sets the value of SMBBranchCacheHashesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheHashesReceived(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashesReceived", (value)) +} + +// GetSMBBranchCacheHashesReceived gets the value of SMBBranchCacheHashesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheHashesReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashesRequested sets the value of SMBBranchCacheHashesRequested for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) SetPropertySMBBranchCacheHashesRequested(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashesRequested", (value)) +} + +// GetSMBBranchCacheHashesRequested gets the value of SMBBranchCacheHashesRequested for the instance +func (instance *Win32_PerfRawData_OfflineFiles_ClientSideCaching) GetPropertySMBBranchCacheHashesRequested() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashesRequested") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_OfflineFiles.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_OfflineFiles.go new file mode 100644 index 00000000..6f1a07f8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_OfflineFiles_OfflineFiles.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_OfflineFiles_OfflineFiles struct +type Win32_PerfRawData_OfflineFiles_OfflineFiles struct { + *Win32_PerfRawData + + // + BytesReceived uint64 + + // + BytesReceivedPersec uint64 + + // + BytesReceivedPersec_Base uint32 + + // + BytesTransmitted uint64 + + // + BytesTransmittedPersec uint64 + + // + BytesTransmittedPersec_Base uint32 +} + +func NewWin32_PerfRawData_OfflineFiles_OfflineFilesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_OfflineFiles_OfflineFiles, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_OfflineFiles_OfflineFiles{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_OfflineFiles_OfflineFilesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_OfflineFiles_OfflineFiles, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_OfflineFiles_OfflineFiles{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPersec_Base sets the value of BytesReceivedPersec_Base for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) SetPropertyBytesReceivedPersec_Base(value uint32) (err error) { + return instance.SetProperty("BytesReceivedPersec_Base", (value)) +} + +// GetBytesReceivedPersec_Base gets the value of BytesReceivedPersec_Base for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) GetPropertyBytesReceivedPersec_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec_Base sets the value of BytesTransmittedPersec_Base for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) SetPropertyBytesTransmittedPersec_Base(value uint32) (err error) { + return instance.SetProperty("BytesTransmittedPersec_Base", (value)) +} + +// GetBytesTransmittedPersec_Base gets the value of BytesTransmittedPersec_Base for the instance +func (instance *Win32_PerfRawData_OfflineFiles_OfflineFiles) GetPropertyBytesTransmittedPersec_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_LogicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_LogicalDisk.go new file mode 100644 index 00000000..98f6d4e0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_LogicalDisk.go @@ -0,0 +1,1070 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfDisk_LogicalDisk struct +type Win32_PerfRawData_PerfDisk_LogicalDisk struct { + *Win32_PerfRawData + + // + AvgDiskBytesPerRead uint64 + + // + AvgDiskBytesPerRead_Base uint32 + + // + AvgDiskBytesPerTransfer uint64 + + // + AvgDiskBytesPerTransfer_Base uint32 + + // + AvgDiskBytesPerWrite uint64 + + // + AvgDiskBytesPerWrite_Base uint32 + + // + AvgDiskQueueLength uint64 + + // + AvgDiskReadQueueLength uint64 + + // + AvgDisksecPerRead uint32 + + // + AvgDisksecPerRead_Base uint32 + + // + AvgDisksecPerTransfer uint32 + + // + AvgDisksecPerTransfer_Base uint32 + + // + AvgDisksecPerWrite uint32 + + // + AvgDisksecPerWrite_Base uint32 + + // + AvgDiskWriteQueueLength uint64 + + // + CurrentDiskQueueLength uint32 + + // + DiskBytesPersec uint64 + + // + DiskReadBytesPersec uint64 + + // + DiskReadsPersec uint32 + + // + DiskTransfersPersec uint32 + + // + DiskWriteBytesPersec uint64 + + // + DiskWritesPersec uint32 + + // + FreeMegabytes uint32 + + // + PercentDiskReadTime uint64 + + // + PercentDiskReadTime_Base uint64 + + // + PercentDiskTime uint64 + + // + PercentDiskTime_Base uint64 + + // + PercentDiskWriteTime uint64 + + // + PercentDiskWriteTime_Base uint64 + + // + PercentFreeSpace uint32 + + // + PercentFreeSpace_Base uint32 + + // + PercentIdleTime uint64 + + // + PercentIdleTime_Base uint64 + + // + SplitIOPerSec uint32 +} + +func NewWin32_PerfRawData_PerfDisk_LogicalDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfDisk_LogicalDisk, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfDisk_LogicalDisk{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfDisk_LogicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfDisk_LogicalDisk, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfDisk_LogicalDisk{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgDiskBytesPerRead sets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerRead", (value)) +} + +// GetAvgDiskBytesPerRead gets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerRead_Base sets the value of AvgDiskBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgDiskBytesPerRead_Base", (value)) +} + +// GetAvgDiskBytesPerRead_Base gets the value of AvgDiskBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskBytesPerTransfer sets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerTransfer(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerTransfer", (value)) +} + +// GetAvgDiskBytesPerTransfer gets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerTransfer() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerTransfer_Base sets the value of AvgDiskBytesPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerTransfer_Base(value uint32) (err error) { + return instance.SetProperty("AvgDiskBytesPerTransfer_Base", (value)) +} + +// GetAvgDiskBytesPerTransfer_Base gets the value of AvgDiskBytesPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerTransfer_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerTransfer_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskBytesPerWrite sets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerWrite", (value)) +} + +// GetAvgDiskBytesPerWrite gets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerWrite_Base sets the value of AvgDiskBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgDiskBytesPerWrite_Base", (value)) +} + +// GetAvgDiskBytesPerWrite_Base gets the value of AvgDiskBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskQueueLength sets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskQueueLength", (value)) +} + +// GetAvgDiskQueueLength gets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskReadQueueLength sets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskReadQueueLength", (value)) +} + +// GetAvgDiskReadQueueLength gets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDisksecPerRead sets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerRead", (value)) +} + +// GetAvgDisksecPerRead gets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerRead_Base sets the value of AvgDisksecPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerRead_Base", (value)) +} + +// GetAvgDisksecPerRead_Base gets the value of AvgDisksecPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerTransfer sets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerTransfer(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerTransfer", (value)) +} + +// GetAvgDisksecPerTransfer gets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerTransfer() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerTransfer_Base sets the value of AvgDisksecPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerTransfer_Base(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerTransfer_Base", (value)) +} + +// GetAvgDisksecPerTransfer_Base gets the value of AvgDisksecPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerTransfer_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerTransfer_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerWrite sets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerWrite", (value)) +} + +// GetAvgDisksecPerWrite gets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerWrite_Base sets the value of AvgDisksecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDisksecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerWrite_Base", (value)) +} + +// GetAvgDisksecPerWrite_Base gets the value of AvgDisksecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDisksecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskWriteQueueLength sets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyAvgDiskWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskWriteQueueLength", (value)) +} + +// GetAvgDiskWriteQueueLength gets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyAvgDiskWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDiskQueueLength sets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyCurrentDiskQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentDiskQueueLength", (value)) +} + +// GetCurrentDiskQueueLength gets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyCurrentDiskQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskBytesPersec sets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyDiskBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskBytesPersec", (value)) +} + +// GetDiskBytesPersec gets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyDiskBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytesPersec sets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyDiskReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadBytesPersec", (value)) +} + +// GetDiskReadBytesPersec gets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyDiskReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadsPersec sets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyDiskReadsPersec(value uint32) (err error) { + return instance.SetProperty("DiskReadsPersec", (value)) +} + +// GetDiskReadsPersec gets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyDiskReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskTransfersPersec sets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyDiskTransfersPersec(value uint32) (err error) { + return instance.SetProperty("DiskTransfersPersec", (value)) +} + +// GetDiskTransfersPersec gets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyDiskTransfersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskWriteBytesPersec sets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyDiskWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytesPersec", (value)) +} + +// GetDiskWriteBytesPersec gets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyDiskWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWritesPersec sets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyDiskWritesPersec(value uint32) (err error) { + return instance.SetProperty("DiskWritesPersec", (value)) +} + +// GetDiskWritesPersec gets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyDiskWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeMegabytes sets the value of FreeMegabytes for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyFreeMegabytes(value uint32) (err error) { + return instance.SetProperty("FreeMegabytes", (value)) +} + +// GetFreeMegabytes gets the value of FreeMegabytes for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyFreeMegabytes() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeMegabytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentDiskReadTime sets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentDiskReadTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskReadTime", (value)) +} + +// GetPercentDiskReadTime gets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentDiskReadTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskReadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskReadTime_Base sets the value of PercentDiskReadTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentDiskReadTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentDiskReadTime_Base", (value)) +} + +// GetPercentDiskReadTime_Base gets the value of PercentDiskReadTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentDiskReadTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskReadTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskTime sets the value of PercentDiskTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentDiskTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskTime", (value)) +} + +// GetPercentDiskTime gets the value of PercentDiskTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentDiskTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskTime_Base sets the value of PercentDiskTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentDiskTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentDiskTime_Base", (value)) +} + +// GetPercentDiskTime_Base gets the value of PercentDiskTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentDiskTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskWriteTime sets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentDiskWriteTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskWriteTime", (value)) +} + +// GetPercentDiskWriteTime gets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentDiskWriteTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskWriteTime_Base sets the value of PercentDiskWriteTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentDiskWriteTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentDiskWriteTime_Base", (value)) +} + +// GetPercentDiskWriteTime_Base gets the value of PercentDiskWriteTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentDiskWriteTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskWriteTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentFreeSpace sets the value of PercentFreeSpace for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentFreeSpace(value uint32) (err error) { + return instance.SetProperty("PercentFreeSpace", (value)) +} + +// GetPercentFreeSpace gets the value of PercentFreeSpace for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentFreeSpace() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentFreeSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentFreeSpace_Base sets the value of PercentFreeSpace_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentFreeSpace_Base(value uint32) (err error) { + return instance.SetProperty("PercentFreeSpace_Base", (value)) +} + +// GetPercentFreeSpace_Base gets the value of PercentFreeSpace_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentFreeSpace_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentFreeSpace_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime_Base sets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertyPercentIdleTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime_Base", (value)) +} + +// GetPercentIdleTime_Base gets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertyPercentIdleTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitIOPerSec sets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) SetPropertySplitIOPerSec(value uint32) (err error) { + return instance.SetProperty("SplitIOPerSec", (value)) +} + +// GetSplitIOPerSec gets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfRawData_PerfDisk_LogicalDisk) GetPropertySplitIOPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("SplitIOPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_PhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_PhysicalDisk.go new file mode 100644 index 00000000..ced6c2d8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfDisk_PhysicalDisk.go @@ -0,0 +1,980 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfDisk_PhysicalDisk struct +type Win32_PerfRawData_PerfDisk_PhysicalDisk struct { + *Win32_PerfRawData + + // + AvgDiskBytesPerRead uint64 + + // + AvgDiskBytesPerRead_Base uint32 + + // + AvgDiskBytesPerTransfer uint64 + + // + AvgDiskBytesPerTransfer_Base uint32 + + // + AvgDiskBytesPerWrite uint64 + + // + AvgDiskBytesPerWrite_Base uint32 + + // + AvgDiskQueueLength uint64 + + // + AvgDiskReadQueueLength uint64 + + // + AvgDisksecPerRead uint32 + + // + AvgDisksecPerRead_Base uint32 + + // + AvgDisksecPerTransfer uint32 + + // + AvgDisksecPerTransfer_Base uint32 + + // + AvgDisksecPerWrite uint32 + + // + AvgDisksecPerWrite_Base uint32 + + // + AvgDiskWriteQueueLength uint64 + + // + CurrentDiskQueueLength uint32 + + // + DiskBytesPersec uint64 + + // + DiskReadBytesPersec uint64 + + // + DiskReadsPersec uint32 + + // + DiskTransfersPersec uint32 + + // + DiskWriteBytesPersec uint64 + + // + DiskWritesPersec uint32 + + // + PercentDiskReadTime uint64 + + // + PercentDiskReadTime_Base uint64 + + // + PercentDiskTime uint64 + + // + PercentDiskTime_Base uint64 + + // + PercentDiskWriteTime uint64 + + // + PercentDiskWriteTime_Base uint64 + + // + PercentIdleTime uint64 + + // + PercentIdleTime_Base uint64 + + // + SplitIOPerSec uint32 +} + +func NewWin32_PerfRawData_PerfDisk_PhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfDisk_PhysicalDisk, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfDisk_PhysicalDisk{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfDisk_PhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfDisk_PhysicalDisk, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfDisk_PhysicalDisk{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgDiskBytesPerRead sets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerRead(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerRead", (value)) +} + +// GetAvgDiskBytesPerRead gets the value of AvgDiskBytesPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerRead() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerRead_Base sets the value of AvgDiskBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgDiskBytesPerRead_Base", (value)) +} + +// GetAvgDiskBytesPerRead_Base gets the value of AvgDiskBytesPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskBytesPerTransfer sets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerTransfer(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerTransfer", (value)) +} + +// GetAvgDiskBytesPerTransfer gets the value of AvgDiskBytesPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerTransfer() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerTransfer_Base sets the value of AvgDiskBytesPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerTransfer_Base(value uint32) (err error) { + return instance.SetProperty("AvgDiskBytesPerTransfer_Base", (value)) +} + +// GetAvgDiskBytesPerTransfer_Base gets the value of AvgDiskBytesPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerTransfer_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerTransfer_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskBytesPerWrite sets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerWrite(value uint64) (err error) { + return instance.SetProperty("AvgDiskBytesPerWrite", (value)) +} + +// GetAvgDiskBytesPerWrite gets the value of AvgDiskBytesPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerWrite() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskBytesPerWrite_Base sets the value of AvgDiskBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskBytesPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgDiskBytesPerWrite_Base", (value)) +} + +// GetAvgDiskBytesPerWrite_Base gets the value of AvgDiskBytesPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskBytesPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDiskBytesPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskQueueLength sets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskQueueLength", (value)) +} + +// GetAvgDiskQueueLength gets the value of AvgDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDiskReadQueueLength sets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskReadQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskReadQueueLength", (value)) +} + +// GetAvgDiskReadQueueLength gets the value of AvgDiskReadQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskReadQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskReadQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgDisksecPerRead sets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerRead(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerRead", (value)) +} + +// GetAvgDisksecPerRead gets the value of AvgDisksecPerRead for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerRead() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerRead") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerRead_Base sets the value of AvgDisksecPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerRead_Base(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerRead_Base", (value)) +} + +// GetAvgDisksecPerRead_Base gets the value of AvgDisksecPerRead_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerRead_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerRead_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerTransfer sets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerTransfer(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerTransfer", (value)) +} + +// GetAvgDisksecPerTransfer gets the value of AvgDisksecPerTransfer for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerTransfer() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerTransfer_Base sets the value of AvgDisksecPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerTransfer_Base(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerTransfer_Base", (value)) +} + +// GetAvgDisksecPerTransfer_Base gets the value of AvgDisksecPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerTransfer_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerTransfer_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerWrite sets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerWrite(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerWrite", (value)) +} + +// GetAvgDisksecPerWrite gets the value of AvgDisksecPerWrite for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerWrite() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerWrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDisksecPerWrite_Base sets the value of AvgDisksecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDisksecPerWrite_Base(value uint32) (err error) { + return instance.SetProperty("AvgDisksecPerWrite_Base", (value)) +} + +// GetAvgDisksecPerWrite_Base gets the value of AvgDisksecPerWrite_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDisksecPerWrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgDisksecPerWrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgDiskWriteQueueLength sets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyAvgDiskWriteQueueLength(value uint64) (err error) { + return instance.SetProperty("AvgDiskWriteQueueLength", (value)) +} + +// GetAvgDiskWriteQueueLength gets the value of AvgDiskWriteQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyAvgDiskWriteQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgDiskWriteQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentDiskQueueLength sets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyCurrentDiskQueueLength(value uint32) (err error) { + return instance.SetProperty("CurrentDiskQueueLength", (value)) +} + +// GetCurrentDiskQueueLength gets the value of CurrentDiskQueueLength for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyCurrentDiskQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentDiskQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskBytesPersec sets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyDiskBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskBytesPersec", (value)) +} + +// GetDiskBytesPersec gets the value of DiskBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyDiskBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadBytesPersec sets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyDiskReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskReadBytesPersec", (value)) +} + +// GetDiskReadBytesPersec gets the value of DiskReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyDiskReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskReadsPersec sets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyDiskReadsPersec(value uint32) (err error) { + return instance.SetProperty("DiskReadsPersec", (value)) +} + +// GetDiskReadsPersec gets the value of DiskReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyDiskReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskTransfersPersec sets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyDiskTransfersPersec(value uint32) (err error) { + return instance.SetProperty("DiskTransfersPersec", (value)) +} + +// GetDiskTransfersPersec gets the value of DiskTransfersPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyDiskTransfersPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskTransfersPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDiskWriteBytesPersec sets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyDiskWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("DiskWriteBytesPersec", (value)) +} + +// GetDiskWriteBytesPersec gets the value of DiskWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyDiskWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiskWritesPersec sets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyDiskWritesPersec(value uint32) (err error) { + return instance.SetProperty("DiskWritesPersec", (value)) +} + +// GetDiskWritesPersec gets the value of DiskWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyDiskWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentDiskReadTime sets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskReadTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskReadTime", (value)) +} + +// GetPercentDiskReadTime gets the value of PercentDiskReadTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskReadTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskReadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskReadTime_Base sets the value of PercentDiskReadTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskReadTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentDiskReadTime_Base", (value)) +} + +// GetPercentDiskReadTime_Base gets the value of PercentDiskReadTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskReadTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskReadTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskTime sets the value of PercentDiskTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskTime", (value)) +} + +// GetPercentDiskTime gets the value of PercentDiskTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskTime_Base sets the value of PercentDiskTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentDiskTime_Base", (value)) +} + +// GetPercentDiskTime_Base gets the value of PercentDiskTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskWriteTime sets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskWriteTime(value uint64) (err error) { + return instance.SetProperty("PercentDiskWriteTime", (value)) +} + +// GetPercentDiskWriteTime gets the value of PercentDiskWriteTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskWriteTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskWriteTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDiskWriteTime_Base sets the value of PercentDiskWriteTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentDiskWriteTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentDiskWriteTime_Base", (value)) +} + +// GetPercentDiskWriteTime_Base gets the value of PercentDiskWriteTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentDiskWriteTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDiskWriteTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime_Base sets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertyPercentIdleTime_Base(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime_Base", (value)) +} + +// GetPercentIdleTime_Base gets the value of PercentIdleTime_Base for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertyPercentIdleTime_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSplitIOPerSec sets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) SetPropertySplitIOPerSec(value uint32) (err error) { + return instance.SetProperty("SplitIOPerSec", (value)) +} + +// GetSplitIOPerSec gets the value of SplitIOPerSec for the instance +func (instance *Win32_PerfRawData_PerfDisk_PhysicalDisk) GetPropertySplitIOPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("SplitIOPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Browser.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Browser.go new file mode 100644 index 00000000..b5c4a84c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Browser.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfNet_Browser struct +type Win32_PerfRawData_PerfNet_Browser struct { + *Win32_PerfRawData + + // + AnnouncementsDomainPersec uint64 + + // + AnnouncementsServerPersec uint64 + + // + AnnouncementsTotalPersec uint64 + + // + DuplicateMasterAnnouncements uint32 + + // + ElectionPacketsPersec uint32 + + // + EnumerationsDomainPersec uint32 + + // + EnumerationsOtherPersec uint32 + + // + EnumerationsServerPersec uint32 + + // + EnumerationsTotalPersec uint32 + + // + IllegalDatagramsPersec uint64 + + // + MailslotAllocationsFailed uint32 + + // + MailslotOpensFailedPersec uint32 + + // + MailslotReceivesFailed uint32 + + // + MailslotWritesFailed uint32 + + // + MailslotWritesPersec uint32 + + // + MissedMailslotDatagrams uint32 + + // + MissedServerAnnouncements uint32 + + // + MissedServerListRequests uint32 + + // + ServerAnnounceAllocationsFailedPersec uint32 + + // + ServerListRequestsPersec uint32 +} + +func NewWin32_PerfRawData_PerfNet_BrowserEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfNet_Browser, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_Browser{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfNet_BrowserEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfNet_Browser, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_Browser{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAnnouncementsDomainPersec sets the value of AnnouncementsDomainPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyAnnouncementsDomainPersec(value uint64) (err error) { + return instance.SetProperty("AnnouncementsDomainPersec", (value)) +} + +// GetAnnouncementsDomainPersec gets the value of AnnouncementsDomainPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyAnnouncementsDomainPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AnnouncementsDomainPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAnnouncementsServerPersec sets the value of AnnouncementsServerPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyAnnouncementsServerPersec(value uint64) (err error) { + return instance.SetProperty("AnnouncementsServerPersec", (value)) +} + +// GetAnnouncementsServerPersec gets the value of AnnouncementsServerPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyAnnouncementsServerPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AnnouncementsServerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAnnouncementsTotalPersec sets the value of AnnouncementsTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyAnnouncementsTotalPersec(value uint64) (err error) { + return instance.SetProperty("AnnouncementsTotalPersec", (value)) +} + +// GetAnnouncementsTotalPersec gets the value of AnnouncementsTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyAnnouncementsTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("AnnouncementsTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDuplicateMasterAnnouncements sets the value of DuplicateMasterAnnouncements for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyDuplicateMasterAnnouncements(value uint32) (err error) { + return instance.SetProperty("DuplicateMasterAnnouncements", (value)) +} + +// GetDuplicateMasterAnnouncements gets the value of DuplicateMasterAnnouncements for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyDuplicateMasterAnnouncements() (value uint32, err error) { + retValue, err := instance.GetProperty("DuplicateMasterAnnouncements") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetElectionPacketsPersec sets the value of ElectionPacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyElectionPacketsPersec(value uint32) (err error) { + return instance.SetProperty("ElectionPacketsPersec", (value)) +} + +// GetElectionPacketsPersec gets the value of ElectionPacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyElectionPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ElectionPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsDomainPersec sets the value of EnumerationsDomainPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyEnumerationsDomainPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsDomainPersec", (value)) +} + +// GetEnumerationsDomainPersec gets the value of EnumerationsDomainPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyEnumerationsDomainPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsDomainPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsOtherPersec sets the value of EnumerationsOtherPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyEnumerationsOtherPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsOtherPersec", (value)) +} + +// GetEnumerationsOtherPersec gets the value of EnumerationsOtherPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyEnumerationsOtherPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsOtherPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsServerPersec sets the value of EnumerationsServerPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyEnumerationsServerPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsServerPersec", (value)) +} + +// GetEnumerationsServerPersec gets the value of EnumerationsServerPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyEnumerationsServerPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsServerPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnumerationsTotalPersec sets the value of EnumerationsTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyEnumerationsTotalPersec(value uint32) (err error) { + return instance.SetProperty("EnumerationsTotalPersec", (value)) +} + +// GetEnumerationsTotalPersec gets the value of EnumerationsTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyEnumerationsTotalPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerationsTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIllegalDatagramsPersec sets the value of IllegalDatagramsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyIllegalDatagramsPersec(value uint64) (err error) { + return instance.SetProperty("IllegalDatagramsPersec", (value)) +} + +// GetIllegalDatagramsPersec gets the value of IllegalDatagramsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyIllegalDatagramsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IllegalDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMailslotAllocationsFailed sets the value of MailslotAllocationsFailed for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMailslotAllocationsFailed(value uint32) (err error) { + return instance.SetProperty("MailslotAllocationsFailed", (value)) +} + +// GetMailslotAllocationsFailed gets the value of MailslotAllocationsFailed for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMailslotAllocationsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotAllocationsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotOpensFailedPersec sets the value of MailslotOpensFailedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMailslotOpensFailedPersec(value uint32) (err error) { + return instance.SetProperty("MailslotOpensFailedPersec", (value)) +} + +// GetMailslotOpensFailedPersec gets the value of MailslotOpensFailedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMailslotOpensFailedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotOpensFailedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotReceivesFailed sets the value of MailslotReceivesFailed for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMailslotReceivesFailed(value uint32) (err error) { + return instance.SetProperty("MailslotReceivesFailed", (value)) +} + +// GetMailslotReceivesFailed gets the value of MailslotReceivesFailed for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMailslotReceivesFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotReceivesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotWritesFailed sets the value of MailslotWritesFailed for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMailslotWritesFailed(value uint32) (err error) { + return instance.SetProperty("MailslotWritesFailed", (value)) +} + +// GetMailslotWritesFailed gets the value of MailslotWritesFailed for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMailslotWritesFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotWritesFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMailslotWritesPersec sets the value of MailslotWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMailslotWritesPersec(value uint32) (err error) { + return instance.SetProperty("MailslotWritesPersec", (value)) +} + +// GetMailslotWritesPersec gets the value of MailslotWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMailslotWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MailslotWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedMailslotDatagrams sets the value of MissedMailslotDatagrams for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMissedMailslotDatagrams(value uint32) (err error) { + return instance.SetProperty("MissedMailslotDatagrams", (value)) +} + +// GetMissedMailslotDatagrams gets the value of MissedMailslotDatagrams for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMissedMailslotDatagrams() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedMailslotDatagrams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedServerAnnouncements sets the value of MissedServerAnnouncements for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMissedServerAnnouncements(value uint32) (err error) { + return instance.SetProperty("MissedServerAnnouncements", (value)) +} + +// GetMissedServerAnnouncements gets the value of MissedServerAnnouncements for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMissedServerAnnouncements() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedServerAnnouncements") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMissedServerListRequests sets the value of MissedServerListRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyMissedServerListRequests(value uint32) (err error) { + return instance.SetProperty("MissedServerListRequests", (value)) +} + +// GetMissedServerListRequests gets the value of MissedServerListRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyMissedServerListRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("MissedServerListRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerAnnounceAllocationsFailedPersec sets the value of ServerAnnounceAllocationsFailedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyServerAnnounceAllocationsFailedPersec(value uint32) (err error) { + return instance.SetProperty("ServerAnnounceAllocationsFailedPersec", (value)) +} + +// GetServerAnnounceAllocationsFailedPersec gets the value of ServerAnnounceAllocationsFailedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyServerAnnounceAllocationsFailedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerAnnounceAllocationsFailedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerListRequestsPersec sets the value of ServerListRequestsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) SetPropertyServerListRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ServerListRequestsPersec", (value)) +} + +// GetServerListRequestsPersec gets the value of ServerListRequestsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Browser) GetPropertyServerListRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerListRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Redirector.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Redirector.go new file mode 100644 index 00000000..ca2da0b1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Redirector.go @@ -0,0 +1,1160 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfNet_Redirector struct +type Win32_PerfRawData_PerfNet_Redirector struct { + *Win32_PerfRawData + + // + BytesReceivedPersec uint64 + + // + BytesTotalPersec uint64 + + // + BytesTransmittedPersec uint64 + + // + ConnectsCore uint32 + + // + ConnectsLanManager20 uint32 + + // + ConnectsLanManager21 uint32 + + // + ConnectsWindowsNT uint32 + + // + CurrentCommands uint32 + + // + FileDataOperationsPersec uint32 + + // + FileReadOperationsPersec uint32 + + // + FileWriteOperationsPersec uint32 + + // + NetworkErrorsPersec uint32 + + // + PacketsPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsTransmittedPersec uint64 + + // + ReadBytesCachePersec uint64 + + // + ReadBytesNetworkPersec uint64 + + // + ReadBytesNonPagingPersec uint64 + + // + ReadBytesPagingPersec uint64 + + // + ReadOperationsRandomPersec uint32 + + // + ReadPacketsPersec uint32 + + // + ReadPacketsSmallPersec uint32 + + // + ReadsDeniedPersec uint32 + + // + ReadsLargePersec uint32 + + // + ServerDisconnects uint32 + + // + ServerReconnects uint32 + + // + ServerSessions uint32 + + // + ServerSessionsHung uint32 + + // + WriteBytesCachePersec uint64 + + // + WriteBytesNetworkPersec uint64 + + // + WriteBytesNonPagingPersec uint64 + + // + WriteBytesPagingPersec uint64 + + // + WriteOperationsRandomPersec uint32 + + // + WritePacketsPersec uint32 + + // + WritePacketsSmallPersec uint32 + + // + WritesDeniedPersec uint32 + + // + WritesLargePersec uint32 +} + +func NewWin32_PerfRawData_PerfNet_RedirectorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfNet_Redirector, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_Redirector{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfNet_RedirectorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfNet_Redirector, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_Redirector{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetConnectsCore sets the value of ConnectsCore for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyConnectsCore(value uint32) (err error) { + return instance.SetProperty("ConnectsCore", (value)) +} + +// GetConnectsCore gets the value of ConnectsCore for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyConnectsCore() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsCore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectsLanManager20 sets the value of ConnectsLanManager20 for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyConnectsLanManager20(value uint32) (err error) { + return instance.SetProperty("ConnectsLanManager20", (value)) +} + +// GetConnectsLanManager20 gets the value of ConnectsLanManager20 for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyConnectsLanManager20() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsLanManager20") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectsLanManager21 sets the value of ConnectsLanManager21 for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyConnectsLanManager21(value uint32) (err error) { + return instance.SetProperty("ConnectsLanManager21", (value)) +} + +// GetConnectsLanManager21 gets the value of ConnectsLanManager21 for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyConnectsLanManager21() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsLanManager21") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectsWindowsNT sets the value of ConnectsWindowsNT for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyConnectsWindowsNT(value uint32) (err error) { + return instance.SetProperty("ConnectsWindowsNT", (value)) +} + +// GetConnectsWindowsNT gets the value of ConnectsWindowsNT for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyConnectsWindowsNT() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectsWindowsNT") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentCommands sets the value of CurrentCommands for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyCurrentCommands(value uint32) (err error) { + return instance.SetProperty("CurrentCommands", (value)) +} + +// GetCurrentCommands gets the value of CurrentCommands for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyCurrentCommands() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentCommands") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileDataOperationsPersec sets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyFileDataOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileDataOperationsPersec", (value)) +} + +// GetFileDataOperationsPersec gets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyFileDataOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileDataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileReadOperationsPersec sets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyFileReadOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileReadOperationsPersec", (value)) +} + +// GetFileReadOperationsPersec gets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyFileReadOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileWriteOperationsPersec sets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyFileWriteOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileWriteOperationsPersec", (value)) +} + +// GetFileWriteOperationsPersec gets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyFileWriteOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNetworkErrorsPersec sets the value of NetworkErrorsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyNetworkErrorsPersec(value uint32) (err error) { + return instance.SetProperty("NetworkErrorsPersec", (value)) +} + +// GetNetworkErrorsPersec gets the value of NetworkErrorsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyNetworkErrorsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("NetworkErrorsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsTransmittedPersec sets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyPacketsTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsTransmittedPersec", (value)) +} + +// GetPacketsTransmittedPersec gets the value of PacketsTransmittedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyPacketsTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesCachePersec sets the value of ReadBytesCachePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadBytesCachePersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesCachePersec", (value)) +} + +// GetReadBytesCachePersec gets the value of ReadBytesCachePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadBytesCachePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesCachePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesNetworkPersec sets the value of ReadBytesNetworkPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadBytesNetworkPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesNetworkPersec", (value)) +} + +// GetReadBytesNetworkPersec gets the value of ReadBytesNetworkPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadBytesNetworkPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesNetworkPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesNonPagingPersec sets the value of ReadBytesNonPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadBytesNonPagingPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesNonPagingPersec", (value)) +} + +// GetReadBytesNonPagingPersec gets the value of ReadBytesNonPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadBytesNonPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesNonPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPagingPersec sets the value of ReadBytesPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadBytesPagingPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPagingPersec", (value)) +} + +// GetReadBytesPagingPersec gets the value of ReadBytesPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadBytesPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadOperationsRandomPersec sets the value of ReadOperationsRandomPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadOperationsRandomPersec(value uint32) (err error) { + return instance.SetProperty("ReadOperationsRandomPersec", (value)) +} + +// GetReadOperationsRandomPersec gets the value of ReadOperationsRandomPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadOperationsRandomPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadOperationsRandomPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPacketsPersec sets the value of ReadPacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadPacketsPersec(value uint32) (err error) { + return instance.SetProperty("ReadPacketsPersec", (value)) +} + +// GetReadPacketsPersec gets the value of ReadPacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadPacketsSmallPersec sets the value of ReadPacketsSmallPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadPacketsSmallPersec(value uint32) (err error) { + return instance.SetProperty("ReadPacketsSmallPersec", (value)) +} + +// GetReadPacketsSmallPersec gets the value of ReadPacketsSmallPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadPacketsSmallPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadPacketsSmallPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadsDeniedPersec sets the value of ReadsDeniedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadsDeniedPersec(value uint32) (err error) { + return instance.SetProperty("ReadsDeniedPersec", (value)) +} + +// GetReadsDeniedPersec gets the value of ReadsDeniedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadsDeniedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadsDeniedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadsLargePersec sets the value of ReadsLargePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyReadsLargePersec(value uint32) (err error) { + return instance.SetProperty("ReadsLargePersec", (value)) +} + +// GetReadsLargePersec gets the value of ReadsLargePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyReadsLargePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadsLargePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerDisconnects sets the value of ServerDisconnects for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyServerDisconnects(value uint32) (err error) { + return instance.SetProperty("ServerDisconnects", (value)) +} + +// GetServerDisconnects gets the value of ServerDisconnects for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyServerDisconnects() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerDisconnects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerReconnects sets the value of ServerReconnects for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyServerReconnects(value uint32) (err error) { + return instance.SetProperty("ServerReconnects", (value)) +} + +// GetServerReconnects gets the value of ServerReconnects for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyServerReconnects() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerReconnects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerSessions sets the value of ServerSessions for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyServerSessions(value uint32) (err error) { + return instance.SetProperty("ServerSessions", (value)) +} + +// GetServerSessions gets the value of ServerSessions for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyServerSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerSessionsHung sets the value of ServerSessionsHung for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyServerSessionsHung(value uint32) (err error) { + return instance.SetProperty("ServerSessionsHung", (value)) +} + +// GetServerSessionsHung gets the value of ServerSessionsHung for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyServerSessionsHung() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerSessionsHung") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesCachePersec sets the value of WriteBytesCachePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWriteBytesCachePersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesCachePersec", (value)) +} + +// GetWriteBytesCachePersec gets the value of WriteBytesCachePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWriteBytesCachePersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesCachePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesNetworkPersec sets the value of WriteBytesNetworkPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWriteBytesNetworkPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesNetworkPersec", (value)) +} + +// GetWriteBytesNetworkPersec gets the value of WriteBytesNetworkPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWriteBytesNetworkPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesNetworkPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesNonPagingPersec sets the value of WriteBytesNonPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWriteBytesNonPagingPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesNonPagingPersec", (value)) +} + +// GetWriteBytesNonPagingPersec gets the value of WriteBytesNonPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWriteBytesNonPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesNonPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPagingPersec sets the value of WriteBytesPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWriteBytesPagingPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPagingPersec", (value)) +} + +// GetWriteBytesPagingPersec gets the value of WriteBytesPagingPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWriteBytesPagingPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPagingPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteOperationsRandomPersec sets the value of WriteOperationsRandomPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWriteOperationsRandomPersec(value uint32) (err error) { + return instance.SetProperty("WriteOperationsRandomPersec", (value)) +} + +// GetWriteOperationsRandomPersec gets the value of WriteOperationsRandomPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWriteOperationsRandomPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteOperationsRandomPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritePacketsPersec sets the value of WritePacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWritePacketsPersec(value uint32) (err error) { + return instance.SetProperty("WritePacketsPersec", (value)) +} + +// GetWritePacketsPersec gets the value of WritePacketsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWritePacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritePacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritePacketsSmallPersec sets the value of WritePacketsSmallPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWritePacketsSmallPersec(value uint32) (err error) { + return instance.SetProperty("WritePacketsSmallPersec", (value)) +} + +// GetWritePacketsSmallPersec gets the value of WritePacketsSmallPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWritePacketsSmallPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritePacketsSmallPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritesDeniedPersec sets the value of WritesDeniedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWritesDeniedPersec(value uint32) (err error) { + return instance.SetProperty("WritesDeniedPersec", (value)) +} + +// GetWritesDeniedPersec gets the value of WritesDeniedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWritesDeniedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritesDeniedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWritesLargePersec sets the value of WritesLargePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) SetPropertyWritesLargePersec(value uint32) (err error) { + return instance.SetProperty("WritesLargePersec", (value)) +} + +// GetWritesLargePersec gets the value of WritesLargePersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Redirector) GetPropertyWritesLargePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WritesLargePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Server.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Server.go new file mode 100644 index 00000000..e1576a37 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_Server.go @@ -0,0 +1,1280 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfNet_Server struct +type Win32_PerfRawData_PerfNet_Server struct { + *Win32_PerfRawData + + // + BlockingRequestsRejected uint32 + + // + BytesReceivedPersec uint64 + + // + BytesTotalPersec uint64 + + // + BytesTransmittedPersec uint64 + + // + ContextBlocksQueuedPersec uint32 + + // + ErrorsAccessPermissions uint32 + + // + ErrorsGrantedAccess uint32 + + // + ErrorsLogon uint32 + + // + ErrorsSystem uint32 + + // + FileDirectorySearches uint32 + + // + FilesOpen uint32 + + // + FilesOpenedTotal uint32 + + // + LogonPersec uint32 + + // + LogonTotal uint32 + + // + PoolNonpagedBytes uint32 + + // + PoolNonpagedFailures uint32 + + // + PoolNonpagedPeak uint32 + + // + PoolPagedBytes uint32 + + // + PoolPagedFailures uint32 + + // + PoolPagedPeak uint32 + + // + ReconnectedDurableHandles uint32 + + // + ReconnectedResilientHandles uint32 + + // + ServerSessions uint32 + + // + SessionsErroredOut uint32 + + // + SessionsForcedOff uint32 + + // + SessionsLoggedOff uint32 + + // + SessionsTimedOut uint32 + + // + SMBBranchCacheHashBytesSent uint64 + + // + SMBBranchCacheHashGenerationRequests uint32 + + // + SMBBranchCacheHashHeaderRequests uint32 + + // + SMBBranchCacheHashRequestsReceived uint32 + + // + SMBBranchCacheHashResponsesSent uint32 + + // + SMBBranchCacheHashV2BytesSent uint64 + + // + SMBBranchCacheHashV2GenerationRequests uint32 + + // + SMBBranchCacheHashV2HeaderRequests uint32 + + // + SMBBranchCacheHashV2RequestsReceived uint32 + + // + SMBBranchCacheHashV2RequestsServedFromDedup uint32 + + // + SMBBranchCacheHashV2ResponsesSent uint32 + + // + TotalDurableHandles uint32 + + // + TotalResilientHandles uint32 + + // + WorkItemShortages uint32 +} + +func NewWin32_PerfRawData_PerfNet_ServerEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfNet_Server, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_Server{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfNet_ServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfNet_Server, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_Server{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBlockingRequestsRejected sets the value of BlockingRequestsRejected for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyBlockingRequestsRejected(value uint32) (err error) { + return instance.SetProperty("BlockingRequestsRejected", (value)) +} + +// GetBlockingRequestsRejected gets the value of BlockingRequestsRejected for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyBlockingRequestsRejected() (value uint32, err error) { + retValue, err := instance.GetProperty("BlockingRequestsRejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPersec sets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyBytesTransmittedPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransmittedPersec", (value)) +} + +// GetBytesTransmittedPersec gets the value of BytesTransmittedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyBytesTransmittedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextBlocksQueuedPersec sets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyContextBlocksQueuedPersec(value uint32) (err error) { + return instance.SetProperty("ContextBlocksQueuedPersec", (value)) +} + +// GetContextBlocksQueuedPersec gets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyContextBlocksQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBlocksQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsAccessPermissions sets the value of ErrorsAccessPermissions for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyErrorsAccessPermissions(value uint32) (err error) { + return instance.SetProperty("ErrorsAccessPermissions", (value)) +} + +// GetErrorsAccessPermissions gets the value of ErrorsAccessPermissions for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyErrorsAccessPermissions() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsAccessPermissions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsGrantedAccess sets the value of ErrorsGrantedAccess for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyErrorsGrantedAccess(value uint32) (err error) { + return instance.SetProperty("ErrorsGrantedAccess", (value)) +} + +// GetErrorsGrantedAccess gets the value of ErrorsGrantedAccess for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyErrorsGrantedAccess() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsGrantedAccess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsLogon sets the value of ErrorsLogon for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyErrorsLogon(value uint32) (err error) { + return instance.SetProperty("ErrorsLogon", (value)) +} + +// GetErrorsLogon gets the value of ErrorsLogon for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyErrorsLogon() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsLogon") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorsSystem sets the value of ErrorsSystem for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyErrorsSystem(value uint32) (err error) { + return instance.SetProperty("ErrorsSystem", (value)) +} + +// GetErrorsSystem gets the value of ErrorsSystem for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyErrorsSystem() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorsSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileDirectorySearches sets the value of FileDirectorySearches for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyFileDirectorySearches(value uint32) (err error) { + return instance.SetProperty("FileDirectorySearches", (value)) +} + +// GetFileDirectorySearches gets the value of FileDirectorySearches for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyFileDirectorySearches() (value uint32, err error) { + retValue, err := instance.GetProperty("FileDirectorySearches") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpen sets the value of FilesOpen for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyFilesOpen(value uint32) (err error) { + return instance.SetProperty("FilesOpen", (value)) +} + +// GetFilesOpen gets the value of FilesOpen for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyFilesOpen() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesOpenedTotal sets the value of FilesOpenedTotal for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyFilesOpenedTotal(value uint32) (err error) { + return instance.SetProperty("FilesOpenedTotal", (value)) +} + +// GetFilesOpenedTotal gets the value of FilesOpenedTotal for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyFilesOpenedTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesOpenedTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogonPersec sets the value of LogonPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyLogonPersec(value uint32) (err error) { + return instance.SetProperty("LogonPersec", (value)) +} + +// GetLogonPersec gets the value of LogonPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyLogonPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LogonPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLogonTotal sets the value of LogonTotal for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyLogonTotal(value uint32) (err error) { + return instance.SetProperty("LogonTotal", (value)) +} + +// GetLogonTotal gets the value of LogonTotal for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyLogonTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("LogonTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedFailures sets the value of PoolNonpagedFailures for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyPoolNonpagedFailures(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedFailures", (value)) +} + +// GetPoolNonpagedFailures gets the value of PoolNonpagedFailures for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyPoolNonpagedFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedPeak sets the value of PoolNonpagedPeak for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyPoolNonpagedPeak(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedPeak", (value)) +} + +// GetPoolNonpagedPeak gets the value of PoolNonpagedPeak for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyPoolNonpagedPeak() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedFailures sets the value of PoolPagedFailures for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyPoolPagedFailures(value uint32) (err error) { + return instance.SetProperty("PoolPagedFailures", (value)) +} + +// GetPoolPagedFailures gets the value of PoolPagedFailures for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyPoolPagedFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedPeak sets the value of PoolPagedPeak for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyPoolPagedPeak(value uint32) (err error) { + return instance.SetProperty("PoolPagedPeak", (value)) +} + +// GetPoolPagedPeak gets the value of PoolPagedPeak for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyPoolPagedPeak() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReconnectedDurableHandles sets the value of ReconnectedDurableHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyReconnectedDurableHandles(value uint32) (err error) { + return instance.SetProperty("ReconnectedDurableHandles", (value)) +} + +// GetReconnectedDurableHandles gets the value of ReconnectedDurableHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyReconnectedDurableHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ReconnectedDurableHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReconnectedResilientHandles sets the value of ReconnectedResilientHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyReconnectedResilientHandles(value uint32) (err error) { + return instance.SetProperty("ReconnectedResilientHandles", (value)) +} + +// GetReconnectedResilientHandles gets the value of ReconnectedResilientHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyReconnectedResilientHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("ReconnectedResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetServerSessions sets the value of ServerSessions for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyServerSessions(value uint32) (err error) { + return instance.SetProperty("ServerSessions", (value)) +} + +// GetServerSessions gets the value of ServerSessions for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyServerSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("ServerSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsErroredOut sets the value of SessionsErroredOut for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySessionsErroredOut(value uint32) (err error) { + return instance.SetProperty("SessionsErroredOut", (value)) +} + +// GetSessionsErroredOut gets the value of SessionsErroredOut for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySessionsErroredOut() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsErroredOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsForcedOff sets the value of SessionsForcedOff for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySessionsForcedOff(value uint32) (err error) { + return instance.SetProperty("SessionsForcedOff", (value)) +} + +// GetSessionsForcedOff gets the value of SessionsForcedOff for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySessionsForcedOff() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsForcedOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsLoggedOff sets the value of SessionsLoggedOff for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySessionsLoggedOff(value uint32) (err error) { + return instance.SetProperty("SessionsLoggedOff", (value)) +} + +// GetSessionsLoggedOff gets the value of SessionsLoggedOff for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySessionsLoggedOff() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsLoggedOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsTimedOut sets the value of SessionsTimedOut for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("SessionsTimedOut", (value)) +} + +// GetSessionsTimedOut gets the value of SessionsTimedOut for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashBytesSent sets the value of SMBBranchCacheHashBytesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashBytesSent(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheHashBytesSent", (value)) +} + +// GetSMBBranchCacheHashBytesSent gets the value of SMBBranchCacheHashBytesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashBytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashBytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashGenerationRequests sets the value of SMBBranchCacheHashGenerationRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashGenerationRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashGenerationRequests", (value)) +} + +// GetSMBBranchCacheHashGenerationRequests gets the value of SMBBranchCacheHashGenerationRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashGenerationRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashGenerationRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashHeaderRequests sets the value of SMBBranchCacheHashHeaderRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashHeaderRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashHeaderRequests", (value)) +} + +// GetSMBBranchCacheHashHeaderRequests gets the value of SMBBranchCacheHashHeaderRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashHeaderRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashHeaderRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashRequestsReceived sets the value of SMBBranchCacheHashRequestsReceived for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashRequestsReceived(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashRequestsReceived", (value)) +} + +// GetSMBBranchCacheHashRequestsReceived gets the value of SMBBranchCacheHashRequestsReceived for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashRequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashRequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashResponsesSent sets the value of SMBBranchCacheHashResponsesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashResponsesSent(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashResponsesSent", (value)) +} + +// GetSMBBranchCacheHashResponsesSent gets the value of SMBBranchCacheHashResponsesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashResponsesSent() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashResponsesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2BytesSent sets the value of SMBBranchCacheHashV2BytesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashV2BytesSent(value uint64) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2BytesSent", (value)) +} + +// GetSMBBranchCacheHashV2BytesSent gets the value of SMBBranchCacheHashV2BytesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashV2BytesSent() (value uint64, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2BytesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2GenerationRequests sets the value of SMBBranchCacheHashV2GenerationRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashV2GenerationRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2GenerationRequests", (value)) +} + +// GetSMBBranchCacheHashV2GenerationRequests gets the value of SMBBranchCacheHashV2GenerationRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashV2GenerationRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2GenerationRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2HeaderRequests sets the value of SMBBranchCacheHashV2HeaderRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashV2HeaderRequests(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2HeaderRequests", (value)) +} + +// GetSMBBranchCacheHashV2HeaderRequests gets the value of SMBBranchCacheHashV2HeaderRequests for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashV2HeaderRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2HeaderRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2RequestsReceived sets the value of SMBBranchCacheHashV2RequestsReceived for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashV2RequestsReceived(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2RequestsReceived", (value)) +} + +// GetSMBBranchCacheHashV2RequestsReceived gets the value of SMBBranchCacheHashV2RequestsReceived for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashV2RequestsReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2RequestsReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2RequestsServedFromDedup sets the value of SMBBranchCacheHashV2RequestsServedFromDedup for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashV2RequestsServedFromDedup(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2RequestsServedFromDedup", (value)) +} + +// GetSMBBranchCacheHashV2RequestsServedFromDedup gets the value of SMBBranchCacheHashV2RequestsServedFromDedup for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashV2RequestsServedFromDedup() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2RequestsServedFromDedup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBBranchCacheHashV2ResponsesSent sets the value of SMBBranchCacheHashV2ResponsesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertySMBBranchCacheHashV2ResponsesSent(value uint32) (err error) { + return instance.SetProperty("SMBBranchCacheHashV2ResponsesSent", (value)) +} + +// GetSMBBranchCacheHashV2ResponsesSent gets the value of SMBBranchCacheHashV2ResponsesSent for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertySMBBranchCacheHashV2ResponsesSent() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBBranchCacheHashV2ResponsesSent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalDurableHandles sets the value of TotalDurableHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyTotalDurableHandles(value uint32) (err error) { + return instance.SetProperty("TotalDurableHandles", (value)) +} + +// GetTotalDurableHandles gets the value of TotalDurableHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyTotalDurableHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalDurableHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalResilientHandles sets the value of TotalResilientHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyTotalResilientHandles(value uint32) (err error) { + return instance.SetProperty("TotalResilientHandles", (value)) +} + +// GetTotalResilientHandles gets the value of TotalResilientHandles for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyTotalResilientHandles() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalResilientHandles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkItemShortages sets the value of WorkItemShortages for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) SetPropertyWorkItemShortages(value uint32) (err error) { + return instance.SetProperty("WorkItemShortages", (value)) +} + +// GetWorkItemShortages gets the value of WorkItemShortages for the instance +func (instance *Win32_PerfRawData_PerfNet_Server) GetPropertyWorkItemShortages() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkItemShortages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_ServerWorkQueues.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_ServerWorkQueues.go new file mode 100644 index 00000000..6cfc4129 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfNet_ServerWorkQueues.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfNet_ServerWorkQueues struct +type Win32_PerfRawData_PerfNet_ServerWorkQueues struct { + *Win32_PerfRawData + + // + ActiveThreads uint32 + + // + AvailableThreads uint32 + + // + AvailableWorkItems uint32 + + // + BorrowedWorkItems uint32 + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTransferredPersec uint64 + + // + ContextBlocksQueuedPersec uint32 + + // + CurrentClients uint32 + + // + QueueLength uint32 + + // + ReadBytesPersec uint64 + + // + ReadOperationsPersec uint64 + + // + TotalBytesPersec uint64 + + // + TotalOperationsPersec uint64 + + // + WorkItemShortages uint32 + + // + WriteBytesPersec uint64 + + // + WriteOperationsPersec uint64 +} + +func NewWin32_PerfRawData_PerfNet_ServerWorkQueuesEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfNet_ServerWorkQueues, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_ServerWorkQueues{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfNet_ServerWorkQueuesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfNet_ServerWorkQueues, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfNet_ServerWorkQueues{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveThreads sets the value of ActiveThreads for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyActiveThreads(value uint32) (err error) { + return instance.SetProperty("ActiveThreads", (value)) +} + +// GetActiveThreads gets the value of ActiveThreads for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyActiveThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvailableThreads sets the value of AvailableThreads for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyAvailableThreads(value uint32) (err error) { + return instance.SetProperty("AvailableThreads", (value)) +} + +// GetAvailableThreads gets the value of AvailableThreads for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyAvailableThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableThreads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvailableWorkItems sets the value of AvailableWorkItems for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyAvailableWorkItems(value uint32) (err error) { + return instance.SetProperty("AvailableWorkItems", (value)) +} + +// GetAvailableWorkItems gets the value of AvailableWorkItems for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyAvailableWorkItems() (value uint32, err error) { + retValue, err := instance.GetProperty("AvailableWorkItems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBorrowedWorkItems sets the value of BorrowedWorkItems for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyBorrowedWorkItems(value uint32) (err error) { + return instance.SetProperty("BorrowedWorkItems", (value)) +} + +// GetBorrowedWorkItems gets the value of BorrowedWorkItems for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyBorrowedWorkItems() (value uint32, err error) { + retValue, err := instance.GetProperty("BorrowedWorkItems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransferredPersec sets the value of BytesTransferredPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyBytesTransferredPersec(value uint64) (err error) { + return instance.SetProperty("BytesTransferredPersec", (value)) +} + +// GetBytesTransferredPersec gets the value of BytesTransferredPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyBytesTransferredPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransferredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextBlocksQueuedPersec sets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyContextBlocksQueuedPersec(value uint32) (err error) { + return instance.SetProperty("ContextBlocksQueuedPersec", (value)) +} + +// GetContextBlocksQueuedPersec gets the value of ContextBlocksQueuedPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyContextBlocksQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextBlocksQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentClients sets the value of CurrentClients for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyCurrentClients(value uint32) (err error) { + return instance.SetProperty("CurrentClients", (value)) +} + +// GetCurrentClients gets the value of CurrentClients for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyCurrentClients() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueueLength sets the value of QueueLength for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyQueueLength(value uint32) (err error) { + return instance.SetProperty("QueueLength", (value)) +} + +// GetQueueLength gets the value of QueueLength for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("QueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadOperationsPersec sets the value of ReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyReadOperationsPersec(value uint64) (err error) { + return instance.SetProperty("ReadOperationsPersec", (value)) +} + +// GetReadOperationsPersec gets the value of ReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyReadOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalBytesPersec sets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyTotalBytesPersec(value uint64) (err error) { + return instance.SetProperty("TotalBytesPersec", (value)) +} + +// GetTotalBytesPersec gets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyTotalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalOperationsPersec sets the value of TotalOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyTotalOperationsPersec(value uint64) (err error) { + return instance.SetProperty("TotalOperationsPersec", (value)) +} + +// GetTotalOperationsPersec gets the value of TotalOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyTotalOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkItemShortages sets the value of WorkItemShortages for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyWorkItemShortages(value uint32) (err error) { + return instance.SetProperty("WorkItemShortages", (value)) +} + +// GetWorkItemShortages gets the value of WorkItemShortages for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyWorkItemShortages() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkItemShortages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteOperationsPersec sets the value of WriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) SetPropertyWriteOperationsPersec(value uint64) (err error) { + return instance.SetProperty("WriteOperationsPersec", (value)) +} + +// GetWriteOperationsPersec gets the value of WriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfNet_ServerWorkQueues) GetPropertyWriteOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Cache.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Cache.go new file mode 100644 index 00000000..932f3f3c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Cache.go @@ -0,0 +1,1070 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_Cache struct +type Win32_PerfRawData_PerfOS_Cache struct { + *Win32_PerfRawData + + // + AsyncCopyReadsPersec uint32 + + // + AsyncDataMapsPersec uint32 + + // + AsyncFastReadsPersec uint32 + + // + AsyncMDLReadsPersec uint32 + + // + AsyncPinReadsPersec uint32 + + // + CopyReadHitsPercent uint32 + + // + CopyReadHitsPercent_Base uint32 + + // + CopyReadsPersec uint32 + + // + DataFlushesPersec uint32 + + // + DataFlushPagesPersec uint32 + + // + DataMapHitsPercent uint32 + + // + DataMapHitsPercent_Base uint32 + + // + DataMapPinsPersec uint32 + + // + DataMapPinsPersec_Base uint32 + + // + DataMapsPersec uint32 + + // + DirtyPages uint64 + + // + DirtyPageThreshold uint64 + + // + FastReadNotPossiblesPersec uint32 + + // + FastReadResourceMissesPersec uint32 + + // + FastReadsPersec uint32 + + // + LazyWriteFlushesPersec uint32 + + // + LazyWritePagesPersec uint32 + + // + MDLReadHitsPercent uint32 + + // + MDLReadHitsPercent_Base uint32 + + // + MDLReadsPersec uint32 + + // + PinReadHitsPercent uint32 + + // + PinReadHitsPercent_Base uint32 + + // + PinReadsPersec uint32 + + // + ReadAheadsPersec uint32 + + // + SyncCopyReadsPersec uint32 + + // + SyncDataMapsPersec uint32 + + // + SyncFastReadsPersec uint32 + + // + SyncMDLReadsPersec uint32 + + // + SyncPinReadsPersec uint32 +} + +func NewWin32_PerfRawData_PerfOS_CacheEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_Cache, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Cache{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_CacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_Cache, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Cache{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAsyncCopyReadsPersec sets the value of AsyncCopyReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyAsyncCopyReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncCopyReadsPersec", (value)) +} + +// GetAsyncCopyReadsPersec gets the value of AsyncCopyReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyAsyncCopyReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncCopyReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncDataMapsPersec sets the value of AsyncDataMapsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyAsyncDataMapsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncDataMapsPersec", (value)) +} + +// GetAsyncDataMapsPersec gets the value of AsyncDataMapsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyAsyncDataMapsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncDataMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncFastReadsPersec sets the value of AsyncFastReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyAsyncFastReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncFastReadsPersec", (value)) +} + +// GetAsyncFastReadsPersec gets the value of AsyncFastReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyAsyncFastReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncFastReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncMDLReadsPersec sets the value of AsyncMDLReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyAsyncMDLReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncMDLReadsPersec", (value)) +} + +// GetAsyncMDLReadsPersec gets the value of AsyncMDLReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyAsyncMDLReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncMDLReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAsyncPinReadsPersec sets the value of AsyncPinReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyAsyncPinReadsPersec(value uint32) (err error) { + return instance.SetProperty("AsyncPinReadsPersec", (value)) +} + +// GetAsyncPinReadsPersec gets the value of AsyncPinReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyAsyncPinReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AsyncPinReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCopyReadHitsPercent sets the value of CopyReadHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyCopyReadHitsPercent(value uint32) (err error) { + return instance.SetProperty("CopyReadHitsPercent", (value)) +} + +// GetCopyReadHitsPercent gets the value of CopyReadHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyCopyReadHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("CopyReadHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCopyReadHitsPercent_Base sets the value of CopyReadHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyCopyReadHitsPercent_Base(value uint32) (err error) { + return instance.SetProperty("CopyReadHitsPercent_Base", (value)) +} + +// GetCopyReadHitsPercent_Base gets the value of CopyReadHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyCopyReadHitsPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("CopyReadHitsPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCopyReadsPersec sets the value of CopyReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyCopyReadsPersec(value uint32) (err error) { + return instance.SetProperty("CopyReadsPersec", (value)) +} + +// GetCopyReadsPersec gets the value of CopyReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyCopyReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CopyReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataFlushesPersec sets the value of DataFlushesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataFlushesPersec(value uint32) (err error) { + return instance.SetProperty("DataFlushesPersec", (value)) +} + +// GetDataFlushesPersec gets the value of DataFlushesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataFlushesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataFlushPagesPersec sets the value of DataFlushPagesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataFlushPagesPersec(value uint32) (err error) { + return instance.SetProperty("DataFlushPagesPersec", (value)) +} + +// GetDataFlushPagesPersec gets the value of DataFlushPagesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataFlushPagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataFlushPagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapHitsPercent sets the value of DataMapHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataMapHitsPercent(value uint32) (err error) { + return instance.SetProperty("DataMapHitsPercent", (value)) +} + +// GetDataMapHitsPercent gets the value of DataMapHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataMapHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapHitsPercent_Base sets the value of DataMapHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataMapHitsPercent_Base(value uint32) (err error) { + return instance.SetProperty("DataMapHitsPercent_Base", (value)) +} + +// GetDataMapHitsPercent_Base gets the value of DataMapHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataMapHitsPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapHitsPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapPinsPersec sets the value of DataMapPinsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataMapPinsPersec(value uint32) (err error) { + return instance.SetProperty("DataMapPinsPersec", (value)) +} + +// GetDataMapPinsPersec gets the value of DataMapPinsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataMapPinsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapPinsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapPinsPersec_Base sets the value of DataMapPinsPersec_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataMapPinsPersec_Base(value uint32) (err error) { + return instance.SetProperty("DataMapPinsPersec_Base", (value)) +} + +// GetDataMapPinsPersec_Base gets the value of DataMapPinsPersec_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataMapPinsPersec_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapPinsPersec_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDataMapsPersec sets the value of DataMapsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDataMapsPersec(value uint32) (err error) { + return instance.SetProperty("DataMapsPersec", (value)) +} + +// GetDataMapsPersec gets the value of DataMapsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDataMapsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DataMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirtyPages sets the value of DirtyPages for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDirtyPages(value uint64) (err error) { + return instance.SetProperty("DirtyPages", (value)) +} + +// GetDirtyPages gets the value of DirtyPages for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDirtyPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirtyPageThreshold sets the value of DirtyPageThreshold for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyDirtyPageThreshold(value uint64) (err error) { + return instance.SetProperty("DirtyPageThreshold", (value)) +} + +// GetDirtyPageThreshold gets the value of DirtyPageThreshold for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyDirtyPageThreshold() (value uint64, err error) { + retValue, err := instance.GetProperty("DirtyPageThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFastReadNotPossiblesPersec sets the value of FastReadNotPossiblesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyFastReadNotPossiblesPersec(value uint32) (err error) { + return instance.SetProperty("FastReadNotPossiblesPersec", (value)) +} + +// GetFastReadNotPossiblesPersec gets the value of FastReadNotPossiblesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyFastReadNotPossiblesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FastReadNotPossiblesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFastReadResourceMissesPersec sets the value of FastReadResourceMissesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyFastReadResourceMissesPersec(value uint32) (err error) { + return instance.SetProperty("FastReadResourceMissesPersec", (value)) +} + +// GetFastReadResourceMissesPersec gets the value of FastReadResourceMissesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyFastReadResourceMissesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FastReadResourceMissesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFastReadsPersec sets the value of FastReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyFastReadsPersec(value uint32) (err error) { + return instance.SetProperty("FastReadsPersec", (value)) +} + +// GetFastReadsPersec gets the value of FastReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyFastReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FastReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLazyWriteFlushesPersec sets the value of LazyWriteFlushesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyLazyWriteFlushesPersec(value uint32) (err error) { + return instance.SetProperty("LazyWriteFlushesPersec", (value)) +} + +// GetLazyWriteFlushesPersec gets the value of LazyWriteFlushesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyLazyWriteFlushesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LazyWriteFlushesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLazyWritePagesPersec sets the value of LazyWritePagesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyLazyWritePagesPersec(value uint32) (err error) { + return instance.SetProperty("LazyWritePagesPersec", (value)) +} + +// GetLazyWritePagesPersec gets the value of LazyWritePagesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyLazyWritePagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("LazyWritePagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMDLReadHitsPercent sets the value of MDLReadHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyMDLReadHitsPercent(value uint32) (err error) { + return instance.SetProperty("MDLReadHitsPercent", (value)) +} + +// GetMDLReadHitsPercent gets the value of MDLReadHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyMDLReadHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("MDLReadHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMDLReadHitsPercent_Base sets the value of MDLReadHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyMDLReadHitsPercent_Base(value uint32) (err error) { + return instance.SetProperty("MDLReadHitsPercent_Base", (value)) +} + +// GetMDLReadHitsPercent_Base gets the value of MDLReadHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyMDLReadHitsPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("MDLReadHitsPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMDLReadsPersec sets the value of MDLReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyMDLReadsPersec(value uint32) (err error) { + return instance.SetProperty("MDLReadsPersec", (value)) +} + +// GetMDLReadsPersec gets the value of MDLReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyMDLReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MDLReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinReadHitsPercent sets the value of PinReadHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyPinReadHitsPercent(value uint32) (err error) { + return instance.SetProperty("PinReadHitsPercent", (value)) +} + +// GetPinReadHitsPercent gets the value of PinReadHitsPercent for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyPinReadHitsPercent() (value uint32, err error) { + retValue, err := instance.GetProperty("PinReadHitsPercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinReadHitsPercent_Base sets the value of PinReadHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyPinReadHitsPercent_Base(value uint32) (err error) { + return instance.SetProperty("PinReadHitsPercent_Base", (value)) +} + +// GetPinReadHitsPercent_Base gets the value of PinReadHitsPercent_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyPinReadHitsPercent_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PinReadHitsPercent_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPinReadsPersec sets the value of PinReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyPinReadsPersec(value uint32) (err error) { + return instance.SetProperty("PinReadsPersec", (value)) +} + +// GetPinReadsPersec gets the value of PinReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyPinReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PinReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadAheadsPersec sets the value of ReadAheadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertyReadAheadsPersec(value uint32) (err error) { + return instance.SetProperty("ReadAheadsPersec", (value)) +} + +// GetReadAheadsPersec gets the value of ReadAheadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertyReadAheadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadAheadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncCopyReadsPersec sets the value of SyncCopyReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertySyncCopyReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncCopyReadsPersec", (value)) +} + +// GetSyncCopyReadsPersec gets the value of SyncCopyReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertySyncCopyReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncCopyReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncDataMapsPersec sets the value of SyncDataMapsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertySyncDataMapsPersec(value uint32) (err error) { + return instance.SetProperty("SyncDataMapsPersec", (value)) +} + +// GetSyncDataMapsPersec gets the value of SyncDataMapsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertySyncDataMapsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncDataMapsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncFastReadsPersec sets the value of SyncFastReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertySyncFastReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncFastReadsPersec", (value)) +} + +// GetSyncFastReadsPersec gets the value of SyncFastReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertySyncFastReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncFastReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncMDLReadsPersec sets the value of SyncMDLReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertySyncMDLReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncMDLReadsPersec", (value)) +} + +// GetSyncMDLReadsPersec gets the value of SyncMDLReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertySyncMDLReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncMDLReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSyncPinReadsPersec sets the value of SyncPinReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) SetPropertySyncPinReadsPersec(value uint32) (err error) { + return instance.SetProperty("SyncPinReadsPersec", (value)) +} + +// GetSyncPinReadsPersec gets the value of SyncPinReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Cache) GetPropertySyncPinReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SyncPinReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Memory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Memory.go new file mode 100644 index 00000000..14a9da86 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Memory.go @@ -0,0 +1,1160 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_Memory struct +type Win32_PerfRawData_PerfOS_Memory struct { + *Win32_PerfRawData + + // + AvailableBytes uint64 + + // + AvailableKBytes uint64 + + // + AvailableMBytes uint64 + + // + CacheBytes uint64 + + // + CacheBytesPeak uint64 + + // + CacheFaultsPersec uint32 + + // + CommitLimit uint64 + + // + CommittedBytes uint64 + + // + DemandZeroFaultsPersec uint32 + + // + FreeAndZeroPageListBytes uint64 + + // + FreeSystemPageTableEntries uint32 + + // + LongTermAverageStandbyCacheLifetimes uint32 + + // + ModifiedPageListBytes uint64 + + // + PageFaultsPersec uint32 + + // + PageReadsPersec uint32 + + // + PagesInputPersec uint32 + + // + PagesOutputPersec uint32 + + // + PagesPersec uint32 + + // + PageWritesPersec uint32 + + // + PercentCommittedBytesInUse uint32 + + // + PercentCommittedBytesInUse_Base uint32 + + // + PoolNonpagedAllocs uint32 + + // + PoolNonpagedBytes uint64 + + // + PoolPagedAllocs uint32 + + // + PoolPagedBytes uint64 + + // + PoolPagedResidentBytes uint64 + + // + StandbyCacheCoreBytes uint64 + + // + StandbyCacheNormalPriorityBytes uint64 + + // + StandbyCacheReserveBytes uint64 + + // + SystemCacheResidentBytes uint64 + + // + SystemCodeResidentBytes uint64 + + // + SystemCodeTotalBytes uint64 + + // + SystemDriverResidentBytes uint64 + + // + SystemDriverTotalBytes uint64 + + // + TransitionFaultsPersec uint32 + + // + TransitionPagesRePurposedPersec uint32 + + // + WriteCopiesPersec uint32 +} + +func NewWin32_PerfRawData_PerfOS_MemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_Memory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Memory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_MemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_Memory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Memory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvailableBytes sets the value of AvailableBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyAvailableBytes(value uint64) (err error) { + return instance.SetProperty("AvailableBytes", (value)) +} + +// GetAvailableBytes gets the value of AvailableBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyAvailableBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvailableKBytes sets the value of AvailableKBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyAvailableKBytes(value uint64) (err error) { + return instance.SetProperty("AvailableKBytes", (value)) +} + +// GetAvailableKBytes gets the value of AvailableKBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyAvailableKBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableKBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvailableMBytes sets the value of AvailableMBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyAvailableMBytes(value uint64) (err error) { + return instance.SetProperty("AvailableMBytes", (value)) +} + +// GetAvailableMBytes gets the value of AvailableMBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyAvailableMBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("AvailableMBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheBytes sets the value of CacheBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyCacheBytes(value uint64) (err error) { + return instance.SetProperty("CacheBytes", (value)) +} + +// GetCacheBytes gets the value of CacheBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyCacheBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheBytesPeak sets the value of CacheBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyCacheBytesPeak(value uint64) (err error) { + return instance.SetProperty("CacheBytesPeak", (value)) +} + +// GetCacheBytesPeak gets the value of CacheBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyCacheBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCacheFaultsPersec sets the value of CacheFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyCacheFaultsPersec(value uint32) (err error) { + return instance.SetProperty("CacheFaultsPersec", (value)) +} + +// GetCacheFaultsPersec gets the value of CacheFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyCacheFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitLimit sets the value of CommitLimit for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyCommitLimit(value uint64) (err error) { + return instance.SetProperty("CommitLimit", (value)) +} + +// GetCommitLimit gets the value of CommitLimit for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyCommitLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("CommitLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCommittedBytes sets the value of CommittedBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyCommittedBytes(value uint64) (err error) { + return instance.SetProperty("CommittedBytes", (value)) +} + +// GetCommittedBytes gets the value of CommittedBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyCommittedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("CommittedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDemandZeroFaultsPersec sets the value of DemandZeroFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyDemandZeroFaultsPersec(value uint32) (err error) { + return instance.SetProperty("DemandZeroFaultsPersec", (value)) +} + +// GetDemandZeroFaultsPersec gets the value of DemandZeroFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyDemandZeroFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DemandZeroFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFreeAndZeroPageListBytes sets the value of FreeAndZeroPageListBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyFreeAndZeroPageListBytes(value uint64) (err error) { + return instance.SetProperty("FreeAndZeroPageListBytes", (value)) +} + +// GetFreeAndZeroPageListBytes gets the value of FreeAndZeroPageListBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyFreeAndZeroPageListBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeAndZeroPageListBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFreeSystemPageTableEntries sets the value of FreeSystemPageTableEntries for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyFreeSystemPageTableEntries(value uint32) (err error) { + return instance.SetProperty("FreeSystemPageTableEntries", (value)) +} + +// GetFreeSystemPageTableEntries gets the value of FreeSystemPageTableEntries for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyFreeSystemPageTableEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeSystemPageTableEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLongTermAverageStandbyCacheLifetimes sets the value of LongTermAverageStandbyCacheLifetimes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyLongTermAverageStandbyCacheLifetimes(value uint32) (err error) { + return instance.SetProperty("LongTermAverageStandbyCacheLifetimes", (value)) +} + +// GetLongTermAverageStandbyCacheLifetimes gets the value of LongTermAverageStandbyCacheLifetimes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyLongTermAverageStandbyCacheLifetimes() (value uint32, err error) { + retValue, err := instance.GetProperty("LongTermAverageStandbyCacheLifetimes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetModifiedPageListBytes sets the value of ModifiedPageListBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyModifiedPageListBytes(value uint64) (err error) { + return instance.SetProperty("ModifiedPageListBytes", (value)) +} + +// GetModifiedPageListBytes gets the value of ModifiedPageListBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyModifiedPageListBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("ModifiedPageListBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageReadsPersec sets the value of PageReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPageReadsPersec(value uint32) (err error) { + return instance.SetProperty("PageReadsPersec", (value)) +} + +// GetPageReadsPersec gets the value of PageReadsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPageReadsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageReadsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesInputPersec sets the value of PagesInputPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPagesInputPersec(value uint32) (err error) { + return instance.SetProperty("PagesInputPersec", (value)) +} + +// GetPagesInputPersec gets the value of PagesInputPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPagesInputPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesInputPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesOutputPersec sets the value of PagesOutputPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPagesOutputPersec(value uint32) (err error) { + return instance.SetProperty("PagesOutputPersec", (value)) +} + +// GetPagesOutputPersec gets the value of PagesOutputPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPagesOutputPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesOutputPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesPersec sets the value of PagesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPagesPersec(value uint32) (err error) { + return instance.SetProperty("PagesPersec", (value)) +} + +// GetPagesPersec gets the value of PagesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageWritesPersec sets the value of PageWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPageWritesPersec(value uint32) (err error) { + return instance.SetProperty("PageWritesPersec", (value)) +} + +// GetPageWritesPersec gets the value of PageWritesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPageWritesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageWritesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCommittedBytesInUse sets the value of PercentCommittedBytesInUse for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPercentCommittedBytesInUse(value uint32) (err error) { + return instance.SetProperty("PercentCommittedBytesInUse", (value)) +} + +// GetPercentCommittedBytesInUse gets the value of PercentCommittedBytesInUse for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPercentCommittedBytesInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCommittedBytesInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCommittedBytesInUse_Base sets the value of PercentCommittedBytesInUse_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPercentCommittedBytesInUse_Base(value uint32) (err error) { + return instance.SetProperty("PercentCommittedBytesInUse_Base", (value)) +} + +// GetPercentCommittedBytesInUse_Base gets the value of PercentCommittedBytesInUse_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPercentCommittedBytesInUse_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCommittedBytesInUse_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedAllocs sets the value of PoolNonpagedAllocs for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPoolNonpagedAllocs(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedAllocs", (value)) +} + +// GetPoolNonpagedAllocs gets the value of PoolNonpagedAllocs for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPoolNonpagedAllocs() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedAllocs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPoolNonpagedBytes(value uint64) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPoolNonpagedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolPagedAllocs sets the value of PoolPagedAllocs for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPoolPagedAllocs(value uint32) (err error) { + return instance.SetProperty("PoolPagedAllocs", (value)) +} + +// GetPoolPagedAllocs gets the value of PoolPagedAllocs for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPoolPagedAllocs() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedAllocs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPoolPagedBytes(value uint64) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPoolPagedBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolPagedResidentBytes sets the value of PoolPagedResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyPoolPagedResidentBytes(value uint64) (err error) { + return instance.SetProperty("PoolPagedResidentBytes", (value)) +} + +// GetPoolPagedResidentBytes gets the value of PoolPagedResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyPoolPagedResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PoolPagedResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStandbyCacheCoreBytes sets the value of StandbyCacheCoreBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyStandbyCacheCoreBytes(value uint64) (err error) { + return instance.SetProperty("StandbyCacheCoreBytes", (value)) +} + +// GetStandbyCacheCoreBytes gets the value of StandbyCacheCoreBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyStandbyCacheCoreBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("StandbyCacheCoreBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStandbyCacheNormalPriorityBytes sets the value of StandbyCacheNormalPriorityBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyStandbyCacheNormalPriorityBytes(value uint64) (err error) { + return instance.SetProperty("StandbyCacheNormalPriorityBytes", (value)) +} + +// GetStandbyCacheNormalPriorityBytes gets the value of StandbyCacheNormalPriorityBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyStandbyCacheNormalPriorityBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("StandbyCacheNormalPriorityBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStandbyCacheReserveBytes sets the value of StandbyCacheReserveBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyStandbyCacheReserveBytes(value uint64) (err error) { + return instance.SetProperty("StandbyCacheReserveBytes", (value)) +} + +// GetStandbyCacheReserveBytes gets the value of StandbyCacheReserveBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyStandbyCacheReserveBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("StandbyCacheReserveBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCacheResidentBytes sets the value of SystemCacheResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertySystemCacheResidentBytes(value uint64) (err error) { + return instance.SetProperty("SystemCacheResidentBytes", (value)) +} + +// GetSystemCacheResidentBytes gets the value of SystemCacheResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertySystemCacheResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemCacheResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCodeResidentBytes sets the value of SystemCodeResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertySystemCodeResidentBytes(value uint64) (err error) { + return instance.SetProperty("SystemCodeResidentBytes", (value)) +} + +// GetSystemCodeResidentBytes gets the value of SystemCodeResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertySystemCodeResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemCodeResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemCodeTotalBytes sets the value of SystemCodeTotalBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertySystemCodeTotalBytes(value uint64) (err error) { + return instance.SetProperty("SystemCodeTotalBytes", (value)) +} + +// GetSystemCodeTotalBytes gets the value of SystemCodeTotalBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertySystemCodeTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemCodeTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemDriverResidentBytes sets the value of SystemDriverResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertySystemDriverResidentBytes(value uint64) (err error) { + return instance.SetProperty("SystemDriverResidentBytes", (value)) +} + +// GetSystemDriverResidentBytes gets the value of SystemDriverResidentBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertySystemDriverResidentBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemDriverResidentBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemDriverTotalBytes sets the value of SystemDriverTotalBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertySystemDriverTotalBytes(value uint64) (err error) { + return instance.SetProperty("SystemDriverTotalBytes", (value)) +} + +// GetSystemDriverTotalBytes gets the value of SystemDriverTotalBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertySystemDriverTotalBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemDriverTotalBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransitionFaultsPersec sets the value of TransitionFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyTransitionFaultsPersec(value uint32) (err error) { + return instance.SetProperty("TransitionFaultsPersec", (value)) +} + +// GetTransitionFaultsPersec gets the value of TransitionFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyTransitionFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransitionFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransitionPagesRePurposedPersec sets the value of TransitionPagesRePurposedPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyTransitionPagesRePurposedPersec(value uint32) (err error) { + return instance.SetProperty("TransitionPagesRePurposedPersec", (value)) +} + +// GetTransitionPagesRePurposedPersec gets the value of TransitionPagesRePurposedPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyTransitionPagesRePurposedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransitionPagesRePurposedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteCopiesPersec sets the value of WriteCopiesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) SetPropertyWriteCopiesPersec(value uint32) (err error) { + return instance.SetProperty("WriteCopiesPersec", (value)) +} + +// GetWriteCopiesPersec gets the value of WriteCopiesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Memory) GetPropertyWriteCopiesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteCopiesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_NUMANodeMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_NUMANodeMemory.go new file mode 100644 index 00000000..563c1cd8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_NUMANodeMemory.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_NUMANodeMemory struct +type Win32_PerfRawData_PerfOS_NUMANodeMemory struct { + *Win32_PerfRawData + + // + FreeAndZeroPageListMBytes uint32 + + // + TotalMBytes uint32 +} + +func NewWin32_PerfRawData_PerfOS_NUMANodeMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_NUMANodeMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_NUMANodeMemory{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_NUMANodeMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_NUMANodeMemory, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_NUMANodeMemory{ + Win32_PerfRawData: tmp, + } + return +} + +// SetFreeAndZeroPageListMBytes sets the value of FreeAndZeroPageListMBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_NUMANodeMemory) SetPropertyFreeAndZeroPageListMBytes(value uint32) (err error) { + return instance.SetProperty("FreeAndZeroPageListMBytes", (value)) +} + +// GetFreeAndZeroPageListMBytes gets the value of FreeAndZeroPageListMBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_NUMANodeMemory) GetPropertyFreeAndZeroPageListMBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("FreeAndZeroPageListMBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalMBytes sets the value of TotalMBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_NUMANodeMemory) SetPropertyTotalMBytes(value uint32) (err error) { + return instance.SetProperty("TotalMBytes", (value)) +} + +// GetTotalMBytes gets the value of TotalMBytes for the instance +func (instance *Win32_PerfRawData_PerfOS_NUMANodeMemory) GetPropertyTotalMBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalMBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Objects.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Objects.go new file mode 100644 index 00000000..4714018d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Objects.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_Objects struct +type Win32_PerfRawData_PerfOS_Objects struct { + *Win32_PerfRawData + + // + Events uint32 + + // + Mutexes uint32 + + // + Processes uint32 + + // + Sections uint32 + + // + Semaphores uint32 + + // + Threads uint32 +} + +func NewWin32_PerfRawData_PerfOS_ObjectsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_Objects, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Objects{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_ObjectsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_Objects, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Objects{ + Win32_PerfRawData: tmp, + } + return +} + +// SetEvents sets the value of Events for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) SetPropertyEvents(value uint32) (err error) { + return instance.SetProperty("Events", (value)) +} + +// GetEvents gets the value of Events for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) GetPropertyEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("Events") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMutexes sets the value of Mutexes for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) SetPropertyMutexes(value uint32) (err error) { + return instance.SetProperty("Mutexes", (value)) +} + +// GetMutexes gets the value of Mutexes for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) GetPropertyMutexes() (value uint32, err error) { + retValue, err := instance.GetProperty("Mutexes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcesses sets the value of Processes for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) SetPropertyProcesses(value uint32) (err error) { + return instance.SetProperty("Processes", (value)) +} + +// GetProcesses gets the value of Processes for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) GetPropertyProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("Processes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSections sets the value of Sections for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) SetPropertySections(value uint32) (err error) { + return instance.SetProperty("Sections", (value)) +} + +// GetSections gets the value of Sections for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) GetPropertySections() (value uint32, err error) { + retValue, err := instance.GetProperty("Sections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSemaphores sets the value of Semaphores for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) SetPropertySemaphores(value uint32) (err error) { + return instance.SetProperty("Semaphores", (value)) +} + +// GetSemaphores gets the value of Semaphores for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) GetPropertySemaphores() (value uint32, err error) { + retValue, err := instance.GetProperty("Semaphores") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreads sets the value of Threads for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) SetPropertyThreads(value uint32) (err error) { + return instance.SetProperty("Threads", (value)) +} + +// GetThreads gets the value of Threads for the instance +func (instance *Win32_PerfRawData_PerfOS_Objects) GetPropertyThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Threads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_PagingFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_PagingFile.go new file mode 100644 index 00000000..26530005 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_PagingFile.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_PagingFile struct +type Win32_PerfRawData_PerfOS_PagingFile struct { + *Win32_PerfRawData + + // + PercentUsage uint32 + + // + PercentUsage_Base uint32 + + // + PercentUsagePeak uint32 + + // + PercentUsagePeak_Base uint32 +} + +func NewWin32_PerfRawData_PerfOS_PagingFileEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_PagingFile, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_PagingFile{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_PagingFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_PagingFile, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_PagingFile{ + Win32_PerfRawData: tmp, + } + return +} + +// SetPercentUsage sets the value of PercentUsage for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) SetPropertyPercentUsage(value uint32) (err error) { + return instance.SetProperty("PercentUsage", (value)) +} + +// GetPercentUsage gets the value of PercentUsage for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) GetPropertyPercentUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentUsage_Base sets the value of PercentUsage_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) SetPropertyPercentUsage_Base(value uint32) (err error) { + return instance.SetProperty("PercentUsage_Base", (value)) +} + +// GetPercentUsage_Base gets the value of PercentUsage_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) GetPropertyPercentUsage_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentUsage_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentUsagePeak sets the value of PercentUsagePeak for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) SetPropertyPercentUsagePeak(value uint32) (err error) { + return instance.SetProperty("PercentUsagePeak", (value)) +} + +// GetPercentUsagePeak gets the value of PercentUsagePeak for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) GetPropertyPercentUsagePeak() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentUsagePeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentUsagePeak_Base sets the value of PercentUsagePeak_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) SetPropertyPercentUsagePeak_Base(value uint32) (err error) { + return instance.SetProperty("PercentUsagePeak_Base", (value)) +} + +// GetPercentUsagePeak_Base gets the value of PercentUsagePeak_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_PagingFile) GetPropertyPercentUsagePeak_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentUsagePeak_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Processor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Processor.go new file mode 100644 index 00000000..95140d73 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_Processor.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_Processor struct +type Win32_PerfRawData_PerfOS_Processor struct { + *Win32_PerfRawData + + // + C1TransitionsPersec uint64 + + // + C2TransitionsPersec uint64 + + // + C3TransitionsPersec uint64 + + // + DPCRate uint32 + + // + DPCsQueuedPersec uint32 + + // + InterruptsPersec uint32 + + // + PercentC1Time uint64 + + // + PercentC2Time uint64 + + // + PercentC3Time uint64 + + // + PercentDPCTime uint64 + + // + PercentIdleTime uint64 + + // + PercentInterruptTime uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 +} + +func NewWin32_PerfRawData_PerfOS_ProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_Processor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Processor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_ProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_Processor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_Processor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetC1TransitionsPersec sets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyC1TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C1TransitionsPersec", (value)) +} + +// GetC1TransitionsPersec gets the value of C1TransitionsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyC1TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C1TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC2TransitionsPersec sets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyC2TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C2TransitionsPersec", (value)) +} + +// GetC2TransitionsPersec gets the value of C2TransitionsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyC2TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C2TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetC3TransitionsPersec sets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyC3TransitionsPersec(value uint64) (err error) { + return instance.SetProperty("C3TransitionsPersec", (value)) +} + +// GetC3TransitionsPersec gets the value of C3TransitionsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyC3TransitionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("C3TransitionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDPCRate sets the value of DPCRate for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyDPCRate(value uint32) (err error) { + return instance.SetProperty("DPCRate", (value)) +} + +// GetDPCRate gets the value of DPCRate for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyDPCRate() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDPCsQueuedPersec sets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyDPCsQueuedPersec(value uint32) (err error) { + return instance.SetProperty("DPCsQueuedPersec", (value)) +} + +// GetDPCsQueuedPersec gets the value of DPCsQueuedPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyDPCsQueuedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DPCsQueuedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterruptsPersec sets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyInterruptsPersec(value uint32) (err error) { + return instance.SetProperty("InterruptsPersec", (value)) +} + +// GetInterruptsPersec gets the value of InterruptsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyInterruptsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentC1Time sets the value of PercentC1Time for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentC1Time(value uint64) (err error) { + return instance.SetProperty("PercentC1Time", (value)) +} + +// GetPercentC1Time gets the value of PercentC1Time for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentC1Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC1Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC2Time sets the value of PercentC2Time for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentC2Time(value uint64) (err error) { + return instance.SetProperty("PercentC2Time", (value)) +} + +// GetPercentC2Time gets the value of PercentC2Time for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentC2Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC2Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentC3Time sets the value of PercentC3Time for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentC3Time(value uint64) (err error) { + return instance.SetProperty("PercentC3Time", (value)) +} + +// GetPercentC3Time gets the value of PercentC3Time for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentC3Time() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentC3Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentDPCTime sets the value of PercentDPCTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentDPCTime(value uint64) (err error) { + return instance.SetProperty("PercentDPCTime", (value)) +} + +// GetPercentDPCTime gets the value of PercentDPCTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentDPCTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentDPCTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentIdleTime sets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentIdleTime(value uint64) (err error) { + return instance.SetProperty("PercentIdleTime", (value)) +} + +// GetPercentIdleTime gets the value of PercentIdleTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentIdleTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentIdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentInterruptTime sets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentInterruptTime(value uint64) (err error) { + return instance.SetProperty("PercentInterruptTime", (value)) +} + +// GetPercentInterruptTime gets the value of PercentInterruptTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentInterruptTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentInterruptTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfOS_Processor) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_System.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_System.go new file mode 100644 index 00000000..48b0d088 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfOS_System.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfOS_System struct +type Win32_PerfRawData_PerfOS_System struct { + *Win32_PerfRawData + + // + AlignmentFixupsPersec uint32 + + // + ContextSwitchesPersec uint32 + + // + ExceptionDispatchesPersec uint32 + + // + FileControlBytesPersec uint64 + + // + FileControlOperationsPersec uint32 + + // + FileDataOperationsPersec uint32 + + // + FileReadBytesPersec uint64 + + // + FileReadOperationsPersec uint32 + + // + FileWriteBytesPersec uint64 + + // + FileWriteOperationsPersec uint32 + + // + FloatingEmulationsPersec uint32 + + // + PercentRegistryQuotaInUse uint32 + + // + PercentRegistryQuotaInUse_Base uint32 + + // + Processes uint32 + + // + ProcessorQueueLength uint32 + + // + SystemCallsPersec uint32 + + // + SystemUpTime uint64 + + // + Threads uint32 +} + +func NewWin32_PerfRawData_PerfOS_SystemEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfOS_System, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_System{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfOS_SystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfOS_System, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfOS_System{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAlignmentFixupsPersec sets the value of AlignmentFixupsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyAlignmentFixupsPersec(value uint32) (err error) { + return instance.SetProperty("AlignmentFixupsPersec", (value)) +} + +// GetAlignmentFixupsPersec gets the value of AlignmentFixupsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyAlignmentFixupsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("AlignmentFixupsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContextSwitchesPersec sets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyContextSwitchesPersec(value uint32) (err error) { + return instance.SetProperty("ContextSwitchesPersec", (value)) +} + +// GetContextSwitchesPersec gets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyContextSwitchesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetExceptionDispatchesPersec sets the value of ExceptionDispatchesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyExceptionDispatchesPersec(value uint32) (err error) { + return instance.SetProperty("ExceptionDispatchesPersec", (value)) +} + +// GetExceptionDispatchesPersec gets the value of ExceptionDispatchesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyExceptionDispatchesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ExceptionDispatchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileControlBytesPersec sets the value of FileControlBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileControlBytesPersec(value uint64) (err error) { + return instance.SetProperty("FileControlBytesPersec", (value)) +} + +// GetFileControlBytesPersec gets the value of FileControlBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileControlBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FileControlBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileControlOperationsPersec sets the value of FileControlOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileControlOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileControlOperationsPersec", (value)) +} + +// GetFileControlOperationsPersec gets the value of FileControlOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileControlOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileControlOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileDataOperationsPersec sets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileDataOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileDataOperationsPersec", (value)) +} + +// GetFileDataOperationsPersec gets the value of FileDataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileDataOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileDataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileReadBytesPersec sets the value of FileReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("FileReadBytesPersec", (value)) +} + +// GetFileReadBytesPersec gets the value of FileReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FileReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileReadOperationsPersec sets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileReadOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileReadOperationsPersec", (value)) +} + +// GetFileReadOperationsPersec gets the value of FileReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileReadOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileWriteBytesPersec sets the value of FileWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("FileWriteBytesPersec", (value)) +} + +// GetFileWriteBytesPersec gets the value of FileWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("FileWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileWriteOperationsPersec sets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFileWriteOperationsPersec(value uint32) (err error) { + return instance.SetProperty("FileWriteOperationsPersec", (value)) +} + +// GetFileWriteOperationsPersec gets the value of FileWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFileWriteOperationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FileWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFloatingEmulationsPersec sets the value of FloatingEmulationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyFloatingEmulationsPersec(value uint32) (err error) { + return instance.SetProperty("FloatingEmulationsPersec", (value)) +} + +// GetFloatingEmulationsPersec gets the value of FloatingEmulationsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyFloatingEmulationsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FloatingEmulationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentRegistryQuotaInUse sets the value of PercentRegistryQuotaInUse for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyPercentRegistryQuotaInUse(value uint32) (err error) { + return instance.SetProperty("PercentRegistryQuotaInUse", (value)) +} + +// GetPercentRegistryQuotaInUse gets the value of PercentRegistryQuotaInUse for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyPercentRegistryQuotaInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentRegistryQuotaInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentRegistryQuotaInUse_Base sets the value of PercentRegistryQuotaInUse_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyPercentRegistryQuotaInUse_Base(value uint32) (err error) { + return instance.SetProperty("PercentRegistryQuotaInUse_Base", (value)) +} + +// GetPercentRegistryQuotaInUse_Base gets the value of PercentRegistryQuotaInUse_Base for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyPercentRegistryQuotaInUse_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentRegistryQuotaInUse_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcesses sets the value of Processes for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyProcesses(value uint32) (err error) { + return instance.SetProperty("Processes", (value)) +} + +// GetProcesses gets the value of Processes for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyProcesses() (value uint32, err error) { + retValue, err := instance.GetProperty("Processes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessorQueueLength sets the value of ProcessorQueueLength for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyProcessorQueueLength(value uint32) (err error) { + return instance.SetProperty("ProcessorQueueLength", (value)) +} + +// GetProcessorQueueLength gets the value of ProcessorQueueLength for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyProcessorQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessorQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemCallsPersec sets the value of SystemCallsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertySystemCallsPersec(value uint32) (err error) { + return instance.SetProperty("SystemCallsPersec", (value)) +} + +// GetSystemCallsPersec gets the value of SystemCallsPersec for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertySystemCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemUpTime sets the value of SystemUpTime for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertySystemUpTime(value uint64) (err error) { + return instance.SetProperty("SystemUpTime", (value)) +} + +// GetSystemUpTime gets the value of SystemUpTime for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertySystemUpTime() (value uint64, err error) { + retValue, err := instance.GetProperty("SystemUpTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreads sets the value of Threads for the instance +func (instance *Win32_PerfRawData_PerfOS_System) SetPropertyThreads(value uint32) (err error) { + return instance.SetProperty("Threads", (value)) +} + +// GetThreads gets the value of Threads for the instance +func (instance *Win32_PerfRawData_PerfOS_System) GetPropertyThreads() (value uint32, err error) { + retValue, err := instance.GetProperty("Threads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObject.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObject.go new file mode 100644 index 00000000..4de91496 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObject.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfProc_JobObject struct +type Win32_PerfRawData_PerfProc_JobObject struct { + *Win32_PerfRawData + + // + CurrentPercentKernelModeTime uint64 + + // + CurrentPercentProcessorTime uint64 + + // + CurrentPercentUserModeTime uint64 + + // + PagesPerSec uint32 + + // + ProcessCountActive uint32 + + // + ProcessCountTerminated uint32 + + // + ProcessCountTotal uint32 + + // + ThisPeriodmSecKernelMode uint64 + + // + ThisPeriodmSecProcessor uint64 + + // + ThisPeriodmSecUserMode uint64 + + // + TotalmSecKernelMode uint64 + + // + TotalmSecProcessor uint64 + + // + TotalmSecUserMode uint64 +} + +func NewWin32_PerfRawData_PerfProc_JobObjectEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfProc_JobObject, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_JobObject{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfProc_JobObjectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfProc_JobObject, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_JobObject{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCurrentPercentKernelModeTime sets the value of CurrentPercentKernelModeTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyCurrentPercentKernelModeTime(value uint64) (err error) { + return instance.SetProperty("CurrentPercentKernelModeTime", (value)) +} + +// GetCurrentPercentKernelModeTime gets the value of CurrentPercentKernelModeTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyCurrentPercentKernelModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPercentKernelModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPercentProcessorTime sets the value of CurrentPercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyCurrentPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("CurrentPercentProcessorTime", (value)) +} + +// GetCurrentPercentProcessorTime gets the value of CurrentPercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyCurrentPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentPercentUserModeTime sets the value of CurrentPercentUserModeTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyCurrentPercentUserModeTime(value uint64) (err error) { + return instance.SetProperty("CurrentPercentUserModeTime", (value)) +} + +// GetCurrentPercentUserModeTime gets the value of CurrentPercentUserModeTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyCurrentPercentUserModeTime() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentPercentUserModeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPagesPerSec sets the value of PagesPerSec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyPagesPerSec(value uint32) (err error) { + return instance.SetProperty("PagesPerSec", (value)) +} + +// GetPagesPerSec gets the value of PagesPerSec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyPagesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCountActive sets the value of ProcessCountActive for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyProcessCountActive(value uint32) (err error) { + return instance.SetProperty("ProcessCountActive", (value)) +} + +// GetProcessCountActive gets the value of ProcessCountActive for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyProcessCountActive() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCountActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCountTerminated sets the value of ProcessCountTerminated for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyProcessCountTerminated(value uint32) (err error) { + return instance.SetProperty("ProcessCountTerminated", (value)) +} + +// GetProcessCountTerminated gets the value of ProcessCountTerminated for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyProcessCountTerminated() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCountTerminated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessCountTotal sets the value of ProcessCountTotal for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyProcessCountTotal(value uint32) (err error) { + return instance.SetProperty("ProcessCountTotal", (value)) +} + +// GetProcessCountTotal gets the value of ProcessCountTotal for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyProcessCountTotal() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessCountTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThisPeriodmSecKernelMode sets the value of ThisPeriodmSecKernelMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyThisPeriodmSecKernelMode(value uint64) (err error) { + return instance.SetProperty("ThisPeriodmSecKernelMode", (value)) +} + +// GetThisPeriodmSecKernelMode gets the value of ThisPeriodmSecKernelMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyThisPeriodmSecKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodmSecKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThisPeriodmSecProcessor sets the value of ThisPeriodmSecProcessor for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyThisPeriodmSecProcessor(value uint64) (err error) { + return instance.SetProperty("ThisPeriodmSecProcessor", (value)) +} + +// GetThisPeriodmSecProcessor gets the value of ThisPeriodmSecProcessor for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyThisPeriodmSecProcessor() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodmSecProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThisPeriodmSecUserMode sets the value of ThisPeriodmSecUserMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyThisPeriodmSecUserMode(value uint64) (err error) { + return instance.SetProperty("ThisPeriodmSecUserMode", (value)) +} + +// GetThisPeriodmSecUserMode gets the value of ThisPeriodmSecUserMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyThisPeriodmSecUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("ThisPeriodmSecUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalmSecKernelMode sets the value of TotalmSecKernelMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyTotalmSecKernelMode(value uint64) (err error) { + return instance.SetProperty("TotalmSecKernelMode", (value)) +} + +// GetTotalmSecKernelMode gets the value of TotalmSecKernelMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyTotalmSecKernelMode() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalmSecKernelMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalmSecProcessor sets the value of TotalmSecProcessor for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyTotalmSecProcessor(value uint64) (err error) { + return instance.SetProperty("TotalmSecProcessor", (value)) +} + +// GetTotalmSecProcessor gets the value of TotalmSecProcessor for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyTotalmSecProcessor() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalmSecProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalmSecUserMode sets the value of TotalmSecUserMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) SetPropertyTotalmSecUserMode(value uint64) (err error) { + return instance.SetProperty("TotalmSecUserMode", (value)) +} + +// GetTotalmSecUserMode gets the value of TotalmSecUserMode for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObject) GetPropertyTotalmSecUserMode() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalmSecUserMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObjectDetails.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObjectDetails.go new file mode 100644 index 00000000..db4dde72 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_JobObjectDetails.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfProc_JobObjectDetails struct +type Win32_PerfRawData_PerfProc_JobObjectDetails struct { + *Win32_PerfRawData + + // + CreatingProcessID uint64 + + // + ElapsedTime uint64 + + // + HandleCount uint32 + + // + IDProcess uint64 + + // + IODataBytesPersec uint64 + + // + IODataOperationsPersec uint64 + + // + IOOtherBytesPersec uint64 + + // + IOOtherOperationsPersec uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadOperationsPersec uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteOperationsPersec uint64 + + // + PageFaultsPersec uint32 + + // + PageFileBytes uint64 + + // + PageFileBytesPeak uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PoolNonpagedBytes uint32 + + // + PoolPagedBytes uint32 + + // + PriorityBase uint32 + + // + PrivateBytes uint64 + + // + ThreadCount uint32 + + // + VirtualBytes uint64 + + // + VirtualBytesPeak uint64 + + // + WorkingSet uint64 + + // + WorkingSetPeak uint64 +} + +func NewWin32_PerfRawData_PerfProc_JobObjectDetailsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfProc_JobObjectDetails, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_JobObjectDetails{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfProc_JobObjectDetailsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfProc_JobObjectDetails, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_JobObjectDetails{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCreatingProcessID sets the value of CreatingProcessID for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyCreatingProcessID(value uint64) (err error) { + return instance.SetProperty("CreatingProcessID", (value)) +} + +// GetCreatingProcessID gets the value of CreatingProcessID for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyCreatingProcessID() (value uint64, err error) { + retValue, err := instance.GetProperty("CreatingProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIDProcess sets the value of IDProcess for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIDProcess(value uint64) (err error) { + return instance.SetProperty("IDProcess", (value)) +} + +// GetIDProcess gets the value of IDProcess for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIDProcess() (value uint64, err error) { + retValue, err := instance.GetProperty("IDProcess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODataBytesPersec sets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIODataBytesPersec(value uint64) (err error) { + return instance.SetProperty("IODataBytesPersec", (value)) +} + +// GetIODataBytesPersec gets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIODataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODataOperationsPersec sets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIODataOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IODataOperationsPersec", (value)) +} + +// GetIODataOperationsPersec gets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIODataOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherBytesPersec sets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIOOtherBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherBytesPersec", (value)) +} + +// GetIOOtherBytesPersec gets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIOOtherBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherOperationsPersec sets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIOOtherOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherOperationsPersec", (value)) +} + +// GetIOOtherOperationsPersec gets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIOOtherOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadOperationsPersec sets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIOReadOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadOperationsPersec", (value)) +} + +// GetIOReadOperationsPersec gets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIOReadOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteOperationsPersec sets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyIOWriteOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteOperationsPersec", (value)) +} + +// GetIOWriteOperationsPersec gets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyIOWriteOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileBytes sets the value of PageFileBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPageFileBytes(value uint64) (err error) { + return instance.SetProperty("PageFileBytes", (value)) +} + +// GetPageFileBytes gets the value of PageFileBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPageFileBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileBytesPeak sets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPageFileBytesPeak(value uint64) (err error) { + return instance.SetProperty("PageFileBytesPeak", (value)) +} + +// GetPageFileBytesPeak gets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPageFileBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivateBytes sets the value of PrivateBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyPrivateBytes(value uint64) (err error) { + return instance.SetProperty("PrivateBytes", (value)) +} + +// GetPrivateBytes gets the value of PrivateBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyPrivateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualBytes sets the value of VirtualBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyVirtualBytes(value uint64) (err error) { + return instance.SetProperty("VirtualBytes", (value)) +} + +// GetVirtualBytes gets the value of VirtualBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyVirtualBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualBytesPeak sets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyVirtualBytesPeak(value uint64) (err error) { + return instance.SetProperty("VirtualBytesPeak", (value)) +} + +// GetVirtualBytesPeak gets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyVirtualBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSet sets the value of WorkingSet for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyWorkingSet(value uint64) (err error) { + return instance.SetProperty("WorkingSet", (value)) +} + +// GetWorkingSet gets the value of WorkingSet for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyWorkingSet() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPeak sets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) SetPropertyWorkingSetPeak(value uint64) (err error) { + return instance.SetProperty("WorkingSetPeak", (value)) +} + +// GetWorkingSetPeak gets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_JobObjectDetails) GetPropertyWorkingSetPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Process.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Process.go new file mode 100644 index 00000000..edabf249 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Process.go @@ -0,0 +1,890 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfProc_Process struct +type Win32_PerfRawData_PerfProc_Process struct { + *Win32_PerfRawData + + // + CreatingProcessID uint32 + + // + ElapsedTime uint64 + + // + HandleCount uint32 + + // + IDProcess uint32 + + // + IODataBytesPersec uint64 + + // + IODataOperationsPersec uint64 + + // + IOOtherBytesPersec uint64 + + // + IOOtherOperationsPersec uint64 + + // + IOReadBytesPersec uint64 + + // + IOReadOperationsPersec uint64 + + // + IOWriteBytesPersec uint64 + + // + IOWriteOperationsPersec uint64 + + // + PageFaultsPersec uint32 + + // + PageFileBytes uint64 + + // + PageFileBytesPeak uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PoolNonpagedBytes uint32 + + // + PoolPagedBytes uint32 + + // + PriorityBase uint32 + + // + PrivateBytes uint64 + + // + ThreadCount uint32 + + // + VirtualBytes uint64 + + // + VirtualBytesPeak uint64 + + // + WorkingSet uint64 + + // + WorkingSetPeak uint64 + + // + WorkingSetPrivate uint64 +} + +func NewWin32_PerfRawData_PerfProc_ProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfProc_Process, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_Process{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfProc_ProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfProc_Process, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_Process{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCreatingProcessID sets the value of CreatingProcessID for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyCreatingProcessID(value uint32) (err error) { + return instance.SetProperty("CreatingProcessID", (value)) +} + +// GetCreatingProcessID gets the value of CreatingProcessID for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyCreatingProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("CreatingProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIDProcess sets the value of IDProcess for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIDProcess(value uint32) (err error) { + return instance.SetProperty("IDProcess", (value)) +} + +// GetIDProcess gets the value of IDProcess for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIDProcess() (value uint32, err error) { + retValue, err := instance.GetProperty("IDProcess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIODataBytesPersec sets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIODataBytesPersec(value uint64) (err error) { + return instance.SetProperty("IODataBytesPersec", (value)) +} + +// GetIODataBytesPersec gets the value of IODataBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIODataBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIODataOperationsPersec sets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIODataOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IODataOperationsPersec", (value)) +} + +// GetIODataOperationsPersec gets the value of IODataOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIODataOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IODataOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherBytesPersec sets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIOOtherBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherBytesPersec", (value)) +} + +// GetIOOtherBytesPersec gets the value of IOOtherBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIOOtherBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOOtherOperationsPersec sets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIOOtherOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOOtherOperationsPersec", (value)) +} + +// GetIOOtherOperationsPersec gets the value of IOOtherOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIOOtherOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOOtherOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadBytesPersec sets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIOReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOReadBytesPersec", (value)) +} + +// GetIOReadBytesPersec gets the value of IOReadBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIOReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOReadOperationsPersec sets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIOReadOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOReadOperationsPersec", (value)) +} + +// GetIOReadOperationsPersec gets the value of IOReadOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIOReadOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOReadOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteBytesPersec sets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIOWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteBytesPersec", (value)) +} + +// GetIOWriteBytesPersec gets the value of IOWriteBytesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIOWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOWriteOperationsPersec sets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyIOWriteOperationsPersec(value uint64) (err error) { + return instance.SetProperty("IOWriteOperationsPersec", (value)) +} + +// GetIOWriteOperationsPersec gets the value of IOWriteOperationsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyIOWriteOperationsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("IOWriteOperationsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileBytes sets the value of PageFileBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPageFileBytes(value uint64) (err error) { + return instance.SetProperty("PageFileBytes", (value)) +} + +// GetPageFileBytes gets the value of PageFileBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPageFileBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileBytesPeak sets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPageFileBytesPeak(value uint64) (err error) { + return instance.SetProperty("PageFileBytesPeak", (value)) +} + +// GetPageFileBytesPeak gets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPageFileBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivateBytes sets the value of PrivateBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyPrivateBytes(value uint64) (err error) { + return instance.SetProperty("PrivateBytes", (value)) +} + +// GetPrivateBytes gets the value of PrivateBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyPrivateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualBytes sets the value of VirtualBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyVirtualBytes(value uint64) (err error) { + return instance.SetProperty("VirtualBytes", (value)) +} + +// GetVirtualBytes gets the value of VirtualBytes for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyVirtualBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualBytesPeak sets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyVirtualBytesPeak(value uint64) (err error) { + return instance.SetProperty("VirtualBytesPeak", (value)) +} + +// GetVirtualBytesPeak gets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyVirtualBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSet sets the value of WorkingSet for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyWorkingSet(value uint64) (err error) { + return instance.SetProperty("WorkingSet", (value)) +} + +// GetWorkingSet gets the value of WorkingSet for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyWorkingSet() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPeak sets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyWorkingSetPeak(value uint64) (err error) { + return instance.SetProperty("WorkingSetPeak", (value)) +} + +// GetWorkingSetPeak gets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyWorkingSetPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPrivate sets the value of WorkingSetPrivate for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) SetPropertyWorkingSetPrivate(value uint64) (err error) { + return instance.SetProperty("WorkingSetPrivate", (value)) +} + +// GetWorkingSetPrivate gets the value of WorkingSetPrivate for the instance +func (instance *Win32_PerfRawData_PerfProc_Process) GetPropertyWorkingSetPrivate() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPrivate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Thread.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Thread.go new file mode 100644 index 00000000..ec28eed9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PerfProc_Thread.go @@ -0,0 +1,410 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PerfProc_Thread struct +type Win32_PerfRawData_PerfProc_Thread struct { + *Win32_PerfRawData + + // + ContextSwitchesPersec uint32 + + // + ElapsedTime uint64 + + // + IDProcess uint32 + + // + IDThread uint32 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PriorityBase uint32 + + // + PriorityCurrent uint32 + + // + StartAddress uint32 + + // + ThreadState uint32 + + // + ThreadWaitReason uint32 +} + +func NewWin32_PerfRawData_PerfProc_ThreadEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PerfProc_Thread, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_Thread{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PerfProc_ThreadEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PerfProc_Thread, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PerfProc_Thread{ + Win32_PerfRawData: tmp, + } + return +} + +// SetContextSwitchesPersec sets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyContextSwitchesPersec(value uint32) (err error) { + return instance.SetProperty("ContextSwitchesPersec", (value)) +} + +// GetContextSwitchesPersec gets the value of ContextSwitchesPersec for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyContextSwitchesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ContextSwitchesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIDProcess sets the value of IDProcess for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyIDProcess(value uint32) (err error) { + return instance.SetProperty("IDProcess", (value)) +} + +// GetIDProcess gets the value of IDProcess for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyIDProcess() (value uint32, err error) { + retValue, err := instance.GetProperty("IDProcess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIDThread sets the value of IDThread for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyIDThread(value uint32) (err error) { + return instance.SetProperty("IDThread", (value)) +} + +// GetIDThread gets the value of IDThread for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyIDThread() (value uint32, err error) { + retValue, err := instance.GetProperty("IDThread") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityCurrent sets the value of PriorityCurrent for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyPriorityCurrent(value uint32) (err error) { + return instance.SetProperty("PriorityCurrent", (value)) +} + +// GetPriorityCurrent gets the value of PriorityCurrent for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyPriorityCurrent() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityCurrent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStartAddress sets the value of StartAddress for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyStartAddress(value uint32) (err error) { + return instance.SetProperty("StartAddress", (value)) +} + +// GetStartAddress gets the value of StartAddress for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyStartAddress() (value uint32, err error) { + retValue, err := instance.GetProperty("StartAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadState sets the value of ThreadState for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyThreadState(value uint32) (err error) { + return instance.SetProperty("ThreadState", (value)) +} + +// GetThreadState gets the value of ThreadState for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyThreadState() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadWaitReason sets the value of ThreadWaitReason for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) SetPropertyThreadWaitReason(value uint32) (err error) { + return instance.SetProperty("ThreadWaitReason", (value)) +} + +// GetThreadWaitReason gets the value of ThreadWaitReason for the instance +func (instance *Win32_PerfRawData_PerfProc_Thread) GetPropertyThreadWaitReason() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadWaitReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_EnergyMeter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_EnergyMeter.go new file mode 100644 index 00000000..5278cba5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_EnergyMeter.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PowerMeterCounter_EnergyMeter struct +type Win32_PerfRawData_PowerMeterCounter_EnergyMeter struct { + *Win32_PerfRawData + + // + Energy uint64 + + // + Power uint64 + + // + Power_Base uint32 + + // + Time uint64 +} + +func NewWin32_PerfRawData_PowerMeterCounter_EnergyMeterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PowerMeterCounter_EnergyMeter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PowerMeterCounter_EnergyMeterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PowerMeterCounter_EnergyMeter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetEnergy sets the value of Energy for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) SetPropertyEnergy(value uint64) (err error) { + return instance.SetProperty("Energy", (value)) +} + +// GetEnergy gets the value of Energy for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) GetPropertyEnergy() (value uint64, err error) { + retValue, err := instance.GetProperty("Energy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPower sets the value of Power for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) SetPropertyPower(value uint64) (err error) { + return instance.SetProperty("Power", (value)) +} + +// GetPower gets the value of Power for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) GetPropertyPower() (value uint64, err error) { + retValue, err := instance.GetProperty("Power") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPower_Base sets the value of Power_Base for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) SetPropertyPower_Base(value uint32) (err error) { + return instance.SetProperty("Power_Base", (value)) +} + +// GetPower_Base gets the value of Power_Base for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) GetPropertyPower_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Power_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTime sets the value of Time for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) SetPropertyTime(value uint64) (err error) { + return instance.SetProperty("Time", (value)) +} + +// GetTime gets the value of Time for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_EnergyMeter) GetPropertyTime() (value uint64, err error) { + retValue, err := instance.GetProperty("Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_PowerMeter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_PowerMeter.go new file mode 100644 index 00000000..3d4efead --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_PowerMeterCounter_PowerMeter.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_PowerMeterCounter_PowerMeter struct +type Win32_PerfRawData_PowerMeterCounter_PowerMeter struct { + *Win32_PerfRawData + + // + Power uint32 + + // + PowerBudget uint32 +} + +func NewWin32_PerfRawData_PowerMeterCounter_PowerMeterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_PowerMeterCounter_PowerMeter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PowerMeterCounter_PowerMeter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_PowerMeterCounter_PowerMeterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_PowerMeterCounter_PowerMeter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_PowerMeterCounter_PowerMeter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetPower sets the value of Power for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_PowerMeter) SetPropertyPower(value uint32) (err error) { + return instance.SetProperty("Power", (value)) +} + +// GetPower gets the value of Power for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_PowerMeter) GetPropertyPower() (value uint32, err error) { + retValue, err := instance.GetProperty("Power") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerBudget sets the value of PowerBudget for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_PowerMeter) SetPropertyPowerBudget(value uint32) (err error) { + return instance.SetProperty("PowerBudget", (value)) +} + +// GetPowerBudget gets the value of PowerBudget for the instance +func (instance *Win32_PerfRawData_PowerMeterCounter_PowerMeter) GetPropertyPowerBudget() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerBudget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASPort.go new file mode 100644 index 00000000..2dbbc543 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASPort.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_RemoteAccess_RASPort struct +type Win32_PerfRawData_RemoteAccess_RASPort struct { + *Win32_PerfRawData + + // + AlignmentErrors uint32 + + // + BufferOverrunErrors uint32 + + // + BytesReceived uint64 + + // + BytesReceivedPerSec uint32 + + // + BytesTransmitted uint64 + + // + BytesTransmittedPerSec uint32 + + // + CRCErrors uint32 + + // + FramesReceived uint32 + + // + FramesReceivedPerSec uint32 + + // + FramesTransmitted uint32 + + // + FramesTransmittedPerSec uint32 + + // + PercentCompressionIn uint32 + + // + PercentCompressionOut uint32 + + // + SerialOverrunErrors uint32 + + // + TimeoutErrors uint32 + + // + TotalErrors uint32 + + // + TotalErrorsPerSec uint32 +} + +func NewWin32_PerfRawData_RemoteAccess_RASPortEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_RemoteAccess_RASPort, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemoteAccess_RASPort{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_RemoteAccess_RASPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_RemoteAccess_RASPort, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemoteAccess_RASPort{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAlignmentErrors sets the value of AlignmentErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyAlignmentErrors(value uint32) (err error) { + return instance.SetProperty("AlignmentErrors", (value)) +} + +// GetAlignmentErrors gets the value of AlignmentErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyAlignmentErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("AlignmentErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBufferOverrunErrors sets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyBufferOverrunErrors(value uint32) (err error) { + return instance.SetProperty("BufferOverrunErrors", (value)) +} + +// GetBufferOverrunErrors gets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyBufferOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPerSec sets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedPerSec", (value)) +} + +// GetBytesReceivedPerSec gets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPerSec sets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyBytesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesTransmittedPerSec", (value)) +} + +// GetBytesTransmittedPerSec gets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyBytesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCRCErrors sets the value of CRCErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyCRCErrors(value uint32) (err error) { + return instance.SetProperty("CRCErrors", (value)) +} + +// GetCRCErrors gets the value of CRCErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyCRCErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("CRCErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceived sets the value of FramesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyFramesReceived(value uint32) (err error) { + return instance.SetProperty("FramesReceived", (value)) +} + +// GetFramesReceived gets the value of FramesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyFramesReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceivedPerSec sets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyFramesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesReceivedPerSec", (value)) +} + +// GetFramesReceivedPerSec gets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyFramesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmitted sets the value of FramesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyFramesTransmitted(value uint32) (err error) { + return instance.SetProperty("FramesTransmitted", (value)) +} + +// GetFramesTransmitted gets the value of FramesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyFramesTransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmittedPerSec sets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyFramesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesTransmittedPerSec", (value)) +} + +// GetFramesTransmittedPerSec gets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyFramesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionIn sets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyPercentCompressionIn(value uint32) (err error) { + return instance.SetProperty("PercentCompressionIn", (value)) +} + +// GetPercentCompressionIn gets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyPercentCompressionIn() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionIn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionOut sets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyPercentCompressionOut(value uint32) (err error) { + return instance.SetProperty("PercentCompressionOut", (value)) +} + +// GetPercentCompressionOut gets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyPercentCompressionOut() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSerialOverrunErrors sets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertySerialOverrunErrors(value uint32) (err error) { + return instance.SetProperty("SerialOverrunErrors", (value)) +} + +// GetSerialOverrunErrors gets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertySerialOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("SerialOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeoutErrors sets the value of TimeoutErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyTimeoutErrors(value uint32) (err error) { + return instance.SetProperty("TimeoutErrors", (value)) +} + +// GetTimeoutErrors gets the value of TimeoutErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyTimeoutErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeoutErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrors sets the value of TotalErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyTotalErrors(value uint32) (err error) { + return instance.SetProperty("TotalErrors", (value)) +} + +// GetTotalErrors gets the value of TotalErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyTotalErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrorsPerSec sets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) SetPropertyTotalErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("TotalErrorsPerSec", (value)) +} + +// GetTotalErrorsPerSec gets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASPort) GetPropertyTotalErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASTotal.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASTotal.go new file mode 100644 index 00000000..053df035 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteAccess_RASTotal.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_RemoteAccess_RASTotal struct +type Win32_PerfRawData_RemoteAccess_RASTotal struct { + *Win32_PerfRawData + + // + AlignmentErrors uint32 + + // + BufferOverrunErrors uint32 + + // + BytesReceived uint64 + + // + BytesReceivedPerSec uint32 + + // + BytesTransmitted uint64 + + // + BytesTransmittedPerSec uint32 + + // + CRCErrors uint32 + + // + FramesReceived uint32 + + // + FramesReceivedPerSec uint32 + + // + FramesTransmitted uint32 + + // + FramesTransmittedPerSec uint32 + + // + PercentCompressionIn uint32 + + // + PercentCompressionOut uint32 + + // + SerialOverrunErrors uint32 + + // + TimeoutErrors uint32 + + // + TotalConnections uint32 + + // + TotalErrors uint32 + + // + TotalErrorsPerSec uint32 +} + +func NewWin32_PerfRawData_RemoteAccess_RASTotalEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_RemoteAccess_RASTotal, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemoteAccess_RASTotal{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_RemoteAccess_RASTotalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_RemoteAccess_RASTotal, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemoteAccess_RASTotal{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAlignmentErrors sets the value of AlignmentErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyAlignmentErrors(value uint32) (err error) { + return instance.SetProperty("AlignmentErrors", (value)) +} + +// GetAlignmentErrors gets the value of AlignmentErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyAlignmentErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("AlignmentErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBufferOverrunErrors sets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyBufferOverrunErrors(value uint32) (err error) { + return instance.SetProperty("BufferOverrunErrors", (value)) +} + +// GetBufferOverrunErrors gets the value of BufferOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyBufferOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesReceived sets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyBytesReceived(value uint64) (err error) { + return instance.SetProperty("BytesReceived", (value)) +} + +// GetBytesReceived gets the value of BytesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyBytesReceived() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesReceivedPerSec sets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyBytesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesReceivedPerSec", (value)) +} + +// GetBytesReceivedPerSec gets the value of BytesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyBytesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesTransmitted sets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyBytesTransmitted(value uint64) (err error) { + return instance.SetProperty("BytesTransmitted", (value)) +} + +// GetBytesTransmitted gets the value of BytesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyBytesTransmitted() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTransmittedPerSec sets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyBytesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("BytesTransmittedPerSec", (value)) +} + +// GetBytesTransmittedPerSec gets the value of BytesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyBytesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BytesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCRCErrors sets the value of CRCErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyCRCErrors(value uint32) (err error) { + return instance.SetProperty("CRCErrors", (value)) +} + +// GetCRCErrors gets the value of CRCErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyCRCErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("CRCErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceived sets the value of FramesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyFramesReceived(value uint32) (err error) { + return instance.SetProperty("FramesReceived", (value)) +} + +// GetFramesReceived gets the value of FramesReceived for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyFramesReceived() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesReceivedPerSec sets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyFramesReceivedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesReceivedPerSec", (value)) +} + +// GetFramesReceivedPerSec gets the value of FramesReceivedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyFramesReceivedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesReceivedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmitted sets the value of FramesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyFramesTransmitted(value uint32) (err error) { + return instance.SetProperty("FramesTransmitted", (value)) +} + +// GetFramesTransmitted gets the value of FramesTransmitted for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyFramesTransmitted() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFramesTransmittedPerSec sets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyFramesTransmittedPerSec(value uint32) (err error) { + return instance.SetProperty("FramesTransmittedPerSec", (value)) +} + +// GetFramesTransmittedPerSec gets the value of FramesTransmittedPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyFramesTransmittedPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("FramesTransmittedPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionIn sets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyPercentCompressionIn(value uint32) (err error) { + return instance.SetProperty("PercentCompressionIn", (value)) +} + +// GetPercentCompressionIn gets the value of PercentCompressionIn for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyPercentCompressionIn() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionIn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentCompressionOut sets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyPercentCompressionOut(value uint32) (err error) { + return instance.SetProperty("PercentCompressionOut", (value)) +} + +// GetPercentCompressionOut gets the value of PercentCompressionOut for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyPercentCompressionOut() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentCompressionOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSerialOverrunErrors sets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertySerialOverrunErrors(value uint32) (err error) { + return instance.SetProperty("SerialOverrunErrors", (value)) +} + +// GetSerialOverrunErrors gets the value of SerialOverrunErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertySerialOverrunErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("SerialOverrunErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeoutErrors sets the value of TimeoutErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyTimeoutErrors(value uint32) (err error) { + return instance.SetProperty("TimeoutErrors", (value)) +} + +// GetTimeoutErrors gets the value of TimeoutErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyTimeoutErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeoutErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalConnections sets the value of TotalConnections for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyTotalConnections(value uint32) (err error) { + return instance.SetProperty("TotalConnections", (value)) +} + +// GetTotalConnections gets the value of TotalConnections for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyTotalConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrors sets the value of TotalErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyTotalErrors(value uint32) (err error) { + return instance.SetProperty("TotalErrors", (value)) +} + +// GetTotalErrors gets the value of TotalErrors for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyTotalErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalErrorsPerSec sets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) SetPropertyTotalErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("TotalErrorsPerSec", (value)) +} + +// GetTotalErrorsPerSec gets the value of TotalErrorsPerSec for the instance +func (instance *Win32_PerfRawData_RemoteAccess_RASTotal) GetPropertyTotalErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go new file mode 100644 index 00000000..c61c6013 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset struct +type Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset struct { + *Win32_PerfRawData + + // + Connectiontime uint64 + + // + Contextacquisitionwaittime uint64 + + // + RPCContext uint64 + + // + ThreadswaitingforRPCContext uint64 +} + +func NewWin32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCountersetEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCountersetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset{ + Win32_PerfRawData: tmp, + } + return +} + +// SetConnectiontime sets the value of Connectiontime for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyConnectiontime(value uint64) (err error) { + return instance.SetProperty("Connectiontime", (value)) +} + +// GetConnectiontime gets the value of Connectiontime for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyConnectiontime() (value uint64, err error) { + retValue, err := instance.GetProperty("Connectiontime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetContextacquisitionwaittime sets the value of Contextacquisitionwaittime for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyContextacquisitionwaittime(value uint64) (err error) { + return instance.SetProperty("Contextacquisitionwaittime", (value)) +} + +// GetContextacquisitionwaittime gets the value of Contextacquisitionwaittime for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyContextacquisitionwaittime() (value uint64, err error) { + retValue, err := instance.GetProperty("Contextacquisitionwaittime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRPCContext sets the value of RPCContext for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyRPCContext(value uint64) (err error) { + return instance.SetProperty("RPCContext", (value)) +} + +// GetRPCContext gets the value of RPCContext for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyRPCContext() (value uint64, err error) { + retValue, err := instance.GetProperty("RPCContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadswaitingforRPCContext sets the value of ThreadswaitingforRPCContext for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) SetPropertyThreadswaitingforRPCContext(value uint64) (err error) { + return instance.SetProperty("ThreadswaitingforRPCContext", (value)) +} + +// GetThreadswaitingforRPCContext gets the value of ThreadswaitingforRPCContext for the instance +func (instance *Win32_PerfRawData_RemoteDesktopConnectionBrokerRedirectorPerformanceCounterProvider_RemoteDesktopConnectionBrokerRedirectorCounterset) GetPropertyThreadswaitingforRPCContext() (value uint64, err error) { + retValue, err := instance.GetProperty("ThreadswaitingforRPCContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting.go new file mode 100644 index 00000000..9b879e5a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting struct +type Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting struct { + *Win32_PerfRawData + + // + ConnectedClients uint32 + + // + UpdatedPixelsPersec uint32 +} + +func NewWin32_PerfRawData_RemotePerfProvider_HyperVVMRemotingEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_RemotePerfProvider_HyperVVMRemotingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting{ + Win32_PerfRawData: tmp, + } + return +} + +// SetConnectedClients sets the value of ConnectedClients for the instance +func (instance *Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting) SetPropertyConnectedClients(value uint32) (err error) { + return instance.SetProperty("ConnectedClients", (value)) +} + +// GetConnectedClients gets the value of ConnectedClients for the instance +func (instance *Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting) GetPropertyConnectedClients() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectedClients") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUpdatedPixelsPersec sets the value of UpdatedPixelsPersec for the instance +func (instance *Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting) SetPropertyUpdatedPixelsPersec(value uint32) (err error) { + return instance.SetProperty("UpdatedPixelsPersec", (value)) +} + +// GetUpdatedPixelsPersec gets the value of UpdatedPixelsPersec for the instance +func (instance *Win32_PerfRawData_RemotePerfProvider_HyperVVMRemoting) GetPropertyUpdatedPixelsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("UpdatedPixelsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter.go new file mode 100644 index 00000000..790bbacd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter struct +type Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter struct { + *Win32_PerfRawData + + // + CancelledHandleCount uint64 + + // + CurrentActiveHandleCount uint64 + + // + CurrentInactiveHandleCount uint64 + + // + FSFailedResumeHandleCount uint64 + + // + ReplayedHandleCount uint64 + + // + ResumedHandleCount uint64 + + // + RKFailedResumeHandleCount uint64 + + // + SuspendedHandleCount uint64 +} + +func NewWin32_PerfRawData_ResumeKeyFilter_ResumeKeyFilterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ResumeKeyFilter_ResumeKeyFilterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCancelledHandleCount sets the value of CancelledHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyCancelledHandleCount(value uint64) (err error) { + return instance.SetProperty("CancelledHandleCount", (value)) +} + +// GetCancelledHandleCount gets the value of CancelledHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyCancelledHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CancelledHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentActiveHandleCount sets the value of CurrentActiveHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyCurrentActiveHandleCount(value uint64) (err error) { + return instance.SetProperty("CurrentActiveHandleCount", (value)) +} + +// GetCurrentActiveHandleCount gets the value of CurrentActiveHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyCurrentActiveHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentActiveHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentInactiveHandleCount sets the value of CurrentInactiveHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyCurrentInactiveHandleCount(value uint64) (err error) { + return instance.SetProperty("CurrentInactiveHandleCount", (value)) +} + +// GetCurrentInactiveHandleCount gets the value of CurrentInactiveHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyCurrentInactiveHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentInactiveHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFSFailedResumeHandleCount sets the value of FSFailedResumeHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyFSFailedResumeHandleCount(value uint64) (err error) { + return instance.SetProperty("FSFailedResumeHandleCount", (value)) +} + +// GetFSFailedResumeHandleCount gets the value of FSFailedResumeHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyFSFailedResumeHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("FSFailedResumeHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReplayedHandleCount sets the value of ReplayedHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyReplayedHandleCount(value uint64) (err error) { + return instance.SetProperty("ReplayedHandleCount", (value)) +} + +// GetReplayedHandleCount gets the value of ReplayedHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyReplayedHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReplayedHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetResumedHandleCount sets the value of ResumedHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyResumedHandleCount(value uint64) (err error) { + return instance.SetProperty("ResumedHandleCount", (value)) +} + +// GetResumedHandleCount gets the value of ResumedHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyResumedHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ResumedHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRKFailedResumeHandleCount sets the value of RKFailedResumeHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertyRKFailedResumeHandleCount(value uint64) (err error) { + return instance.SetProperty("RKFailedResumeHandleCount", (value)) +} + +// GetRKFailedResumeHandleCount gets the value of RKFailedResumeHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertyRKFailedResumeHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("RKFailedResumeHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSuspendedHandleCount sets the value of SuspendedHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) SetPropertySuspendedHandleCount(value uint64) (err error) { + return instance.SetProperty("SuspendedHandleCount", (value)) +} + +// GetSuspendedHandleCount gets the value of SuspendedHandleCount for the instance +func (instance *Win32_PerfRawData_ResumeKeyFilter_ResumeKeyFilter) GetPropertySuspendedHandleCount() (value uint64, err error) { + retValue, err := instance.GetProperty("SuspendedHandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000.go new file mode 100644 index 00000000..95b078c8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000 struct +type Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000 struct { + *Win32_PerfRawData + + // + ConnectionsAcceptedovernetpipe uint32 + + // + ConnectionsAcceptedovernettcp uint32 + + // + ConnectionsDispatchedovernetpipe uint32 + + // + ConnectionsDispatchedovernettcp uint32 + + // + DispatchFailuresovernetpipe uint32 + + // + DispatchFailuresovernettcp uint32 + + // + ProtocolFailuresovernetpipe uint32 + + // + ProtocolFailuresovernettcp uint32 + + // + RegistrationsActivefornetpipe uint32 + + // + RegistrationsActivefornettcp uint32 + + // + UrisRegisteredfornetpipe uint32 + + // + UrisRegisteredfornettcp uint32 + + // + UrisUnregisteredfornetpipe uint32 + + // + UrisUnregisteredfornettcp uint32 +} + +func NewWin32_PerfRawData_SMSvcHost4000_SMSvcHost4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_SMSvcHost4000_SMSvcHost4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetConnectionsAcceptedovernetpipe sets the value of ConnectionsAcceptedovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsAcceptedovernetpipe(value uint32) (err error) { + return instance.SetProperty("ConnectionsAcceptedovernetpipe", (value)) +} + +// GetConnectionsAcceptedovernetpipe gets the value of ConnectionsAcceptedovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsAcceptedovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsAcceptedovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsAcceptedovernettcp sets the value of ConnectionsAcceptedovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsAcceptedovernettcp(value uint32) (err error) { + return instance.SetProperty("ConnectionsAcceptedovernettcp", (value)) +} + +// GetConnectionsAcceptedovernettcp gets the value of ConnectionsAcceptedovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsAcceptedovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsAcceptedovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsDispatchedovernetpipe sets the value of ConnectionsDispatchedovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsDispatchedovernetpipe(value uint32) (err error) { + return instance.SetProperty("ConnectionsDispatchedovernetpipe", (value)) +} + +// GetConnectionsDispatchedovernetpipe gets the value of ConnectionsDispatchedovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsDispatchedovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsDispatchedovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsDispatchedovernettcp sets the value of ConnectionsDispatchedovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyConnectionsDispatchedovernettcp(value uint32) (err error) { + return instance.SetProperty("ConnectionsDispatchedovernettcp", (value)) +} + +// GetConnectionsDispatchedovernettcp gets the value of ConnectionsDispatchedovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyConnectionsDispatchedovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsDispatchedovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDispatchFailuresovernetpipe sets the value of DispatchFailuresovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyDispatchFailuresovernetpipe(value uint32) (err error) { + return instance.SetProperty("DispatchFailuresovernetpipe", (value)) +} + +// GetDispatchFailuresovernetpipe gets the value of DispatchFailuresovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyDispatchFailuresovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("DispatchFailuresovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDispatchFailuresovernettcp sets the value of DispatchFailuresovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyDispatchFailuresovernettcp(value uint32) (err error) { + return instance.SetProperty("DispatchFailuresovernettcp", (value)) +} + +// GetDispatchFailuresovernettcp gets the value of DispatchFailuresovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyDispatchFailuresovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("DispatchFailuresovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocolFailuresovernetpipe sets the value of ProtocolFailuresovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyProtocolFailuresovernetpipe(value uint32) (err error) { + return instance.SetProperty("ProtocolFailuresovernetpipe", (value)) +} + +// GetProtocolFailuresovernetpipe gets the value of ProtocolFailuresovernetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyProtocolFailuresovernetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("ProtocolFailuresovernetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocolFailuresovernettcp sets the value of ProtocolFailuresovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyProtocolFailuresovernettcp(value uint32) (err error) { + return instance.SetProperty("ProtocolFailuresovernettcp", (value)) +} + +// GetProtocolFailuresovernettcp gets the value of ProtocolFailuresovernettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyProtocolFailuresovernettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("ProtocolFailuresovernettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRegistrationsActivefornetpipe sets the value of RegistrationsActivefornetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyRegistrationsActivefornetpipe(value uint32) (err error) { + return instance.SetProperty("RegistrationsActivefornetpipe", (value)) +} + +// GetRegistrationsActivefornetpipe gets the value of RegistrationsActivefornetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyRegistrationsActivefornetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("RegistrationsActivefornetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRegistrationsActivefornettcp sets the value of RegistrationsActivefornettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyRegistrationsActivefornettcp(value uint32) (err error) { + return instance.SetProperty("RegistrationsActivefornettcp", (value)) +} + +// GetRegistrationsActivefornettcp gets the value of RegistrationsActivefornettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyRegistrationsActivefornettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("RegistrationsActivefornettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisRegisteredfornetpipe sets the value of UrisRegisteredfornetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisRegisteredfornetpipe(value uint32) (err error) { + return instance.SetProperty("UrisRegisteredfornetpipe", (value)) +} + +// GetUrisRegisteredfornetpipe gets the value of UrisRegisteredfornetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisRegisteredfornetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisRegisteredfornetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisRegisteredfornettcp sets the value of UrisRegisteredfornettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisRegisteredfornettcp(value uint32) (err error) { + return instance.SetProperty("UrisRegisteredfornettcp", (value)) +} + +// GetUrisRegisteredfornettcp gets the value of UrisRegisteredfornettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisRegisteredfornettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisRegisteredfornettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisUnregisteredfornetpipe sets the value of UrisUnregisteredfornetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisUnregisteredfornetpipe(value uint32) (err error) { + return instance.SetProperty("UrisUnregisteredfornetpipe", (value)) +} + +// GetUrisUnregisteredfornetpipe gets the value of UrisUnregisteredfornetpipe for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisUnregisteredfornetpipe() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisUnregisteredfornetpipe") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUrisUnregisteredfornettcp sets the value of UrisUnregisteredfornettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) SetPropertyUrisUnregisteredfornettcp(value uint32) (err error) { + return instance.SetProperty("UrisUnregisteredfornettcp", (value)) +} + +// GetUrisUnregisteredfornettcp gets the value of UrisUnregisteredfornettcp for the instance +func (instance *Win32_PerfRawData_SMSvcHost4000_SMSvcHost4000) GetPropertyUrisUnregisteredfornettcp() (value uint32, err error) { + retValue, err := instance.GetProperty("UrisUnregisteredfornettcp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000.go new file mode 100644 index 00000000..3fa342c6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000.go @@ -0,0 +1,620 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000 struct +type Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000 struct { + *Win32_PerfRawData + + // + Calls uint32 + + // + CallsDuration uint32 + + // + CallsDuration_Base uint32 + + // + CallsFailed uint32 + + // + CallsFailedPerSecond uint32 + + // + CallsFaulted uint32 + + // + CallsFaultedPerSecond uint32 + + // + CallsOutstanding uint32 + + // + CallsPerSecond uint32 + + // + ReliableMessagingMessagesDropped uint32 + + // + ReliableMessagingMessagesDroppedPerSecond uint32 + + // + ReliableMessagingSessionsFaulted uint32 + + // + ReliableMessagingSessionsFaultedPerSecond uint32 + + // + SecurityCallsNotAuthorized uint32 + + // + SecurityCallsNotAuthorizedPerSecond uint32 + + // + SecurityValidationandAuthenticationFailures uint32 + + // + SecurityValidationandAuthenticationFailuresPerSecond uint32 + + // + TransactionsFlowed uint32 + + // + TransactionsFlowedPerSecond uint32 +} + +func NewWin32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCalls sets the value of Calls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCalls(value uint32) (err error) { + return instance.SetProperty("Calls", (value)) +} + +// GetCalls gets the value of Calls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("Calls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration sets the value of CallsDuration for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsDuration(value uint32) (err error) { + return instance.SetProperty("CallsDuration", (value)) +} + +// GetCallsDuration gets the value of CallsDuration for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration_Base sets the value of CallsDuration_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsDuration_Base(value uint32) (err error) { + return instance.SetProperty("CallsDuration_Base", (value)) +} + +// GetCallsDuration_Base gets the value of CallsDuration_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsDuration_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailed sets the value of CallsFailed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFailed(value uint32) (err error) { + return instance.SetProperty("CallsFailed", (value)) +} + +// GetCallsFailed gets the value of CallsFailed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailedPerSecond sets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFailedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFailedPerSecond", (value)) +} + +// GetCallsFailedPerSecond gets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFailedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaulted sets the value of CallsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFaulted(value uint32) (err error) { + return instance.SetProperty("CallsFaulted", (value)) +} + +// GetCallsFaulted gets the value of CallsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaultedPerSecond sets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFaultedPerSecond", (value)) +} + +// GetCallsFaultedPerSecond gets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsOutstanding sets the value of CallsOutstanding for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsOutstanding(value uint32) (err error) { + return instance.SetProperty("CallsOutstanding", (value)) +} + +// GetCallsOutstanding gets the value of CallsOutstanding for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsOutstanding() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsPerSecond sets the value of CallsPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyCallsPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsPerSecond", (value)) +} + +// GetCallsPerSecond gets the value of CallsPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyCallsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDropped sets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingMessagesDropped(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDropped", (value)) +} + +// GetReliableMessagingMessagesDropped gets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingMessagesDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDroppedPerSecond sets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingMessagesDroppedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDroppedPerSecond", (value)) +} + +// GetReliableMessagingMessagesDroppedPerSecond gets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingMessagesDroppedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDroppedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaulted sets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingSessionsFaulted(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaulted", (value)) +} + +// GetReliableMessagingSessionsFaulted gets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingSessionsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaultedPerSecond sets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyReliableMessagingSessionsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaultedPerSecond", (value)) +} + +// GetReliableMessagingSessionsFaultedPerSecond gets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyReliableMessagingSessionsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorized sets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityCallsNotAuthorized(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorized", (value)) +} + +// GetSecurityCallsNotAuthorized gets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityCallsNotAuthorized() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorized") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorizedPerSecond sets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityCallsNotAuthorizedPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorizedPerSecond", (value)) +} + +// GetSecurityCallsNotAuthorizedPerSecond gets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityCallsNotAuthorizedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorizedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailures sets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityValidationandAuthenticationFailures(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailures", (value)) +} + +// GetSecurityValidationandAuthenticationFailures gets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityValidationandAuthenticationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailuresPerSecond sets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertySecurityValidationandAuthenticationFailuresPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailuresPerSecond", (value)) +} + +// GetSecurityValidationandAuthenticationFailuresPerSecond gets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertySecurityValidationandAuthenticationFailuresPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailuresPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowed sets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyTransactionsFlowed(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowed", (value)) +} + +// GetTransactionsFlowed gets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyTransactionsFlowed() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowedPerSecond sets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) SetPropertyTransactionsFlowedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowedPerSecond", (value)) +} + +// GetTransactionsFlowedPerSecond gets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelEndpoint4000) GetPropertyTransactionsFlowedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000.go new file mode 100644 index 00000000..8e1e32bb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000 struct +type Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000 struct { + *Win32_PerfRawData + + // + CallFailedPerSecond uint32 + + // + Calls uint32 + + // + CallsDuration uint32 + + // + CallsDuration_Base uint32 + + // + CallsFailed uint32 + + // + CallsFaulted uint32 + + // + CallsFaultedPerSecond uint32 + + // + CallsOutstanding uint32 + + // + CallsPerSecond uint32 + + // + SecurityCallsNotAuthorized uint32 + + // + SecurityCallsNotAuthorizedPerSecond uint32 + + // + SecurityValidationandAuthenticationFailures uint32 + + // + SecurityValidationandAuthenticationFailuresPerSecond uint32 + + // + TransactionsFlowed uint32 + + // + TransactionsFlowedPerSecond uint32 +} + +func NewWin32_PerfRawData_ServiceModel4000_ServiceModelOperation4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ServiceModel4000_ServiceModelOperation4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCallFailedPerSecond sets the value of CallFailedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallFailedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallFailedPerSecond", (value)) +} + +// GetCallFailedPerSecond gets the value of CallFailedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallFailedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallFailedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCalls sets the value of Calls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCalls(value uint32) (err error) { + return instance.SetProperty("Calls", (value)) +} + +// GetCalls gets the value of Calls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("Calls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration sets the value of CallsDuration for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsDuration(value uint32) (err error) { + return instance.SetProperty("CallsDuration", (value)) +} + +// GetCallsDuration gets the value of CallsDuration for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration_Base sets the value of CallsDuration_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsDuration_Base(value uint32) (err error) { + return instance.SetProperty("CallsDuration_Base", (value)) +} + +// GetCallsDuration_Base gets the value of CallsDuration_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsDuration_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailed sets the value of CallsFailed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsFailed(value uint32) (err error) { + return instance.SetProperty("CallsFailed", (value)) +} + +// GetCallsFailed gets the value of CallsFailed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaulted sets the value of CallsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsFaulted(value uint32) (err error) { + return instance.SetProperty("CallsFaulted", (value)) +} + +// GetCallsFaulted gets the value of CallsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaultedPerSecond sets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFaultedPerSecond", (value)) +} + +// GetCallsFaultedPerSecond gets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsOutstanding sets the value of CallsOutstanding for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsOutstanding(value uint32) (err error) { + return instance.SetProperty("CallsOutstanding", (value)) +} + +// GetCallsOutstanding gets the value of CallsOutstanding for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsOutstanding() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsPerSecond sets the value of CallsPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyCallsPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsPerSecond", (value)) +} + +// GetCallsPerSecond gets the value of CallsPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyCallsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorized sets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityCallsNotAuthorized(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorized", (value)) +} + +// GetSecurityCallsNotAuthorized gets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityCallsNotAuthorized() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorized") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorizedPerSecond sets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityCallsNotAuthorizedPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorizedPerSecond", (value)) +} + +// GetSecurityCallsNotAuthorizedPerSecond gets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityCallsNotAuthorizedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorizedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailures sets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityValidationandAuthenticationFailures(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailures", (value)) +} + +// GetSecurityValidationandAuthenticationFailures gets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityValidationandAuthenticationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailuresPerSecond sets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertySecurityValidationandAuthenticationFailuresPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailuresPerSecond", (value)) +} + +// GetSecurityValidationandAuthenticationFailuresPerSecond gets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertySecurityValidationandAuthenticationFailuresPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailuresPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowed sets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyTransactionsFlowed(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowed", (value)) +} + +// GetTransactionsFlowed gets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyTransactionsFlowed() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowedPerSecond sets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) SetPropertyTransactionsFlowedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowedPerSecond", (value)) +} + +// GetTransactionsFlowedPerSecond gets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelOperation4000) GetPropertyTransactionsFlowedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelService4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelService4000.go new file mode 100644 index 00000000..135082b5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_ServiceModel4000_ServiceModelService4000.go @@ -0,0 +1,1220 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_ServiceModel4000_ServiceModelService4000 struct +type Win32_PerfRawData_ServiceModel4000_ServiceModelService4000 struct { + *Win32_PerfRawData + + // + Calls uint32 + + // + CallsDuration uint32 + + // + CallsDuration_Base uint32 + + // + CallsFailed uint32 + + // + CallsFailedPerSecond uint32 + + // + CallsFaulted uint32 + + // + CallsFaultedPerSecond uint32 + + // + CallsOutstanding uint32 + + // + CallsPerSecond uint32 + + // + Instances uint32 + + // + InstancesCreatedPerSecond uint32 + + // + PercentOfMaxConcurrentCalls uint32 + + // + PercentOfMaxConcurrentCalls_Base uint32 + + // + PercentOfMaxConcurrentInstances uint32 + + // + PercentOfMaxConcurrentInstances_Base uint32 + + // + PercentOfMaxConcurrentSessions uint32 + + // + PercentOfMaxConcurrentSessions_Base uint32 + + // + QueuedMessagesDropped uint32 + + // + QueuedMessagesDroppedPerSecond uint32 + + // + QueuedMessagesRejected uint32 + + // + QueuedMessagesRejectedPerSecond uint32 + + // + QueuedPoisonMessages uint32 + + // + QueuedPoisonMessagesPerSecond uint32 + + // + ReliableMessagingMessagesDropped uint32 + + // + ReliableMessagingMessagesDroppedPerSecond uint32 + + // + ReliableMessagingSessionsFaulted uint32 + + // + ReliableMessagingSessionsFaultedPerSecond uint32 + + // + SecurityCallsNotAuthorized uint32 + + // + SecurityCallsNotAuthorizedPerSecond uint32 + + // + SecurityValidationandAuthenticationFailures uint32 + + // + SecurityValidationandAuthenticationFailuresPerSecond uint32 + + // + TransactedOperationsAborted uint32 + + // + TransactedOperationsAbortedPerSecond uint32 + + // + TransactedOperationsCommitted uint32 + + // + TransactedOperationsCommittedPerSecond uint32 + + // + TransactedOperationsInDoubt uint32 + + // + TransactedOperationsInDoubtPerSecond uint32 + + // + TransactionsFlowed uint32 + + // + TransactionsFlowedPerSecond uint32 +} + +func NewWin32_PerfRawData_ServiceModel4000_ServiceModelService4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ServiceModel4000_ServiceModelService4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_ServiceModel4000_ServiceModelService4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_ServiceModel4000_ServiceModelService4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCalls sets the value of Calls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCalls(value uint32) (err error) { + return instance.SetProperty("Calls", (value)) +} + +// GetCalls gets the value of Calls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("Calls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration sets the value of CallsDuration for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsDuration(value uint32) (err error) { + return instance.SetProperty("CallsDuration", (value)) +} + +// GetCallsDuration gets the value of CallsDuration for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsDuration() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsDuration_Base sets the value of CallsDuration_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsDuration_Base(value uint32) (err error) { + return instance.SetProperty("CallsDuration_Base", (value)) +} + +// GetCallsDuration_Base gets the value of CallsDuration_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsDuration_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsDuration_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailed sets the value of CallsFailed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFailed(value uint32) (err error) { + return instance.SetProperty("CallsFailed", (value)) +} + +// GetCallsFailed gets the value of CallsFailed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFailed() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFailedPerSecond sets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFailedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFailedPerSecond", (value)) +} + +// GetCallsFailedPerSecond gets the value of CallsFailedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFailedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFailedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaulted sets the value of CallsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFaulted(value uint32) (err error) { + return instance.SetProperty("CallsFaulted", (value)) +} + +// GetCallsFaulted gets the value of CallsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsFaultedPerSecond sets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsFaultedPerSecond", (value)) +} + +// GetCallsFaultedPerSecond gets the value of CallsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsOutstanding sets the value of CallsOutstanding for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsOutstanding(value uint32) (err error) { + return instance.SetProperty("CallsOutstanding", (value)) +} + +// GetCallsOutstanding gets the value of CallsOutstanding for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsOutstanding() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsOutstanding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCallsPerSecond sets the value of CallsPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyCallsPerSecond(value uint32) (err error) { + return instance.SetProperty("CallsPerSecond", (value)) +} + +// GetCallsPerSecond gets the value of CallsPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyCallsPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("CallsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstances sets the value of Instances for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyInstances(value uint32) (err error) { + return instance.SetProperty("Instances", (value)) +} + +// GetInstances gets the value of Instances for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyInstances() (value uint32, err error) { + retValue, err := instance.GetProperty("Instances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstancesCreatedPerSecond sets the value of InstancesCreatedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyInstancesCreatedPerSecond(value uint32) (err error) { + return instance.SetProperty("InstancesCreatedPerSecond", (value)) +} + +// GetInstancesCreatedPerSecond gets the value of InstancesCreatedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyInstancesCreatedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("InstancesCreatedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentCalls sets the value of PercentOfMaxConcurrentCalls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentCalls(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentCalls", (value)) +} + +// GetPercentOfMaxConcurrentCalls gets the value of PercentOfMaxConcurrentCalls for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentCalls_Base sets the value of PercentOfMaxConcurrentCalls_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentCalls_Base(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentCalls_Base", (value)) +} + +// GetPercentOfMaxConcurrentCalls_Base gets the value of PercentOfMaxConcurrentCalls_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentCalls_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentCalls_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentInstances sets the value of PercentOfMaxConcurrentInstances for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentInstances(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentInstances", (value)) +} + +// GetPercentOfMaxConcurrentInstances gets the value of PercentOfMaxConcurrentInstances for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentInstances() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentInstances") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentInstances_Base sets the value of PercentOfMaxConcurrentInstances_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentInstances_Base(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentInstances_Base", (value)) +} + +// GetPercentOfMaxConcurrentInstances_Base gets the value of PercentOfMaxConcurrentInstances_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentInstances_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentInstances_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentSessions sets the value of PercentOfMaxConcurrentSessions for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentSessions(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentSessions", (value)) +} + +// GetPercentOfMaxConcurrentSessions gets the value of PercentOfMaxConcurrentSessions for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentOfMaxConcurrentSessions_Base sets the value of PercentOfMaxConcurrentSessions_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyPercentOfMaxConcurrentSessions_Base(value uint32) (err error) { + return instance.SetProperty("PercentOfMaxConcurrentSessions_Base", (value)) +} + +// GetPercentOfMaxConcurrentSessions_Base gets the value of PercentOfMaxConcurrentSessions_Base for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyPercentOfMaxConcurrentSessions_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentOfMaxConcurrentSessions_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesDropped sets the value of QueuedMessagesDropped for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesDropped(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesDropped", (value)) +} + +// GetQueuedMessagesDropped gets the value of QueuedMessagesDropped for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesDroppedPerSecond sets the value of QueuedMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesDroppedPerSecond(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesDroppedPerSecond", (value)) +} + +// GetQueuedMessagesDroppedPerSecond gets the value of QueuedMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesDroppedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesDroppedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesRejected sets the value of QueuedMessagesRejected for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesRejected(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesRejected", (value)) +} + +// GetQueuedMessagesRejected gets the value of QueuedMessagesRejected for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesRejected() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesRejected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedMessagesRejectedPerSecond sets the value of QueuedMessagesRejectedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedMessagesRejectedPerSecond(value uint32) (err error) { + return instance.SetProperty("QueuedMessagesRejectedPerSecond", (value)) +} + +// GetQueuedMessagesRejectedPerSecond gets the value of QueuedMessagesRejectedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedMessagesRejectedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedMessagesRejectedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedPoisonMessages sets the value of QueuedPoisonMessages for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedPoisonMessages(value uint32) (err error) { + return instance.SetProperty("QueuedPoisonMessages", (value)) +} + +// GetQueuedPoisonMessages gets the value of QueuedPoisonMessages for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedPoisonMessages() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedPoisonMessages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQueuedPoisonMessagesPerSecond sets the value of QueuedPoisonMessagesPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyQueuedPoisonMessagesPerSecond(value uint32) (err error) { + return instance.SetProperty("QueuedPoisonMessagesPerSecond", (value)) +} + +// GetQueuedPoisonMessagesPerSecond gets the value of QueuedPoisonMessagesPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyQueuedPoisonMessagesPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("QueuedPoisonMessagesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDropped sets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingMessagesDropped(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDropped", (value)) +} + +// GetReliableMessagingMessagesDropped gets the value of ReliableMessagingMessagesDropped for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingMessagesDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingMessagesDroppedPerSecond sets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingMessagesDroppedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingMessagesDroppedPerSecond", (value)) +} + +// GetReliableMessagingMessagesDroppedPerSecond gets the value of ReliableMessagingMessagesDroppedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingMessagesDroppedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingMessagesDroppedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaulted sets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingSessionsFaulted(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaulted", (value)) +} + +// GetReliableMessagingSessionsFaulted gets the value of ReliableMessagingSessionsFaulted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingSessionsFaulted() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaulted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReliableMessagingSessionsFaultedPerSecond sets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyReliableMessagingSessionsFaultedPerSecond(value uint32) (err error) { + return instance.SetProperty("ReliableMessagingSessionsFaultedPerSecond", (value)) +} + +// GetReliableMessagingSessionsFaultedPerSecond gets the value of ReliableMessagingSessionsFaultedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyReliableMessagingSessionsFaultedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("ReliableMessagingSessionsFaultedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorized sets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityCallsNotAuthorized(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorized", (value)) +} + +// GetSecurityCallsNotAuthorized gets the value of SecurityCallsNotAuthorized for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityCallsNotAuthorized() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorized") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityCallsNotAuthorizedPerSecond sets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityCallsNotAuthorizedPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityCallsNotAuthorizedPerSecond", (value)) +} + +// GetSecurityCallsNotAuthorizedPerSecond gets the value of SecurityCallsNotAuthorizedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityCallsNotAuthorizedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityCallsNotAuthorizedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailures sets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityValidationandAuthenticationFailures(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailures", (value)) +} + +// GetSecurityValidationandAuthenticationFailures gets the value of SecurityValidationandAuthenticationFailures for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityValidationandAuthenticationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecurityValidationandAuthenticationFailuresPerSecond sets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertySecurityValidationandAuthenticationFailuresPerSecond(value uint32) (err error) { + return instance.SetProperty("SecurityValidationandAuthenticationFailuresPerSecond", (value)) +} + +// GetSecurityValidationandAuthenticationFailuresPerSecond gets the value of SecurityValidationandAuthenticationFailuresPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertySecurityValidationandAuthenticationFailuresPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SecurityValidationandAuthenticationFailuresPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsAborted sets the value of TransactedOperationsAborted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsAborted(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsAborted", (value)) +} + +// GetTransactedOperationsAborted gets the value of TransactedOperationsAborted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsAborted() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsAborted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsAbortedPerSecond sets the value of TransactedOperationsAbortedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsAbortedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsAbortedPerSecond", (value)) +} + +// GetTransactedOperationsAbortedPerSecond gets the value of TransactedOperationsAbortedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsAbortedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsAbortedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsCommitted sets the value of TransactedOperationsCommitted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsCommitted(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsCommitted", (value)) +} + +// GetTransactedOperationsCommitted gets the value of TransactedOperationsCommitted for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsCommitted() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsCommitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsCommittedPerSecond sets the value of TransactedOperationsCommittedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsCommittedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsCommittedPerSecond", (value)) +} + +// GetTransactedOperationsCommittedPerSecond gets the value of TransactedOperationsCommittedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsCommittedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsCommittedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsInDoubt sets the value of TransactedOperationsInDoubt for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsInDoubt(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsInDoubt", (value)) +} + +// GetTransactedOperationsInDoubt gets the value of TransactedOperationsInDoubt for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsInDoubt() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsInDoubt") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactedOperationsInDoubtPerSecond sets the value of TransactedOperationsInDoubtPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactedOperationsInDoubtPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactedOperationsInDoubtPerSecond", (value)) +} + +// GetTransactedOperationsInDoubtPerSecond gets the value of TransactedOperationsInDoubtPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactedOperationsInDoubtPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactedOperationsInDoubtPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowed sets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactionsFlowed(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowed", (value)) +} + +// GetTransactionsFlowed gets the value of TransactionsFlowed for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactionsFlowed() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransactionsFlowedPerSecond sets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) SetPropertyTransactionsFlowedPerSecond(value uint32) (err error) { + return instance.SetProperty("TransactionsFlowedPerSecond", (value)) +} + +// GetTransactionsFlowedPerSecond gets the value of TransactionsFlowedPerSecond for the instance +func (instance *Win32_PerfRawData_ServiceModel4000_ServiceModelService4000) GetPropertyTransactionsFlowedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("TransactionsFlowedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Spooler_PrintQueue.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Spooler_PrintQueue.go new file mode 100644 index 00000000..0f4d1bf3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Spooler_PrintQueue.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Spooler_PrintQueue struct +type Win32_PerfRawData_Spooler_PrintQueue struct { + *Win32_PerfRawData + + // + AddNetworkPrinterCalls uint32 + + // + BytesPrintedPersec uint64 + + // + EnumerateNetworkPrinterCalls uint32 + + // + JobErrors uint32 + + // + Jobs uint32 + + // + JobsSpooling uint32 + + // + MaxJobsSpooling uint32 + + // + MaxReferences uint32 + + // + NotReadyErrors uint32 + + // + OutofPaperErrors uint32 + + // + References uint32 + + // + TotalJobsPrinted uint32 + + // + TotalPagesPrinted uint32 +} + +func NewWin32_PerfRawData_Spooler_PrintQueueEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Spooler_PrintQueue, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Spooler_PrintQueue{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Spooler_PrintQueueEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Spooler_PrintQueue, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Spooler_PrintQueue{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAddNetworkPrinterCalls sets the value of AddNetworkPrinterCalls for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyAddNetworkPrinterCalls(value uint32) (err error) { + return instance.SetProperty("AddNetworkPrinterCalls", (value)) +} + +// GetAddNetworkPrinterCalls gets the value of AddNetworkPrinterCalls for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyAddNetworkPrinterCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("AddNetworkPrinterCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBytesPrintedPersec sets the value of BytesPrintedPersec for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyBytesPrintedPersec(value uint64) (err error) { + return instance.SetProperty("BytesPrintedPersec", (value)) +} + +// GetBytesPrintedPersec gets the value of BytesPrintedPersec for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyBytesPrintedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesPrintedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetEnumerateNetworkPrinterCalls sets the value of EnumerateNetworkPrinterCalls for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyEnumerateNetworkPrinterCalls(value uint32) (err error) { + return instance.SetProperty("EnumerateNetworkPrinterCalls", (value)) +} + +// GetEnumerateNetworkPrinterCalls gets the value of EnumerateNetworkPrinterCalls for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyEnumerateNetworkPrinterCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("EnumerateNetworkPrinterCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobErrors sets the value of JobErrors for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyJobErrors(value uint32) (err error) { + return instance.SetProperty("JobErrors", (value)) +} + +// GetJobErrors gets the value of JobErrors for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyJobErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("JobErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobs sets the value of Jobs for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyJobs(value uint32) (err error) { + return instance.SetProperty("Jobs", (value)) +} + +// GetJobs gets the value of Jobs for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyJobs() (value uint32, err error) { + retValue, err := instance.GetProperty("Jobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetJobsSpooling sets the value of JobsSpooling for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyJobsSpooling(value uint32) (err error) { + return instance.SetProperty("JobsSpooling", (value)) +} + +// GetJobsSpooling gets the value of JobsSpooling for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyJobsSpooling() (value uint32, err error) { + retValue, err := instance.GetProperty("JobsSpooling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxJobsSpooling sets the value of MaxJobsSpooling for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyMaxJobsSpooling(value uint32) (err error) { + return instance.SetProperty("MaxJobsSpooling", (value)) +} + +// GetMaxJobsSpooling gets the value of MaxJobsSpooling for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyMaxJobsSpooling() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxJobsSpooling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxReferences sets the value of MaxReferences for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyMaxReferences(value uint32) (err error) { + return instance.SetProperty("MaxReferences", (value)) +} + +// GetMaxReferences gets the value of MaxReferences for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyMaxReferences() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxReferences") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNotReadyErrors sets the value of NotReadyErrors for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyNotReadyErrors(value uint32) (err error) { + return instance.SetProperty("NotReadyErrors", (value)) +} + +// GetNotReadyErrors gets the value of NotReadyErrors for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyNotReadyErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("NotReadyErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutofPaperErrors sets the value of OutofPaperErrors for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyOutofPaperErrors(value uint32) (err error) { + return instance.SetProperty("OutofPaperErrors", (value)) +} + +// GetOutofPaperErrors gets the value of OutofPaperErrors for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyOutofPaperErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("OutofPaperErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReferences sets the value of References for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyReferences(value uint32) (err error) { + return instance.SetProperty("References", (value)) +} + +// GetReferences gets the value of References for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyReferences() (value uint32, err error) { + retValue, err := instance.GetProperty("References") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalJobsPrinted sets the value of TotalJobsPrinted for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyTotalJobsPrinted(value uint32) (err error) { + return instance.SetProperty("TotalJobsPrinted", (value)) +} + +// GetTotalJobsPrinted gets the value of TotalJobsPrinted for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyTotalJobsPrinted() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalJobsPrinted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalPagesPrinted sets the value of TotalPagesPrinted for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) SetPropertyTotalPagesPrinted(value uint32) (err error) { + return instance.SetProperty("TotalPagesPrinted", (value)) +} + +// GetTotalPagesPrinted gets the value of TotalPagesPrinted for the instance +func (instance *Win32_PerfRawData_Spooler_PrintQueue) GetPropertyTotalPagesPrinted() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalPagesPrinted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX.go new file mode 100644 index 00000000..70182a05 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX.go @@ -0,0 +1,1040 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX struct +type Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX struct { + *Win32_PerfRawData + + // + Averagebytesperread uint64 + + // + Averagebytesperread_Base uint32 + + // + Averagebytesperrequest uint64 + + // + Averagebytesperrequest_Base uint32 + + // + Averagebytesperwrite uint64 + + // + Averagebytesperwrite_Base uint32 + + // + Averagequeuelength uint64 + + // + Averagereadqueuelength uint64 + + // + AverageSharedVHDXdisklogsize uint64 + + // + AverageSharedVHDXdisklogsize_Base uint32 + + // + AverageSharedVHDXdisktotalsize uint64 + + // + AverageSharedVHDXdisktotalsize_Base uint32 + + // + AverageSharedVHDXmounttime uint32 + + // + AverageSharedVHDXmounttime_Base uint32 + + // + Averagetimeperread uint32 + + // + Averagetimeperread_Base uint32 + + // + Averagetimeperrequest uint32 + + // + Averagetimeperrequest_Base uint32 + + // + Averagetimeperwrite uint32 + + // + Averagetimeperwrite_Base uint32 + + // + Averagewritequeuelength uint64 + + // + Currentqueuelength uint32 + + // + Currentreadqueuelength uint32 + + // + Currentwritequeuelength uint32 + + // + Errorspersecond uint64 + + // + InitiatorHandleOpenspersecond uint32 + + // + ReadBytesPersec uint64 + + // + ReadRequestsPersec uint32 + + // + SharedVHDXMountspersecond uint32 + + // + TotalBytesPersec uint64 + + // + TotalRequestsPersec uint32 + + // + WriteRequestsPersec uint32 + + // + WrittenBytesPersec uint64 +} + +func NewWin32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDXEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDXEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAveragebytesperread sets the value of Averagebytesperread for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperread(value uint64) (err error) { + return instance.SetProperty("Averagebytesperread", (value)) +} + +// GetAveragebytesperread gets the value of Averagebytesperread for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperread() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagebytesperread") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragebytesperread_Base sets the value of Averagebytesperread_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperread_Base(value uint32) (err error) { + return instance.SetProperty("Averagebytesperread_Base", (value)) +} + +// GetAveragebytesperread_Base gets the value of Averagebytesperread_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperread_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagebytesperread_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragebytesperrequest sets the value of Averagebytesperrequest for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperrequest(value uint64) (err error) { + return instance.SetProperty("Averagebytesperrequest", (value)) +} + +// GetAveragebytesperrequest gets the value of Averagebytesperrequest for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperrequest() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagebytesperrequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragebytesperrequest_Base sets the value of Averagebytesperrequest_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperrequest_Base(value uint32) (err error) { + return instance.SetProperty("Averagebytesperrequest_Base", (value)) +} + +// GetAveragebytesperrequest_Base gets the value of Averagebytesperrequest_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperrequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagebytesperrequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragebytesperwrite sets the value of Averagebytesperwrite for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperwrite(value uint64) (err error) { + return instance.SetProperty("Averagebytesperwrite", (value)) +} + +// GetAveragebytesperwrite gets the value of Averagebytesperwrite for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperwrite() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagebytesperwrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragebytesperwrite_Base sets the value of Averagebytesperwrite_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragebytesperwrite_Base(value uint32) (err error) { + return instance.SetProperty("Averagebytesperwrite_Base", (value)) +} + +// GetAveragebytesperwrite_Base gets the value of Averagebytesperwrite_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragebytesperwrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagebytesperwrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragequeuelength sets the value of Averagequeuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragequeuelength(value uint64) (err error) { + return instance.SetProperty("Averagequeuelength", (value)) +} + +// GetAveragequeuelength gets the value of Averagequeuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragequeuelength() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagequeuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAveragereadqueuelength sets the value of Averagereadqueuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragereadqueuelength(value uint64) (err error) { + return instance.SetProperty("Averagereadqueuelength", (value)) +} + +// GetAveragereadqueuelength gets the value of Averagereadqueuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragereadqueuelength() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagereadqueuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageSharedVHDXdisklogsize sets the value of AverageSharedVHDXdisklogsize for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXdisklogsize(value uint64) (err error) { + return instance.SetProperty("AverageSharedVHDXdisklogsize", (value)) +} + +// GetAverageSharedVHDXdisklogsize gets the value of AverageSharedVHDXdisklogsize for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXdisklogsize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXdisklogsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageSharedVHDXdisklogsize_Base sets the value of AverageSharedVHDXdisklogsize_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXdisklogsize_Base(value uint32) (err error) { + return instance.SetProperty("AverageSharedVHDXdisklogsize_Base", (value)) +} + +// GetAverageSharedVHDXdisklogsize_Base gets the value of AverageSharedVHDXdisklogsize_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXdisklogsize_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXdisklogsize_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageSharedVHDXdisktotalsize sets the value of AverageSharedVHDXdisktotalsize for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXdisktotalsize(value uint64) (err error) { + return instance.SetProperty("AverageSharedVHDXdisktotalsize", (value)) +} + +// GetAverageSharedVHDXdisktotalsize gets the value of AverageSharedVHDXdisktotalsize for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXdisktotalsize() (value uint64, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXdisktotalsize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAverageSharedVHDXdisktotalsize_Base sets the value of AverageSharedVHDXdisktotalsize_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXdisktotalsize_Base(value uint32) (err error) { + return instance.SetProperty("AverageSharedVHDXdisktotalsize_Base", (value)) +} + +// GetAverageSharedVHDXdisktotalsize_Base gets the value of AverageSharedVHDXdisktotalsize_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXdisktotalsize_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXdisktotalsize_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageSharedVHDXmounttime sets the value of AverageSharedVHDXmounttime for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXmounttime(value uint32) (err error) { + return instance.SetProperty("AverageSharedVHDXmounttime", (value)) +} + +// GetAverageSharedVHDXmounttime gets the value of AverageSharedVHDXmounttime for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXmounttime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXmounttime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageSharedVHDXmounttime_Base sets the value of AverageSharedVHDXmounttime_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAverageSharedVHDXmounttime_Base(value uint32) (err error) { + return instance.SetProperty("AverageSharedVHDXmounttime_Base", (value)) +} + +// GetAverageSharedVHDXmounttime_Base gets the value of AverageSharedVHDXmounttime_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAverageSharedVHDXmounttime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageSharedVHDXmounttime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperread sets the value of Averagetimeperread for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperread(value uint32) (err error) { + return instance.SetProperty("Averagetimeperread", (value)) +} + +// GetAveragetimeperread gets the value of Averagetimeperread for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperread() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperread") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperread_Base sets the value of Averagetimeperread_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperread_Base(value uint32) (err error) { + return instance.SetProperty("Averagetimeperread_Base", (value)) +} + +// GetAveragetimeperread_Base gets the value of Averagetimeperread_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperread_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperread_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperrequest sets the value of Averagetimeperrequest for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperrequest(value uint32) (err error) { + return instance.SetProperty("Averagetimeperrequest", (value)) +} + +// GetAveragetimeperrequest gets the value of Averagetimeperrequest for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperrequest() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperrequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperrequest_Base sets the value of Averagetimeperrequest_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperrequest_Base(value uint32) (err error) { + return instance.SetProperty("Averagetimeperrequest_Base", (value)) +} + +// GetAveragetimeperrequest_Base gets the value of Averagetimeperrequest_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperrequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperrequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperwrite sets the value of Averagetimeperwrite for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperwrite(value uint32) (err error) { + return instance.SetProperty("Averagetimeperwrite", (value)) +} + +// GetAveragetimeperwrite gets the value of Averagetimeperwrite for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperwrite() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperwrite") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragetimeperwrite_Base sets the value of Averagetimeperwrite_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragetimeperwrite_Base(value uint32) (err error) { + return instance.SetProperty("Averagetimeperwrite_Base", (value)) +} + +// GetAveragetimeperwrite_Base gets the value of Averagetimeperwrite_Base for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragetimeperwrite_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("Averagetimeperwrite_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragewritequeuelength sets the value of Averagewritequeuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyAveragewritequeuelength(value uint64) (err error) { + return instance.SetProperty("Averagewritequeuelength", (value)) +} + +// GetAveragewritequeuelength gets the value of Averagewritequeuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyAveragewritequeuelength() (value uint64, err error) { + retValue, err := instance.GetProperty("Averagewritequeuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentqueuelength sets the value of Currentqueuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyCurrentqueuelength(value uint32) (err error) { + return instance.SetProperty("Currentqueuelength", (value)) +} + +// GetCurrentqueuelength gets the value of Currentqueuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyCurrentqueuelength() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentqueuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentreadqueuelength sets the value of Currentreadqueuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyCurrentreadqueuelength(value uint32) (err error) { + return instance.SetProperty("Currentreadqueuelength", (value)) +} + +// GetCurrentreadqueuelength gets the value of Currentreadqueuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyCurrentreadqueuelength() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentreadqueuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentwritequeuelength sets the value of Currentwritequeuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyCurrentwritequeuelength(value uint32) (err error) { + return instance.SetProperty("Currentwritequeuelength", (value)) +} + +// GetCurrentwritequeuelength gets the value of Currentwritequeuelength for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyCurrentwritequeuelength() (value uint32, err error) { + retValue, err := instance.GetProperty("Currentwritequeuelength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorspersecond sets the value of Errorspersecond for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyErrorspersecond(value uint64) (err error) { + return instance.SetProperty("Errorspersecond", (value)) +} + +// GetErrorspersecond gets the value of Errorspersecond for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyErrorspersecond() (value uint64, err error) { + retValue, err := instance.GetProperty("Errorspersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInitiatorHandleOpenspersecond sets the value of InitiatorHandleOpenspersecond for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyInitiatorHandleOpenspersecond(value uint32) (err error) { + return instance.SetProperty("InitiatorHandleOpenspersecond", (value)) +} + +// GetInitiatorHandleOpenspersecond gets the value of InitiatorHandleOpenspersecond for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyInitiatorHandleOpenspersecond() (value uint32, err error) { + retValue, err := instance.GetProperty("InitiatorHandleOpenspersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSharedVHDXMountspersecond sets the value of SharedVHDXMountspersecond for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertySharedVHDXMountspersecond(value uint32) (err error) { + return instance.SetProperty("SharedVHDXMountspersecond", (value)) +} + +// GetSharedVHDXMountspersecond gets the value of SharedVHDXMountspersecond for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertySharedVHDXMountspersecond() (value uint32, err error) { + retValue, err := instance.GetProperty("SharedVHDXMountspersecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalBytesPersec sets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyTotalBytesPersec(value uint64) (err error) { + return instance.SetProperty("TotalBytesPersec", (value)) +} + +// GetTotalBytesPersec gets the value of TotalBytesPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyTotalBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TotalBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTotalRequestsPersec sets the value of TotalRequestsPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyTotalRequestsPersec(value uint32) (err error) { + return instance.SetProperty("TotalRequestsPersec", (value)) +} + +// GetTotalRequestsPersec gets the value of TotalRequestsPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyTotalRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWrittenBytesPersec sets the value of WrittenBytesPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) SetPropertyWrittenBytesPersec(value uint64) (err error) { + return instance.SetProperty("WrittenBytesPersec", (value)) +} + +// GetWrittenBytesPersec gets the value of WrittenBytesPersec for the instance +func (instance *Win32_PerfRawData_SvhdxFltPerfProvider_HyperVSharedVHDX) GetPropertyWrittenBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WrittenBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go new file mode 100644 index 00000000..ac32f292 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement struct +type Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement struct { + *Win32_PerfRawData + + // + ResourcesVMsrunningRemoteFX uint64 + + // + VRAMAvailableMBperGPU uint64 + + // + VRAMReservedPercentperGPU uint64 + + // + VRAMReservedPercentperGPU_Base uint64 +} + +func NewWin32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagementEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement{ + Win32_PerfRawData: tmp, + } + return +} + +// SetResourcesVMsrunningRemoteFX sets the value of ResourcesVMsrunningRemoteFX for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyResourcesVMsrunningRemoteFX(value uint64) (err error) { + return instance.SetProperty("ResourcesVMsrunningRemoteFX", (value)) +} + +// GetResourcesVMsrunningRemoteFX gets the value of ResourcesVMsrunningRemoteFX for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyResourcesVMsrunningRemoteFX() (value uint64, err error) { + retValue, err := instance.GetProperty("ResourcesVMsrunningRemoteFX") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVRAMAvailableMBperGPU sets the value of VRAMAvailableMBperGPU for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyVRAMAvailableMBperGPU(value uint64) (err error) { + return instance.SetProperty("VRAMAvailableMBperGPU", (value)) +} + +// GetVRAMAvailableMBperGPU gets the value of VRAMAvailableMBperGPU for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyVRAMAvailableMBperGPU() (value uint64, err error) { + retValue, err := instance.GetProperty("VRAMAvailableMBperGPU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVRAMReservedPercentperGPU sets the value of VRAMReservedPercentperGPU for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyVRAMReservedPercentperGPU(value uint64) (err error) { + return instance.SetProperty("VRAMReservedPercentperGPU", (value)) +} + +// GetVRAMReservedPercentperGPU gets the value of VRAMReservedPercentperGPU for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyVRAMReservedPercentperGPU() (value uint64, err error) { + retValue, err := instance.GetProperty("VRAMReservedPercentperGPU") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVRAMReservedPercentperGPU_Base sets the value of VRAMReservedPercentperGPU_Base for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) SetPropertyVRAMReservedPercentperGPU_Base(value uint64) (err error) { + return instance.SetProperty("VRAMReservedPercentperGPU_Base", (value)) +} + +// GetVRAMReservedPercentperGPU_Base gets the value of VRAMReservedPercentperGPU_Base for the instance +func (instance *Win32_PerfRawData_Synth3dVideoPerfProvider_RemoteFXRootGPUManagement) GetPropertyVRAMReservedPercentperGPU_Base() (value uint64, err error) { + retValue, err := instance.GetProperty("VRAMReservedPercentperGPU_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics.go new file mode 100644 index 00000000..40807cae --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics struct +type Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics struct { + *Win32_PerfRawData + + // + Deniedconnectorsendrequestsinlowpowermode uint32 + + // + IPv4NBLsindicatedwithlowresourceflag uint32 + + // + IPv4NBLsindicatedwithoutprevalidation uint32 + + // + IPv4NBLsPersecindicatedwithlowresourceflag uint32 + + // + IPv4NBLsPersecindicatedwithoutprevalidation uint32 + + // + IPv4NBLsPersectreatedasnonprevalidated uint32 + + // + IPv4NBLstreatedasnonprevalidated uint32 + + // + IPv4outboundNBLsnotprocessedviafastpath uint32 + + // + IPv4outboundNBLsPersecnotprocessedviafastpath uint32 + + // + IPv6NBLsindicatedwithlowresourceflag uint32 + + // + IPv6NBLsindicatedwithoutprevalidation uint32 + + // + IPv6NBLsPersecindicatedwithlowresourceflag uint32 + + // + IPv6NBLsPersecindicatedwithoutprevalidation uint32 + + // + IPv6NBLsPersectreatedasnonprevalidated uint32 + + // + IPv6NBLstreatedasnonprevalidated uint32 + + // + IPv6outboundNBLsnotprocessedviafastpath uint32 + + // + IPv6outboundNBLsPersecnotprocessedviafastpath uint32 + + // + RSCsegmentforwardingfailuresduringsoftwaresegmentation uint32 + + // + RSCsegmentsforwardedviaLSO uint32 + + // + RSCsegmentsforwardedviasoftwaresegmentation uint32 + + // + RSCsegmentsforwardedviasoftwaresegmentationandchecksum uint32 + + // + TCPchecksumerrors uint32 + + // + TCPconnectrequestsfallenoffloopbackfastpath uint32 + + // + TCPconnectrequestsPersecfallenoffloopbackfastpath uint32 + + // + TCPinboundsegmentsnotprocessedviafastpath uint32 + + // + TCPinboundsegmentsPersecnotprocessedviafastpath uint32 + + // + TCPtimeouts uint32 +} + +func NewWin32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDeniedconnectorsendrequestsinlowpowermode sets the value of Deniedconnectorsendrequestsinlowpowermode for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyDeniedconnectorsendrequestsinlowpowermode(value uint32) (err error) { + return instance.SetProperty("Deniedconnectorsendrequestsinlowpowermode", (value)) +} + +// GetDeniedconnectorsendrequestsinlowpowermode gets the value of Deniedconnectorsendrequestsinlowpowermode for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyDeniedconnectorsendrequestsinlowpowermode() (value uint32, err error) { + retValue, err := instance.GetProperty("Deniedconnectorsendrequestsinlowpowermode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsindicatedwithlowresourceflag sets the value of IPv4NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsindicatedwithlowresourceflag", (value)) +} + +// GetIPv4NBLsindicatedwithlowresourceflag gets the value of IPv4NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsindicatedwithoutprevalidation sets the value of IPv4NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsindicatedwithoutprevalidation", (value)) +} + +// GetIPv4NBLsindicatedwithoutprevalidation gets the value of IPv4NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsPersecindicatedwithlowresourceflag sets the value of IPv4NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsPersecindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsPersecindicatedwithlowresourceflag", (value)) +} + +// GetIPv4NBLsPersecindicatedwithlowresourceflag gets the value of IPv4NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsPersecindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsPersecindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsPersecindicatedwithoutprevalidation sets the value of IPv4NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsPersecindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsPersecindicatedwithoutprevalidation", (value)) +} + +// GetIPv4NBLsPersecindicatedwithoutprevalidation gets the value of IPv4NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsPersecindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsPersecindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLsPersectreatedasnonprevalidated sets the value of IPv4NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLsPersectreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv4NBLsPersectreatedasnonprevalidated", (value)) +} + +// GetIPv4NBLsPersectreatedasnonprevalidated gets the value of IPv4NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLsPersectreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLsPersectreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4NBLstreatedasnonprevalidated sets the value of IPv4NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4NBLstreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv4NBLstreatedasnonprevalidated", (value)) +} + +// GetIPv4NBLstreatedasnonprevalidated gets the value of IPv4NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4NBLstreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4NBLstreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4outboundNBLsnotprocessedviafastpath sets the value of IPv4outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4outboundNBLsnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv4outboundNBLsnotprocessedviafastpath", (value)) +} + +// GetIPv4outboundNBLsnotprocessedviafastpath gets the value of IPv4outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4outboundNBLsnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4outboundNBLsnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv4outboundNBLsPersecnotprocessedviafastpath sets the value of IPv4outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv4outboundNBLsPersecnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv4outboundNBLsPersecnotprocessedviafastpath", (value)) +} + +// GetIPv4outboundNBLsPersecnotprocessedviafastpath gets the value of IPv4outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv4outboundNBLsPersecnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv4outboundNBLsPersecnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsindicatedwithlowresourceflag sets the value of IPv6NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsindicatedwithlowresourceflag", (value)) +} + +// GetIPv6NBLsindicatedwithlowresourceflag gets the value of IPv6NBLsindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsindicatedwithoutprevalidation sets the value of IPv6NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsindicatedwithoutprevalidation", (value)) +} + +// GetIPv6NBLsindicatedwithoutprevalidation gets the value of IPv6NBLsindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsPersecindicatedwithlowresourceflag sets the value of IPv6NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsPersecindicatedwithlowresourceflag(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsPersecindicatedwithlowresourceflag", (value)) +} + +// GetIPv6NBLsPersecindicatedwithlowresourceflag gets the value of IPv6NBLsPersecindicatedwithlowresourceflag for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsPersecindicatedwithlowresourceflag() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsPersecindicatedwithlowresourceflag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsPersecindicatedwithoutprevalidation sets the value of IPv6NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsPersecindicatedwithoutprevalidation(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsPersecindicatedwithoutprevalidation", (value)) +} + +// GetIPv6NBLsPersecindicatedwithoutprevalidation gets the value of IPv6NBLsPersecindicatedwithoutprevalidation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsPersecindicatedwithoutprevalidation() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsPersecindicatedwithoutprevalidation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLsPersectreatedasnonprevalidated sets the value of IPv6NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLsPersectreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv6NBLsPersectreatedasnonprevalidated", (value)) +} + +// GetIPv6NBLsPersectreatedasnonprevalidated gets the value of IPv6NBLsPersectreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLsPersectreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLsPersectreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6NBLstreatedasnonprevalidated sets the value of IPv6NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6NBLstreatedasnonprevalidated(value uint32) (err error) { + return instance.SetProperty("IPv6NBLstreatedasnonprevalidated", (value)) +} + +// GetIPv6NBLstreatedasnonprevalidated gets the value of IPv6NBLstreatedasnonprevalidated for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6NBLstreatedasnonprevalidated() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6NBLstreatedasnonprevalidated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6outboundNBLsnotprocessedviafastpath sets the value of IPv6outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6outboundNBLsnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv6outboundNBLsnotprocessedviafastpath", (value)) +} + +// GetIPv6outboundNBLsnotprocessedviafastpath gets the value of IPv6outboundNBLsnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6outboundNBLsnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6outboundNBLsnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIPv6outboundNBLsPersecnotprocessedviafastpath sets the value of IPv6outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyIPv6outboundNBLsPersecnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("IPv6outboundNBLsPersecnotprocessedviafastpath", (value)) +} + +// GetIPv6outboundNBLsPersecnotprocessedviafastpath gets the value of IPv6outboundNBLsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyIPv6outboundNBLsPersecnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("IPv6outboundNBLsPersecnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentforwardingfailuresduringsoftwaresegmentation sets the value of RSCsegmentforwardingfailuresduringsoftwaresegmentation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentforwardingfailuresduringsoftwaresegmentation(value uint32) (err error) { + return instance.SetProperty("RSCsegmentforwardingfailuresduringsoftwaresegmentation", (value)) +} + +// GetRSCsegmentforwardingfailuresduringsoftwaresegmentation gets the value of RSCsegmentforwardingfailuresduringsoftwaresegmentation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentforwardingfailuresduringsoftwaresegmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentforwardingfailuresduringsoftwaresegmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentsforwardedviaLSO sets the value of RSCsegmentsforwardedviaLSO for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentsforwardedviaLSO(value uint32) (err error) { + return instance.SetProperty("RSCsegmentsforwardedviaLSO", (value)) +} + +// GetRSCsegmentsforwardedviaLSO gets the value of RSCsegmentsforwardedviaLSO for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentsforwardedviaLSO() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentsforwardedviaLSO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentsforwardedviasoftwaresegmentation sets the value of RSCsegmentsforwardedviasoftwaresegmentation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentsforwardedviasoftwaresegmentation(value uint32) (err error) { + return instance.SetProperty("RSCsegmentsforwardedviasoftwaresegmentation", (value)) +} + +// GetRSCsegmentsforwardedviasoftwaresegmentation gets the value of RSCsegmentsforwardedviasoftwaresegmentation for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentsforwardedviasoftwaresegmentation() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentsforwardedviasoftwaresegmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRSCsegmentsforwardedviasoftwaresegmentationandchecksum sets the value of RSCsegmentsforwardedviasoftwaresegmentationandchecksum for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyRSCsegmentsforwardedviasoftwaresegmentationandchecksum(value uint32) (err error) { + return instance.SetProperty("RSCsegmentsforwardedviasoftwaresegmentationandchecksum", (value)) +} + +// GetRSCsegmentsforwardedviasoftwaresegmentationandchecksum gets the value of RSCsegmentsforwardedviasoftwaresegmentationandchecksum for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyRSCsegmentsforwardedviasoftwaresegmentationandchecksum() (value uint32, err error) { + retValue, err := instance.GetProperty("RSCsegmentsforwardedviasoftwaresegmentationandchecksum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPchecksumerrors sets the value of TCPchecksumerrors for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPchecksumerrors(value uint32) (err error) { + return instance.SetProperty("TCPchecksumerrors", (value)) +} + +// GetTCPchecksumerrors gets the value of TCPchecksumerrors for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPchecksumerrors() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPchecksumerrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPconnectrequestsfallenoffloopbackfastpath sets the value of TCPconnectrequestsfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPconnectrequestsfallenoffloopbackfastpath(value uint32) (err error) { + return instance.SetProperty("TCPconnectrequestsfallenoffloopbackfastpath", (value)) +} + +// GetTCPconnectrequestsfallenoffloopbackfastpath gets the value of TCPconnectrequestsfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPconnectrequestsfallenoffloopbackfastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPconnectrequestsfallenoffloopbackfastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPconnectrequestsPersecfallenoffloopbackfastpath sets the value of TCPconnectrequestsPersecfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPconnectrequestsPersecfallenoffloopbackfastpath(value uint32) (err error) { + return instance.SetProperty("TCPconnectrequestsPersecfallenoffloopbackfastpath", (value)) +} + +// GetTCPconnectrequestsPersecfallenoffloopbackfastpath gets the value of TCPconnectrequestsPersecfallenoffloopbackfastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPconnectrequestsPersecfallenoffloopbackfastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPconnectrequestsPersecfallenoffloopbackfastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPinboundsegmentsnotprocessedviafastpath sets the value of TCPinboundsegmentsnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPinboundsegmentsnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("TCPinboundsegmentsnotprocessedviafastpath", (value)) +} + +// GetTCPinboundsegmentsnotprocessedviafastpath gets the value of TCPinboundsegmentsnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPinboundsegmentsnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPinboundsegmentsnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPinboundsegmentsPersecnotprocessedviafastpath sets the value of TCPinboundsegmentsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPinboundsegmentsPersecnotprocessedviafastpath(value uint32) (err error) { + return instance.SetProperty("TCPinboundsegmentsPersecnotprocessedviafastpath", (value)) +} + +// GetTCPinboundsegmentsPersecnotprocessedviafastpath gets the value of TCPinboundsegmentsPersecnotprocessedviafastpath for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPinboundsegmentsPersecnotprocessedviafastpath() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPinboundsegmentsPersecnotprocessedviafastpath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPtimeouts sets the value of TCPtimeouts for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) SetPropertyTCPtimeouts(value uint32) (err error) { + return instance.SetProperty("TCPtimeouts", (value)) +} + +// GetTCPtimeouts gets the value of TCPtimeouts for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnostics) GetPropertyTCPtimeouts() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPtimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go new file mode 100644 index 00000000..e017f8c5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU struct +type Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU struct { + *Win32_PerfRawData + + // + TCPcurrentconnections uint32 +} + +func NewWin32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPUEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPUEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTCPcurrentconnections sets the value of TCPcurrentconnections for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU) SetPropertyTCPcurrentconnections(value uint32) (err error) { + return instance.SetProperty("TCPcurrentconnections", (value)) +} + +// GetTCPcurrentconnections gets the value of TCPcurrentconnections for the instance +func (instance *Win32_PerfRawData_TCPIPCounters_TCPIPPerformanceDiagnosticsPerCPU) GetPropertyTCPcurrentconnections() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPcurrentconnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMP.go new file mode 100644 index 00000000..2cbad473 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMP.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_ICMP struct +type Win32_PerfRawData_Tcpip_ICMP struct { + *Win32_PerfRawData + + // + MessagesOutboundErrors uint32 + + // + MessagesPersec uint32 + + // + MessagesReceivedErrors uint32 + + // + MessagesReceivedPersec uint32 + + // + MessagesSentPersec uint32 + + // + ReceivedAddressMask uint32 + + // + ReceivedAddressMaskReply uint32 + + // + ReceivedDestUnreachable uint32 + + // + ReceivedEchoPersec uint32 + + // + ReceivedEchoReplyPersec uint32 + + // + ReceivedParameterProblem uint32 + + // + ReceivedRedirectPersec uint32 + + // + ReceivedSourceQuench uint32 + + // + ReceivedTimeExceeded uint32 + + // + ReceivedTimestampPersec uint32 + + // + ReceivedTimestampReplyPersec uint32 + + // + SentAddressMask uint32 + + // + SentAddressMaskReply uint32 + + // + SentDestinationUnreachable uint32 + + // + SentEchoPersec uint32 + + // + SentEchoReplyPersec uint32 + + // + SentParameterProblem uint32 + + // + SentRedirectPersec uint32 + + // + SentSourceQuench uint32 + + // + SentTimeExceeded uint32 + + // + SentTimestampPersec uint32 + + // + SentTimestampReplyPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_ICMPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_ICMP, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_ICMP{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_ICMPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_ICMP, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_ICMP{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMessagesOutboundErrors sets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyMessagesOutboundErrors(value uint32) (err error) { + return instance.SetProperty("MessagesOutboundErrors", (value)) +} + +// GetMessagesOutboundErrors gets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyMessagesOutboundErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesPersec sets the value of MessagesPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyMessagesPersec(value uint32) (err error) { + return instance.SetProperty("MessagesPersec", (value)) +} + +// GetMessagesPersec gets the value of MessagesPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyMessagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedErrors sets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyMessagesReceivedErrors(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedErrors", (value)) +} + +// GetMessagesReceivedErrors gets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyMessagesReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedPersec sets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyMessagesReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedPersec", (value)) +} + +// GetMessagesReceivedPersec gets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyMessagesReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyMessagesSentPersec(value uint32) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyMessagesSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedAddressMask sets the value of ReceivedAddressMask for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedAddressMask(value uint32) (err error) { + return instance.SetProperty("ReceivedAddressMask", (value)) +} + +// GetReceivedAddressMask gets the value of ReceivedAddressMask for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedAddressMask() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedAddressMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedAddressMaskReply sets the value of ReceivedAddressMaskReply for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedAddressMaskReply(value uint32) (err error) { + return instance.SetProperty("ReceivedAddressMaskReply", (value)) +} + +// GetReceivedAddressMaskReply gets the value of ReceivedAddressMaskReply for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedAddressMaskReply() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedAddressMaskReply") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedDestUnreachable sets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedDestUnreachable(value uint32) (err error) { + return instance.SetProperty("ReceivedDestUnreachable", (value)) +} + +// GetReceivedDestUnreachable gets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedDestUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedDestUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoPersec sets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedEchoPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoPersec", (value)) +} + +// GetReceivedEchoPersec gets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoReplyPersec sets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoReplyPersec", (value)) +} + +// GetReceivedEchoReplyPersec gets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedParameterProblem sets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedParameterProblem(value uint32) (err error) { + return instance.SetProperty("ReceivedParameterProblem", (value)) +} + +// GetReceivedParameterProblem gets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRedirectPersec sets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedRedirectPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedRedirectPersec", (value)) +} + +// GetReceivedRedirectPersec gets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedSourceQuench sets the value of ReceivedSourceQuench for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedSourceQuench(value uint32) (err error) { + return instance.SetProperty("ReceivedSourceQuench", (value)) +} + +// GetReceivedSourceQuench gets the value of ReceivedSourceQuench for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedSourceQuench() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedSourceQuench") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimeExceeded sets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedTimeExceeded(value uint32) (err error) { + return instance.SetProperty("ReceivedTimeExceeded", (value)) +} + +// GetReceivedTimeExceeded gets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimestampPersec sets the value of ReceivedTimestampPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedTimestampPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedTimestampPersec", (value)) +} + +// GetReceivedTimestampPersec gets the value of ReceivedTimestampPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedTimestampPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimestampPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimestampReplyPersec sets the value of ReceivedTimestampReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertyReceivedTimestampReplyPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedTimestampReplyPersec", (value)) +} + +// GetReceivedTimestampReplyPersec gets the value of ReceivedTimestampReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertyReceivedTimestampReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimestampReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentAddressMask sets the value of SentAddressMask for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentAddressMask(value uint32) (err error) { + return instance.SetProperty("SentAddressMask", (value)) +} + +// GetSentAddressMask gets the value of SentAddressMask for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentAddressMask() (value uint32, err error) { + retValue, err := instance.GetProperty("SentAddressMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentAddressMaskReply sets the value of SentAddressMaskReply for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentAddressMaskReply(value uint32) (err error) { + return instance.SetProperty("SentAddressMaskReply", (value)) +} + +// GetSentAddressMaskReply gets the value of SentAddressMaskReply for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentAddressMaskReply() (value uint32, err error) { + retValue, err := instance.GetProperty("SentAddressMaskReply") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentDestinationUnreachable sets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentDestinationUnreachable(value uint32) (err error) { + return instance.SetProperty("SentDestinationUnreachable", (value)) +} + +// GetSentDestinationUnreachable gets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentDestinationUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("SentDestinationUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoPersec sets the value of SentEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentEchoPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoPersec", (value)) +} + +// GetSentEchoPersec gets the value of SentEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoReplyPersec sets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoReplyPersec", (value)) +} + +// GetSentEchoReplyPersec gets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentParameterProblem sets the value of SentParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentParameterProblem(value uint32) (err error) { + return instance.SetProperty("SentParameterProblem", (value)) +} + +// GetSentParameterProblem gets the value of SentParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("SentParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRedirectPersec sets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentRedirectPersec(value uint32) (err error) { + return instance.SetProperty("SentRedirectPersec", (value)) +} + +// GetSentRedirectPersec gets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentSourceQuench sets the value of SentSourceQuench for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentSourceQuench(value uint32) (err error) { + return instance.SetProperty("SentSourceQuench", (value)) +} + +// GetSentSourceQuench gets the value of SentSourceQuench for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentSourceQuench() (value uint32, err error) { + retValue, err := instance.GetProperty("SentSourceQuench") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimeExceeded sets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentTimeExceeded(value uint32) (err error) { + return instance.SetProperty("SentTimeExceeded", (value)) +} + +// GetSentTimeExceeded gets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimestampPersec sets the value of SentTimestampPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentTimestampPersec(value uint32) (err error) { + return instance.SetProperty("SentTimestampPersec", (value)) +} + +// GetSentTimestampPersec gets the value of SentTimestampPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentTimestampPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimestampPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimestampReplyPersec sets the value of SentTimestampReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) SetPropertySentTimestampReplyPersec(value uint32) (err error) { + return instance.SetProperty("SentTimestampReplyPersec", (value)) +} + +// GetSentTimestampReplyPersec gets the value of SentTimestampReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMP) GetPropertySentTimestampReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimestampReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMPv6.go new file mode 100644 index 00000000..1710bf4a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_ICMPv6.go @@ -0,0 +1,1040 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_ICMPv6 struct +type Win32_PerfRawData_Tcpip_ICMPv6 struct { + *Win32_PerfRawData + + // + MessagesOutboundErrors uint32 + + // + MessagesPersec uint32 + + // + MessagesReceivedErrors uint32 + + // + MessagesReceivedPersec uint32 + + // + MessagesSentPersec uint32 + + // + ReceivedDestUnreachable uint32 + + // + ReceivedEchoPersec uint32 + + // + ReceivedEchoReplyPersec uint32 + + // + ReceivedMembershipQuery uint32 + + // + ReceivedMembershipReduction uint32 + + // + ReceivedMembershipReport uint32 + + // + ReceivedNeighborAdvert uint32 + + // + ReceivedNeighborSolicit uint32 + + // + ReceivedPacketTooBig uint32 + + // + ReceivedParameterProblem uint32 + + // + ReceivedRedirectPersec uint32 + + // + ReceivedRouterAdvert uint32 + + // + ReceivedRouterSolicit uint32 + + // + ReceivedTimeExceeded uint32 + + // + SentDestinationUnreachable uint32 + + // + SentEchoPersec uint32 + + // + SentEchoReplyPersec uint32 + + // + SentMembershipQuery uint32 + + // + SentMembershipReduction uint32 + + // + SentMembershipReport uint32 + + // + SentNeighborAdvert uint32 + + // + SentNeighborSolicit uint32 + + // + SentPacketTooBig uint32 + + // + SentParameterProblem uint32 + + // + SentRedirectPersec uint32 + + // + SentRouterAdvert uint32 + + // + SentRouterSolicit uint32 + + // + SentTimeExceeded uint32 +} + +func NewWin32_PerfRawData_Tcpip_ICMPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_ICMPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_ICMPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_ICMPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_ICMPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_ICMPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetMessagesOutboundErrors sets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyMessagesOutboundErrors(value uint32) (err error) { + return instance.SetProperty("MessagesOutboundErrors", (value)) +} + +// GetMessagesOutboundErrors gets the value of MessagesOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyMessagesOutboundErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesPersec sets the value of MessagesPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyMessagesPersec(value uint32) (err error) { + return instance.SetProperty("MessagesPersec", (value)) +} + +// GetMessagesPersec gets the value of MessagesPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyMessagesPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedErrors sets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyMessagesReceivedErrors(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedErrors", (value)) +} + +// GetMessagesReceivedErrors gets the value of MessagesReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyMessagesReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesReceivedPersec sets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyMessagesReceivedPersec(value uint32) (err error) { + return instance.SetProperty("MessagesReceivedPersec", (value)) +} + +// GetMessagesReceivedPersec gets the value of MessagesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyMessagesReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMessagesSentPersec sets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyMessagesSentPersec(value uint32) (err error) { + return instance.SetProperty("MessagesSentPersec", (value)) +} + +// GetMessagesSentPersec gets the value of MessagesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyMessagesSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("MessagesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedDestUnreachable sets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedDestUnreachable(value uint32) (err error) { + return instance.SetProperty("ReceivedDestUnreachable", (value)) +} + +// GetReceivedDestUnreachable gets the value of ReceivedDestUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedDestUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedDestUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoPersec sets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedEchoPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoPersec", (value)) +} + +// GetReceivedEchoPersec gets the value of ReceivedEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedEchoReplyPersec sets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedEchoReplyPersec", (value)) +} + +// GetReceivedEchoReplyPersec gets the value of ReceivedEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedMembershipQuery sets the value of ReceivedMembershipQuery for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedMembershipQuery(value uint32) (err error) { + return instance.SetProperty("ReceivedMembershipQuery", (value)) +} + +// GetReceivedMembershipQuery gets the value of ReceivedMembershipQuery for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedMembershipQuery() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedMembershipQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedMembershipReduction sets the value of ReceivedMembershipReduction for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedMembershipReduction(value uint32) (err error) { + return instance.SetProperty("ReceivedMembershipReduction", (value)) +} + +// GetReceivedMembershipReduction gets the value of ReceivedMembershipReduction for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedMembershipReduction() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedMembershipReduction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedMembershipReport sets the value of ReceivedMembershipReport for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedMembershipReport(value uint32) (err error) { + return instance.SetProperty("ReceivedMembershipReport", (value)) +} + +// GetReceivedMembershipReport gets the value of ReceivedMembershipReport for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedMembershipReport() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedMembershipReport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedNeighborAdvert sets the value of ReceivedNeighborAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedNeighborAdvert(value uint32) (err error) { + return instance.SetProperty("ReceivedNeighborAdvert", (value)) +} + +// GetReceivedNeighborAdvert gets the value of ReceivedNeighborAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedNeighborAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedNeighborAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedNeighborSolicit sets the value of ReceivedNeighborSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedNeighborSolicit(value uint32) (err error) { + return instance.SetProperty("ReceivedNeighborSolicit", (value)) +} + +// GetReceivedNeighborSolicit gets the value of ReceivedNeighborSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedNeighborSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedNeighborSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedPacketTooBig sets the value of ReceivedPacketTooBig for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedPacketTooBig(value uint32) (err error) { + return instance.SetProperty("ReceivedPacketTooBig", (value)) +} + +// GetReceivedPacketTooBig gets the value of ReceivedPacketTooBig for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedPacketTooBig() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedPacketTooBig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedParameterProblem sets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedParameterProblem(value uint32) (err error) { + return instance.SetProperty("ReceivedParameterProblem", (value)) +} + +// GetReceivedParameterProblem gets the value of ReceivedParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRedirectPersec sets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedRedirectPersec(value uint32) (err error) { + return instance.SetProperty("ReceivedRedirectPersec", (value)) +} + +// GetReceivedRedirectPersec gets the value of ReceivedRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRouterAdvert sets the value of ReceivedRouterAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedRouterAdvert(value uint32) (err error) { + return instance.SetProperty("ReceivedRouterAdvert", (value)) +} + +// GetReceivedRouterAdvert gets the value of ReceivedRouterAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedRouterAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRouterAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedRouterSolicit sets the value of ReceivedRouterSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedRouterSolicit(value uint32) (err error) { + return instance.SetProperty("ReceivedRouterSolicit", (value)) +} + +// GetReceivedRouterSolicit gets the value of ReceivedRouterSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedRouterSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedRouterSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedTimeExceeded sets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertyReceivedTimeExceeded(value uint32) (err error) { + return instance.SetProperty("ReceivedTimeExceeded", (value)) +} + +// GetReceivedTimeExceeded gets the value of ReceivedTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertyReceivedTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("ReceivedTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentDestinationUnreachable sets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentDestinationUnreachable(value uint32) (err error) { + return instance.SetProperty("SentDestinationUnreachable", (value)) +} + +// GetSentDestinationUnreachable gets the value of SentDestinationUnreachable for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentDestinationUnreachable() (value uint32, err error) { + retValue, err := instance.GetProperty("SentDestinationUnreachable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoPersec sets the value of SentEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentEchoPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoPersec", (value)) +} + +// GetSentEchoPersec gets the value of SentEchoPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentEchoPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentEchoReplyPersec sets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentEchoReplyPersec(value uint32) (err error) { + return instance.SetProperty("SentEchoReplyPersec", (value)) +} + +// GetSentEchoReplyPersec gets the value of SentEchoReplyPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentEchoReplyPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentEchoReplyPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentMembershipQuery sets the value of SentMembershipQuery for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentMembershipQuery(value uint32) (err error) { + return instance.SetProperty("SentMembershipQuery", (value)) +} + +// GetSentMembershipQuery gets the value of SentMembershipQuery for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentMembershipQuery() (value uint32, err error) { + retValue, err := instance.GetProperty("SentMembershipQuery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentMembershipReduction sets the value of SentMembershipReduction for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentMembershipReduction(value uint32) (err error) { + return instance.SetProperty("SentMembershipReduction", (value)) +} + +// GetSentMembershipReduction gets the value of SentMembershipReduction for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentMembershipReduction() (value uint32, err error) { + retValue, err := instance.GetProperty("SentMembershipReduction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentMembershipReport sets the value of SentMembershipReport for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentMembershipReport(value uint32) (err error) { + return instance.SetProperty("SentMembershipReport", (value)) +} + +// GetSentMembershipReport gets the value of SentMembershipReport for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentMembershipReport() (value uint32, err error) { + retValue, err := instance.GetProperty("SentMembershipReport") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentNeighborAdvert sets the value of SentNeighborAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentNeighborAdvert(value uint32) (err error) { + return instance.SetProperty("SentNeighborAdvert", (value)) +} + +// GetSentNeighborAdvert gets the value of SentNeighborAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentNeighborAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("SentNeighborAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentNeighborSolicit sets the value of SentNeighborSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentNeighborSolicit(value uint32) (err error) { + return instance.SetProperty("SentNeighborSolicit", (value)) +} + +// GetSentNeighborSolicit gets the value of SentNeighborSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentNeighborSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("SentNeighborSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentPacketTooBig sets the value of SentPacketTooBig for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentPacketTooBig(value uint32) (err error) { + return instance.SetProperty("SentPacketTooBig", (value)) +} + +// GetSentPacketTooBig gets the value of SentPacketTooBig for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentPacketTooBig() (value uint32, err error) { + retValue, err := instance.GetProperty("SentPacketTooBig") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentParameterProblem sets the value of SentParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentParameterProblem(value uint32) (err error) { + return instance.SetProperty("SentParameterProblem", (value)) +} + +// GetSentParameterProblem gets the value of SentParameterProblem for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentParameterProblem() (value uint32, err error) { + retValue, err := instance.GetProperty("SentParameterProblem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRedirectPersec sets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentRedirectPersec(value uint32) (err error) { + return instance.SetProperty("SentRedirectPersec", (value)) +} + +// GetSentRedirectPersec gets the value of SentRedirectPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentRedirectPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRedirectPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRouterAdvert sets the value of SentRouterAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentRouterAdvert(value uint32) (err error) { + return instance.SetProperty("SentRouterAdvert", (value)) +} + +// GetSentRouterAdvert gets the value of SentRouterAdvert for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentRouterAdvert() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRouterAdvert") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentRouterSolicit sets the value of SentRouterSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentRouterSolicit(value uint32) (err error) { + return instance.SetProperty("SentRouterSolicit", (value)) +} + +// GetSentRouterSolicit gets the value of SentRouterSolicit for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentRouterSolicit() (value uint32, err error) { + retValue, err := instance.GetProperty("SentRouterSolicit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentTimeExceeded sets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) SetPropertySentTimeExceeded(value uint32) (err error) { + return instance.SetProperty("SentTimeExceeded", (value)) +} + +// GetSentTimeExceeded gets the value of SentTimeExceeded for the instance +func (instance *Win32_PerfRawData_Tcpip_ICMPv6) GetPropertySentTimeExceeded() (value uint32, err error) { + retValue, err := instance.GetProperty("SentTimeExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv4.go new file mode 100644 index 00000000..2b146f88 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv4.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_IPv4 struct +type Win32_PerfRawData_Tcpip_IPv4 struct { + *Win32_PerfRawData + + // + DatagramsForwardedPersec uint32 + + // + DatagramsOutboundDiscarded uint32 + + // + DatagramsOutboundNoRoute uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedAddressErrors uint32 + + // + DatagramsReceivedDeliveredPersec uint32 + + // + DatagramsReceivedDiscarded uint32 + + // + DatagramsReceivedHeaderErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsReceivedUnknownProtocol uint32 + + // + DatagramsSentPersec uint32 + + // + FragmentationFailures uint32 + + // + FragmentedDatagramsPersec uint32 + + // + FragmentReassemblyFailures uint32 + + // + FragmentsCreatedPersec uint32 + + // + FragmentsReassembledPersec uint32 + + // + FragmentsReceivedPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_IPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_IPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_IPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_IPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_IPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_IPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatagramsForwardedPersec sets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsForwardedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsForwardedPersec", (value)) +} + +// GetDatagramsForwardedPersec gets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsForwardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundDiscarded sets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsOutboundDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundDiscarded", (value)) +} + +// GetDatagramsOutboundDiscarded gets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsOutboundDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundNoRoute sets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsOutboundNoRoute(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundNoRoute", (value)) +} + +// GetDatagramsOutboundNoRoute gets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsOutboundNoRoute() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundNoRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedAddressErrors sets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsReceivedAddressErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedAddressErrors", (value)) +} + +// GetDatagramsReceivedAddressErrors gets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsReceivedAddressErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedAddressErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDeliveredPersec sets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsReceivedDeliveredPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDeliveredPersec", (value)) +} + +// GetDatagramsReceivedDeliveredPersec gets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsReceivedDeliveredPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDeliveredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDiscarded sets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsReceivedDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDiscarded", (value)) +} + +// GetDatagramsReceivedDiscarded gets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsReceivedDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedHeaderErrors sets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsReceivedHeaderErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedHeaderErrors", (value)) +} + +// GetDatagramsReceivedHeaderErrors gets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsReceivedHeaderErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedHeaderErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedUnknownProtocol sets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsReceivedUnknownProtocol(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedUnknownProtocol", (value)) +} + +// GetDatagramsReceivedUnknownProtocol gets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsReceivedUnknownProtocol() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedUnknownProtocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentationFailures sets the value of FragmentationFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyFragmentationFailures(value uint32) (err error) { + return instance.SetProperty("FragmentationFailures", (value)) +} + +// GetFragmentationFailures gets the value of FragmentationFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyFragmentationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentedDatagramsPersec sets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyFragmentedDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("FragmentedDatagramsPersec", (value)) +} + +// GetFragmentedDatagramsPersec gets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyFragmentedDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentedDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentReassemblyFailures sets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyFragmentReassemblyFailures(value uint32) (err error) { + return instance.SetProperty("FragmentReassemblyFailures", (value)) +} + +// GetFragmentReassemblyFailures gets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyFragmentReassemblyFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentReassemblyFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsCreatedPersec sets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyFragmentsCreatedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsCreatedPersec", (value)) +} + +// GetFragmentsCreatedPersec gets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyFragmentsCreatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsCreatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReassembledPersec sets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyFragmentsReassembledPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReassembledPersec", (value)) +} + +// GetFragmentsReassembledPersec gets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyFragmentsReassembledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReassembledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReceivedPersec sets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) SetPropertyFragmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReceivedPersec", (value)) +} + +// GetFragmentsReceivedPersec gets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv4) GetPropertyFragmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv6.go new file mode 100644 index 00000000..a39aa2e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_IPv6.go @@ -0,0 +1,560 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_IPv6 struct +type Win32_PerfRawData_Tcpip_IPv6 struct { + *Win32_PerfRawData + + // + DatagramsForwardedPersec uint32 + + // + DatagramsOutboundDiscarded uint32 + + // + DatagramsOutboundNoRoute uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedAddressErrors uint32 + + // + DatagramsReceivedDeliveredPersec uint32 + + // + DatagramsReceivedDiscarded uint32 + + // + DatagramsReceivedHeaderErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsReceivedUnknownProtocol uint32 + + // + DatagramsSentPersec uint32 + + // + FragmentationFailures uint32 + + // + FragmentedDatagramsPersec uint32 + + // + FragmentReassemblyFailures uint32 + + // + FragmentsCreatedPersec uint32 + + // + FragmentsReassembledPersec uint32 + + // + FragmentsReceivedPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_IPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_IPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_IPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_IPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_IPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_IPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatagramsForwardedPersec sets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsForwardedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsForwardedPersec", (value)) +} + +// GetDatagramsForwardedPersec gets the value of DatagramsForwardedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsForwardedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsForwardedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundDiscarded sets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsOutboundDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundDiscarded", (value)) +} + +// GetDatagramsOutboundDiscarded gets the value of DatagramsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsOutboundDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsOutboundNoRoute sets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsOutboundNoRoute(value uint32) (err error) { + return instance.SetProperty("DatagramsOutboundNoRoute", (value)) +} + +// GetDatagramsOutboundNoRoute gets the value of DatagramsOutboundNoRoute for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsOutboundNoRoute() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsOutboundNoRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedAddressErrors sets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsReceivedAddressErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedAddressErrors", (value)) +} + +// GetDatagramsReceivedAddressErrors gets the value of DatagramsReceivedAddressErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsReceivedAddressErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedAddressErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDeliveredPersec sets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsReceivedDeliveredPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDeliveredPersec", (value)) +} + +// GetDatagramsReceivedDeliveredPersec gets the value of DatagramsReceivedDeliveredPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsReceivedDeliveredPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDeliveredPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedDiscarded sets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsReceivedDiscarded(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedDiscarded", (value)) +} + +// GetDatagramsReceivedDiscarded gets the value of DatagramsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsReceivedDiscarded() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedHeaderErrors sets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsReceivedHeaderErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedHeaderErrors", (value)) +} + +// GetDatagramsReceivedHeaderErrors gets the value of DatagramsReceivedHeaderErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsReceivedHeaderErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedHeaderErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedUnknownProtocol sets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsReceivedUnknownProtocol(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedUnknownProtocol", (value)) +} + +// GetDatagramsReceivedUnknownProtocol gets the value of DatagramsReceivedUnknownProtocol for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsReceivedUnknownProtocol() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedUnknownProtocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentationFailures sets the value of FragmentationFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyFragmentationFailures(value uint32) (err error) { + return instance.SetProperty("FragmentationFailures", (value)) +} + +// GetFragmentationFailures gets the value of FragmentationFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyFragmentationFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentationFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentedDatagramsPersec sets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyFragmentedDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("FragmentedDatagramsPersec", (value)) +} + +// GetFragmentedDatagramsPersec gets the value of FragmentedDatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyFragmentedDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentedDatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentReassemblyFailures sets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyFragmentReassemblyFailures(value uint32) (err error) { + return instance.SetProperty("FragmentReassemblyFailures", (value)) +} + +// GetFragmentReassemblyFailures gets the value of FragmentReassemblyFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyFragmentReassemblyFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentReassemblyFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsCreatedPersec sets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyFragmentsCreatedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsCreatedPersec", (value)) +} + +// GetFragmentsCreatedPersec gets the value of FragmentsCreatedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyFragmentsCreatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsCreatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReassembledPersec sets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyFragmentsReassembledPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReassembledPersec", (value)) +} + +// GetFragmentsReassembledPersec gets the value of FragmentsReassembledPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyFragmentsReassembledPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReassembledPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFragmentsReceivedPersec sets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) SetPropertyFragmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("FragmentsReceivedPersec", (value)) +} + +// GetFragmentsReceivedPersec gets the value of FragmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_IPv6) GetPropertyFragmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FragmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NBTConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NBTConnection.go new file mode 100644 index 00000000..0d7075b3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NBTConnection.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_NBTConnection struct +type Win32_PerfRawData_Tcpip_NBTConnection struct { + *Win32_PerfRawData + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTotalPersec uint64 +} + +func NewWin32_PerfRawData_Tcpip_NBTConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_NBTConnection, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_NBTConnection{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_NBTConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_NBTConnection, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_NBTConnection{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NBTConnection) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NBTConnection) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NBTConnection) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NBTConnection) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NBTConnection) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NBTConnection) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkAdapter.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkAdapter.go new file mode 100644 index 00000000..4d798fa4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkAdapter.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_NetworkAdapter struct +type Win32_PerfRawData_Tcpip_NetworkAdapter struct { + *Win32_PerfRawData + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTotalPersec uint64 + + // + CurrentBandwidth uint64 + + // + OffloadedConnections uint64 + + // + OutputQueueLength uint64 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedNonUnicastPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsReceivedUnicastPersec uint64 + + // + PacketsReceivedUnknown uint64 + + // + PacketsSentNonUnicastPersec uint64 + + // + PacketsSentPersec uint64 + + // + PacketsSentUnicastPersec uint64 + + // + TCPActiveRSCConnections uint64 + + // + TCPRSCAveragePacketSize uint64 + + // + TCPRSCCoalescedPacketsPersec uint64 + + // + TCPRSCExceptionsPersec uint64 +} + +func NewWin32_PerfRawData_Tcpip_NetworkAdapterEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_NetworkAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_NetworkAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_NetworkAdapterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_NetworkAdapter, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_NetworkAdapter{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentBandwidth sets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyCurrentBandwidth(value uint64) (err error) { + return instance.SetProperty("CurrentBandwidth", (value)) +} + +// GetCurrentBandwidth gets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyCurrentBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOffloadedConnections sets the value of OffloadedConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyOffloadedConnections(value uint64) (err error) { + return instance.SetProperty("OffloadedConnections", (value)) +} + +// GetOffloadedConnections gets the value of OffloadedConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyOffloadedConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("OffloadedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutputQueueLength sets the value of OutputQueueLength for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyOutputQueueLength(value uint64) (err error) { + return instance.SetProperty("OutputQueueLength", (value)) +} + +// GetOutputQueueLength gets the value of OutputQueueLength for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyOutputQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("OutputQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedNonUnicastPersec sets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedNonUnicastPersec", (value)) +} + +// GetPacketsReceivedNonUnicastPersec gets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnicastPersec sets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnicastPersec", (value)) +} + +// GetPacketsReceivedUnicastPersec gets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnknown sets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsReceivedUnknown(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnknown", (value)) +} + +// GetPacketsReceivedUnknown gets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsReceivedUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentNonUnicastPersec sets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsSentNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentNonUnicastPersec", (value)) +} + +// GetPacketsSentNonUnicastPersec gets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsSentNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentUnicastPersec sets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyPacketsSentUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentUnicastPersec", (value)) +} + +// GetPacketsSentUnicastPersec gets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyPacketsSentUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPActiveRSCConnections sets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyTCPActiveRSCConnections(value uint64) (err error) { + return instance.SetProperty("TCPActiveRSCConnections", (value)) +} + +// GetTCPActiveRSCConnections gets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyTCPActiveRSCConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPActiveRSCConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCAveragePacketSize sets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyTCPRSCAveragePacketSize(value uint64) (err error) { + return instance.SetProperty("TCPRSCAveragePacketSize", (value)) +} + +// GetTCPRSCAveragePacketSize gets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyTCPRSCAveragePacketSize() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCAveragePacketSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCCoalescedPacketsPersec sets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyTCPRSCCoalescedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCCoalescedPacketsPersec", (value)) +} + +// GetTCPRSCCoalescedPacketsPersec gets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyTCPRSCCoalescedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCCoalescedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCExceptionsPersec sets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) SetPropertyTCPRSCExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCExceptionsPersec", (value)) +} + +// GetTCPRSCExceptionsPersec gets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkAdapter) GetPropertyTCPRSCExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkInterface.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkInterface.go new file mode 100644 index 00000000..db6bf62f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_NetworkInterface.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_NetworkInterface struct +type Win32_PerfRawData_Tcpip_NetworkInterface struct { + *Win32_PerfRawData + + // + BytesReceivedPersec uint64 + + // + BytesSentPersec uint64 + + // + BytesTotalPersec uint64 + + // + CurrentBandwidth uint64 + + // + OffloadedConnections uint64 + + // + OutputQueueLength uint64 + + // + PacketsOutboundDiscarded uint64 + + // + PacketsOutboundErrors uint64 + + // + PacketsPersec uint64 + + // + PacketsReceivedDiscarded uint64 + + // + PacketsReceivedErrors uint64 + + // + PacketsReceivedNonUnicastPersec uint64 + + // + PacketsReceivedPersec uint64 + + // + PacketsReceivedUnicastPersec uint64 + + // + PacketsReceivedUnknown uint64 + + // + PacketsSentNonUnicastPersec uint64 + + // + PacketsSentPersec uint64 + + // + PacketsSentUnicastPersec uint64 + + // + TCPActiveRSCConnections uint64 + + // + TCPRSCAveragePacketSize uint64 + + // + TCPRSCCoalescedPacketsPersec uint64 + + // + TCPRSCExceptionsPersec uint64 +} + +func NewWin32_PerfRawData_Tcpip_NetworkInterfaceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_NetworkInterface, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_NetworkInterface{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_NetworkInterfaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_NetworkInterface, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_NetworkInterface{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBytesReceivedPersec sets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyBytesReceivedPersec(value uint64) (err error) { + return instance.SetProperty("BytesReceivedPersec", (value)) +} + +// GetBytesReceivedPersec gets the value of BytesReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyBytesReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesSentPersec sets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyBytesSentPersec(value uint64) (err error) { + return instance.SetProperty("BytesSentPersec", (value)) +} + +// GetBytesSentPersec gets the value of BytesSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyBytesSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotalPersec sets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyBytesTotalPersec(value uint64) (err error) { + return instance.SetProperty("BytesTotalPersec", (value)) +} + +// GetBytesTotalPersec gets the value of BytesTotalPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyBytesTotalPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotalPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentBandwidth sets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyCurrentBandwidth(value uint64) (err error) { + return instance.SetProperty("CurrentBandwidth", (value)) +} + +// GetCurrentBandwidth gets the value of CurrentBandwidth for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyCurrentBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOffloadedConnections sets the value of OffloadedConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyOffloadedConnections(value uint64) (err error) { + return instance.SetProperty("OffloadedConnections", (value)) +} + +// GetOffloadedConnections gets the value of OffloadedConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyOffloadedConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("OffloadedConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutputQueueLength sets the value of OutputQueueLength for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyOutputQueueLength(value uint64) (err error) { + return instance.SetProperty("OutputQueueLength", (value)) +} + +// GetOutputQueueLength gets the value of OutputQueueLength for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyOutputQueueLength() (value uint64, err error) { + retValue, err := instance.GetProperty("OutputQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundDiscarded sets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsOutboundDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundDiscarded", (value)) +} + +// GetPacketsOutboundDiscarded gets the value of PacketsOutboundDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsOutboundDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsOutboundErrors sets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsOutboundErrors(value uint64) (err error) { + return instance.SetProperty("PacketsOutboundErrors", (value)) +} + +// GetPacketsOutboundErrors gets the value of PacketsOutboundErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsOutboundErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsOutboundErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsPersec sets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsPersec(value uint64) (err error) { + return instance.SetProperty("PacketsPersec", (value)) +} + +// GetPacketsPersec gets the value of PacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedDiscarded sets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedDiscarded(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedDiscarded", (value)) +} + +// GetPacketsReceivedDiscarded gets the value of PacketsReceivedDiscarded for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedDiscarded() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedDiscarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedErrors sets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedErrors(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedErrors", (value)) +} + +// GetPacketsReceivedErrors gets the value of PacketsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedErrors() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedNonUnicastPersec sets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedNonUnicastPersec", (value)) +} + +// GetPacketsReceivedNonUnicastPersec gets the value of PacketsReceivedNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedPersec sets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedPersec", (value)) +} + +// GetPacketsReceivedPersec gets the value of PacketsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnicastPersec sets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnicastPersec", (value)) +} + +// GetPacketsReceivedUnicastPersec gets the value of PacketsReceivedUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsReceivedUnknown sets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsReceivedUnknown(value uint64) (err error) { + return instance.SetProperty("PacketsReceivedUnknown", (value)) +} + +// GetPacketsReceivedUnknown gets the value of PacketsReceivedUnknown for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsReceivedUnknown() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsReceivedUnknown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentNonUnicastPersec sets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsSentNonUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentNonUnicastPersec", (value)) +} + +// GetPacketsSentNonUnicastPersec gets the value of PacketsSentNonUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsSentNonUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentNonUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentPersec sets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsSentPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentPersec", (value)) +} + +// GetPacketsSentPersec gets the value of PacketsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsSentPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsSentUnicastPersec sets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyPacketsSentUnicastPersec(value uint64) (err error) { + return instance.SetProperty("PacketsSentUnicastPersec", (value)) +} + +// GetPacketsSentUnicastPersec gets the value of PacketsSentUnicastPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyPacketsSentUnicastPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("PacketsSentUnicastPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPActiveRSCConnections sets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyTCPActiveRSCConnections(value uint64) (err error) { + return instance.SetProperty("TCPActiveRSCConnections", (value)) +} + +// GetTCPActiveRSCConnections gets the value of TCPActiveRSCConnections for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyTCPActiveRSCConnections() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPActiveRSCConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCAveragePacketSize sets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyTCPRSCAveragePacketSize(value uint64) (err error) { + return instance.SetProperty("TCPRSCAveragePacketSize", (value)) +} + +// GetTCPRSCAveragePacketSize gets the value of TCPRSCAveragePacketSize for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyTCPRSCAveragePacketSize() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCAveragePacketSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCCoalescedPacketsPersec sets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyTCPRSCCoalescedPacketsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCCoalescedPacketsPersec", (value)) +} + +// GetTCPRSCCoalescedPacketsPersec gets the value of TCPRSCCoalescedPacketsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyTCPRSCCoalescedPacketsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCCoalescedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTCPRSCExceptionsPersec sets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) SetPropertyTCPRSCExceptionsPersec(value uint64) (err error) { + return instance.SetProperty("TCPRSCExceptionsPersec", (value)) +} + +// GetTCPRSCExceptionsPersec gets the value of TCPRSCExceptionsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_NetworkInterface) GetPropertyTCPRSCExceptionsPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("TCPRSCExceptionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv4.go new file mode 100644 index 00000000..517b340f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv4.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_TCPv4 struct +type Win32_PerfRawData_Tcpip_TCPv4 struct { + *Win32_PerfRawData + + // + ConnectionFailures uint32 + + // + ConnectionsActive uint32 + + // + ConnectionsEstablished uint32 + + // + ConnectionsPassive uint32 + + // + ConnectionsReset uint32 + + // + SegmentsPersec uint32 + + // + SegmentsReceivedPersec uint32 + + // + SegmentsRetransmittedPersec uint32 + + // + SegmentsSentPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_TCPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_TCPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_TCPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_TCPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_TCPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_TCPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetConnectionFailures sets the value of ConnectionFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertyConnectionFailures(value uint32) (err error) { + return instance.SetProperty("ConnectionFailures", (value)) +} + +// GetConnectionFailures gets the value of ConnectionFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertyConnectionFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsActive sets the value of ConnectionsActive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertyConnectionsActive(value uint32) (err error) { + return instance.SetProperty("ConnectionsActive", (value)) +} + +// GetConnectionsActive gets the value of ConnectionsActive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertyConnectionsActive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsPassive sets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertyConnectionsPassive(value uint32) (err error) { + return instance.SetProperty("ConnectionsPassive", (value)) +} + +// GetConnectionsPassive gets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertyConnectionsPassive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsPassive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsReset sets the value of ConnectionsReset for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertyConnectionsReset(value uint32) (err error) { + return instance.SetProperty("ConnectionsReset", (value)) +} + +// GetConnectionsReset gets the value of ConnectionsReset for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertyConnectionsReset() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsPersec sets the value of SegmentsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertySegmentsPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsPersec", (value)) +} + +// GetSegmentsPersec gets the value of SegmentsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertySegmentsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsReceivedPersec sets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertySegmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsReceivedPersec", (value)) +} + +// GetSegmentsReceivedPersec gets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertySegmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsRetransmittedPersec sets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertySegmentsRetransmittedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsRetransmittedPersec", (value)) +} + +// GetSegmentsRetransmittedPersec gets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertySegmentsRetransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsRetransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsSentPersec sets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) SetPropertySegmentsSentPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsSentPersec", (value)) +} + +// GetSegmentsSentPersec gets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv4) GetPropertySegmentsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv6.go new file mode 100644 index 00000000..e7bd09d2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_TCPv6.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_TCPv6 struct +type Win32_PerfRawData_Tcpip_TCPv6 struct { + *Win32_PerfRawData + + // + ConnectionFailures uint32 + + // + ConnectionsActive uint32 + + // + ConnectionsEstablished uint32 + + // + ConnectionsPassive uint32 + + // + ConnectionsReset uint32 + + // + SegmentsPersec uint32 + + // + SegmentsReceivedPersec uint32 + + // + SegmentsRetransmittedPersec uint32 + + // + SegmentsSentPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_TCPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_TCPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_TCPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_TCPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_TCPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_TCPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetConnectionFailures sets the value of ConnectionFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertyConnectionFailures(value uint32) (err error) { + return instance.SetProperty("ConnectionFailures", (value)) +} + +// GetConnectionFailures gets the value of ConnectionFailures for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertyConnectionFailures() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionFailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsActive sets the value of ConnectionsActive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertyConnectionsActive(value uint32) (err error) { + return instance.SetProperty("ConnectionsActive", (value)) +} + +// GetConnectionsActive gets the value of ConnectionsActive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertyConnectionsActive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsEstablished sets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertyConnectionsEstablished(value uint32) (err error) { + return instance.SetProperty("ConnectionsEstablished", (value)) +} + +// GetConnectionsEstablished gets the value of ConnectionsEstablished for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertyConnectionsEstablished() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsEstablished") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsPassive sets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertyConnectionsPassive(value uint32) (err error) { + return instance.SetProperty("ConnectionsPassive", (value)) +} + +// GetConnectionsPassive gets the value of ConnectionsPassive for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertyConnectionsPassive() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsPassive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConnectionsReset sets the value of ConnectionsReset for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertyConnectionsReset(value uint32) (err error) { + return instance.SetProperty("ConnectionsReset", (value)) +} + +// GetConnectionsReset gets the value of ConnectionsReset for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertyConnectionsReset() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionsReset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsPersec sets the value of SegmentsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertySegmentsPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsPersec", (value)) +} + +// GetSegmentsPersec gets the value of SegmentsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertySegmentsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsReceivedPersec sets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertySegmentsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsReceivedPersec", (value)) +} + +// GetSegmentsReceivedPersec gets the value of SegmentsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertySegmentsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsRetransmittedPersec sets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertySegmentsRetransmittedPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsRetransmittedPersec", (value)) +} + +// GetSegmentsRetransmittedPersec gets the value of SegmentsRetransmittedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertySegmentsRetransmittedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsRetransmittedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSegmentsSentPersec sets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) SetPropertySegmentsSentPersec(value uint32) (err error) { + return instance.SetProperty("SegmentsSentPersec", (value)) +} + +// GetSegmentsSentPersec gets the value of SegmentsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_TCPv6) GetPropertySegmentsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv4.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv4.go new file mode 100644 index 00000000..a3d2978a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv4.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_UDPv4 struct +type Win32_PerfRawData_Tcpip_UDPv4 struct { + *Win32_PerfRawData + + // + DatagramsNoPortPersec uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsSentPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_UDPv4Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_UDPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_UDPv4{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_UDPv4Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_UDPv4, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_UDPv4{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatagramsNoPortPersec sets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) SetPropertyDatagramsNoPortPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsNoPortPersec", (value)) +} + +// GetDatagramsNoPortPersec gets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) GetPropertyDatagramsNoPortPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsNoPortPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedErrors sets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) SetPropertyDatagramsReceivedErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedErrors", (value)) +} + +// GetDatagramsReceivedErrors gets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) GetPropertyDatagramsReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv4) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv6.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv6.go new file mode 100644 index 00000000..aa194f40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_Tcpip_UDPv6.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_Tcpip_UDPv6 struct +type Win32_PerfRawData_Tcpip_UDPv6 struct { + *Win32_PerfRawData + + // + DatagramsNoPortPersec uint32 + + // + DatagramsPersec uint32 + + // + DatagramsReceivedErrors uint32 + + // + DatagramsReceivedPersec uint32 + + // + DatagramsSentPersec uint32 +} + +func NewWin32_PerfRawData_Tcpip_UDPv6Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_Tcpip_UDPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_UDPv6{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_Tcpip_UDPv6Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_Tcpip_UDPv6, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_Tcpip_UDPv6{ + Win32_PerfRawData: tmp, + } + return +} + +// SetDatagramsNoPortPersec sets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) SetPropertyDatagramsNoPortPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsNoPortPersec", (value)) +} + +// GetDatagramsNoPortPersec gets the value of DatagramsNoPortPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) GetPropertyDatagramsNoPortPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsNoPortPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsPersec sets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) SetPropertyDatagramsPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsPersec", (value)) +} + +// GetDatagramsPersec gets the value of DatagramsPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) GetPropertyDatagramsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedErrors sets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) SetPropertyDatagramsReceivedErrors(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedErrors", (value)) +} + +// GetDatagramsReceivedErrors gets the value of DatagramsReceivedErrors for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) GetPropertyDatagramsReceivedErrors() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedErrors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsReceivedPersec sets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) SetPropertyDatagramsReceivedPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsReceivedPersec", (value)) +} + +// GetDatagramsReceivedPersec gets the value of DatagramsReceivedPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) GetPropertyDatagramsReceivedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsReceivedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDatagramsSentPersec sets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) SetPropertyDatagramsSentPersec(value uint32) (err error) { + return instance.SetProperty("DatagramsSentPersec", (value)) +} + +// GetDatagramsSentPersec gets the value of DatagramsSentPersec for the instance +func (instance *Win32_PerfRawData_Tcpip_UDPv6) GetPropertyDatagramsSentPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DatagramsSentPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TermService_TerminalServicesSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TermService_TerminalServicesSession.go new file mode 100644 index 00000000..0562cf95 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_TermService_TerminalServicesSession.go @@ -0,0 +1,500 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_TermService_TerminalServicesSession struct +type Win32_PerfRawData_TermService_TerminalServicesSession struct { + *Win32_PerfRawData + + // + HandleCount uint32 + + // + PageFaultsPersec uint32 + + // + PageFileBytes uint64 + + // + PageFileBytesPeak uint64 + + // + PercentPrivilegedTime uint64 + + // + PercentProcessorTime uint64 + + // + PercentUserTime uint64 + + // + PoolNonpagedBytes uint32 + + // + PoolPagedBytes uint32 + + // + PrivateBytes uint64 + + // + ThreadCount uint32 + + // + VirtualBytes uint64 + + // + VirtualBytesPeak uint64 + + // + WorkingSet uint64 + + // + WorkingSetPeak uint64 +} + +func NewWin32_PerfRawData_TermService_TerminalServicesSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_TermService_TerminalServicesSession, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_TermService_TerminalServicesSession{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_TermService_TerminalServicesSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_TermService_TerminalServicesSession, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_TermService_TerminalServicesSession{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFaultsPersec sets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPageFaultsPersec(value uint32) (err error) { + return instance.SetProperty("PageFaultsPersec", (value)) +} + +// GetPageFaultsPersec gets the value of PageFaultsPersec for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPageFaultsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaultsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileBytes sets the value of PageFileBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPageFileBytes(value uint64) (err error) { + return instance.SetProperty("PageFileBytes", (value)) +} + +// GetPageFileBytes gets the value of PageFileBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPageFileBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFileBytesPeak sets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPageFileBytesPeak(value uint64) (err error) { + return instance.SetProperty("PageFileBytesPeak", (value)) +} + +// GetPageFileBytesPeak gets the value of PageFileBytesPeak for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPageFileBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("PageFileBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentPrivilegedTime sets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPercentPrivilegedTime(value uint64) (err error) { + return instance.SetProperty("PercentPrivilegedTime", (value)) +} + +// GetPercentPrivilegedTime gets the value of PercentPrivilegedTime for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPercentPrivilegedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentPrivilegedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentProcessorTime sets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPercentProcessorTime(value uint64) (err error) { + return instance.SetProperty("PercentProcessorTime", (value)) +} + +// GetPercentProcessorTime gets the value of PercentProcessorTime for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPercentProcessorTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentProcessorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPercentUserTime sets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPercentUserTime(value uint64) (err error) { + return instance.SetProperty("PercentUserTime", (value)) +} + +// GetPercentUserTime gets the value of PercentUserTime for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPercentUserTime() (value uint64, err error) { + retValue, err := instance.GetProperty("PercentUserTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPoolNonpagedBytes sets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPoolNonpagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolNonpagedBytes", (value)) +} + +// GetPoolNonpagedBytes gets the value of PoolNonpagedBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPoolNonpagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolNonpagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPoolPagedBytes sets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPoolPagedBytes(value uint32) (err error) { + return instance.SetProperty("PoolPagedBytes", (value)) +} + +// GetPoolPagedBytes gets the value of PoolPagedBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPoolPagedBytes() (value uint32, err error) { + retValue, err := instance.GetProperty("PoolPagedBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivateBytes sets the value of PrivateBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyPrivateBytes(value uint64) (err error) { + return instance.SetProperty("PrivateBytes", (value)) +} + +// GetPrivateBytes gets the value of PrivateBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyPrivateBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivateBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualBytes sets the value of VirtualBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyVirtualBytes(value uint64) (err error) { + return instance.SetProperty("VirtualBytes", (value)) +} + +// GetVirtualBytes gets the value of VirtualBytes for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyVirtualBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualBytesPeak sets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyVirtualBytesPeak(value uint64) (err error) { + return instance.SetProperty("VirtualBytesPeak", (value)) +} + +// GetVirtualBytesPeak gets the value of VirtualBytesPeak for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyVirtualBytesPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualBytesPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSet sets the value of WorkingSet for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyWorkingSet(value uint64) (err error) { + return instance.SetProperty("WorkingSet", (value)) +} + +// GetWorkingSet gets the value of WorkingSet for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyWorkingSet() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWorkingSetPeak sets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) SetPropertyWorkingSetPeak(value uint64) (err error) { + return instance.SetProperty("WorkingSetPeak", (value)) +} + +// GetWorkingSetPeak gets the value of WorkingSetPeak for the instance +func (instance *Win32_PerfRawData_TermService_TerminalServicesSession) GetPropertyWorkingSetPeak() (value uint64, err error) { + retValue, err := instance.GetProperty("WorkingSetPeak") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go new file mode 100644 index 00000000..0ca91b26 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO struct +type Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO struct { + *Win32_PerfRawData + + // + ReceiveMessageQuotaExceeded uint64 + + // + ReceiveQoSConformantMessagesPersec uint64 + + // + ReceiveQoSExemptMessagesPersec uint64 + + // + ReceiveQoSNonConformantMessagesPersec uint64 + + // + ReceiveQoSTotalMessageDelayTime100ns uint64 +} + +func NewWin32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIOEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIOEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO{ + Win32_PerfRawData: tmp, + } + return +} + +// SetReceiveMessageQuotaExceeded sets the value of ReceiveMessageQuotaExceeded for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveMessageQuotaExceeded(value uint64) (err error) { + return instance.SetProperty("ReceiveMessageQuotaExceeded", (value)) +} + +// GetReceiveMessageQuotaExceeded gets the value of ReceiveMessageQuotaExceeded for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveMessageQuotaExceeded() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveMessageQuotaExceeded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSConformantMessagesPersec sets the value of ReceiveQoSConformantMessagesPersec for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSConformantMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSConformantMessagesPersec", (value)) +} + +// GetReceiveQoSConformantMessagesPersec gets the value of ReceiveQoSConformantMessagesPersec for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSConformantMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSConformantMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSExemptMessagesPersec sets the value of ReceiveQoSExemptMessagesPersec for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSExemptMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSExemptMessagesPersec", (value)) +} + +// GetReceiveQoSExemptMessagesPersec gets the value of ReceiveQoSExemptMessagesPersec for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSExemptMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSExemptMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSNonConformantMessagesPersec sets the value of ReceiveQoSNonConformantMessagesPersec for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSNonConformantMessagesPersec(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSNonConformantMessagesPersec", (value)) +} + +// GetReceiveQoSNonConformantMessagesPersec gets the value of ReceiveQoSNonConformantMessagesPersec for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSNonConformantMessagesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSNonConformantMessagesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReceiveQoSTotalMessageDelayTime100ns sets the value of ReceiveQoSTotalMessageDelayTime100ns for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) SetPropertyReceiveQoSTotalMessageDelayTime100ns(value uint64) (err error) { + return instance.SetProperty("ReceiveQoSTotalMessageDelayTime100ns", (value)) +} + +// GetReceiveQoSTotalMessageDelayTime100ns gets the value of ReceiveQoSTotalMessageDelayTime100ns for the instance +func (instance *Win32_PerfRawData_VMBusPipeIOPerfProvider_HyperVVMVirtualDevicePipeIO) GetPropertyReceiveQoSTotalMessageDelayTime100ns() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceiveQoSTotalMessageDelayTime100ns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB.go new file mode 100644 index 00000000..59628a20 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB.go @@ -0,0 +1,620 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB struct +type Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB struct { + *Win32_PerfRawData + + // + AvgsecPerRequest uint32 + + // + AvgsecPerRequest_Base uint32 + + // + CurrentOpenFileCount uint32 + + // + CurrentPendingRequests uint32 + + // + DirectMappedPages uint64 + + // + DirectMappedSections uint32 + + // + FlushRequestsPersec uint32 + + // + ReadBytesPersec uint64 + + // + ReadBytesPersecRDMA uint64 + + // + ReadRequestsPersec uint32 + + // + ReadRequestsPersecRDMA uint32 + + // + ReceivedBytesPersec uint64 + + // + RequestsPersec uint32 + + // + SentBytesPersec uint64 + + // + TreeConnectCount uint32 + + // + WriteBytesPersec uint64 + + // + WriteBytesPersecRDMA uint64 + + // + WriteRequestsPersec uint32 + + // + WriteRequestsPersecRDMA uint32 +} + +func NewWin32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMBEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMBEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgsecPerRequest sets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyAvgsecPerRequest(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest", (value)) +} + +// GetAvgsecPerRequest gets the value of AvgsecPerRequest for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyAvgsecPerRequest() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgsecPerRequest_Base sets the value of AvgsecPerRequest_Base for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyAvgsecPerRequest_Base(value uint32) (err error) { + return instance.SetProperty("AvgsecPerRequest_Base", (value)) +} + +// GetAvgsecPerRequest_Base gets the value of AvgsecPerRequest_Base for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyAvgsecPerRequest_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgsecPerRequest_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentOpenFileCount sets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyCurrentOpenFileCount(value uint32) (err error) { + return instance.SetProperty("CurrentOpenFileCount", (value)) +} + +// GetCurrentOpenFileCount gets the value of CurrentOpenFileCount for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyCurrentOpenFileCount() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentOpenFileCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentPendingRequests sets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyCurrentPendingRequests(value uint32) (err error) { + return instance.SetProperty("CurrentPendingRequests", (value)) +} + +// GetCurrentPendingRequests gets the value of CurrentPendingRequests for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyCurrentPendingRequests() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentPendingRequests") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirectMappedPages sets the value of DirectMappedPages for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyDirectMappedPages(value uint64) (err error) { + return instance.SetProperty("DirectMappedPages", (value)) +} + +// GetDirectMappedPages gets the value of DirectMappedPages for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyDirectMappedPages() (value uint64, err error) { + retValue, err := instance.GetProperty("DirectMappedPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDirectMappedSections sets the value of DirectMappedSections for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyDirectMappedSections(value uint32) (err error) { + return instance.SetProperty("DirectMappedSections", (value)) +} + +// GetDirectMappedSections gets the value of DirectMappedSections for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyDirectMappedSections() (value uint32, err error) { + retValue, err := instance.GetProperty("DirectMappedSections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlushRequestsPersec sets the value of FlushRequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyFlushRequestsPersec(value uint32) (err error) { + return instance.SetProperty("FlushRequestsPersec", (value)) +} + +// GetFlushRequestsPersec gets the value of FlushRequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyFlushRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("FlushRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadBytesPersec sets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersec", (value)) +} + +// GetReadBytesPersec gets the value of ReadBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadBytesPersecRDMA sets the value of ReadBytesPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadBytesPersecRDMA(value uint64) (err error) { + return instance.SetProperty("ReadBytesPersecRDMA", (value)) +} + +// GetReadBytesPersecRDMA gets the value of ReadBytesPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadBytesPersecRDMA() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadBytesPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadRequestsPersec sets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadRequestsPersec(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersec", (value)) +} + +// GetReadRequestsPersec gets the value of ReadRequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadRequestsPersecRDMA sets the value of ReadRequestsPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReadRequestsPersecRDMA(value uint32) (err error) { + return instance.SetProperty("ReadRequestsPersecRDMA", (value)) +} + +// GetReadRequestsPersecRDMA gets the value of ReadRequestsPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReadRequestsPersecRDMA() (value uint32, err error) { + retValue, err := instance.GetProperty("ReadRequestsPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReceivedBytesPersec sets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyReceivedBytesPersec(value uint64) (err error) { + return instance.SetProperty("ReceivedBytesPersec", (value)) +} + +// GetReceivedBytesPersec gets the value of ReceivedBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyReceivedBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("ReceivedBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestsPersec sets the value of RequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyRequestsPersec(value uint32) (err error) { + return instance.SetProperty("RequestsPersec", (value)) +} + +// GetRequestsPersec gets the value of RequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("RequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSentBytesPersec sets the value of SentBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertySentBytesPersec(value uint64) (err error) { + return instance.SetProperty("SentBytesPersec", (value)) +} + +// GetSentBytesPersec gets the value of SentBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertySentBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("SentBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTreeConnectCount sets the value of TreeConnectCount for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyTreeConnectCount(value uint32) (err error) { + return instance.SetProperty("TreeConnectCount", (value)) +} + +// GetTreeConnectCount gets the value of TreeConnectCount for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyTreeConnectCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TreeConnectCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteBytesPersec sets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteBytesPersec(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersec", (value)) +} + +// GetWriteBytesPersec gets the value of WriteBytesPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteBytesPersec() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteBytesPersecRDMA sets the value of WriteBytesPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteBytesPersecRDMA(value uint64) (err error) { + return instance.SetProperty("WriteBytesPersecRDMA", (value)) +} + +// GetWriteBytesPersecRDMA gets the value of WriteBytesPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteBytesPersecRDMA() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteBytesPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteRequestsPersec sets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteRequestsPersec(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersec", (value)) +} + +// GetWriteRequestsPersec gets the value of WriteRequestsPersec for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteRequestsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteRequestsPersecRDMA sets the value of WriteRequestsPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) SetPropertyWriteRequestsPersecRDMA(value uint32) (err error) { + return instance.SetProperty("WriteRequestsPersecRDMA", (value)) +} + +// GetWriteRequestsPersecRDMA gets the value of WriteRequestsPersecRDMA for the instance +func (instance *Win32_PerfRawData_VSmbPerfProvider_HyperVVirtualSMB) GetPropertyWriteRequestsPersecRDMA() (value uint32, err error) { + retValue, err := instance.GetProperty("WriteRequestsPersecRDMA") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver.go new file mode 100644 index 00000000..d7c72ae4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver.go @@ -0,0 +1,69 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 3/19/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver struct +type Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver struct { + *Win32_PerfRawData + + // + VidPartitions uint64 +} + +func NewWin32_PerfRawData_VidPerfProvider_HyperVVMVidDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_VidPerfProvider_HyperVVMVidDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver{ + Win32_PerfRawData: tmp, + } + return +} + +// SetVidPartitions sets the value of VidPartitions for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver) SetPropertyVidPartitions(value uint64) (err error) { + return instance.SetProperty("VidPartitions", value) +} + +// GetVidPartitions gets the value of VidPartitions for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidDriver) GetPropertyVidPartitions() (value uint64, err error) { + retValue, err := instance.GetProperty("VidPartitions") + if err != nil { + return + } + value, ok := retValue.(uint64) + if !ok { + // TODO: Set an error + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode.go new file mode 100644 index 00000000..38759611 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode struct +type Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode struct { + *Win32_PerfRawData + + // + PageCount uint64 + + // + ProcessorCount uint64 +} + +func NewWin32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNodeEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNodeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode{ + Win32_PerfRawData: tmp, + } + return +} + +// SetPageCount sets the value of PageCount for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode) SetPropertyPageCount(value uint64) (err error) { + return instance.SetProperty("PageCount", (value)) +} + +// GetPageCount gets the value of PageCount for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode) GetPropertyPageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("PageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessorCount sets the value of ProcessorCount for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode) SetPropertyProcessorCount(value uint64) (err error) { + return instance.SetProperty("ProcessorCount", (value)) +} + +// GetProcessorCount gets the value of ProcessorCount for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidNumaNode) GetPropertyProcessorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ProcessorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition.go new file mode 100644 index 00000000..0a9d3034 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition struct +type Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition struct { + *Win32_PerfRawData + + // + PhysicalPagesAllocated uint64 + + // + PreferredNUMANodeIndex uint64 + + // + RemotePhysicalPages uint64 +} + +func NewWin32_PerfRawData_VidPerfProvider_HyperVVMVidPartitionEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_VidPerfProvider_HyperVVMVidPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition{ + Win32_PerfRawData: tmp, + } + return +} + +// SetPhysicalPagesAllocated sets the value of PhysicalPagesAllocated for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition) SetPropertyPhysicalPagesAllocated(value uint64) (err error) { + return instance.SetProperty("PhysicalPagesAllocated", (value)) +} + +// GetPhysicalPagesAllocated gets the value of PhysicalPagesAllocated for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition) GetPropertyPhysicalPagesAllocated() (value uint64, err error) { + retValue, err := instance.GetProperty("PhysicalPagesAllocated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPreferredNUMANodeIndex sets the value of PreferredNUMANodeIndex for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition) SetPropertyPreferredNUMANodeIndex(value uint64) (err error) { + return instance.SetProperty("PreferredNUMANodeIndex", (value)) +} + +// GetPreferredNUMANodeIndex gets the value of PreferredNUMANodeIndex for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition) GetPropertyPreferredNUMANodeIndex() (value uint64, err error) { + retValue, err := instance.GetProperty("PreferredNUMANodeIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRemotePhysicalPages sets the value of RemotePhysicalPages for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition) SetPropertyRemotePhysicalPages(value uint64) (err error) { + return instance.SetProperty("RemotePhysicalPages", (value)) +} + +// GetRemotePhysicalPages gets the value of RemotePhysicalPages for the instance +func (instance *Win32_PerfRawData_VidPerfProvider_HyperVVMVidPartition) GetPropertyRemotePhysicalPages() (value uint64, err error) { + retValue, err := instance.GetProperty("RemotePhysicalPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go new file mode 100644 index 00000000..3593733e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary struct +type Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary struct { + *Win32_PerfRawData + + // + HealthCritical uint32 + + // + HealthOk uint32 +} + +func NewWin32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummaryEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummaryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary{ + Win32_PerfRawData: tmp, + } + return +} + +// SetHealthCritical sets the value of HealthCritical for the instance +func (instance *Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) SetPropertyHealthCritical(value uint32) (err error) { + return instance.SetProperty("HealthCritical", (value)) +} + +// GetHealthCritical gets the value of HealthCritical for the instance +func (instance *Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) GetPropertyHealthCritical() (value uint32, err error) { + retValue, err := instance.GetProperty("HealthCritical") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHealthOk sets the value of HealthOk for the instance +func (instance *Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) SetPropertyHealthOk(value uint32) (err error) { + return instance.SetProperty("HealthOk", (value)) +} + +// GetHealthOk gets the value of HealthOk for the instance +func (instance *Win32_PerfRawData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary) GetPropertyHealthOk() (value uint32, err error) { + retValue, err := instance.GetProperty("HealthOk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNAT.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNAT.go new file mode 100644 index 00000000..990e36f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNAT.go @@ -0,0 +1,470 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WinNatCounters_WinNAT struct +type Win32_PerfRawData_WinNatCounters_WinNAT struct { + *Win32_PerfRawData + + // + CurrentSessionCount uint32 + + // + DroppedICMPerrorpackets uint32 + + // + DroppedICMPerrorpacketsPersec uint32 + + // + DroppedPackets uint32 + + // + DroppedPacketsPersec uint32 + + // + InterRoutingDomainHairpinnedPackets uint32 + + // + InterRoutingDomainHairpinnedPacketsPersec uint32 + + // + IntraRoutingDomainHairpinnedPackets uint32 + + // + IntraRoutingDomainHairpinnedPacketsPersec uint32 + + // + PacketsExternaltoInternal uint32 + + // + PacketsInternaltoExternal uint32 + + // + PacketsPersecExternaltoInternal uint32 + + // + PacketsPersecInternaltoExternal uint32 + + // + SessionsPersec uint32 +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WinNatCounters_WinNAT, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNAT{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WinNatCounters_WinNAT, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNAT{ + Win32_PerfRawData: tmp, + } + return +} + +// SetCurrentSessionCount sets the value of CurrentSessionCount for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyCurrentSessionCount(value uint32) (err error) { + return instance.SetProperty("CurrentSessionCount", (value)) +} + +// GetCurrentSessionCount gets the value of CurrentSessionCount for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyCurrentSessionCount() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSessionCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedICMPerrorpackets sets the value of DroppedICMPerrorpackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyDroppedICMPerrorpackets(value uint32) (err error) { + return instance.SetProperty("DroppedICMPerrorpackets", (value)) +} + +// GetDroppedICMPerrorpackets gets the value of DroppedICMPerrorpackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyDroppedICMPerrorpackets() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedICMPerrorpackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedICMPerrorpacketsPersec sets the value of DroppedICMPerrorpacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyDroppedICMPerrorpacketsPersec(value uint32) (err error) { + return instance.SetProperty("DroppedICMPerrorpacketsPersec", (value)) +} + +// GetDroppedICMPerrorpacketsPersec gets the value of DroppedICMPerrorpacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyDroppedICMPerrorpacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedICMPerrorpacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedPackets sets the value of DroppedPackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyDroppedPackets(value uint32) (err error) { + return instance.SetProperty("DroppedPackets", (value)) +} + +// GetDroppedPackets gets the value of DroppedPackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyDroppedPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDroppedPacketsPersec sets the value of DroppedPacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyDroppedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("DroppedPacketsPersec", (value)) +} + +// GetDroppedPacketsPersec gets the value of DroppedPacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyDroppedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("DroppedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterRoutingDomainHairpinnedPackets sets the value of InterRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyInterRoutingDomainHairpinnedPackets(value uint32) (err error) { + return instance.SetProperty("InterRoutingDomainHairpinnedPackets", (value)) +} + +// GetInterRoutingDomainHairpinnedPackets gets the value of InterRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyInterRoutingDomainHairpinnedPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("InterRoutingDomainHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterRoutingDomainHairpinnedPacketsPersec sets the value of InterRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyInterRoutingDomainHairpinnedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("InterRoutingDomainHairpinnedPacketsPersec", (value)) +} + +// GetInterRoutingDomainHairpinnedPacketsPersec gets the value of InterRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyInterRoutingDomainHairpinnedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterRoutingDomainHairpinnedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIntraRoutingDomainHairpinnedPackets sets the value of IntraRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyIntraRoutingDomainHairpinnedPackets(value uint32) (err error) { + return instance.SetProperty("IntraRoutingDomainHairpinnedPackets", (value)) +} + +// GetIntraRoutingDomainHairpinnedPackets gets the value of IntraRoutingDomainHairpinnedPackets for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyIntraRoutingDomainHairpinnedPackets() (value uint32, err error) { + retValue, err := instance.GetProperty("IntraRoutingDomainHairpinnedPackets") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIntraRoutingDomainHairpinnedPacketsPersec sets the value of IntraRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyIntraRoutingDomainHairpinnedPacketsPersec(value uint32) (err error) { + return instance.SetProperty("IntraRoutingDomainHairpinnedPacketsPersec", (value)) +} + +// GetIntraRoutingDomainHairpinnedPacketsPersec gets the value of IntraRoutingDomainHairpinnedPacketsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyIntraRoutingDomainHairpinnedPacketsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IntraRoutingDomainHairpinnedPacketsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsExternaltoInternal sets the value of PacketsExternaltoInternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyPacketsExternaltoInternal(value uint32) (err error) { + return instance.SetProperty("PacketsExternaltoInternal", (value)) +} + +// GetPacketsExternaltoInternal gets the value of PacketsExternaltoInternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyPacketsExternaltoInternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsExternaltoInternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsInternaltoExternal sets the value of PacketsInternaltoExternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyPacketsInternaltoExternal(value uint32) (err error) { + return instance.SetProperty("PacketsInternaltoExternal", (value)) +} + +// GetPacketsInternaltoExternal gets the value of PacketsInternaltoExternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyPacketsInternaltoExternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsInternaltoExternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsPersecExternaltoInternal sets the value of PacketsPersecExternaltoInternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyPacketsPersecExternaltoInternal(value uint32) (err error) { + return instance.SetProperty("PacketsPersecExternaltoInternal", (value)) +} + +// GetPacketsPersecExternaltoInternal gets the value of PacketsPersecExternaltoInternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyPacketsPersecExternaltoInternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsPersecExternaltoInternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPacketsPersecInternaltoExternal sets the value of PacketsPersecInternaltoExternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertyPacketsPersecInternaltoExternal(value uint32) (err error) { + return instance.SetProperty("PacketsPersecInternaltoExternal", (value)) +} + +// GetPacketsPersecInternaltoExternal gets the value of PacketsPersecInternaltoExternal for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertyPacketsPersecInternaltoExternal() (value uint32, err error) { + retValue, err := instance.GetProperty("PacketsPersecInternaltoExternal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionsPersec sets the value of SessionsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) SetPropertySessionsPersec(value uint32) (err error) { + return instance.SetProperty("SessionsPersec", (value)) +} + +// GetSessionsPersec gets the value of SessionsPersec for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNAT) GetPropertySessionsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATICMP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATICMP.go new file mode 100644 index 00000000..6713c15a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATICMP.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WinNatCounters_WinNATICMP struct +type Win32_PerfRawData_WinNatCounters_WinNATICMP struct { + *Win32_PerfRawData + + // + NumberOfBindings uint32 + + // + NumberOfSessions uint32 + + // + NumExtToIntTranslations uint32 + + // + NumIntToExtTranslations uint32 + + // + NumPacketsDropped uint32 + + // + NumSessionsTimedOut uint32 +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATICMPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATICMP, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATICMP{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATICMPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATICMP, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATICMP{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberOfBindings sets the value of NumberOfBindings for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) SetPropertyNumberOfBindings(value uint32) (err error) { + return instance.SetProperty("NumberOfBindings", (value)) +} + +// GetNumberOfBindings gets the value of NumberOfBindings for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) GetPropertyNumberOfBindings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfBindings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSessions sets the value of NumberOfSessions for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) SetPropertyNumberOfSessions(value uint32) (err error) { + return instance.SetProperty("NumberOfSessions", (value)) +} + +// GetNumberOfSessions gets the value of NumberOfSessions for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) GetPropertyNumberOfSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumExtToIntTranslations sets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) SetPropertyNumExtToIntTranslations(value uint32) (err error) { + return instance.SetProperty("NumExtToIntTranslations", (value)) +} + +// GetNumExtToIntTranslations gets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) GetPropertyNumExtToIntTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumExtToIntTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumIntToExtTranslations sets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) SetPropertyNumIntToExtTranslations(value uint32) (err error) { + return instance.SetProperty("NumIntToExtTranslations", (value)) +} + +// GetNumIntToExtTranslations gets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) GetPropertyNumIntToExtTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumIntToExtTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumPacketsDropped sets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) SetPropertyNumPacketsDropped(value uint32) (err error) { + return instance.SetProperty("NumPacketsDropped", (value)) +} + +// GetNumPacketsDropped gets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) GetPropertyNumPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("NumPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumSessionsTimedOut sets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) SetPropertyNumSessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("NumSessionsTimedOut", (value)) +} + +// GetNumSessionsTimedOut gets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATICMP) GetPropertyNumSessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("NumSessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATInstance.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATInstance.go new file mode 100644 index 00000000..73214b22 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATInstance.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WinNatCounters_WinNATInstance struct +type Win32_PerfRawData_WinNatCounters_WinNATInstance struct { + *Win32_PerfRawData + + // + TCPPortsAvailable uint32 + + // + TCPPortsInUse uint32 + + // + UDPPortsAvailable uint32 + + // + UDPPortsInUse uint32 +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATInstanceEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATInstance, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATInstance{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATInstanceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATInstance, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATInstance{ + Win32_PerfRawData: tmp, + } + return +} + +// SetTCPPortsAvailable sets the value of TCPPortsAvailable for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) SetPropertyTCPPortsAvailable(value uint32) (err error) { + return instance.SetProperty("TCPPortsAvailable", (value)) +} + +// GetTCPPortsAvailable gets the value of TCPPortsAvailable for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) GetPropertyTCPPortsAvailable() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPPortsAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTCPPortsInUse sets the value of TCPPortsInUse for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) SetPropertyTCPPortsInUse(value uint32) (err error) { + return instance.SetProperty("TCPPortsInUse", (value)) +} + +// GetTCPPortsInUse gets the value of TCPPortsInUse for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) GetPropertyTCPPortsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("TCPPortsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPortsAvailable sets the value of UDPPortsAvailable for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) SetPropertyUDPPortsAvailable(value uint32) (err error) { + return instance.SetProperty("UDPPortsAvailable", (value)) +} + +// GetUDPPortsAvailable gets the value of UDPPortsAvailable for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) GetPropertyUDPPortsAvailable() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPortsAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetUDPPortsInUse sets the value of UDPPortsInUse for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) SetPropertyUDPPortsInUse(value uint32) (err error) { + return instance.SetProperty("UDPPortsInUse", (value)) +} + +// GetUDPPortsInUse gets the value of UDPPortsInUse for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATInstance) GetPropertyUDPPortsInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("UDPPortsInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATTCP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATTCP.go new file mode 100644 index 00000000..c6c65bdc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATTCP.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WinNatCounters_WinNATTCP struct +type Win32_PerfRawData_WinNatCounters_WinNATTCP struct { + *Win32_PerfRawData + + // + NumberOfBindings uint32 + + // + NumberOfSessions uint32 + + // + NumExtToIntTranslations uint32 + + // + NumIntToExtTranslations uint32 + + // + NumPacketsDropped uint32 + + // + NumSessionsTimedOut uint32 +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATTCPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATTCP, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATTCP{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATTCPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATTCP, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATTCP{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberOfBindings sets the value of NumberOfBindings for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) SetPropertyNumberOfBindings(value uint32) (err error) { + return instance.SetProperty("NumberOfBindings", (value)) +} + +// GetNumberOfBindings gets the value of NumberOfBindings for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) GetPropertyNumberOfBindings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfBindings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSessions sets the value of NumberOfSessions for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) SetPropertyNumberOfSessions(value uint32) (err error) { + return instance.SetProperty("NumberOfSessions", (value)) +} + +// GetNumberOfSessions gets the value of NumberOfSessions for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) GetPropertyNumberOfSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumExtToIntTranslations sets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) SetPropertyNumExtToIntTranslations(value uint32) (err error) { + return instance.SetProperty("NumExtToIntTranslations", (value)) +} + +// GetNumExtToIntTranslations gets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) GetPropertyNumExtToIntTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumExtToIntTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumIntToExtTranslations sets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) SetPropertyNumIntToExtTranslations(value uint32) (err error) { + return instance.SetProperty("NumIntToExtTranslations", (value)) +} + +// GetNumIntToExtTranslations gets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) GetPropertyNumIntToExtTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumIntToExtTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumPacketsDropped sets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) SetPropertyNumPacketsDropped(value uint32) (err error) { + return instance.SetProperty("NumPacketsDropped", (value)) +} + +// GetNumPacketsDropped gets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) GetPropertyNumPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("NumPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumSessionsTimedOut sets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) SetPropertyNumSessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("NumSessionsTimedOut", (value)) +} + +// GetNumSessionsTimedOut gets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATTCP) GetPropertyNumSessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("NumSessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATUDP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATUDP.go new file mode 100644 index 00000000..e959eb40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WinNatCounters_WinNATUDP.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WinNatCounters_WinNATUDP struct +type Win32_PerfRawData_WinNatCounters_WinNATUDP struct { + *Win32_PerfRawData + + // + NumberOfBindings uint32 + + // + NumberOfSessions uint32 + + // + NumExtToIntTranslations uint32 + + // + NumIntToExtTranslations uint32 + + // + NumPacketsDropped uint32 + + // + NumSessionsTimedOut uint32 +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATUDPEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATUDP, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATUDP{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WinNatCounters_WinNATUDPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WinNatCounters_WinNATUDP, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WinNatCounters_WinNATUDP{ + Win32_PerfRawData: tmp, + } + return +} + +// SetNumberOfBindings sets the value of NumberOfBindings for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) SetPropertyNumberOfBindings(value uint32) (err error) { + return instance.SetProperty("NumberOfBindings", (value)) +} + +// GetNumberOfBindings gets the value of NumberOfBindings for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) GetPropertyNumberOfBindings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfBindings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfSessions sets the value of NumberOfSessions for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) SetPropertyNumberOfSessions(value uint32) (err error) { + return instance.SetProperty("NumberOfSessions", (value)) +} + +// GetNumberOfSessions gets the value of NumberOfSessions for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) GetPropertyNumberOfSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumExtToIntTranslations sets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) SetPropertyNumExtToIntTranslations(value uint32) (err error) { + return instance.SetProperty("NumExtToIntTranslations", (value)) +} + +// GetNumExtToIntTranslations gets the value of NumExtToIntTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) GetPropertyNumExtToIntTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumExtToIntTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumIntToExtTranslations sets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) SetPropertyNumIntToExtTranslations(value uint32) (err error) { + return instance.SetProperty("NumIntToExtTranslations", (value)) +} + +// GetNumIntToExtTranslations gets the value of NumIntToExtTranslations for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) GetPropertyNumIntToExtTranslations() (value uint32, err error) { + retValue, err := instance.GetProperty("NumIntToExtTranslations") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumPacketsDropped sets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) SetPropertyNumPacketsDropped(value uint32) (err error) { + return instance.SetProperty("NumPacketsDropped", (value)) +} + +// GetNumPacketsDropped gets the value of NumPacketsDropped for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) GetPropertyNumPacketsDropped() (value uint32, err error) { + retValue, err := instance.GetProperty("NumPacketsDropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumSessionsTimedOut sets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) SetPropertyNumSessionsTimedOut(value uint32) (err error) { + return instance.SetProperty("NumSessionsTimedOut", (value)) +} + +// GetNumSessionsTimedOut gets the value of NumSessionsTimedOut for the instance +func (instance *Win32_PerfRawData_WinNatCounters_WinNATUDP) GetPropertyNumSessionsTimedOut() (value uint32, err error) { + retValue, err := instance.GetProperty("NumSessionsTimedOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go new file mode 100644 index 00000000..4e64a5b2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata struct +type Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata struct { + *Win32_PerfRawData + + // + AFTSExecutionTimems uint32 + + // + ArtExtractionTimems uint32 + + // + CommitTimems uint32 + + // + DirectoryChangeQueueLength uint32 + + // + DirtyDirectoryHitCount uint32 + + // + FileScanningThreadPrioirty uint32 + + // + FilesScannedPerMinute uint64 + + // + FilesScannedPerMinute_Base uint32 + + // + GrovelerServiceRoutineExecutionsPerSecond uint64 + + // + GrovelerServiceRoutineExecutionsPerSecond_Base uint32 + + // + LibraryDescriptionChangeNotificationsPerSecond uint64 + + // + LibraryDescriptionChangeNotificationsPerSecond_Base uint32 + + // + LibraryDescriptionUpdatesPerSecond uint64 + + // + LibraryDescriptionUpdatesPerSecond_Base uint32 + + // + MonitoredFolderUpdatesPerSecond uint64 + + // + MonitoredFolderUpdatesPerSecond_Base uint32 + + // + NormalizationTimems uint32 + + // + PropertyExtractionTimems uint32 + + // + ReorganizeTimems uint32 + + // + ScanningState uint32 + + // + TimestampDirectoryHitCount uint32 + + // + URLClassificationTimems uint32 +} + +func NewWin32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadataEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadataEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAFTSExecutionTimems sets the value of AFTSExecutionTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyAFTSExecutionTimems(value uint32) (err error) { + return instance.SetProperty("AFTSExecutionTimems", (value)) +} + +// GetAFTSExecutionTimems gets the value of AFTSExecutionTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyAFTSExecutionTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("AFTSExecutionTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetArtExtractionTimems sets the value of ArtExtractionTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyArtExtractionTimems(value uint32) (err error) { + return instance.SetProperty("ArtExtractionTimems", (value)) +} + +// GetArtExtractionTimems gets the value of ArtExtractionTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyArtExtractionTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("ArtExtractionTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCommitTimems sets the value of CommitTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyCommitTimems(value uint32) (err error) { + return instance.SetProperty("CommitTimems", (value)) +} + +// GetCommitTimems gets the value of CommitTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyCommitTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("CommitTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirectoryChangeQueueLength sets the value of DirectoryChangeQueueLength for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyDirectoryChangeQueueLength(value uint32) (err error) { + return instance.SetProperty("DirectoryChangeQueueLength", (value)) +} + +// GetDirectoryChangeQueueLength gets the value of DirectoryChangeQueueLength for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyDirectoryChangeQueueLength() (value uint32, err error) { + retValue, err := instance.GetProperty("DirectoryChangeQueueLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirtyDirectoryHitCount sets the value of DirtyDirectoryHitCount for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyDirtyDirectoryHitCount(value uint32) (err error) { + return instance.SetProperty("DirtyDirectoryHitCount", (value)) +} + +// GetDirtyDirectoryHitCount gets the value of DirtyDirectoryHitCount for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyDirtyDirectoryHitCount() (value uint32, err error) { + retValue, err := instance.GetProperty("DirtyDirectoryHitCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileScanningThreadPrioirty sets the value of FileScanningThreadPrioirty for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyFileScanningThreadPrioirty(value uint32) (err error) { + return instance.SetProperty("FileScanningThreadPrioirty", (value)) +} + +// GetFileScanningThreadPrioirty gets the value of FileScanningThreadPrioirty for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyFileScanningThreadPrioirty() (value uint32, err error) { + retValue, err := instance.GetProperty("FileScanningThreadPrioirty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilesScannedPerMinute sets the value of FilesScannedPerMinute for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyFilesScannedPerMinute(value uint64) (err error) { + return instance.SetProperty("FilesScannedPerMinute", (value)) +} + +// GetFilesScannedPerMinute gets the value of FilesScannedPerMinute for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyFilesScannedPerMinute() (value uint64, err error) { + retValue, err := instance.GetProperty("FilesScannedPerMinute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilesScannedPerMinute_Base sets the value of FilesScannedPerMinute_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyFilesScannedPerMinute_Base(value uint32) (err error) { + return instance.SetProperty("FilesScannedPerMinute_Base", (value)) +} + +// GetFilesScannedPerMinute_Base gets the value of FilesScannedPerMinute_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyFilesScannedPerMinute_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("FilesScannedPerMinute_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGrovelerServiceRoutineExecutionsPerSecond sets the value of GrovelerServiceRoutineExecutionsPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyGrovelerServiceRoutineExecutionsPerSecond(value uint64) (err error) { + return instance.SetProperty("GrovelerServiceRoutineExecutionsPerSecond", (value)) +} + +// GetGrovelerServiceRoutineExecutionsPerSecond gets the value of GrovelerServiceRoutineExecutionsPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyGrovelerServiceRoutineExecutionsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("GrovelerServiceRoutineExecutionsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetGrovelerServiceRoutineExecutionsPerSecond_Base sets the value of GrovelerServiceRoutineExecutionsPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyGrovelerServiceRoutineExecutionsPerSecond_Base(value uint32) (err error) { + return instance.SetProperty("GrovelerServiceRoutineExecutionsPerSecond_Base", (value)) +} + +// GetGrovelerServiceRoutineExecutionsPerSecond_Base gets the value of GrovelerServiceRoutineExecutionsPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyGrovelerServiceRoutineExecutionsPerSecond_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("GrovelerServiceRoutineExecutionsPerSecond_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLibraryDescriptionChangeNotificationsPerSecond sets the value of LibraryDescriptionChangeNotificationsPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyLibraryDescriptionChangeNotificationsPerSecond(value uint64) (err error) { + return instance.SetProperty("LibraryDescriptionChangeNotificationsPerSecond", (value)) +} + +// GetLibraryDescriptionChangeNotificationsPerSecond gets the value of LibraryDescriptionChangeNotificationsPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyLibraryDescriptionChangeNotificationsPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("LibraryDescriptionChangeNotificationsPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLibraryDescriptionChangeNotificationsPerSecond_Base sets the value of LibraryDescriptionChangeNotificationsPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyLibraryDescriptionChangeNotificationsPerSecond_Base(value uint32) (err error) { + return instance.SetProperty("LibraryDescriptionChangeNotificationsPerSecond_Base", (value)) +} + +// GetLibraryDescriptionChangeNotificationsPerSecond_Base gets the value of LibraryDescriptionChangeNotificationsPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyLibraryDescriptionChangeNotificationsPerSecond_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LibraryDescriptionChangeNotificationsPerSecond_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLibraryDescriptionUpdatesPerSecond sets the value of LibraryDescriptionUpdatesPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyLibraryDescriptionUpdatesPerSecond(value uint64) (err error) { + return instance.SetProperty("LibraryDescriptionUpdatesPerSecond", (value)) +} + +// GetLibraryDescriptionUpdatesPerSecond gets the value of LibraryDescriptionUpdatesPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyLibraryDescriptionUpdatesPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("LibraryDescriptionUpdatesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLibraryDescriptionUpdatesPerSecond_Base sets the value of LibraryDescriptionUpdatesPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyLibraryDescriptionUpdatesPerSecond_Base(value uint32) (err error) { + return instance.SetProperty("LibraryDescriptionUpdatesPerSecond_Base", (value)) +} + +// GetLibraryDescriptionUpdatesPerSecond_Base gets the value of LibraryDescriptionUpdatesPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyLibraryDescriptionUpdatesPerSecond_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("LibraryDescriptionUpdatesPerSecond_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMonitoredFolderUpdatesPerSecond sets the value of MonitoredFolderUpdatesPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyMonitoredFolderUpdatesPerSecond(value uint64) (err error) { + return instance.SetProperty("MonitoredFolderUpdatesPerSecond", (value)) +} + +// GetMonitoredFolderUpdatesPerSecond gets the value of MonitoredFolderUpdatesPerSecond for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyMonitoredFolderUpdatesPerSecond() (value uint64, err error) { + retValue, err := instance.GetProperty("MonitoredFolderUpdatesPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMonitoredFolderUpdatesPerSecond_Base sets the value of MonitoredFolderUpdatesPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyMonitoredFolderUpdatesPerSecond_Base(value uint32) (err error) { + return instance.SetProperty("MonitoredFolderUpdatesPerSecond_Base", (value)) +} + +// GetMonitoredFolderUpdatesPerSecond_Base gets the value of MonitoredFolderUpdatesPerSecond_Base for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyMonitoredFolderUpdatesPerSecond_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("MonitoredFolderUpdatesPerSecond_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNormalizationTimems sets the value of NormalizationTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyNormalizationTimems(value uint32) (err error) { + return instance.SetProperty("NormalizationTimems", (value)) +} + +// GetNormalizationTimems gets the value of NormalizationTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyNormalizationTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("NormalizationTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPropertyExtractionTimems sets the value of PropertyExtractionTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyPropertyExtractionTimems(value uint32) (err error) { + return instance.SetProperty("PropertyExtractionTimems", (value)) +} + +// GetPropertyExtractionTimems gets the value of PropertyExtractionTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyPropertyExtractionTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("PropertyExtractionTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReorganizeTimems sets the value of ReorganizeTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyReorganizeTimems(value uint32) (err error) { + return instance.SetProperty("ReorganizeTimems", (value)) +} + +// GetReorganizeTimems gets the value of ReorganizeTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyReorganizeTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("ReorganizeTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScanningState sets the value of ScanningState for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyScanningState(value uint32) (err error) { + return instance.SetProperty("ScanningState", (value)) +} + +// GetScanningState gets the value of ScanningState for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyScanningState() (value uint32, err error) { + retValue, err := instance.GetProperty("ScanningState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimestampDirectoryHitCount sets the value of TimestampDirectoryHitCount for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyTimestampDirectoryHitCount(value uint32) (err error) { + return instance.SetProperty("TimestampDirectoryHitCount", (value)) +} + +// GetTimestampDirectoryHitCount gets the value of TimestampDirectoryHitCount for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyTimestampDirectoryHitCount() (value uint32, err error) { + retValue, err := instance.GetProperty("TimestampDirectoryHitCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetURLClassificationTimems sets the value of URLClassificationTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) SetPropertyURLClassificationTimems(value uint32) (err error) { + return instance.SetProperty("URLClassificationTimems", (value)) +} + +// GetURLClassificationTimems gets the value of URLClassificationTimems for the instance +func (instance *Win32_PerfRawData_WindowsMediaPlayer_WindowsMediaPlayerMetadata) GetPropertyURLClassificationTimems() (value uint32, err error) { + retValue, err := instance.GetProperty("URLClassificationTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go new file mode 100644 index 00000000..9251883c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000 struct +type Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000 struct { + *Win32_PerfRawData + + // + WorkflowsAborted uint32 + + // + WorkflowsAbortedPersec uint32 + + // + WorkflowsCompleted uint32 + + // + WorkflowsCompletedPersec uint32 + + // + WorkflowsCreated uint32 + + // + WorkflowsCreatedPersec uint32 + + // + WorkflowsExecuting uint32 + + // + WorkflowsIdlePersec uint32 + + // + WorkflowsInMemory uint32 + + // + WorkflowsLoaded uint32 + + // + WorkflowsLoadedPersec uint32 + + // + WorkflowsPending uint32 + + // + WorkflowsPersisted uint32 + + // + WorkflowsPersistedPersec uint32 + + // + WorkflowsRunnable uint32 + + // + WorkflowsSuspended uint32 + + // + WorkflowsSuspendedPersec uint32 + + // + WorkflowsTerminated uint32 + + // + WorkflowsTerminatedPersec uint32 + + // + WorkflowsUnloaded uint32 + + // + WorkflowsUnloadedPersec uint32 +} + +func NewWin32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetWorkflowsAborted sets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsAborted(value uint32) (err error) { + return instance.SetProperty("WorkflowsAborted", (value)) +} + +// GetWorkflowsAborted gets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsAborted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAborted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsAbortedPersec sets the value of WorkflowsAbortedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsAbortedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsAbortedPersec", (value)) +} + +// GetWorkflowsAbortedPersec gets the value of WorkflowsAbortedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsAbortedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAbortedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompleted sets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCompleted(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompleted", (value)) +} + +// GetWorkflowsCompleted gets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCompleted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompleted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompletedPersec sets the value of WorkflowsCompletedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCompletedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompletedPersec", (value)) +} + +// GetWorkflowsCompletedPersec gets the value of WorkflowsCompletedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCompletedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompletedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreated sets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCreated(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreated", (value)) +} + +// GetWorkflowsCreated gets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCreated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreatedPersec sets the value of WorkflowsCreatedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsCreatedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreatedPersec", (value)) +} + +// GetWorkflowsCreatedPersec gets the value of WorkflowsCreatedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsCreatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsExecuting sets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsExecuting(value uint32) (err error) { + return instance.SetProperty("WorkflowsExecuting", (value)) +} + +// GetWorkflowsExecuting gets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsExecuting() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsExecuting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsIdlePersec sets the value of WorkflowsIdlePersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsIdlePersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsIdlePersec", (value)) +} + +// GetWorkflowsIdlePersec gets the value of WorkflowsIdlePersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsIdlePersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsIdlePersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsInMemory sets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsInMemory(value uint32) (err error) { + return instance.SetProperty("WorkflowsInMemory", (value)) +} + +// GetWorkflowsInMemory gets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsInMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsInMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoaded sets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsLoaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoaded", (value)) +} + +// GetWorkflowsLoaded gets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoadedPersec sets the value of WorkflowsLoadedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsLoadedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoadedPersec", (value)) +} + +// GetWorkflowsLoadedPersec gets the value of WorkflowsLoadedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsLoadedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoadedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPending sets the value of WorkflowsPending for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsPending(value uint32) (err error) { + return instance.SetProperty("WorkflowsPending", (value)) +} + +// GetWorkflowsPending gets the value of WorkflowsPending for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsPending() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPending") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersisted sets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsPersisted(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersisted", (value)) +} + +// GetWorkflowsPersisted gets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsPersisted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersisted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersistedPersec sets the value of WorkflowsPersistedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsPersistedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersistedPersec", (value)) +} + +// GetWorkflowsPersistedPersec gets the value of WorkflowsPersistedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsPersistedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersistedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsRunnable sets the value of WorkflowsRunnable for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsRunnable(value uint32) (err error) { + return instance.SetProperty("WorkflowsRunnable", (value)) +} + +// GetWorkflowsRunnable gets the value of WorkflowsRunnable for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsRunnable() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsRunnable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspended sets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsSuspended(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspended", (value)) +} + +// GetWorkflowsSuspended gets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsSuspended() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspended") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspendedPersec sets the value of WorkflowsSuspendedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsSuspendedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspendedPersec", (value)) +} + +// GetWorkflowsSuspendedPersec gets the value of WorkflowsSuspendedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsSuspendedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspendedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminated sets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsTerminated(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminated", (value)) +} + +// GetWorkflowsTerminated gets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsTerminated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminatedPersec sets the value of WorkflowsTerminatedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsTerminatedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminatedPersec", (value)) +} + +// GetWorkflowsTerminatedPersec gets the value of WorkflowsTerminatedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsTerminatedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminatedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloaded sets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsUnloaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloaded", (value)) +} + +// GetWorkflowsUnloaded gets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsUnloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloadedPersec sets the value of WorkflowsUnloadedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) SetPropertyWorkflowsUnloadedPersec(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloadedPersec", (value)) +} + +// GetWorkflowsUnloadedPersec gets the value of WorkflowsUnloadedPersec for the instance +func (instance *Win32_PerfRawData_WindowsWorkflowFoundation4000_WFSystemWorkflow4000) GetPropertyWorkflowsUnloadedPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloadedPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WnvCounters_NetworkVirtualization.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WnvCounters_NetworkVirtualization.go new file mode 100644 index 00000000..885c4245 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WnvCounters_NetworkVirtualization.go @@ -0,0 +1,650 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WnvCounters_NetworkVirtualization struct +type Win32_PerfRawData_WnvCounters_NetworkVirtualization struct { + *Win32_PerfRawData + + // + Broadcastpacketsreceived uint64 + + // + Broadcastpacketssent uint64 + + // + InboundPacketsdropped uint64 + + // + Missingpolicyicmperrorsreceived uint64 + + // + Missingpolicyicmperrorssent uint64 + + // + Missingpolicynotificationsdropped uint64 + + // + Missingpolicynotificationsindicated uint64 + + // + Multicastpacketsreceived uint64 + + // + Multicastpacketssent uint64 + + // + OutboundPacketsdropped uint64 + + // + Packetsbuffered uint64 + + // + Packetsforwarded uint64 + + // + Packetsloopedback uint64 + + // + Policycachehits uint64 + + // + Policycachemisses uint64 + + // + Policylookupfailures uint64 + + // + Provideraddressduplicatedetectionfailures uint64 + + // + UnicastpacketsreceivedGRE uint64 + + // + UnicastpacketssentGRE uint64 + + // + UnicastReplicatedPacketsout uint64 +} + +func NewWin32_PerfRawData_WnvCounters_NetworkVirtualizationEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WnvCounters_NetworkVirtualization, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WnvCounters_NetworkVirtualization{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WnvCounters_NetworkVirtualizationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WnvCounters_NetworkVirtualization, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WnvCounters_NetworkVirtualization{ + Win32_PerfRawData: tmp, + } + return +} + +// SetBroadcastpacketsreceived sets the value of Broadcastpacketsreceived for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyBroadcastpacketsreceived(value uint64) (err error) { + return instance.SetProperty("Broadcastpacketsreceived", (value)) +} + +// GetBroadcastpacketsreceived gets the value of Broadcastpacketsreceived for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyBroadcastpacketsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("Broadcastpacketsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBroadcastpacketssent sets the value of Broadcastpacketssent for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyBroadcastpacketssent(value uint64) (err error) { + return instance.SetProperty("Broadcastpacketssent", (value)) +} + +// GetBroadcastpacketssent gets the value of Broadcastpacketssent for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyBroadcastpacketssent() (value uint64, err error) { + retValue, err := instance.GetProperty("Broadcastpacketssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInboundPacketsdropped sets the value of InboundPacketsdropped for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyInboundPacketsdropped(value uint64) (err error) { + return instance.SetProperty("InboundPacketsdropped", (value)) +} + +// GetInboundPacketsdropped gets the value of InboundPacketsdropped for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyInboundPacketsdropped() (value uint64, err error) { + retValue, err := instance.GetProperty("InboundPacketsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicyicmperrorsreceived sets the value of Missingpolicyicmperrorsreceived for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicyicmperrorsreceived(value uint64) (err error) { + return instance.SetProperty("Missingpolicyicmperrorsreceived", (value)) +} + +// GetMissingpolicyicmperrorsreceived gets the value of Missingpolicyicmperrorsreceived for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicyicmperrorsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicyicmperrorsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicyicmperrorssent sets the value of Missingpolicyicmperrorssent for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicyicmperrorssent(value uint64) (err error) { + return instance.SetProperty("Missingpolicyicmperrorssent", (value)) +} + +// GetMissingpolicyicmperrorssent gets the value of Missingpolicyicmperrorssent for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicyicmperrorssent() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicyicmperrorssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicynotificationsdropped sets the value of Missingpolicynotificationsdropped for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicynotificationsdropped(value uint64) (err error) { + return instance.SetProperty("Missingpolicynotificationsdropped", (value)) +} + +// GetMissingpolicynotificationsdropped gets the value of Missingpolicynotificationsdropped for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicynotificationsdropped() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicynotificationsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMissingpolicynotificationsindicated sets the value of Missingpolicynotificationsindicated for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyMissingpolicynotificationsindicated(value uint64) (err error) { + return instance.SetProperty("Missingpolicynotificationsindicated", (value)) +} + +// GetMissingpolicynotificationsindicated gets the value of Missingpolicynotificationsindicated for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyMissingpolicynotificationsindicated() (value uint64, err error) { + retValue, err := instance.GetProperty("Missingpolicynotificationsindicated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastpacketsreceived sets the value of Multicastpacketsreceived for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyMulticastpacketsreceived(value uint64) (err error) { + return instance.SetProperty("Multicastpacketsreceived", (value)) +} + +// GetMulticastpacketsreceived gets the value of Multicastpacketsreceived for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyMulticastpacketsreceived() (value uint64, err error) { + retValue, err := instance.GetProperty("Multicastpacketsreceived") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMulticastpacketssent sets the value of Multicastpacketssent for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyMulticastpacketssent(value uint64) (err error) { + return instance.SetProperty("Multicastpacketssent", (value)) +} + +// GetMulticastpacketssent gets the value of Multicastpacketssent for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyMulticastpacketssent() (value uint64, err error) { + retValue, err := instance.GetProperty("Multicastpacketssent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOutboundPacketsdropped sets the value of OutboundPacketsdropped for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyOutboundPacketsdropped(value uint64) (err error) { + return instance.SetProperty("OutboundPacketsdropped", (value)) +} + +// GetOutboundPacketsdropped gets the value of OutboundPacketsdropped for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyOutboundPacketsdropped() (value uint64, err error) { + retValue, err := instance.GetProperty("OutboundPacketsdropped") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsbuffered sets the value of Packetsbuffered for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyPacketsbuffered(value uint64) (err error) { + return instance.SetProperty("Packetsbuffered", (value)) +} + +// GetPacketsbuffered gets the value of Packetsbuffered for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyPacketsbuffered() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsbuffered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsforwarded sets the value of Packetsforwarded for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyPacketsforwarded(value uint64) (err error) { + return instance.SetProperty("Packetsforwarded", (value)) +} + +// GetPacketsforwarded gets the value of Packetsforwarded for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyPacketsforwarded() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsforwarded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPacketsloopedback sets the value of Packetsloopedback for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyPacketsloopedback(value uint64) (err error) { + return instance.SetProperty("Packetsloopedback", (value)) +} + +// GetPacketsloopedback gets the value of Packetsloopedback for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyPacketsloopedback() (value uint64, err error) { + retValue, err := instance.GetProperty("Packetsloopedback") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicycachehits sets the value of Policycachehits for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyPolicycachehits(value uint64) (err error) { + return instance.SetProperty("Policycachehits", (value)) +} + +// GetPolicycachehits gets the value of Policycachehits for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyPolicycachehits() (value uint64, err error) { + retValue, err := instance.GetProperty("Policycachehits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicycachemisses sets the value of Policycachemisses for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyPolicycachemisses(value uint64) (err error) { + return instance.SetProperty("Policycachemisses", (value)) +} + +// GetPolicycachemisses gets the value of Policycachemisses for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyPolicycachemisses() (value uint64, err error) { + retValue, err := instance.GetProperty("Policycachemisses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicylookupfailures sets the value of Policylookupfailures for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyPolicylookupfailures(value uint64) (err error) { + return instance.SetProperty("Policylookupfailures", (value)) +} + +// GetPolicylookupfailures gets the value of Policylookupfailures for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyPolicylookupfailures() (value uint64, err error) { + retValue, err := instance.GetProperty("Policylookupfailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProvideraddressduplicatedetectionfailures sets the value of Provideraddressduplicatedetectionfailures for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyProvideraddressduplicatedetectionfailures(value uint64) (err error) { + return instance.SetProperty("Provideraddressduplicatedetectionfailures", (value)) +} + +// GetProvideraddressduplicatedetectionfailures gets the value of Provideraddressduplicatedetectionfailures for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyProvideraddressduplicatedetectionfailures() (value uint64, err error) { + retValue, err := instance.GetProperty("Provideraddressduplicatedetectionfailures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnicastpacketsreceivedGRE sets the value of UnicastpacketsreceivedGRE for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyUnicastpacketsreceivedGRE(value uint64) (err error) { + return instance.SetProperty("UnicastpacketsreceivedGRE", (value)) +} + +// GetUnicastpacketsreceivedGRE gets the value of UnicastpacketsreceivedGRE for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyUnicastpacketsreceivedGRE() (value uint64, err error) { + retValue, err := instance.GetProperty("UnicastpacketsreceivedGRE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnicastpacketssentGRE sets the value of UnicastpacketssentGRE for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyUnicastpacketssentGRE(value uint64) (err error) { + return instance.SetProperty("UnicastpacketssentGRE", (value)) +} + +// GetUnicastpacketssentGRE gets the value of UnicastpacketssentGRE for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyUnicastpacketssentGRE() (value uint64, err error) { + retValue, err := instance.GetProperty("UnicastpacketssentGRE") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnicastReplicatedPacketsout sets the value of UnicastReplicatedPacketsout for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) SetPropertyUnicastReplicatedPacketsout(value uint64) (err error) { + return instance.SetProperty("UnicastReplicatedPacketsout", (value)) +} + +// GetUnicastReplicatedPacketsout gets the value of UnicastReplicatedPacketsout for the instance +func (instance *Win32_PerfRawData_WnvCounters_NetworkVirtualization) GetPropertyUnicastReplicatedPacketsout() (value uint64, err error) { + retValue, err := instance.GetProperty("UnicastReplicatedPacketsout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go new file mode 100644 index 00000000..be9fc803 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor struct +type Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor struct { + *Win32_PerfRawData + + // + InterceptDelayTimems uint64 + + // + InterceptsDelayed uint64 +} + +func NewWin32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor{ + Win32_PerfRawData: tmp, + } + return +} + +// SetInterceptDelayTimems sets the value of InterceptDelayTimems for the instance +func (instance *Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor) SetPropertyInterceptDelayTimems(value uint64) (err error) { + return instance.SetProperty("InterceptDelayTimems", (value)) +} + +// GetInterceptDelayTimems gets the value of InterceptDelayTimems for the instance +func (instance *Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor) GetPropertyInterceptDelayTimems() (value uint64, err error) { + retValue, err := instance.GetProperty("InterceptDelayTimems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterceptsDelayed sets the value of InterceptsDelayed for the instance +func (instance *Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor) SetPropertyInterceptsDelayed(value uint64) (err error) { + return instance.SetProperty("InterceptsDelayed", (value)) +} + +// GetInterceptsDelayed gets the value of InterceptsDelayed for the instance +func (instance *Win32_PerfRawData_WorkerVpProvider_HyperVWorkerVirtualProcessor) GetPropertyInterceptsDelayed() (value uint64, err error) { + retValue, err := instance.GetProperty("InterceptsDelayed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000.go new file mode 100644 index 00000000..b265acfe --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000 struct +type Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000 struct { + *Win32_PerfRawData + + // + AverageWorkflowLoadTime uint32 + + // + AverageWorkflowLoadTime_Base uint32 + + // + AverageWorkflowPersistTime uint32 + + // + AverageWorkflowPersistTime_Base uint32 + + // + WorkflowsAborted uint32 + + // + WorkflowsAbortedPerSecond uint32 + + // + WorkflowsCompleted uint32 + + // + WorkflowsCompletedPerSecond uint32 + + // + WorkflowsCreated uint32 + + // + WorkflowsCreatedPerSecond uint32 + + // + WorkflowsExecuting uint32 + + // + WorkflowsIdlePerSecond uint32 + + // + WorkflowsInMemory uint32 + + // + WorkflowsLoaded uint32 + + // + WorkflowsLoadedPerSecond uint32 + + // + WorkflowsPersisted uint32 + + // + WorkflowsPersistedPerSecond uint32 + + // + WorkflowsSuspended uint32 + + // + WorkflowsSuspendedPerSecond uint32 + + // + WorkflowsTerminated uint32 + + // + WorkflowsTerminatedPerSecond uint32 + + // + WorkflowsUnloaded uint32 + + // + WorkflowsUnloadedPerSecond uint32 +} + +func NewWin32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000Ex1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAverageWorkflowLoadTime sets the value of AverageWorkflowLoadTime for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyAverageWorkflowLoadTime(value uint32) (err error) { + return instance.SetProperty("AverageWorkflowLoadTime", (value)) +} + +// GetAverageWorkflowLoadTime gets the value of AverageWorkflowLoadTime for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyAverageWorkflowLoadTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWorkflowLoadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWorkflowLoadTime_Base sets the value of AverageWorkflowLoadTime_Base for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyAverageWorkflowLoadTime_Base(value uint32) (err error) { + return instance.SetProperty("AverageWorkflowLoadTime_Base", (value)) +} + +// GetAverageWorkflowLoadTime_Base gets the value of AverageWorkflowLoadTime_Base for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyAverageWorkflowLoadTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWorkflowLoadTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWorkflowPersistTime sets the value of AverageWorkflowPersistTime for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyAverageWorkflowPersistTime(value uint32) (err error) { + return instance.SetProperty("AverageWorkflowPersistTime", (value)) +} + +// GetAverageWorkflowPersistTime gets the value of AverageWorkflowPersistTime for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyAverageWorkflowPersistTime() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWorkflowPersistTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAverageWorkflowPersistTime_Base sets the value of AverageWorkflowPersistTime_Base for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyAverageWorkflowPersistTime_Base(value uint32) (err error) { + return instance.SetProperty("AverageWorkflowPersistTime_Base", (value)) +} + +// GetAverageWorkflowPersistTime_Base gets the value of AverageWorkflowPersistTime_Base for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyAverageWorkflowPersistTime_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AverageWorkflowPersistTime_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsAborted sets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsAborted(value uint32) (err error) { + return instance.SetProperty("WorkflowsAborted", (value)) +} + +// GetWorkflowsAborted gets the value of WorkflowsAborted for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsAborted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAborted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsAbortedPerSecond sets the value of WorkflowsAbortedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsAbortedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsAbortedPerSecond", (value)) +} + +// GetWorkflowsAbortedPerSecond gets the value of WorkflowsAbortedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsAbortedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsAbortedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompleted sets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCompleted(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompleted", (value)) +} + +// GetWorkflowsCompleted gets the value of WorkflowsCompleted for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCompleted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompleted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCompletedPerSecond sets the value of WorkflowsCompletedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCompletedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsCompletedPerSecond", (value)) +} + +// GetWorkflowsCompletedPerSecond gets the value of WorkflowsCompletedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCompletedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCompletedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreated sets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCreated(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreated", (value)) +} + +// GetWorkflowsCreated gets the value of WorkflowsCreated for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCreated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsCreatedPerSecond sets the value of WorkflowsCreatedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsCreatedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsCreatedPerSecond", (value)) +} + +// GetWorkflowsCreatedPerSecond gets the value of WorkflowsCreatedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsCreatedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsCreatedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsExecuting sets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsExecuting(value uint32) (err error) { + return instance.SetProperty("WorkflowsExecuting", (value)) +} + +// GetWorkflowsExecuting gets the value of WorkflowsExecuting for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsExecuting() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsExecuting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsIdlePerSecond sets the value of WorkflowsIdlePerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsIdlePerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsIdlePerSecond", (value)) +} + +// GetWorkflowsIdlePerSecond gets the value of WorkflowsIdlePerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsIdlePerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsIdlePerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsInMemory sets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsInMemory(value uint32) (err error) { + return instance.SetProperty("WorkflowsInMemory", (value)) +} + +// GetWorkflowsInMemory gets the value of WorkflowsInMemory for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsInMemory() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsInMemory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoaded sets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsLoaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoaded", (value)) +} + +// GetWorkflowsLoaded gets the value of WorkflowsLoaded for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsLoaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsLoadedPerSecond sets the value of WorkflowsLoadedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsLoadedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsLoadedPerSecond", (value)) +} + +// GetWorkflowsLoadedPerSecond gets the value of WorkflowsLoadedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsLoadedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsLoadedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersisted sets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsPersisted(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersisted", (value)) +} + +// GetWorkflowsPersisted gets the value of WorkflowsPersisted for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsPersisted() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersisted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsPersistedPerSecond sets the value of WorkflowsPersistedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsPersistedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsPersistedPerSecond", (value)) +} + +// GetWorkflowsPersistedPerSecond gets the value of WorkflowsPersistedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsPersistedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsPersistedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspended sets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsSuspended(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspended", (value)) +} + +// GetWorkflowsSuspended gets the value of WorkflowsSuspended for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsSuspended() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspended") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsSuspendedPerSecond sets the value of WorkflowsSuspendedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsSuspendedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsSuspendedPerSecond", (value)) +} + +// GetWorkflowsSuspendedPerSecond gets the value of WorkflowsSuspendedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsSuspendedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsSuspendedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminated sets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsTerminated(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminated", (value)) +} + +// GetWorkflowsTerminated gets the value of WorkflowsTerminated for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsTerminated() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsTerminatedPerSecond sets the value of WorkflowsTerminatedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsTerminatedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsTerminatedPerSecond", (value)) +} + +// GetWorkflowsTerminatedPerSecond gets the value of WorkflowsTerminatedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsTerminatedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsTerminatedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloaded sets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsUnloaded(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloaded", (value)) +} + +// GetWorkflowsUnloaded gets the value of WorkflowsUnloaded for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsUnloaded() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWorkflowsUnloadedPerSecond sets the value of WorkflowsUnloadedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) SetPropertyWorkflowsUnloadedPerSecond(value uint32) (err error) { + return instance.SetProperty("WorkflowsUnloadedPerSecond", (value)) +} + +// GetWorkflowsUnloadedPerSecond gets the value of WorkflowsUnloadedPerSecond for the instance +func (instance *Win32_PerfRawData_WorkflowServiceHost4000_WorkflowServiceHost4000) GetPropertyWorkflowsUnloadedPerSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("WorkflowsUnloadedPerSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_tapisrv_Telephony.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_tapisrv_Telephony.go new file mode 100644 index 00000000..b7d073a0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_tapisrv_Telephony.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_tapisrv_Telephony struct +type Win32_PerfRawData_tapisrv_Telephony struct { + *Win32_PerfRawData + + // + ActiveLines uint32 + + // + ActiveTelephones uint32 + + // + ClientApps uint32 + + // + CurrentIncomingCalls uint32 + + // + CurrentOutgoingCalls uint32 + + // + IncomingCallsPersec uint32 + + // + Lines uint32 + + // + OutgoingCallsPersec uint32 + + // + TelephoneDevices uint32 +} + +func NewWin32_PerfRawData_tapisrv_TelephonyEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_tapisrv_Telephony, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_tapisrv_Telephony{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_tapisrv_TelephonyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_tapisrv_Telephony, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_tapisrv_Telephony{ + Win32_PerfRawData: tmp, + } + return +} + +// SetActiveLines sets the value of ActiveLines for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyActiveLines(value uint32) (err error) { + return instance.SetProperty("ActiveLines", (value)) +} + +// GetActiveLines gets the value of ActiveLines for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyActiveLines() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveLines") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetActiveTelephones sets the value of ActiveTelephones for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyActiveTelephones(value uint32) (err error) { + return instance.SetProperty("ActiveTelephones", (value)) +} + +// GetActiveTelephones gets the value of ActiveTelephones for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyActiveTelephones() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTelephones") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClientApps sets the value of ClientApps for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyClientApps(value uint32) (err error) { + return instance.SetProperty("ClientApps", (value)) +} + +// GetClientApps gets the value of ClientApps for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyClientApps() (value uint32, err error) { + retValue, err := instance.GetProperty("ClientApps") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentIncomingCalls sets the value of CurrentIncomingCalls for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyCurrentIncomingCalls(value uint32) (err error) { + return instance.SetProperty("CurrentIncomingCalls", (value)) +} + +// GetCurrentIncomingCalls gets the value of CurrentIncomingCalls for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyCurrentIncomingCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentIncomingCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentOutgoingCalls sets the value of CurrentOutgoingCalls for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyCurrentOutgoingCalls(value uint32) (err error) { + return instance.SetProperty("CurrentOutgoingCalls", (value)) +} + +// GetCurrentOutgoingCalls gets the value of CurrentOutgoingCalls for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyCurrentOutgoingCalls() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentOutgoingCalls") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIncomingCallsPersec sets the value of IncomingCallsPersec for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyIncomingCallsPersec(value uint32) (err error) { + return instance.SetProperty("IncomingCallsPersec", (value)) +} + +// GetIncomingCallsPersec gets the value of IncomingCallsPersec for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyIncomingCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("IncomingCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLines sets the value of Lines for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyLines(value uint32) (err error) { + return instance.SetProperty("Lines", (value)) +} + +// GetLines gets the value of Lines for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyLines() (value uint32, err error) { + retValue, err := instance.GetProperty("Lines") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOutgoingCallsPersec sets the value of OutgoingCallsPersec for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyOutgoingCallsPersec(value uint32) (err error) { + return instance.SetProperty("OutgoingCallsPersec", (value)) +} + +// GetOutgoingCallsPersec gets the value of OutgoingCallsPersec for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyOutgoingCallsPersec() (value uint32, err error) { + retValue, err := instance.GetProperty("OutgoingCallsPersec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTelephoneDevices sets the value of TelephoneDevices for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) SetPropertyTelephoneDevices(value uint32) (err error) { + return instance.SetProperty("TelephoneDevices", (value)) +} + +// GetTelephoneDevices gets the value of TelephoneDevices for the instance +func (instance *Win32_PerfRawData_tapisrv_Telephony) GetPropertyTelephoneDevices() (value uint32, err error) { + retValue, err := instance.GetProperty("TelephoneDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_usbhub_USB.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_usbhub_USB.go new file mode 100644 index 00000000..cf67baf2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PerfRawData_usbhub_USB.go @@ -0,0 +1,620 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PerfRawData_usbhub_USB struct +type Win32_PerfRawData_usbhub_USB struct { + *Win32_PerfRawData + + // + AvgBytesPerTransfer uint64 + + // + AvgBytesPerTransfer_Base uint32 + + // + AvgmslatencyforISOtransfers uint64 + + // + AvgmslatencyforISOtransfers_Base uint32 + + // + BulkBytesPerSec uint32 + + // + ControlDataBytesPerSec uint32 + + // + ControllerPCIInterruptsPerSec uint32 + + // + ControllerWorkSignalsPerSec uint32 + + // + HostControllerAsyncCacheFlushCount uint32 + + // + HostControllerAsyncIdle uint32 + + // + HostControllerIdle uint32 + + // + HostControllerPeriodicCacheFlushCount uint32 + + // + HostControllerPeriodicIdle uint32 + + // + InterruptBytesPerSec uint32 + + // + IsochronousBytesPerSec uint32 + + // + IsoPacketErrorsPerSec uint32 + + // + PercentTotalBandwidthUsedforInterrupt uint32 + + // + PercentTotalBandwidthUsedforIso uint32 + + // + TransferErrorsPerSec uint32 +} + +func NewWin32_PerfRawData_usbhub_USBEx1(instance *cim.WmiInstance) (newInstance *Win32_PerfRawData_usbhub_USB, err error) { + tmp, err := NewWin32_PerfRawDataEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_usbhub_USB{ + Win32_PerfRawData: tmp, + } + return +} + +func NewWin32_PerfRawData_usbhub_USBEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PerfRawData_usbhub_USB, err error) { + tmp, err := NewWin32_PerfRawDataEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PerfRawData_usbhub_USB{ + Win32_PerfRawData: tmp, + } + return +} + +// SetAvgBytesPerTransfer sets the value of AvgBytesPerTransfer for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyAvgBytesPerTransfer(value uint64) (err error) { + return instance.SetProperty("AvgBytesPerTransfer", (value)) +} + +// GetAvgBytesPerTransfer gets the value of AvgBytesPerTransfer for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyAvgBytesPerTransfer() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgBytesPerTransfer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgBytesPerTransfer_Base sets the value of AvgBytesPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyAvgBytesPerTransfer_Base(value uint32) (err error) { + return instance.SetProperty("AvgBytesPerTransfer_Base", (value)) +} + +// GetAvgBytesPerTransfer_Base gets the value of AvgBytesPerTransfer_Base for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyAvgBytesPerTransfer_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgBytesPerTransfer_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAvgmslatencyforISOtransfers sets the value of AvgmslatencyforISOtransfers for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyAvgmslatencyforISOtransfers(value uint64) (err error) { + return instance.SetProperty("AvgmslatencyforISOtransfers", (value)) +} + +// GetAvgmslatencyforISOtransfers gets the value of AvgmslatencyforISOtransfers for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyAvgmslatencyforISOtransfers() (value uint64, err error) { + retValue, err := instance.GetProperty("AvgmslatencyforISOtransfers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAvgmslatencyforISOtransfers_Base sets the value of AvgmslatencyforISOtransfers_Base for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyAvgmslatencyforISOtransfers_Base(value uint32) (err error) { + return instance.SetProperty("AvgmslatencyforISOtransfers_Base", (value)) +} + +// GetAvgmslatencyforISOtransfers_Base gets the value of AvgmslatencyforISOtransfers_Base for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyAvgmslatencyforISOtransfers_Base() (value uint32, err error) { + retValue, err := instance.GetProperty("AvgmslatencyforISOtransfers_Base") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBulkBytesPerSec sets the value of BulkBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyBulkBytesPerSec(value uint32) (err error) { + return instance.SetProperty("BulkBytesPerSec", (value)) +} + +// GetBulkBytesPerSec gets the value of BulkBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyBulkBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("BulkBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetControlDataBytesPerSec sets the value of ControlDataBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyControlDataBytesPerSec(value uint32) (err error) { + return instance.SetProperty("ControlDataBytesPerSec", (value)) +} + +// GetControlDataBytesPerSec gets the value of ControlDataBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyControlDataBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ControlDataBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetControllerPCIInterruptsPerSec sets the value of ControllerPCIInterruptsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyControllerPCIInterruptsPerSec(value uint32) (err error) { + return instance.SetProperty("ControllerPCIInterruptsPerSec", (value)) +} + +// GetControllerPCIInterruptsPerSec gets the value of ControllerPCIInterruptsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyControllerPCIInterruptsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ControllerPCIInterruptsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetControllerWorkSignalsPerSec sets the value of ControllerWorkSignalsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyControllerWorkSignalsPerSec(value uint32) (err error) { + return instance.SetProperty("ControllerWorkSignalsPerSec", (value)) +} + +// GetControllerWorkSignalsPerSec gets the value of ControllerWorkSignalsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyControllerWorkSignalsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("ControllerWorkSignalsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerAsyncCacheFlushCount sets the value of HostControllerAsyncCacheFlushCount for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyHostControllerAsyncCacheFlushCount(value uint32) (err error) { + return instance.SetProperty("HostControllerAsyncCacheFlushCount", (value)) +} + +// GetHostControllerAsyncCacheFlushCount gets the value of HostControllerAsyncCacheFlushCount for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyHostControllerAsyncCacheFlushCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerAsyncCacheFlushCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerAsyncIdle sets the value of HostControllerAsyncIdle for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyHostControllerAsyncIdle(value uint32) (err error) { + return instance.SetProperty("HostControllerAsyncIdle", (value)) +} + +// GetHostControllerAsyncIdle gets the value of HostControllerAsyncIdle for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyHostControllerAsyncIdle() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerAsyncIdle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerIdle sets the value of HostControllerIdle for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyHostControllerIdle(value uint32) (err error) { + return instance.SetProperty("HostControllerIdle", (value)) +} + +// GetHostControllerIdle gets the value of HostControllerIdle for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyHostControllerIdle() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerIdle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerPeriodicCacheFlushCount sets the value of HostControllerPeriodicCacheFlushCount for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyHostControllerPeriodicCacheFlushCount(value uint32) (err error) { + return instance.SetProperty("HostControllerPeriodicCacheFlushCount", (value)) +} + +// GetHostControllerPeriodicCacheFlushCount gets the value of HostControllerPeriodicCacheFlushCount for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyHostControllerPeriodicCacheFlushCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerPeriodicCacheFlushCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHostControllerPeriodicIdle sets the value of HostControllerPeriodicIdle for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyHostControllerPeriodicIdle(value uint32) (err error) { + return instance.SetProperty("HostControllerPeriodicIdle", (value)) +} + +// GetHostControllerPeriodicIdle gets the value of HostControllerPeriodicIdle for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyHostControllerPeriodicIdle() (value uint32, err error) { + retValue, err := instance.GetProperty("HostControllerPeriodicIdle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInterruptBytesPerSec sets the value of InterruptBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyInterruptBytesPerSec(value uint32) (err error) { + return instance.SetProperty("InterruptBytesPerSec", (value)) +} + +// GetInterruptBytesPerSec gets the value of InterruptBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyInterruptBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("InterruptBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsochronousBytesPerSec sets the value of IsochronousBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyIsochronousBytesPerSec(value uint32) (err error) { + return instance.SetProperty("IsochronousBytesPerSec", (value)) +} + +// GetIsochronousBytesPerSec gets the value of IsochronousBytesPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyIsochronousBytesPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsochronousBytesPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsoPacketErrorsPerSec sets the value of IsoPacketErrorsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyIsoPacketErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("IsoPacketErrorsPerSec", (value)) +} + +// GetIsoPacketErrorsPerSec gets the value of IsoPacketErrorsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyIsoPacketErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("IsoPacketErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTotalBandwidthUsedforInterrupt sets the value of PercentTotalBandwidthUsedforInterrupt for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyPercentTotalBandwidthUsedforInterrupt(value uint32) (err error) { + return instance.SetProperty("PercentTotalBandwidthUsedforInterrupt", (value)) +} + +// GetPercentTotalBandwidthUsedforInterrupt gets the value of PercentTotalBandwidthUsedforInterrupt for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyPercentTotalBandwidthUsedforInterrupt() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTotalBandwidthUsedforInterrupt") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPercentTotalBandwidthUsedforIso sets the value of PercentTotalBandwidthUsedforIso for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyPercentTotalBandwidthUsedforIso(value uint32) (err error) { + return instance.SetProperty("PercentTotalBandwidthUsedforIso", (value)) +} + +// GetPercentTotalBandwidthUsedforIso gets the value of PercentTotalBandwidthUsedforIso for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyPercentTotalBandwidthUsedforIso() (value uint32, err error) { + retValue, err := instance.GetProperty("PercentTotalBandwidthUsedforIso") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransferErrorsPerSec sets the value of TransferErrorsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) SetPropertyTransferErrorsPerSec(value uint32) (err error) { + return instance.SetProperty("TransferErrorsPerSec", (value)) +} + +// GetTransferErrorsPerSec gets the value of TransferErrorsPerSec for the instance +func (instance *Win32_PerfRawData_usbhub_USB) GetPropertyTransferErrorsPerSec() (value uint32, err error) { + retValue, err := instance.GetProperty("TransferErrorsPerSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMedia.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMedia.go new file mode 100644 index 00000000..0f6b3630 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMedia.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PhysicalMedia struct +type Win32_PhysicalMedia struct { + *CIM_PhysicalMedia +} + +func NewWin32_PhysicalMediaEx1(instance *cim.WmiInstance) (newInstance *Win32_PhysicalMedia, err error) { + tmp, err := NewCIM_PhysicalMediaEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMedia{ + CIM_PhysicalMedia: tmp, + } + return +} + +func NewWin32_PhysicalMediaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PhysicalMedia, err error) { + tmp, err := NewCIM_PhysicalMediaEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMedia{ + CIM_PhysicalMedia: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemory.go new file mode 100644 index 00000000..c92b2573 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemory.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PhysicalMemory struct +type Win32_PhysicalMemory struct { + *CIM_PhysicalMemory + + // + Attributes uint32 + + // + ConfiguredClockSpeed uint32 + + // + ConfiguredVoltage uint32 + + // + DeviceLocator string + + // + InterleaveDataDepth uint16 + + // + MaxVoltage uint32 + + // + MinVoltage uint32 + + // + SMBIOSMemoryType uint32 + + // + TypeDetail uint16 +} + +func NewWin32_PhysicalMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_PhysicalMemory, err error) { + tmp, err := NewCIM_PhysicalMemoryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMemory{ + CIM_PhysicalMemory: tmp, + } + return +} + +func NewWin32_PhysicalMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PhysicalMemory, err error) { + tmp, err := NewCIM_PhysicalMemoryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMemory{ + CIM_PhysicalMemory: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_PhysicalMemory) SetPropertyAttributes(value uint32) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_PhysicalMemory) GetPropertyAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfiguredClockSpeed sets the value of ConfiguredClockSpeed for the instance +func (instance *Win32_PhysicalMemory) SetPropertyConfiguredClockSpeed(value uint32) (err error) { + return instance.SetProperty("ConfiguredClockSpeed", (value)) +} + +// GetConfiguredClockSpeed gets the value of ConfiguredClockSpeed for the instance +func (instance *Win32_PhysicalMemory) GetPropertyConfiguredClockSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("ConfiguredClockSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetConfiguredVoltage sets the value of ConfiguredVoltage for the instance +func (instance *Win32_PhysicalMemory) SetPropertyConfiguredVoltage(value uint32) (err error) { + return instance.SetProperty("ConfiguredVoltage", (value)) +} + +// GetConfiguredVoltage gets the value of ConfiguredVoltage for the instance +func (instance *Win32_PhysicalMemory) GetPropertyConfiguredVoltage() (value uint32, err error) { + retValue, err := instance.GetProperty("ConfiguredVoltage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceLocator sets the value of DeviceLocator for the instance +func (instance *Win32_PhysicalMemory) SetPropertyDeviceLocator(value string) (err error) { + return instance.SetProperty("DeviceLocator", (value)) +} + +// GetDeviceLocator gets the value of DeviceLocator for the instance +func (instance *Win32_PhysicalMemory) GetPropertyDeviceLocator() (value string, err error) { + retValue, err := instance.GetProperty("DeviceLocator") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInterleaveDataDepth sets the value of InterleaveDataDepth for the instance +func (instance *Win32_PhysicalMemory) SetPropertyInterleaveDataDepth(value uint16) (err error) { + return instance.SetProperty("InterleaveDataDepth", (value)) +} + +// GetInterleaveDataDepth gets the value of InterleaveDataDepth for the instance +func (instance *Win32_PhysicalMemory) GetPropertyInterleaveDataDepth() (value uint16, err error) { + retValue, err := instance.GetProperty("InterleaveDataDepth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxVoltage sets the value of MaxVoltage for the instance +func (instance *Win32_PhysicalMemory) SetPropertyMaxVoltage(value uint32) (err error) { + return instance.SetProperty("MaxVoltage", (value)) +} + +// GetMaxVoltage gets the value of MaxVoltage for the instance +func (instance *Win32_PhysicalMemory) GetPropertyMaxVoltage() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxVoltage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinVoltage sets the value of MinVoltage for the instance +func (instance *Win32_PhysicalMemory) SetPropertyMinVoltage(value uint32) (err error) { + return instance.SetProperty("MinVoltage", (value)) +} + +// GetMinVoltage gets the value of MinVoltage for the instance +func (instance *Win32_PhysicalMemory) GetPropertyMinVoltage() (value uint32, err error) { + retValue, err := instance.GetProperty("MinVoltage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSMBIOSMemoryType sets the value of SMBIOSMemoryType for the instance +func (instance *Win32_PhysicalMemory) SetPropertySMBIOSMemoryType(value uint32) (err error) { + return instance.SetProperty("SMBIOSMemoryType", (value)) +} + +// GetSMBIOSMemoryType gets the value of SMBIOSMemoryType for the instance +func (instance *Win32_PhysicalMemory) GetPropertySMBIOSMemoryType() (value uint32, err error) { + retValue, err := instance.GetProperty("SMBIOSMemoryType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTypeDetail sets the value of TypeDetail for the instance +func (instance *Win32_PhysicalMemory) SetPropertyTypeDetail(value uint16) (err error) { + return instance.SetProperty("TypeDetail", (value)) +} + +// GetTypeDetail gets the value of TypeDetail for the instance +func (instance *Win32_PhysicalMemory) GetPropertyTypeDetail() (value uint16, err error) { + retValue, err := instance.GetProperty("TypeDetail") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryArray.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryArray.go new file mode 100644 index 00000000..82d40ef7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryArray.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PhysicalMemoryArray struct +type Win32_PhysicalMemoryArray struct { + *CIM_PhysicalPackage + + // + Location uint16 + + // + MaxCapacity uint32 + + // + MaxCapacityEx uint64 + + // + MemoryDevices uint16 + + // + MemoryErrorCorrection uint16 + + // + Use uint16 +} + +func NewWin32_PhysicalMemoryArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PhysicalMemoryArray, err error) { + tmp, err := NewCIM_PhysicalPackageEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMemoryArray{ + CIM_PhysicalPackage: tmp, + } + return +} + +func NewWin32_PhysicalMemoryArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PhysicalMemoryArray, err error) { + tmp, err := NewCIM_PhysicalPackageEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMemoryArray{ + CIM_PhysicalPackage: tmp, + } + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_PhysicalMemoryArray) SetPropertyLocation(value uint16) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_PhysicalMemoryArray) GetPropertyLocation() (value uint16, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxCapacity sets the value of MaxCapacity for the instance +func (instance *Win32_PhysicalMemoryArray) SetPropertyMaxCapacity(value uint32) (err error) { + return instance.SetProperty("MaxCapacity", (value)) +} + +// GetMaxCapacity gets the value of MaxCapacity for the instance +func (instance *Win32_PhysicalMemoryArray) GetPropertyMaxCapacity() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxCapacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxCapacityEx sets the value of MaxCapacityEx for the instance +func (instance *Win32_PhysicalMemoryArray) SetPropertyMaxCapacityEx(value uint64) (err error) { + return instance.SetProperty("MaxCapacityEx", (value)) +} + +// GetMaxCapacityEx gets the value of MaxCapacityEx for the instance +func (instance *Win32_PhysicalMemoryArray) GetPropertyMaxCapacityEx() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxCapacityEx") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMemoryDevices sets the value of MemoryDevices for the instance +func (instance *Win32_PhysicalMemoryArray) SetPropertyMemoryDevices(value uint16) (err error) { + return instance.SetProperty("MemoryDevices", (value)) +} + +// GetMemoryDevices gets the value of MemoryDevices for the instance +func (instance *Win32_PhysicalMemoryArray) GetPropertyMemoryDevices() (value uint16, err error) { + retValue, err := instance.GetProperty("MemoryDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMemoryErrorCorrection sets the value of MemoryErrorCorrection for the instance +func (instance *Win32_PhysicalMemoryArray) SetPropertyMemoryErrorCorrection(value uint16) (err error) { + return instance.SetProperty("MemoryErrorCorrection", (value)) +} + +// GetMemoryErrorCorrection gets the value of MemoryErrorCorrection for the instance +func (instance *Win32_PhysicalMemoryArray) GetPropertyMemoryErrorCorrection() (value uint16, err error) { + retValue, err := instance.GetProperty("MemoryErrorCorrection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetUse sets the value of Use for the instance +func (instance *Win32_PhysicalMemoryArray) SetPropertyUse(value uint16) (err error) { + return instance.SetProperty("Use", (value)) +} + +// GetUse gets the value of Use for the instance +func (instance *Win32_PhysicalMemoryArray) GetPropertyUse() (value uint16, err error) { + retValue, err := instance.GetProperty("Use") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryLocation.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryLocation.go new file mode 100644 index 00000000..24adc800 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PhysicalMemoryLocation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PhysicalMemoryLocation struct +type Win32_PhysicalMemoryLocation struct { + *CIM_PackagedComponent +} + +func NewWin32_PhysicalMemoryLocationEx1(instance *cim.WmiInstance) (newInstance *Win32_PhysicalMemoryLocation, err error) { + tmp, err := NewCIM_PackagedComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMemoryLocation{ + CIM_PackagedComponent: tmp, + } + return +} + +func NewWin32_PhysicalMemoryLocationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PhysicalMemoryLocation, err error) { + tmp, err := NewCIM_PackagedComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PhysicalMemoryLocation{ + CIM_PackagedComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PingStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PingStatus.go new file mode 100644 index 00000000..7f93f1a3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PingStatus.go @@ -0,0 +1,776 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PingStatus struct +type Win32_PingStatus struct { + *cim.WmiInstance + + // + Address string + + // + BufferSize uint32 + + // + NoFragmentation bool + + // + PrimaryAddressResolutionStatus uint32 + + // + ProtocolAddress string + + // + ProtocolAddressResolved string + + // + RecordRoute uint32 + + // + ReplyInconsistency bool + + // + ReplySize uint32 + + // + ResolveAddressNames bool + + // + ResponseTime uint32 + + // + ResponseTimeToLive uint32 + + // + RouteRecord []string + + // + RouteRecordResolved []string + + // + SourceRoute string + + // + SourceRouteType uint32 + + // + StatusCode uint32 + + // + Timeout uint32 + + // + TimeStampRecord []uint32 + + // + TimeStampRecordAddress []string + + // + TimeStampRecordAddressResolved []string + + // + TimestampRoute uint32 + + // + TimeToLive uint32 + + // + TypeofService uint32 +} + +func NewWin32_PingStatusEx1(instance *cim.WmiInstance) (newInstance *Win32_PingStatus, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_PingStatus{ + WmiInstance: tmp, + } + return +} + +func NewWin32_PingStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PingStatus, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PingStatus{ + WmiInstance: tmp, + } + return +} + +// SetAddress sets the value of Address for the instance +func (instance *Win32_PingStatus) SetPropertyAddress(value string) (err error) { + return instance.SetProperty("Address", (value)) +} + +// GetAddress gets the value of Address for the instance +func (instance *Win32_PingStatus) GetPropertyAddress() (value string, err error) { + retValue, err := instance.GetProperty("Address") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBufferSize sets the value of BufferSize for the instance +func (instance *Win32_PingStatus) SetPropertyBufferSize(value uint32) (err error) { + return instance.SetProperty("BufferSize", (value)) +} + +// GetBufferSize gets the value of BufferSize for the instance +func (instance *Win32_PingStatus) GetPropertyBufferSize() (value uint32, err error) { + retValue, err := instance.GetProperty("BufferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNoFragmentation sets the value of NoFragmentation for the instance +func (instance *Win32_PingStatus) SetPropertyNoFragmentation(value bool) (err error) { + return instance.SetProperty("NoFragmentation", (value)) +} + +// GetNoFragmentation gets the value of NoFragmentation for the instance +func (instance *Win32_PingStatus) GetPropertyNoFragmentation() (value bool, err error) { + retValue, err := instance.GetProperty("NoFragmentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPrimaryAddressResolutionStatus sets the value of PrimaryAddressResolutionStatus for the instance +func (instance *Win32_PingStatus) SetPropertyPrimaryAddressResolutionStatus(value uint32) (err error) { + return instance.SetProperty("PrimaryAddressResolutionStatus", (value)) +} + +// GetPrimaryAddressResolutionStatus gets the value of PrimaryAddressResolutionStatus for the instance +func (instance *Win32_PingStatus) GetPropertyPrimaryAddressResolutionStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("PrimaryAddressResolutionStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocolAddress sets the value of ProtocolAddress for the instance +func (instance *Win32_PingStatus) SetPropertyProtocolAddress(value string) (err error) { + return instance.SetProperty("ProtocolAddress", (value)) +} + +// GetProtocolAddress gets the value of ProtocolAddress for the instance +func (instance *Win32_PingStatus) GetPropertyProtocolAddress() (value string, err error) { + retValue, err := instance.GetProperty("ProtocolAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProtocolAddressResolved sets the value of ProtocolAddressResolved for the instance +func (instance *Win32_PingStatus) SetPropertyProtocolAddressResolved(value string) (err error) { + return instance.SetProperty("ProtocolAddressResolved", (value)) +} + +// GetProtocolAddressResolved gets the value of ProtocolAddressResolved for the instance +func (instance *Win32_PingStatus) GetPropertyProtocolAddressResolved() (value string, err error) { + retValue, err := instance.GetProperty("ProtocolAddressResolved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecordRoute sets the value of RecordRoute for the instance +func (instance *Win32_PingStatus) SetPropertyRecordRoute(value uint32) (err error) { + return instance.SetProperty("RecordRoute", (value)) +} + +// GetRecordRoute gets the value of RecordRoute for the instance +func (instance *Win32_PingStatus) GetPropertyRecordRoute() (value uint32, err error) { + retValue, err := instance.GetProperty("RecordRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReplyInconsistency sets the value of ReplyInconsistency for the instance +func (instance *Win32_PingStatus) SetPropertyReplyInconsistency(value bool) (err error) { + return instance.SetProperty("ReplyInconsistency", (value)) +} + +// GetReplyInconsistency gets the value of ReplyInconsistency for the instance +func (instance *Win32_PingStatus) GetPropertyReplyInconsistency() (value bool, err error) { + retValue, err := instance.GetProperty("ReplyInconsistency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReplySize sets the value of ReplySize for the instance +func (instance *Win32_PingStatus) SetPropertyReplySize(value uint32) (err error) { + return instance.SetProperty("ReplySize", (value)) +} + +// GetReplySize gets the value of ReplySize for the instance +func (instance *Win32_PingStatus) GetPropertyReplySize() (value uint32, err error) { + retValue, err := instance.GetProperty("ReplySize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResolveAddressNames sets the value of ResolveAddressNames for the instance +func (instance *Win32_PingStatus) SetPropertyResolveAddressNames(value bool) (err error) { + return instance.SetProperty("ResolveAddressNames", (value)) +} + +// GetResolveAddressNames gets the value of ResolveAddressNames for the instance +func (instance *Win32_PingStatus) GetPropertyResolveAddressNames() (value bool, err error) { + retValue, err := instance.GetProperty("ResolveAddressNames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetResponseTime sets the value of ResponseTime for the instance +func (instance *Win32_PingStatus) SetPropertyResponseTime(value uint32) (err error) { + return instance.SetProperty("ResponseTime", (value)) +} + +// GetResponseTime gets the value of ResponseTime for the instance +func (instance *Win32_PingStatus) GetPropertyResponseTime() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResponseTimeToLive sets the value of ResponseTimeToLive for the instance +func (instance *Win32_PingStatus) SetPropertyResponseTimeToLive(value uint32) (err error) { + return instance.SetProperty("ResponseTimeToLive", (value)) +} + +// GetResponseTimeToLive gets the value of ResponseTimeToLive for the instance +func (instance *Win32_PingStatus) GetPropertyResponseTimeToLive() (value uint32, err error) { + retValue, err := instance.GetProperty("ResponseTimeToLive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRouteRecord sets the value of RouteRecord for the instance +func (instance *Win32_PingStatus) SetPropertyRouteRecord(value []string) (err error) { + return instance.SetProperty("RouteRecord", (value)) +} + +// GetRouteRecord gets the value of RouteRecord for the instance +func (instance *Win32_PingStatus) GetPropertyRouteRecord() (value []string, err error) { + retValue, err := instance.GetProperty("RouteRecord") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetRouteRecordResolved sets the value of RouteRecordResolved for the instance +func (instance *Win32_PingStatus) SetPropertyRouteRecordResolved(value []string) (err error) { + return instance.SetProperty("RouteRecordResolved", (value)) +} + +// GetRouteRecordResolved gets the value of RouteRecordResolved for the instance +func (instance *Win32_PingStatus) GetPropertyRouteRecordResolved() (value []string, err error) { + retValue, err := instance.GetProperty("RouteRecordResolved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSourceRoute sets the value of SourceRoute for the instance +func (instance *Win32_PingStatus) SetPropertySourceRoute(value string) (err error) { + return instance.SetProperty("SourceRoute", (value)) +} + +// GetSourceRoute gets the value of SourceRoute for the instance +func (instance *Win32_PingStatus) GetPropertySourceRoute() (value string, err error) { + retValue, err := instance.GetProperty("SourceRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceRouteType sets the value of SourceRouteType for the instance +func (instance *Win32_PingStatus) SetPropertySourceRouteType(value uint32) (err error) { + return instance.SetProperty("SourceRouteType", (value)) +} + +// GetSourceRouteType gets the value of SourceRouteType for the instance +func (instance *Win32_PingStatus) GetPropertySourceRouteType() (value uint32, err error) { + retValue, err := instance.GetProperty("SourceRouteType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStatusCode sets the value of StatusCode for the instance +func (instance *Win32_PingStatus) SetPropertyStatusCode(value uint32) (err error) { + return instance.SetProperty("StatusCode", (value)) +} + +// GetStatusCode gets the value of StatusCode for the instance +func (instance *Win32_PingStatus) GetPropertyStatusCode() (value uint32, err error) { + retValue, err := instance.GetProperty("StatusCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeout sets the value of Timeout for the instance +func (instance *Win32_PingStatus) SetPropertyTimeout(value uint32) (err error) { + return instance.SetProperty("Timeout", (value)) +} + +// GetTimeout gets the value of Timeout for the instance +func (instance *Win32_PingStatus) GetPropertyTimeout() (value uint32, err error) { + retValue, err := instance.GetProperty("Timeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeStampRecord sets the value of TimeStampRecord for the instance +func (instance *Win32_PingStatus) SetPropertyTimeStampRecord(value []uint32) (err error) { + return instance.SetProperty("TimeStampRecord", (value)) +} + +// GetTimeStampRecord gets the value of TimeStampRecord for the instance +func (instance *Win32_PingStatus) GetPropertyTimeStampRecord() (value []uint32, err error) { + retValue, err := instance.GetProperty("TimeStampRecord") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint32(valuetmp)) + } + + return +} + +// SetTimeStampRecordAddress sets the value of TimeStampRecordAddress for the instance +func (instance *Win32_PingStatus) SetPropertyTimeStampRecordAddress(value []string) (err error) { + return instance.SetProperty("TimeStampRecordAddress", (value)) +} + +// GetTimeStampRecordAddress gets the value of TimeStampRecordAddress for the instance +func (instance *Win32_PingStatus) GetPropertyTimeStampRecordAddress() (value []string, err error) { + retValue, err := instance.GetProperty("TimeStampRecordAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetTimeStampRecordAddressResolved sets the value of TimeStampRecordAddressResolved for the instance +func (instance *Win32_PingStatus) SetPropertyTimeStampRecordAddressResolved(value []string) (err error) { + return instance.SetProperty("TimeStampRecordAddressResolved", (value)) +} + +// GetTimeStampRecordAddressResolved gets the value of TimeStampRecordAddressResolved for the instance +func (instance *Win32_PingStatus) GetPropertyTimeStampRecordAddressResolved() (value []string, err error) { + retValue, err := instance.GetProperty("TimeStampRecordAddressResolved") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetTimestampRoute sets the value of TimestampRoute for the instance +func (instance *Win32_PingStatus) SetPropertyTimestampRoute(value uint32) (err error) { + return instance.SetProperty("TimestampRoute", (value)) +} + +// GetTimestampRoute gets the value of TimestampRoute for the instance +func (instance *Win32_PingStatus) GetPropertyTimestampRoute() (value uint32, err error) { + retValue, err := instance.GetProperty("TimestampRoute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeToLive sets the value of TimeToLive for the instance +func (instance *Win32_PingStatus) SetPropertyTimeToLive(value uint32) (err error) { + return instance.SetProperty("TimeToLive", (value)) +} + +// GetTimeToLive gets the value of TimeToLive for the instance +func (instance *Win32_PingStatus) GetPropertyTimeToLive() (value uint32, err error) { + retValue, err := instance.GetProperty("TimeToLive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTypeofService sets the value of TypeofService for the instance +func (instance *Win32_PingStatus) SetPropertyTypeofService(value uint32) (err error) { + return instance.SetProperty("TypeofService", (value)) +} + +// GetTypeofService gets the value of TypeofService for the instance +func (instance *Win32_PingStatus) GetPropertyTypeofService() (value uint32, err error) { + retValue, err := instance.GetProperty("TypeofService") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevice.go new file mode 100644 index 00000000..61c05ac3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevice.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevice struct +type Win32_PnPDevice struct { + *cim.WmiInstance + + // + SameElement CIM_LogicalDevice + + // + SystemElement Win32_PnPEntity +} + +func NewWin32_PnPDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevice, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_PnPDevice{ + WmiInstance: tmp, + } + return +} + +func NewWin32_PnPDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevice, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevice{ + WmiInstance: tmp, + } + return +} + +// SetSameElement sets the value of SameElement for the instance +func (instance *Win32_PnPDevice) SetPropertySameElement(value CIM_LogicalDevice) (err error) { + return instance.SetProperty("SameElement", (value)) +} + +// GetSameElement gets the value of SameElement for the instance +func (instance *Win32_PnPDevice) GetPropertySameElement() (value CIM_LogicalDevice, err error) { + retValue, err := instance.GetProperty("SameElement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_LogicalDevice) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_LogicalDevice is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_LogicalDevice(valuetmp) + + return +} + +// SetSystemElement sets the value of SystemElement for the instance +func (instance *Win32_PnPDevice) SetPropertySystemElement(value Win32_PnPEntity) (err error) { + return instance.SetProperty("SystemElement", (value)) +} + +// GetSystemElement gets the value of SystemElement for the instance +func (instance *Win32_PnPDevice) GetPropertySystemElement() (value Win32_PnPEntity, err error) { + retValue, err := instance.GetProperty("SystemElement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_PnPEntity) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_PnPEntity is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_PnPEntity(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDeviceProperty.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDeviceProperty.go new file mode 100644 index 00000000..62142d09 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDeviceProperty.go @@ -0,0 +1,171 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDeviceProperty struct +type Win32_PnPDeviceProperty struct { + *cim.WmiInstance + + // + DeviceID string + + // + key string + + // + KeyName string + + // + Type uint32 +} + +func NewWin32_PnPDevicePropertyEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDeviceProperty, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_PnPDeviceProperty{ + WmiInstance: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDeviceProperty, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDeviceProperty{ + WmiInstance: tmp, + } + return +} + +// SetDeviceID sets the value of DeviceID for the instance +func (instance *Win32_PnPDeviceProperty) SetPropertyDeviceID(value string) (err error) { + return instance.SetProperty("DeviceID", (value)) +} + +// GetDeviceID gets the value of DeviceID for the instance +func (instance *Win32_PnPDeviceProperty) GetPropertyDeviceID() (value string, err error) { + retValue, err := instance.GetProperty("DeviceID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setkey sets the value of key for the instance +func (instance *Win32_PnPDeviceProperty) SetPropertykey(value string) (err error) { + return instance.SetProperty("key", (value)) +} + +// Getkey gets the value of key for the instance +func (instance *Win32_PnPDeviceProperty) GetPropertykey() (value string, err error) { + retValue, err := instance.GetProperty("key") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetKeyName sets the value of KeyName for the instance +func (instance *Win32_PnPDeviceProperty) SetPropertyKeyName(value string) (err error) { + return instance.SetProperty("KeyName", (value)) +} + +// GetKeyName gets the value of KeyName for the instance +func (instance *Win32_PnPDeviceProperty) GetPropertyKeyName() (value string, err error) { + retValue, err := instance.GetProperty("KeyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_PnPDeviceProperty) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_PnPDeviceProperty) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBinary.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBinary.go new file mode 100644 index 00000000..146730d8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBinary.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyBinary struct +type Win32_PnPDevicePropertyBinary struct { + *Win32_PnPDeviceProperty + + // + Data []uint8 +} + +func NewWin32_PnPDevicePropertyBinaryEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyBinary, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyBinary{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyBinaryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyBinary, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyBinary{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyBinary) SetPropertyData(value []uint8) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyBinary) GetPropertyData() (value []uint8, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBoolean.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBoolean.go new file mode 100644 index 00000000..2ab50eeb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBoolean.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyBoolean struct +type Win32_PnPDevicePropertyBoolean struct { + *Win32_PnPDeviceProperty + + // + Data bool +} + +func NewWin32_PnPDevicePropertyBooleanEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyBoolean, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyBoolean{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyBooleanEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyBoolean, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyBoolean{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyBoolean) SetPropertyData(value bool) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyBoolean) GetPropertyData() (value bool, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBooleanArray.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBooleanArray.go new file mode 100644 index 00000000..42e6e6f7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyBooleanArray.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyBooleanArray struct +type Win32_PnPDevicePropertyBooleanArray struct { + *Win32_PnPDeviceProperty + + // + Data []bool +} + +func NewWin32_PnPDevicePropertyBooleanArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyBooleanArray, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyBooleanArray{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyBooleanArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyBooleanArray, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyBooleanArray{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyBooleanArray) SetPropertyData(value []bool) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyBooleanArray) GetPropertyData() (value []bool, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, bool(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyDateTime.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyDateTime.go new file mode 100644 index 00000000..c2ad3b09 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyDateTime.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyDateTime struct +type Win32_PnPDevicePropertyDateTime struct { + *Win32_PnPDeviceProperty + + // + Data string +} + +func NewWin32_PnPDevicePropertyDateTimeEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyDateTime, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyDateTime{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyDateTimeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyDateTime, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyDateTime{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyDateTime) SetPropertyData(value string) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyDateTime) GetPropertyData() (value string, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32.go new file mode 100644 index 00000000..2d348adf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyReal32 struct +type Win32_PnPDevicePropertyReal32 struct { + *Win32_PnPDeviceProperty + + // + Data float32 +} + +func NewWin32_PnPDevicePropertyReal32Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyReal32, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal32{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyReal32Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyReal32, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal32{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal32) SetPropertyData(value float32) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal32) GetPropertyData() (value float32, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32Array.go new file mode 100644 index 00000000..621514d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal32Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyReal32Array struct +type Win32_PnPDevicePropertyReal32Array struct { + *Win32_PnPDeviceProperty + + // + Data []float32 +} + +func NewWin32_PnPDevicePropertyReal32ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyReal32Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal32Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyReal32ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyReal32Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal32Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal32Array) SetPropertyData(value []float32) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal32Array) GetPropertyData() (value []float32, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, float32(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64.go new file mode 100644 index 00000000..b309dbe4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyReal64 struct +type Win32_PnPDevicePropertyReal64 struct { + *Win32_PnPDeviceProperty + + // + Data float64 +} + +func NewWin32_PnPDevicePropertyReal64Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyReal64, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal64{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyReal64Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyReal64, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal64{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal64) SetPropertyData(value float64) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal64) GetPropertyData() (value float64, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64Array.go new file mode 100644 index 00000000..2d017ee4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyReal64Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyReal64Array struct +type Win32_PnPDevicePropertyReal64Array struct { + *Win32_PnPDeviceProperty + + // + Data []float64 +} + +func NewWin32_PnPDevicePropertyReal64ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyReal64Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal64Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyReal64ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyReal64Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyReal64Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal64Array) SetPropertyData(value []float64) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyReal64Array) GetPropertyData() (value []float64, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, float64(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptor.go new file mode 100644 index 00000000..58beeadf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptor.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySecurityDescriptor struct +type Win32_PnPDevicePropertySecurityDescriptor struct { + *Win32_PnPDeviceProperty + + // + Data Win32_SecurityDescriptor +} + +func NewWin32_PnPDevicePropertySecurityDescriptorEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySecurityDescriptor, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySecurityDescriptor{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySecurityDescriptorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySecurityDescriptor, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySecurityDescriptor{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySecurityDescriptor) SetPropertyData(value Win32_SecurityDescriptor) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySecurityDescriptor) GetPropertyData() (value Win32_SecurityDescriptor, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SecurityDescriptor) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SecurityDescriptor is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SecurityDescriptor(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptorArray.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptorArray.go new file mode 100644 index 00000000..81c8b8a4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySecurityDescriptorArray.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySecurityDescriptorArray struct +type Win32_PnPDevicePropertySecurityDescriptorArray struct { + *Win32_PnPDeviceProperty + + // + Data []Win32_SecurityDescriptor +} + +func NewWin32_PnPDevicePropertySecurityDescriptorArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySecurityDescriptorArray, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySecurityDescriptorArray{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySecurityDescriptorArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySecurityDescriptorArray, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySecurityDescriptorArray{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySecurityDescriptorArray) SetPropertyData(value []Win32_SecurityDescriptor) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySecurityDescriptorArray) GetPropertyData() (value []Win32_SecurityDescriptor, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(Win32_SecurityDescriptor) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SecurityDescriptor is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, Win32_SecurityDescriptor(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16.go new file mode 100644 index 00000000..f6e7e16d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint16 struct +type Win32_PnPDevicePropertySint16 struct { + *Win32_PnPDeviceProperty + + // + Data int16 +} + +func NewWin32_PnPDevicePropertySint16Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint16, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint16{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint16Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint16, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint16{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint16) SetPropertyData(value int16) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint16) GetPropertyData() (value int16, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16Array.go new file mode 100644 index 00000000..d7054399 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint16Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint16Array struct +type Win32_PnPDevicePropertySint16Array struct { + *Win32_PnPDeviceProperty + + // + Data []int16 +} + +func NewWin32_PnPDevicePropertySint16ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint16Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint16Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint16ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint16Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint16Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint16Array) SetPropertyData(value []int16) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint16Array) GetPropertyData() (value []int16, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, int16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32.go new file mode 100644 index 00000000..caf5a7b0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint32 struct +type Win32_PnPDevicePropertySint32 struct { + *Win32_PnPDeviceProperty + + // + Data int32 +} + +func NewWin32_PnPDevicePropertySint32Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint32, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint32{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint32Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint32, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint32{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint32) SetPropertyData(value int32) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint32) GetPropertyData() (value int32, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32Array.go new file mode 100644 index 00000000..cf1609f7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint32Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint32Array struct +type Win32_PnPDevicePropertySint32Array struct { + *Win32_PnPDeviceProperty + + // + Data []int32 +} + +func NewWin32_PnPDevicePropertySint32ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint32Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint32Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint32ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint32Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint32Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint32Array) SetPropertyData(value []int32) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint32Array) GetPropertyData() (value []int32, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, int32(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint64.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint64.go new file mode 100644 index 00000000..e0a1e3c5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint64.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint64 struct +type Win32_PnPDevicePropertySint64 struct { + *Win32_PnPDeviceProperty + + // + Data int64 +} + +func NewWin32_PnPDevicePropertySint64Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint64, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint64{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint64Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint64, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint64{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint64) SetPropertyData(value int64) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint64) GetPropertyData() (value int64, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8.go new file mode 100644 index 00000000..51b9c9f2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint8 struct +type Win32_PnPDevicePropertySint8 struct { + *Win32_PnPDeviceProperty + + // + Data int8 +} + +func NewWin32_PnPDevicePropertySint8Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint8, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint8{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint8Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint8, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint8{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint8) SetPropertyData(value int8) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint8) GetPropertyData() (value int8, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int8(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8Array.go new file mode 100644 index 00000000..d864049a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertySint8Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertySint8Array struct +type Win32_PnPDevicePropertySint8Array struct { + *Win32_PnPDeviceProperty + + // + Data []int8 +} + +func NewWin32_PnPDevicePropertySint8ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertySint8Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint8Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertySint8ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertySint8Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertySint8Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint8Array) SetPropertyData(value []int8) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertySint8Array) GetPropertyData() (value []int8, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(int8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, int8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyString.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyString.go new file mode 100644 index 00000000..5f397f73 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyString.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyString struct +type Win32_PnPDevicePropertyString struct { + *Win32_PnPDeviceProperty + + // + Data string +} + +func NewWin32_PnPDevicePropertyStringEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyString, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyString{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyStringEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyString, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyString{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyString) SetPropertyData(value string) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyString) GetPropertyData() (value string, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyStringArray.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyStringArray.go new file mode 100644 index 00000000..19d4994e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyStringArray.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyStringArray struct +type Win32_PnPDevicePropertyStringArray struct { + *Win32_PnPDeviceProperty + + // + Data []string +} + +func NewWin32_PnPDevicePropertyStringArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyStringArray, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyStringArray{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyStringArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyStringArray, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyStringArray{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyStringArray) SetPropertyData(value []string) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyStringArray) GetPropertyData() (value []string, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16.go new file mode 100644 index 00000000..6e1a1067 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyUint16 struct +type Win32_PnPDevicePropertyUint16 struct { + *Win32_PnPDeviceProperty + + // + Data uint16 +} + +func NewWin32_PnPDevicePropertyUint16Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyUint16, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint16{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyUint16Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyUint16, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint16{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint16) SetPropertyData(value uint16) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint16) GetPropertyData() (value uint16, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16Array.go new file mode 100644 index 00000000..730de72b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint16Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyUint16Array struct +type Win32_PnPDevicePropertyUint16Array struct { + *Win32_PnPDeviceProperty + + // + Data []uint16 +} + +func NewWin32_PnPDevicePropertyUint16ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyUint16Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint16Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyUint16ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyUint16Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint16Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint16Array) SetPropertyData(value []uint16) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint16Array) GetPropertyData() (value []uint16, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32.go new file mode 100644 index 00000000..d656bbdd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyUint32 struct +type Win32_PnPDevicePropertyUint32 struct { + *Win32_PnPDeviceProperty + + // + Data uint32 +} + +func NewWin32_PnPDevicePropertyUint32Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyUint32, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint32{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyUint32Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyUint32, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint32{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint32) SetPropertyData(value uint32) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint32) GetPropertyData() (value uint32, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32Array.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32Array.go new file mode 100644 index 00000000..830a310f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint32Array.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyUint32Array struct +type Win32_PnPDevicePropertyUint32Array struct { + *Win32_PnPDeviceProperty + + // + Data []uint32 +} + +func NewWin32_PnPDevicePropertyUint32ArrayEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyUint32Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint32Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyUint32ArrayEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyUint32Array, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint32Array{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint32Array) SetPropertyData(value []uint32) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint32Array) GetPropertyData() (value []uint32, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint32(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint64.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint64.go new file mode 100644 index 00000000..d01573f2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint64.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyUint64 struct +type Win32_PnPDevicePropertyUint64 struct { + *Win32_PnPDeviceProperty + + // + Data uint64 +} + +func NewWin32_PnPDevicePropertyUint64Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyUint64, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint64{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyUint64Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyUint64, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint64{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint64) SetPropertyData(value uint64) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint64) GetPropertyData() (value uint64, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint8.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint8.go new file mode 100644 index 00000000..37909794 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPDevicePropertyUint8.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPDevicePropertyUint8 struct +type Win32_PnPDevicePropertyUint8 struct { + *Win32_PnPDeviceProperty + + // + Data uint8 +} + +func NewWin32_PnPDevicePropertyUint8Ex1(instance *cim.WmiInstance) (newInstance *Win32_PnPDevicePropertyUint8, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint8{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +func NewWin32_PnPDevicePropertyUint8Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPDevicePropertyUint8, err error) { + tmp, err := NewWin32_PnPDevicePropertyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPDevicePropertyUint8{ + Win32_PnPDeviceProperty: tmp, + } + return +} + +// SetData sets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint8) SetPropertyData(value uint8) (err error) { + return instance.SetProperty("Data", (value)) +} + +// GetData gets the value of Data for the instance +func (instance *Win32_PnPDevicePropertyUint8) GetPropertyData() (value uint8, err error) { + retValue, err := instance.GetProperty("Data") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPEntity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPEntity.go new file mode 100644 index 00000000..aa6fb4e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPEntity.go @@ -0,0 +1,310 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPEntity struct +type Win32_PnPEntity struct { + *CIM_LogicalDevice + + // + ClassGuid string + + // + CompatibleID []string + + // + HardwareID []string + + // + Manufacturer string + + // + PNPClass string + + // + Present bool + + // + Service string +} + +func NewWin32_PnPEntityEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPEntity, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPEntity{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewWin32_PnPEntityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPEntity, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPEntity{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetClassGuid sets the value of ClassGuid for the instance +func (instance *Win32_PnPEntity) SetPropertyClassGuid(value string) (err error) { + return instance.SetProperty("ClassGuid", (value)) +} + +// GetClassGuid gets the value of ClassGuid for the instance +func (instance *Win32_PnPEntity) GetPropertyClassGuid() (value string, err error) { + retValue, err := instance.GetProperty("ClassGuid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCompatibleID sets the value of CompatibleID for the instance +func (instance *Win32_PnPEntity) SetPropertyCompatibleID(value []string) (err error) { + return instance.SetProperty("CompatibleID", (value)) +} + +// GetCompatibleID gets the value of CompatibleID for the instance +func (instance *Win32_PnPEntity) GetPropertyCompatibleID() (value []string, err error) { + retValue, err := instance.GetProperty("CompatibleID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetHardwareID sets the value of HardwareID for the instance +func (instance *Win32_PnPEntity) SetPropertyHardwareID(value []string) (err error) { + return instance.SetProperty("HardwareID", (value)) +} + +// GetHardwareID gets the value of HardwareID for the instance +func (instance *Win32_PnPEntity) GetPropertyHardwareID() (value []string, err error) { + retValue, err := instance.GetProperty("HardwareID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_PnPEntity) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_PnPEntity) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPNPClass sets the value of PNPClass for the instance +func (instance *Win32_PnPEntity) SetPropertyPNPClass(value string) (err error) { + return instance.SetProperty("PNPClass", (value)) +} + +// GetPNPClass gets the value of PNPClass for the instance +func (instance *Win32_PnPEntity) GetPropertyPNPClass() (value string, err error) { + retValue, err := instance.GetProperty("PNPClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPresent sets the value of Present for the instance +func (instance *Win32_PnPEntity) SetPropertyPresent(value bool) (err error) { + return instance.SetProperty("Present", (value)) +} + +// GetPresent gets the value of Present for the instance +func (instance *Win32_PnPEntity) GetPropertyPresent() (value bool, err error) { + retValue, err := instance.GetProperty("Present") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetService sets the value of Service for the instance +func (instance *Win32_PnPEntity) SetPropertyService(value string) (err error) { + return instance.SetProperty("Service", (value)) +} + +// GetService gets the value of Service for the instance +func (instance *Win32_PnPEntity) GetPropertyService() (value string, err error) { + retValue, err := instance.GetProperty("Service") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +func (instance *Win32_PnPEntity) Enable( /* OUT */ rebootNeeded bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Enable") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *Win32_PnPEntity) Disable( /* OUT */ rebootNeeded bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Disable") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *Win32_PnPEntity) GetDeviceProperties( /* OPTIONAL IN */ devicePropertyKeys []string, + /* OUT */ deviceProperties []Win32_PnPDeviceProperty) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetDeviceProperties", devicePropertyKeys) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriver.go new file mode 100644 index 00000000..16fc8b5b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriver.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PnPSignedDriver struct +type Win32_PnPSignedDriver struct { + *CIM_Service + + // + ClassGuid string + + // + CompatID string + + // + DeviceClass string + + // + DeviceID string + + // + DeviceName string + + // + DevLoader string + + // + DriverDate string + + // + DriverName string + + // + DriverProviderName string + + // + DriverVersion string + + // + FriendlyName string + + // + HardWareID string + + // + InfName string + + // + IsSigned bool + + // + Location string + + // + Manufacturer string + + // + PDO string + + // + Signer string +} + +func NewWin32_PnPSignedDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPSignedDriver, err error) { + tmp, err := NewCIM_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPSignedDriver{ + CIM_Service: tmp, + } + return +} + +func NewWin32_PnPSignedDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPSignedDriver, err error) { + tmp, err := NewCIM_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPSignedDriver{ + CIM_Service: tmp, + } + return +} + +// SetClassGuid sets the value of ClassGuid for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyClassGuid(value string) (err error) { + return instance.SetProperty("ClassGuid", (value)) +} + +// GetClassGuid gets the value of ClassGuid for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyClassGuid() (value string, err error) { + retValue, err := instance.GetProperty("ClassGuid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCompatID sets the value of CompatID for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyCompatID(value string) (err error) { + return instance.SetProperty("CompatID", (value)) +} + +// GetCompatID gets the value of CompatID for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyCompatID() (value string, err error) { + retValue, err := instance.GetProperty("CompatID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceClass sets the value of DeviceClass for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDeviceClass(value string) (err error) { + return instance.SetProperty("DeviceClass", (value)) +} + +// GetDeviceClass gets the value of DeviceClass for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDeviceClass() (value string, err error) { + retValue, err := instance.GetProperty("DeviceClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceID sets the value of DeviceID for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDeviceID(value string) (err error) { + return instance.SetProperty("DeviceID", (value)) +} + +// GetDeviceID gets the value of DeviceID for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDeviceID() (value string, err error) { + retValue, err := instance.GetProperty("DeviceID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDeviceName sets the value of DeviceName for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDeviceName(value string) (err error) { + return instance.SetProperty("DeviceName", (value)) +} + +// GetDeviceName gets the value of DeviceName for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDeviceName() (value string, err error) { + retValue, err := instance.GetProperty("DeviceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDevLoader sets the value of DevLoader for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDevLoader(value string) (err error) { + return instance.SetProperty("DevLoader", (value)) +} + +// GetDevLoader gets the value of DevLoader for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDevLoader() (value string, err error) { + retValue, err := instance.GetProperty("DevLoader") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverDate sets the value of DriverDate for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDriverDate(value string) (err error) { + return instance.SetProperty("DriverDate", (value)) +} + +// GetDriverDate gets the value of DriverDate for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDriverDate() (value string, err error) { + retValue, err := instance.GetProperty("DriverDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverName sets the value of DriverName for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDriverName(value string) (err error) { + return instance.SetProperty("DriverName", (value)) +} + +// GetDriverName gets the value of DriverName for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDriverName() (value string, err error) { + retValue, err := instance.GetProperty("DriverName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverProviderName sets the value of DriverProviderName for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDriverProviderName(value string) (err error) { + return instance.SetProperty("DriverProviderName", (value)) +} + +// GetDriverProviderName gets the value of DriverProviderName for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDriverProviderName() (value string, err error) { + retValue, err := instance.GetProperty("DriverProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverVersion sets the value of DriverVersion for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyDriverVersion(value string) (err error) { + return instance.SetProperty("DriverVersion", (value)) +} + +// GetDriverVersion gets the value of DriverVersion for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyDriverVersion() (value string, err error) { + retValue, err := instance.GetProperty("DriverVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHardWareID sets the value of HardWareID for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyHardWareID(value string) (err error) { + return instance.SetProperty("HardWareID", (value)) +} + +// GetHardWareID gets the value of HardWareID for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyHardWareID() (value string, err error) { + retValue, err := instance.GetProperty("HardWareID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInfName sets the value of InfName for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyInfName(value string) (err error) { + return instance.SetProperty("InfName", (value)) +} + +// GetInfName gets the value of InfName for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyInfName() (value string, err error) { + retValue, err := instance.GetProperty("InfName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsSigned sets the value of IsSigned for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyIsSigned(value bool) (err error) { + return instance.SetProperty("IsSigned", (value)) +} + +// GetIsSigned gets the value of IsSigned for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyIsSigned() (value bool, err error) { + retValue, err := instance.GetProperty("IsSigned") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyLocation(value string) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyLocation() (value string, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPDO sets the value of PDO for the instance +func (instance *Win32_PnPSignedDriver) SetPropertyPDO(value string) (err error) { + return instance.SetProperty("PDO", (value)) +} + +// GetPDO gets the value of PDO for the instance +func (instance *Win32_PnPSignedDriver) GetPropertyPDO() (value string, err error) { + retValue, err := instance.GetProperty("PDO") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSigner sets the value of Signer for the instance +func (instance *Win32_PnPSignedDriver) SetPropertySigner(value string) (err error) { + return instance.SetProperty("Signer", (value)) +} + +// GetSigner gets the value of Signer for the instance +func (instance *Win32_PnPSignedDriver) GetPropertySigner() (value string, err error) { + retValue, err := instance.GetProperty("Signer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriverCIMDataFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriverCIMDataFile.go new file mode 100644 index 00000000..1caa31ef --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PnPSignedDriverCIMDataFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PnPSignedDriverCIMDataFile struct +type Win32_PnPSignedDriverCIMDataFile struct { + *CIM_Dependency +} + +func NewWin32_PnPSignedDriverCIMDataFileEx1(instance *cim.WmiInstance) (newInstance *Win32_PnPSignedDriverCIMDataFile, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PnPSignedDriverCIMDataFile{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_PnPSignedDriverCIMDataFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PnPSignedDriverCIMDataFile, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PnPSignedDriverCIMDataFile{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PointingDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PointingDevice.go new file mode 100644 index 00000000..a497cddd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PointingDevice.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PointingDevice struct +type Win32_PointingDevice struct { + *CIM_PointingDevice + + // + DeviceInterface uint16 + + // + DoubleSpeedThreshold uint32 + + // + HardwareType string + + // + InfFileName string + + // + InfSection string + + // + Manufacturer string + + // + QuadSpeedThreshold uint32 + + // + SampleRate uint32 + + // + Synch uint32 +} + +func NewWin32_PointingDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_PointingDevice, err error) { + tmp, err := NewCIM_PointingDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PointingDevice{ + CIM_PointingDevice: tmp, + } + return +} + +func NewWin32_PointingDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PointingDevice, err error) { + tmp, err := NewCIM_PointingDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PointingDevice{ + CIM_PointingDevice: tmp, + } + return +} + +// SetDeviceInterface sets the value of DeviceInterface for the instance +func (instance *Win32_PointingDevice) SetPropertyDeviceInterface(value uint16) (err error) { + return instance.SetProperty("DeviceInterface", (value)) +} + +// GetDeviceInterface gets the value of DeviceInterface for the instance +func (instance *Win32_PointingDevice) GetPropertyDeviceInterface() (value uint16, err error) { + retValue, err := instance.GetProperty("DeviceInterface") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDoubleSpeedThreshold sets the value of DoubleSpeedThreshold for the instance +func (instance *Win32_PointingDevice) SetPropertyDoubleSpeedThreshold(value uint32) (err error) { + return instance.SetProperty("DoubleSpeedThreshold", (value)) +} + +// GetDoubleSpeedThreshold gets the value of DoubleSpeedThreshold for the instance +func (instance *Win32_PointingDevice) GetPropertyDoubleSpeedThreshold() (value uint32, err error) { + retValue, err := instance.GetProperty("DoubleSpeedThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHardwareType sets the value of HardwareType for the instance +func (instance *Win32_PointingDevice) SetPropertyHardwareType(value string) (err error) { + return instance.SetProperty("HardwareType", (value)) +} + +// GetHardwareType gets the value of HardwareType for the instance +func (instance *Win32_PointingDevice) GetPropertyHardwareType() (value string, err error) { + retValue, err := instance.GetProperty("HardwareType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInfFileName sets the value of InfFileName for the instance +func (instance *Win32_PointingDevice) SetPropertyInfFileName(value string) (err error) { + return instance.SetProperty("InfFileName", (value)) +} + +// GetInfFileName gets the value of InfFileName for the instance +func (instance *Win32_PointingDevice) GetPropertyInfFileName() (value string, err error) { + retValue, err := instance.GetProperty("InfFileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInfSection sets the value of InfSection for the instance +func (instance *Win32_PointingDevice) SetPropertyInfSection(value string) (err error) { + return instance.SetProperty("InfSection", (value)) +} + +// GetInfSection gets the value of InfSection for the instance +func (instance *Win32_PointingDevice) GetPropertyInfSection() (value string, err error) { + retValue, err := instance.GetProperty("InfSection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_PointingDevice) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_PointingDevice) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuadSpeedThreshold sets the value of QuadSpeedThreshold for the instance +func (instance *Win32_PointingDevice) SetPropertyQuadSpeedThreshold(value uint32) (err error) { + return instance.SetProperty("QuadSpeedThreshold", (value)) +} + +// GetQuadSpeedThreshold gets the value of QuadSpeedThreshold for the instance +func (instance *Win32_PointingDevice) GetPropertyQuadSpeedThreshold() (value uint32, err error) { + retValue, err := instance.GetProperty("QuadSpeedThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSampleRate sets the value of SampleRate for the instance +func (instance *Win32_PointingDevice) SetPropertySampleRate(value uint32) (err error) { + return instance.SetProperty("SampleRate", (value)) +} + +// GetSampleRate gets the value of SampleRate for the instance +func (instance *Win32_PointingDevice) GetPropertySampleRate() (value uint32, err error) { + retValue, err := instance.GetProperty("SampleRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSynch sets the value of Synch for the instance +func (instance *Win32_PointingDevice) SetPropertySynch(value uint32) (err error) { + return instance.SetProperty("Synch", (value)) +} + +// GetSynch gets the value of Synch for the instance +func (instance *Win32_PointingDevice) GetPropertySynch() (value uint32, err error) { + retValue, err := instance.GetProperty("Synch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortConnector.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortConnector.go new file mode 100644 index 00000000..46c0a405 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortConnector.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PortConnector struct +type Win32_PortConnector struct { + *CIM_PhysicalConnector + + // + ExternalReferenceDesignator string + + // + InternalReferenceDesignator string + + // + PortType uint16 +} + +func NewWin32_PortConnectorEx1(instance *cim.WmiInstance) (newInstance *Win32_PortConnector, err error) { + tmp, err := NewCIM_PhysicalConnectorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PortConnector{ + CIM_PhysicalConnector: tmp, + } + return +} + +func NewWin32_PortConnectorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PortConnector, err error) { + tmp, err := NewCIM_PhysicalConnectorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PortConnector{ + CIM_PhysicalConnector: tmp, + } + return +} + +// SetExternalReferenceDesignator sets the value of ExternalReferenceDesignator for the instance +func (instance *Win32_PortConnector) SetPropertyExternalReferenceDesignator(value string) (err error) { + return instance.SetProperty("ExternalReferenceDesignator", (value)) +} + +// GetExternalReferenceDesignator gets the value of ExternalReferenceDesignator for the instance +func (instance *Win32_PortConnector) GetPropertyExternalReferenceDesignator() (value string, err error) { + retValue, err := instance.GetProperty("ExternalReferenceDesignator") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInternalReferenceDesignator sets the value of InternalReferenceDesignator for the instance +func (instance *Win32_PortConnector) SetPropertyInternalReferenceDesignator(value string) (err error) { + return instance.SetProperty("InternalReferenceDesignator", (value)) +} + +// GetInternalReferenceDesignator gets the value of InternalReferenceDesignator for the instance +func (instance *Win32_PortConnector) GetPropertyInternalReferenceDesignator() (value string, err error) { + retValue, err := instance.GetProperty("InternalReferenceDesignator") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortType sets the value of PortType for the instance +func (instance *Win32_PortConnector) SetPropertyPortType(value uint16) (err error) { + return instance.SetProperty("PortType", (value)) +} + +// GetPortType gets the value of PortType for the instance +func (instance *Win32_PortConnector) GetPropertyPortType() (value uint16, err error) { + retValue, err := instance.GetProperty("PortType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortResource.go new file mode 100644 index 00000000..8ebb801b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortResource.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PortResource struct +type Win32_PortResource struct { + *Win32_SystemMemoryResource + + // + Alias bool +} + +func NewWin32_PortResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_PortResource, err error) { + tmp, err := NewWin32_SystemMemoryResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PortResource{ + Win32_SystemMemoryResource: tmp, + } + return +} + +func NewWin32_PortResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PortResource, err error) { + tmp, err := NewWin32_SystemMemoryResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PortResource{ + Win32_SystemMemoryResource: tmp, + } + return +} + +// SetAlias sets the value of Alias for the instance +func (instance *Win32_PortResource) SetPropertyAlias(value bool) (err error) { + return instance.SetProperty("Alias", (value)) +} + +// GetAlias gets the value of Alias for the instance +func (instance *Win32_PortResource) GetPropertyAlias() (value bool, err error) { + retValue, err := instance.GetProperty("Alias") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortableBattery.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortableBattery.go new file mode 100644 index 00000000..acf3fd2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PortableBattery.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PortableBattery struct +type Win32_PortableBattery struct { + *CIM_Battery + + // + CapacityMultiplier uint16 + + // + Location string + + // + ManufactureDate string + + // + Manufacturer string + + // + MaxBatteryError uint16 +} + +func NewWin32_PortableBatteryEx1(instance *cim.WmiInstance) (newInstance *Win32_PortableBattery, err error) { + tmp, err := NewCIM_BatteryEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PortableBattery{ + CIM_Battery: tmp, + } + return +} + +func NewWin32_PortableBatteryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PortableBattery, err error) { + tmp, err := NewCIM_BatteryEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PortableBattery{ + CIM_Battery: tmp, + } + return +} + +// SetCapacityMultiplier sets the value of CapacityMultiplier for the instance +func (instance *Win32_PortableBattery) SetPropertyCapacityMultiplier(value uint16) (err error) { + return instance.SetProperty("CapacityMultiplier", (value)) +} + +// GetCapacityMultiplier gets the value of CapacityMultiplier for the instance +func (instance *Win32_PortableBattery) GetPropertyCapacityMultiplier() (value uint16, err error) { + retValue, err := instance.GetProperty("CapacityMultiplier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_PortableBattery) SetPropertyLocation(value string) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_PortableBattery) GetPropertyLocation() (value string, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufactureDate sets the value of ManufactureDate for the instance +func (instance *Win32_PortableBattery) SetPropertyManufactureDate(value string) (err error) { + return instance.SetProperty("ManufactureDate", (value)) +} + +// GetManufactureDate gets the value of ManufactureDate for the instance +func (instance *Win32_PortableBattery) GetPropertyManufactureDate() (value string, err error) { + retValue, err := instance.GetProperty("ManufactureDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_PortableBattery) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_PortableBattery) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaxBatteryError sets the value of MaxBatteryError for the instance +func (instance *Win32_PortableBattery) SetPropertyMaxBatteryError(value uint16) (err error) { + return instance.SetProperty("MaxBatteryError", (value)) +} + +// GetMaxBatteryError gets the value of MaxBatteryError for the instance +func (instance *Win32_PortableBattery) GetPropertyMaxBatteryError() (value uint16, err error) { + retValue, err := instance.GetProperty("MaxBatteryError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PowerManagementEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PowerManagementEvent.go new file mode 100644 index 00000000..dc23b658 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PowerManagementEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PowerManagementEvent struct +type Win32_PowerManagementEvent struct { + *__ExtrinsicEvent + + // + EventType uint16 + + // + OEMEventCode uint16 +} + +func NewWin32_PowerManagementEventEx1(instance *cim.WmiInstance) (newInstance *Win32_PowerManagementEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PowerManagementEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewWin32_PowerManagementEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PowerManagementEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PowerManagementEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +// SetEventType sets the value of EventType for the instance +func (instance *Win32_PowerManagementEvent) SetPropertyEventType(value uint16) (err error) { + return instance.SetProperty("EventType", (value)) +} + +// GetEventType gets the value of EventType for the instance +func (instance *Win32_PowerManagementEvent) GetPropertyEventType() (value uint16, err error) { + retValue, err := instance.GetProperty("EventType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOEMEventCode sets the value of OEMEventCode for the instance +func (instance *Win32_PowerManagementEvent) SetPropertyOEMEventCode(value uint16) (err error) { + return instance.SetProperty("OEMEventCode", (value)) +} + +// GetOEMEventCode gets the value of OEMEventCode for the instance +func (instance *Win32_PowerManagementEvent) GetPropertyOEMEventCode() (value uint16, err error) { + retValue, err := instance.GetProperty("OEMEventCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrintJob.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrintJob.go new file mode 100644 index 00000000..c066cf97 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrintJob.go @@ -0,0 +1,567 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PrintJob struct +type Win32_PrintJob struct { + *CIM_Job + + // The Color property indicates whether the document is to be printed in color or monochrome. Some color printers have the capability to print using true black instead of a combination of Yellow, Cyan, and Magenta. This usually creates darker and sharper text for documents. This option is only useful for color printers that support true black printing. + Color string + + // The DataType property indicates the format of the data for this print job. This instructs the printer driver to eithertranslate the data (generic text, PostScript, or PCL) before printing, or to print in a raw format (for graphics and pictures). + ///Example: TEXT + DataType string + + // The Document property specifies the name of the print job. The user sees this name when viewing documents waiting to be printed. + ///Example: Microsoft Word - Review.doc + Document string + + // The DriverName property indicates the name of the printer driver used for the print job. + DriverName string + + // The HostPrintQueue property contains the name of the computer on which the print job was created. + HostPrintQueue string + + // The JobId property indicates the identifier number of the job. It is used by other methods as a handle to a single job spooling to the printer. + JobId uint32 + + // The PagesPrinted property specifies the number of pages that have been printed. This value may be zero if the print job does not contain page delimiting information. + PagesPrinted uint32 + + // The PaperLength property indicates the length of the paper. + ///Example: 2794 + PaperLength uint32 + + // The PaperSize property indicates the size of the paper. + ///Example: A4 or Letter + PaperSize string + + // The PaperWidth property indicates the width of the paper. + ///Example: 2159 + PaperWidth uint32 + + // The Parameters property indicates optional parameters to send to the print processor. See the PrintProcessor member for more information. + Parameters string + + // The PrintProcessor property indicates the print processor service used to process the print job. A printer processor works in conjunction with the printer driver to provide additional translation of printer data for the printer, and can also be used to provide special options such as a title page for the job. + PrintProcessor string + + // The Size property indicates the size of the print job. + Size uint32 + + // The SizeHigh property indicates the size of the print job if the Size property exceeds 4,294,967,295 bytes. + SizeHigh uint32 + + // The StatusMask property specifies a bitmap of the possible statuses relating to this print job. + StatusMask uint32 + + // The TotalPages property specifies the number of pages required to complete the job. This value may be zero if the print job does not contain page-delimiting information. + TotalPages uint32 +} + +func NewWin32_PrintJobEx1(instance *cim.WmiInstance) (newInstance *Win32_PrintJob, err error) { + tmp, err := NewCIM_JobEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrintJob{ + CIM_Job: tmp, + } + return +} + +func NewWin32_PrintJobEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrintJob, err error) { + tmp, err := NewCIM_JobEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrintJob{ + CIM_Job: tmp, + } + return +} + +// SetColor sets the value of Color for the instance +func (instance *Win32_PrintJob) SetPropertyColor(value string) (err error) { + return instance.SetProperty("Color", (value)) +} + +// GetColor gets the value of Color for the instance +func (instance *Win32_PrintJob) GetPropertyColor() (value string, err error) { + retValue, err := instance.GetProperty("Color") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDataType sets the value of DataType for the instance +func (instance *Win32_PrintJob) SetPropertyDataType(value string) (err error) { + return instance.SetProperty("DataType", (value)) +} + +// GetDataType gets the value of DataType for the instance +func (instance *Win32_PrintJob) GetPropertyDataType() (value string, err error) { + retValue, err := instance.GetProperty("DataType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDocument sets the value of Document for the instance +func (instance *Win32_PrintJob) SetPropertyDocument(value string) (err error) { + return instance.SetProperty("Document", (value)) +} + +// GetDocument gets the value of Document for the instance +func (instance *Win32_PrintJob) GetPropertyDocument() (value string, err error) { + retValue, err := instance.GetProperty("Document") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverName sets the value of DriverName for the instance +func (instance *Win32_PrintJob) SetPropertyDriverName(value string) (err error) { + return instance.SetProperty("DriverName", (value)) +} + +// GetDriverName gets the value of DriverName for the instance +func (instance *Win32_PrintJob) GetPropertyDriverName() (value string, err error) { + retValue, err := instance.GetProperty("DriverName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHostPrintQueue sets the value of HostPrintQueue for the instance +func (instance *Win32_PrintJob) SetPropertyHostPrintQueue(value string) (err error) { + return instance.SetProperty("HostPrintQueue", (value)) +} + +// GetHostPrintQueue gets the value of HostPrintQueue for the instance +func (instance *Win32_PrintJob) GetPropertyHostPrintQueue() (value string, err error) { + retValue, err := instance.GetProperty("HostPrintQueue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetJobId sets the value of JobId for the instance +func (instance *Win32_PrintJob) SetPropertyJobId(value uint32) (err error) { + return instance.SetProperty("JobId", (value)) +} + +// GetJobId gets the value of JobId for the instance +func (instance *Win32_PrintJob) GetPropertyJobId() (value uint32, err error) { + retValue, err := instance.GetProperty("JobId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPagesPrinted sets the value of PagesPrinted for the instance +func (instance *Win32_PrintJob) SetPropertyPagesPrinted(value uint32) (err error) { + return instance.SetProperty("PagesPrinted", (value)) +} + +// GetPagesPrinted gets the value of PagesPrinted for the instance +func (instance *Win32_PrintJob) GetPropertyPagesPrinted() (value uint32, err error) { + retValue, err := instance.GetProperty("PagesPrinted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPaperLength sets the value of PaperLength for the instance +func (instance *Win32_PrintJob) SetPropertyPaperLength(value uint32) (err error) { + return instance.SetProperty("PaperLength", (value)) +} + +// GetPaperLength gets the value of PaperLength for the instance +func (instance *Win32_PrintJob) GetPropertyPaperLength() (value uint32, err error) { + retValue, err := instance.GetProperty("PaperLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPaperSize sets the value of PaperSize for the instance +func (instance *Win32_PrintJob) SetPropertyPaperSize(value string) (err error) { + return instance.SetProperty("PaperSize", (value)) +} + +// GetPaperSize gets the value of PaperSize for the instance +func (instance *Win32_PrintJob) GetPropertyPaperSize() (value string, err error) { + retValue, err := instance.GetProperty("PaperSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPaperWidth sets the value of PaperWidth for the instance +func (instance *Win32_PrintJob) SetPropertyPaperWidth(value uint32) (err error) { + return instance.SetProperty("PaperWidth", (value)) +} + +// GetPaperWidth gets the value of PaperWidth for the instance +func (instance *Win32_PrintJob) GetPropertyPaperWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("PaperWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetParameters sets the value of Parameters for the instance +func (instance *Win32_PrintJob) SetPropertyParameters(value string) (err error) { + return instance.SetProperty("Parameters", (value)) +} + +// GetParameters gets the value of Parameters for the instance +func (instance *Win32_PrintJob) GetPropertyParameters() (value string, err error) { + retValue, err := instance.GetProperty("Parameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrintProcessor sets the value of PrintProcessor for the instance +func (instance *Win32_PrintJob) SetPropertyPrintProcessor(value string) (err error) { + return instance.SetProperty("PrintProcessor", (value)) +} + +// GetPrintProcessor gets the value of PrintProcessor for the instance +func (instance *Win32_PrintJob) GetPropertyPrintProcessor() (value string, err error) { + retValue, err := instance.GetProperty("PrintProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *Win32_PrintJob) SetPropertySize(value uint32) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *Win32_PrintJob) GetPropertySize() (value uint32, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSizeHigh sets the value of SizeHigh for the instance +func (instance *Win32_PrintJob) SetPropertySizeHigh(value uint32) (err error) { + return instance.SetProperty("SizeHigh", (value)) +} + +// GetSizeHigh gets the value of SizeHigh for the instance +func (instance *Win32_PrintJob) GetPropertySizeHigh() (value uint32, err error) { + retValue, err := instance.GetProperty("SizeHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStatusMask sets the value of StatusMask for the instance +func (instance *Win32_PrintJob) SetPropertyStatusMask(value uint32) (err error) { + return instance.SetProperty("StatusMask", (value)) +} + +// GetStatusMask gets the value of StatusMask for the instance +func (instance *Win32_PrintJob) GetPropertyStatusMask() (value uint32, err error) { + retValue, err := instance.GetProperty("StatusMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalPages sets the value of TotalPages for the instance +func (instance *Win32_PrintJob) SetPropertyTotalPages(value uint32) (err error) { + return instance.SetProperty("TotalPages", (value)) +} + +// GetTotalPages gets the value of TotalPages for the instance +func (instance *Win32_PrintJob) GetPropertyTotalPages() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalPages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// The Pause method pauses a job in a print queue. If the job was currently printing, no other job will be printed. If the job wasn't printing yet, another unpaused print job may begin printing. The method can return the following values: +///0 - Success. +///5 - Access denied. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_PrintJob) Pause() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Pause") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The Resume method continues a paused print job. The method can return the following values: +///0 - Success. +///5 - Access denied. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_PrintJob) Resume() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Resume") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Printer.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Printer.go new file mode 100644 index 00000000..7dd04533 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Printer.go @@ -0,0 +1,1289 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Printer struct +type Win32_Printer struct { + *CIM_Printer + + // The Attributes property indicates the attributes of the Win32 printing device. These attributes are represented through a combination of flags. Attributes of the printer include: + ///Queued - Print jobs are buffered and queued. + /// Direct - Specifies that the document should be sent directly to the printer. This is used if print job are not being properly queued. + ///Default - The printer is the default printer on the computer. + ///Shared - Available as a shared network resource. + ///Network - Attached to the network. + ///Hidden - Hidden from some users on the network. + ///Local - Directly connected to this computer. + ///EnableDevQ - Enable the queue on the printer if available. + ///KeepPrintedJobs - Specifies that the spooler should not delete documents after they are printed. + ///DoCompleteFirst - Start jobs that are finished spooling first. + ///WorkOffline - Queue print jobs when printer is not available. + ///EnableBIDI - Enable bi-directional printing. + ///RawOnly - Allow only raw data type jobs to be spooled. + ///Published - Indicates whether the printer is published in the network directory service. + /// + Attributes uint32 + + // The AveragePagesPerMinute property specifies the rate (average number of pages per minute) that the printer is capable of sustaining. + AveragePagesPerMinute uint32 + + // The Comment property specifies the comment of a print queue. + ///Example: Color printer + Comment string + + // The Default property indicates whether the printer is the default printer on the computer. + Default bool + + // The DefaultPriority property specifies the default priority value assigned to each print job. + DefaultPriority uint32 + + // The Direct property indicates whether the print jobs should be sent directly to the printer. This means that no spool files are created for the print jobs. + /// + Direct bool + + // The DoCompleteFirst property indicates whether the printer should start jobs that have finished spooling as opposed to the order of the job received. + DoCompleteFirst bool + + // The DriverName property specifies the name of the Win32 printer driver. + ///Example: Windows NT Fax Driver + DriverName string + + // The EnableBIDI property indicates whether the printer can print bidirectionally. + EnableBIDI bool + + // The EnableDevQueryPrint property indicates whether to hold documents in the queue, if document and printer setups do not match + EnableDevQueryPrint bool + + // The ExtendedDetectedErrorState property reports standard error information. Any additional information should be recorded in the DetecteErrorState property. + ExtendedDetectedErrorState Printer_ExtendedDetectedErrorState + + // Status information for a Printer, beyond that specified in the LogicalDevice Availability property. Values include "Idle" (3) and an indication that the Device is currently printing (4). + ExtendedPrinterStatus Printer_ExtendedPrinterStatus + + // The Hidden property indicates whether the printer is hidden from network users. + Hidden bool + + // The KeepPrintedJobs property indicates whether the print spooler should not delete the jobs after they are completed. + KeepPrintedJobs bool + + // The Local property indicates whether the printer is attached to the network. A masquerading printer is printer that is implemented as local printers but has a port that refers to a remote machine. From the application perspective these hybrid printers should be viewed as printer connections since that is their intended behavior. + Local bool + + // The Location property specifies the physical location of the printer. + ///Example: Bldg. 38, Room 1164 + Location string + + // The Network property indicates whether the printer is a network printer. + Network bool + + // The Parameters property specifies optional parameters for the print processor. + ///Example: Copies=2 + Parameters string + + // The PortName property identifies the ports that can be used to transmit data to the printer. If a printer is connected to more than one port, the names of each port are separated by commas. Under Windows 95, only one port can be specified. + ///Example: LPT1:, LPT2:, LPT3: + PortName string + + // The PrinterPaperNames property indicates the list of paper sizes supported by the printer. The printer-specified names are used to represent supported paper sizes. + ///Example: B5 (JIS). + PrinterPaperNames []string + + // This property has been deprecated in favor of PrinterStatus, DetectedErrorState and ErrorInformation CIM properties that more clearly indicate the state and error status of the printer. The PrinterState property specifies a values indicating one of the possible states relating to this printer. + PrinterState Printer_PrinterState + + // The PrintJobDataType property indicates the default data type that will be used for a print job. + PrintJobDataType string + + // The PrintProcessor property specifies the name of the print spooler that handles print jobs. + ///Example: SPOOLSS.DLL. + PrintProcessor string + + // The Priority property specifies the priority of the printer. The jobs on a higher priority printer are scheduled first. + Priority uint32 + + // The Published property indicates whether the printer is published in the network directory service. + Published bool + + // The Queued property indicates whether the printer buffers and queues print jobs. + Queued bool + + // The RawOnly property indicates whether the printer accepts only raw data to be spooled. + RawOnly bool + + // The SeparatorFile property specifies the name of the file used to create a separator page. This page is used to separate print jobs sent to the printer. + SeparatorFile string + + // The ServerName property identifies the server that controls the printer. If this string is NULL, the printer is controlled locally. + ServerName string + + // The Shared property indicates whether the printer is available as a shared network resource. + Shared bool + + // The ShareName property indicates the share name of the Win32 printing device. + ///Example: \\PRINTSERVER1\PRINTER2 + ShareName string + + // The SpoolEnabled property shows whether spooling is enabled for this printer. + ///Values:TRUE or FALSE. + ///The SpoolEnabled property has been deprecated. There is no replacementvalue and this property is now considered obsolete. + SpoolEnabled bool + + // The StartTime property specifies the earliest time the printer can print a job (if the printer has been limited to print only at certain times). This value is expressed as time elapsed since 12:00 AM GMT (Greenwich mean time). + StartTime string + + // The UntilTime property specifies the latest time the printer can print a job (if the printer has been limited to print only at certain times). This value is expressed as time elapsed since 12:00 AM GMT (Greenwich mean time). + UntilTime string + + // The WorkOffline property indicates whether to queue print jobs on the computer if the printer is offline. + WorkOffline bool +} + +func NewWin32_PrinterEx1(instance *cim.WmiInstance) (newInstance *Win32_Printer, err error) { + tmp, err := NewCIM_PrinterEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Printer{ + CIM_Printer: tmp, + } + return +} + +func NewWin32_PrinterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Printer, err error) { + tmp, err := NewCIM_PrinterEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Printer{ + CIM_Printer: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_Printer) SetPropertyAttributes(value uint32) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_Printer) GetPropertyAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAveragePagesPerMinute sets the value of AveragePagesPerMinute for the instance +func (instance *Win32_Printer) SetPropertyAveragePagesPerMinute(value uint32) (err error) { + return instance.SetProperty("AveragePagesPerMinute", (value)) +} + +// GetAveragePagesPerMinute gets the value of AveragePagesPerMinute for the instance +func (instance *Win32_Printer) GetPropertyAveragePagesPerMinute() (value uint32, err error) { + retValue, err := instance.GetProperty("AveragePagesPerMinute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetComment sets the value of Comment for the instance +func (instance *Win32_Printer) SetPropertyComment(value string) (err error) { + return instance.SetProperty("Comment", (value)) +} + +// GetComment gets the value of Comment for the instance +func (instance *Win32_Printer) GetPropertyComment() (value string, err error) { + retValue, err := instance.GetProperty("Comment") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDefault sets the value of Default for the instance +func (instance *Win32_Printer) SetPropertyDefault(value bool) (err error) { + return instance.SetProperty("Default", (value)) +} + +// GetDefault gets the value of Default for the instance +func (instance *Win32_Printer) GetPropertyDefault() (value bool, err error) { + retValue, err := instance.GetProperty("Default") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDefaultPriority sets the value of DefaultPriority for the instance +func (instance *Win32_Printer) SetPropertyDefaultPriority(value uint32) (err error) { + return instance.SetProperty("DefaultPriority", (value)) +} + +// GetDefaultPriority gets the value of DefaultPriority for the instance +func (instance *Win32_Printer) GetPropertyDefaultPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("DefaultPriority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDirect sets the value of Direct for the instance +func (instance *Win32_Printer) SetPropertyDirect(value bool) (err error) { + return instance.SetProperty("Direct", (value)) +} + +// GetDirect gets the value of Direct for the instance +func (instance *Win32_Printer) GetPropertyDirect() (value bool, err error) { + retValue, err := instance.GetProperty("Direct") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDoCompleteFirst sets the value of DoCompleteFirst for the instance +func (instance *Win32_Printer) SetPropertyDoCompleteFirst(value bool) (err error) { + return instance.SetProperty("DoCompleteFirst", (value)) +} + +// GetDoCompleteFirst gets the value of DoCompleteFirst for the instance +func (instance *Win32_Printer) GetPropertyDoCompleteFirst() (value bool, err error) { + retValue, err := instance.GetProperty("DoCompleteFirst") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDriverName sets the value of DriverName for the instance +func (instance *Win32_Printer) SetPropertyDriverName(value string) (err error) { + return instance.SetProperty("DriverName", (value)) +} + +// GetDriverName gets the value of DriverName for the instance +func (instance *Win32_Printer) GetPropertyDriverName() (value string, err error) { + retValue, err := instance.GetProperty("DriverName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEnableBIDI sets the value of EnableBIDI for the instance +func (instance *Win32_Printer) SetPropertyEnableBIDI(value bool) (err error) { + return instance.SetProperty("EnableBIDI", (value)) +} + +// GetEnableBIDI gets the value of EnableBIDI for the instance +func (instance *Win32_Printer) GetPropertyEnableBIDI() (value bool, err error) { + retValue, err := instance.GetProperty("EnableBIDI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnableDevQueryPrint sets the value of EnableDevQueryPrint for the instance +func (instance *Win32_Printer) SetPropertyEnableDevQueryPrint(value bool) (err error) { + return instance.SetProperty("EnableDevQueryPrint", (value)) +} + +// GetEnableDevQueryPrint gets the value of EnableDevQueryPrint for the instance +func (instance *Win32_Printer) GetPropertyEnableDevQueryPrint() (value bool, err error) { + retValue, err := instance.GetProperty("EnableDevQueryPrint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExtendedDetectedErrorState sets the value of ExtendedDetectedErrorState for the instance +func (instance *Win32_Printer) SetPropertyExtendedDetectedErrorState(value Printer_ExtendedDetectedErrorState) (err error) { + return instance.SetProperty("ExtendedDetectedErrorState", (value)) +} + +// GetExtendedDetectedErrorState gets the value of ExtendedDetectedErrorState for the instance +func (instance *Win32_Printer) GetPropertyExtendedDetectedErrorState() (value Printer_ExtendedDetectedErrorState, err error) { + retValue, err := instance.GetProperty("ExtendedDetectedErrorState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Printer_ExtendedDetectedErrorState(valuetmp) + + return +} + +// SetExtendedPrinterStatus sets the value of ExtendedPrinterStatus for the instance +func (instance *Win32_Printer) SetPropertyExtendedPrinterStatus(value Printer_ExtendedPrinterStatus) (err error) { + return instance.SetProperty("ExtendedPrinterStatus", (value)) +} + +// GetExtendedPrinterStatus gets the value of ExtendedPrinterStatus for the instance +func (instance *Win32_Printer) GetPropertyExtendedPrinterStatus() (value Printer_ExtendedPrinterStatus, err error) { + retValue, err := instance.GetProperty("ExtendedPrinterStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Printer_ExtendedPrinterStatus(valuetmp) + + return +} + +// SetHidden sets the value of Hidden for the instance +func (instance *Win32_Printer) SetPropertyHidden(value bool) (err error) { + return instance.SetProperty("Hidden", (value)) +} + +// GetHidden gets the value of Hidden for the instance +func (instance *Win32_Printer) GetPropertyHidden() (value bool, err error) { + retValue, err := instance.GetProperty("Hidden") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetKeepPrintedJobs sets the value of KeepPrintedJobs for the instance +func (instance *Win32_Printer) SetPropertyKeepPrintedJobs(value bool) (err error) { + return instance.SetProperty("KeepPrintedJobs", (value)) +} + +// GetKeepPrintedJobs gets the value of KeepPrintedJobs for the instance +func (instance *Win32_Printer) GetPropertyKeepPrintedJobs() (value bool, err error) { + retValue, err := instance.GetProperty("KeepPrintedJobs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocal sets the value of Local for the instance +func (instance *Win32_Printer) SetPropertyLocal(value bool) (err error) { + return instance.SetProperty("Local", (value)) +} + +// GetLocal gets the value of Local for the instance +func (instance *Win32_Printer) GetPropertyLocal() (value bool, err error) { + retValue, err := instance.GetProperty("Local") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_Printer) SetPropertyLocation(value string) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_Printer) GetPropertyLocation() (value string, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNetwork sets the value of Network for the instance +func (instance *Win32_Printer) SetPropertyNetwork(value bool) (err error) { + return instance.SetProperty("Network", (value)) +} + +// GetNetwork gets the value of Network for the instance +func (instance *Win32_Printer) GetPropertyNetwork() (value bool, err error) { + retValue, err := instance.GetProperty("Network") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetParameters sets the value of Parameters for the instance +func (instance *Win32_Printer) SetPropertyParameters(value string) (err error) { + return instance.SetProperty("Parameters", (value)) +} + +// GetParameters gets the value of Parameters for the instance +func (instance *Win32_Printer) GetPropertyParameters() (value string, err error) { + retValue, err := instance.GetProperty("Parameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortName sets the value of PortName for the instance +func (instance *Win32_Printer) SetPropertyPortName(value string) (err error) { + return instance.SetProperty("PortName", (value)) +} + +// GetPortName gets the value of PortName for the instance +func (instance *Win32_Printer) GetPropertyPortName() (value string, err error) { + retValue, err := instance.GetProperty("PortName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrinterPaperNames sets the value of PrinterPaperNames for the instance +func (instance *Win32_Printer) SetPropertyPrinterPaperNames(value []string) (err error) { + return instance.SetProperty("PrinterPaperNames", (value)) +} + +// GetPrinterPaperNames gets the value of PrinterPaperNames for the instance +func (instance *Win32_Printer) GetPropertyPrinterPaperNames() (value []string, err error) { + retValue, err := instance.GetProperty("PrinterPaperNames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPrinterState sets the value of PrinterState for the instance +func (instance *Win32_Printer) SetPropertyPrinterState(value Printer_PrinterState) (err error) { + return instance.SetProperty("PrinterState", (value)) +} + +// GetPrinterState gets the value of PrinterState for the instance +func (instance *Win32_Printer) GetPropertyPrinterState() (value Printer_PrinterState, err error) { + retValue, err := instance.GetProperty("PrinterState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Printer_PrinterState(valuetmp) + + return +} + +// SetPrintJobDataType sets the value of PrintJobDataType for the instance +func (instance *Win32_Printer) SetPropertyPrintJobDataType(value string) (err error) { + return instance.SetProperty("PrintJobDataType", (value)) +} + +// GetPrintJobDataType gets the value of PrintJobDataType for the instance +func (instance *Win32_Printer) GetPropertyPrintJobDataType() (value string, err error) { + retValue, err := instance.GetProperty("PrintJobDataType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPrintProcessor sets the value of PrintProcessor for the instance +func (instance *Win32_Printer) SetPropertyPrintProcessor(value string) (err error) { + return instance.SetProperty("PrintProcessor", (value)) +} + +// GetPrintProcessor gets the value of PrintProcessor for the instance +func (instance *Win32_Printer) GetPropertyPrintProcessor() (value string, err error) { + retValue, err := instance.GetProperty("PrintProcessor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPriority sets the value of Priority for the instance +func (instance *Win32_Printer) SetPropertyPriority(value uint32) (err error) { + return instance.SetProperty("Priority", (value)) +} + +// GetPriority gets the value of Priority for the instance +func (instance *Win32_Printer) GetPropertyPriority() (value uint32, err error) { + retValue, err := instance.GetProperty("Priority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPublished sets the value of Published for the instance +func (instance *Win32_Printer) SetPropertyPublished(value bool) (err error) { + return instance.SetProperty("Published", (value)) +} + +// GetPublished gets the value of Published for the instance +func (instance *Win32_Printer) GetPropertyPublished() (value bool, err error) { + retValue, err := instance.GetProperty("Published") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQueued sets the value of Queued for the instance +func (instance *Win32_Printer) SetPropertyQueued(value bool) (err error) { + return instance.SetProperty("Queued", (value)) +} + +// GetQueued gets the value of Queued for the instance +func (instance *Win32_Printer) GetPropertyQueued() (value bool, err error) { + retValue, err := instance.GetProperty("Queued") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRawOnly sets the value of RawOnly for the instance +func (instance *Win32_Printer) SetPropertyRawOnly(value bool) (err error) { + return instance.SetProperty("RawOnly", (value)) +} + +// GetRawOnly gets the value of RawOnly for the instance +func (instance *Win32_Printer) GetPropertyRawOnly() (value bool, err error) { + retValue, err := instance.GetProperty("RawOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSeparatorFile sets the value of SeparatorFile for the instance +func (instance *Win32_Printer) SetPropertySeparatorFile(value string) (err error) { + return instance.SetProperty("SeparatorFile", (value)) +} + +// GetSeparatorFile gets the value of SeparatorFile for the instance +func (instance *Win32_Printer) GetPropertySeparatorFile() (value string, err error) { + retValue, err := instance.GetProperty("SeparatorFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServerName sets the value of ServerName for the instance +func (instance *Win32_Printer) SetPropertyServerName(value string) (err error) { + return instance.SetProperty("ServerName", (value)) +} + +// GetServerName gets the value of ServerName for the instance +func (instance *Win32_Printer) GetPropertyServerName() (value string, err error) { + retValue, err := instance.GetProperty("ServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShared sets the value of Shared for the instance +func (instance *Win32_Printer) SetPropertyShared(value bool) (err error) { + return instance.SetProperty("Shared", (value)) +} + +// GetShared gets the value of Shared for the instance +func (instance *Win32_Printer) GetPropertyShared() (value bool, err error) { + retValue, err := instance.GetProperty("Shared") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetShareName sets the value of ShareName for the instance +func (instance *Win32_Printer) SetPropertyShareName(value string) (err error) { + return instance.SetProperty("ShareName", (value)) +} + +// GetShareName gets the value of ShareName for the instance +func (instance *Win32_Printer) GetPropertyShareName() (value string, err error) { + retValue, err := instance.GetProperty("ShareName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpoolEnabled sets the value of SpoolEnabled for the instance +func (instance *Win32_Printer) SetPropertySpoolEnabled(value bool) (err error) { + return instance.SetProperty("SpoolEnabled", (value)) +} + +// GetSpoolEnabled gets the value of SpoolEnabled for the instance +func (instance *Win32_Printer) GetPropertySpoolEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("SpoolEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetStartTime sets the value of StartTime for the instance +func (instance *Win32_Printer) SetPropertyStartTime(value string) (err error) { + return instance.SetProperty("StartTime", (value)) +} + +// GetStartTime gets the value of StartTime for the instance +func (instance *Win32_Printer) GetPropertyStartTime() (value string, err error) { + retValue, err := instance.GetProperty("StartTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUntilTime sets the value of UntilTime for the instance +func (instance *Win32_Printer) SetPropertyUntilTime(value string) (err error) { + return instance.SetProperty("UntilTime", (value)) +} + +// GetUntilTime gets the value of UntilTime for the instance +func (instance *Win32_Printer) GetPropertyUntilTime() (value string, err error) { + retValue, err := instance.GetProperty("UntilTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWorkOffline sets the value of WorkOffline for the instance +func (instance *Win32_Printer) SetPropertyWorkOffline(value bool) (err error) { + return instance.SetProperty("WorkOffline", (value)) +} + +// GetWorkOffline gets the value of WorkOffline for the instance +func (instance *Win32_Printer) GetPropertyWorkOffline() (value bool, err error) { + retValue, err := instance.GetProperty("WorkOffline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// The Pause method pauses the print queue. No jobs can print anymore until the print queue is resumed. The method can return the following values: +///0 - Success. +///5 - Access denied. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_Printer) Pause() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Pause") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The Resume method resumes a paused print queue. The method can return the following values: +///0 - Success. +///5 - Access denied. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_Printer) Resume() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Resume") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The CancelAllJobs method cancels and removes all print jobs from the printer queue including the job currently printing. The method can return the following values: +///0 - Success. +///5 - Access denied. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_Printer) CancelAllJobs() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("CancelAllJobs") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The AddPrinterConnection method provides a connection to an existing printer on the network and adds it to the list of available printers on the computer system. If successful, applications will be able to use this printer for print jobs. If unsuccessful the printer is not installed. The method can return the following values: +///0 - Success. +///5 - Access denied. +///1801 - Invalid printer name. +///1930 - Incompatible printer driver. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// The Name parameter specifies a friendly name for the printer. This may be overridden if the name has alreadybeen set by the printer. + +// +func (instance *Win32_Printer) AddPrinterConnection( /* IN */ Name string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AddPrinterConnection", Name) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The RenamePrinter method renames a printer. The method can return the following values: +///0 - Success. +///5 - Access denied. +///1801 - Invalid printer name. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// The NewPrinterName parameter specifies the new printer name. + +// +func (instance *Win32_Printer) RenamePrinter( /* IN */ NewPrinterName string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RenamePrinter", NewPrinterName) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The PrintTestPage method prints a test page. The method can return the following values: +///0 - Success. +///5 - Access denied. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_Printer) PrintTestPage() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("PrintTestPage") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// The SetDefaultPrinter method sets the printer to be the default printer for the user who executes the method. The method can return the following values: +///0 - Success. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// +func (instance *Win32_Printer) SetDefaultPrinter() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDefaultPrinter") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// Retrieves a structural representation of the printer's security descriptor. +///The method returns an integer value that can be interpreted as follows: +///0 - Successful completion. +///2 - The user does not have access to the requested information. +///8 - Unknown failure. +///9 - The user does not have adequate privileges. +///21 - The specified parameter is invalid. +///Other - For integer values other than those listed above, refer to Win32 error code documentation. + +// +// +func (instance *Win32_Printer) GetSecurityDescriptor( /* OUT */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// Sets security descriptor on the printer to the specified structure. +///The method returns an integer value that can be interpreted as follows: +///0 - Successful completion. +///2 - The user does not have access to the requested information. +///8 - Unknown failure. +///9 - The user does not have adequate privileges. +///21 - The specified parameter is invalid. +///Other - For integer values other than those listed above, refer to Win32 error code documentation. + +// + +// +func (instance *Win32_Printer) SetSecurityDescriptor( /* IN */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterConfiguration.go new file mode 100644 index 00000000..3922e532 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterConfiguration.go @@ -0,0 +1,969 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PrinterConfiguration struct +type Win32_PrinterConfiguration struct { + *CIM_Setting + + // The BitsPerPel property contains the number of bits per pixel for the output device Win32 printer. This member is used by display drivers and not by printer drivers. + ///Example: 8. + /// This property has been deprecated because it is not applicable to printers. There is no replacement value. + BitsPerPel uint32 + + // The Collate property specifies whether to collate the pages that are printed. To collate is to print out the entire document before printing the next copy, as opposed to printing out each page of the document the required number times. This property is ignored unless the printer driver indicates support for collation. + ///Values: TRUE or FALSE. If TRUE, the printer collates all documents. + Collate bool + + // The Color property indicates whether the document is to be printed in color or monochrome. Some color printers have the capability to print using true black instead of a combination of Yellow, Cyan, and Magenta. This usually creates darker and sharper text for documents. This option is only useful for color printers that support true black printing. + Color PrinterConfiguration_Color + + // The Copies property indicates the number of copies to be printed. The printer driver must support printing multi-page copies. + ///Example: 2 + Copies uint32 + + // The DeviceName property specifies the friendly name of the printer. This name is unique to the type of printer and may be truncated because of the limitations of the string from which it is derived. + ///Example PCL/HP LaserJet + DeviceName string + + // The DisplayFlags property contains two bits of information about the display. This member communicates whether the display device is monochrome or colored, and interlaced or non-interlaced, by masking its value with the DM_GRAYSCALE and DM_INTERLACED masks respectively. + ///This property has been deprecated because it is not applicable to printers. There is no replacement value. + DisplayFlags uint32 + + // The DisplayFrequency property indicates the refresh frequency of the display The refresh frequency for a monitor is the number of times the screen is redrawn per second. + ///This property has been deprecated because it is not applicable to printers. There is no replacement value. + DisplayFrequency uint32 + + // The DitherType property indicates the dither type of the printer. This member can assume predefined values of 1 to 5, or driver-defined values from 6 to 256. Line art dithering is a special dithering method that produces well defined borders between black, white, and gray scalings. It is not suitable for images that include continuous graduations in intensity and hue such as scanned photographs. + DitherType PrinterConfiguration_DitherType + + // The DriverVersion property indicates the version number of the Win32 printer driver. The version numbers are created and maintained by the driver manufacturer. + DriverVersion uint32 + + // The Duplex property indicates whether printing is done on one or both sides. + ///Values: TRUE or FALSE. If TRUE, printing is done on both sides. + Duplex bool + + // The FormName property indicates the name of the form used for the print job. This property is used only on Windows NT/Windows 2000 systems. + ///Example: Legal + FormName string + + // The HorizontalResolution property indicates the print resolution along the X axis (width) of the print job. This value is only set when the PrintQuality property of this class is positive and is similar to the XResolution property. + HorizontalResolution uint32 + + // The ICMIntent (Image Color Matching Intent) property indicates the specific value of one of the three possible color matching methods (called intents) that should be used by default. ICM applications establish intents by using the ICM functions. This property can assume predefined values of 1 to 3, or driver-defined values from 4 to 256. Non-ICM applications can use this value to determine how the printer handles color printing jobs. + ICMIntent PrinterConfiguration_ICMIntent + + // The ICMMethod (Image Color Matching Method) property specifies how ICM is handled. For a non-ICM application, this property determines if ICM is enabled or disabled. For ICM applications, the system examines this property to determine which part of the computer system handles ICM support. + ICMMethod PrinterConfiguration_ICMMethod + + // The LogPixels property contains the number of pixels per logical inch. This member is valid only with devices that work with pixels (this excludes devices such as printers). + ///This property has been deprecated because it is not applicable to printers. There is no replacement value. + LogPixels uint32 + + // The MediaType property specifies the type of media being printed on. The property can be set to a predefined value or a driver-defined value greater than or equal to 256. For Windows 95 and later; Windows 2000. + MediaType PrinterConfiguration_MediaType + + // The Name property indicates the name of the printer with which this configuration is associated. + Name string + + // The Orientation property indicates the printing orientation of the paper. + Orientation PrinterConfiguration_Orientation + + // The PaperLength property indicates the length of the paper. + ///Example: 2794 + PaperLength uint32 + + // The PaperSize property indicates the size of the paper. + ///Example: A4 or Letter + PaperSize string + + // The PaperWidth property indicates the width of the paper. + ///Example: 2159 + PaperWidth uint32 + + // The PelsHeight property indicates the height of the displayable surface. + ///This property has been deprecated because it is not applicable to printers. There is no replacement value. + PelsHeight uint32 + + // The PelsWidth property indicates the width of the displayable surface. + ///This property has been deprecated because it is not applicable to printers. There is no replacement value. + PelsWidth uint32 + + // The PrintQuality property indicates one of four quality levels of the print job. If a positive value is specified, the quality is measured in dots per inch. + ///Example: Draft + PrintQuality PrinterConfiguration_PrintQuality + + // The Scale property specifies the factor by which the printed output is to be scaled. For example a scale of 75 reduces the print output to 3/4 its original height and width. + Scale uint32 + + // The SpecificationVersion property indicates the version number of the initialization data for the device associated with the Win32 printer. + SpecificationVersion uint32 + + // The TTOption property specifies how TrueType(r) fonts should be printed. There are 3 possible values: + ///Bitmap - Prints TrueType fonts as graphics. This is the default action for dot-matrix printers. + ///Download - Downloads TrueType fonts as soft fonts. This is the default action for printers that use the Printer Control Language (PCL). + ///Substitute - Substitutes device fonts for TrueType fonts. This is the default action for PostScript(r) printers. + TTOption PrinterConfiguration_TTOption + + // The VerticalResolution property indicates the print resolution along the Y axis (height) of the print job. This value is only set when the PrintQuality property of this class is positive, and is similar to the YResolution property. + VerticalResolution uint32 + + // The XResolution property has been deprecated to theHorizontalResolution property. Please refer to the description of that property. + XResolution uint32 + + // The YResolution property has been deprecated to theVerticalResolution property. Please refer to the description of that property. + YResolution uint32 +} + +func NewWin32_PrinterConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_PrinterConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrinterConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_PrinterConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrinterConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrinterConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetBitsPerPel sets the value of BitsPerPel for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyBitsPerPel(value uint32) (err error) { + return instance.SetProperty("BitsPerPel", (value)) +} + +// GetBitsPerPel gets the value of BitsPerPel for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyBitsPerPel() (value uint32, err error) { + retValue, err := instance.GetProperty("BitsPerPel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCollate sets the value of Collate for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyCollate(value bool) (err error) { + return instance.SetProperty("Collate", (value)) +} + +// GetCollate gets the value of Collate for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyCollate() (value bool, err error) { + retValue, err := instance.GetProperty("Collate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetColor sets the value of Color for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyColor(value PrinterConfiguration_Color) (err error) { + return instance.SetProperty("Color", (value)) +} + +// GetColor gets the value of Color for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyColor() (value PrinterConfiguration_Color, err error) { + retValue, err := instance.GetProperty("Color") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_Color(valuetmp) + + return +} + +// SetCopies sets the value of Copies for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyCopies(value uint32) (err error) { + return instance.SetProperty("Copies", (value)) +} + +// GetCopies gets the value of Copies for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyCopies() (value uint32, err error) { + retValue, err := instance.GetProperty("Copies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceName sets the value of DeviceName for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyDeviceName(value string) (err error) { + return instance.SetProperty("DeviceName", (value)) +} + +// GetDeviceName gets the value of DeviceName for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyDeviceName() (value string, err error) { + retValue, err := instance.GetProperty("DeviceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDisplayFlags sets the value of DisplayFlags for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyDisplayFlags(value uint32) (err error) { + return instance.SetProperty("DisplayFlags", (value)) +} + +// GetDisplayFlags gets the value of DisplayFlags for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyDisplayFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("DisplayFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDisplayFrequency sets the value of DisplayFrequency for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyDisplayFrequency(value uint32) (err error) { + return instance.SetProperty("DisplayFrequency", (value)) +} + +// GetDisplayFrequency gets the value of DisplayFrequency for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyDisplayFrequency() (value uint32, err error) { + retValue, err := instance.GetProperty("DisplayFrequency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDitherType sets the value of DitherType for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyDitherType(value PrinterConfiguration_DitherType) (err error) { + return instance.SetProperty("DitherType", (value)) +} + +// GetDitherType gets the value of DitherType for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyDitherType() (value PrinterConfiguration_DitherType, err error) { + retValue, err := instance.GetProperty("DitherType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_DitherType(valuetmp) + + return +} + +// SetDriverVersion sets the value of DriverVersion for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyDriverVersion(value uint32) (err error) { + return instance.SetProperty("DriverVersion", (value)) +} + +// GetDriverVersion gets the value of DriverVersion for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyDriverVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("DriverVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDuplex sets the value of Duplex for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyDuplex(value bool) (err error) { + return instance.SetProperty("Duplex", (value)) +} + +// GetDuplex gets the value of Duplex for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyDuplex() (value bool, err error) { + retValue, err := instance.GetProperty("Duplex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFormName sets the value of FormName for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyFormName(value string) (err error) { + return instance.SetProperty("FormName", (value)) +} + +// GetFormName gets the value of FormName for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyFormName() (value string, err error) { + retValue, err := instance.GetProperty("FormName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetICMIntent sets the value of ICMIntent for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyICMIntent(value PrinterConfiguration_ICMIntent) (err error) { + return instance.SetProperty("ICMIntent", (value)) +} + +// GetICMIntent gets the value of ICMIntent for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyICMIntent() (value PrinterConfiguration_ICMIntent, err error) { + retValue, err := instance.GetProperty("ICMIntent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_ICMIntent(valuetmp) + + return +} + +// SetICMMethod sets the value of ICMMethod for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyICMMethod(value PrinterConfiguration_ICMMethod) (err error) { + return instance.SetProperty("ICMMethod", (value)) +} + +// GetICMMethod gets the value of ICMMethod for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyICMMethod() (value PrinterConfiguration_ICMMethod, err error) { + retValue, err := instance.GetProperty("ICMMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_ICMMethod(valuetmp) + + return +} + +// SetLogPixels sets the value of LogPixels for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyLogPixels(value uint32) (err error) { + return instance.SetProperty("LogPixels", (value)) +} + +// GetLogPixels gets the value of LogPixels for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyLogPixels() (value uint32, err error) { + retValue, err := instance.GetProperty("LogPixels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyMediaType(value PrinterConfiguration_MediaType) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyMediaType() (value PrinterConfiguration_MediaType, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_MediaType(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOrientation sets the value of Orientation for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyOrientation(value PrinterConfiguration_Orientation) (err error) { + return instance.SetProperty("Orientation", (value)) +} + +// GetOrientation gets the value of Orientation for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyOrientation() (value PrinterConfiguration_Orientation, err error) { + retValue, err := instance.GetProperty("Orientation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_Orientation(valuetmp) + + return +} + +// SetPaperLength sets the value of PaperLength for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyPaperLength(value uint32) (err error) { + return instance.SetProperty("PaperLength", (value)) +} + +// GetPaperLength gets the value of PaperLength for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyPaperLength() (value uint32, err error) { + retValue, err := instance.GetProperty("PaperLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPaperSize sets the value of PaperSize for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyPaperSize(value string) (err error) { + return instance.SetProperty("PaperSize", (value)) +} + +// GetPaperSize gets the value of PaperSize for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyPaperSize() (value string, err error) { + retValue, err := instance.GetProperty("PaperSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPaperWidth sets the value of PaperWidth for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyPaperWidth(value uint32) (err error) { + return instance.SetProperty("PaperWidth", (value)) +} + +// GetPaperWidth gets the value of PaperWidth for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyPaperWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("PaperWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPelsHeight sets the value of PelsHeight for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyPelsHeight(value uint32) (err error) { + return instance.SetProperty("PelsHeight", (value)) +} + +// GetPelsHeight gets the value of PelsHeight for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyPelsHeight() (value uint32, err error) { + retValue, err := instance.GetProperty("PelsHeight") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPelsWidth sets the value of PelsWidth for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyPelsWidth(value uint32) (err error) { + return instance.SetProperty("PelsWidth", (value)) +} + +// GetPelsWidth gets the value of PelsWidth for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyPelsWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("PelsWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrintQuality sets the value of PrintQuality for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyPrintQuality(value PrinterConfiguration_PrintQuality) (err error) { + return instance.SetProperty("PrintQuality", (value)) +} + +// GetPrintQuality gets the value of PrintQuality for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyPrintQuality() (value PrinterConfiguration_PrintQuality, err error) { + retValue, err := instance.GetProperty("PrintQuality") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_PrintQuality(valuetmp) + + return +} + +// SetScale sets the value of Scale for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyScale(value uint32) (err error) { + return instance.SetProperty("Scale", (value)) +} + +// GetScale gets the value of Scale for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyScale() (value uint32, err error) { + retValue, err := instance.GetProperty("Scale") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpecificationVersion sets the value of SpecificationVersion for the instance +func (instance *Win32_PrinterConfiguration) SetPropertySpecificationVersion(value uint32) (err error) { + return instance.SetProperty("SpecificationVersion", (value)) +} + +// GetSpecificationVersion gets the value of SpecificationVersion for the instance +func (instance *Win32_PrinterConfiguration) GetPropertySpecificationVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("SpecificationVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTTOption sets the value of TTOption for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyTTOption(value PrinterConfiguration_TTOption) (err error) { + return instance.SetProperty("TTOption", (value)) +} + +// GetTTOption gets the value of TTOption for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyTTOption() (value PrinterConfiguration_TTOption, err error) { + retValue, err := instance.GetProperty("TTOption") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterConfiguration_TTOption(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXResolution sets the value of XResolution for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyXResolution(value uint32) (err error) { + return instance.SetProperty("XResolution", (value)) +} + +// GetXResolution gets the value of XResolution for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyXResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("XResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetYResolution sets the value of YResolution for the instance +func (instance *Win32_PrinterConfiguration) SetPropertyYResolution(value uint32) (err error) { + return instance.SetProperty("YResolution", (value)) +} + +// GetYResolution gets the value of YResolution for the instance +func (instance *Win32_PrinterConfiguration) GetPropertyYResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("YResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterController.go new file mode 100644 index 00000000..9d507f44 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterController.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PrinterController struct +type Win32_PrinterController struct { + *CIM_ControlledBy +} + +func NewWin32_PrinterControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_PrinterController, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrinterController{ + CIM_ControlledBy: tmp, + } + return +} + +func NewWin32_PrinterControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrinterController, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrinterController{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriver.go new file mode 100644 index 00000000..01186c7e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriver.go @@ -0,0 +1,430 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PrinterDriver struct +type Win32_PrinterDriver struct { + *CIM_Service + + // The ConfigFile property contains the configuration file for this printer driver, (example: pscrptui.dll). + ConfigFile string + + // The DataFile property contains the data file for this printer driver, (example: qms810.ppd). + DataFile string + + // The DefaultDataType property indicates the default data type for this printer driver, (example: EMF). + DefaultDataType string + + // The DependentFiles property contains a list of dependent files for this printer driver. + DependentFiles []string + + // The DriverPath property contains the path for this printer driver, (example: C:\drivers\pscript.dll). + DriverPath string + + // The FilePath property contains the path to the INF file being used, (Example: c:\temp\driver). + FilePath string + + // The HelpFile property contains the help file for this printer driver, (example: pscrptui.hlp). + HelpFile string + + // The InfName property contains the name of the INF file being used. The default is 'ntprint.INF'. This will only be different if the drivers are provided directly by the manufacturer of the printer and not the operating system. + InfName string + + // The MonitorName property contains the name of the of the monitor for this printer driver, (example: PJL monitor). + MonitorName string + + // The OEMUrl property provides a world wide web link to the printer manufacturer's web site. Note that this property is not populated when the Win32.INF file is used and is only applicable for drivers provided directly from the manufacturer. + OEMUrl string + + // The SupportedPlatform property indicates the operating environments that the driver is intended for. Examples are 'Windows NT x86' or 'Windows IA64'. + SupportedPlatform string + + // The Version property indicates the operating system version that the driver is intended for. + Version PrinterDriver_Version +} + +func NewWin32_PrinterDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_PrinterDriver, err error) { + tmp, err := NewCIM_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrinterDriver{ + CIM_Service: tmp, + } + return +} + +func NewWin32_PrinterDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrinterDriver, err error) { + tmp, err := NewCIM_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrinterDriver{ + CIM_Service: tmp, + } + return +} + +// SetConfigFile sets the value of ConfigFile for the instance +func (instance *Win32_PrinterDriver) SetPropertyConfigFile(value string) (err error) { + return instance.SetProperty("ConfigFile", (value)) +} + +// GetConfigFile gets the value of ConfigFile for the instance +func (instance *Win32_PrinterDriver) GetPropertyConfigFile() (value string, err error) { + retValue, err := instance.GetProperty("ConfigFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDataFile sets the value of DataFile for the instance +func (instance *Win32_PrinterDriver) SetPropertyDataFile(value string) (err error) { + return instance.SetProperty("DataFile", (value)) +} + +// GetDataFile gets the value of DataFile for the instance +func (instance *Win32_PrinterDriver) GetPropertyDataFile() (value string, err error) { + retValue, err := instance.GetProperty("DataFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDefaultDataType sets the value of DefaultDataType for the instance +func (instance *Win32_PrinterDriver) SetPropertyDefaultDataType(value string) (err error) { + return instance.SetProperty("DefaultDataType", (value)) +} + +// GetDefaultDataType gets the value of DefaultDataType for the instance +func (instance *Win32_PrinterDriver) GetPropertyDefaultDataType() (value string, err error) { + retValue, err := instance.GetProperty("DefaultDataType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDependentFiles sets the value of DependentFiles for the instance +func (instance *Win32_PrinterDriver) SetPropertyDependentFiles(value []string) (err error) { + return instance.SetProperty("DependentFiles", (value)) +} + +// GetDependentFiles gets the value of DependentFiles for the instance +func (instance *Win32_PrinterDriver) GetPropertyDependentFiles() (value []string, err error) { + retValue, err := instance.GetProperty("DependentFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDriverPath sets the value of DriverPath for the instance +func (instance *Win32_PrinterDriver) SetPropertyDriverPath(value string) (err error) { + return instance.SetProperty("DriverPath", (value)) +} + +// GetDriverPath gets the value of DriverPath for the instance +func (instance *Win32_PrinterDriver) GetPropertyDriverPath() (value string, err error) { + retValue, err := instance.GetProperty("DriverPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFilePath sets the value of FilePath for the instance +func (instance *Win32_PrinterDriver) SetPropertyFilePath(value string) (err error) { + return instance.SetProperty("FilePath", (value)) +} + +// GetFilePath gets the value of FilePath for the instance +func (instance *Win32_PrinterDriver) GetPropertyFilePath() (value string, err error) { + retValue, err := instance.GetProperty("FilePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHelpFile sets the value of HelpFile for the instance +func (instance *Win32_PrinterDriver) SetPropertyHelpFile(value string) (err error) { + return instance.SetProperty("HelpFile", (value)) +} + +// GetHelpFile gets the value of HelpFile for the instance +func (instance *Win32_PrinterDriver) GetPropertyHelpFile() (value string, err error) { + retValue, err := instance.GetProperty("HelpFile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInfName sets the value of InfName for the instance +func (instance *Win32_PrinterDriver) SetPropertyInfName(value string) (err error) { + return instance.SetProperty("InfName", (value)) +} + +// GetInfName gets the value of InfName for the instance +func (instance *Win32_PrinterDriver) GetPropertyInfName() (value string, err error) { + retValue, err := instance.GetProperty("InfName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMonitorName sets the value of MonitorName for the instance +func (instance *Win32_PrinterDriver) SetPropertyMonitorName(value string) (err error) { + return instance.SetProperty("MonitorName", (value)) +} + +// GetMonitorName gets the value of MonitorName for the instance +func (instance *Win32_PrinterDriver) GetPropertyMonitorName() (value string, err error) { + retValue, err := instance.GetProperty("MonitorName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOEMUrl sets the value of OEMUrl for the instance +func (instance *Win32_PrinterDriver) SetPropertyOEMUrl(value string) (err error) { + return instance.SetProperty("OEMUrl", (value)) +} + +// GetOEMUrl gets the value of OEMUrl for the instance +func (instance *Win32_PrinterDriver) GetPropertyOEMUrl() (value string, err error) { + retValue, err := instance.GetProperty("OEMUrl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportedPlatform sets the value of SupportedPlatform for the instance +func (instance *Win32_PrinterDriver) SetPropertySupportedPlatform(value string) (err error) { + return instance.SetProperty("SupportedPlatform", (value)) +} + +// GetSupportedPlatform gets the value of SupportedPlatform for the instance +func (instance *Win32_PrinterDriver) GetPropertySupportedPlatform() (value string, err error) { + retValue, err := instance.GetProperty("SupportedPlatform") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *Win32_PrinterDriver) SetPropertyVersion(value PrinterDriver_Version) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *Win32_PrinterDriver) GetPropertyVersion() (value PrinterDriver_Version, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = PrinterDriver_Version(valuetmp) + + return +} + +// The AddPrinterDriver method installs a printer driver. The method can return the following values: +///0 - Success. +///5 - Access denied. +///1797 - The printer driver is unknown. +///Other - For integer values other than those listed above, refer to the documentation on the Win32 error codes. + +// The DriverInfo parameter specifies the neccessary inforation needed in order to create the printer driver. + +// +func (instance *Win32_PrinterDriver) AddPrinterDriver( /* IN */ DriverInfo Win32_PrinterDriver) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AddPrinterDriver", DriverInfo) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriverDll.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriverDll.go new file mode 100644 index 00000000..284c0a9c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterDriverDll.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PrinterDriverDll struct +type Win32_PrinterDriverDll struct { + *CIM_Dependency +} + +func NewWin32_PrinterDriverDllEx1(instance *cim.WmiInstance) (newInstance *Win32_PrinterDriverDll, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrinterDriverDll{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_PrinterDriverDllEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrinterDriverDll, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrinterDriverDll{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterSetting.go new file mode 100644 index 00000000..6d84aa93 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PrinterSetting struct +type Win32_PrinterSetting struct { + *Win32_DeviceSettings +} + +func NewWin32_PrinterSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_PrinterSetting, err error) { + tmp, err := NewWin32_DeviceSettingsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrinterSetting{ + Win32_DeviceSettings: tmp, + } + return +} + +func NewWin32_PrinterSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrinterSetting, err error) { + tmp, err := NewWin32_DeviceSettingsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrinterSetting{ + Win32_DeviceSettings: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterShare.go new file mode 100644 index 00000000..377b9349 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrinterShare.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_PrinterShare struct +type Win32_PrinterShare struct { + *CIM_Dependency +} + +func NewWin32_PrinterShareEx1(instance *cim.WmiInstance) (newInstance *Win32_PrinterShare, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrinterShare{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_PrinterShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrinterShare, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrinterShare{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrivilegesStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrivilegesStatus.go new file mode 100644 index 00000000..e01a5f35 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PrivilegesStatus.go @@ -0,0 +1,112 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PrivilegesStatus struct +type Win32_PrivilegesStatus struct { + *__ExtendedStatus + + // + PrivilegesNotHeld []string + + // + PrivilegesRequired []string +} + +func NewWin32_PrivilegesStatusEx1(instance *cim.WmiInstance) (newInstance *Win32_PrivilegesStatus, err error) { + tmp, err := New__ExtendedStatusEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PrivilegesStatus{ + __ExtendedStatus: tmp, + } + return +} + +func NewWin32_PrivilegesStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PrivilegesStatus, err error) { + tmp, err := New__ExtendedStatusEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PrivilegesStatus{ + __ExtendedStatus: tmp, + } + return +} + +// SetPrivilegesNotHeld sets the value of PrivilegesNotHeld for the instance +func (instance *Win32_PrivilegesStatus) SetPropertyPrivilegesNotHeld(value []string) (err error) { + return instance.SetProperty("PrivilegesNotHeld", (value)) +} + +// GetPrivilegesNotHeld gets the value of PrivilegesNotHeld for the instance +func (instance *Win32_PrivilegesStatus) GetPropertyPrivilegesNotHeld() (value []string, err error) { + retValue, err := instance.GetProperty("PrivilegesNotHeld") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPrivilegesRequired sets the value of PrivilegesRequired for the instance +func (instance *Win32_PrivilegesStatus) SetPropertyPrivilegesRequired(value []string) (err error) { + return instance.SetProperty("PrivilegesRequired", (value)) +} + +// GetPrivilegesRequired gets the value of PrivilegesRequired for the instance +func (instance *Win32_PrivilegesStatus) GetPropertyPrivilegesRequired() (value []string, err error) { + retValue, err := instance.GetProperty("PrivilegesRequired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Process.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Process.go new file mode 100644 index 00000000..0390249b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Process.go @@ -0,0 +1,972 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Process struct +type Win32_Process struct { + *CIM_Process + + // + CommandLine string + + // + ExecutablePath string + + // + HandleCount uint32 + + // + MaximumWorkingSetSize uint32 + + // + MinimumWorkingSetSize uint32 + + // + OtherOperationCount uint64 + + // + OtherTransferCount uint64 + + // + PageFaults uint32 + + // + PageFileUsage uint32 + + // + ParentProcessId uint32 + + // + PeakPageFileUsage uint32 + + // + PeakVirtualSize uint64 + + // + PeakWorkingSetSize uint32 + + // + PrivatePageCount uint64 + + // + ProcessId uint32 + + // + QuotaNonPagedPoolUsage uint32 + + // + QuotaPagedPoolUsage uint32 + + // + QuotaPeakNonPagedPoolUsage uint32 + + // + QuotaPeakPagedPoolUsage uint32 + + // + ReadOperationCount uint64 + + // + ReadTransferCount uint64 + + // + SessionId uint32 + + // + ThreadCount uint32 + + // + VirtualSize uint64 + + // + WindowsVersion string + + // + WriteOperationCount uint64 + + // + WriteTransferCount uint64 +} + +func NewWin32_ProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_Process, err error) { + tmp, err := NewCIM_ProcessEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Process{ + CIM_Process: tmp, + } + return +} + +func NewWin32_ProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Process, err error) { + tmp, err := NewCIM_ProcessEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Process{ + CIM_Process: tmp, + } + return +} + +// SetCommandLine sets the value of CommandLine for the instance +func (instance *Win32_Process) SetPropertyCommandLine(value string) (err error) { + return instance.SetProperty("CommandLine", (value)) +} + +// GetCommandLine gets the value of CommandLine for the instance +func (instance *Win32_Process) GetPropertyCommandLine() (value string, err error) { + retValue, err := instance.GetProperty("CommandLine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExecutablePath sets the value of ExecutablePath for the instance +func (instance *Win32_Process) SetPropertyExecutablePath(value string) (err error) { + return instance.SetProperty("ExecutablePath", (value)) +} + +// GetExecutablePath gets the value of ExecutablePath for the instance +func (instance *Win32_Process) GetPropertyExecutablePath() (value string, err error) { + retValue, err := instance.GetProperty("ExecutablePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHandleCount sets the value of HandleCount for the instance +func (instance *Win32_Process) SetPropertyHandleCount(value uint32) (err error) { + return instance.SetProperty("HandleCount", (value)) +} + +// GetHandleCount gets the value of HandleCount for the instance +func (instance *Win32_Process) GetPropertyHandleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("HandleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumWorkingSetSize sets the value of MaximumWorkingSetSize for the instance +func (instance *Win32_Process) SetPropertyMaximumWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("MaximumWorkingSetSize", (value)) +} + +// GetMaximumWorkingSetSize gets the value of MaximumWorkingSetSize for the instance +func (instance *Win32_Process) GetPropertyMaximumWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMinimumWorkingSetSize sets the value of MinimumWorkingSetSize for the instance +func (instance *Win32_Process) SetPropertyMinimumWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("MinimumWorkingSetSize", (value)) +} + +// GetMinimumWorkingSetSize gets the value of MinimumWorkingSetSize for the instance +func (instance *Win32_Process) GetPropertyMinimumWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MinimumWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOtherOperationCount sets the value of OtherOperationCount for the instance +func (instance *Win32_Process) SetPropertyOtherOperationCount(value uint64) (err error) { + return instance.SetProperty("OtherOperationCount", (value)) +} + +// GetOtherOperationCount gets the value of OtherOperationCount for the instance +func (instance *Win32_Process) GetPropertyOtherOperationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherOperationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOtherTransferCount sets the value of OtherTransferCount for the instance +func (instance *Win32_Process) SetPropertyOtherTransferCount(value uint64) (err error) { + return instance.SetProperty("OtherTransferCount", (value)) +} + +// GetOtherTransferCount gets the value of OtherTransferCount for the instance +func (instance *Win32_Process) GetPropertyOtherTransferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("OtherTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPageFaults sets the value of PageFaults for the instance +func (instance *Win32_Process) SetPropertyPageFaults(value uint32) (err error) { + return instance.SetProperty("PageFaults", (value)) +} + +// GetPageFaults gets the value of PageFaults for the instance +func (instance *Win32_Process) GetPropertyPageFaults() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFaults") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFileUsage sets the value of PageFileUsage for the instance +func (instance *Win32_Process) SetPropertyPageFileUsage(value uint32) (err error) { + return instance.SetProperty("PageFileUsage", (value)) +} + +// GetPageFileUsage gets the value of PageFileUsage for the instance +func (instance *Win32_Process) GetPropertyPageFileUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("PageFileUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetParentProcessId sets the value of ParentProcessId for the instance +func (instance *Win32_Process) SetPropertyParentProcessId(value uint32) (err error) { + return instance.SetProperty("ParentProcessId", (value)) +} + +// GetParentProcessId gets the value of ParentProcessId for the instance +func (instance *Win32_Process) GetPropertyParentProcessId() (value uint32, err error) { + retValue, err := instance.GetProperty("ParentProcessId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPeakPageFileUsage sets the value of PeakPageFileUsage for the instance +func (instance *Win32_Process) SetPropertyPeakPageFileUsage(value uint32) (err error) { + return instance.SetProperty("PeakPageFileUsage", (value)) +} + +// GetPeakPageFileUsage gets the value of PeakPageFileUsage for the instance +func (instance *Win32_Process) GetPropertyPeakPageFileUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("PeakPageFileUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPeakVirtualSize sets the value of PeakVirtualSize for the instance +func (instance *Win32_Process) SetPropertyPeakVirtualSize(value uint64) (err error) { + return instance.SetProperty("PeakVirtualSize", (value)) +} + +// GetPeakVirtualSize gets the value of PeakVirtualSize for the instance +func (instance *Win32_Process) GetPropertyPeakVirtualSize() (value uint64, err error) { + retValue, err := instance.GetProperty("PeakVirtualSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPeakWorkingSetSize sets the value of PeakWorkingSetSize for the instance +func (instance *Win32_Process) SetPropertyPeakWorkingSetSize(value uint32) (err error) { + return instance.SetProperty("PeakWorkingSetSize", (value)) +} + +// GetPeakWorkingSetSize gets the value of PeakWorkingSetSize for the instance +func (instance *Win32_Process) GetPropertyPeakWorkingSetSize() (value uint32, err error) { + retValue, err := instance.GetProperty("PeakWorkingSetSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivatePageCount sets the value of PrivatePageCount for the instance +func (instance *Win32_Process) SetPropertyPrivatePageCount(value uint64) (err error) { + return instance.SetProperty("PrivatePageCount", (value)) +} + +// GetPrivatePageCount gets the value of PrivatePageCount for the instance +func (instance *Win32_Process) GetPropertyPrivatePageCount() (value uint64, err error) { + retValue, err := instance.GetProperty("PrivatePageCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProcessId sets the value of ProcessId for the instance +func (instance *Win32_Process) SetPropertyProcessId(value uint32) (err error) { + return instance.SetProperty("ProcessId", (value)) +} + +// GetProcessId gets the value of ProcessId for the instance +func (instance *Win32_Process) GetPropertyProcessId() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuotaNonPagedPoolUsage sets the value of QuotaNonPagedPoolUsage for the instance +func (instance *Win32_Process) SetPropertyQuotaNonPagedPoolUsage(value uint32) (err error) { + return instance.SetProperty("QuotaNonPagedPoolUsage", (value)) +} + +// GetQuotaNonPagedPoolUsage gets the value of QuotaNonPagedPoolUsage for the instance +func (instance *Win32_Process) GetPropertyQuotaNonPagedPoolUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("QuotaNonPagedPoolUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuotaPagedPoolUsage sets the value of QuotaPagedPoolUsage for the instance +func (instance *Win32_Process) SetPropertyQuotaPagedPoolUsage(value uint32) (err error) { + return instance.SetProperty("QuotaPagedPoolUsage", (value)) +} + +// GetQuotaPagedPoolUsage gets the value of QuotaPagedPoolUsage for the instance +func (instance *Win32_Process) GetPropertyQuotaPagedPoolUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("QuotaPagedPoolUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuotaPeakNonPagedPoolUsage sets the value of QuotaPeakNonPagedPoolUsage for the instance +func (instance *Win32_Process) SetPropertyQuotaPeakNonPagedPoolUsage(value uint32) (err error) { + return instance.SetProperty("QuotaPeakNonPagedPoolUsage", (value)) +} + +// GetQuotaPeakNonPagedPoolUsage gets the value of QuotaPeakNonPagedPoolUsage for the instance +func (instance *Win32_Process) GetPropertyQuotaPeakNonPagedPoolUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("QuotaPeakNonPagedPoolUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetQuotaPeakPagedPoolUsage sets the value of QuotaPeakPagedPoolUsage for the instance +func (instance *Win32_Process) SetPropertyQuotaPeakPagedPoolUsage(value uint32) (err error) { + return instance.SetProperty("QuotaPeakPagedPoolUsage", (value)) +} + +// GetQuotaPeakPagedPoolUsage gets the value of QuotaPeakPagedPoolUsage for the instance +func (instance *Win32_Process) GetPropertyQuotaPeakPagedPoolUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("QuotaPeakPagedPoolUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadOperationCount sets the value of ReadOperationCount for the instance +func (instance *Win32_Process) SetPropertyReadOperationCount(value uint64) (err error) { + return instance.SetProperty("ReadOperationCount", (value)) +} + +// GetReadOperationCount gets the value of ReadOperationCount for the instance +func (instance *Win32_Process) GetPropertyReadOperationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadOperationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadTransferCount sets the value of ReadTransferCount for the instance +func (instance *Win32_Process) SetPropertyReadTransferCount(value uint64) (err error) { + return instance.SetProperty("ReadTransferCount", (value)) +} + +// GetReadTransferCount gets the value of ReadTransferCount for the instance +func (instance *Win32_Process) GetPropertyReadTransferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSessionId sets the value of SessionId for the instance +func (instance *Win32_Process) SetPropertySessionId(value uint32) (err error) { + return instance.SetProperty("SessionId", (value)) +} + +// GetSessionId gets the value of SessionId for the instance +func (instance *Win32_Process) GetPropertySessionId() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_Process) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_Process) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVirtualSize sets the value of VirtualSize for the instance +func (instance *Win32_Process) SetPropertyVirtualSize(value uint64) (err error) { + return instance.SetProperty("VirtualSize", (value)) +} + +// GetVirtualSize gets the value of VirtualSize for the instance +func (instance *Win32_Process) GetPropertyVirtualSize() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWindowsVersion sets the value of WindowsVersion for the instance +func (instance *Win32_Process) SetPropertyWindowsVersion(value string) (err error) { + return instance.SetProperty("WindowsVersion", (value)) +} + +// GetWindowsVersion gets the value of WindowsVersion for the instance +func (instance *Win32_Process) GetPropertyWindowsVersion() (value string, err error) { + retValue, err := instance.GetProperty("WindowsVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWriteOperationCount sets the value of WriteOperationCount for the instance +func (instance *Win32_Process) SetPropertyWriteOperationCount(value uint64) (err error) { + return instance.SetProperty("WriteOperationCount", (value)) +} + +// GetWriteOperationCount gets the value of WriteOperationCount for the instance +func (instance *Win32_Process) GetPropertyWriteOperationCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteOperationCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteTransferCount sets the value of WriteTransferCount for the instance +func (instance *Win32_Process) SetPropertyWriteTransferCount(value uint64) (err error) { + return instance.SetProperty("WriteTransferCount", (value)) +} + +// GetWriteTransferCount gets the value of WriteTransferCount for the instance +func (instance *Win32_Process) GetPropertyWriteTransferCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteTransferCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// +// +// + +// +// +func (instance *Win32_Process) Create( /* IN */ CommandLine string, + /* IN */ CurrentDirectory string, + /* IN */ ProcessStartupInformation Win32_ProcessStartup, + /* OUT */ ProcessId uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Create", CommandLine, CurrentDirectory, ProcessStartupInformation) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_Process) Terminate( /* IN */ Reason uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Terminate", Reason) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +func (instance *Win32_Process) GetOwner( /* OUT */ User string, + /* OUT */ Domain string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetOwner") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *Win32_Process) GetOwnerSid( /* OUT */ Sid string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetOwnerSid") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_Process) SetPriority( /* IN */ Priority int32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPriority", Priority) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_Process) AttachDebugger() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AttachDebugger") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *Win32_Process) GetAvailableVirtualSize( /* OUT */ AvailableVirtualSize uint64) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetAvailableVirtualSize") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartTrace.go new file mode 100644 index 00000000..8cd6688e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartTrace.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ProcessStartTrace struct +type Win32_ProcessStartTrace struct { + *Win32_ProcessTrace +} + +func NewWin32_ProcessStartTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ProcessStartTrace, err error) { + tmp, err := NewWin32_ProcessTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProcessStartTrace{ + Win32_ProcessTrace: tmp, + } + return +} + +func NewWin32_ProcessStartTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProcessStartTrace, err error) { + tmp, err := NewWin32_ProcessTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProcessStartTrace{ + Win32_ProcessTrace: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartup.go new file mode 100644 index 00000000..247c2a8d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStartup.go @@ -0,0 +1,471 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProcessStartup struct +type Win32_ProcessStartup struct { + *Win32_MethodParameterClass + + // + CreateFlags uint32 + + // + EnvironmentVariables []string + + // + ErrorMode uint16 + + // + FillAttribute uint32 + + // + PriorityClass uint32 + + // + ShowWindow uint16 + + // + Title string + + // + WinstationDesktop string + + // + X uint32 + + // + XCountChars uint32 + + // + XSize uint32 + + // + Y uint32 + + // + YCountChars uint32 + + // + YSize uint32 +} + +func NewWin32_ProcessStartupEx1(instance *cim.WmiInstance) (newInstance *Win32_ProcessStartup, err error) { + tmp, err := NewWin32_MethodParameterClassEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProcessStartup{ + Win32_MethodParameterClass: tmp, + } + return +} + +func NewWin32_ProcessStartupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProcessStartup, err error) { + tmp, err := NewWin32_MethodParameterClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProcessStartup{ + Win32_MethodParameterClass: tmp, + } + return +} + +// SetCreateFlags sets the value of CreateFlags for the instance +func (instance *Win32_ProcessStartup) SetPropertyCreateFlags(value uint32) (err error) { + return instance.SetProperty("CreateFlags", (value)) +} + +// GetCreateFlags gets the value of CreateFlags for the instance +func (instance *Win32_ProcessStartup) GetPropertyCreateFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("CreateFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnvironmentVariables sets the value of EnvironmentVariables for the instance +func (instance *Win32_ProcessStartup) SetPropertyEnvironmentVariables(value []string) (err error) { + return instance.SetProperty("EnvironmentVariables", (value)) +} + +// GetEnvironmentVariables gets the value of EnvironmentVariables for the instance +func (instance *Win32_ProcessStartup) GetPropertyEnvironmentVariables() (value []string, err error) { + retValue, err := instance.GetProperty("EnvironmentVariables") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetErrorMode sets the value of ErrorMode for the instance +func (instance *Win32_ProcessStartup) SetPropertyErrorMode(value uint16) (err error) { + return instance.SetProperty("ErrorMode", (value)) +} + +// GetErrorMode gets the value of ErrorMode for the instance +func (instance *Win32_ProcessStartup) GetPropertyErrorMode() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFillAttribute sets the value of FillAttribute for the instance +func (instance *Win32_ProcessStartup) SetPropertyFillAttribute(value uint32) (err error) { + return instance.SetProperty("FillAttribute", (value)) +} + +// GetFillAttribute gets the value of FillAttribute for the instance +func (instance *Win32_ProcessStartup) GetPropertyFillAttribute() (value uint32, err error) { + retValue, err := instance.GetProperty("FillAttribute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPriorityClass sets the value of PriorityClass for the instance +func (instance *Win32_ProcessStartup) SetPropertyPriorityClass(value uint32) (err error) { + return instance.SetProperty("PriorityClass", (value)) +} + +// GetPriorityClass gets the value of PriorityClass for the instance +func (instance *Win32_ProcessStartup) GetPropertyPriorityClass() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetShowWindow sets the value of ShowWindow for the instance +func (instance *Win32_ProcessStartup) SetPropertyShowWindow(value uint16) (err error) { + return instance.SetProperty("ShowWindow", (value)) +} + +// GetShowWindow gets the value of ShowWindow for the instance +func (instance *Win32_ProcessStartup) GetPropertyShowWindow() (value uint16, err error) { + retValue, err := instance.GetProperty("ShowWindow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTitle sets the value of Title for the instance +func (instance *Win32_ProcessStartup) SetPropertyTitle(value string) (err error) { + return instance.SetProperty("Title", (value)) +} + +// GetTitle gets the value of Title for the instance +func (instance *Win32_ProcessStartup) GetPropertyTitle() (value string, err error) { + retValue, err := instance.GetProperty("Title") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWinstationDesktop sets the value of WinstationDesktop for the instance +func (instance *Win32_ProcessStartup) SetPropertyWinstationDesktop(value string) (err error) { + return instance.SetProperty("WinstationDesktop", (value)) +} + +// GetWinstationDesktop gets the value of WinstationDesktop for the instance +func (instance *Win32_ProcessStartup) GetPropertyWinstationDesktop() (value string, err error) { + retValue, err := instance.GetProperty("WinstationDesktop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetX sets the value of X for the instance +func (instance *Win32_ProcessStartup) SetPropertyX(value uint32) (err error) { + return instance.SetProperty("X", (value)) +} + +// GetX gets the value of X for the instance +func (instance *Win32_ProcessStartup) GetPropertyX() (value uint32, err error) { + retValue, err := instance.GetProperty("X") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXCountChars sets the value of XCountChars for the instance +func (instance *Win32_ProcessStartup) SetPropertyXCountChars(value uint32) (err error) { + return instance.SetProperty("XCountChars", (value)) +} + +// GetXCountChars gets the value of XCountChars for the instance +func (instance *Win32_ProcessStartup) GetPropertyXCountChars() (value uint32, err error) { + retValue, err := instance.GetProperty("XCountChars") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXSize sets the value of XSize for the instance +func (instance *Win32_ProcessStartup) SetPropertyXSize(value uint32) (err error) { + return instance.SetProperty("XSize", (value)) +} + +// GetXSize gets the value of XSize for the instance +func (instance *Win32_ProcessStartup) GetPropertyXSize() (value uint32, err error) { + retValue, err := instance.GetProperty("XSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetY sets the value of Y for the instance +func (instance *Win32_ProcessStartup) SetPropertyY(value uint32) (err error) { + return instance.SetProperty("Y", (value)) +} + +// GetY gets the value of Y for the instance +func (instance *Win32_ProcessStartup) GetPropertyY() (value uint32, err error) { + retValue, err := instance.GetProperty("Y") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetYCountChars sets the value of YCountChars for the instance +func (instance *Win32_ProcessStartup) SetPropertyYCountChars(value uint32) (err error) { + return instance.SetProperty("YCountChars", (value)) +} + +// GetYCountChars gets the value of YCountChars for the instance +func (instance *Win32_ProcessStartup) GetPropertyYCountChars() (value uint32, err error) { + retValue, err := instance.GetProperty("YCountChars") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetYSize sets the value of YSize for the instance +func (instance *Win32_ProcessStartup) SetPropertyYSize(value uint32) (err error) { + return instance.SetProperty("YSize", (value)) +} + +// GetYSize gets the value of YSize for the instance +func (instance *Win32_ProcessStartup) GetPropertyYSize() (value uint32, err error) { + retValue, err := instance.GetProperty("YSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStopTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStopTrace.go new file mode 100644 index 00000000..f217bb60 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessStopTrace.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProcessStopTrace struct +type Win32_ProcessStopTrace struct { + *Win32_ProcessTrace + + // + ExitStatus uint32 +} + +func NewWin32_ProcessStopTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ProcessStopTrace, err error) { + tmp, err := NewWin32_ProcessTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProcessStopTrace{ + Win32_ProcessTrace: tmp, + } + return +} + +func NewWin32_ProcessStopTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProcessStopTrace, err error) { + tmp, err := NewWin32_ProcessTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProcessStopTrace{ + Win32_ProcessTrace: tmp, + } + return +} + +// SetExitStatus sets the value of ExitStatus for the instance +func (instance *Win32_ProcessStopTrace) SetPropertyExitStatus(value uint32) (err error) { + return instance.SetProperty("ExitStatus", (value)) +} + +// GetExitStatus gets the value of ExitStatus for the instance +func (instance *Win32_ProcessStopTrace) GetPropertyExitStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("ExitStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessTrace.go new file mode 100644 index 00000000..d0d770a1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProcessTrace.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProcessTrace struct +type Win32_ProcessTrace struct { + *Win32_SystemTrace + + // + ParentProcessID uint32 + + // + ProcessID uint32 + + // + ProcessName string + + // + SessionID uint32 + + // + Sid []uint8 +} + +func NewWin32_ProcessTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ProcessTrace, err error) { + tmp, err := NewWin32_SystemTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProcessTrace{ + Win32_SystemTrace: tmp, + } + return +} + +func NewWin32_ProcessTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProcessTrace, err error) { + tmp, err := NewWin32_SystemTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProcessTrace{ + Win32_SystemTrace: tmp, + } + return +} + +// SetParentProcessID sets the value of ParentProcessID for the instance +func (instance *Win32_ProcessTrace) SetPropertyParentProcessID(value uint32) (err error) { + return instance.SetProperty("ParentProcessID", (value)) +} + +// GetParentProcessID gets the value of ParentProcessID for the instance +func (instance *Win32_ProcessTrace) GetPropertyParentProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ParentProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_ProcessTrace) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_ProcessTrace) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProcessName sets the value of ProcessName for the instance +func (instance *Win32_ProcessTrace) SetPropertyProcessName(value string) (err error) { + return instance.SetProperty("ProcessName", (value)) +} + +// GetProcessName gets the value of ProcessName for the instance +func (instance *Win32_ProcessTrace) GetPropertyProcessName() (value string, err error) { + retValue, err := instance.GetProperty("ProcessName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSessionID sets the value of SessionID for the instance +func (instance *Win32_ProcessTrace) SetPropertySessionID(value uint32) (err error) { + return instance.SetProperty("SessionID", (value)) +} + +// GetSessionID gets the value of SessionID for the instance +func (instance *Win32_ProcessTrace) GetPropertySessionID() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSid sets the value of Sid for the instance +func (instance *Win32_ProcessTrace) SetPropertySid(value []uint8) (err error) { + return instance.SetProperty("Sid", (value)) +} + +// GetSid gets the value of Sid for the instance +func (instance *Win32_ProcessTrace) GetPropertySid() (value []uint8, err error) { + retValue, err := instance.GetProperty("Sid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Processor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Processor.go new file mode 100644 index 00000000..af858634 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Processor.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Processor struct +type Win32_Processor struct { + *CIM_Processor + + // + Architecture uint16 + + // + AssetTag string + + // + Characteristics uint32 + + // + CpuStatus uint16 + + // + CurrentVoltage uint16 + + // + ExtClock uint32 + + // + L2CacheSize uint32 + + // + L2CacheSpeed uint32 + + // + L3CacheSize uint32 + + // + L3CacheSpeed uint32 + + // + Level uint16 + + // + Manufacturer string + + // + NumberOfCores uint32 + + // + NumberOfEnabledCore uint32 + + // + NumberOfLogicalProcessors uint32 + + // + PartNumber string + + // + ProcessorId string + + // + ProcessorType uint16 + + // + Revision uint16 + + // + SecondLevelAddressTranslationExtensions bool + + // + SerialNumber string + + // + SocketDesignation string + + // + ThreadCount uint32 + + // + Version string + + // + VirtualizationFirmwareEnabled bool + + // + VMMonitorModeExtensions bool + + // + VoltageCaps uint32 +} + +func NewWin32_ProcessorEx1(instance *cim.WmiInstance) (newInstance *Win32_Processor, err error) { + tmp, err := NewCIM_ProcessorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Processor{ + CIM_Processor: tmp, + } + return +} + +func NewWin32_ProcessorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Processor, err error) { + tmp, err := NewCIM_ProcessorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Processor{ + CIM_Processor: tmp, + } + return +} + +// SetArchitecture sets the value of Architecture for the instance +func (instance *Win32_Processor) SetPropertyArchitecture(value uint16) (err error) { + return instance.SetProperty("Architecture", (value)) +} + +// GetArchitecture gets the value of Architecture for the instance +func (instance *Win32_Processor) GetPropertyArchitecture() (value uint16, err error) { + retValue, err := instance.GetProperty("Architecture") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAssetTag sets the value of AssetTag for the instance +func (instance *Win32_Processor) SetPropertyAssetTag(value string) (err error) { + return instance.SetProperty("AssetTag", (value)) +} + +// GetAssetTag gets the value of AssetTag for the instance +func (instance *Win32_Processor) GetPropertyAssetTag() (value string, err error) { + retValue, err := instance.GetProperty("AssetTag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCharacteristics sets the value of Characteristics for the instance +func (instance *Win32_Processor) SetPropertyCharacteristics(value uint32) (err error) { + return instance.SetProperty("Characteristics", (value)) +} + +// GetCharacteristics gets the value of Characteristics for the instance +func (instance *Win32_Processor) GetPropertyCharacteristics() (value uint32, err error) { + retValue, err := instance.GetProperty("Characteristics") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCpuStatus sets the value of CpuStatus for the instance +func (instance *Win32_Processor) SetPropertyCpuStatus(value uint16) (err error) { + return instance.SetProperty("CpuStatus", (value)) +} + +// GetCpuStatus gets the value of CpuStatus for the instance +func (instance *Win32_Processor) GetPropertyCpuStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("CpuStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCurrentVoltage sets the value of CurrentVoltage for the instance +func (instance *Win32_Processor) SetPropertyCurrentVoltage(value uint16) (err error) { + return instance.SetProperty("CurrentVoltage", (value)) +} + +// GetCurrentVoltage gets the value of CurrentVoltage for the instance +func (instance *Win32_Processor) GetPropertyCurrentVoltage() (value uint16, err error) { + retValue, err := instance.GetProperty("CurrentVoltage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetExtClock sets the value of ExtClock for the instance +func (instance *Win32_Processor) SetPropertyExtClock(value uint32) (err error) { + return instance.SetProperty("ExtClock", (value)) +} + +// GetExtClock gets the value of ExtClock for the instance +func (instance *Win32_Processor) GetPropertyExtClock() (value uint32, err error) { + retValue, err := instance.GetProperty("ExtClock") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetL2CacheSize sets the value of L2CacheSize for the instance +func (instance *Win32_Processor) SetPropertyL2CacheSize(value uint32) (err error) { + return instance.SetProperty("L2CacheSize", (value)) +} + +// GetL2CacheSize gets the value of L2CacheSize for the instance +func (instance *Win32_Processor) GetPropertyL2CacheSize() (value uint32, err error) { + retValue, err := instance.GetProperty("L2CacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetL2CacheSpeed sets the value of L2CacheSpeed for the instance +func (instance *Win32_Processor) SetPropertyL2CacheSpeed(value uint32) (err error) { + return instance.SetProperty("L2CacheSpeed", (value)) +} + +// GetL2CacheSpeed gets the value of L2CacheSpeed for the instance +func (instance *Win32_Processor) GetPropertyL2CacheSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("L2CacheSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetL3CacheSize sets the value of L3CacheSize for the instance +func (instance *Win32_Processor) SetPropertyL3CacheSize(value uint32) (err error) { + return instance.SetProperty("L3CacheSize", (value)) +} + +// GetL3CacheSize gets the value of L3CacheSize for the instance +func (instance *Win32_Processor) GetPropertyL3CacheSize() (value uint32, err error) { + retValue, err := instance.GetProperty("L3CacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetL3CacheSpeed sets the value of L3CacheSpeed for the instance +func (instance *Win32_Processor) SetPropertyL3CacheSpeed(value uint32) (err error) { + return instance.SetProperty("L3CacheSpeed", (value)) +} + +// GetL3CacheSpeed gets the value of L3CacheSpeed for the instance +func (instance *Win32_Processor) GetPropertyL3CacheSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("L3CacheSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLevel sets the value of Level for the instance +func (instance *Win32_Processor) SetPropertyLevel(value uint16) (err error) { + return instance.SetProperty("Level", (value)) +} + +// GetLevel gets the value of Level for the instance +func (instance *Win32_Processor) GetPropertyLevel() (value uint16, err error) { + retValue, err := instance.GetProperty("Level") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_Processor) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_Processor) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNumberOfCores sets the value of NumberOfCores for the instance +func (instance *Win32_Processor) SetPropertyNumberOfCores(value uint32) (err error) { + return instance.SetProperty("NumberOfCores", (value)) +} + +// GetNumberOfCores gets the value of NumberOfCores for the instance +func (instance *Win32_Processor) GetPropertyNumberOfCores() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfCores") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfEnabledCore sets the value of NumberOfEnabledCore for the instance +func (instance *Win32_Processor) SetPropertyNumberOfEnabledCore(value uint32) (err error) { + return instance.SetProperty("NumberOfEnabledCore", (value)) +} + +// GetNumberOfEnabledCore gets the value of NumberOfEnabledCore for the instance +func (instance *Win32_Processor) GetPropertyNumberOfEnabledCore() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfEnabledCore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfLogicalProcessors sets the value of NumberOfLogicalProcessors for the instance +func (instance *Win32_Processor) SetPropertyNumberOfLogicalProcessors(value uint32) (err error) { + return instance.SetProperty("NumberOfLogicalProcessors", (value)) +} + +// GetNumberOfLogicalProcessors gets the value of NumberOfLogicalProcessors for the instance +func (instance *Win32_Processor) GetPropertyNumberOfLogicalProcessors() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfLogicalProcessors") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPartNumber sets the value of PartNumber for the instance +func (instance *Win32_Processor) SetPropertyPartNumber(value string) (err error) { + return instance.SetProperty("PartNumber", (value)) +} + +// GetPartNumber gets the value of PartNumber for the instance +func (instance *Win32_Processor) GetPropertyPartNumber() (value string, err error) { + retValue, err := instance.GetProperty("PartNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProcessorId sets the value of ProcessorId for the instance +func (instance *Win32_Processor) SetPropertyProcessorId(value string) (err error) { + return instance.SetProperty("ProcessorId", (value)) +} + +// GetProcessorId gets the value of ProcessorId for the instance +func (instance *Win32_Processor) GetPropertyProcessorId() (value string, err error) { + retValue, err := instance.GetProperty("ProcessorId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProcessorType sets the value of ProcessorType for the instance +func (instance *Win32_Processor) SetPropertyProcessorType(value uint16) (err error) { + return instance.SetProperty("ProcessorType", (value)) +} + +// GetProcessorType gets the value of ProcessorType for the instance +func (instance *Win32_Processor) GetPropertyProcessorType() (value uint16, err error) { + retValue, err := instance.GetProperty("ProcessorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRevision sets the value of Revision for the instance +func (instance *Win32_Processor) SetPropertyRevision(value uint16) (err error) { + return instance.SetProperty("Revision", (value)) +} + +// GetRevision gets the value of Revision for the instance +func (instance *Win32_Processor) GetPropertyRevision() (value uint16, err error) { + retValue, err := instance.GetProperty("Revision") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSecondLevelAddressTranslationExtensions sets the value of SecondLevelAddressTranslationExtensions for the instance +func (instance *Win32_Processor) SetPropertySecondLevelAddressTranslationExtensions(value bool) (err error) { + return instance.SetProperty("SecondLevelAddressTranslationExtensions", (value)) +} + +// GetSecondLevelAddressTranslationExtensions gets the value of SecondLevelAddressTranslationExtensions for the instance +func (instance *Win32_Processor) GetPropertySecondLevelAddressTranslationExtensions() (value bool, err error) { + retValue, err := instance.GetProperty("SecondLevelAddressTranslationExtensions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *Win32_Processor) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *Win32_Processor) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSocketDesignation sets the value of SocketDesignation for the instance +func (instance *Win32_Processor) SetPropertySocketDesignation(value string) (err error) { + return instance.SetProperty("SocketDesignation", (value)) +} + +// GetSocketDesignation gets the value of SocketDesignation for the instance +func (instance *Win32_Processor) GetPropertySocketDesignation() (value string, err error) { + retValue, err := instance.GetProperty("SocketDesignation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetThreadCount sets the value of ThreadCount for the instance +func (instance *Win32_Processor) SetPropertyThreadCount(value uint32) (err error) { + return instance.SetProperty("ThreadCount", (value)) +} + +// GetThreadCount gets the value of ThreadCount for the instance +func (instance *Win32_Processor) GetPropertyThreadCount() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *Win32_Processor) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *Win32_Processor) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVirtualizationFirmwareEnabled sets the value of VirtualizationFirmwareEnabled for the instance +func (instance *Win32_Processor) SetPropertyVirtualizationFirmwareEnabled(value bool) (err error) { + return instance.SetProperty("VirtualizationFirmwareEnabled", (value)) +} + +// GetVirtualizationFirmwareEnabled gets the value of VirtualizationFirmwareEnabled for the instance +func (instance *Win32_Processor) GetPropertyVirtualizationFirmwareEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("VirtualizationFirmwareEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVMMonitorModeExtensions sets the value of VMMonitorModeExtensions for the instance +func (instance *Win32_Processor) SetPropertyVMMonitorModeExtensions(value bool) (err error) { + return instance.SetProperty("VMMonitorModeExtensions", (value)) +} + +// GetVMMonitorModeExtensions gets the value of VMMonitorModeExtensions for the instance +func (instance *Win32_Processor) GetPropertyVMMonitorModeExtensions() (value bool, err error) { + retValue, err := instance.GetProperty("VMMonitorModeExtensions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVoltageCaps sets the value of VoltageCaps for the instance +func (instance *Win32_Processor) SetPropertyVoltageCaps(value uint32) (err error) { + return instance.SetProperty("VoltageCaps", (value)) +} + +// GetVoltageCaps gets the value of VoltageCaps for the instance +func (instance *Win32_Processor) GetPropertyVoltageCaps() (value uint32, err error) { + retValue, err := instance.GetProperty("VoltageCaps") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Product.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Product.go new file mode 100644 index 00000000..6ac1f068 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Product.go @@ -0,0 +1,771 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Product struct +type Win32_Product struct { + *CIM_Product + + // + AssignmentType uint16 + + // + HelpLink string + + // + HelpTelephone string + + // + InstallDate string + + // + InstallDate2 string + + // + InstallLocation string + + // + InstallSource string + + // + InstallState int16 + + // + Language string + + // + LocalPackage string + + // + PackageCache string + + // + PackageCode string + + // + PackageName string + + // + ProductID string + + // + RegCompany string + + // + RegOwner string + + // + Transforms string + + // + URLInfoAbout string + + // + URLUpdateInfo string + + // + WordCount uint32 +} + +func NewWin32_ProductEx1(instance *cim.WmiInstance) (newInstance *Win32_Product, err error) { + tmp, err := NewCIM_ProductEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Product{ + CIM_Product: tmp, + } + return +} + +func NewWin32_ProductEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Product, err error) { + tmp, err := NewCIM_ProductEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Product{ + CIM_Product: tmp, + } + return +} + +// SetAssignmentType sets the value of AssignmentType for the instance +func (instance *Win32_Product) SetPropertyAssignmentType(value uint16) (err error) { + return instance.SetProperty("AssignmentType", (value)) +} + +// GetAssignmentType gets the value of AssignmentType for the instance +func (instance *Win32_Product) GetPropertyAssignmentType() (value uint16, err error) { + retValue, err := instance.GetProperty("AssignmentType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHelpLink sets the value of HelpLink for the instance +func (instance *Win32_Product) SetPropertyHelpLink(value string) (err error) { + return instance.SetProperty("HelpLink", (value)) +} + +// GetHelpLink gets the value of HelpLink for the instance +func (instance *Win32_Product) GetPropertyHelpLink() (value string, err error) { + retValue, err := instance.GetProperty("HelpLink") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHelpTelephone sets the value of HelpTelephone for the instance +func (instance *Win32_Product) SetPropertyHelpTelephone(value string) (err error) { + return instance.SetProperty("HelpTelephone", (value)) +} + +// GetHelpTelephone gets the value of HelpTelephone for the instance +func (instance *Win32_Product) GetPropertyHelpTelephone() (value string, err error) { + retValue, err := instance.GetProperty("HelpTelephone") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallDate sets the value of InstallDate for the instance +func (instance *Win32_Product) SetPropertyInstallDate(value string) (err error) { + return instance.SetProperty("InstallDate", (value)) +} + +// GetInstallDate gets the value of InstallDate for the instance +func (instance *Win32_Product) GetPropertyInstallDate() (value string, err error) { + retValue, err := instance.GetProperty("InstallDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallDate2 sets the value of InstallDate2 for the instance +func (instance *Win32_Product) SetPropertyInstallDate2(value string) (err error) { + return instance.SetProperty("InstallDate2", (value)) +} + +// GetInstallDate2 gets the value of InstallDate2 for the instance +func (instance *Win32_Product) GetPropertyInstallDate2() (value string, err error) { + retValue, err := instance.GetProperty("InstallDate2") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallLocation sets the value of InstallLocation for the instance +func (instance *Win32_Product) SetPropertyInstallLocation(value string) (err error) { + return instance.SetProperty("InstallLocation", (value)) +} + +// GetInstallLocation gets the value of InstallLocation for the instance +func (instance *Win32_Product) GetPropertyInstallLocation() (value string, err error) { + retValue, err := instance.GetProperty("InstallLocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallSource sets the value of InstallSource for the instance +func (instance *Win32_Product) SetPropertyInstallSource(value string) (err error) { + return instance.SetProperty("InstallSource", (value)) +} + +// GetInstallSource gets the value of InstallSource for the instance +func (instance *Win32_Product) GetPropertyInstallSource() (value string, err error) { + retValue, err := instance.GetProperty("InstallSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallState sets the value of InstallState for the instance +func (instance *Win32_Product) SetPropertyInstallState(value int16) (err error) { + return instance.SetProperty("InstallState", (value)) +} + +// GetInstallState gets the value of InstallState for the instance +func (instance *Win32_Product) GetPropertyInstallState() (value int16, err error) { + retValue, err := instance.GetProperty("InstallState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetLanguage sets the value of Language for the instance +func (instance *Win32_Product) SetPropertyLanguage(value string) (err error) { + return instance.SetProperty("Language", (value)) +} + +// GetLanguage gets the value of Language for the instance +func (instance *Win32_Product) GetPropertyLanguage() (value string, err error) { + retValue, err := instance.GetProperty("Language") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalPackage sets the value of LocalPackage for the instance +func (instance *Win32_Product) SetPropertyLocalPackage(value string) (err error) { + return instance.SetProperty("LocalPackage", (value)) +} + +// GetLocalPackage gets the value of LocalPackage for the instance +func (instance *Win32_Product) GetPropertyLocalPackage() (value string, err error) { + retValue, err := instance.GetProperty("LocalPackage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPackageCache sets the value of PackageCache for the instance +func (instance *Win32_Product) SetPropertyPackageCache(value string) (err error) { + return instance.SetProperty("PackageCache", (value)) +} + +// GetPackageCache gets the value of PackageCache for the instance +func (instance *Win32_Product) GetPropertyPackageCache() (value string, err error) { + retValue, err := instance.GetProperty("PackageCache") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPackageCode sets the value of PackageCode for the instance +func (instance *Win32_Product) SetPropertyPackageCode(value string) (err error) { + return instance.SetProperty("PackageCode", (value)) +} + +// GetPackageCode gets the value of PackageCode for the instance +func (instance *Win32_Product) GetPropertyPackageCode() (value string, err error) { + retValue, err := instance.GetProperty("PackageCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPackageName sets the value of PackageName for the instance +func (instance *Win32_Product) SetPropertyPackageName(value string) (err error) { + return instance.SetProperty("PackageName", (value)) +} + +// GetPackageName gets the value of PackageName for the instance +func (instance *Win32_Product) GetPropertyPackageName() (value string, err error) { + retValue, err := instance.GetProperty("PackageName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductID sets the value of ProductID for the instance +func (instance *Win32_Product) SetPropertyProductID(value string) (err error) { + return instance.SetProperty("ProductID", (value)) +} + +// GetProductID gets the value of ProductID for the instance +func (instance *Win32_Product) GetPropertyProductID() (value string, err error) { + retValue, err := instance.GetProperty("ProductID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRegCompany sets the value of RegCompany for the instance +func (instance *Win32_Product) SetPropertyRegCompany(value string) (err error) { + return instance.SetProperty("RegCompany", (value)) +} + +// GetRegCompany gets the value of RegCompany for the instance +func (instance *Win32_Product) GetPropertyRegCompany() (value string, err error) { + retValue, err := instance.GetProperty("RegCompany") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRegOwner sets the value of RegOwner for the instance +func (instance *Win32_Product) SetPropertyRegOwner(value string) (err error) { + return instance.SetProperty("RegOwner", (value)) +} + +// GetRegOwner gets the value of RegOwner for the instance +func (instance *Win32_Product) GetPropertyRegOwner() (value string, err error) { + retValue, err := instance.GetProperty("RegOwner") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTransforms sets the value of Transforms for the instance +func (instance *Win32_Product) SetPropertyTransforms(value string) (err error) { + return instance.SetProperty("Transforms", (value)) +} + +// GetTransforms gets the value of Transforms for the instance +func (instance *Win32_Product) GetPropertyTransforms() (value string, err error) { + retValue, err := instance.GetProperty("Transforms") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetURLInfoAbout sets the value of URLInfoAbout for the instance +func (instance *Win32_Product) SetPropertyURLInfoAbout(value string) (err error) { + return instance.SetProperty("URLInfoAbout", (value)) +} + +// GetURLInfoAbout gets the value of URLInfoAbout for the instance +func (instance *Win32_Product) GetPropertyURLInfoAbout() (value string, err error) { + retValue, err := instance.GetProperty("URLInfoAbout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetURLUpdateInfo sets the value of URLUpdateInfo for the instance +func (instance *Win32_Product) SetPropertyURLUpdateInfo(value string) (err error) { + return instance.SetProperty("URLUpdateInfo", (value)) +} + +// GetURLUpdateInfo gets the value of URLUpdateInfo for the instance +func (instance *Win32_Product) GetPropertyURLUpdateInfo() (value string, err error) { + retValue, err := instance.GetProperty("URLUpdateInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWordCount sets the value of WordCount for the instance +func (instance *Win32_Product) SetPropertyWordCount(value uint32) (err error) { + return instance.SetProperty("WordCount", (value)) +} + +// GetWordCount gets the value of WordCount for the instance +func (instance *Win32_Product) GetPropertyWordCount() (value uint32, err error) { + retValue, err := instance.GetProperty("WordCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// +// + +// +func (instance *Win32_Product) Install( /* IN */ PackageLocation string, + /* IN */ Options string, + /* IN */ AllUsers bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Install", PackageLocation, Options, AllUsers) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_Product) Admin( /* IN */ PackageLocation string, + /* IN */ TargetLocation string, + /* IN */ Options string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Admin", PackageLocation, TargetLocation, Options) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_Product) Advertise( /* IN */ PackageLocation string, + /* IN */ Options string, + /* IN */ AllUsers bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Advertise", PackageLocation, Options, AllUsers) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_Product) Reinstall( /* IN */ ReinstallMode uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Reinstall", ReinstallMode) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_Product) Upgrade( /* IN */ PackageLocation string, + /* IN */ Options string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Upgrade", PackageLocation, Options) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_Product) Configure( /* IN */ InstallState uint16, + /* IN */ InstallLevel uint16, + /* IN */ Options string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Configure", InstallState, InstallLevel, Options) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_Product) Uninstall() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Uninstall") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductCheck.go new file mode 100644 index 00000000..0f227efa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductCheck.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProductCheck struct +type Win32_ProductCheck struct { + *cim.WmiInstance + + // + Check CIM_Check + + // + Product Win32_Product +} + +func NewWin32_ProductCheckEx1(instance *cim.WmiInstance) (newInstance *Win32_ProductCheck, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ProductCheck{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ProductCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProductCheck, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProductCheck{ + WmiInstance: tmp, + } + return +} + +// SetCheck sets the value of Check for the instance +func (instance *Win32_ProductCheck) SetPropertyCheck(value CIM_Check) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *Win32_ProductCheck) GetPropertyCheck() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} + +// SetProduct sets the value of Product for the instance +func (instance *Win32_ProductCheck) SetPropertyProduct(value Win32_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *Win32_ProductCheck) GetPropertyProduct() (value Win32_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Product(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductResource.go new file mode 100644 index 00000000..a1ada53d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductResource.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProductResource struct +type Win32_ProductResource struct { + *cim.WmiInstance + + // + Product Win32_Product + + // + Resource Win32_MSIResource +} + +func NewWin32_ProductResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_ProductResource, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ProductResource{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ProductResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProductResource, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProductResource{ + WmiInstance: tmp, + } + return +} + +// SetProduct sets the value of Product for the instance +func (instance *Win32_ProductResource) SetPropertyProduct(value Win32_Product) (err error) { + return instance.SetProperty("Product", (value)) +} + +// GetProduct gets the value of Product for the instance +func (instance *Win32_ProductResource) GetPropertyProduct() (value Win32_Product, err error) { + retValue, err := instance.GetProperty("Product") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Product) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Product is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Product(valuetmp) + + return +} + +// SetResource sets the value of Resource for the instance +func (instance *Win32_ProductResource) SetPropertyResource(value Win32_MSIResource) (err error) { + return instance.SetProperty("Resource", (value)) +} + +// GetResource gets the value of Resource for the instance +func (instance *Win32_ProductResource) GetPropertyResource() (value Win32_MSIResource, err error) { + retValue, err := instance.GetProperty("Resource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_MSIResource) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_MSIResource is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_MSIResource(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductSoftwareFeatures.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductSoftwareFeatures.go new file mode 100644 index 00000000..1debc67a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProductSoftwareFeatures.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ProductSoftwareFeatures struct +type Win32_ProductSoftwareFeatures struct { + *CIM_ProductSoftwareFeatures +} + +func NewWin32_ProductSoftwareFeaturesEx1(instance *cim.WmiInstance) (newInstance *Win32_ProductSoftwareFeatures, err error) { + tmp, err := NewCIM_ProductSoftwareFeaturesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProductSoftwareFeatures{ + CIM_ProductSoftwareFeatures: tmp, + } + return +} + +func NewWin32_ProductSoftwareFeaturesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProductSoftwareFeatures, err error) { + tmp, err := NewCIM_ProductSoftwareFeaturesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProductSoftwareFeatures{ + CIM_ProductSoftwareFeatures: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgIDSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgIDSpecification.go new file mode 100644 index 00000000..7797c4fc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgIDSpecification.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProgIDSpecification struct +type Win32_ProgIDSpecification struct { + *CIM_Check + + // + Parent string + + // + ProgID string +} + +func NewWin32_ProgIDSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_ProgIDSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProgIDSpecification{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ProgIDSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProgIDSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProgIDSpecification{ + CIM_Check: tmp, + } + return +} + +// SetParent sets the value of Parent for the instance +func (instance *Win32_ProgIDSpecification) SetPropertyParent(value string) (err error) { + return instance.SetProperty("Parent", (value)) +} + +// GetParent gets the value of Parent for the instance +func (instance *Win32_ProgIDSpecification) GetPropertyParent() (value string, err error) { + retValue, err := instance.GetProperty("Parent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProgID sets the value of ProgID for the instance +func (instance *Win32_ProgIDSpecification) SetPropertyProgID(value string) (err error) { + return instance.SetProperty("ProgID", (value)) +} + +// GetProgID gets the value of ProgID for the instance +func (instance *Win32_ProgIDSpecification) GetPropertyProgID() (value string, err error) { + retValue, err := instance.GetProperty("ProgID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupContents.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupContents.go new file mode 100644 index 00000000..ca3de74f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupContents.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ProgramGroupContents struct +type Win32_ProgramGroupContents struct { + *CIM_Component +} + +func NewWin32_ProgramGroupContentsEx1(instance *cim.WmiInstance) (newInstance *Win32_ProgramGroupContents, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProgramGroupContents{ + CIM_Component: tmp, + } + return +} + +func NewWin32_ProgramGroupContentsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProgramGroupContents, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProgramGroupContents{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupOrItem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupOrItem.go new file mode 100644 index 00000000..5e64109b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProgramGroupOrItem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ProgramGroupOrItem struct +type Win32_ProgramGroupOrItem struct { + *CIM_LogicalElement +} + +func NewWin32_ProgramGroupOrItemEx1(instance *cim.WmiInstance) (newInstance *Win32_ProgramGroupOrItem, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ProgramGroupOrItem{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ProgramGroupOrItemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProgramGroupOrItem, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProgramGroupOrItem{ + CIM_LogicalElement: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Property.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Property.go new file mode 100644 index 00000000..d1e7e280 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Property.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Property struct +type Win32_Property struct { + *Win32_MSIResource + + // + ProductCode string + + // + Property string + + // + Value string +} + +func NewWin32_PropertyEx1(instance *cim.WmiInstance) (newInstance *Win32_Property, err error) { + tmp, err := NewWin32_MSIResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Property{ + Win32_MSIResource: tmp, + } + return +} + +func NewWin32_PropertyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Property, err error) { + tmp, err := NewWin32_MSIResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Property{ + Win32_MSIResource: tmp, + } + return +} + +// SetProductCode sets the value of ProductCode for the instance +func (instance *Win32_Property) SetPropertyProductCode(value string) (err error) { + return instance.SetProperty("ProductCode", (value)) +} + +// GetProductCode gets the value of ProductCode for the instance +func (instance *Win32_Property) GetPropertyProductCode() (value string, err error) { + retValue, err := instance.GetProperty("ProductCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProperty sets the value of Property for the instance +func (instance *Win32_Property) SetPropertyProperty(value string) (err error) { + return instance.SetProperty("Property", (value)) +} + +// GetProperty gets the value of Property for the instance +func (instance *Win32_Property) GetPropertyProperty() (value string, err error) { + retValue, err := instance.GetProperty("Property") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *Win32_Property) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *Win32_Property) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProtocolBinding.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProtocolBinding.go new file mode 100644 index 00000000..8462ca32 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ProtocolBinding.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ProtocolBinding struct +type Win32_ProtocolBinding struct { + *cim.WmiInstance + + // + Antecedent Win32_NetworkProtocol + + // + Dependent Win32_SystemDriver + + // + Device Win32_NetworkAdapter +} + +func NewWin32_ProtocolBindingEx1(instance *cim.WmiInstance) (newInstance *Win32_ProtocolBinding, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ProtocolBinding{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ProtocolBindingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ProtocolBinding, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ProtocolBinding{ + WmiInstance: tmp, + } + return +} + +// SetAntecedent sets the value of Antecedent for the instance +func (instance *Win32_ProtocolBinding) SetPropertyAntecedent(value Win32_NetworkProtocol) (err error) { + return instance.SetProperty("Antecedent", (value)) +} + +// GetAntecedent gets the value of Antecedent for the instance +func (instance *Win32_ProtocolBinding) GetPropertyAntecedent() (value Win32_NetworkProtocol, err error) { + retValue, err := instance.GetProperty("Antecedent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_NetworkProtocol) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_NetworkProtocol is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_NetworkProtocol(valuetmp) + + return +} + +// SetDependent sets the value of Dependent for the instance +func (instance *Win32_ProtocolBinding) SetPropertyDependent(value Win32_SystemDriver) (err error) { + return instance.SetProperty("Dependent", (value)) +} + +// GetDependent gets the value of Dependent for the instance +func (instance *Win32_ProtocolBinding) GetPropertyDependent() (value Win32_SystemDriver, err error) { + retValue, err := instance.GetProperty("Dependent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SystemDriver) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SystemDriver is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SystemDriver(valuetmp) + + return +} + +// SetDevice sets the value of Device for the instance +func (instance *Win32_ProtocolBinding) SetPropertyDevice(value Win32_NetworkAdapter) (err error) { + return instance.SetProperty("Device", (value)) +} + +// GetDevice gets the value of Device for the instance +func (instance *Win32_ProtocolBinding) GetPropertyDevice() (value Win32_NetworkAdapter, err error) { + retValue, err := instance.GetProperty("Device") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_NetworkAdapter) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_NetworkAdapter is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_NetworkAdapter(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PublishComponentAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PublishComponentAction.go new file mode 100644 index 00000000..f4b49a0e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_PublishComponentAction.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_PublishComponentAction struct +type Win32_PublishComponentAction struct { + *CIM_Action + + // + AppData string + + // + ComponentID string + + // + Qual string +} + +func NewWin32_PublishComponentActionEx1(instance *cim.WmiInstance) (newInstance *Win32_PublishComponentAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_PublishComponentAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_PublishComponentActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_PublishComponentAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_PublishComponentAction{ + CIM_Action: tmp, + } + return +} + +// SetAppData sets the value of AppData for the instance +func (instance *Win32_PublishComponentAction) SetPropertyAppData(value string) (err error) { + return instance.SetProperty("AppData", (value)) +} + +// GetAppData gets the value of AppData for the instance +func (instance *Win32_PublishComponentAction) GetPropertyAppData() (value string, err error) { + retValue, err := instance.GetProperty("AppData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetComponentID sets the value of ComponentID for the instance +func (instance *Win32_PublishComponentAction) SetPropertyComponentID(value string) (err error) { + return instance.SetProperty("ComponentID", (value)) +} + +// GetComponentID gets the value of ComponentID for the instance +func (instance *Win32_PublishComponentAction) GetPropertyComponentID() (value string, err error) { + retValue, err := instance.GetProperty("ComponentID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQual sets the value of Qual for the instance +func (instance *Win32_PublishComponentAction) SetPropertyQual(value string) (err error) { + return instance.SetProperty("Qual", (value)) +} + +// GetQual gets the value of Qual for the instance +func (instance *Win32_PublishComponentAction) GetPropertyQual() (value string, err error) { + retValue, err := instance.GetProperty("Qual") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuickFixEngineering.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuickFixEngineering.go new file mode 100644 index 00000000..fd4800d4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuickFixEngineering.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_QuickFixEngineering struct +type Win32_QuickFixEngineering struct { + *CIM_LogicalElement + + // + CSName string + + // + FixComments string + + // + HotFixID string + + // + InstalledBy string + + // + InstalledOn string + + // + ServicePackInEffect string +} + +func NewWin32_QuickFixEngineeringEx1(instance *cim.WmiInstance) (newInstance *Win32_QuickFixEngineering, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_QuickFixEngineering{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_QuickFixEngineeringEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_QuickFixEngineering, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_QuickFixEngineering{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCSName sets the value of CSName for the instance +func (instance *Win32_QuickFixEngineering) SetPropertyCSName(value string) (err error) { + return instance.SetProperty("CSName", (value)) +} + +// GetCSName gets the value of CSName for the instance +func (instance *Win32_QuickFixEngineering) GetPropertyCSName() (value string, err error) { + retValue, err := instance.GetProperty("CSName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFixComments sets the value of FixComments for the instance +func (instance *Win32_QuickFixEngineering) SetPropertyFixComments(value string) (err error) { + return instance.SetProperty("FixComments", (value)) +} + +// GetFixComments gets the value of FixComments for the instance +func (instance *Win32_QuickFixEngineering) GetPropertyFixComments() (value string, err error) { + retValue, err := instance.GetProperty("FixComments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHotFixID sets the value of HotFixID for the instance +func (instance *Win32_QuickFixEngineering) SetPropertyHotFixID(value string) (err error) { + return instance.SetProperty("HotFixID", (value)) +} + +// GetHotFixID gets the value of HotFixID for the instance +func (instance *Win32_QuickFixEngineering) GetPropertyHotFixID() (value string, err error) { + retValue, err := instance.GetProperty("HotFixID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstalledBy sets the value of InstalledBy for the instance +func (instance *Win32_QuickFixEngineering) SetPropertyInstalledBy(value string) (err error) { + return instance.SetProperty("InstalledBy", (value)) +} + +// GetInstalledBy gets the value of InstalledBy for the instance +func (instance *Win32_QuickFixEngineering) GetPropertyInstalledBy() (value string, err error) { + retValue, err := instance.GetProperty("InstalledBy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstalledOn sets the value of InstalledOn for the instance +func (instance *Win32_QuickFixEngineering) SetPropertyInstalledOn(value string) (err error) { + return instance.SetProperty("InstalledOn", (value)) +} + +// GetInstalledOn gets the value of InstalledOn for the instance +func (instance *Win32_QuickFixEngineering) GetPropertyInstalledOn() (value string, err error) { + retValue, err := instance.GetProperty("InstalledOn") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServicePackInEffect sets the value of ServicePackInEffect for the instance +func (instance *Win32_QuickFixEngineering) SetPropertyServicePackInEffect(value string) (err error) { + return instance.SetProperty("ServicePackInEffect", (value)) +} + +// GetServicePackInEffect gets the value of ServicePackInEffect for the instance +func (instance *Win32_QuickFixEngineering) GetPropertyServicePackInEffect() (value string, err error) { + retValue, err := instance.GetProperty("ServicePackInEffect") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuotaSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuotaSetting.go new file mode 100644 index 00000000..af6e6d5f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_QuotaSetting.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_QuotaSetting struct +type Win32_QuotaSetting struct { + *CIM_Setting + + // + DefaultLimit int64 + + // + DefaultWarningLimit int64 + + // + ExceededNotification bool + + // + State uint32 + + // + VolumePath string + + // + WarningExceededNotification bool +} + +func NewWin32_QuotaSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_QuotaSetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_QuotaSetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_QuotaSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_QuotaSetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_QuotaSetting{ + CIM_Setting: tmp, + } + return +} + +// SetDefaultLimit sets the value of DefaultLimit for the instance +func (instance *Win32_QuotaSetting) SetPropertyDefaultLimit(value int64) (err error) { + return instance.SetProperty("DefaultLimit", (value)) +} + +// GetDefaultLimit gets the value of DefaultLimit for the instance +func (instance *Win32_QuotaSetting) GetPropertyDefaultLimit() (value int64, err error) { + retValue, err := instance.GetProperty("DefaultLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetDefaultWarningLimit sets the value of DefaultWarningLimit for the instance +func (instance *Win32_QuotaSetting) SetPropertyDefaultWarningLimit(value int64) (err error) { + return instance.SetProperty("DefaultWarningLimit", (value)) +} + +// GetDefaultWarningLimit gets the value of DefaultWarningLimit for the instance +func (instance *Win32_QuotaSetting) GetPropertyDefaultWarningLimit() (value int64, err error) { + retValue, err := instance.GetProperty("DefaultWarningLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetExceededNotification sets the value of ExceededNotification for the instance +func (instance *Win32_QuotaSetting) SetPropertyExceededNotification(value bool) (err error) { + return instance.SetProperty("ExceededNotification", (value)) +} + +// GetExceededNotification gets the value of ExceededNotification for the instance +func (instance *Win32_QuotaSetting) GetPropertyExceededNotification() (value bool, err error) { + retValue, err := instance.GetProperty("ExceededNotification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *Win32_QuotaSetting) SetPropertyState(value uint32) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *Win32_QuotaSetting) GetPropertyState() (value uint32, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVolumePath sets the value of VolumePath for the instance +func (instance *Win32_QuotaSetting) SetPropertyVolumePath(value string) (err error) { + return instance.SetProperty("VolumePath", (value)) +} + +// GetVolumePath gets the value of VolumePath for the instance +func (instance *Win32_QuotaSetting) GetPropertyVolumePath() (value string, err error) { + retValue, err := instance.GetProperty("VolumePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWarningExceededNotification sets the value of WarningExceededNotification for the instance +func (instance *Win32_QuotaSetting) SetPropertyWarningExceededNotification(value bool) (err error) { + return instance.SetProperty("WarningExceededNotification", (value)) +} + +// GetWarningExceededNotification gets the value of WarningExceededNotification for the instance +func (instance *Win32_QuotaSetting) GetPropertyWarningExceededNotification() (value bool, err error) { + retValue, err := instance.GetProperty("WarningExceededNotification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Refrigeration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Refrigeration.go new file mode 100644 index 00000000..a62e2b47 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Refrigeration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Refrigeration struct +type Win32_Refrigeration struct { + *CIM_Refrigeration +} + +func NewWin32_RefrigerationEx1(instance *cim.WmiInstance) (newInstance *Win32_Refrigeration, err error) { + tmp, err := NewCIM_RefrigerationEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Refrigeration{ + CIM_Refrigeration: tmp, + } + return +} + +func NewWin32_RefrigerationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Refrigeration, err error) { + tmp, err := NewCIM_RefrigerationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Refrigeration{ + CIM_Refrigeration: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Registry.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Registry.go new file mode 100644 index 00000000..2ccdab3e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Registry.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Registry struct +type Win32_Registry struct { + *CIM_LogicalElement + + // + CurrentSize uint32 + + // + MaximumSize uint32 + + // + ProposedSize uint32 +} + +func NewWin32_RegistryEx1(instance *cim.WmiInstance) (newInstance *Win32_Registry, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Registry{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_RegistryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Registry, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Registry{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCurrentSize sets the value of CurrentSize for the instance +func (instance *Win32_Registry) SetPropertyCurrentSize(value uint32) (err error) { + return instance.SetProperty("CurrentSize", (value)) +} + +// GetCurrentSize gets the value of CurrentSize for the instance +func (instance *Win32_Registry) GetPropertyCurrentSize() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumSize sets the value of MaximumSize for the instance +func (instance *Win32_Registry) SetPropertyMaximumSize(value uint32) (err error) { + return instance.SetProperty("MaximumSize", (value)) +} + +// GetMaximumSize gets the value of MaximumSize for the instance +func (instance *Win32_Registry) GetPropertyMaximumSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProposedSize sets the value of ProposedSize for the instance +func (instance *Win32_Registry) SetPropertyProposedSize(value uint32) (err error) { + return instance.SetProperty("ProposedSize", (value)) +} + +// GetProposedSize gets the value of ProposedSize for the instance +func (instance *Win32_Registry) GetPropertyProposedSize() (value uint32, err error) { + retValue, err := instance.GetProperty("ProposedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RegistryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RegistryAction.go new file mode 100644 index 00000000..ed2083a3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RegistryAction.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RegistryAction struct +type Win32_RegistryAction struct { + *CIM_Action + + // + EntryName string + + // + EntryValue string + + // + key string + + // + Registry string + + // + Root int16 +} + +func NewWin32_RegistryActionEx1(instance *cim.WmiInstance) (newInstance *Win32_RegistryAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_RegistryAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_RegistryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RegistryAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RegistryAction{ + CIM_Action: tmp, + } + return +} + +// SetEntryName sets the value of EntryName for the instance +func (instance *Win32_RegistryAction) SetPropertyEntryName(value string) (err error) { + return instance.SetProperty("EntryName", (value)) +} + +// GetEntryName gets the value of EntryName for the instance +func (instance *Win32_RegistryAction) GetPropertyEntryName() (value string, err error) { + retValue, err := instance.GetProperty("EntryName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEntryValue sets the value of EntryValue for the instance +func (instance *Win32_RegistryAction) SetPropertyEntryValue(value string) (err error) { + return instance.SetProperty("EntryValue", (value)) +} + +// GetEntryValue gets the value of EntryValue for the instance +func (instance *Win32_RegistryAction) GetPropertyEntryValue() (value string, err error) { + retValue, err := instance.GetProperty("EntryValue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Setkey sets the value of key for the instance +func (instance *Win32_RegistryAction) SetPropertykey(value string) (err error) { + return instance.SetProperty("key", (value)) +} + +// Getkey gets the value of key for the instance +func (instance *Win32_RegistryAction) GetPropertykey() (value string, err error) { + retValue, err := instance.GetProperty("key") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRegistry sets the value of Registry for the instance +func (instance *Win32_RegistryAction) SetPropertyRegistry(value string) (err error) { + return instance.SetProperty("Registry", (value)) +} + +// GetRegistry gets the value of Registry for the instance +func (instance *Win32_RegistryAction) GetPropertyRegistry() (value string, err error) { + retValue, err := instance.GetProperty("Registry") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRoot sets the value of Root for the instance +func (instance *Win32_RegistryAction) SetPropertyRoot(value int16) (err error) { + return instance.SetProperty("Root", (value)) +} + +// GetRoot gets the value of Root for the instance +func (instance *Win32_RegistryAction) GetPropertyRoot() (value int16, err error) { + retValue, err := instance.GetProperty("Root") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Reliability.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Reliability.go new file mode 100644 index 00000000..38eb2bd3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Reliability.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Reliability struct +type Win32_Reliability struct { + *cim.WmiInstance +} + +func NewWin32_ReliabilityEx1(instance *cim.WmiInstance) (newInstance *Win32_Reliability, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_Reliability{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ReliabilityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Reliability, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Reliability{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityRecords.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityRecords.go new file mode 100644 index 00000000..528191da --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityRecords.go @@ -0,0 +1,366 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ReliabilityRecords struct +type Win32_ReliabilityRecords struct { + *Win32_Reliability + + // + ComputerName string + + // + EventIdentifier uint32 + + // + InsertionStrings []string + + // + Logfile string + + // + Message string + + // + ProductName string + + // + RecordNumber uint32 + + // + SourceName string + + // + TimeGenerated string + + // + User string +} + +func NewWin32_ReliabilityRecordsEx1(instance *cim.WmiInstance) (newInstance *Win32_ReliabilityRecords, err error) { + tmp, err := NewWin32_ReliabilityEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ReliabilityRecords{ + Win32_Reliability: tmp, + } + return +} + +func NewWin32_ReliabilityRecordsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ReliabilityRecords, err error) { + tmp, err := NewWin32_ReliabilityEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ReliabilityRecords{ + Win32_Reliability: tmp, + } + return +} + +// SetComputerName sets the value of ComputerName for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyComputerName(value string) (err error) { + return instance.SetProperty("ComputerName", (value)) +} + +// GetComputerName gets the value of ComputerName for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyComputerName() (value string, err error) { + retValue, err := instance.GetProperty("ComputerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEventIdentifier sets the value of EventIdentifier for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyEventIdentifier(value uint32) (err error) { + return instance.SetProperty("EventIdentifier", (value)) +} + +// GetEventIdentifier gets the value of EventIdentifier for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyEventIdentifier() (value uint32, err error) { + retValue, err := instance.GetProperty("EventIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInsertionStrings sets the value of InsertionStrings for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyInsertionStrings(value []string) (err error) { + return instance.SetProperty("InsertionStrings", (value)) +} + +// GetInsertionStrings gets the value of InsertionStrings for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyInsertionStrings() (value []string, err error) { + retValue, err := instance.GetProperty("InsertionStrings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetLogfile sets the value of Logfile for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyLogfile(value string) (err error) { + return instance.SetProperty("Logfile", (value)) +} + +// GetLogfile gets the value of Logfile for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyLogfile() (value string, err error) { + retValue, err := instance.GetProperty("Logfile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMessage sets the value of Message for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyMessage(value string) (err error) { + return instance.SetProperty("Message", (value)) +} + +// GetMessage gets the value of Message for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyMessage() (value string, err error) { + retValue, err := instance.GetProperty("Message") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductName sets the value of ProductName for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyProductName(value string) (err error) { + return instance.SetProperty("ProductName", (value)) +} + +// GetProductName gets the value of ProductName for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyProductName() (value string, err error) { + retValue, err := instance.GetProperty("ProductName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecordNumber sets the value of RecordNumber for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyRecordNumber(value uint32) (err error) { + return instance.SetProperty("RecordNumber", (value)) +} + +// GetRecordNumber gets the value of RecordNumber for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyRecordNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("RecordNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSourceName sets the value of SourceName for the instance +func (instance *Win32_ReliabilityRecords) SetPropertySourceName(value string) (err error) { + return instance.SetProperty("SourceName", (value)) +} + +// GetSourceName gets the value of SourceName for the instance +func (instance *Win32_ReliabilityRecords) GetPropertySourceName() (value string, err error) { + retValue, err := instance.GetProperty("SourceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeGenerated sets the value of TimeGenerated for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyTimeGenerated(value string) (err error) { + return instance.SetProperty("TimeGenerated", (value)) +} + +// GetTimeGenerated gets the value of TimeGenerated for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyTimeGenerated() (value string, err error) { + retValue, err := instance.GetProperty("TimeGenerated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Win32_ReliabilityRecords) SetPropertyUser(value string) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Win32_ReliabilityRecords) GetPropertyUser() (value string, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +func (instance *Win32_ReliabilityRecords) GetRecordCount( /* OUT */ RecordCount uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetRecordCount") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityStabilityMetrics.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityStabilityMetrics.go new file mode 100644 index 00000000..8df0c0aa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReliabilityStabilityMetrics.go @@ -0,0 +1,215 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ReliabilityStabilityMetrics struct +type Win32_ReliabilityStabilityMetrics struct { + *Win32_Reliability + + // + EndMeasurementDate string + + // + RelID string + + // + StartMeasurementDate string + + // + SystemStabilityIndex float64 + + // + TimeGenerated string +} + +func NewWin32_ReliabilityStabilityMetricsEx1(instance *cim.WmiInstance) (newInstance *Win32_ReliabilityStabilityMetrics, err error) { + tmp, err := NewWin32_ReliabilityEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ReliabilityStabilityMetrics{ + Win32_Reliability: tmp, + } + return +} + +func NewWin32_ReliabilityStabilityMetricsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ReliabilityStabilityMetrics, err error) { + tmp, err := NewWin32_ReliabilityEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ReliabilityStabilityMetrics{ + Win32_Reliability: tmp, + } + return +} + +// SetEndMeasurementDate sets the value of EndMeasurementDate for the instance +func (instance *Win32_ReliabilityStabilityMetrics) SetPropertyEndMeasurementDate(value string) (err error) { + return instance.SetProperty("EndMeasurementDate", (value)) +} + +// GetEndMeasurementDate gets the value of EndMeasurementDate for the instance +func (instance *Win32_ReliabilityStabilityMetrics) GetPropertyEndMeasurementDate() (value string, err error) { + retValue, err := instance.GetProperty("EndMeasurementDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRelID sets the value of RelID for the instance +func (instance *Win32_ReliabilityStabilityMetrics) SetPropertyRelID(value string) (err error) { + return instance.SetProperty("RelID", (value)) +} + +// GetRelID gets the value of RelID for the instance +func (instance *Win32_ReliabilityStabilityMetrics) GetPropertyRelID() (value string, err error) { + retValue, err := instance.GetProperty("RelID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartMeasurementDate sets the value of StartMeasurementDate for the instance +func (instance *Win32_ReliabilityStabilityMetrics) SetPropertyStartMeasurementDate(value string) (err error) { + return instance.SetProperty("StartMeasurementDate", (value)) +} + +// GetStartMeasurementDate gets the value of StartMeasurementDate for the instance +func (instance *Win32_ReliabilityStabilityMetrics) GetPropertyStartMeasurementDate() (value string, err error) { + retValue, err := instance.GetProperty("StartMeasurementDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSystemStabilityIndex sets the value of SystemStabilityIndex for the instance +func (instance *Win32_ReliabilityStabilityMetrics) SetPropertySystemStabilityIndex(value float64) (err error) { + return instance.SetProperty("SystemStabilityIndex", (value)) +} + +// GetSystemStabilityIndex gets the value of SystemStabilityIndex for the instance +func (instance *Win32_ReliabilityStabilityMetrics) GetPropertySystemStabilityIndex() (value float64, err error) { + retValue, err := instance.GetProperty("SystemStabilityIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} + +// SetTimeGenerated sets the value of TimeGenerated for the instance +func (instance *Win32_ReliabilityStabilityMetrics) SetPropertyTimeGenerated(value string) (err error) { + return instance.SetProperty("TimeGenerated", (value)) +} + +// GetTimeGenerated gets the value of TimeGenerated for the instance +func (instance *Win32_ReliabilityStabilityMetrics) GetPropertyTimeGenerated() (value string, err error) { + retValue, err := instance.GetProperty("TimeGenerated") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +func (instance *Win32_ReliabilityStabilityMetrics) GetRecordCount( /* OUT */ RecordCount uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetRecordCount") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveFileAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveFileAction.go new file mode 100644 index 00000000..bc491c44 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveFileAction.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RemoveFileAction struct +type Win32_RemoveFileAction struct { + *CIM_RemoveFileAction + + // + DirProperty string + + // + FileKey string + + // + FileName string + + // + InstallMode uint16 +} + +func NewWin32_RemoveFileActionEx1(instance *cim.WmiInstance) (newInstance *Win32_RemoveFileAction, err error) { + tmp, err := NewCIM_RemoveFileActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_RemoveFileAction{ + CIM_RemoveFileAction: tmp, + } + return +} + +func NewWin32_RemoveFileActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RemoveFileAction, err error) { + tmp, err := NewCIM_RemoveFileActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RemoveFileAction{ + CIM_RemoveFileAction: tmp, + } + return +} + +// SetDirProperty sets the value of DirProperty for the instance +func (instance *Win32_RemoveFileAction) SetPropertyDirProperty(value string) (err error) { + return instance.SetProperty("DirProperty", (value)) +} + +// GetDirProperty gets the value of DirProperty for the instance +func (instance *Win32_RemoveFileAction) GetPropertyDirProperty() (value string, err error) { + retValue, err := instance.GetProperty("DirProperty") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileKey sets the value of FileKey for the instance +func (instance *Win32_RemoveFileAction) SetPropertyFileKey(value string) (err error) { + return instance.SetProperty("FileKey", (value)) +} + +// GetFileKey gets the value of FileKey for the instance +func (instance *Win32_RemoveFileAction) GetPropertyFileKey() (value string, err error) { + retValue, err := instance.GetProperty("FileKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *Win32_RemoveFileAction) SetPropertyFileName(value string) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *Win32_RemoveFileAction) GetPropertyFileName() (value string, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstallMode sets the value of InstallMode for the instance +func (instance *Win32_RemoveFileAction) SetPropertyInstallMode(value uint16) (err error) { + return instance.SetProperty("InstallMode", (value)) +} + +// GetInstallMode gets the value of InstallMode for the instance +func (instance *Win32_RemoveFileAction) GetPropertyInstallMode() (value uint16, err error) { + retValue, err := instance.GetProperty("InstallMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveIniAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveIniAction.go new file mode 100644 index 00000000..622f4cf5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RemoveIniAction.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RemoveIniAction struct +type Win32_RemoveIniAction struct { + *CIM_Action + + // + Action uint16 + + // + key string + + // + Section string + + // + Value string +} + +func NewWin32_RemoveIniActionEx1(instance *cim.WmiInstance) (newInstance *Win32_RemoveIniAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_RemoveIniAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_RemoveIniActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RemoveIniAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RemoveIniAction{ + CIM_Action: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *Win32_RemoveIniAction) SetPropertyAction(value uint16) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *Win32_RemoveIniAction) GetPropertyAction() (value uint16, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// Setkey sets the value of key for the instance +func (instance *Win32_RemoveIniAction) SetPropertykey(value string) (err error) { + return instance.SetProperty("key", (value)) +} + +// Getkey gets the value of key for the instance +func (instance *Win32_RemoveIniAction) GetPropertykey() (value string, err error) { + retValue, err := instance.GetProperty("key") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSection sets the value of Section for the instance +func (instance *Win32_RemoveIniAction) SetPropertySection(value string) (err error) { + return instance.SetProperty("Section", (value)) +} + +// GetSection gets the value of Section for the instance +func (instance *Win32_RemoveIniAction) GetPropertySection() (value string, err error) { + retValue, err := instance.GetProperty("Section") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *Win32_RemoveIniAction) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *Win32_RemoveIniAction) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReserveCost.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReserveCost.go new file mode 100644 index 00000000..0388ffd9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ReserveCost.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ReserveCost struct +type Win32_ReserveCost struct { + *CIM_Check + + // + ReserveFolder string + + // + ReserveKey string + + // + ReserveLocal uint32 + + // + ReserveSource uint32 +} + +func NewWin32_ReserveCostEx1(instance *cim.WmiInstance) (newInstance *Win32_ReserveCost, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ReserveCost{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ReserveCostEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ReserveCost, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ReserveCost{ + CIM_Check: tmp, + } + return +} + +// SetReserveFolder sets the value of ReserveFolder for the instance +func (instance *Win32_ReserveCost) SetPropertyReserveFolder(value string) (err error) { + return instance.SetProperty("ReserveFolder", (value)) +} + +// GetReserveFolder gets the value of ReserveFolder for the instance +func (instance *Win32_ReserveCost) GetPropertyReserveFolder() (value string, err error) { + retValue, err := instance.GetProperty("ReserveFolder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReserveKey sets the value of ReserveKey for the instance +func (instance *Win32_ReserveCost) SetPropertyReserveKey(value string) (err error) { + return instance.SetProperty("ReserveKey", (value)) +} + +// GetReserveKey gets the value of ReserveKey for the instance +func (instance *Win32_ReserveCost) GetPropertyReserveKey() (value string, err error) { + retValue, err := instance.GetProperty("ReserveKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReserveLocal sets the value of ReserveLocal for the instance +func (instance *Win32_ReserveCost) SetPropertyReserveLocal(value uint32) (err error) { + return instance.SetProperty("ReserveLocal", (value)) +} + +// GetReserveLocal gets the value of ReserveLocal for the instance +func (instance *Win32_ReserveCost) GetPropertyReserveLocal() (value uint32, err error) { + retValue, err := instance.GetProperty("ReserveLocal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReserveSource sets the value of ReserveSource for the instance +func (instance *Win32_ReserveCost) SetPropertyReserveSource(value uint32) (err error) { + return instance.SetProperty("ReserveSource", (value)) +} + +// GetReserveSource gets the value of ReserveSource for the instance +func (instance *Win32_ReserveCost) GetPropertyReserveSource() (value uint32, err error) { + retValue, err := instance.GetProperty("ReserveSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileBackgroundUploadParams.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileBackgroundUploadParams.go new file mode 100644 index 00000000..6f8a0835 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileBackgroundUploadParams.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RoamingProfileBackgroundUploadParams struct +type Win32_RoamingProfileBackgroundUploadParams struct { + *cim.WmiInstance + + // The time interval, in hours. + Interval uint16 + + // Indicates when a background upload should be performed. One of the following values can be specified. SpecificTime - Perform the background upload at the time of day specified in the Time property. SetInterval - Perform the background upload at the interval specified in the Interval property. + SchedulingMethod RoamingProfileBackgroundUploadParams_SchedulingMethod + + // An integer value that represents the hour, in 24-hour time, for the time of day when they sync should occur. This must be an integer value from 0 to 23. + Time uint16 +} + +func NewWin32_RoamingProfileBackgroundUploadParamsEx1(instance *cim.WmiInstance) (newInstance *Win32_RoamingProfileBackgroundUploadParams, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileBackgroundUploadParams{ + WmiInstance: tmp, + } + return +} + +func NewWin32_RoamingProfileBackgroundUploadParamsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RoamingProfileBackgroundUploadParams, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileBackgroundUploadParams{ + WmiInstance: tmp, + } + return +} + +// SetInterval sets the value of Interval for the instance +func (instance *Win32_RoamingProfileBackgroundUploadParams) SetPropertyInterval(value uint16) (err error) { + return instance.SetProperty("Interval", (value)) +} + +// GetInterval gets the value of Interval for the instance +func (instance *Win32_RoamingProfileBackgroundUploadParams) GetPropertyInterval() (value uint16, err error) { + retValue, err := instance.GetProperty("Interval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSchedulingMethod sets the value of SchedulingMethod for the instance +func (instance *Win32_RoamingProfileBackgroundUploadParams) SetPropertySchedulingMethod(value RoamingProfileBackgroundUploadParams_SchedulingMethod) (err error) { + return instance.SetProperty("SchedulingMethod", (value)) +} + +// GetSchedulingMethod gets the value of SchedulingMethod for the instance +func (instance *Win32_RoamingProfileBackgroundUploadParams) GetPropertySchedulingMethod() (value RoamingProfileBackgroundUploadParams_SchedulingMethod, err error) { + retValue, err := instance.GetProperty("SchedulingMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = RoamingProfileBackgroundUploadParams_SchedulingMethod(valuetmp) + + return +} + +// SetTime sets the value of Time for the instance +func (instance *Win32_RoamingProfileBackgroundUploadParams) SetPropertyTime(value uint16) (err error) { + return instance.SetProperty("Time", (value)) +} + +// GetTime gets the value of Time for the instance +func (instance *Win32_RoamingProfileBackgroundUploadParams) GetPropertyTime() (value uint16, err error) { + retValue, err := instance.GetProperty("Time") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileMachineConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileMachineConfiguration.go new file mode 100644 index 00000000..fc37ab29 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileMachineConfiguration.go @@ -0,0 +1,591 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RoamingProfileMachineConfiguration struct +type Win32_RoamingProfileMachineConfiguration struct { + *cim.WmiInstance + + // If true, add the Administrator group to roaming user profiles. + AddAdminGroupToRUPEnabled bool + + // If true, allow cross-forest user policy and roaming user profiles. If false, a roaming profile user receives a local profile when logged on to a cross-forest domain. + AllowCrossForestUserPolicy bool + + // Contains the parameter for the background upload of a roaming user profile's registry file while the user is logged on. + BackgroundUploadParams Win32_RoamingProfileBackgroundUploadParams + + // If the DeleteRoamingCache property is true, this property specifies the number of days after which a user profile should be deleted. User profiles older than this number of days are deleted when the computer is restarted. + DeleteProfilesOlderDays uint16 + + // If true, cached copies of the roaming profile are deleted at log off + DeleteRoamingCacheEnabled bool + + // If true, do not detect slow network connections. If false, use the SlowLinkTimeOutParams property to determine whether the computer has a slow network connection. + DetectSlowLinkDisabled bool + + // If true, do not forcibly unload the user's registry when the user logs off. + ForceUnloadDisabled bool + + // Indicates if the settings configured through this WMI class are taking affect. + IsConfiguredByWMI bool + + // The roaming profile path to be set for all users that log on to this computer. The path should be in the form of \\ComputerName\ShareName\%USERNAME%. + MachineProfilePath string + + // If true, allow only local user profiles. + OnlyAllowLocalProfiles bool + + // If true, don't check the owners of user profiles. + OwnerCheckDisabled bool + + // If true, a configured roaming profile will only be downloaded if the machine is a primary computer for the user. + PrimaryComputerEnabled bool + + // If true, prevent roaming profile changes from being copied to the server. + ProfileUploadDisabled bool + + // Contains slow network connection timeout parameters to be used for user profiles. + SlowLinkTimeOutParams Win32_RoamingProfileSlowLinkParams + + // If true, the user is prompted to specify whether his or her profile should be downloaded even when the network connection is slow. + SlowLinkUIEnabled bool + + // If true, do not allow users to log in with temporary profiles. + TempProfileLogonBlocked bool + + // The maximum time, in seconds, to wait for the network transport to be available if a user has a roaming user profile. If the network is unavailable after this time has elapsed, the user is logged on, but the profile is not synchronized. + WaitForNetworkInSec uint16 + + // If true, wait for a remote user profile. + WaitForRemoteProfile bool +} + +func NewWin32_RoamingProfileMachineConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_RoamingProfileMachineConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileMachineConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_RoamingProfileMachineConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RoamingProfileMachineConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileMachineConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetAddAdminGroupToRUPEnabled sets the value of AddAdminGroupToRUPEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyAddAdminGroupToRUPEnabled(value bool) (err error) { + return instance.SetProperty("AddAdminGroupToRUPEnabled", (value)) +} + +// GetAddAdminGroupToRUPEnabled gets the value of AddAdminGroupToRUPEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyAddAdminGroupToRUPEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("AddAdminGroupToRUPEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAllowCrossForestUserPolicy sets the value of AllowCrossForestUserPolicy for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyAllowCrossForestUserPolicy(value bool) (err error) { + return instance.SetProperty("AllowCrossForestUserPolicy", (value)) +} + +// GetAllowCrossForestUserPolicy gets the value of AllowCrossForestUserPolicy for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyAllowCrossForestUserPolicy() (value bool, err error) { + retValue, err := instance.GetProperty("AllowCrossForestUserPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBackgroundUploadParams sets the value of BackgroundUploadParams for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyBackgroundUploadParams(value Win32_RoamingProfileBackgroundUploadParams) (err error) { + return instance.SetProperty("BackgroundUploadParams", (value)) +} + +// GetBackgroundUploadParams gets the value of BackgroundUploadParams for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyBackgroundUploadParams() (value Win32_RoamingProfileBackgroundUploadParams, err error) { + retValue, err := instance.GetProperty("BackgroundUploadParams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_RoamingProfileBackgroundUploadParams) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_RoamingProfileBackgroundUploadParams is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_RoamingProfileBackgroundUploadParams(valuetmp) + + return +} + +// SetDeleteProfilesOlderDays sets the value of DeleteProfilesOlderDays for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyDeleteProfilesOlderDays(value uint16) (err error) { + return instance.SetProperty("DeleteProfilesOlderDays", (value)) +} + +// GetDeleteProfilesOlderDays gets the value of DeleteProfilesOlderDays for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyDeleteProfilesOlderDays() (value uint16, err error) { + retValue, err := instance.GetProperty("DeleteProfilesOlderDays") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDeleteRoamingCacheEnabled sets the value of DeleteRoamingCacheEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyDeleteRoamingCacheEnabled(value bool) (err error) { + return instance.SetProperty("DeleteRoamingCacheEnabled", (value)) +} + +// GetDeleteRoamingCacheEnabled gets the value of DeleteRoamingCacheEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyDeleteRoamingCacheEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("DeleteRoamingCacheEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDetectSlowLinkDisabled sets the value of DetectSlowLinkDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyDetectSlowLinkDisabled(value bool) (err error) { + return instance.SetProperty("DetectSlowLinkDisabled", (value)) +} + +// GetDetectSlowLinkDisabled gets the value of DetectSlowLinkDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyDetectSlowLinkDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("DetectSlowLinkDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetForceUnloadDisabled sets the value of ForceUnloadDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyForceUnloadDisabled(value bool) (err error) { + return instance.SetProperty("ForceUnloadDisabled", (value)) +} + +// GetForceUnloadDisabled gets the value of ForceUnloadDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyForceUnloadDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("ForceUnloadDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsConfiguredByWMI sets the value of IsConfiguredByWMI for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyIsConfiguredByWMI(value bool) (err error) { + return instance.SetProperty("IsConfiguredByWMI", (value)) +} + +// GetIsConfiguredByWMI gets the value of IsConfiguredByWMI for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyIsConfiguredByWMI() (value bool, err error) { + retValue, err := instance.GetProperty("IsConfiguredByWMI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMachineProfilePath sets the value of MachineProfilePath for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyMachineProfilePath(value string) (err error) { + return instance.SetProperty("MachineProfilePath", (value)) +} + +// GetMachineProfilePath gets the value of MachineProfilePath for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyMachineProfilePath() (value string, err error) { + retValue, err := instance.GetProperty("MachineProfilePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOnlyAllowLocalProfiles sets the value of OnlyAllowLocalProfiles for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyOnlyAllowLocalProfiles(value bool) (err error) { + return instance.SetProperty("OnlyAllowLocalProfiles", (value)) +} + +// GetOnlyAllowLocalProfiles gets the value of OnlyAllowLocalProfiles for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyOnlyAllowLocalProfiles() (value bool, err error) { + retValue, err := instance.GetProperty("OnlyAllowLocalProfiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOwnerCheckDisabled sets the value of OwnerCheckDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyOwnerCheckDisabled(value bool) (err error) { + return instance.SetProperty("OwnerCheckDisabled", (value)) +} + +// GetOwnerCheckDisabled gets the value of OwnerCheckDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyOwnerCheckDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("OwnerCheckDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPrimaryComputerEnabled sets the value of PrimaryComputerEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyPrimaryComputerEnabled(value bool) (err error) { + return instance.SetProperty("PrimaryComputerEnabled", (value)) +} + +// GetPrimaryComputerEnabled gets the value of PrimaryComputerEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyPrimaryComputerEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("PrimaryComputerEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProfileUploadDisabled sets the value of ProfileUploadDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyProfileUploadDisabled(value bool) (err error) { + return instance.SetProperty("ProfileUploadDisabled", (value)) +} + +// GetProfileUploadDisabled gets the value of ProfileUploadDisabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyProfileUploadDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("ProfileUploadDisabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlowLinkTimeOutParams sets the value of SlowLinkTimeOutParams for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertySlowLinkTimeOutParams(value Win32_RoamingProfileSlowLinkParams) (err error) { + return instance.SetProperty("SlowLinkTimeOutParams", (value)) +} + +// GetSlowLinkTimeOutParams gets the value of SlowLinkTimeOutParams for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertySlowLinkTimeOutParams() (value Win32_RoamingProfileSlowLinkParams, err error) { + retValue, err := instance.GetProperty("SlowLinkTimeOutParams") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_RoamingProfileSlowLinkParams) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_RoamingProfileSlowLinkParams is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_RoamingProfileSlowLinkParams(valuetmp) + + return +} + +// SetSlowLinkUIEnabled sets the value of SlowLinkUIEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertySlowLinkUIEnabled(value bool) (err error) { + return instance.SetProperty("SlowLinkUIEnabled", (value)) +} + +// GetSlowLinkUIEnabled gets the value of SlowLinkUIEnabled for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertySlowLinkUIEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("SlowLinkUIEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTempProfileLogonBlocked sets the value of TempProfileLogonBlocked for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyTempProfileLogonBlocked(value bool) (err error) { + return instance.SetProperty("TempProfileLogonBlocked", (value)) +} + +// GetTempProfileLogonBlocked gets the value of TempProfileLogonBlocked for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyTempProfileLogonBlocked() (value bool, err error) { + retValue, err := instance.GetProperty("TempProfileLogonBlocked") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetWaitForNetworkInSec sets the value of WaitForNetworkInSec for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyWaitForNetworkInSec(value uint16) (err error) { + return instance.SetProperty("WaitForNetworkInSec", (value)) +} + +// GetWaitForNetworkInSec gets the value of WaitForNetworkInSec for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyWaitForNetworkInSec() (value uint16, err error) { + retValue, err := instance.GetProperty("WaitForNetworkInSec") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWaitForRemoteProfile sets the value of WaitForRemoteProfile for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) SetPropertyWaitForRemoteProfile(value bool) (err error) { + return instance.SetProperty("WaitForRemoteProfile", (value)) +} + +// GetWaitForRemoteProfile gets the value of WaitForRemoteProfile for the instance +func (instance *Win32_RoamingProfileMachineConfiguration) GetPropertyWaitForRemoteProfile() (value bool, err error) { + retValue, err := instance.GetProperty("WaitForRemoteProfile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileSlowLinkParams.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileSlowLinkParams.go new file mode 100644 index 00000000..73d08d9e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileSlowLinkParams.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RoamingProfileSlowLinkParams struct +type Win32_RoamingProfileSlowLinkParams struct { + *cim.WmiInstance + + // The connection speed, in kilobytes per second (kbps). This threshold is used to determine if the connection is a slow link. If the server's transfer rate in kbps is less than this threshold, the connection is considered to be slow. This property applies to IP networks. + ConnectionTransferRate uint32 + + // The slow-network connection timeout, in milliseconds. This threshold is used to determine if the connection is a slow link. If the delay in milliseconds is greater than this threshold, the connection is considered to be slow. This property applies to non-IP networks. + TimeOut uint16 +} + +func NewWin32_RoamingProfileSlowLinkParamsEx1(instance *cim.WmiInstance) (newInstance *Win32_RoamingProfileSlowLinkParams, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileSlowLinkParams{ + WmiInstance: tmp, + } + return +} + +func NewWin32_RoamingProfileSlowLinkParamsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RoamingProfileSlowLinkParams, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileSlowLinkParams{ + WmiInstance: tmp, + } + return +} + +// SetConnectionTransferRate sets the value of ConnectionTransferRate for the instance +func (instance *Win32_RoamingProfileSlowLinkParams) SetPropertyConnectionTransferRate(value uint32) (err error) { + return instance.SetProperty("ConnectionTransferRate", (value)) +} + +// GetConnectionTransferRate gets the value of ConnectionTransferRate for the instance +func (instance *Win32_RoamingProfileSlowLinkParams) GetPropertyConnectionTransferRate() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionTransferRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimeOut sets the value of TimeOut for the instance +func (instance *Win32_RoamingProfileSlowLinkParams) SetPropertyTimeOut(value uint16) (err error) { + return instance.SetProperty("TimeOut", (value)) +} + +// GetTimeOut gets the value of TimeOut for the instance +func (instance *Win32_RoamingProfileSlowLinkParams) GetPropertyTimeOut() (value uint16, err error) { + retValue, err := instance.GetProperty("TimeOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileUserConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileUserConfiguration.go new file mode 100644 index 00000000..0d364014 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingProfileUserConfiguration.go @@ -0,0 +1,143 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RoamingProfileUserConfiguration struct +type Win32_RoamingProfileUserConfiguration struct { + *cim.WmiInstance + + // An array of strings containing network directories to synchronize at when the user logs on to or off of a local computer. + DirectoriesToSyncAtLogonLogoff []string + + // An array of strings containing directories to exclude from the roaming profile. + ExcludedProfileDirs []string + + // Indicates if the settings configured through this WMI class are taking affect. + IsConfiguredByWMI bool +} + +func NewWin32_RoamingProfileUserConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_RoamingProfileUserConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileUserConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_RoamingProfileUserConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RoamingProfileUserConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RoamingProfileUserConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetDirectoriesToSyncAtLogonLogoff sets the value of DirectoriesToSyncAtLogonLogoff for the instance +func (instance *Win32_RoamingProfileUserConfiguration) SetPropertyDirectoriesToSyncAtLogonLogoff(value []string) (err error) { + return instance.SetProperty("DirectoriesToSyncAtLogonLogoff", (value)) +} + +// GetDirectoriesToSyncAtLogonLogoff gets the value of DirectoriesToSyncAtLogonLogoff for the instance +func (instance *Win32_RoamingProfileUserConfiguration) GetPropertyDirectoriesToSyncAtLogonLogoff() (value []string, err error) { + retValue, err := instance.GetProperty("DirectoriesToSyncAtLogonLogoff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetExcludedProfileDirs sets the value of ExcludedProfileDirs for the instance +func (instance *Win32_RoamingProfileUserConfiguration) SetPropertyExcludedProfileDirs(value []string) (err error) { + return instance.SetProperty("ExcludedProfileDirs", (value)) +} + +// GetExcludedProfileDirs gets the value of ExcludedProfileDirs for the instance +func (instance *Win32_RoamingProfileUserConfiguration) GetPropertyExcludedProfileDirs() (value []string, err error) { + retValue, err := instance.GetProperty("ExcludedProfileDirs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIsConfiguredByWMI sets the value of IsConfiguredByWMI for the instance +func (instance *Win32_RoamingProfileUserConfiguration) SetPropertyIsConfiguredByWMI(value bool) (err error) { + return instance.SetProperty("IsConfiguredByWMI", (value)) +} + +// GetIsConfiguredByWMI gets the value of IsConfiguredByWMI for the instance +func (instance *Win32_RoamingProfileUserConfiguration) GetPropertyIsConfiguredByWMI() (value bool, err error) { + retValue, err := instance.GetProperty("IsConfiguredByWMI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingUserHealthConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingUserHealthConfiguration.go new file mode 100644 index 00000000..d0bab405 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_RoamingUserHealthConfiguration.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_RoamingUserHealthConfiguration struct +type Win32_RoamingUserHealthConfiguration struct { + *cim.WmiInstance + + // Configure how the Win32_UserProfile::HealthStatus property should reflect the use of temporary profiles. + HealthStatusForTempProfiles RoamingUserHealthConfiguration_HealthStatusForTempProfiles + + // This is the time threshold, in hours, after which the profile health is reported as Caution when the profile has not been downloaded yet + LastProfileDownloadIntervalCautionInHours uint16 + + // This is the time threshold, in hours, after which the profile health is reported as Unhealthy when the profile has not been uploaded yet + LastProfileDownloadIntervalUnhealthyInHours uint16 + + // This is the time threshold, in hours, after which the profile health is reported as Caution when the profile has not been uploaded yet + LastProfileUploadIntervalCautionInHours uint16 + + // This is the time threshold, in hours, after which the profile health is reported as Unhealthy when the profile has not been downloaded yet + LastProfileUploadIntervalUnhealthyInHours uint16 +} + +func NewWin32_RoamingUserHealthConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_RoamingUserHealthConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_RoamingUserHealthConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewWin32_RoamingUserHealthConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_RoamingUserHealthConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_RoamingUserHealthConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetHealthStatusForTempProfiles sets the value of HealthStatusForTempProfiles for the instance +func (instance *Win32_RoamingUserHealthConfiguration) SetPropertyHealthStatusForTempProfiles(value RoamingUserHealthConfiguration_HealthStatusForTempProfiles) (err error) { + return instance.SetProperty("HealthStatusForTempProfiles", (value)) +} + +// GetHealthStatusForTempProfiles gets the value of HealthStatusForTempProfiles for the instance +func (instance *Win32_RoamingUserHealthConfiguration) GetPropertyHealthStatusForTempProfiles() (value RoamingUserHealthConfiguration_HealthStatusForTempProfiles, err error) { + retValue, err := instance.GetProperty("HealthStatusForTempProfiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = RoamingUserHealthConfiguration_HealthStatusForTempProfiles(valuetmp) + + return +} + +// SetLastProfileDownloadIntervalCautionInHours sets the value of LastProfileDownloadIntervalCautionInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) SetPropertyLastProfileDownloadIntervalCautionInHours(value uint16) (err error) { + return instance.SetProperty("LastProfileDownloadIntervalCautionInHours", (value)) +} + +// GetLastProfileDownloadIntervalCautionInHours gets the value of LastProfileDownloadIntervalCautionInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) GetPropertyLastProfileDownloadIntervalCautionInHours() (value uint16, err error) { + retValue, err := instance.GetProperty("LastProfileDownloadIntervalCautionInHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLastProfileDownloadIntervalUnhealthyInHours sets the value of LastProfileDownloadIntervalUnhealthyInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) SetPropertyLastProfileDownloadIntervalUnhealthyInHours(value uint16) (err error) { + return instance.SetProperty("LastProfileDownloadIntervalUnhealthyInHours", (value)) +} + +// GetLastProfileDownloadIntervalUnhealthyInHours gets the value of LastProfileDownloadIntervalUnhealthyInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) GetPropertyLastProfileDownloadIntervalUnhealthyInHours() (value uint16, err error) { + retValue, err := instance.GetProperty("LastProfileDownloadIntervalUnhealthyInHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLastProfileUploadIntervalCautionInHours sets the value of LastProfileUploadIntervalCautionInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) SetPropertyLastProfileUploadIntervalCautionInHours(value uint16) (err error) { + return instance.SetProperty("LastProfileUploadIntervalCautionInHours", (value)) +} + +// GetLastProfileUploadIntervalCautionInHours gets the value of LastProfileUploadIntervalCautionInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) GetPropertyLastProfileUploadIntervalCautionInHours() (value uint16, err error) { + retValue, err := instance.GetProperty("LastProfileUploadIntervalCautionInHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLastProfileUploadIntervalUnhealthyInHours sets the value of LastProfileUploadIntervalUnhealthyInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) SetPropertyLastProfileUploadIntervalUnhealthyInHours(value uint16) (err error) { + return instance.SetProperty("LastProfileUploadIntervalUnhealthyInHours", (value)) +} + +// GetLastProfileUploadIntervalUnhealthyInHours gets the value of LastProfileUploadIntervalUnhealthyInHours for the instance +func (instance *Win32_RoamingUserHealthConfiguration) GetPropertyLastProfileUploadIntervalUnhealthyInHours() (value uint16, err error) { + retValue, err := instance.GetProperty("LastProfileUploadIntervalUnhealthyInHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIController.go new file mode 100644 index 00000000..bd5e134c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIController.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SCSIController struct +type Win32_SCSIController struct { + *CIM_SCSIController + + // + DeviceMap string + + // + DriverName string + + // + HardwareVersion string + + // + Index uint32 + + // + Manufacturer string +} + +func NewWin32_SCSIControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_SCSIController, err error) { + tmp, err := NewCIM_SCSIControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SCSIController{ + CIM_SCSIController: tmp, + } + return +} + +func NewWin32_SCSIControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SCSIController, err error) { + tmp, err := NewCIM_SCSIControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SCSIController{ + CIM_SCSIController: tmp, + } + return +} + +// SetDeviceMap sets the value of DeviceMap for the instance +func (instance *Win32_SCSIController) SetPropertyDeviceMap(value string) (err error) { + return instance.SetProperty("DeviceMap", (value)) +} + +// GetDeviceMap gets the value of DeviceMap for the instance +func (instance *Win32_SCSIController) GetPropertyDeviceMap() (value string, err error) { + retValue, err := instance.GetProperty("DeviceMap") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverName sets the value of DriverName for the instance +func (instance *Win32_SCSIController) SetPropertyDriverName(value string) (err error) { + return instance.SetProperty("DriverName", (value)) +} + +// GetDriverName gets the value of DriverName for the instance +func (instance *Win32_SCSIController) GetPropertyDriverName() (value string, err error) { + retValue, err := instance.GetProperty("DriverName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHardwareVersion sets the value of HardwareVersion for the instance +func (instance *Win32_SCSIController) SetPropertyHardwareVersion(value string) (err error) { + return instance.SetProperty("HardwareVersion", (value)) +} + +// GetHardwareVersion gets the value of HardwareVersion for the instance +func (instance *Win32_SCSIController) GetPropertyHardwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("HardwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndex sets the value of Index for the instance +func (instance *Win32_SCSIController) SetPropertyIndex(value uint32) (err error) { + return instance.SetProperty("Index", (value)) +} + +// GetIndex gets the value of Index for the instance +func (instance *Win32_SCSIController) GetPropertyIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("Index") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_SCSIController) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_SCSIController) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIControllerDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIControllerDevice.go new file mode 100644 index 00000000..ad370f5b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SCSIControllerDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SCSIControllerDevice struct +type Win32_SCSIControllerDevice struct { + *CIM_ControlledBy +} + +func NewWin32_SCSIControllerDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_SCSIControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SCSIControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} + +func NewWin32_SCSIControllerDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SCSIControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SCSIControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SID.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SID.go new file mode 100644 index 00000000..d87e06d0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SID.go @@ -0,0 +1,202 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SID struct +type Win32_SID struct { + *cim.WmiInstance + + // + AccountName string + + // + BinaryRepresentation []uint8 + + // + ReferencedDomainName string + + // + SID string + + // + SidLength uint32 +} + +func NewWin32_SIDEx1(instance *cim.WmiInstance) (newInstance *Win32_SID, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SID{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SIDEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SID, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SID{ + WmiInstance: tmp, + } + return +} + +// SetAccountName sets the value of AccountName for the instance +func (instance *Win32_SID) SetPropertyAccountName(value string) (err error) { + return instance.SetProperty("AccountName", (value)) +} + +// GetAccountName gets the value of AccountName for the instance +func (instance *Win32_SID) GetPropertyAccountName() (value string, err error) { + retValue, err := instance.GetProperty("AccountName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBinaryRepresentation sets the value of BinaryRepresentation for the instance +func (instance *Win32_SID) SetPropertyBinaryRepresentation(value []uint8) (err error) { + return instance.SetProperty("BinaryRepresentation", (value)) +} + +// GetBinaryRepresentation gets the value of BinaryRepresentation for the instance +func (instance *Win32_SID) GetPropertyBinaryRepresentation() (value []uint8, err error) { + retValue, err := instance.GetProperty("BinaryRepresentation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetReferencedDomainName sets the value of ReferencedDomainName for the instance +func (instance *Win32_SID) SetPropertyReferencedDomainName(value string) (err error) { + return instance.SetProperty("ReferencedDomainName", (value)) +} + +// GetReferencedDomainName gets the value of ReferencedDomainName for the instance +func (instance *Win32_SID) GetPropertyReferencedDomainName() (value string, err error) { + retValue, err := instance.GetProperty("ReferencedDomainName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSID sets the value of SID for the instance +func (instance *Win32_SID) SetPropertySID(value string) (err error) { + return instance.SetProperty("SID", (value)) +} + +// GetSID gets the value of SID for the instance +func (instance *Win32_SID) GetPropertySID() (value string, err error) { + retValue, err := instance.GetProperty("SID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSidLength sets the value of SidLength for the instance +func (instance *Win32_SID) SetPropertySidLength(value uint32) (err error) { + return instance.SetProperty("SidLength", (value)) +} + +// GetSidLength gets the value of SidLength for the instance +func (instance *Win32_SID) GetPropertySidLength() (value uint32, err error) { + retValue, err := instance.GetProperty("SidLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SIDandAttributes.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SIDandAttributes.go new file mode 100644 index 00000000..da10e9c6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SIDandAttributes.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SIDandAttributes struct +type Win32_SIDandAttributes struct { + *cim.WmiInstance + + // + Attributes uint32 + + // + SID Win32_SID +} + +func NewWin32_SIDandAttributesEx1(instance *cim.WmiInstance) (newInstance *Win32_SIDandAttributes, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SIDandAttributes{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SIDandAttributesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SIDandAttributes, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SIDandAttributes{ + WmiInstance: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_SIDandAttributes) SetPropertyAttributes(value uint32) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_SIDandAttributes) GetPropertyAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSID sets the value of SID for the instance +func (instance *Win32_SIDandAttributes) SetPropertySID(value Win32_SID) (err error) { + return instance.SetProperty("SID", (value)) +} + +// GetSID gets the value of SID for the instance +func (instance *Win32_SIDandAttributes) GetPropertySID() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("SID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SMBIOSMemory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SMBIOSMemory.go new file mode 100644 index 00000000..f93d184c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SMBIOSMemory.go @@ -0,0 +1,472 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SMBIOSMemory struct +type Win32_SMBIOSMemory struct { + *CIM_StorageExtent + + // + AdditionalErrorData []uint8 + + // + CorrectableError bool + + // + EndingAddress uint64 + + // + ErrorAccess uint16 + + // + ErrorAddress uint64 + + // + ErrorData []uint8 + + // + ErrorDataOrder uint16 + + // + ErrorInfo uint16 + + // + ErrorResolution uint64 + + // + ErrorTime string + + // + ErrorTransferSize uint32 + + // + OtherErrorDescription string + + // + StartingAddress uint64 + + // + SystemLevelAddress bool +} + +func NewWin32_SMBIOSMemoryEx1(instance *cim.WmiInstance) (newInstance *Win32_SMBIOSMemory, err error) { + tmp, err := NewCIM_StorageExtentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SMBIOSMemory{ + CIM_StorageExtent: tmp, + } + return +} + +func NewWin32_SMBIOSMemoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SMBIOSMemory, err error) { + tmp, err := NewCIM_StorageExtentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SMBIOSMemory{ + CIM_StorageExtent: tmp, + } + return +} + +// SetAdditionalErrorData sets the value of AdditionalErrorData for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyAdditionalErrorData(value []uint8) (err error) { + return instance.SetProperty("AdditionalErrorData", (value)) +} + +// GetAdditionalErrorData gets the value of AdditionalErrorData for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyAdditionalErrorData() (value []uint8, err error) { + retValue, err := instance.GetProperty("AdditionalErrorData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetCorrectableError sets the value of CorrectableError for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyCorrectableError(value bool) (err error) { + return instance.SetProperty("CorrectableError", (value)) +} + +// GetCorrectableError gets the value of CorrectableError for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyCorrectableError() (value bool, err error) { + retValue, err := instance.GetProperty("CorrectableError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEndingAddress sets the value of EndingAddress for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyEndingAddress(value uint64) (err error) { + return instance.SetProperty("EndingAddress", (value)) +} + +// GetEndingAddress gets the value of EndingAddress for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyEndingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("EndingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorAccess sets the value of ErrorAccess for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorAccess(value uint16) (err error) { + return instance.SetProperty("ErrorAccess", (value)) +} + +// GetErrorAccess gets the value of ErrorAccess for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorAccess() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorAccess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorAddress sets the value of ErrorAddress for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorAddress(value uint64) (err error) { + return instance.SetProperty("ErrorAddress", (value)) +} + +// GetErrorAddress gets the value of ErrorAddress for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorData sets the value of ErrorData for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorData(value []uint8) (err error) { + return instance.SetProperty("ErrorData", (value)) +} + +// GetErrorData gets the value of ErrorData for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorData() (value []uint8, err error) { + retValue, err := instance.GetProperty("ErrorData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetErrorDataOrder sets the value of ErrorDataOrder for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorDataOrder(value uint16) (err error) { + return instance.SetProperty("ErrorDataOrder", (value)) +} + +// GetErrorDataOrder gets the value of ErrorDataOrder for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorDataOrder() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorDataOrder") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorInfo sets the value of ErrorInfo for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorInfo(value uint16) (err error) { + return instance.SetProperty("ErrorInfo", (value)) +} + +// GetErrorInfo gets the value of ErrorInfo for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorInfo() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorResolution sets the value of ErrorResolution for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorResolution(value uint64) (err error) { + return instance.SetProperty("ErrorResolution", (value)) +} + +// GetErrorResolution gets the value of ErrorResolution for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorResolution() (value uint64, err error) { + retValue, err := instance.GetProperty("ErrorResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetErrorTime sets the value of ErrorTime for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorTime(value string) (err error) { + return instance.SetProperty("ErrorTime", (value)) +} + +// GetErrorTime gets the value of ErrorTime for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorTime() (value string, err error) { + retValue, err := instance.GetProperty("ErrorTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorTransferSize sets the value of ErrorTransferSize for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyErrorTransferSize(value uint32) (err error) { + return instance.SetProperty("ErrorTransferSize", (value)) +} + +// GetErrorTransferSize gets the value of ErrorTransferSize for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyErrorTransferSize() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorTransferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOtherErrorDescription sets the value of OtherErrorDescription for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyOtherErrorDescription(value string) (err error) { + return instance.SetProperty("OtherErrorDescription", (value)) +} + +// GetOtherErrorDescription gets the value of OtherErrorDescription for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyOtherErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartingAddress sets the value of StartingAddress for the instance +func (instance *Win32_SMBIOSMemory) SetPropertyStartingAddress(value uint64) (err error) { + return instance.SetProperty("StartingAddress", (value)) +} + +// GetStartingAddress gets the value of StartingAddress for the instance +func (instance *Win32_SMBIOSMemory) GetPropertyStartingAddress() (value uint64, err error) { + retValue, err := instance.GetProperty("StartingAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSystemLevelAddress sets the value of SystemLevelAddress for the instance +func (instance *Win32_SMBIOSMemory) SetPropertySystemLevelAddress(value bool) (err error) { + return instance.SetProperty("SystemLevelAddress", (value)) +} + +// GetSystemLevelAddress gets the value of SystemLevelAddress for the instance +func (instance *Win32_SMBIOSMemory) GetPropertySystemLevelAddress() (value bool, err error) { + retValue, err := instance.GetProperty("SystemLevelAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ScheduledJob.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ScheduledJob.go new file mode 100644 index 00000000..46cfc734 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ScheduledJob.go @@ -0,0 +1,271 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ScheduledJob struct +type Win32_ScheduledJob struct { + *CIM_Job + + // + Command string + + // + DaysOfMonth uint32 + + // + DaysOfWeek uint32 + + // + InteractWithDesktop bool + + // + JobId uint32 + + // + RunRepeatedly bool +} + +func NewWin32_ScheduledJobEx1(instance *cim.WmiInstance) (newInstance *Win32_ScheduledJob, err error) { + tmp, err := NewCIM_JobEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ScheduledJob{ + CIM_Job: tmp, + } + return +} + +func NewWin32_ScheduledJobEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ScheduledJob, err error) { + tmp, err := NewCIM_JobEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ScheduledJob{ + CIM_Job: tmp, + } + return +} + +// SetCommand sets the value of Command for the instance +func (instance *Win32_ScheduledJob) SetPropertyCommand(value string) (err error) { + return instance.SetProperty("Command", (value)) +} + +// GetCommand gets the value of Command for the instance +func (instance *Win32_ScheduledJob) GetPropertyCommand() (value string, err error) { + retValue, err := instance.GetProperty("Command") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDaysOfMonth sets the value of DaysOfMonth for the instance +func (instance *Win32_ScheduledJob) SetPropertyDaysOfMonth(value uint32) (err error) { + return instance.SetProperty("DaysOfMonth", (value)) +} + +// GetDaysOfMonth gets the value of DaysOfMonth for the instance +func (instance *Win32_ScheduledJob) GetPropertyDaysOfMonth() (value uint32, err error) { + retValue, err := instance.GetProperty("DaysOfMonth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaysOfWeek sets the value of DaysOfWeek for the instance +func (instance *Win32_ScheduledJob) SetPropertyDaysOfWeek(value uint32) (err error) { + return instance.SetProperty("DaysOfWeek", (value)) +} + +// GetDaysOfWeek gets the value of DaysOfWeek for the instance +func (instance *Win32_ScheduledJob) GetPropertyDaysOfWeek() (value uint32, err error) { + retValue, err := instance.GetProperty("DaysOfWeek") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInteractWithDesktop sets the value of InteractWithDesktop for the instance +func (instance *Win32_ScheduledJob) SetPropertyInteractWithDesktop(value bool) (err error) { + return instance.SetProperty("InteractWithDesktop", (value)) +} + +// GetInteractWithDesktop gets the value of InteractWithDesktop for the instance +func (instance *Win32_ScheduledJob) GetPropertyInteractWithDesktop() (value bool, err error) { + retValue, err := instance.GetProperty("InteractWithDesktop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetJobId sets the value of JobId for the instance +func (instance *Win32_ScheduledJob) SetPropertyJobId(value uint32) (err error) { + return instance.SetProperty("JobId", (value)) +} + +// GetJobId gets the value of JobId for the instance +func (instance *Win32_ScheduledJob) GetPropertyJobId() (value uint32, err error) { + retValue, err := instance.GetProperty("JobId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRunRepeatedly sets the value of RunRepeatedly for the instance +func (instance *Win32_ScheduledJob) SetPropertyRunRepeatedly(value bool) (err error) { + return instance.SetProperty("RunRepeatedly", (value)) +} + +// GetRunRepeatedly gets the value of RunRepeatedly for the instance +func (instance *Win32_ScheduledJob) GetPropertyRunRepeatedly() (value bool, err error) { + retValue, err := instance.GetProperty("RunRepeatedly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +// +// +// +// +// + +// +// +func (instance *Win32_ScheduledJob) Create( /* IN */ Command string, + /* IN */ StartTime string, + /* OPTIONAL IN */ RunRepeatedly bool, + /* OPTIONAL IN */ DaysOfWeek uint32, + /* OPTIONAL IN */ DaysOfMonth uint32, + /* OPTIONAL IN */ InteractWithDesktop bool, + /* OUT */ JobId uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Create", Command, StartTime, RunRepeatedly, DaysOfWeek, DaysOfMonth, InteractWithDesktop) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +func (instance *Win32_ScheduledJob) Delete() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Delete") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptor.go new file mode 100644 index 00000000..45057822 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SecurityDescriptor struct +type Win32_SecurityDescriptor struct { + *__SecurityDescriptor +} + +func NewWin32_SecurityDescriptorEx1(instance *cim.WmiInstance) (newInstance *Win32_SecurityDescriptor, err error) { + tmp, err := New__SecurityDescriptorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SecurityDescriptor{ + __SecurityDescriptor: tmp, + } + return +} + +func NewWin32_SecurityDescriptorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecurityDescriptor, err error) { + tmp, err := New__SecurityDescriptorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecurityDescriptor{ + __SecurityDescriptor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptorHelper.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptorHelper.go new file mode 100644 index 00000000..2dba21b5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecurityDescriptorHelper.go @@ -0,0 +1,157 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SecurityDescriptorHelper struct +type Win32_SecurityDescriptorHelper struct { + *cim.WmiInstance +} + +func NewWin32_SecurityDescriptorHelperEx1(instance *cim.WmiInstance) (newInstance *Win32_SecurityDescriptorHelper, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SecurityDescriptorHelper{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SecurityDescriptorHelperEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecurityDescriptorHelper, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecurityDescriptorHelper{ + WmiInstance: tmp, + } + return +} + +// + +// + +// +// +func (instance *Win32_SecurityDescriptorHelper) Win32SDToSDDL( /* IN */ Descriptor __SecurityDescriptor, + /* OUT */ SDDL string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Win32SDToSDDL", Descriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *Win32_SecurityDescriptorHelper) Win32SDToBinarySD( /* IN */ Descriptor __SecurityDescriptor, + /* OUT */ BinarySD []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Win32SDToBinarySD", Descriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *Win32_SecurityDescriptorHelper) SDDLToWin32SD( /* IN */ SDDL string, + /* OUT */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SDDLToWin32SD", SDDL) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *Win32_SecurityDescriptorHelper) SDDLToBinarySD( /* IN */ SDDL string, + /* OUT */ BinarySD []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SDDLToBinarySD", SDDL) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *Win32_SecurityDescriptorHelper) BinarySDToWin32SD( /* IN */ BinarySD []uint8, + /* OUT */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("BinarySDToWin32SD", BinarySD) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *Win32_SecurityDescriptorHelper) BinarySDToSDDL( /* IN */ BinarySD []uint8, + /* OUT */ SDDL string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("BinarySDToSDDL", BinarySD) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySetting.go new file mode 100644 index 00000000..2d1f8837 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySetting.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SecuritySetting struct +type Win32_SecuritySetting struct { + *CIM_Setting + + // + ControlFlags uint32 +} + +func NewWin32_SecuritySettingEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SecuritySetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_SecuritySettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySetting{ + CIM_Setting: tmp, + } + return +} + +// SetControlFlags sets the value of ControlFlags for the instance +func (instance *Win32_SecuritySetting) SetPropertyControlFlags(value uint32) (err error) { + return instance.SetProperty("ControlFlags", (value)) +} + +// GetControlFlags gets the value of ControlFlags for the instance +func (instance *Win32_SecuritySetting) GetPropertyControlFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("ControlFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// +func (instance *Win32_SecuritySetting) GetSecurityDescriptor( /* OUT */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_SecuritySetting) SetSecurityDescriptor( /* IN */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAccess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAccess.go new file mode 100644 index 00000000..523c8e9f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAccess.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SecuritySettingAccess struct +type Win32_SecuritySettingAccess struct { + *cim.WmiInstance + + // + AccessMask uint32 + + // + GuidInheritedObjectType string + + // + GuidObjectType string + + // + Inheritance uint32 + + // + SecuritySetting Win32_SecuritySetting + + // + Trustee Win32_SID + + // + Type uint32 +} + +func NewWin32_SecuritySettingAccessEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingAccess, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingAccess{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SecuritySettingAccessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingAccess, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingAccess{ + WmiInstance: tmp, + } + return +} + +// SetAccessMask sets the value of AccessMask for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertyAccessMask(value uint32) (err error) { + return instance.SetProperty("AccessMask", (value)) +} + +// GetAccessMask gets the value of AccessMask for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertyAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGuidInheritedObjectType sets the value of GuidInheritedObjectType for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertyGuidInheritedObjectType(value string) (err error) { + return instance.SetProperty("GuidInheritedObjectType", (value)) +} + +// GetGuidInheritedObjectType gets the value of GuidInheritedObjectType for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertyGuidInheritedObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidInheritedObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetGuidObjectType sets the value of GuidObjectType for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertyGuidObjectType(value string) (err error) { + return instance.SetProperty("GuidObjectType", (value)) +} + +// GetGuidObjectType gets the value of GuidObjectType for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertyGuidObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInheritance sets the value of Inheritance for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertyInheritance(value uint32) (err error) { + return instance.SetProperty("Inheritance", (value)) +} + +// GetInheritance gets the value of Inheritance for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertyInheritance() (value uint32, err error) { + retValue, err := instance.GetProperty("Inheritance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecuritySetting sets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertySecuritySetting(value Win32_SecuritySetting) (err error) { + return instance.SetProperty("SecuritySetting", (value)) +} + +// GetSecuritySetting gets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertySecuritySetting() (value Win32_SecuritySetting, err error) { + retValue, err := instance.GetProperty("SecuritySetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SecuritySetting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SecuritySetting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SecuritySetting(valuetmp) + + return +} + +// SetTrustee sets the value of Trustee for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertyTrustee(value Win32_SID) (err error) { + return instance.SetProperty("Trustee", (value)) +} + +// GetTrustee gets the value of Trustee for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertyTrustee() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Trustee") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_SecuritySettingAccess) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_SecuritySettingAccess) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAuditing.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAuditing.go new file mode 100644 index 00000000..1c0c64e4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingAuditing.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SecuritySettingAuditing struct +type Win32_SecuritySettingAuditing struct { + *cim.WmiInstance + + // + AuditedAccessMask uint32 + + // + GuidInheritedObjectType string + + // + GuidObjectType string + + // + Inheritance uint32 + + // + SecuritySetting Win32_SecuritySetting + + // + Trustee Win32_SID + + // + Type uint32 +} + +func NewWin32_SecuritySettingAuditingEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingAuditing, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingAuditing{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SecuritySettingAuditingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingAuditing, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingAuditing{ + WmiInstance: tmp, + } + return +} + +// SetAuditedAccessMask sets the value of AuditedAccessMask for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertyAuditedAccessMask(value uint32) (err error) { + return instance.SetProperty("AuditedAccessMask", (value)) +} + +// GetAuditedAccessMask gets the value of AuditedAccessMask for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertyAuditedAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AuditedAccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGuidInheritedObjectType sets the value of GuidInheritedObjectType for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertyGuidInheritedObjectType(value string) (err error) { + return instance.SetProperty("GuidInheritedObjectType", (value)) +} + +// GetGuidInheritedObjectType gets the value of GuidInheritedObjectType for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertyGuidInheritedObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidInheritedObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetGuidObjectType sets the value of GuidObjectType for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertyGuidObjectType(value string) (err error) { + return instance.SetProperty("GuidObjectType", (value)) +} + +// GetGuidObjectType gets the value of GuidObjectType for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertyGuidObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInheritance sets the value of Inheritance for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertyInheritance(value uint32) (err error) { + return instance.SetProperty("Inheritance", (value)) +} + +// GetInheritance gets the value of Inheritance for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertyInheritance() (value uint32, err error) { + retValue, err := instance.GetProperty("Inheritance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSecuritySetting sets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertySecuritySetting(value Win32_SecuritySetting) (err error) { + return instance.SetProperty("SecuritySetting", (value)) +} + +// GetSecuritySetting gets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertySecuritySetting() (value Win32_SecuritySetting, err error) { + retValue, err := instance.GetProperty("SecuritySetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SecuritySetting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SecuritySetting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SecuritySetting(valuetmp) + + return +} + +// SetTrustee sets the value of Trustee for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertyTrustee(value Win32_SID) (err error) { + return instance.SetProperty("Trustee", (value)) +} + +// GetTrustee gets the value of Trustee for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertyTrustee() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Trustee") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_SecuritySettingAuditing) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_SecuritySettingAuditing) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingGroup.go new file mode 100644 index 00000000..07fff7da --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingGroup.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SecuritySettingGroup struct +type Win32_SecuritySettingGroup struct { + *cim.WmiInstance + + // + Group Win32_SID + + // + SecuritySetting Win32_SecuritySetting +} + +func NewWin32_SecuritySettingGroupEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingGroup, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingGroup{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SecuritySettingGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingGroup, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingGroup{ + WmiInstance: tmp, + } + return +} + +// SetGroup sets the value of Group for the instance +func (instance *Win32_SecuritySettingGroup) SetPropertyGroup(value Win32_SID) (err error) { + return instance.SetProperty("Group", (value)) +} + +// GetGroup gets the value of Group for the instance +func (instance *Win32_SecuritySettingGroup) GetPropertyGroup() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Group") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} + +// SetSecuritySetting sets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingGroup) SetPropertySecuritySetting(value Win32_SecuritySetting) (err error) { + return instance.SetProperty("SecuritySetting", (value)) +} + +// GetSecuritySetting gets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingGroup) GetPropertySecuritySetting() (value Win32_SecuritySetting, err error) { + retValue, err := instance.GetProperty("SecuritySetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SecuritySetting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SecuritySetting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SecuritySetting(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalFile.go new file mode 100644 index 00000000..3e19e625 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalFile.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SecuritySettingOfLogicalFile struct +type Win32_SecuritySettingOfLogicalFile struct { + *Win32_SecuritySettingOfObject +} + +func NewWin32_SecuritySettingOfLogicalFileEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingOfLogicalFile, err error) { + tmp, err := NewWin32_SecuritySettingOfObjectEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOfLogicalFile{ + Win32_SecuritySettingOfObject: tmp, + } + return +} + +func NewWin32_SecuritySettingOfLogicalFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingOfLogicalFile, err error) { + tmp, err := NewWin32_SecuritySettingOfObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOfLogicalFile{ + Win32_SecuritySettingOfObject: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalShare.go new file mode 100644 index 00000000..751323f6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfLogicalShare.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SecuritySettingOfLogicalShare struct +type Win32_SecuritySettingOfLogicalShare struct { + *Win32_SecuritySettingOfObject +} + +func NewWin32_SecuritySettingOfLogicalShareEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingOfLogicalShare, err error) { + tmp, err := NewWin32_SecuritySettingOfObjectEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOfLogicalShare{ + Win32_SecuritySettingOfObject: tmp, + } + return +} + +func NewWin32_SecuritySettingOfLogicalShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingOfLogicalShare, err error) { + tmp, err := NewWin32_SecuritySettingOfObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOfLogicalShare{ + Win32_SecuritySettingOfObject: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfObject.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfObject.go new file mode 100644 index 00000000..cb5766a4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOfObject.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SecuritySettingOfObject struct +type Win32_SecuritySettingOfObject struct { + *CIM_ElementSetting +} + +func NewWin32_SecuritySettingOfObjectEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingOfObject, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOfObject{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_SecuritySettingOfObjectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingOfObject, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOfObject{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOwner.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOwner.go new file mode 100644 index 00000000..c81a2be5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SecuritySettingOwner.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SecuritySettingOwner struct +type Win32_SecuritySettingOwner struct { + *cim.WmiInstance + + // + Owner Win32_SID + + // + SecuritySetting Win32_SecuritySetting +} + +func NewWin32_SecuritySettingOwnerEx1(instance *cim.WmiInstance) (newInstance *Win32_SecuritySettingOwner, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOwner{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SecuritySettingOwnerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SecuritySettingOwner, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SecuritySettingOwner{ + WmiInstance: tmp, + } + return +} + +// SetOwner sets the value of Owner for the instance +func (instance *Win32_SecuritySettingOwner) SetPropertyOwner(value Win32_SID) (err error) { + return instance.SetProperty("Owner", (value)) +} + +// GetOwner gets the value of Owner for the instance +func (instance *Win32_SecuritySettingOwner) GetPropertyOwner() (value Win32_SID, err error) { + retValue, err := instance.GetProperty("Owner") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SID) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SID is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SID(valuetmp) + + return +} + +// SetSecuritySetting sets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingOwner) SetPropertySecuritySetting(value Win32_SecuritySetting) (err error) { + return instance.SetProperty("SecuritySetting", (value)) +} + +// GetSecuritySetting gets the value of SecuritySetting for the instance +func (instance *Win32_SecuritySettingOwner) GetPropertySecuritySetting() (value Win32_SecuritySetting, err error) { + retValue, err := instance.GetProperty("SecuritySetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SecuritySetting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SecuritySetting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SecuritySetting(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SelfRegModuleAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SelfRegModuleAction.go new file mode 100644 index 00000000..248a0ebc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SelfRegModuleAction.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SelfRegModuleAction struct +type Win32_SelfRegModuleAction struct { + *CIM_Action + + // + Cost uint16 + + // + File string +} + +func NewWin32_SelfRegModuleActionEx1(instance *cim.WmiInstance) (newInstance *Win32_SelfRegModuleAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SelfRegModuleAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_SelfRegModuleActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SelfRegModuleAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SelfRegModuleAction{ + CIM_Action: tmp, + } + return +} + +// SetCost sets the value of Cost for the instance +func (instance *Win32_SelfRegModuleAction) SetPropertyCost(value uint16) (err error) { + return instance.SetProperty("Cost", (value)) +} + +// GetCost gets the value of Cost for the instance +func (instance *Win32_SelfRegModuleAction) GetPropertyCost() (value uint16, err error) { + retValue, err := instance.GetProperty("Cost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFile sets the value of File for the instance +func (instance *Win32_SelfRegModuleAction) SetPropertyFile(value string) (err error) { + return instance.SetProperty("File", (value)) +} + +// GetFile gets the value of File for the instance +func (instance *Win32_SelfRegModuleAction) GetPropertyFile() (value string, err error) { + retValue, err := instance.GetProperty("File") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPort.go new file mode 100644 index 00000000..c0736659 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPort.go @@ -0,0 +1,710 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SerialPort struct +type Win32_SerialPort struct { + *CIM_SerialController + + // + Binary bool + + // + MaximumInputBufferSize uint32 + + // + MaximumOutputBufferSize uint32 + + // + OSAutoDiscovered bool + + // + ProviderType string + + // + SettableBaudRate bool + + // + SettableDataBits bool + + // + SettableFlowControl bool + + // + SettableParity bool + + // + SettableParityCheck bool + + // + SettableRLSD bool + + // + SettableStopBits bool + + // + Supports16BitMode bool + + // + SupportsDTRDSR bool + + // + SupportsElapsedTimeouts bool + + // + SupportsIntTimeouts bool + + // + SupportsParityCheck bool + + // + SupportsRLSD bool + + // + SupportsRTSCTS bool + + // + SupportsSpecialCharacters bool + + // + SupportsXOnXOff bool + + // + SupportsXOnXOffSet bool +} + +func NewWin32_SerialPortEx1(instance *cim.WmiInstance) (newInstance *Win32_SerialPort, err error) { + tmp, err := NewCIM_SerialControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SerialPort{ + CIM_SerialController: tmp, + } + return +} + +func NewWin32_SerialPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SerialPort, err error) { + tmp, err := NewCIM_SerialControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SerialPort{ + CIM_SerialController: tmp, + } + return +} + +// SetBinary sets the value of Binary for the instance +func (instance *Win32_SerialPort) SetPropertyBinary(value bool) (err error) { + return instance.SetProperty("Binary", (value)) +} + +// GetBinary gets the value of Binary for the instance +func (instance *Win32_SerialPort) GetPropertyBinary() (value bool, err error) { + retValue, err := instance.GetProperty("Binary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMaximumInputBufferSize sets the value of MaximumInputBufferSize for the instance +func (instance *Win32_SerialPort) SetPropertyMaximumInputBufferSize(value uint32) (err error) { + return instance.SetProperty("MaximumInputBufferSize", (value)) +} + +// GetMaximumInputBufferSize gets the value of MaximumInputBufferSize for the instance +func (instance *Win32_SerialPort) GetPropertyMaximumInputBufferSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumInputBufferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaximumOutputBufferSize sets the value of MaximumOutputBufferSize for the instance +func (instance *Win32_SerialPort) SetPropertyMaximumOutputBufferSize(value uint32) (err error) { + return instance.SetProperty("MaximumOutputBufferSize", (value)) +} + +// GetMaximumOutputBufferSize gets the value of MaximumOutputBufferSize for the instance +func (instance *Win32_SerialPort) GetPropertyMaximumOutputBufferSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumOutputBufferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOSAutoDiscovered sets the value of OSAutoDiscovered for the instance +func (instance *Win32_SerialPort) SetPropertyOSAutoDiscovered(value bool) (err error) { + return instance.SetProperty("OSAutoDiscovered", (value)) +} + +// GetOSAutoDiscovered gets the value of OSAutoDiscovered for the instance +func (instance *Win32_SerialPort) GetPropertyOSAutoDiscovered() (value bool, err error) { + retValue, err := instance.GetProperty("OSAutoDiscovered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProviderType sets the value of ProviderType for the instance +func (instance *Win32_SerialPort) SetPropertyProviderType(value string) (err error) { + return instance.SetProperty("ProviderType", (value)) +} + +// GetProviderType gets the value of ProviderType for the instance +func (instance *Win32_SerialPort) GetPropertyProviderType() (value string, err error) { + retValue, err := instance.GetProperty("ProviderType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSettableBaudRate sets the value of SettableBaudRate for the instance +func (instance *Win32_SerialPort) SetPropertySettableBaudRate(value bool) (err error) { + return instance.SetProperty("SettableBaudRate", (value)) +} + +// GetSettableBaudRate gets the value of SettableBaudRate for the instance +func (instance *Win32_SerialPort) GetPropertySettableBaudRate() (value bool, err error) { + retValue, err := instance.GetProperty("SettableBaudRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSettableDataBits sets the value of SettableDataBits for the instance +func (instance *Win32_SerialPort) SetPropertySettableDataBits(value bool) (err error) { + return instance.SetProperty("SettableDataBits", (value)) +} + +// GetSettableDataBits gets the value of SettableDataBits for the instance +func (instance *Win32_SerialPort) GetPropertySettableDataBits() (value bool, err error) { + retValue, err := instance.GetProperty("SettableDataBits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSettableFlowControl sets the value of SettableFlowControl for the instance +func (instance *Win32_SerialPort) SetPropertySettableFlowControl(value bool) (err error) { + return instance.SetProperty("SettableFlowControl", (value)) +} + +// GetSettableFlowControl gets the value of SettableFlowControl for the instance +func (instance *Win32_SerialPort) GetPropertySettableFlowControl() (value bool, err error) { + retValue, err := instance.GetProperty("SettableFlowControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSettableParity sets the value of SettableParity for the instance +func (instance *Win32_SerialPort) SetPropertySettableParity(value bool) (err error) { + return instance.SetProperty("SettableParity", (value)) +} + +// GetSettableParity gets the value of SettableParity for the instance +func (instance *Win32_SerialPort) GetPropertySettableParity() (value bool, err error) { + retValue, err := instance.GetProperty("SettableParity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSettableParityCheck sets the value of SettableParityCheck for the instance +func (instance *Win32_SerialPort) SetPropertySettableParityCheck(value bool) (err error) { + return instance.SetProperty("SettableParityCheck", (value)) +} + +// GetSettableParityCheck gets the value of SettableParityCheck for the instance +func (instance *Win32_SerialPort) GetPropertySettableParityCheck() (value bool, err error) { + retValue, err := instance.GetProperty("SettableParityCheck") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSettableRLSD sets the value of SettableRLSD for the instance +func (instance *Win32_SerialPort) SetPropertySettableRLSD(value bool) (err error) { + return instance.SetProperty("SettableRLSD", (value)) +} + +// GetSettableRLSD gets the value of SettableRLSD for the instance +func (instance *Win32_SerialPort) GetPropertySettableRLSD() (value bool, err error) { + retValue, err := instance.GetProperty("SettableRLSD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSettableStopBits sets the value of SettableStopBits for the instance +func (instance *Win32_SerialPort) SetPropertySettableStopBits(value bool) (err error) { + return instance.SetProperty("SettableStopBits", (value)) +} + +// GetSettableStopBits gets the value of SettableStopBits for the instance +func (instance *Win32_SerialPort) GetPropertySettableStopBits() (value bool, err error) { + retValue, err := instance.GetProperty("SettableStopBits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupports16BitMode sets the value of Supports16BitMode for the instance +func (instance *Win32_SerialPort) SetPropertySupports16BitMode(value bool) (err error) { + return instance.SetProperty("Supports16BitMode", (value)) +} + +// GetSupports16BitMode gets the value of Supports16BitMode for the instance +func (instance *Win32_SerialPort) GetPropertySupports16BitMode() (value bool, err error) { + retValue, err := instance.GetProperty("Supports16BitMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsDTRDSR sets the value of SupportsDTRDSR for the instance +func (instance *Win32_SerialPort) SetPropertySupportsDTRDSR(value bool) (err error) { + return instance.SetProperty("SupportsDTRDSR", (value)) +} + +// GetSupportsDTRDSR gets the value of SupportsDTRDSR for the instance +func (instance *Win32_SerialPort) GetPropertySupportsDTRDSR() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDTRDSR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsElapsedTimeouts sets the value of SupportsElapsedTimeouts for the instance +func (instance *Win32_SerialPort) SetPropertySupportsElapsedTimeouts(value bool) (err error) { + return instance.SetProperty("SupportsElapsedTimeouts", (value)) +} + +// GetSupportsElapsedTimeouts gets the value of SupportsElapsedTimeouts for the instance +func (instance *Win32_SerialPort) GetPropertySupportsElapsedTimeouts() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsElapsedTimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsIntTimeouts sets the value of SupportsIntTimeouts for the instance +func (instance *Win32_SerialPort) SetPropertySupportsIntTimeouts(value bool) (err error) { + return instance.SetProperty("SupportsIntTimeouts", (value)) +} + +// GetSupportsIntTimeouts gets the value of SupportsIntTimeouts for the instance +func (instance *Win32_SerialPort) GetPropertySupportsIntTimeouts() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsIntTimeouts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsParityCheck sets the value of SupportsParityCheck for the instance +func (instance *Win32_SerialPort) SetPropertySupportsParityCheck(value bool) (err error) { + return instance.SetProperty("SupportsParityCheck", (value)) +} + +// GetSupportsParityCheck gets the value of SupportsParityCheck for the instance +func (instance *Win32_SerialPort) GetPropertySupportsParityCheck() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsParityCheck") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsRLSD sets the value of SupportsRLSD for the instance +func (instance *Win32_SerialPort) SetPropertySupportsRLSD(value bool) (err error) { + return instance.SetProperty("SupportsRLSD", (value)) +} + +// GetSupportsRLSD gets the value of SupportsRLSD for the instance +func (instance *Win32_SerialPort) GetPropertySupportsRLSD() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsRLSD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsRTSCTS sets the value of SupportsRTSCTS for the instance +func (instance *Win32_SerialPort) SetPropertySupportsRTSCTS(value bool) (err error) { + return instance.SetProperty("SupportsRTSCTS", (value)) +} + +// GetSupportsRTSCTS gets the value of SupportsRTSCTS for the instance +func (instance *Win32_SerialPort) GetPropertySupportsRTSCTS() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsRTSCTS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsSpecialCharacters sets the value of SupportsSpecialCharacters for the instance +func (instance *Win32_SerialPort) SetPropertySupportsSpecialCharacters(value bool) (err error) { + return instance.SetProperty("SupportsSpecialCharacters", (value)) +} + +// GetSupportsSpecialCharacters gets the value of SupportsSpecialCharacters for the instance +func (instance *Win32_SerialPort) GetPropertySupportsSpecialCharacters() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSpecialCharacters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsXOnXOff sets the value of SupportsXOnXOff for the instance +func (instance *Win32_SerialPort) SetPropertySupportsXOnXOff(value bool) (err error) { + return instance.SetProperty("SupportsXOnXOff", (value)) +} + +// GetSupportsXOnXOff gets the value of SupportsXOnXOff for the instance +func (instance *Win32_SerialPort) GetPropertySupportsXOnXOff() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsXOnXOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsXOnXOffSet sets the value of SupportsXOnXOffSet for the instance +func (instance *Win32_SerialPort) SetPropertySupportsXOnXOffSet(value bool) (err error) { + return instance.SetProperty("SupportsXOnXOffSet", (value)) +} + +// GetSupportsXOnXOffSet gets the value of SupportsXOnXOffSet for the instance +func (instance *Win32_SerialPort) GetPropertySupportsXOnXOffSet() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsXOnXOffSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortConfiguration.go new file mode 100644 index 00000000..263c1ef2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortConfiguration.go @@ -0,0 +1,830 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SerialPortConfiguration struct +type Win32_SerialPortConfiguration struct { + *CIM_Setting + + // + AbortReadWriteOnError bool + + // + BaudRate uint32 + + // + BinaryModeEnabled bool + + // + BitsPerByte uint32 + + // + ContinueXMitOnXOff bool + + // + CTSOutflowControl bool + + // + DiscardNULLBytes bool + + // + DSROutflowControl bool + + // + DSRSensitivity bool + + // + DTRFlowControlType string + + // + EOFCharacter uint32 + + // + ErrorReplaceCharacter uint32 + + // + ErrorReplacementEnabled bool + + // + EventCharacter uint32 + + // + IsBusy bool + + // + Name string + + // + Parity string + + // + ParityCheckEnabled bool + + // + RTSFlowControlType string + + // + StopBits string + + // + XOffCharacter uint32 + + // + XOffXMitThreshold uint32 + + // + XOnCharacter uint32 + + // + XOnXMitThreshold uint32 + + // + XOnXOffInFlowControl uint32 + + // + XOnXOffOutFlowControl uint32 +} + +func NewWin32_SerialPortConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_SerialPortConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SerialPortConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_SerialPortConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SerialPortConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SerialPortConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetAbortReadWriteOnError sets the value of AbortReadWriteOnError for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyAbortReadWriteOnError(value bool) (err error) { + return instance.SetProperty("AbortReadWriteOnError", (value)) +} + +// GetAbortReadWriteOnError gets the value of AbortReadWriteOnError for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyAbortReadWriteOnError() (value bool, err error) { + retValue, err := instance.GetProperty("AbortReadWriteOnError") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBaudRate sets the value of BaudRate for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyBaudRate(value uint32) (err error) { + return instance.SetProperty("BaudRate", (value)) +} + +// GetBaudRate gets the value of BaudRate for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyBaudRate() (value uint32, err error) { + retValue, err := instance.GetProperty("BaudRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBinaryModeEnabled sets the value of BinaryModeEnabled for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyBinaryModeEnabled(value bool) (err error) { + return instance.SetProperty("BinaryModeEnabled", (value)) +} + +// GetBinaryModeEnabled gets the value of BinaryModeEnabled for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyBinaryModeEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("BinaryModeEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBitsPerByte sets the value of BitsPerByte for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyBitsPerByte(value uint32) (err error) { + return instance.SetProperty("BitsPerByte", (value)) +} + +// GetBitsPerByte gets the value of BitsPerByte for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyBitsPerByte() (value uint32, err error) { + retValue, err := instance.GetProperty("BitsPerByte") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetContinueXMitOnXOff sets the value of ContinueXMitOnXOff for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyContinueXMitOnXOff(value bool) (err error) { + return instance.SetProperty("ContinueXMitOnXOff", (value)) +} + +// GetContinueXMitOnXOff gets the value of ContinueXMitOnXOff for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyContinueXMitOnXOff() (value bool, err error) { + retValue, err := instance.GetProperty("ContinueXMitOnXOff") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCTSOutflowControl sets the value of CTSOutflowControl for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyCTSOutflowControl(value bool) (err error) { + return instance.SetProperty("CTSOutflowControl", (value)) +} + +// GetCTSOutflowControl gets the value of CTSOutflowControl for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyCTSOutflowControl() (value bool, err error) { + retValue, err := instance.GetProperty("CTSOutflowControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDiscardNULLBytes sets the value of DiscardNULLBytes for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyDiscardNULLBytes(value bool) (err error) { + return instance.SetProperty("DiscardNULLBytes", (value)) +} + +// GetDiscardNULLBytes gets the value of DiscardNULLBytes for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyDiscardNULLBytes() (value bool, err error) { + retValue, err := instance.GetProperty("DiscardNULLBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSROutflowControl sets the value of DSROutflowControl for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyDSROutflowControl(value bool) (err error) { + return instance.SetProperty("DSROutflowControl", (value)) +} + +// GetDSROutflowControl gets the value of DSROutflowControl for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyDSROutflowControl() (value bool, err error) { + retValue, err := instance.GetProperty("DSROutflowControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDSRSensitivity sets the value of DSRSensitivity for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyDSRSensitivity(value bool) (err error) { + return instance.SetProperty("DSRSensitivity", (value)) +} + +// GetDSRSensitivity gets the value of DSRSensitivity for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyDSRSensitivity() (value bool, err error) { + retValue, err := instance.GetProperty("DSRSensitivity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDTRFlowControlType sets the value of DTRFlowControlType for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyDTRFlowControlType(value string) (err error) { + return instance.SetProperty("DTRFlowControlType", (value)) +} + +// GetDTRFlowControlType gets the value of DTRFlowControlType for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyDTRFlowControlType() (value string, err error) { + retValue, err := instance.GetProperty("DTRFlowControlType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEOFCharacter sets the value of EOFCharacter for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyEOFCharacter(value uint32) (err error) { + return instance.SetProperty("EOFCharacter", (value)) +} + +// GetEOFCharacter gets the value of EOFCharacter for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyEOFCharacter() (value uint32, err error) { + retValue, err := instance.GetProperty("EOFCharacter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorReplaceCharacter sets the value of ErrorReplaceCharacter for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyErrorReplaceCharacter(value uint32) (err error) { + return instance.SetProperty("ErrorReplaceCharacter", (value)) +} + +// GetErrorReplaceCharacter gets the value of ErrorReplaceCharacter for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyErrorReplaceCharacter() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorReplaceCharacter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorReplacementEnabled sets the value of ErrorReplacementEnabled for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyErrorReplacementEnabled(value bool) (err error) { + return instance.SetProperty("ErrorReplacementEnabled", (value)) +} + +// GetErrorReplacementEnabled gets the value of ErrorReplacementEnabled for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyErrorReplacementEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("ErrorReplacementEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEventCharacter sets the value of EventCharacter for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyEventCharacter(value uint32) (err error) { + return instance.SetProperty("EventCharacter", (value)) +} + +// GetEventCharacter gets the value of EventCharacter for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyEventCharacter() (value uint32, err error) { + retValue, err := instance.GetProperty("EventCharacter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIsBusy sets the value of IsBusy for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyIsBusy(value bool) (err error) { + return instance.SetProperty("IsBusy", (value)) +} + +// GetIsBusy gets the value of IsBusy for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyIsBusy() (value bool, err error) { + retValue, err := instance.GetProperty("IsBusy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParity sets the value of Parity for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyParity(value string) (err error) { + return instance.SetProperty("Parity", (value)) +} + +// GetParity gets the value of Parity for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyParity() (value string, err error) { + retValue, err := instance.GetProperty("Parity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParityCheckEnabled sets the value of ParityCheckEnabled for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyParityCheckEnabled(value bool) (err error) { + return instance.SetProperty("ParityCheckEnabled", (value)) +} + +// GetParityCheckEnabled gets the value of ParityCheckEnabled for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyParityCheckEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("ParityCheckEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRTSFlowControlType sets the value of RTSFlowControlType for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyRTSFlowControlType(value string) (err error) { + return instance.SetProperty("RTSFlowControlType", (value)) +} + +// GetRTSFlowControlType gets the value of RTSFlowControlType for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyRTSFlowControlType() (value string, err error) { + retValue, err := instance.GetProperty("RTSFlowControlType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStopBits sets the value of StopBits for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyStopBits(value string) (err error) { + return instance.SetProperty("StopBits", (value)) +} + +// GetStopBits gets the value of StopBits for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyStopBits() (value string, err error) { + retValue, err := instance.GetProperty("StopBits") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetXOffCharacter sets the value of XOffCharacter for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyXOffCharacter(value uint32) (err error) { + return instance.SetProperty("XOffCharacter", (value)) +} + +// GetXOffCharacter gets the value of XOffCharacter for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyXOffCharacter() (value uint32, err error) { + retValue, err := instance.GetProperty("XOffCharacter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXOffXMitThreshold sets the value of XOffXMitThreshold for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyXOffXMitThreshold(value uint32) (err error) { + return instance.SetProperty("XOffXMitThreshold", (value)) +} + +// GetXOffXMitThreshold gets the value of XOffXMitThreshold for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyXOffXMitThreshold() (value uint32, err error) { + retValue, err := instance.GetProperty("XOffXMitThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXOnCharacter sets the value of XOnCharacter for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyXOnCharacter(value uint32) (err error) { + return instance.SetProperty("XOnCharacter", (value)) +} + +// GetXOnCharacter gets the value of XOnCharacter for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyXOnCharacter() (value uint32, err error) { + retValue, err := instance.GetProperty("XOnCharacter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXOnXMitThreshold sets the value of XOnXMitThreshold for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyXOnXMitThreshold(value uint32) (err error) { + return instance.SetProperty("XOnXMitThreshold", (value)) +} + +// GetXOnXMitThreshold gets the value of XOnXMitThreshold for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyXOnXMitThreshold() (value uint32, err error) { + retValue, err := instance.GetProperty("XOnXMitThreshold") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXOnXOffInFlowControl sets the value of XOnXOffInFlowControl for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyXOnXOffInFlowControl(value uint32) (err error) { + return instance.SetProperty("XOnXOffInFlowControl", (value)) +} + +// GetXOnXOffInFlowControl gets the value of XOnXOffInFlowControl for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyXOnXOffInFlowControl() (value uint32, err error) { + retValue, err := instance.GetProperty("XOnXOffInFlowControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetXOnXOffOutFlowControl sets the value of XOnXOffOutFlowControl for the instance +func (instance *Win32_SerialPortConfiguration) SetPropertyXOnXOffOutFlowControl(value uint32) (err error) { + return instance.SetProperty("XOnXOffOutFlowControl", (value)) +} + +// GetXOnXOffOutFlowControl gets the value of XOnXOffOutFlowControl for the instance +func (instance *Win32_SerialPortConfiguration) GetPropertyXOnXOffOutFlowControl() (value uint32, err error) { + retValue, err := instance.GetProperty("XOnXOffOutFlowControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortSetting.go new file mode 100644 index 00000000..8d2cb1f1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SerialPortSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SerialPortSetting struct +type Win32_SerialPortSetting struct { + *Win32_DeviceSettings +} + +func NewWin32_SerialPortSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_SerialPortSetting, err error) { + tmp, err := NewWin32_DeviceSettingsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SerialPortSetting{ + Win32_DeviceSettings: tmp, + } + return +} + +func NewWin32_SerialPortSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SerialPortSetting, err error) { + tmp, err := NewWin32_DeviceSettingsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SerialPortSetting{ + Win32_DeviceSettings: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerConnection.go new file mode 100644 index 00000000..35245ad8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerConnection.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ServerConnection struct +type Win32_ServerConnection struct { + *CIM_LogicalElement + + // + ActiveTime uint32 + + // + ComputerName string + + // + ConnectionID uint32 + + // + NumberOfFiles uint32 + + // + NumberOfUsers uint32 + + // + ShareName string + + // + UserName string +} + +func NewWin32_ServerConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_ServerConnection, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ServerConnection{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ServerConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ServerConnection, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ServerConnection{ + CIM_LogicalElement: tmp, + } + return +} + +// SetActiveTime sets the value of ActiveTime for the instance +func (instance *Win32_ServerConnection) SetPropertyActiveTime(value uint32) (err error) { + return instance.SetProperty("ActiveTime", (value)) +} + +// GetActiveTime gets the value of ActiveTime for the instance +func (instance *Win32_ServerConnection) GetPropertyActiveTime() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetComputerName sets the value of ComputerName for the instance +func (instance *Win32_ServerConnection) SetPropertyComputerName(value string) (err error) { + return instance.SetProperty("ComputerName", (value)) +} + +// GetComputerName gets the value of ComputerName for the instance +func (instance *Win32_ServerConnection) GetPropertyComputerName() (value string, err error) { + retValue, err := instance.GetProperty("ComputerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConnectionID sets the value of ConnectionID for the instance +func (instance *Win32_ServerConnection) SetPropertyConnectionID(value uint32) (err error) { + return instance.SetProperty("ConnectionID", (value)) +} + +// GetConnectionID gets the value of ConnectionID for the instance +func (instance *Win32_ServerConnection) GetPropertyConnectionID() (value uint32, err error) { + retValue, err := instance.GetProperty("ConnectionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfFiles sets the value of NumberOfFiles for the instance +func (instance *Win32_ServerConnection) SetPropertyNumberOfFiles(value uint32) (err error) { + return instance.SetProperty("NumberOfFiles", (value)) +} + +// GetNumberOfFiles gets the value of NumberOfFiles for the instance +func (instance *Win32_ServerConnection) GetPropertyNumberOfFiles() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfUsers sets the value of NumberOfUsers for the instance +func (instance *Win32_ServerConnection) SetPropertyNumberOfUsers(value uint32) (err error) { + return instance.SetProperty("NumberOfUsers", (value)) +} + +// GetNumberOfUsers gets the value of NumberOfUsers for the instance +func (instance *Win32_ServerConnection) GetPropertyNumberOfUsers() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfUsers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetShareName sets the value of ShareName for the instance +func (instance *Win32_ServerConnection) SetPropertyShareName(value string) (err error) { + return instance.SetProperty("ShareName", (value)) +} + +// GetShareName gets the value of ShareName for the instance +func (instance *Win32_ServerConnection) GetPropertyShareName() (value string, err error) { + retValue, err := instance.GetProperty("ShareName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserName sets the value of UserName for the instance +func (instance *Win32_ServerConnection) SetPropertyUserName(value string) (err error) { + return instance.SetProperty("UserName", (value)) +} + +// GetUserName gets the value of UserName for the instance +func (instance *Win32_ServerConnection) GetPropertyUserName() (value string, err error) { + retValue, err := instance.GetProperty("UserName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerFeature.go new file mode 100644 index 00000000..3f5cb5ac --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerFeature.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ServerFeature struct +type Win32_ServerFeature struct { + *cim.WmiInstance + + // + ID uint32 + + // + Name string + + // + ParentID uint32 +} + +func NewWin32_ServerFeatureEx1(instance *cim.WmiInstance) (newInstance *Win32_ServerFeature, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ServerFeature{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ServerFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ServerFeature, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ServerFeature{ + WmiInstance: tmp, + } + return +} + +// SetID sets the value of ID for the instance +func (instance *Win32_ServerFeature) SetPropertyID(value uint32) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *Win32_ServerFeature) GetPropertyID() (value uint32, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_ServerFeature) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_ServerFeature) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParentID sets the value of ParentID for the instance +func (instance *Win32_ServerFeature) SetPropertyParentID(value uint32) (err error) { + return instance.SetProperty("ParentID", (value)) +} + +// GetParentID gets the value of ParentID for the instance +func (instance *Win32_ServerFeature) GetPropertyParentID() (value uint32, err error) { + retValue, err := instance.GetProperty("ParentID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerSession.go new file mode 100644 index 00000000..5522bc9e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServerSession.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ServerSession struct +type Win32_ServerSession struct { + *CIM_LogicalElement + + // + ActiveTime uint32 + + // + ClientType string + + // + ComputerName string + + // + IdleTime uint32 + + // + ResourcesOpened uint32 + + // + SessionType uint32 + + // + TransportName string + + // + UserName string +} + +func NewWin32_ServerSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_ServerSession, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ServerSession{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ServerSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ServerSession, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ServerSession{ + CIM_LogicalElement: tmp, + } + return +} + +// SetActiveTime sets the value of ActiveTime for the instance +func (instance *Win32_ServerSession) SetPropertyActiveTime(value uint32) (err error) { + return instance.SetProperty("ActiveTime", (value)) +} + +// GetActiveTime gets the value of ActiveTime for the instance +func (instance *Win32_ServerSession) GetPropertyActiveTime() (value uint32, err error) { + retValue, err := instance.GetProperty("ActiveTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetClientType sets the value of ClientType for the instance +func (instance *Win32_ServerSession) SetPropertyClientType(value string) (err error) { + return instance.SetProperty("ClientType", (value)) +} + +// GetClientType gets the value of ClientType for the instance +func (instance *Win32_ServerSession) GetPropertyClientType() (value string, err error) { + retValue, err := instance.GetProperty("ClientType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetComputerName sets the value of ComputerName for the instance +func (instance *Win32_ServerSession) SetPropertyComputerName(value string) (err error) { + return instance.SetProperty("ComputerName", (value)) +} + +// GetComputerName gets the value of ComputerName for the instance +func (instance *Win32_ServerSession) GetPropertyComputerName() (value string, err error) { + retValue, err := instance.GetProperty("ComputerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIdleTime sets the value of IdleTime for the instance +func (instance *Win32_ServerSession) SetPropertyIdleTime(value uint32) (err error) { + return instance.SetProperty("IdleTime", (value)) +} + +// GetIdleTime gets the value of IdleTime for the instance +func (instance *Win32_ServerSession) GetPropertyIdleTime() (value uint32, err error) { + retValue, err := instance.GetProperty("IdleTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetResourcesOpened sets the value of ResourcesOpened for the instance +func (instance *Win32_ServerSession) SetPropertyResourcesOpened(value uint32) (err error) { + return instance.SetProperty("ResourcesOpened", (value)) +} + +// GetResourcesOpened gets the value of ResourcesOpened for the instance +func (instance *Win32_ServerSession) GetPropertyResourcesOpened() (value uint32, err error) { + retValue, err := instance.GetProperty("ResourcesOpened") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionType sets the value of SessionType for the instance +func (instance *Win32_ServerSession) SetPropertySessionType(value uint32) (err error) { + return instance.SetProperty("SessionType", (value)) +} + +// GetSessionType gets the value of SessionType for the instance +func (instance *Win32_ServerSession) GetPropertySessionType() (value uint32, err error) { + retValue, err := instance.GetProperty("SessionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransportName sets the value of TransportName for the instance +func (instance *Win32_ServerSession) SetPropertyTransportName(value string) (err error) { + return instance.SetProperty("TransportName", (value)) +} + +// GetTransportName gets the value of TransportName for the instance +func (instance *Win32_ServerSession) GetPropertyTransportName() (value string, err error) { + retValue, err := instance.GetProperty("TransportName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserName sets the value of UserName for the instance +func (instance *Win32_ServerSession) SetPropertyUserName(value string) (err error) { + return instance.SetProperty("UserName", (value)) +} + +// GetUserName gets the value of UserName for the instance +func (instance *Win32_ServerSession) GetPropertyUserName() (value string, err error) { + retValue, err := instance.GetProperty("UserName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Service.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Service.go new file mode 100644 index 00000000..7f7d3cf4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Service.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Service struct +type Win32_Service struct { + *Win32_BaseService + + // + CheckPoint uint32 + + // + DelayedAutoStart bool + + // + ProcessId uint32 + + // + WaitHint uint32 +} + +func NewWin32_ServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_Service, err error) { + tmp, err := NewWin32_BaseServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Service{ + Win32_BaseService: tmp, + } + return +} + +func NewWin32_ServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Service, err error) { + tmp, err := NewWin32_BaseServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Service{ + Win32_BaseService: tmp, + } + return +} + +// SetCheckPoint sets the value of CheckPoint for the instance +func (instance *Win32_Service) SetPropertyCheckPoint(value uint32) (err error) { + return instance.SetProperty("CheckPoint", (value)) +} + +// GetCheckPoint gets the value of CheckPoint for the instance +func (instance *Win32_Service) GetPropertyCheckPoint() (value uint32, err error) { + retValue, err := instance.GetProperty("CheckPoint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDelayedAutoStart sets the value of DelayedAutoStart for the instance +func (instance *Win32_Service) SetPropertyDelayedAutoStart(value bool) (err error) { + return instance.SetProperty("DelayedAutoStart", (value)) +} + +// GetDelayedAutoStart gets the value of DelayedAutoStart for the instance +func (instance *Win32_Service) GetPropertyDelayedAutoStart() (value bool, err error) { + retValue, err := instance.GetProperty("DelayedAutoStart") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProcessId sets the value of ProcessId for the instance +func (instance *Win32_Service) SetPropertyProcessId(value uint32) (err error) { + return instance.SetProperty("ProcessId", (value)) +} + +// GetProcessId gets the value of ProcessId for the instance +func (instance *Win32_Service) GetPropertyProcessId() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWaitHint sets the value of WaitHint for the instance +func (instance *Win32_Service) SetPropertyWaitHint(value uint32) (err error) { + return instance.SetProperty("WaitHint", (value)) +} + +// GetWaitHint gets the value of WaitHint for the instance +func (instance *Win32_Service) GetPropertyWaitHint() (value uint32, err error) { + retValue, err := instance.GetProperty("WaitHint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// +func (instance *Win32_Service) GetSecurityDescriptor( /* OUT */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_Service) SetSecurityDescriptor( /* IN */ Descriptor Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceControl.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceControl.go new file mode 100644 index 00000000..0e41afdb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceControl.go @@ -0,0 +1,230 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ServiceControl struct +type Win32_ServiceControl struct { + *Win32_MSIResource + + // + Arguments string + + // + Event string + + // + ID string + + // + Name string + + // + ProductCode string + + // + Wait uint16 +} + +func NewWin32_ServiceControlEx1(instance *cim.WmiInstance) (newInstance *Win32_ServiceControl, err error) { + tmp, err := NewWin32_MSIResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ServiceControl{ + Win32_MSIResource: tmp, + } + return +} + +func NewWin32_ServiceControlEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ServiceControl, err error) { + tmp, err := NewWin32_MSIResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ServiceControl{ + Win32_MSIResource: tmp, + } + return +} + +// SetArguments sets the value of Arguments for the instance +func (instance *Win32_ServiceControl) SetPropertyArguments(value string) (err error) { + return instance.SetProperty("Arguments", (value)) +} + +// GetArguments gets the value of Arguments for the instance +func (instance *Win32_ServiceControl) GetPropertyArguments() (value string, err error) { + retValue, err := instance.GetProperty("Arguments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEvent sets the value of Event for the instance +func (instance *Win32_ServiceControl) SetPropertyEvent(value string) (err error) { + return instance.SetProperty("Event", (value)) +} + +// GetEvent gets the value of Event for the instance +func (instance *Win32_ServiceControl) GetPropertyEvent() (value string, err error) { + retValue, err := instance.GetProperty("Event") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetID sets the value of ID for the instance +func (instance *Win32_ServiceControl) SetPropertyID(value string) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *Win32_ServiceControl) GetPropertyID() (value string, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_ServiceControl) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_ServiceControl) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProductCode sets the value of ProductCode for the instance +func (instance *Win32_ServiceControl) SetPropertyProductCode(value string) (err error) { + return instance.SetProperty("ProductCode", (value)) +} + +// GetProductCode gets the value of ProductCode for the instance +func (instance *Win32_ServiceControl) GetPropertyProductCode() (value string, err error) { + retValue, err := instance.GetProperty("ProductCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWait sets the value of Wait for the instance +func (instance *Win32_ServiceControl) SetPropertyWait(value uint16) (err error) { + return instance.SetProperty("Wait", (value)) +} + +// GetWait gets the value of Wait for the instance +func (instance *Win32_ServiceControl) GetPropertyWait() (value uint16, err error) { + retValue, err := instance.GetProperty("Wait") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecification.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecification.go new file mode 100644 index 00000000..b01aa058 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecification.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ServiceSpecification struct +type Win32_ServiceSpecification struct { + *CIM_Check + + // + Dependencies string + + // + DisplayName string + + // + ErrorControl int32 + + // + ID string + + // + LoadOrderGroup string + + // + Password string + + // + ServiceType int32 + + // + StartName string + + // + StartType int32 +} + +func NewWin32_ServiceSpecificationEx1(instance *cim.WmiInstance) (newInstance *Win32_ServiceSpecification, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ServiceSpecification{ + CIM_Check: tmp, + } + return +} + +func NewWin32_ServiceSpecificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ServiceSpecification, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ServiceSpecification{ + CIM_Check: tmp, + } + return +} + +// SetDependencies sets the value of Dependencies for the instance +func (instance *Win32_ServiceSpecification) SetPropertyDependencies(value string) (err error) { + return instance.SetProperty("Dependencies", (value)) +} + +// GetDependencies gets the value of Dependencies for the instance +func (instance *Win32_ServiceSpecification) GetPropertyDependencies() (value string, err error) { + retValue, err := instance.GetProperty("Dependencies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDisplayName sets the value of DisplayName for the instance +func (instance *Win32_ServiceSpecification) SetPropertyDisplayName(value string) (err error) { + return instance.SetProperty("DisplayName", (value)) +} + +// GetDisplayName gets the value of DisplayName for the instance +func (instance *Win32_ServiceSpecification) GetPropertyDisplayName() (value string, err error) { + retValue, err := instance.GetProperty("DisplayName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorControl sets the value of ErrorControl for the instance +func (instance *Win32_ServiceSpecification) SetPropertyErrorControl(value int32) (err error) { + return instance.SetProperty("ErrorControl", (value)) +} + +// GetErrorControl gets the value of ErrorControl for the instance +func (instance *Win32_ServiceSpecification) GetPropertyErrorControl() (value int32, err error) { + retValue, err := instance.GetProperty("ErrorControl") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetID sets the value of ID for the instance +func (instance *Win32_ServiceSpecification) SetPropertyID(value string) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *Win32_ServiceSpecification) GetPropertyID() (value string, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLoadOrderGroup sets the value of LoadOrderGroup for the instance +func (instance *Win32_ServiceSpecification) SetPropertyLoadOrderGroup(value string) (err error) { + return instance.SetProperty("LoadOrderGroup", (value)) +} + +// GetLoadOrderGroup gets the value of LoadOrderGroup for the instance +func (instance *Win32_ServiceSpecification) GetPropertyLoadOrderGroup() (value string, err error) { + retValue, err := instance.GetProperty("LoadOrderGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPassword sets the value of Password for the instance +func (instance *Win32_ServiceSpecification) SetPropertyPassword(value string) (err error) { + return instance.SetProperty("Password", (value)) +} + +// GetPassword gets the value of Password for the instance +func (instance *Win32_ServiceSpecification) GetPropertyPassword() (value string, err error) { + retValue, err := instance.GetProperty("Password") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServiceType sets the value of ServiceType for the instance +func (instance *Win32_ServiceSpecification) SetPropertyServiceType(value int32) (err error) { + return instance.SetProperty("ServiceType", (value)) +} + +// GetServiceType gets the value of ServiceType for the instance +func (instance *Win32_ServiceSpecification) GetPropertyServiceType() (value int32, err error) { + retValue, err := instance.GetProperty("ServiceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetStartName sets the value of StartName for the instance +func (instance *Win32_ServiceSpecification) SetPropertyStartName(value string) (err error) { + return instance.SetProperty("StartName", (value)) +} + +// GetStartName gets the value of StartName for the instance +func (instance *Win32_ServiceSpecification) GetPropertyStartName() (value string, err error) { + retValue, err := instance.GetProperty("StartName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartType sets the value of StartType for the instance +func (instance *Win32_ServiceSpecification) SetPropertyStartType(value int32) (err error) { + return instance.SetProperty("StartType", (value)) +} + +// GetStartType gets the value of StartType for the instance +func (instance *Win32_ServiceSpecification) GetPropertyStartType() (value int32, err error) { + retValue, err := instance.GetProperty("StartType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecificationService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecificationService.go new file mode 100644 index 00000000..80ae63a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ServiceSpecificationService.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ServiceSpecificationService struct +type Win32_ServiceSpecificationService struct { + *cim.WmiInstance + + // + Check Win32_ServiceSpecification + + // + Element Win32_Service +} + +func NewWin32_ServiceSpecificationServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_ServiceSpecificationService, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ServiceSpecificationService{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ServiceSpecificationServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ServiceSpecificationService, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ServiceSpecificationService{ + WmiInstance: tmp, + } + return +} + +// SetCheck sets the value of Check for the instance +func (instance *Win32_ServiceSpecificationService) SetPropertyCheck(value Win32_ServiceSpecification) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *Win32_ServiceSpecificationService) GetPropertyCheck() (value Win32_ServiceSpecification, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ServiceSpecification) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ServiceSpecification is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ServiceSpecification(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_ServiceSpecificationService) SetPropertyElement(value Win32_Service) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_ServiceSpecificationService) GetPropertyElement() (value Win32_Service, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Service) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Service is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Service(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Session.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Session.go new file mode 100644 index 00000000..232902e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Session.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Session struct +type Win32_Session struct { + *CIM_LogicalElement + + // + StartTime string +} + +func NewWin32_SessionEx1(instance *cim.WmiInstance) (newInstance *Win32_Session, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Session{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_SessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Session, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Session{ + CIM_LogicalElement: tmp, + } + return +} + +// SetStartTime sets the value of StartTime for the instance +func (instance *Win32_Session) SetPropertyStartTime(value string) (err error) { + return instance.SetProperty("StartTime", (value)) +} + +// GetStartTime gets the value of StartTime for the instance +func (instance *Win32_Session) GetPropertyStartTime() (value string, err error) { + retValue, err := instance.GetProperty("StartTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionConnection.go new file mode 100644 index 00000000..c2f8aa7c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionConnection.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SessionConnection struct +type Win32_SessionConnection struct { + *CIM_Dependency +} + +func NewWin32_SessionConnectionEx1(instance *cim.WmiInstance) (newInstance *Win32_SessionConnection, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SessionConnection{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_SessionConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SessionConnection, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SessionConnection{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionProcess.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionProcess.go new file mode 100644 index 00000000..b4d5aabb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionProcess.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SessionProcess struct +type Win32_SessionProcess struct { + *Win32_SessionResource +} + +func NewWin32_SessionProcessEx1(instance *cim.WmiInstance) (newInstance *Win32_SessionProcess, err error) { + tmp, err := NewWin32_SessionResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SessionProcess{ + Win32_SessionResource: tmp, + } + return +} + +func NewWin32_SessionProcessEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SessionProcess, err error) { + tmp, err := NewWin32_SessionResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SessionProcess{ + Win32_SessionResource: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionResource.go new file mode 100644 index 00000000..7b75832e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SessionResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SessionResource struct +type Win32_SessionResource struct { + *CIM_Dependency +} + +func NewWin32_SessionResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_SessionResource, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SessionResource{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_SessionResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SessionResource, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SessionResource{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SettingCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SettingCheck.go new file mode 100644 index 00000000..696ef3ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SettingCheck.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SettingCheck struct +type Win32_SettingCheck struct { + *cim.WmiInstance + + // + Check CIM_Check + + // + Setting CIM_Setting +} + +func NewWin32_SettingCheckEx1(instance *cim.WmiInstance) (newInstance *Win32_SettingCheck, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SettingCheck{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SettingCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SettingCheck, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SettingCheck{ + WmiInstance: tmp, + } + return +} + +// SetCheck sets the value of Check for the instance +func (instance *Win32_SettingCheck) SetPropertyCheck(value CIM_Check) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *Win32_SettingCheck) GetPropertyCheck() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *Win32_SettingCheck) SetPropertySetting(value CIM_Setting) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *Win32_SettingCheck) GetPropertySetting() (value CIM_Setting, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Setting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Setting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Setting(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowBy.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowBy.go new file mode 100644 index 00000000..1a71b73f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowBy.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ShadowBy struct +type Win32_ShadowBy struct { + *CIM_Dependency +} + +func NewWin32_ShadowByEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowBy, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowBy{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_ShadowByEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowBy, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowBy{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowContext.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowContext.go new file mode 100644 index 00000000..5fe8089d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowContext.go @@ -0,0 +1,440 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShadowContext struct +type Win32_ShadowContext struct { + *CIM_Setting + + // + ClientAccessible bool + + // + Differential bool + + // + ExposedLocally bool + + // + ExposedRemotely bool + + // + HardwareAssisted bool + + // + Imported bool + + // + Name string + + // + NoAutoRelease bool + + // + NotSurfaced bool + + // + NoWriters bool + + // + Persistent bool + + // + Plex bool + + // + Transportable bool +} + +func NewWin32_ShadowContextEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowContext, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowContext{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_ShadowContextEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowContext, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowContext{ + CIM_Setting: tmp, + } + return +} + +// SetClientAccessible sets the value of ClientAccessible for the instance +func (instance *Win32_ShadowContext) SetPropertyClientAccessible(value bool) (err error) { + return instance.SetProperty("ClientAccessible", (value)) +} + +// GetClientAccessible gets the value of ClientAccessible for the instance +func (instance *Win32_ShadowContext) GetPropertyClientAccessible() (value bool, err error) { + retValue, err := instance.GetProperty("ClientAccessible") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDifferential sets the value of Differential for the instance +func (instance *Win32_ShadowContext) SetPropertyDifferential(value bool) (err error) { + return instance.SetProperty("Differential", (value)) +} + +// GetDifferential gets the value of Differential for the instance +func (instance *Win32_ShadowContext) GetPropertyDifferential() (value bool, err error) { + retValue, err := instance.GetProperty("Differential") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExposedLocally sets the value of ExposedLocally for the instance +func (instance *Win32_ShadowContext) SetPropertyExposedLocally(value bool) (err error) { + return instance.SetProperty("ExposedLocally", (value)) +} + +// GetExposedLocally gets the value of ExposedLocally for the instance +func (instance *Win32_ShadowContext) GetPropertyExposedLocally() (value bool, err error) { + retValue, err := instance.GetProperty("ExposedLocally") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExposedRemotely sets the value of ExposedRemotely for the instance +func (instance *Win32_ShadowContext) SetPropertyExposedRemotely(value bool) (err error) { + return instance.SetProperty("ExposedRemotely", (value)) +} + +// GetExposedRemotely gets the value of ExposedRemotely for the instance +func (instance *Win32_ShadowContext) GetPropertyExposedRemotely() (value bool, err error) { + retValue, err := instance.GetProperty("ExposedRemotely") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHardwareAssisted sets the value of HardwareAssisted for the instance +func (instance *Win32_ShadowContext) SetPropertyHardwareAssisted(value bool) (err error) { + return instance.SetProperty("HardwareAssisted", (value)) +} + +// GetHardwareAssisted gets the value of HardwareAssisted for the instance +func (instance *Win32_ShadowContext) GetPropertyHardwareAssisted() (value bool, err error) { + retValue, err := instance.GetProperty("HardwareAssisted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetImported sets the value of Imported for the instance +func (instance *Win32_ShadowContext) SetPropertyImported(value bool) (err error) { + return instance.SetProperty("Imported", (value)) +} + +// GetImported gets the value of Imported for the instance +func (instance *Win32_ShadowContext) GetPropertyImported() (value bool, err error) { + retValue, err := instance.GetProperty("Imported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_ShadowContext) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_ShadowContext) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNoAutoRelease sets the value of NoAutoRelease for the instance +func (instance *Win32_ShadowContext) SetPropertyNoAutoRelease(value bool) (err error) { + return instance.SetProperty("NoAutoRelease", (value)) +} + +// GetNoAutoRelease gets the value of NoAutoRelease for the instance +func (instance *Win32_ShadowContext) GetPropertyNoAutoRelease() (value bool, err error) { + retValue, err := instance.GetProperty("NoAutoRelease") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNotSurfaced sets the value of NotSurfaced for the instance +func (instance *Win32_ShadowContext) SetPropertyNotSurfaced(value bool) (err error) { + return instance.SetProperty("NotSurfaced", (value)) +} + +// GetNotSurfaced gets the value of NotSurfaced for the instance +func (instance *Win32_ShadowContext) GetPropertyNotSurfaced() (value bool, err error) { + retValue, err := instance.GetProperty("NotSurfaced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNoWriters sets the value of NoWriters for the instance +func (instance *Win32_ShadowContext) SetPropertyNoWriters(value bool) (err error) { + return instance.SetProperty("NoWriters", (value)) +} + +// GetNoWriters gets the value of NoWriters for the instance +func (instance *Win32_ShadowContext) GetPropertyNoWriters() (value bool, err error) { + retValue, err := instance.GetProperty("NoWriters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPersistent sets the value of Persistent for the instance +func (instance *Win32_ShadowContext) SetPropertyPersistent(value bool) (err error) { + return instance.SetProperty("Persistent", (value)) +} + +// GetPersistent gets the value of Persistent for the instance +func (instance *Win32_ShadowContext) GetPropertyPersistent() (value bool, err error) { + retValue, err := instance.GetProperty("Persistent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPlex sets the value of Plex for the instance +func (instance *Win32_ShadowContext) SetPropertyPlex(value bool) (err error) { + return instance.SetProperty("Plex", (value)) +} + +// GetPlex gets the value of Plex for the instance +func (instance *Win32_ShadowContext) GetPropertyPlex() (value bool, err error) { + retValue, err := instance.GetProperty("Plex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTransportable sets the value of Transportable for the instance +func (instance *Win32_ShadowContext) SetPropertyTransportable(value bool) (err error) { + return instance.SetProperty("Transportable", (value)) +} + +// GetTransportable gets the value of Transportable for the instance +func (instance *Win32_ShadowContext) GetPropertyTransportable() (value bool, err error) { + retValue, err := instance.GetProperty("Transportable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowCopy.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowCopy.go new file mode 100644 index 00000000..d2d7298e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowCopy.go @@ -0,0 +1,775 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShadowCopy struct +type Win32_ShadowCopy struct { + *CIM_LogicalElement + + // + ClientAccessible bool + + // + Count uint32 + + // + DeviceObject string + + // + Differential bool + + // + ExposedLocally bool + + // + ExposedName string + + // + ExposedPath string + + // + ExposedRemotely bool + + // + HardwareAssisted bool + + // + ID string + + // + Imported bool + + // + NoAutoRelease bool + + // + NotSurfaced bool + + // + NoWriters bool + + // + OriginatingMachine string + + // + Persistent bool + + // + Plex bool + + // + ProviderID string + + // + ServiceMachine string + + // + SetID string + + // + State uint32 + + // + Transportable bool + + // + VolumeName string +} + +func NewWin32_ShadowCopyEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowCopy, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowCopy{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ShadowCopyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowCopy, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowCopy{ + CIM_LogicalElement: tmp, + } + return +} + +// SetClientAccessible sets the value of ClientAccessible for the instance +func (instance *Win32_ShadowCopy) SetPropertyClientAccessible(value bool) (err error) { + return instance.SetProperty("ClientAccessible", (value)) +} + +// GetClientAccessible gets the value of ClientAccessible for the instance +func (instance *Win32_ShadowCopy) GetPropertyClientAccessible() (value bool, err error) { + retValue, err := instance.GetProperty("ClientAccessible") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCount sets the value of Count for the instance +func (instance *Win32_ShadowCopy) SetPropertyCount(value uint32) (err error) { + return instance.SetProperty("Count", (value)) +} + +// GetCount gets the value of Count for the instance +func (instance *Win32_ShadowCopy) GetPropertyCount() (value uint32, err error) { + retValue, err := instance.GetProperty("Count") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceObject sets the value of DeviceObject for the instance +func (instance *Win32_ShadowCopy) SetPropertyDeviceObject(value string) (err error) { + return instance.SetProperty("DeviceObject", (value)) +} + +// GetDeviceObject gets the value of DeviceObject for the instance +func (instance *Win32_ShadowCopy) GetPropertyDeviceObject() (value string, err error) { + retValue, err := instance.GetProperty("DeviceObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDifferential sets the value of Differential for the instance +func (instance *Win32_ShadowCopy) SetPropertyDifferential(value bool) (err error) { + return instance.SetProperty("Differential", (value)) +} + +// GetDifferential gets the value of Differential for the instance +func (instance *Win32_ShadowCopy) GetPropertyDifferential() (value bool, err error) { + retValue, err := instance.GetProperty("Differential") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExposedLocally sets the value of ExposedLocally for the instance +func (instance *Win32_ShadowCopy) SetPropertyExposedLocally(value bool) (err error) { + return instance.SetProperty("ExposedLocally", (value)) +} + +// GetExposedLocally gets the value of ExposedLocally for the instance +func (instance *Win32_ShadowCopy) GetPropertyExposedLocally() (value bool, err error) { + retValue, err := instance.GetProperty("ExposedLocally") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetExposedName sets the value of ExposedName for the instance +func (instance *Win32_ShadowCopy) SetPropertyExposedName(value string) (err error) { + return instance.SetProperty("ExposedName", (value)) +} + +// GetExposedName gets the value of ExposedName for the instance +func (instance *Win32_ShadowCopy) GetPropertyExposedName() (value string, err error) { + retValue, err := instance.GetProperty("ExposedName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExposedPath sets the value of ExposedPath for the instance +func (instance *Win32_ShadowCopy) SetPropertyExposedPath(value string) (err error) { + return instance.SetProperty("ExposedPath", (value)) +} + +// GetExposedPath gets the value of ExposedPath for the instance +func (instance *Win32_ShadowCopy) GetPropertyExposedPath() (value string, err error) { + retValue, err := instance.GetProperty("ExposedPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetExposedRemotely sets the value of ExposedRemotely for the instance +func (instance *Win32_ShadowCopy) SetPropertyExposedRemotely(value bool) (err error) { + return instance.SetProperty("ExposedRemotely", (value)) +} + +// GetExposedRemotely gets the value of ExposedRemotely for the instance +func (instance *Win32_ShadowCopy) GetPropertyExposedRemotely() (value bool, err error) { + retValue, err := instance.GetProperty("ExposedRemotely") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHardwareAssisted sets the value of HardwareAssisted for the instance +func (instance *Win32_ShadowCopy) SetPropertyHardwareAssisted(value bool) (err error) { + return instance.SetProperty("HardwareAssisted", (value)) +} + +// GetHardwareAssisted gets the value of HardwareAssisted for the instance +func (instance *Win32_ShadowCopy) GetPropertyHardwareAssisted() (value bool, err error) { + retValue, err := instance.GetProperty("HardwareAssisted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetID sets the value of ID for the instance +func (instance *Win32_ShadowCopy) SetPropertyID(value string) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *Win32_ShadowCopy) GetPropertyID() (value string, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetImported sets the value of Imported for the instance +func (instance *Win32_ShadowCopy) SetPropertyImported(value bool) (err error) { + return instance.SetProperty("Imported", (value)) +} + +// GetImported gets the value of Imported for the instance +func (instance *Win32_ShadowCopy) GetPropertyImported() (value bool, err error) { + retValue, err := instance.GetProperty("Imported") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNoAutoRelease sets the value of NoAutoRelease for the instance +func (instance *Win32_ShadowCopy) SetPropertyNoAutoRelease(value bool) (err error) { + return instance.SetProperty("NoAutoRelease", (value)) +} + +// GetNoAutoRelease gets the value of NoAutoRelease for the instance +func (instance *Win32_ShadowCopy) GetPropertyNoAutoRelease() (value bool, err error) { + retValue, err := instance.GetProperty("NoAutoRelease") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNotSurfaced sets the value of NotSurfaced for the instance +func (instance *Win32_ShadowCopy) SetPropertyNotSurfaced(value bool) (err error) { + return instance.SetProperty("NotSurfaced", (value)) +} + +// GetNotSurfaced gets the value of NotSurfaced for the instance +func (instance *Win32_ShadowCopy) GetPropertyNotSurfaced() (value bool, err error) { + retValue, err := instance.GetProperty("NotSurfaced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNoWriters sets the value of NoWriters for the instance +func (instance *Win32_ShadowCopy) SetPropertyNoWriters(value bool) (err error) { + return instance.SetProperty("NoWriters", (value)) +} + +// GetNoWriters gets the value of NoWriters for the instance +func (instance *Win32_ShadowCopy) GetPropertyNoWriters() (value bool, err error) { + retValue, err := instance.GetProperty("NoWriters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOriginatingMachine sets the value of OriginatingMachine for the instance +func (instance *Win32_ShadowCopy) SetPropertyOriginatingMachine(value string) (err error) { + return instance.SetProperty("OriginatingMachine", (value)) +} + +// GetOriginatingMachine gets the value of OriginatingMachine for the instance +func (instance *Win32_ShadowCopy) GetPropertyOriginatingMachine() (value string, err error) { + retValue, err := instance.GetProperty("OriginatingMachine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPersistent sets the value of Persistent for the instance +func (instance *Win32_ShadowCopy) SetPropertyPersistent(value bool) (err error) { + return instance.SetProperty("Persistent", (value)) +} + +// GetPersistent gets the value of Persistent for the instance +func (instance *Win32_ShadowCopy) GetPropertyPersistent() (value bool, err error) { + retValue, err := instance.GetProperty("Persistent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPlex sets the value of Plex for the instance +func (instance *Win32_ShadowCopy) SetPropertyPlex(value bool) (err error) { + return instance.SetProperty("Plex", (value)) +} + +// GetPlex gets the value of Plex for the instance +func (instance *Win32_ShadowCopy) GetPropertyPlex() (value bool, err error) { + retValue, err := instance.GetProperty("Plex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetProviderID sets the value of ProviderID for the instance +func (instance *Win32_ShadowCopy) SetPropertyProviderID(value string) (err error) { + return instance.SetProperty("ProviderID", (value)) +} + +// GetProviderID gets the value of ProviderID for the instance +func (instance *Win32_ShadowCopy) GetPropertyProviderID() (value string, err error) { + retValue, err := instance.GetProperty("ProviderID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetServiceMachine sets the value of ServiceMachine for the instance +func (instance *Win32_ShadowCopy) SetPropertyServiceMachine(value string) (err error) { + return instance.SetProperty("ServiceMachine", (value)) +} + +// GetServiceMachine gets the value of ServiceMachine for the instance +func (instance *Win32_ShadowCopy) GetPropertyServiceMachine() (value string, err error) { + retValue, err := instance.GetProperty("ServiceMachine") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSetID sets the value of SetID for the instance +func (instance *Win32_ShadowCopy) SetPropertySetID(value string) (err error) { + return instance.SetProperty("SetID", (value)) +} + +// GetSetID gets the value of SetID for the instance +func (instance *Win32_ShadowCopy) GetPropertySetID() (value string, err error) { + retValue, err := instance.GetProperty("SetID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *Win32_ShadowCopy) SetPropertyState(value uint32) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *Win32_ShadowCopy) GetPropertyState() (value uint32, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTransportable sets the value of Transportable for the instance +func (instance *Win32_ShadowCopy) SetPropertyTransportable(value bool) (err error) { + return instance.SetProperty("Transportable", (value)) +} + +// GetTransportable gets the value of Transportable for the instance +func (instance *Win32_ShadowCopy) GetPropertyTransportable() (value bool, err error) { + retValue, err := instance.GetProperty("Transportable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetVolumeName sets the value of VolumeName for the instance +func (instance *Win32_ShadowCopy) SetPropertyVolumeName(value string) (err error) { + return instance.SetProperty("VolumeName", (value)) +} + +// GetVolumeName gets the value of VolumeName for the instance +func (instance *Win32_ShadowCopy) GetPropertyVolumeName() (value string, err error) { + retValue, err := instance.GetProperty("VolumeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// + +// +// +func (instance *Win32_ShadowCopy) Create( /* IN */ Volume string, + /* IN */ Context string, + /* OUT */ ShadowID string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Create", Volume, Context) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_ShadowCopy) Revert( /* IN */ ForceDismount bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Revert", ForceDismount) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowDiffVolumeSupport.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowDiffVolumeSupport.go new file mode 100644 index 00000000..86165071 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowDiffVolumeSupport.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ShadowDiffVolumeSupport struct +type Win32_ShadowDiffVolumeSupport struct { + *CIM_Dependency +} + +func NewWin32_ShadowDiffVolumeSupportEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowDiffVolumeSupport, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowDiffVolumeSupport{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_ShadowDiffVolumeSupportEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowDiffVolumeSupport, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowDiffVolumeSupport{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowFor.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowFor.go new file mode 100644 index 00000000..c5bf6a36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowFor.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ShadowFor struct +type Win32_ShadowFor struct { + *CIM_Dependency +} + +func NewWin32_ShadowForEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowFor, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowFor{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_ShadowForEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowFor, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowFor{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowOn.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowOn.go new file mode 100644 index 00000000..7900eec0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowOn.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ShadowOn struct +type Win32_ShadowOn struct { + *CIM_Dependency +} + +func NewWin32_ShadowOnEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowOn, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowOn{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_ShadowOnEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowOn, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowOn{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowProvider.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowProvider.go new file mode 100644 index 00000000..a974d782 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowProvider.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShadowProvider struct +type Win32_ShadowProvider struct { + *CIM_LogicalElement + + // + CLSID string + + // + ID string + + // + Type uint32 + + // + Version string + + // + VersionID string +} + +func NewWin32_ShadowProviderEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowProvider, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowProvider{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ShadowProviderEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowProvider, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowProvider{ + CIM_LogicalElement: tmp, + } + return +} + +// SetCLSID sets the value of CLSID for the instance +func (instance *Win32_ShadowProvider) SetPropertyCLSID(value string) (err error) { + return instance.SetProperty("CLSID", (value)) +} + +// GetCLSID gets the value of CLSID for the instance +func (instance *Win32_ShadowProvider) GetPropertyCLSID() (value string, err error) { + retValue, err := instance.GetProperty("CLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetID sets the value of ID for the instance +func (instance *Win32_ShadowProvider) SetPropertyID(value string) (err error) { + return instance.SetProperty("ID", (value)) +} + +// GetID gets the value of ID for the instance +func (instance *Win32_ShadowProvider) GetPropertyID() (value string, err error) { + retValue, err := instance.GetProperty("ID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_ShadowProvider) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_ShadowProvider) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *Win32_ShadowProvider) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *Win32_ShadowProvider) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersionID sets the value of VersionID for the instance +func (instance *Win32_ShadowProvider) SetPropertyVersionID(value string) (err error) { + return instance.SetProperty("VersionID", (value)) +} + +// GetVersionID gets the value of VersionID for the instance +func (instance *Win32_ShadowProvider) GetPropertyVersionID() (value string, err error) { + retValue, err := instance.GetProperty("VersionID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowStorage.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowStorage.go new file mode 100644 index 00000000..0c390031 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowStorage.go @@ -0,0 +1,220 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShadowStorage struct +type Win32_ShadowStorage struct { + *cim.WmiInstance + + // + AllocatedSpace uint64 + + // + DiffVolume Win32_Volume + + // + MaxSpace uint64 + + // + UsedSpace uint64 + + // + Volume Win32_Volume +} + +func NewWin32_ShadowStorageEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowStorage, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ShadowStorage{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ShadowStorageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowStorage, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowStorage{ + WmiInstance: tmp, + } + return +} + +// SetAllocatedSpace sets the value of AllocatedSpace for the instance +func (instance *Win32_ShadowStorage) SetPropertyAllocatedSpace(value uint64) (err error) { + return instance.SetProperty("AllocatedSpace", (value)) +} + +// GetAllocatedSpace gets the value of AllocatedSpace for the instance +func (instance *Win32_ShadowStorage) GetPropertyAllocatedSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocatedSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDiffVolume sets the value of DiffVolume for the instance +func (instance *Win32_ShadowStorage) SetPropertyDiffVolume(value Win32_Volume) (err error) { + return instance.SetProperty("DiffVolume", (value)) +} + +// GetDiffVolume gets the value of DiffVolume for the instance +func (instance *Win32_ShadowStorage) GetPropertyDiffVolume() (value Win32_Volume, err error) { + retValue, err := instance.GetProperty("DiffVolume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Volume(valuetmp) + + return +} + +// SetMaxSpace sets the value of MaxSpace for the instance +func (instance *Win32_ShadowStorage) SetPropertyMaxSpace(value uint64) (err error) { + return instance.SetProperty("MaxSpace", (value)) +} + +// GetMaxSpace gets the value of MaxSpace for the instance +func (instance *Win32_ShadowStorage) GetPropertyMaxSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUsedSpace sets the value of UsedSpace for the instance +func (instance *Win32_ShadowStorage) SetPropertyUsedSpace(value uint64) (err error) { + return instance.SetProperty("UsedSpace", (value)) +} + +// GetUsedSpace gets the value of UsedSpace for the instance +func (instance *Win32_ShadowStorage) GetPropertyUsedSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("UsedSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *Win32_ShadowStorage) SetPropertyVolume(value Win32_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *Win32_ShadowStorage) GetPropertyVolume() (value Win32_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Volume(valuetmp) + + return +} + +// + +// +// +// + +// +func (instance *Win32_ShadowStorage) Create( /* IN */ Volume string, + /* IN */ DiffVolume string, + /* IN */ MaxSpace uint64) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Create", Volume, DiffVolume, MaxSpace) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowVolumeSupport.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowVolumeSupport.go new file mode 100644 index 00000000..4d5d5761 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShadowVolumeSupport.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ShadowVolumeSupport struct +type Win32_ShadowVolumeSupport struct { + *CIM_Dependency +} + +func NewWin32_ShadowVolumeSupportEx1(instance *cim.WmiInstance) (newInstance *Win32_ShadowVolumeSupport, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShadowVolumeSupport{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_ShadowVolumeSupportEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShadowVolumeSupport, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShadowVolumeSupport{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Share.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Share.go new file mode 100644 index 00000000..23c419a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Share.go @@ -0,0 +1,272 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Share struct +type Win32_Share struct { + *CIM_LogicalElement + + // + AccessMask uint32 + + // + AllowMaximum bool + + // + MaximumAllowed uint32 + + // + Path string + + // + Type uint32 +} + +func NewWin32_ShareEx1(instance *cim.WmiInstance) (newInstance *Win32_Share, err error) { + tmp, err := NewCIM_LogicalElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Share{ + CIM_LogicalElement: tmp, + } + return +} + +func NewWin32_ShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Share, err error) { + tmp, err := NewCIM_LogicalElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Share{ + CIM_LogicalElement: tmp, + } + return +} + +// SetAccessMask sets the value of AccessMask for the instance +func (instance *Win32_Share) SetPropertyAccessMask(value uint32) (err error) { + return instance.SetProperty("AccessMask", (value)) +} + +// GetAccessMask gets the value of AccessMask for the instance +func (instance *Win32_Share) GetPropertyAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAllowMaximum sets the value of AllowMaximum for the instance +func (instance *Win32_Share) SetPropertyAllowMaximum(value bool) (err error) { + return instance.SetProperty("AllowMaximum", (value)) +} + +// GetAllowMaximum gets the value of AllowMaximum for the instance +func (instance *Win32_Share) GetPropertyAllowMaximum() (value bool, err error) { + retValue, err := instance.GetProperty("AllowMaximum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMaximumAllowed sets the value of MaximumAllowed for the instance +func (instance *Win32_Share) SetPropertyMaximumAllowed(value uint32) (err error) { + return instance.SetProperty("MaximumAllowed", (value)) +} + +// GetMaximumAllowed gets the value of MaximumAllowed for the instance +func (instance *Win32_Share) GetPropertyMaximumAllowed() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumAllowed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPath sets the value of Path for the instance +func (instance *Win32_Share) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *Win32_Share) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *Win32_Share) SetPropertyType(value uint32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *Win32_Share) GetPropertyType() (value uint32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// + +// +func (instance *Win32_Share) Create( /* IN */ Path string, + /* IN */ Name string, + /* IN */ Type uint32, + /* OPTIONAL IN */ MaximumAllowed uint32, + /* OPTIONAL IN */ Description string, + /* OPTIONAL IN */ Password string, + /* OPTIONAL IN */ Access Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Create", Path, Name, Type, MaximumAllowed, Description, Password, Access) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// + +// +func (instance *Win32_Share) SetShareInfo( /* OPTIONAL IN */ MaximumAllowed uint32, + /* OPTIONAL IN */ Description string, + /* OPTIONAL IN */ Access Win32_SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetShareInfo", MaximumAllowed, Description, Access) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_Share) GetAccessMask() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("GetAccessMask") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_Share) Delete() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Delete") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShareToDirectory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShareToDirectory.go new file mode 100644 index 00000000..54625ff7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShareToDirectory.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShareToDirectory struct +type Win32_ShareToDirectory struct { + *cim.WmiInstance + + // + Share Win32_Share + + // + SharedElement CIM_Directory +} + +func NewWin32_ShareToDirectoryEx1(instance *cim.WmiInstance) (newInstance *Win32_ShareToDirectory, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ShareToDirectory{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ShareToDirectoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShareToDirectory, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShareToDirectory{ + WmiInstance: tmp, + } + return +} + +// SetShare sets the value of Share for the instance +func (instance *Win32_ShareToDirectory) SetPropertyShare(value Win32_Share) (err error) { + return instance.SetProperty("Share", (value)) +} + +// GetShare gets the value of Share for the instance +func (instance *Win32_ShareToDirectory) GetPropertyShare() (value Win32_Share, err error) { + retValue, err := instance.GetProperty("Share") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Share) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Share is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Share(valuetmp) + + return +} + +// SetSharedElement sets the value of SharedElement for the instance +func (instance *Win32_ShareToDirectory) SetPropertySharedElement(value CIM_Directory) (err error) { + return instance.SetProperty("SharedElement", (value)) +} + +// GetSharedElement gets the value of SharedElement for the instance +func (instance *Win32_ShareToDirectory) GetPropertySharedElement() (value CIM_Directory, err error) { + retValue, err := instance.GetProperty("SharedElement") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Directory) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Directory is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Directory(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutAction.go new file mode 100644 index 00000000..57962dd9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutAction.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShortcutAction struct +type Win32_ShortcutAction struct { + *CIM_Action + + // + Arguments string + + // + HotKey uint16 + + // + IconIndex string + + // + Shortcut string + + // + ShowCmd uint16 + + // + Target string + + // + WkDir string +} + +func NewWin32_ShortcutActionEx1(instance *cim.WmiInstance) (newInstance *Win32_ShortcutAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShortcutAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_ShortcutActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShortcutAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShortcutAction{ + CIM_Action: tmp, + } + return +} + +// SetArguments sets the value of Arguments for the instance +func (instance *Win32_ShortcutAction) SetPropertyArguments(value string) (err error) { + return instance.SetProperty("Arguments", (value)) +} + +// GetArguments gets the value of Arguments for the instance +func (instance *Win32_ShortcutAction) GetPropertyArguments() (value string, err error) { + retValue, err := instance.GetProperty("Arguments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHotKey sets the value of HotKey for the instance +func (instance *Win32_ShortcutAction) SetPropertyHotKey(value uint16) (err error) { + return instance.SetProperty("HotKey", (value)) +} + +// GetHotKey gets the value of HotKey for the instance +func (instance *Win32_ShortcutAction) GetPropertyHotKey() (value uint16, err error) { + retValue, err := instance.GetProperty("HotKey") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIconIndex sets the value of IconIndex for the instance +func (instance *Win32_ShortcutAction) SetPropertyIconIndex(value string) (err error) { + return instance.SetProperty("IconIndex", (value)) +} + +// GetIconIndex gets the value of IconIndex for the instance +func (instance *Win32_ShortcutAction) GetPropertyIconIndex() (value string, err error) { + retValue, err := instance.GetProperty("IconIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShortcut sets the value of Shortcut for the instance +func (instance *Win32_ShortcutAction) SetPropertyShortcut(value string) (err error) { + return instance.SetProperty("Shortcut", (value)) +} + +// GetShortcut gets the value of Shortcut for the instance +func (instance *Win32_ShortcutAction) GetPropertyShortcut() (value string, err error) { + retValue, err := instance.GetProperty("Shortcut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetShowCmd sets the value of ShowCmd for the instance +func (instance *Win32_ShortcutAction) SetPropertyShowCmd(value uint16) (err error) { + return instance.SetProperty("ShowCmd", (value)) +} + +// GetShowCmd gets the value of ShowCmd for the instance +func (instance *Win32_ShortcutAction) GetPropertyShowCmd() (value uint16, err error) { + retValue, err := instance.GetProperty("ShowCmd") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTarget sets the value of Target for the instance +func (instance *Win32_ShortcutAction) SetPropertyTarget(value string) (err error) { + return instance.SetProperty("Target", (value)) +} + +// GetTarget gets the value of Target for the instance +func (instance *Win32_ShortcutAction) GetPropertyTarget() (value string, err error) { + retValue, err := instance.GetProperty("Target") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWkDir sets the value of WkDir for the instance +func (instance *Win32_ShortcutAction) SetPropertyWkDir(value string) (err error) { + return instance.SetProperty("WkDir", (value)) +} + +// GetWkDir gets the value of WkDir for the instance +func (instance *Win32_ShortcutAction) GetPropertyWkDir() (value string, err error) { + retValue, err := instance.GetProperty("WkDir") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutFile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutFile.go new file mode 100644 index 00000000..564e462c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutFile.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShortcutFile struct +type Win32_ShortcutFile struct { + *CIM_DataFile + + // + Target string +} + +func NewWin32_ShortcutFileEx1(instance *cim.WmiInstance) (newInstance *Win32_ShortcutFile, err error) { + tmp, err := NewCIM_DataFileEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ShortcutFile{ + CIM_DataFile: tmp, + } + return +} + +func NewWin32_ShortcutFileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShortcutFile, err error) { + tmp, err := NewCIM_DataFileEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShortcutFile{ + CIM_DataFile: tmp, + } + return +} + +// SetTarget sets the value of Target for the instance +func (instance *Win32_ShortcutFile) SetPropertyTarget(value string) (err error) { + return instance.SetProperty("Target", (value)) +} + +// GetTarget gets the value of Target for the instance +func (instance *Win32_ShortcutFile) GetPropertyTarget() (value string, err error) { + retValue, err := instance.GetProperty("Target") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutSAP.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutSAP.go new file mode 100644 index 00000000..dac2301f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ShortcutSAP.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ShortcutSAP struct +type Win32_ShortcutSAP struct { + *cim.WmiInstance + + // + Action Win32_ShortcutAction + + // + Element Win32_CommandLineAccess +} + +func NewWin32_ShortcutSAPEx1(instance *cim.WmiInstance) (newInstance *Win32_ShortcutSAP, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_ShortcutSAP{ + WmiInstance: tmp, + } + return +} + +func NewWin32_ShortcutSAPEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ShortcutSAP, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ShortcutSAP{ + WmiInstance: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *Win32_ShortcutSAP) SetPropertyAction(value Win32_ShortcutAction) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *Win32_ShortcutSAP) GetPropertyAction() (value Win32_ShortcutAction, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_ShortcutAction) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_ShortcutAction is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_ShortcutAction(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_ShortcutSAP) SetPropertyElement(value Win32_CommandLineAccess) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_ShortcutSAP) GetPropertyElement() (value Win32_CommandLineAccess, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_CommandLineAccess) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_CommandLineAccess is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_CommandLineAccess(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElement.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElement.go new file mode 100644 index 00000000..f21aa74d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElement.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoftwareElement struct +type Win32_SoftwareElement struct { + *CIM_SoftwareElement + + // + Attributes uint16 + + // + InstallState int16 + + // + Path string +} + +func NewWin32_SoftwareElementEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareElement, err error) { + tmp, err := NewCIM_SoftwareElementEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElement{ + CIM_SoftwareElement: tmp, + } + return +} + +func NewWin32_SoftwareElementEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareElement, err error) { + tmp, err := NewCIM_SoftwareElementEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElement{ + CIM_SoftwareElement: tmp, + } + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_SoftwareElement) SetPropertyAttributes(value uint16) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_SoftwareElement) GetPropertyAttributes() (value uint16, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInstallState sets the value of InstallState for the instance +func (instance *Win32_SoftwareElement) SetPropertyInstallState(value int16) (err error) { + return instance.SetProperty("InstallState", (value)) +} + +// GetInstallState gets the value of InstallState for the instance +func (instance *Win32_SoftwareElement) GetPropertyInstallState() (value int16, err error) { + retValue, err := instance.GetProperty("InstallState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetPath sets the value of Path for the instance +func (instance *Win32_SoftwareElement) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *Win32_SoftwareElement) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementAction.go new file mode 100644 index 00000000..62e6fd19 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementAction.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SoftwareElementAction struct +type Win32_SoftwareElementAction struct { + *CIM_SoftwareElementActions +} + +func NewWin32_SoftwareElementActionEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareElementAction, err error) { + tmp, err := NewCIM_SoftwareElementActionsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementAction{ + CIM_SoftwareElementActions: tmp, + } + return +} + +func NewWin32_SoftwareElementActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareElementAction, err error) { + tmp, err := NewCIM_SoftwareElementActionsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementAction{ + CIM_SoftwareElementActions: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCheck.go new file mode 100644 index 00000000..67e312f5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCheck.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SoftwareElementCheck struct +type Win32_SoftwareElementCheck struct { + *CIM_SoftwareElementChecks +} + +func NewWin32_SoftwareElementCheckEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareElementCheck, err error) { + tmp, err := NewCIM_SoftwareElementChecksEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementCheck{ + CIM_SoftwareElementChecks: tmp, + } + return +} + +func NewWin32_SoftwareElementCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareElementCheck, err error) { + tmp, err := NewCIM_SoftwareElementChecksEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementCheck{ + CIM_SoftwareElementChecks: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCondition.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCondition.go new file mode 100644 index 00000000..63c3ee1c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementCondition.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoftwareElementCondition struct +type Win32_SoftwareElementCondition struct { + *CIM_Check + + // + Condition string +} + +func NewWin32_SoftwareElementConditionEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareElementCondition, err error) { + tmp, err := NewCIM_CheckEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementCondition{ + CIM_Check: tmp, + } + return +} + +func NewWin32_SoftwareElementConditionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareElementCondition, err error) { + tmp, err := NewCIM_CheckEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementCondition{ + CIM_Check: tmp, + } + return +} + +// SetCondition sets the value of Condition for the instance +func (instance *Win32_SoftwareElementCondition) SetPropertyCondition(value string) (err error) { + return instance.SetProperty("Condition", (value)) +} + +// GetCondition gets the value of Condition for the instance +func (instance *Win32_SoftwareElementCondition) GetPropertyCondition() (value string, err error) { + retValue, err := instance.GetProperty("Condition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementResource.go new file mode 100644 index 00000000..06b7346d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareElementResource.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoftwareElementResource struct +type Win32_SoftwareElementResource struct { + *Win32_ManagedSystemElementResource + + // + Element Win32_SoftwareElement + + // + Setting Win32_MSIResource +} + +func NewWin32_SoftwareElementResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareElementResource, err error) { + tmp, err := NewWin32_ManagedSystemElementResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementResource{ + Win32_ManagedSystemElementResource: tmp, + } + return +} + +func NewWin32_SoftwareElementResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareElementResource, err error) { + tmp, err := NewWin32_ManagedSystemElementResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareElementResource{ + Win32_ManagedSystemElementResource: tmp, + } + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_SoftwareElementResource) SetPropertyElement(value Win32_SoftwareElement) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_SoftwareElementResource) GetPropertyElement() (value Win32_SoftwareElement, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SoftwareElement) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SoftwareElement is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SoftwareElement(valuetmp) + + return +} + +// SetSetting sets the value of Setting for the instance +func (instance *Win32_SoftwareElementResource) SetPropertySetting(value Win32_MSIResource) (err error) { + return instance.SetProperty("Setting", (value)) +} + +// GetSetting gets the value of Setting for the instance +func (instance *Win32_SoftwareElementResource) GetPropertySetting() (value Win32_MSIResource, err error) { + retValue, err := instance.GetProperty("Setting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_MSIResource) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_MSIResource is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_MSIResource(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeature.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeature.go new file mode 100644 index 00000000..9d6aa0c7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeature.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoftwareFeature struct +type Win32_SoftwareFeature struct { + *CIM_SoftwareFeature + + // + Accesses uint16 + + // + Attributes uint16 + + // + InstallState int16 + + // + LastUse string +} + +func NewWin32_SoftwareFeatureEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareFeature, err error) { + tmp, err := NewCIM_SoftwareFeatureEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeature{ + CIM_SoftwareFeature: tmp, + } + return +} + +func NewWin32_SoftwareFeatureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareFeature, err error) { + tmp, err := NewCIM_SoftwareFeatureEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeature{ + CIM_SoftwareFeature: tmp, + } + return +} + +// SetAccesses sets the value of Accesses for the instance +func (instance *Win32_SoftwareFeature) SetPropertyAccesses(value uint16) (err error) { + return instance.SetProperty("Accesses", (value)) +} + +// GetAccesses gets the value of Accesses for the instance +func (instance *Win32_SoftwareFeature) GetPropertyAccesses() (value uint16, err error) { + retValue, err := instance.GetProperty("Accesses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAttributes sets the value of Attributes for the instance +func (instance *Win32_SoftwareFeature) SetPropertyAttributes(value uint16) (err error) { + return instance.SetProperty("Attributes", (value)) +} + +// GetAttributes gets the value of Attributes for the instance +func (instance *Win32_SoftwareFeature) GetPropertyAttributes() (value uint16, err error) { + retValue, err := instance.GetProperty("Attributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInstallState sets the value of InstallState for the instance +func (instance *Win32_SoftwareFeature) SetPropertyInstallState(value int16) (err error) { + return instance.SetProperty("InstallState", (value)) +} + +// GetInstallState gets the value of InstallState for the instance +func (instance *Win32_SoftwareFeature) GetPropertyInstallState() (value int16, err error) { + retValue, err := instance.GetProperty("InstallState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int16(valuetmp) + + return +} + +// SetLastUse sets the value of LastUse for the instance +func (instance *Win32_SoftwareFeature) SetPropertyLastUse(value string) (err error) { + return instance.SetProperty("LastUse", (value)) +} + +// GetLastUse gets the value of LastUse for the instance +func (instance *Win32_SoftwareFeature) GetPropertyLastUse() (value string, err error) { + retValue, err := instance.GetProperty("LastUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// + +// +func (instance *Win32_SoftwareFeature) Reinstall( /* IN */ ReinstallMode uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Reinstall", ReinstallMode) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_SoftwareFeature) Configure( /* IN */ InstallState uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Configure", InstallState) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureAction.go new file mode 100644 index 00000000..5579888a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureAction.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoftwareFeatureAction struct +type Win32_SoftwareFeatureAction struct { + *cim.WmiInstance + + // + Action CIM_Action + + // + Element Win32_SoftwareFeature +} + +func NewWin32_SoftwareFeatureActionEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareFeatureAction, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureAction{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SoftwareFeatureActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareFeatureAction, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureAction{ + WmiInstance: tmp, + } + return +} + +// SetAction sets the value of Action for the instance +func (instance *Win32_SoftwareFeatureAction) SetPropertyAction(value CIM_Action) (err error) { + return instance.SetProperty("Action", (value)) +} + +// GetAction gets the value of Action for the instance +func (instance *Win32_SoftwareFeatureAction) GetPropertyAction() (value CIM_Action, err error) { + retValue, err := instance.GetProperty("Action") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Action) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Action is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Action(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_SoftwareFeatureAction) SetPropertyElement(value Win32_SoftwareFeature) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_SoftwareFeatureAction) GetPropertyElement() (value Win32_SoftwareFeature, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SoftwareFeature) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SoftwareFeature is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SoftwareFeature(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureCheck.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureCheck.go new file mode 100644 index 00000000..528289b8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureCheck.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoftwareFeatureCheck struct +type Win32_SoftwareFeatureCheck struct { + *cim.WmiInstance + + // + Check CIM_Check + + // + Element Win32_SoftwareFeature +} + +func NewWin32_SoftwareFeatureCheckEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareFeatureCheck, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureCheck{ + WmiInstance: tmp, + } + return +} + +func NewWin32_SoftwareFeatureCheckEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareFeatureCheck, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureCheck{ + WmiInstance: tmp, + } + return +} + +// SetCheck sets the value of Check for the instance +func (instance *Win32_SoftwareFeatureCheck) SetPropertyCheck(value CIM_Check) (err error) { + return instance.SetProperty("Check", (value)) +} + +// GetCheck gets the value of Check for the instance +func (instance *Win32_SoftwareFeatureCheck) GetPropertyCheck() (value CIM_Check, err error) { + retValue, err := instance.GetProperty("Check") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(CIM_Check) + if !ok { + err = errors.Wrapf(errors.InvalidType, " CIM_Check is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = CIM_Check(valuetmp) + + return +} + +// SetElement sets the value of Element for the instance +func (instance *Win32_SoftwareFeatureCheck) SetPropertyElement(value Win32_SoftwareFeature) (err error) { + return instance.SetProperty("Element", (value)) +} + +// GetElement gets the value of Element for the instance +func (instance *Win32_SoftwareFeatureCheck) GetPropertyElement() (value Win32_SoftwareFeature, err error) { + retValue, err := instance.GetProperty("Element") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_SoftwareFeature) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SoftwareFeature is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_SoftwareFeature(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureParent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureParent.go new file mode 100644 index 00000000..698e5be2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureParent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SoftwareFeatureParent struct +type Win32_SoftwareFeatureParent struct { + *CIM_Dependency +} + +func NewWin32_SoftwareFeatureParentEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareFeatureParent, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureParent{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_SoftwareFeatureParentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareFeatureParent, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureParent{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureSoftwareElements.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureSoftwareElements.go new file mode 100644 index 00000000..6c8ccfc3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoftwareFeatureSoftwareElements.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SoftwareFeatureSoftwareElements struct +type Win32_SoftwareFeatureSoftwareElements struct { + *CIM_SoftwareFeatureSoftwareElements +} + +func NewWin32_SoftwareFeatureSoftwareElementsEx1(instance *cim.WmiInstance) (newInstance *Win32_SoftwareFeatureSoftwareElements, err error) { + tmp, err := NewCIM_SoftwareFeatureSoftwareElementsEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureSoftwareElements{ + CIM_SoftwareFeatureSoftwareElements: tmp, + } + return +} + +func NewWin32_SoftwareFeatureSoftwareElementsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoftwareFeatureSoftwareElements, err error) { + tmp, err := NewCIM_SoftwareFeatureSoftwareElementsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoftwareFeatureSoftwareElements{ + CIM_SoftwareFeatureSoftwareElements: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoundDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoundDevice.go new file mode 100644 index 00000000..3c750d9c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SoundDevice.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SoundDevice struct +type Win32_SoundDevice struct { + *CIM_LogicalDevice + + // + DMABufferSize uint16 + + // + Manufacturer string + + // + MPU401Address uint32 + + // + ProductName string +} + +func NewWin32_SoundDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_SoundDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SoundDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +func NewWin32_SoundDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SoundDevice, err error) { + tmp, err := NewCIM_LogicalDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SoundDevice{ + CIM_LogicalDevice: tmp, + } + return +} + +// SetDMABufferSize sets the value of DMABufferSize for the instance +func (instance *Win32_SoundDevice) SetPropertyDMABufferSize(value uint16) (err error) { + return instance.SetProperty("DMABufferSize", (value)) +} + +// GetDMABufferSize gets the value of DMABufferSize for the instance +func (instance *Win32_SoundDevice) GetPropertyDMABufferSize() (value uint16, err error) { + retValue, err := instance.GetProperty("DMABufferSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_SoundDevice) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_SoundDevice) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMPU401Address sets the value of MPU401Address for the instance +func (instance *Win32_SoundDevice) SetPropertyMPU401Address(value uint32) (err error) { + return instance.SetProperty("MPU401Address", (value)) +} + +// GetMPU401Address gets the value of MPU401Address for the instance +func (instance *Win32_SoundDevice) GetPropertyMPU401Address() (value uint32, err error) { + retValue, err := instance.GetProperty("MPU401Address") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProductName sets the value of ProductName for the instance +func (instance *Win32_SoundDevice) SetPropertyProductName(value string) (err error) { + return instance.SetProperty("ProductName", (value)) +} + +// GetProductName gets the value of ProductName for the instance +func (instance *Win32_SoundDevice) GetPropertyProductName() (value string, err error) { + retValue, err := instance.GetProperty("ProductName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_StartupCommand.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_StartupCommand.go new file mode 100644 index 00000000..c6c1d7c0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_StartupCommand.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_StartupCommand struct +type Win32_StartupCommand struct { + *CIM_Setting + + // + Command string + + // + Location string + + // + Name string + + // + User string + + // + UserSID string +} + +func NewWin32_StartupCommandEx1(instance *cim.WmiInstance) (newInstance *Win32_StartupCommand, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_StartupCommand{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_StartupCommandEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_StartupCommand, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_StartupCommand{ + CIM_Setting: tmp, + } + return +} + +// SetCommand sets the value of Command for the instance +func (instance *Win32_StartupCommand) SetPropertyCommand(value string) (err error) { + return instance.SetProperty("Command", (value)) +} + +// GetCommand gets the value of Command for the instance +func (instance *Win32_StartupCommand) GetPropertyCommand() (value string, err error) { + retValue, err := instance.GetProperty("Command") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *Win32_StartupCommand) SetPropertyLocation(value string) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *Win32_StartupCommand) GetPropertyLocation() (value string, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_StartupCommand) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_StartupCommand) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUser sets the value of User for the instance +func (instance *Win32_StartupCommand) SetPropertyUser(value string) (err error) { + return instance.SetProperty("User", (value)) +} + +// GetUser gets the value of User for the instance +func (instance *Win32_StartupCommand) GetPropertyUser() (value string, err error) { + retValue, err := instance.GetProperty("User") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUserSID sets the value of UserSID for the instance +func (instance *Win32_StartupCommand) SetPropertyUserSID(value string) (err error) { + return instance.SetProperty("UserSID", (value)) +} + +// GetUserSID gets the value of UserSID for the instance +func (instance *Win32_StartupCommand) GetPropertyUserSID() (value string, err error) { + retValue, err := instance.GetProperty("UserSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubDirectory.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubDirectory.go new file mode 100644 index 00000000..53d6939d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubDirectory.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SubDirectory struct +type Win32_SubDirectory struct { + *CIM_Component +} + +func NewWin32_SubDirectoryEx1(instance *cim.WmiInstance) (newInstance *Win32_SubDirectory, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SubDirectory{ + CIM_Component: tmp, + } + return +} + +func NewWin32_SubDirectoryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SubDirectory, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SubDirectory{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubSession.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubSession.go new file mode 100644 index 00000000..f7695b83 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SubSession.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SubSession struct +type Win32_SubSession struct { + *CIM_Dependency +} + +func NewWin32_SubSessionEx1(instance *cim.WmiInstance) (newInstance *Win32_SubSession, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SubSession{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_SubSessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SubSession, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SubSession{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemAccount.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemAccount.go new file mode 100644 index 00000000..9a08afc8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemAccount.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemAccount struct +type Win32_SystemAccount struct { + *Win32_Account +} + +func NewWin32_SystemAccountEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemAccount, err error) { + tmp, err := NewWin32_AccountEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemAccount{ + Win32_Account: tmp, + } + return +} + +func NewWin32_SystemAccountEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemAccount, err error) { + tmp, err := NewWin32_AccountEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemAccount{ + Win32_Account: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBIOS.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBIOS.go new file mode 100644 index 00000000..d397aa5f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBIOS.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemBIOS struct +type Win32_SystemBIOS struct { + *CIM_SystemComponent +} + +func NewWin32_SystemBIOSEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemBIOS, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemBIOS{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemBIOSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemBIOS, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemBIOS{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBootConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBootConfiguration.go new file mode 100644 index 00000000..70126160 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemBootConfiguration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemBootConfiguration struct +type Win32_SystemBootConfiguration struct { + *Win32_SystemSetting +} + +func NewWin32_SystemBootConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemBootConfiguration, err error) { + tmp, err := NewWin32_SystemSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemBootConfiguration{ + Win32_SystemSetting: tmp, + } + return +} + +func NewWin32_SystemBootConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemBootConfiguration, err error) { + tmp, err := NewWin32_SystemSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemBootConfiguration{ + Win32_SystemSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemConfigurationChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemConfigurationChangeEvent.go new file mode 100644 index 00000000..01055f73 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemConfigurationChangeEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemConfigurationChangeEvent struct +type Win32_SystemConfigurationChangeEvent struct { + *Win32_DeviceChangeEvent +} + +func NewWin32_SystemConfigurationChangeEventEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemConfigurationChangeEvent, err error) { + tmp, err := NewWin32_DeviceChangeEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemConfigurationChangeEvent{ + Win32_DeviceChangeEvent: tmp, + } + return +} + +func NewWin32_SystemConfigurationChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemConfigurationChangeEvent, err error) { + tmp, err := NewWin32_DeviceChangeEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemConfigurationChangeEvent{ + Win32_DeviceChangeEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDesktop.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDesktop.go new file mode 100644 index 00000000..ed23f947 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDesktop.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemDesktop struct +type Win32_SystemDesktop struct { + *Win32_SystemSetting +} + +func NewWin32_SystemDesktopEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemDesktop, err error) { + tmp, err := NewWin32_SystemSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemDesktop{ + Win32_SystemSetting: tmp, + } + return +} + +func NewWin32_SystemDesktopEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemDesktop, err error) { + tmp, err := NewWin32_SystemSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemDesktop{ + Win32_SystemSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDevices.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDevices.go new file mode 100644 index 00000000..1b0d4150 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDevices.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemDevices struct +type Win32_SystemDevices struct { + *CIM_SystemDevice +} + +func NewWin32_SystemDevicesEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemDevices, err error) { + tmp, err := NewCIM_SystemDeviceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemDevices{ + CIM_SystemDevice: tmp, + } + return +} + +func NewWin32_SystemDevicesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemDevices, err error) { + tmp, err := NewCIM_SystemDeviceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemDevices{ + CIM_SystemDevice: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriver.go new file mode 100644 index 00000000..be730367 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriver.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemDriver struct +type Win32_SystemDriver struct { + *Win32_BaseService +} + +func NewWin32_SystemDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemDriver, err error) { + tmp, err := NewWin32_BaseServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemDriver{ + Win32_BaseService: tmp, + } + return +} + +func NewWin32_SystemDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemDriver, err error) { + tmp, err := NewWin32_BaseServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemDriver{ + Win32_BaseService: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriverPNPEntity.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriverPNPEntity.go new file mode 100644 index 00000000..292ffc94 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemDriverPNPEntity.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemDriverPNPEntity struct +type Win32_SystemDriverPNPEntity struct { + *CIM_Dependency +} + +func NewWin32_SystemDriverPNPEntityEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemDriverPNPEntity, err error) { + tmp, err := NewCIM_DependencyEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemDriverPNPEntity{ + CIM_Dependency: tmp, + } + return +} + +func NewWin32_SystemDriverPNPEntityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemDriverPNPEntity, err error) { + tmp, err := NewCIM_DependencyEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemDriverPNPEntity{ + CIM_Dependency: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemEnclosure.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemEnclosure.go new file mode 100644 index 00000000..b51490d0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemEnclosure.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SystemEnclosure struct +type Win32_SystemEnclosure struct { + *CIM_Chassis + + // + SecurityStatus uint16 + + // + SMBIOSAssetTag string +} + +func NewWin32_SystemEnclosureEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemEnclosure, err error) { + tmp, err := NewCIM_ChassisEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemEnclosure{ + CIM_Chassis: tmp, + } + return +} + +func NewWin32_SystemEnclosureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemEnclosure, err error) { + tmp, err := NewCIM_ChassisEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemEnclosure{ + CIM_Chassis: tmp, + } + return +} + +// SetSecurityStatus sets the value of SecurityStatus for the instance +func (instance *Win32_SystemEnclosure) SetPropertySecurityStatus(value uint16) (err error) { + return instance.SetProperty("SecurityStatus", (value)) +} + +// GetSecurityStatus gets the value of SecurityStatus for the instance +func (instance *Win32_SystemEnclosure) GetPropertySecurityStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("SecurityStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSMBIOSAssetTag sets the value of SMBIOSAssetTag for the instance +func (instance *Win32_SystemEnclosure) SetPropertySMBIOSAssetTag(value string) (err error) { + return instance.SetProperty("SMBIOSAssetTag", (value)) +} + +// GetSMBIOSAssetTag gets the value of SMBIOSAssetTag for the instance +func (instance *Win32_SystemEnclosure) GetPropertySMBIOSAssetTag() (value string, err error) { + retValue, err := instance.GetProperty("SMBIOSAssetTag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemLoadOrderGroups.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemLoadOrderGroups.go new file mode 100644 index 00000000..6f5762e3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemLoadOrderGroups.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemLoadOrderGroups struct +type Win32_SystemLoadOrderGroups struct { + *CIM_SystemComponent +} + +func NewWin32_SystemLoadOrderGroupsEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemLoadOrderGroups, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemLoadOrderGroups{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemLoadOrderGroupsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemLoadOrderGroups, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemLoadOrderGroups{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemMemoryResource.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemMemoryResource.go new file mode 100644 index 00000000..05b5001b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemMemoryResource.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemMemoryResource struct +type Win32_SystemMemoryResource struct { + *CIM_MemoryMappedIO +} + +func NewWin32_SystemMemoryResourceEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemMemoryResource, err error) { + tmp, err := NewCIM_MemoryMappedIOEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemMemoryResource{ + CIM_MemoryMappedIO: tmp, + } + return +} + +func NewWin32_SystemMemoryResourceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemMemoryResource, err error) { + tmp, err := NewCIM_MemoryMappedIOEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemMemoryResource{ + CIM_MemoryMappedIO: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemNetworkConnections.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemNetworkConnections.go new file mode 100644 index 00000000..bb489c28 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemNetworkConnections.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemNetworkConnections struct +type Win32_SystemNetworkConnections struct { + *CIM_SystemComponent +} + +func NewWin32_SystemNetworkConnectionsEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemNetworkConnections, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemNetworkConnections{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemNetworkConnectionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemNetworkConnections, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemNetworkConnections{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemOperatingSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemOperatingSystem.go new file mode 100644 index 00000000..62e6a1aa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemOperatingSystem.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemOperatingSystem struct +type Win32_SystemOperatingSystem struct { + *CIM_InstalledOS +} + +func NewWin32_SystemOperatingSystemEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemOperatingSystem, err error) { + tmp, err := NewCIM_InstalledOSEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemOperatingSystem{ + CIM_InstalledOS: tmp, + } + return +} + +func NewWin32_SystemOperatingSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemOperatingSystem, err error) { + tmp, err := NewCIM_InstalledOSEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemOperatingSystem{ + CIM_InstalledOS: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemPartitions.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemPartitions.go new file mode 100644 index 00000000..ec3a844f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemPartitions.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemPartitions struct +type Win32_SystemPartitions struct { + *Win32_SystemDevices +} + +func NewWin32_SystemPartitionsEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemPartitions, err error) { + tmp, err := NewWin32_SystemDevicesEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemPartitions{ + Win32_SystemDevices: tmp, + } + return +} + +func NewWin32_SystemPartitionsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemPartitions, err error) { + tmp, err := NewWin32_SystemDevicesEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemPartitions{ + Win32_SystemDevices: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProcesses.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProcesses.go new file mode 100644 index 00000000..8ec2df3a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProcesses.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemProcesses struct +type Win32_SystemProcesses struct { + *CIM_SystemComponent +} + +func NewWin32_SystemProcessesEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemProcesses, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemProcesses{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemProcessesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemProcesses, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemProcesses{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProgramGroups.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProgramGroups.go new file mode 100644 index 00000000..fe160d9b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemProgramGroups.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemProgramGroups struct +type Win32_SystemProgramGroups struct { + *Win32_SystemSetting +} + +func NewWin32_SystemProgramGroupsEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemProgramGroups, err error) { + tmp, err := NewWin32_SystemSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemProgramGroups{ + Win32_SystemSetting: tmp, + } + return +} + +func NewWin32_SystemProgramGroupsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemProgramGroups, err error) { + tmp, err := NewWin32_SystemSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemProgramGroups{ + Win32_SystemSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemResources.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemResources.go new file mode 100644 index 00000000..a77217b0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemResources.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemResources struct +type Win32_SystemResources struct { + *CIM_ComputerSystemResource +} + +func NewWin32_SystemResourcesEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemResources, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemResources{ + CIM_ComputerSystemResource: tmp, + } + return +} + +func NewWin32_SystemResourcesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemResources, err error) { + tmp, err := NewCIM_ComputerSystemResourceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemResources{ + CIM_ComputerSystemResource: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemServices.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemServices.go new file mode 100644 index 00000000..8cc015fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemServices.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemServices struct +type Win32_SystemServices struct { + *CIM_SystemComponent +} + +func NewWin32_SystemServicesEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemServices, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemServices{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemServicesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemServices, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemServices{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSetting.go new file mode 100644 index 00000000..225165eb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemSetting struct +type Win32_SystemSetting struct { + *CIM_ElementSetting +} + +func NewWin32_SystemSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_SystemSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSlot.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSlot.go new file mode 100644 index 00000000..a67e854b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSlot.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_SystemSlot struct +type Win32_SystemSlot struct { + *CIM_Slot + + // + BusNumber uint32 + + // + CurrentUsage uint16 + + // + DeviceNumber uint32 + + // + FunctionNumber uint32 + + // + PMESignal bool + + // + SegmentGroupNumber uint32 + + // + Shared bool + + // + SlotDesignation string +} + +func NewWin32_SystemSlotEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemSlot, err error) { + tmp, err := NewCIM_SlotEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemSlot{ + CIM_Slot: tmp, + } + return +} + +func NewWin32_SystemSlotEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemSlot, err error) { + tmp, err := NewCIM_SlotEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemSlot{ + CIM_Slot: tmp, + } + return +} + +// SetBusNumber sets the value of BusNumber for the instance +func (instance *Win32_SystemSlot) SetPropertyBusNumber(value uint32) (err error) { + return instance.SetProperty("BusNumber", (value)) +} + +// GetBusNumber gets the value of BusNumber for the instance +func (instance *Win32_SystemSlot) GetPropertyBusNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("BusNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUsage sets the value of CurrentUsage for the instance +func (instance *Win32_SystemSlot) SetPropertyCurrentUsage(value uint16) (err error) { + return instance.SetProperty("CurrentUsage", (value)) +} + +// GetCurrentUsage gets the value of CurrentUsage for the instance +func (instance *Win32_SystemSlot) GetPropertyCurrentUsage() (value uint16, err error) { + retValue, err := instance.GetProperty("CurrentUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDeviceNumber sets the value of DeviceNumber for the instance +func (instance *Win32_SystemSlot) SetPropertyDeviceNumber(value uint32) (err error) { + return instance.SetProperty("DeviceNumber", (value)) +} + +// GetDeviceNumber gets the value of DeviceNumber for the instance +func (instance *Win32_SystemSlot) GetPropertyDeviceNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("DeviceNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFunctionNumber sets the value of FunctionNumber for the instance +func (instance *Win32_SystemSlot) SetPropertyFunctionNumber(value uint32) (err error) { + return instance.SetProperty("FunctionNumber", (value)) +} + +// GetFunctionNumber gets the value of FunctionNumber for the instance +func (instance *Win32_SystemSlot) GetPropertyFunctionNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("FunctionNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPMESignal sets the value of PMESignal for the instance +func (instance *Win32_SystemSlot) SetPropertyPMESignal(value bool) (err error) { + return instance.SetProperty("PMESignal", (value)) +} + +// GetPMESignal gets the value of PMESignal for the instance +func (instance *Win32_SystemSlot) GetPropertyPMESignal() (value bool, err error) { + retValue, err := instance.GetProperty("PMESignal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSegmentGroupNumber sets the value of SegmentGroupNumber for the instance +func (instance *Win32_SystemSlot) SetPropertySegmentGroupNumber(value uint32) (err error) { + return instance.SetProperty("SegmentGroupNumber", (value)) +} + +// GetSegmentGroupNumber gets the value of SegmentGroupNumber for the instance +func (instance *Win32_SystemSlot) GetPropertySegmentGroupNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("SegmentGroupNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetShared sets the value of Shared for the instance +func (instance *Win32_SystemSlot) SetPropertyShared(value bool) (err error) { + return instance.SetProperty("Shared", (value)) +} + +// GetShared gets the value of Shared for the instance +func (instance *Win32_SystemSlot) GetPropertyShared() (value bool, err error) { + retValue, err := instance.GetProperty("Shared") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlotDesignation sets the value of SlotDesignation for the instance +func (instance *Win32_SystemSlot) SetPropertySlotDesignation(value string) (err error) { + return instance.SetProperty("SlotDesignation", (value)) +} + +// GetSlotDesignation gets the value of SlotDesignation for the instance +func (instance *Win32_SystemSlot) GetPropertySlotDesignation() (value string, err error) { + retValue, err := instance.GetProperty("SlotDesignation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSystemDriver.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSystemDriver.go new file mode 100644 index 00000000..517383a0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemSystemDriver.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemSystemDriver struct +type Win32_SystemSystemDriver struct { + *CIM_SystemComponent +} + +func NewWin32_SystemSystemDriverEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemSystemDriver, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemSystemDriver{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemSystemDriverEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemSystemDriver, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemSystemDriver{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTimeZone.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTimeZone.go new file mode 100644 index 00000000..7b47a72c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTimeZone.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemTimeZone struct +type Win32_SystemTimeZone struct { + *Win32_SystemSetting +} + +func NewWin32_SystemTimeZoneEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemTimeZone, err error) { + tmp, err := NewWin32_SystemSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemTimeZone{ + Win32_SystemSetting: tmp, + } + return +} + +func NewWin32_SystemTimeZoneEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemTimeZone, err error) { + tmp, err := NewWin32_SystemSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemTimeZone{ + Win32_SystemSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTrace.go new file mode 100644 index 00000000..541a141a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemTrace.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemTrace struct +type Win32_SystemTrace struct { + *__ExtrinsicEvent +} + +func NewWin32_SystemTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemTrace, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemTrace{ + __ExtrinsicEvent: tmp, + } + return +} + +func NewWin32_SystemTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemTrace, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemTrace{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemUsers.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemUsers.go new file mode 100644 index 00000000..10674d64 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_SystemUsers.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_SystemUsers struct +type Win32_SystemUsers struct { + *CIM_SystemComponent +} + +func NewWin32_SystemUsersEx1(instance *cim.WmiInstance) (newInstance *Win32_SystemUsers, err error) { + tmp, err := NewCIM_SystemComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_SystemUsers{ + CIM_SystemComponent: tmp, + } + return +} + +func NewWin32_SystemUsersEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_SystemUsers, err error) { + tmp, err := NewCIM_SystemComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_SystemUsers{ + CIM_SystemComponent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TCPIPPrinterPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TCPIPPrinterPort.go new file mode 100644 index 00000000..9bc20604 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TCPIPPrinterPort.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TCPIPPrinterPort struct +type Win32_TCPIPPrinterPort struct { + *CIM_ServiceAccessPoint + + // The ByteCount property, when true, causes the computer to count the number of bytes in a document before sending them to the printer and the printer to report back the number of bytes actually read. This is used for diagnostics when one discovers that bytes are missing from the print output. + ByteCount bool + + // The HostAddress property indicates the address of device or print server + HostAddress string + + // The PortNumber property indicates the number of the TCP port used by the port monitor to communitcate with the device. + PortNumber uint32 + + // The Protocol property has two values: 'Raw' indicates printing directly to a device and 'Lpr' indicates printing to device or print server; LPR is a legacy protocol, which will eventually be replaced by RAW. Some printers support only LPR. + Protocol TCPIPPrinterPort_Protocol + + // The Queue property is used with the LPR protocol to indicate the name of the print queue on the server. + Queue string + + // The SNMPCommunity property contains a security level value for the device. For example 'public'. + SNMPCommunity string + + // The property SNMPDevIndex indicates the SNMP index number of this device for the SNMP agent. + SNMPDevIndex uint32 + + // The SNMPEnabled property, when true, indicates that this printer supports RFC1759 (Simple Network Management Protocol) and can provide rich status information from the device. + SNMPEnabled bool +} + +func NewWin32_TCPIPPrinterPortEx1(instance *cim.WmiInstance) (newInstance *Win32_TCPIPPrinterPort, err error) { + tmp, err := NewCIM_ServiceAccessPointEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_TCPIPPrinterPort{ + CIM_ServiceAccessPoint: tmp, + } + return +} + +func NewWin32_TCPIPPrinterPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TCPIPPrinterPort, err error) { + tmp, err := NewCIM_ServiceAccessPointEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TCPIPPrinterPort{ + CIM_ServiceAccessPoint: tmp, + } + return +} + +// SetByteCount sets the value of ByteCount for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertyByteCount(value bool) (err error) { + return instance.SetProperty("ByteCount", (value)) +} + +// GetByteCount gets the value of ByteCount for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertyByteCount() (value bool, err error) { + retValue, err := instance.GetProperty("ByteCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHostAddress sets the value of HostAddress for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertyHostAddress(value string) (err error) { + return instance.SetProperty("HostAddress", (value)) +} + +// GetHostAddress gets the value of HostAddress for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertyHostAddress() (value string, err error) { + retValue, err := instance.GetProperty("HostAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortNumber sets the value of PortNumber for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertyPortNumber(value uint32) (err error) { + return instance.SetProperty("PortNumber", (value)) +} + +// GetPortNumber gets the value of PortNumber for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertyPortNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("PortNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProtocol sets the value of Protocol for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertyProtocol(value TCPIPPrinterPort_Protocol) (err error) { + return instance.SetProperty("Protocol", (value)) +} + +// GetProtocol gets the value of Protocol for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertyProtocol() (value TCPIPPrinterPort_Protocol, err error) { + retValue, err := instance.GetProperty("Protocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = TCPIPPrinterPort_Protocol(valuetmp) + + return +} + +// SetQueue sets the value of Queue for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertyQueue(value string) (err error) { + return instance.SetProperty("Queue", (value)) +} + +// GetQueue gets the value of Queue for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertyQueue() (value string, err error) { + retValue, err := instance.GetProperty("Queue") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSNMPCommunity sets the value of SNMPCommunity for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertySNMPCommunity(value string) (err error) { + return instance.SetProperty("SNMPCommunity", (value)) +} + +// GetSNMPCommunity gets the value of SNMPCommunity for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertySNMPCommunity() (value string, err error) { + retValue, err := instance.GetProperty("SNMPCommunity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSNMPDevIndex sets the value of SNMPDevIndex for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertySNMPDevIndex(value uint32) (err error) { + return instance.SetProperty("SNMPDevIndex", (value)) +} + +// GetSNMPDevIndex gets the value of SNMPDevIndex for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertySNMPDevIndex() (value uint32, err error) { + retValue, err := instance.GetProperty("SNMPDevIndex") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSNMPEnabled sets the value of SNMPEnabled for the instance +func (instance *Win32_TCPIPPrinterPort) SetPropertySNMPEnabled(value bool) (err error) { + return instance.SetProperty("SNMPEnabled", (value)) +} + +// GetSNMPEnabled gets the value of SNMPEnabled for the instance +func (instance *Win32_TCPIPPrinterPort) GetPropertySNMPEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("SNMPEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TapeDrive.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TapeDrive.go new file mode 100644 index 00000000..536ab2e0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TapeDrive.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TapeDrive struct +type Win32_TapeDrive struct { + *CIM_TapeDrive + + // + Compression uint32 + + // + ECC uint32 + + // + FeaturesHigh uint32 + + // + FeaturesLow uint32 + + // + Id string + + // + Manufacturer string + + // + MediaType string + + // + ReportSetMarks uint32 +} + +func NewWin32_TapeDriveEx1(instance *cim.WmiInstance) (newInstance *Win32_TapeDrive, err error) { + tmp, err := NewCIM_TapeDriveEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_TapeDrive{ + CIM_TapeDrive: tmp, + } + return +} + +func NewWin32_TapeDriveEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TapeDrive, err error) { + tmp, err := NewCIM_TapeDriveEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TapeDrive{ + CIM_TapeDrive: tmp, + } + return +} + +// SetCompression sets the value of Compression for the instance +func (instance *Win32_TapeDrive) SetPropertyCompression(value uint32) (err error) { + return instance.SetProperty("Compression", (value)) +} + +// GetCompression gets the value of Compression for the instance +func (instance *Win32_TapeDrive) GetPropertyCompression() (value uint32, err error) { + retValue, err := instance.GetProperty("Compression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetECC sets the value of ECC for the instance +func (instance *Win32_TapeDrive) SetPropertyECC(value uint32) (err error) { + return instance.SetProperty("ECC", (value)) +} + +// GetECC gets the value of ECC for the instance +func (instance *Win32_TapeDrive) GetPropertyECC() (value uint32, err error) { + retValue, err := instance.GetProperty("ECC") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFeaturesHigh sets the value of FeaturesHigh for the instance +func (instance *Win32_TapeDrive) SetPropertyFeaturesHigh(value uint32) (err error) { + return instance.SetProperty("FeaturesHigh", (value)) +} + +// GetFeaturesHigh gets the value of FeaturesHigh for the instance +func (instance *Win32_TapeDrive) GetPropertyFeaturesHigh() (value uint32, err error) { + retValue, err := instance.GetProperty("FeaturesHigh") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFeaturesLow sets the value of FeaturesLow for the instance +func (instance *Win32_TapeDrive) SetPropertyFeaturesLow(value uint32) (err error) { + return instance.SetProperty("FeaturesLow", (value)) +} + +// GetFeaturesLow gets the value of FeaturesLow for the instance +func (instance *Win32_TapeDrive) GetPropertyFeaturesLow() (value uint32, err error) { + retValue, err := instance.GetProperty("FeaturesLow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetId sets the value of Id for the instance +func (instance *Win32_TapeDrive) SetPropertyId(value string) (err error) { + return instance.SetProperty("Id", (value)) +} + +// GetId gets the value of Id for the instance +func (instance *Win32_TapeDrive) GetPropertyId() (value string, err error) { + retValue, err := instance.GetProperty("Id") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *Win32_TapeDrive) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *Win32_TapeDrive) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *Win32_TapeDrive) SetPropertyMediaType(value string) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *Win32_TapeDrive) GetPropertyMediaType() (value string, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReportSetMarks sets the value of ReportSetMarks for the instance +func (instance *Win32_TapeDrive) SetPropertyReportSetMarks(value uint32) (err error) { + return instance.SetProperty("ReportSetMarks", (value)) +} + +// GetReportSetMarks gets the value of ReportSetMarks for the instance +func (instance *Win32_TapeDrive) GetPropertyReportSetMarks() (value uint32, err error) { + retValue, err := instance.GetProperty("ReportSetMarks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TemperatureProbe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TemperatureProbe.go new file mode 100644 index 00000000..1b6c807a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TemperatureProbe.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_TemperatureProbe struct +type Win32_TemperatureProbe struct { + *CIM_TemperatureSensor +} + +func NewWin32_TemperatureProbeEx1(instance *cim.WmiInstance) (newInstance *Win32_TemperatureProbe, err error) { + tmp, err := NewCIM_TemperatureSensorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_TemperatureProbe{ + CIM_TemperatureSensor: tmp, + } + return +} + +func NewWin32_TemperatureProbeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TemperatureProbe, err error) { + tmp, err := NewCIM_TemperatureSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TemperatureProbe{ + CIM_TemperatureSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TerminalService.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TerminalService.go new file mode 100644 index 00000000..199689c2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TerminalService.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TerminalService struct +type Win32_TerminalService struct { + *Win32_Service + + // + DisconnectedSessions uint32 + + // + TotalSessions uint32 +} + +func NewWin32_TerminalServiceEx1(instance *cim.WmiInstance) (newInstance *Win32_TerminalService, err error) { + tmp, err := NewWin32_ServiceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_TerminalService{ + Win32_Service: tmp, + } + return +} + +func NewWin32_TerminalServiceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TerminalService, err error) { + tmp, err := NewWin32_ServiceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TerminalService{ + Win32_Service: tmp, + } + return +} + +// SetDisconnectedSessions sets the value of DisconnectedSessions for the instance +func (instance *Win32_TerminalService) SetPropertyDisconnectedSessions(value uint32) (err error) { + return instance.SetProperty("DisconnectedSessions", (value)) +} + +// GetDisconnectedSessions gets the value of DisconnectedSessions for the instance +func (instance *Win32_TerminalService) GetPropertyDisconnectedSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("DisconnectedSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTotalSessions sets the value of TotalSessions for the instance +func (instance *Win32_TerminalService) SetPropertyTotalSessions(value uint32) (err error) { + return instance.SetProperty("TotalSessions", (value)) +} + +// GetTotalSessions gets the value of TotalSessions for the instance +func (instance *Win32_TerminalService) GetPropertyTotalSessions() (value uint32, err error) { + retValue, err := instance.GetProperty("TotalSessions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Thread.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Thread.go new file mode 100644 index 00000000..9360dd80 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Thread.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Thread struct +type Win32_Thread struct { + *CIM_Thread + + // + ElapsedTime uint64 + + // + PriorityBase uint32 + + // + StartAddress uint32 + + // + ThreadState uint32 + + // + ThreadWaitReason uint32 +} + +func NewWin32_ThreadEx1(instance *cim.WmiInstance) (newInstance *Win32_Thread, err error) { + tmp, err := NewCIM_ThreadEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Thread{ + CIM_Thread: tmp, + } + return +} + +func NewWin32_ThreadEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Thread, err error) { + tmp, err := NewCIM_ThreadEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Thread{ + CIM_Thread: tmp, + } + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *Win32_Thread) SetPropertyElapsedTime(value uint64) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *Win32_Thread) GetPropertyElapsedTime() (value uint64, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPriorityBase sets the value of PriorityBase for the instance +func (instance *Win32_Thread) SetPropertyPriorityBase(value uint32) (err error) { + return instance.SetProperty("PriorityBase", (value)) +} + +// GetPriorityBase gets the value of PriorityBase for the instance +func (instance *Win32_Thread) GetPropertyPriorityBase() (value uint32, err error) { + retValue, err := instance.GetProperty("PriorityBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStartAddress sets the value of StartAddress for the instance +func (instance *Win32_Thread) SetPropertyStartAddress(value uint32) (err error) { + return instance.SetProperty("StartAddress", (value)) +} + +// GetStartAddress gets the value of StartAddress for the instance +func (instance *Win32_Thread) GetPropertyStartAddress() (value uint32, err error) { + retValue, err := instance.GetProperty("StartAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadState sets the value of ThreadState for the instance +func (instance *Win32_Thread) SetPropertyThreadState(value uint32) (err error) { + return instance.SetProperty("ThreadState", (value)) +} + +// GetThreadState gets the value of ThreadState for the instance +func (instance *Win32_Thread) GetPropertyThreadState() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadWaitReason sets the value of ThreadWaitReason for the instance +func (instance *Win32_Thread) SetPropertyThreadWaitReason(value uint32) (err error) { + return instance.SetProperty("ThreadWaitReason", (value)) +} + +// GetThreadWaitReason gets the value of ThreadWaitReason for the instance +func (instance *Win32_Thread) GetPropertyThreadWaitReason() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadWaitReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStartTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStartTrace.go new file mode 100644 index 00000000..4488c42a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStartTrace.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ThreadStartTrace struct +type Win32_ThreadStartTrace struct { + *Win32_ThreadTrace + + // + StackBase uint64 + + // + StackLimit uint64 + + // + StartAddr uint64 + + // + UserStackBase uint64 + + // + UserStackLimit uint64 + + // + WaitMode uint32 + + // + Win32StartAddr uint64 +} + +func NewWin32_ThreadStartTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ThreadStartTrace, err error) { + tmp, err := NewWin32_ThreadTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ThreadStartTrace{ + Win32_ThreadTrace: tmp, + } + return +} + +func NewWin32_ThreadStartTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ThreadStartTrace, err error) { + tmp, err := NewWin32_ThreadTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ThreadStartTrace{ + Win32_ThreadTrace: tmp, + } + return +} + +// SetStackBase sets the value of StackBase for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyStackBase(value uint64) (err error) { + return instance.SetProperty("StackBase", (value)) +} + +// GetStackBase gets the value of StackBase for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyStackBase() (value uint64, err error) { + retValue, err := instance.GetProperty("StackBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStackLimit sets the value of StackLimit for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyStackLimit(value uint64) (err error) { + return instance.SetProperty("StackLimit", (value)) +} + +// GetStackLimit gets the value of StackLimit for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyStackLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("StackLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartAddr sets the value of StartAddr for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyStartAddr(value uint64) (err error) { + return instance.SetProperty("StartAddr", (value)) +} + +// GetStartAddr gets the value of StartAddr for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyStartAddr() (value uint64, err error) { + retValue, err := instance.GetProperty("StartAddr") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUserStackBase sets the value of UserStackBase for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyUserStackBase(value uint64) (err error) { + return instance.SetProperty("UserStackBase", (value)) +} + +// GetUserStackBase gets the value of UserStackBase for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyUserStackBase() (value uint64, err error) { + retValue, err := instance.GetProperty("UserStackBase") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUserStackLimit sets the value of UserStackLimit for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyUserStackLimit(value uint64) (err error) { + return instance.SetProperty("UserStackLimit", (value)) +} + +// GetUserStackLimit gets the value of UserStackLimit for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyUserStackLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("UserStackLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWaitMode sets the value of WaitMode for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyWaitMode(value uint32) (err error) { + return instance.SetProperty("WaitMode", (value)) +} + +// GetWaitMode gets the value of WaitMode for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyWaitMode() (value uint32, err error) { + retValue, err := instance.GetProperty("WaitMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWin32StartAddr sets the value of Win32StartAddr for the instance +func (instance *Win32_ThreadStartTrace) SetPropertyWin32StartAddr(value uint64) (err error) { + return instance.SetProperty("Win32StartAddr", (value)) +} + +// GetWin32StartAddr gets the value of Win32StartAddr for the instance +func (instance *Win32_ThreadStartTrace) GetPropertyWin32StartAddr() (value uint64, err error) { + retValue, err := instance.GetProperty("Win32StartAddr") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStopTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStopTrace.go new file mode 100644 index 00000000..ea582c9c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadStopTrace.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_ThreadStopTrace struct +type Win32_ThreadStopTrace struct { + *Win32_ThreadTrace +} + +func NewWin32_ThreadStopTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ThreadStopTrace, err error) { + tmp, err := NewWin32_ThreadTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ThreadStopTrace{ + Win32_ThreadTrace: tmp, + } + return +} + +func NewWin32_ThreadStopTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ThreadStopTrace, err error) { + tmp, err := NewWin32_ThreadTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ThreadStopTrace{ + Win32_ThreadTrace: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadTrace.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadTrace.go new file mode 100644 index 00000000..363cc192 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_ThreadTrace.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_ThreadTrace struct +type Win32_ThreadTrace struct { + *Win32_SystemTrace + + // + ProcessID uint32 + + // + ThreadID uint32 +} + +func NewWin32_ThreadTraceEx1(instance *cim.WmiInstance) (newInstance *Win32_ThreadTrace, err error) { + tmp, err := NewWin32_SystemTraceEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_ThreadTrace{ + Win32_SystemTrace: tmp, + } + return +} + +func NewWin32_ThreadTraceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_ThreadTrace, err error) { + tmp, err := NewWin32_SystemTraceEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_ThreadTrace{ + Win32_SystemTrace: tmp, + } + return +} + +// SetProcessID sets the value of ProcessID for the instance +func (instance *Win32_ThreadTrace) SetPropertyProcessID(value uint32) (err error) { + return instance.SetProperty("ProcessID", (value)) +} + +// GetProcessID gets the value of ProcessID for the instance +func (instance *Win32_ThreadTrace) GetPropertyProcessID() (value uint32, err error) { + retValue, err := instance.GetProperty("ProcessID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetThreadID sets the value of ThreadID for the instance +func (instance *Win32_ThreadTrace) SetPropertyThreadID(value uint32) (err error) { + return instance.SetProperty("ThreadID", (value)) +} + +// GetThreadID gets the value of ThreadID for the instance +func (instance *Win32_ThreadTrace) GetPropertyThreadID() (value uint32, err error) { + retValue, err := instance.GetProperty("ThreadID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TimeZone.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TimeZone.go new file mode 100644 index 00000000..ecc8b18e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TimeZone.go @@ -0,0 +1,680 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TimeZone struct +type Win32_TimeZone struct { + *CIM_Setting + + // + Bias int32 + + // + DaylightBias int32 + + // + DaylightDay uint32 + + // + DaylightDayOfWeek uint8 + + // + DaylightHour uint32 + + // + DaylightMillisecond uint32 + + // + DaylightMinute uint32 + + // + DaylightMonth uint32 + + // + DaylightName string + + // + DaylightSecond uint32 + + // + DaylightYear uint32 + + // + StandardBias uint32 + + // + StandardDay uint32 + + // + StandardDayOfWeek uint8 + + // + StandardHour uint32 + + // + StandardMillisecond uint32 + + // + StandardMinute uint32 + + // + StandardMonth uint32 + + // + StandardName string + + // + StandardSecond uint32 + + // + StandardYear uint32 +} + +func NewWin32_TimeZoneEx1(instance *cim.WmiInstance) (newInstance *Win32_TimeZone, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_TimeZone{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_TimeZoneEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TimeZone, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TimeZone{ + CIM_Setting: tmp, + } + return +} + +// SetBias sets the value of Bias for the instance +func (instance *Win32_TimeZone) SetPropertyBias(value int32) (err error) { + return instance.SetProperty("Bias", (value)) +} + +// GetBias gets the value of Bias for the instance +func (instance *Win32_TimeZone) GetPropertyBias() (value int32, err error) { + retValue, err := instance.GetProperty("Bias") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetDaylightBias sets the value of DaylightBias for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightBias(value int32) (err error) { + return instance.SetProperty("DaylightBias", (value)) +} + +// GetDaylightBias gets the value of DaylightBias for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightBias() (value int32, err error) { + retValue, err := instance.GetProperty("DaylightBias") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetDaylightDay sets the value of DaylightDay for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightDay(value uint32) (err error) { + return instance.SetProperty("DaylightDay", (value)) +} + +// GetDaylightDay gets the value of DaylightDay for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightDay() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightDay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaylightDayOfWeek sets the value of DaylightDayOfWeek for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightDayOfWeek(value uint8) (err error) { + return instance.SetProperty("DaylightDayOfWeek", (value)) +} + +// GetDaylightDayOfWeek gets the value of DaylightDayOfWeek for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightDayOfWeek() (value uint8, err error) { + retValue, err := instance.GetProperty("DaylightDayOfWeek") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetDaylightHour sets the value of DaylightHour for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightHour(value uint32) (err error) { + return instance.SetProperty("DaylightHour", (value)) +} + +// GetDaylightHour gets the value of DaylightHour for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightHour() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightHour") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaylightMillisecond sets the value of DaylightMillisecond for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightMillisecond(value uint32) (err error) { + return instance.SetProperty("DaylightMillisecond", (value)) +} + +// GetDaylightMillisecond gets the value of DaylightMillisecond for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightMillisecond() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightMillisecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaylightMinute sets the value of DaylightMinute for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightMinute(value uint32) (err error) { + return instance.SetProperty("DaylightMinute", (value)) +} + +// GetDaylightMinute gets the value of DaylightMinute for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightMinute() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightMinute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaylightMonth sets the value of DaylightMonth for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightMonth(value uint32) (err error) { + return instance.SetProperty("DaylightMonth", (value)) +} + +// GetDaylightMonth gets the value of DaylightMonth for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightMonth() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightMonth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaylightName sets the value of DaylightName for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightName(value string) (err error) { + return instance.SetProperty("DaylightName", (value)) +} + +// GetDaylightName gets the value of DaylightName for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightName() (value string, err error) { + retValue, err := instance.GetProperty("DaylightName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDaylightSecond sets the value of DaylightSecond for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightSecond(value uint32) (err error) { + return instance.SetProperty("DaylightSecond", (value)) +} + +// GetDaylightSecond gets the value of DaylightSecond for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDaylightYear sets the value of DaylightYear for the instance +func (instance *Win32_TimeZone) SetPropertyDaylightYear(value uint32) (err error) { + return instance.SetProperty("DaylightYear", (value)) +} + +// GetDaylightYear gets the value of DaylightYear for the instance +func (instance *Win32_TimeZone) GetPropertyDaylightYear() (value uint32, err error) { + retValue, err := instance.GetProperty("DaylightYear") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardBias sets the value of StandardBias for the instance +func (instance *Win32_TimeZone) SetPropertyStandardBias(value uint32) (err error) { + return instance.SetProperty("StandardBias", (value)) +} + +// GetStandardBias gets the value of StandardBias for the instance +func (instance *Win32_TimeZone) GetPropertyStandardBias() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardBias") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardDay sets the value of StandardDay for the instance +func (instance *Win32_TimeZone) SetPropertyStandardDay(value uint32) (err error) { + return instance.SetProperty("StandardDay", (value)) +} + +// GetStandardDay gets the value of StandardDay for the instance +func (instance *Win32_TimeZone) GetPropertyStandardDay() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardDay") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardDayOfWeek sets the value of StandardDayOfWeek for the instance +func (instance *Win32_TimeZone) SetPropertyStandardDayOfWeek(value uint8) (err error) { + return instance.SetProperty("StandardDayOfWeek", (value)) +} + +// GetStandardDayOfWeek gets the value of StandardDayOfWeek for the instance +func (instance *Win32_TimeZone) GetPropertyStandardDayOfWeek() (value uint8, err error) { + retValue, err := instance.GetProperty("StandardDayOfWeek") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetStandardHour sets the value of StandardHour for the instance +func (instance *Win32_TimeZone) SetPropertyStandardHour(value uint32) (err error) { + return instance.SetProperty("StandardHour", (value)) +} + +// GetStandardHour gets the value of StandardHour for the instance +func (instance *Win32_TimeZone) GetPropertyStandardHour() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardHour") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardMillisecond sets the value of StandardMillisecond for the instance +func (instance *Win32_TimeZone) SetPropertyStandardMillisecond(value uint32) (err error) { + return instance.SetProperty("StandardMillisecond", (value)) +} + +// GetStandardMillisecond gets the value of StandardMillisecond for the instance +func (instance *Win32_TimeZone) GetPropertyStandardMillisecond() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardMillisecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardMinute sets the value of StandardMinute for the instance +func (instance *Win32_TimeZone) SetPropertyStandardMinute(value uint32) (err error) { + return instance.SetProperty("StandardMinute", (value)) +} + +// GetStandardMinute gets the value of StandardMinute for the instance +func (instance *Win32_TimeZone) GetPropertyStandardMinute() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardMinute") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardMonth sets the value of StandardMonth for the instance +func (instance *Win32_TimeZone) SetPropertyStandardMonth(value uint32) (err error) { + return instance.SetProperty("StandardMonth", (value)) +} + +// GetStandardMonth gets the value of StandardMonth for the instance +func (instance *Win32_TimeZone) GetPropertyStandardMonth() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardMonth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardName sets the value of StandardName for the instance +func (instance *Win32_TimeZone) SetPropertyStandardName(value string) (err error) { + return instance.SetProperty("StandardName", (value)) +} + +// GetStandardName gets the value of StandardName for the instance +func (instance *Win32_TimeZone) GetPropertyStandardName() (value string, err error) { + retValue, err := instance.GetProperty("StandardName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStandardSecond sets the value of StandardSecond for the instance +func (instance *Win32_TimeZone) SetPropertyStandardSecond(value uint32) (err error) { + return instance.SetProperty("StandardSecond", (value)) +} + +// GetStandardSecond gets the value of StandardSecond for the instance +func (instance *Win32_TimeZone) GetPropertyStandardSecond() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardSecond") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStandardYear sets the value of StandardYear for the instance +func (instance *Win32_TimeZone) SetPropertyStandardYear(value uint32) (err error) { + return instance.SetProperty("StandardYear", (value)) +} + +// GetStandardYear gets the value of StandardYear for the instance +func (instance *Win32_TimeZone) GetPropertyStandardYear() (value uint32, err error) { + retValue, err := instance.GetProperty("StandardYear") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenGroups.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenGroups.go new file mode 100644 index 00000000..facabb75 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenGroups.go @@ -0,0 +1,112 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TokenGroups struct +type Win32_TokenGroups struct { + *cim.WmiInstance + + // + GroupCount uint32 + + // + Groups []Win32_SIDandAttributes +} + +func NewWin32_TokenGroupsEx1(instance *cim.WmiInstance) (newInstance *Win32_TokenGroups, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_TokenGroups{ + WmiInstance: tmp, + } + return +} + +func NewWin32_TokenGroupsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TokenGroups, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TokenGroups{ + WmiInstance: tmp, + } + return +} + +// SetGroupCount sets the value of GroupCount for the instance +func (instance *Win32_TokenGroups) SetPropertyGroupCount(value uint32) (err error) { + return instance.SetProperty("GroupCount", (value)) +} + +// GetGroupCount gets the value of GroupCount for the instance +func (instance *Win32_TokenGroups) GetPropertyGroupCount() (value uint32, err error) { + retValue, err := instance.GetProperty("GroupCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGroups sets the value of Groups for the instance +func (instance *Win32_TokenGroups) SetPropertyGroups(value []Win32_SIDandAttributes) (err error) { + return instance.SetProperty("Groups", (value)) +} + +// GetGroups gets the value of Groups for the instance +func (instance *Win32_TokenGroups) GetPropertyGroups() (value []Win32_SIDandAttributes, err error) { + retValue, err := instance.GetProperty("Groups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(Win32_SIDandAttributes) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_SIDandAttributes is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, Win32_SIDandAttributes(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenPrivileges.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenPrivileges.go new file mode 100644 index 00000000..71df382b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TokenPrivileges.go @@ -0,0 +1,112 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TokenPrivileges struct +type Win32_TokenPrivileges struct { + *cim.WmiInstance + + // + PrivilegeCount uint32 + + // + Privileges []Win32_LUIDandAttributes +} + +func NewWin32_TokenPrivilegesEx1(instance *cim.WmiInstance) (newInstance *Win32_TokenPrivileges, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_TokenPrivileges{ + WmiInstance: tmp, + } + return +} + +func NewWin32_TokenPrivilegesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TokenPrivileges, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TokenPrivileges{ + WmiInstance: tmp, + } + return +} + +// SetPrivilegeCount sets the value of PrivilegeCount for the instance +func (instance *Win32_TokenPrivileges) SetPropertyPrivilegeCount(value uint32) (err error) { + return instance.SetProperty("PrivilegeCount", (value)) +} + +// GetPrivilegeCount gets the value of PrivilegeCount for the instance +func (instance *Win32_TokenPrivileges) GetPropertyPrivilegeCount() (value uint32, err error) { + retValue, err := instance.GetProperty("PrivilegeCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPrivileges sets the value of Privileges for the instance +func (instance *Win32_TokenPrivileges) SetPropertyPrivileges(value []Win32_LUIDandAttributes) (err error) { + return instance.SetProperty("Privileges", (value)) +} + +// GetPrivileges gets the value of Privileges for the instance +func (instance *Win32_TokenPrivileges) GetPropertyPrivileges() (value []Win32_LUIDandAttributes, err error) { + retValue, err := instance.GetProperty("Privileges") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(Win32_LUIDandAttributes) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_LUIDandAttributes is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, Win32_LUIDandAttributes(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Trustee.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Trustee.go new file mode 100644 index 00000000..deb9dc2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Trustee.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_Trustee struct +type Win32_Trustee struct { + *__Trustee +} + +func NewWin32_TrusteeEx1(instance *cim.WmiInstance) (newInstance *Win32_Trustee, err error) { + tmp, err := New__TrusteeEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Trustee{ + __Trustee: tmp, + } + return +} + +func NewWin32_TrusteeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Trustee, err error) { + tmp, err := New__TrusteeEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Trustee{ + __Trustee: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TypeLibraryAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TypeLibraryAction.go new file mode 100644 index 00000000..4049fc40 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_TypeLibraryAction.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_TypeLibraryAction struct +type Win32_TypeLibraryAction struct { + *CIM_Action + + // + Cost uint32 + + // + Language uint16 + + // + LibID string +} + +func NewWin32_TypeLibraryActionEx1(instance *cim.WmiInstance) (newInstance *Win32_TypeLibraryAction, err error) { + tmp, err := NewCIM_ActionEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_TypeLibraryAction{ + CIM_Action: tmp, + } + return +} + +func NewWin32_TypeLibraryActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_TypeLibraryAction, err error) { + tmp, err := NewCIM_ActionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_TypeLibraryAction{ + CIM_Action: tmp, + } + return +} + +// SetCost sets the value of Cost for the instance +func (instance *Win32_TypeLibraryAction) SetPropertyCost(value uint32) (err error) { + return instance.SetProperty("Cost", (value)) +} + +// GetCost gets the value of Cost for the instance +func (instance *Win32_TypeLibraryAction) GetPropertyCost() (value uint32, err error) { + retValue, err := instance.GetProperty("Cost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLanguage sets the value of Language for the instance +func (instance *Win32_TypeLibraryAction) SetPropertyLanguage(value uint16) (err error) { + return instance.SetProperty("Language", (value)) +} + +// GetLanguage gets the value of Language for the instance +func (instance *Win32_TypeLibraryAction) GetPropertyLanguage() (value uint16, err error) { + retValue, err := instance.GetProperty("Language") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLibID sets the value of LibID for the instance +func (instance *Win32_TypeLibraryAction) SetPropertyLibID(value string) (err error) { + return instance.SetProperty("LibID", (value)) +} + +// GetLibID gets the value of LibID for the instance +func (instance *Win32_TypeLibraryAction) GetPropertyLibID() (value string, err error) { + retValue, err := instance.GetProperty("LibID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBController.go new file mode 100644 index 00000000..8c172d73 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBController.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_USBController struct +type Win32_USBController struct { + *CIM_USBController +} + +func NewWin32_USBControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_USBController, err error) { + tmp, err := NewCIM_USBControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_USBController{ + CIM_USBController: tmp, + } + return +} + +func NewWin32_USBControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_USBController, err error) { + tmp, err := NewCIM_USBControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_USBController{ + CIM_USBController: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBControllerDevice.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBControllerDevice.go new file mode 100644 index 00000000..1a50c4f2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBControllerDevice.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_USBControllerDevice struct +type Win32_USBControllerDevice struct { + *CIM_ControlledBy +} + +func NewWin32_USBControllerDeviceEx1(instance *cim.WmiInstance) (newInstance *Win32_USBControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_USBControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} + +func NewWin32_USBControllerDeviceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_USBControllerDevice, err error) { + tmp, err := NewCIM_ControlledByEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_USBControllerDevice{ + CIM_ControlledBy: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBHub.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBHub.go new file mode 100644 index 00000000..25ac65fd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_USBHub.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_USBHub struct +type Win32_USBHub struct { + *CIM_USBHub +} + +func NewWin32_USBHubEx1(instance *cim.WmiInstance) (newInstance *Win32_USBHub, err error) { + tmp, err := NewCIM_USBHubEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_USBHub{ + CIM_USBHub: tmp, + } + return +} + +func NewWin32_USBHubEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_USBHub, err error) { + tmp, err := NewCIM_USBHubEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_USBHub{ + CIM_USBHub: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UTCTime.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UTCTime.go new file mode 100644 index 00000000..f6a63900 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UTCTime.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_UTCTime struct +type Win32_UTCTime struct { + *Win32_CurrentTime +} + +func NewWin32_UTCTimeEx1(instance *cim.WmiInstance) (newInstance *Win32_UTCTime, err error) { + tmp, err := NewWin32_CurrentTimeEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_UTCTime{ + Win32_CurrentTime: tmp, + } + return +} + +func NewWin32_UTCTimeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_UTCTime, err error) { + tmp, err := NewWin32_CurrentTimeEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_UTCTime{ + Win32_CurrentTime: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserAccount.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserAccount.go new file mode 100644 index 00000000..65854ac4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserAccount.go @@ -0,0 +1,275 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_UserAccount struct +type Win32_UserAccount struct { + *Win32_Account + + // + AccountType uint32 + + // + Disabled bool + + // + FullName string + + // + Lockout bool + + // + PasswordChangeable bool + + // + PasswordExpires bool + + // + PasswordRequired bool +} + +func NewWin32_UserAccountEx1(instance *cim.WmiInstance) (newInstance *Win32_UserAccount, err error) { + tmp, err := NewWin32_AccountEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_UserAccount{ + Win32_Account: tmp, + } + return +} + +func NewWin32_UserAccountEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_UserAccount, err error) { + tmp, err := NewWin32_AccountEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_UserAccount{ + Win32_Account: tmp, + } + return +} + +// SetAccountType sets the value of AccountType for the instance +func (instance *Win32_UserAccount) SetPropertyAccountType(value uint32) (err error) { + return instance.SetProperty("AccountType", (value)) +} + +// GetAccountType gets the value of AccountType for the instance +func (instance *Win32_UserAccount) GetPropertyAccountType() (value uint32, err error) { + retValue, err := instance.GetProperty("AccountType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDisabled sets the value of Disabled for the instance +func (instance *Win32_UserAccount) SetPropertyDisabled(value bool) (err error) { + return instance.SetProperty("Disabled", (value)) +} + +// GetDisabled gets the value of Disabled for the instance +func (instance *Win32_UserAccount) GetPropertyDisabled() (value bool, err error) { + retValue, err := instance.GetProperty("Disabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFullName sets the value of FullName for the instance +func (instance *Win32_UserAccount) SetPropertyFullName(value string) (err error) { + return instance.SetProperty("FullName", (value)) +} + +// GetFullName gets the value of FullName for the instance +func (instance *Win32_UserAccount) GetPropertyFullName() (value string, err error) { + retValue, err := instance.GetProperty("FullName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLockout sets the value of Lockout for the instance +func (instance *Win32_UserAccount) SetPropertyLockout(value bool) (err error) { + return instance.SetProperty("Lockout", (value)) +} + +// GetLockout gets the value of Lockout for the instance +func (instance *Win32_UserAccount) GetPropertyLockout() (value bool, err error) { + retValue, err := instance.GetProperty("Lockout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPasswordChangeable sets the value of PasswordChangeable for the instance +func (instance *Win32_UserAccount) SetPropertyPasswordChangeable(value bool) (err error) { + return instance.SetProperty("PasswordChangeable", (value)) +} + +// GetPasswordChangeable gets the value of PasswordChangeable for the instance +func (instance *Win32_UserAccount) GetPropertyPasswordChangeable() (value bool, err error) { + retValue, err := instance.GetProperty("PasswordChangeable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPasswordExpires sets the value of PasswordExpires for the instance +func (instance *Win32_UserAccount) SetPropertyPasswordExpires(value bool) (err error) { + return instance.SetProperty("PasswordExpires", (value)) +} + +// GetPasswordExpires gets the value of PasswordExpires for the instance +func (instance *Win32_UserAccount) GetPropertyPasswordExpires() (value bool, err error) { + retValue, err := instance.GetProperty("PasswordExpires") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPasswordRequired sets the value of PasswordRequired for the instance +func (instance *Win32_UserAccount) SetPropertyPasswordRequired(value bool) (err error) { + return instance.SetProperty("PasswordRequired", (value)) +} + +// GetPasswordRequired gets the value of PasswordRequired for the instance +func (instance *Win32_UserAccount) GetPropertyPasswordRequired() (value bool, err error) { + retValue, err := instance.GetProperty("PasswordRequired") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// + +// +func (instance *Win32_UserAccount) Rename( /* IN */ Name string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Rename", Name) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserDesktop.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserDesktop.go new file mode 100644 index 00000000..c1731cb1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserDesktop.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_UserDesktop struct +type Win32_UserDesktop struct { + *CIM_ElementSetting +} + +func NewWin32_UserDesktopEx1(instance *cim.WmiInstance) (newInstance *Win32_UserDesktop, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_UserDesktop{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_UserDesktopEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_UserDesktop, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_UserDesktop{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserInDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserInDomain.go new file mode 100644 index 00000000..8eb89ea0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserInDomain.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_UserInDomain struct +type Win32_UserInDomain struct { + *CIM_Component +} + +func NewWin32_UserInDomainEx1(instance *cim.WmiInstance) (newInstance *Win32_UserInDomain, err error) { + tmp, err := NewCIM_ComponentEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_UserInDomain{ + CIM_Component: tmp, + } + return +} + +func NewWin32_UserInDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_UserInDomain, err error) { + tmp, err := NewCIM_ComponentEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_UserInDomain{ + CIM_Component: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserProfile.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserProfile.go new file mode 100644 index 00000000..baacef7c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserProfile.go @@ -0,0 +1,938 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_UserProfile struct +type Win32_UserProfile struct { + *cim.WmiInstance + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected AppData\Roaming folder. + AppDataRoaming Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Contacts folder. + Contacts Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Desktop folder. + Desktop Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Documents folder. + Documents Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Downloads folder. + Downloads Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Favorites folder. + Favorites Win32_FolderRedirectionHealth + + // The health status of this profile, based on the values that were set in the Win32_RoamingUserHealthConfiguration properties. + HealthStatus UserProfile_HealthStatus + + // If the profile is a roaming profile, this property is a DATETIME value that indicates the last time an attempt was made to download the profile from the server, even if it was unsuccessful. If the profile is a local profile, this property is zero. + LastAttemptedProfileDownloadTime string + + // If the profile is a roaming profile, this property is a DATETIME value that indicates the last time an attempt was made to upload the profile to the server, even if it was unsuccessful. + LastAttemptedProfileUploadTime string + + // If this profile is a roaming profile, this property is a DATETIME value that indicates the last time the profile's registry hive was uploaded to the server. + LastBackgroundRegistryUploadTime string + + // + LastDownloadTime string + + // + LastUploadTime string + + // + LastUseTime string + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Links folder. + Links Win32_FolderRedirectionHealth + + // + Loaded bool + + // + LocalPath string + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Music folder. + Music Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Pictures folder. + Pictures Win32_FolderRedirectionHealth + + // + RefCount uint32 + + // + RoamingConfigured bool + + // + RoamingPath string + + // + RoamingPreference bool + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Saved Games folder. + SavedGames Win32_FolderRedirectionHealth + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Searches folder. + Searches Win32_FolderRedirectionHealth + + // + SID string + + // + Special bool + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Start Menu folder. + StartMenu Win32_FolderRedirectionHealth + + // + Status uint32 + + // A Win32_FolderRedirectionHealth object that represents the health of the user's redirected Videos folder. + Videos Win32_FolderRedirectionHealth +} + +func NewWin32_UserProfileEx1(instance *cim.WmiInstance) (newInstance *Win32_UserProfile, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_UserProfile{ + WmiInstance: tmp, + } + return +} + +func NewWin32_UserProfileEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_UserProfile, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_UserProfile{ + WmiInstance: tmp, + } + return +} + +// SetAppDataRoaming sets the value of AppDataRoaming for the instance +func (instance *Win32_UserProfile) SetPropertyAppDataRoaming(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("AppDataRoaming", (value)) +} + +// GetAppDataRoaming gets the value of AppDataRoaming for the instance +func (instance *Win32_UserProfile) GetPropertyAppDataRoaming() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("AppDataRoaming") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetContacts sets the value of Contacts for the instance +func (instance *Win32_UserProfile) SetPropertyContacts(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Contacts", (value)) +} + +// GetContacts gets the value of Contacts for the instance +func (instance *Win32_UserProfile) GetPropertyContacts() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Contacts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetDesktop sets the value of Desktop for the instance +func (instance *Win32_UserProfile) SetPropertyDesktop(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Desktop", (value)) +} + +// GetDesktop gets the value of Desktop for the instance +func (instance *Win32_UserProfile) GetPropertyDesktop() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Desktop") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetDocuments sets the value of Documents for the instance +func (instance *Win32_UserProfile) SetPropertyDocuments(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Documents", (value)) +} + +// GetDocuments gets the value of Documents for the instance +func (instance *Win32_UserProfile) GetPropertyDocuments() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Documents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetDownloads sets the value of Downloads for the instance +func (instance *Win32_UserProfile) SetPropertyDownloads(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Downloads", (value)) +} + +// GetDownloads gets the value of Downloads for the instance +func (instance *Win32_UserProfile) GetPropertyDownloads() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Downloads") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetFavorites sets the value of Favorites for the instance +func (instance *Win32_UserProfile) SetPropertyFavorites(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Favorites", (value)) +} + +// GetFavorites gets the value of Favorites for the instance +func (instance *Win32_UserProfile) GetPropertyFavorites() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Favorites") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *Win32_UserProfile) SetPropertyHealthStatus(value UserProfile_HealthStatus) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *Win32_UserProfile) GetPropertyHealthStatus() (value UserProfile_HealthStatus, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = UserProfile_HealthStatus(valuetmp) + + return +} + +// SetLastAttemptedProfileDownloadTime sets the value of LastAttemptedProfileDownloadTime for the instance +func (instance *Win32_UserProfile) SetPropertyLastAttemptedProfileDownloadTime(value string) (err error) { + return instance.SetProperty("LastAttemptedProfileDownloadTime", (value)) +} + +// GetLastAttemptedProfileDownloadTime gets the value of LastAttemptedProfileDownloadTime for the instance +func (instance *Win32_UserProfile) GetPropertyLastAttemptedProfileDownloadTime() (value string, err error) { + retValue, err := instance.GetProperty("LastAttemptedProfileDownloadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastAttemptedProfileUploadTime sets the value of LastAttemptedProfileUploadTime for the instance +func (instance *Win32_UserProfile) SetPropertyLastAttemptedProfileUploadTime(value string) (err error) { + return instance.SetProperty("LastAttemptedProfileUploadTime", (value)) +} + +// GetLastAttemptedProfileUploadTime gets the value of LastAttemptedProfileUploadTime for the instance +func (instance *Win32_UserProfile) GetPropertyLastAttemptedProfileUploadTime() (value string, err error) { + retValue, err := instance.GetProperty("LastAttemptedProfileUploadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastBackgroundRegistryUploadTime sets the value of LastBackgroundRegistryUploadTime for the instance +func (instance *Win32_UserProfile) SetPropertyLastBackgroundRegistryUploadTime(value string) (err error) { + return instance.SetProperty("LastBackgroundRegistryUploadTime", (value)) +} + +// GetLastBackgroundRegistryUploadTime gets the value of LastBackgroundRegistryUploadTime for the instance +func (instance *Win32_UserProfile) GetPropertyLastBackgroundRegistryUploadTime() (value string, err error) { + retValue, err := instance.GetProperty("LastBackgroundRegistryUploadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastDownloadTime sets the value of LastDownloadTime for the instance +func (instance *Win32_UserProfile) SetPropertyLastDownloadTime(value string) (err error) { + return instance.SetProperty("LastDownloadTime", (value)) +} + +// GetLastDownloadTime gets the value of LastDownloadTime for the instance +func (instance *Win32_UserProfile) GetPropertyLastDownloadTime() (value string, err error) { + retValue, err := instance.GetProperty("LastDownloadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastUploadTime sets the value of LastUploadTime for the instance +func (instance *Win32_UserProfile) SetPropertyLastUploadTime(value string) (err error) { + return instance.SetProperty("LastUploadTime", (value)) +} + +// GetLastUploadTime gets the value of LastUploadTime for the instance +func (instance *Win32_UserProfile) GetPropertyLastUploadTime() (value string, err error) { + retValue, err := instance.GetProperty("LastUploadTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastUseTime sets the value of LastUseTime for the instance +func (instance *Win32_UserProfile) SetPropertyLastUseTime(value string) (err error) { + return instance.SetProperty("LastUseTime", (value)) +} + +// GetLastUseTime gets the value of LastUseTime for the instance +func (instance *Win32_UserProfile) GetPropertyLastUseTime() (value string, err error) { + retValue, err := instance.GetProperty("LastUseTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLinks sets the value of Links for the instance +func (instance *Win32_UserProfile) SetPropertyLinks(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Links", (value)) +} + +// GetLinks gets the value of Links for the instance +func (instance *Win32_UserProfile) GetPropertyLinks() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Links") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetLoaded sets the value of Loaded for the instance +func (instance *Win32_UserProfile) SetPropertyLoaded(value bool) (err error) { + return instance.SetProperty("Loaded", (value)) +} + +// GetLoaded gets the value of Loaded for the instance +func (instance *Win32_UserProfile) GetPropertyLoaded() (value bool, err error) { + retValue, err := instance.GetProperty("Loaded") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLocalPath sets the value of LocalPath for the instance +func (instance *Win32_UserProfile) SetPropertyLocalPath(value string) (err error) { + return instance.SetProperty("LocalPath", (value)) +} + +// GetLocalPath gets the value of LocalPath for the instance +func (instance *Win32_UserProfile) GetPropertyLocalPath() (value string, err error) { + retValue, err := instance.GetProperty("LocalPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMusic sets the value of Music for the instance +func (instance *Win32_UserProfile) SetPropertyMusic(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Music", (value)) +} + +// GetMusic gets the value of Music for the instance +func (instance *Win32_UserProfile) GetPropertyMusic() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Music") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetPictures sets the value of Pictures for the instance +func (instance *Win32_UserProfile) SetPropertyPictures(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Pictures", (value)) +} + +// GetPictures gets the value of Pictures for the instance +func (instance *Win32_UserProfile) GetPropertyPictures() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Pictures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetRefCount sets the value of RefCount for the instance +func (instance *Win32_UserProfile) SetPropertyRefCount(value uint32) (err error) { + return instance.SetProperty("RefCount", (value)) +} + +// GetRefCount gets the value of RefCount for the instance +func (instance *Win32_UserProfile) GetPropertyRefCount() (value uint32, err error) { + retValue, err := instance.GetProperty("RefCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRoamingConfigured sets the value of RoamingConfigured for the instance +func (instance *Win32_UserProfile) SetPropertyRoamingConfigured(value bool) (err error) { + return instance.SetProperty("RoamingConfigured", (value)) +} + +// GetRoamingConfigured gets the value of RoamingConfigured for the instance +func (instance *Win32_UserProfile) GetPropertyRoamingConfigured() (value bool, err error) { + retValue, err := instance.GetProperty("RoamingConfigured") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetRoamingPath sets the value of RoamingPath for the instance +func (instance *Win32_UserProfile) SetPropertyRoamingPath(value string) (err error) { + return instance.SetProperty("RoamingPath", (value)) +} + +// GetRoamingPath gets the value of RoamingPath for the instance +func (instance *Win32_UserProfile) GetPropertyRoamingPath() (value string, err error) { + retValue, err := instance.GetProperty("RoamingPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRoamingPreference sets the value of RoamingPreference for the instance +func (instance *Win32_UserProfile) SetPropertyRoamingPreference(value bool) (err error) { + return instance.SetProperty("RoamingPreference", (value)) +} + +// GetRoamingPreference gets the value of RoamingPreference for the instance +func (instance *Win32_UserProfile) GetPropertyRoamingPreference() (value bool, err error) { + retValue, err := instance.GetProperty("RoamingPreference") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSavedGames sets the value of SavedGames for the instance +func (instance *Win32_UserProfile) SetPropertySavedGames(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("SavedGames", (value)) +} + +// GetSavedGames gets the value of SavedGames for the instance +func (instance *Win32_UserProfile) GetPropertySavedGames() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("SavedGames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetSearches sets the value of Searches for the instance +func (instance *Win32_UserProfile) SetPropertySearches(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Searches", (value)) +} + +// GetSearches gets the value of Searches for the instance +func (instance *Win32_UserProfile) GetPropertySearches() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Searches") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetSID sets the value of SID for the instance +func (instance *Win32_UserProfile) SetPropertySID(value string) (err error) { + return instance.SetProperty("SID", (value)) +} + +// GetSID gets the value of SID for the instance +func (instance *Win32_UserProfile) GetPropertySID() (value string, err error) { + retValue, err := instance.GetProperty("SID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpecial sets the value of Special for the instance +func (instance *Win32_UserProfile) SetPropertySpecial(value bool) (err error) { + return instance.SetProperty("Special", (value)) +} + +// GetSpecial gets the value of Special for the instance +func (instance *Win32_UserProfile) GetPropertySpecial() (value bool, err error) { + retValue, err := instance.GetProperty("Special") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetStartMenu sets the value of StartMenu for the instance +func (instance *Win32_UserProfile) SetPropertyStartMenu(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("StartMenu", (value)) +} + +// GetStartMenu gets the value of StartMenu for the instance +func (instance *Win32_UserProfile) GetPropertyStartMenu() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("StartMenu") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *Win32_UserProfile) SetPropertyStatus(value uint32) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *Win32_UserProfile) GetPropertyStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVideos sets the value of Videos for the instance +func (instance *Win32_UserProfile) SetPropertyVideos(value Win32_FolderRedirectionHealth) (err error) { + return instance.SetProperty("Videos", (value)) +} + +// GetVideos gets the value of Videos for the instance +func (instance *Win32_UserProfile) GetPropertyVideos() (value Win32_FolderRedirectionHealth, err error) { + retValue, err := instance.GetProperty("Videos") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_FolderRedirectionHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_FolderRedirectionHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_FolderRedirectionHealth(valuetmp) + + return +} + +// + +// +// + +// +func (instance *Win32_UserProfile) ChangeOwner( /* IN */ NewOwnerSID string, + /* IN */ Flags uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ChangeOwner", NewOwnerSID, Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserStateConfigurationControls.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserStateConfigurationControls.go new file mode 100644 index 00000000..b55efdd1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_UserStateConfigurationControls.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_UserStateConfigurationControls struct +type Win32_UserStateConfigurationControls struct { + *cim.WmiInstance + + // Controls whether the computer's folder redirection feature settings are configured by using UST Manageability WMI classes or by using Group Policy. + FolderRedirection UserStateConfigurationControls_FolderRedirection + + // Controls whether the computer's Offline files feature settings are configured by using UST Manageability WMI classes or by using Group Policy. + OfflineFiles UserStateConfigurationControls_OfflineFiles + + // Controls whether the computer's roaming user profile feature settings are configured by using UST Manageability WMI classes or by using Group Policy. + RoamingUserProfile UserStateConfigurationControls_RoamingUserProfile +} + +func NewWin32_UserStateConfigurationControlsEx1(instance *cim.WmiInstance) (newInstance *Win32_UserStateConfigurationControls, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_UserStateConfigurationControls{ + WmiInstance: tmp, + } + return +} + +func NewWin32_UserStateConfigurationControlsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_UserStateConfigurationControls, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_UserStateConfigurationControls{ + WmiInstance: tmp, + } + return +} + +// SetFolderRedirection sets the value of FolderRedirection for the instance +func (instance *Win32_UserStateConfigurationControls) SetPropertyFolderRedirection(value UserStateConfigurationControls_FolderRedirection) (err error) { + return instance.SetProperty("FolderRedirection", (value)) +} + +// GetFolderRedirection gets the value of FolderRedirection for the instance +func (instance *Win32_UserStateConfigurationControls) GetPropertyFolderRedirection() (value UserStateConfigurationControls_FolderRedirection, err error) { + retValue, err := instance.GetProperty("FolderRedirection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = UserStateConfigurationControls_FolderRedirection(valuetmp) + + return +} + +// SetOfflineFiles sets the value of OfflineFiles for the instance +func (instance *Win32_UserStateConfigurationControls) SetPropertyOfflineFiles(value UserStateConfigurationControls_OfflineFiles) (err error) { + return instance.SetProperty("OfflineFiles", (value)) +} + +// GetOfflineFiles gets the value of OfflineFiles for the instance +func (instance *Win32_UserStateConfigurationControls) GetPropertyOfflineFiles() (value UserStateConfigurationControls_OfflineFiles, err error) { + retValue, err := instance.GetProperty("OfflineFiles") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = UserStateConfigurationControls_OfflineFiles(valuetmp) + + return +} + +// SetRoamingUserProfile sets the value of RoamingUserProfile for the instance +func (instance *Win32_UserStateConfigurationControls) SetPropertyRoamingUserProfile(value UserStateConfigurationControls_RoamingUserProfile) (err error) { + return instance.SetProperty("RoamingUserProfile", (value)) +} + +// GetRoamingUserProfile gets the value of RoamingUserProfile for the instance +func (instance *Win32_UserStateConfigurationControls) GetPropertyRoamingUserProfile() (value UserStateConfigurationControls_RoamingUserProfile, err error) { + retValue, err := instance.GetProperty("RoamingUserProfile") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = UserStateConfigurationControls_RoamingUserProfile(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoConfiguration.go new file mode 100644 index 00000000..9f2932e7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoConfiguration.go @@ -0,0 +1,860 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_VideoConfiguration struct +type Win32_VideoConfiguration struct { + *CIM_Setting + + // + ActualColorResolution uint32 + + // + AdapterChipType string + + // + AdapterCompatibility string + + // + AdapterDACType string + + // + AdapterDescription string + + // + AdapterRAM uint32 + + // + AdapterType string + + // + BitsPerPixel uint32 + + // + ColorPlanes uint32 + + // + ColorTableEntries uint32 + + // + DeviceSpecificPens uint32 + + // + DriverDate string + + // + HorizontalResolution uint32 + + // + InfFilename string + + // + InfSection string + + // + InstalledDisplayDrivers string + + // + MonitorManufacturer string + + // + MonitorType string + + // + Name string + + // + PixelsPerXLogicalInch uint32 + + // + PixelsPerYLogicalInch uint32 + + // + RefreshRate uint32 + + // + ScanMode string + + // + ScreenHeight uint32 + + // + ScreenWidth uint32 + + // + SystemPaletteEntries uint32 + + // + VerticalResolution uint32 +} + +func NewWin32_VideoConfigurationEx1(instance *cim.WmiInstance) (newInstance *Win32_VideoConfiguration, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VideoConfiguration{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_VideoConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VideoConfiguration, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VideoConfiguration{ + CIM_Setting: tmp, + } + return +} + +// SetActualColorResolution sets the value of ActualColorResolution for the instance +func (instance *Win32_VideoConfiguration) SetPropertyActualColorResolution(value uint32) (err error) { + return instance.SetProperty("ActualColorResolution", (value)) +} + +// GetActualColorResolution gets the value of ActualColorResolution for the instance +func (instance *Win32_VideoConfiguration) GetPropertyActualColorResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("ActualColorResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAdapterChipType sets the value of AdapterChipType for the instance +func (instance *Win32_VideoConfiguration) SetPropertyAdapterChipType(value string) (err error) { + return instance.SetProperty("AdapterChipType", (value)) +} + +// GetAdapterChipType gets the value of AdapterChipType for the instance +func (instance *Win32_VideoConfiguration) GetPropertyAdapterChipType() (value string, err error) { + retValue, err := instance.GetProperty("AdapterChipType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterCompatibility sets the value of AdapterCompatibility for the instance +func (instance *Win32_VideoConfiguration) SetPropertyAdapterCompatibility(value string) (err error) { + return instance.SetProperty("AdapterCompatibility", (value)) +} + +// GetAdapterCompatibility gets the value of AdapterCompatibility for the instance +func (instance *Win32_VideoConfiguration) GetPropertyAdapterCompatibility() (value string, err error) { + retValue, err := instance.GetProperty("AdapterCompatibility") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterDACType sets the value of AdapterDACType for the instance +func (instance *Win32_VideoConfiguration) SetPropertyAdapterDACType(value string) (err error) { + return instance.SetProperty("AdapterDACType", (value)) +} + +// GetAdapterDACType gets the value of AdapterDACType for the instance +func (instance *Win32_VideoConfiguration) GetPropertyAdapterDACType() (value string, err error) { + retValue, err := instance.GetProperty("AdapterDACType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterDescription sets the value of AdapterDescription for the instance +func (instance *Win32_VideoConfiguration) SetPropertyAdapterDescription(value string) (err error) { + return instance.SetProperty("AdapterDescription", (value)) +} + +// GetAdapterDescription gets the value of AdapterDescription for the instance +func (instance *Win32_VideoConfiguration) GetPropertyAdapterDescription() (value string, err error) { + retValue, err := instance.GetProperty("AdapterDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterRAM sets the value of AdapterRAM for the instance +func (instance *Win32_VideoConfiguration) SetPropertyAdapterRAM(value uint32) (err error) { + return instance.SetProperty("AdapterRAM", (value)) +} + +// GetAdapterRAM gets the value of AdapterRAM for the instance +func (instance *Win32_VideoConfiguration) GetPropertyAdapterRAM() (value uint32, err error) { + retValue, err := instance.GetProperty("AdapterRAM") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAdapterType sets the value of AdapterType for the instance +func (instance *Win32_VideoConfiguration) SetPropertyAdapterType(value string) (err error) { + return instance.SetProperty("AdapterType", (value)) +} + +// GetAdapterType gets the value of AdapterType for the instance +func (instance *Win32_VideoConfiguration) GetPropertyAdapterType() (value string, err error) { + retValue, err := instance.GetProperty("AdapterType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBitsPerPixel sets the value of BitsPerPixel for the instance +func (instance *Win32_VideoConfiguration) SetPropertyBitsPerPixel(value uint32) (err error) { + return instance.SetProperty("BitsPerPixel", (value)) +} + +// GetBitsPerPixel gets the value of BitsPerPixel for the instance +func (instance *Win32_VideoConfiguration) GetPropertyBitsPerPixel() (value uint32, err error) { + retValue, err := instance.GetProperty("BitsPerPixel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetColorPlanes sets the value of ColorPlanes for the instance +func (instance *Win32_VideoConfiguration) SetPropertyColorPlanes(value uint32) (err error) { + return instance.SetProperty("ColorPlanes", (value)) +} + +// GetColorPlanes gets the value of ColorPlanes for the instance +func (instance *Win32_VideoConfiguration) GetPropertyColorPlanes() (value uint32, err error) { + retValue, err := instance.GetProperty("ColorPlanes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetColorTableEntries sets the value of ColorTableEntries for the instance +func (instance *Win32_VideoConfiguration) SetPropertyColorTableEntries(value uint32) (err error) { + return instance.SetProperty("ColorTableEntries", (value)) +} + +// GetColorTableEntries gets the value of ColorTableEntries for the instance +func (instance *Win32_VideoConfiguration) GetPropertyColorTableEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ColorTableEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceSpecificPens sets the value of DeviceSpecificPens for the instance +func (instance *Win32_VideoConfiguration) SetPropertyDeviceSpecificPens(value uint32) (err error) { + return instance.SetProperty("DeviceSpecificPens", (value)) +} + +// GetDeviceSpecificPens gets the value of DeviceSpecificPens for the instance +func (instance *Win32_VideoConfiguration) GetPropertyDeviceSpecificPens() (value uint32, err error) { + retValue, err := instance.GetProperty("DeviceSpecificPens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDriverDate sets the value of DriverDate for the instance +func (instance *Win32_VideoConfiguration) SetPropertyDriverDate(value string) (err error) { + return instance.SetProperty("DriverDate", (value)) +} + +// GetDriverDate gets the value of DriverDate for the instance +func (instance *Win32_VideoConfiguration) GetPropertyDriverDate() (value string, err error) { + retValue, err := instance.GetProperty("DriverDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHorizontalResolution sets the value of HorizontalResolution for the instance +func (instance *Win32_VideoConfiguration) SetPropertyHorizontalResolution(value uint32) (err error) { + return instance.SetProperty("HorizontalResolution", (value)) +} + +// GetHorizontalResolution gets the value of HorizontalResolution for the instance +func (instance *Win32_VideoConfiguration) GetPropertyHorizontalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("HorizontalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInfFilename sets the value of InfFilename for the instance +func (instance *Win32_VideoConfiguration) SetPropertyInfFilename(value string) (err error) { + return instance.SetProperty("InfFilename", (value)) +} + +// GetInfFilename gets the value of InfFilename for the instance +func (instance *Win32_VideoConfiguration) GetPropertyInfFilename() (value string, err error) { + retValue, err := instance.GetProperty("InfFilename") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInfSection sets the value of InfSection for the instance +func (instance *Win32_VideoConfiguration) SetPropertyInfSection(value string) (err error) { + return instance.SetProperty("InfSection", (value)) +} + +// GetInfSection gets the value of InfSection for the instance +func (instance *Win32_VideoConfiguration) GetPropertyInfSection() (value string, err error) { + retValue, err := instance.GetProperty("InfSection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstalledDisplayDrivers sets the value of InstalledDisplayDrivers for the instance +func (instance *Win32_VideoConfiguration) SetPropertyInstalledDisplayDrivers(value string) (err error) { + return instance.SetProperty("InstalledDisplayDrivers", (value)) +} + +// GetInstalledDisplayDrivers gets the value of InstalledDisplayDrivers for the instance +func (instance *Win32_VideoConfiguration) GetPropertyInstalledDisplayDrivers() (value string, err error) { + retValue, err := instance.GetProperty("InstalledDisplayDrivers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMonitorManufacturer sets the value of MonitorManufacturer for the instance +func (instance *Win32_VideoConfiguration) SetPropertyMonitorManufacturer(value string) (err error) { + return instance.SetProperty("MonitorManufacturer", (value)) +} + +// GetMonitorManufacturer gets the value of MonitorManufacturer for the instance +func (instance *Win32_VideoConfiguration) GetPropertyMonitorManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("MonitorManufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMonitorType sets the value of MonitorType for the instance +func (instance *Win32_VideoConfiguration) SetPropertyMonitorType(value string) (err error) { + return instance.SetProperty("MonitorType", (value)) +} + +// GetMonitorType gets the value of MonitorType for the instance +func (instance *Win32_VideoConfiguration) GetPropertyMonitorType() (value string, err error) { + retValue, err := instance.GetProperty("MonitorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *Win32_VideoConfiguration) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *Win32_VideoConfiguration) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPixelsPerXLogicalInch sets the value of PixelsPerXLogicalInch for the instance +func (instance *Win32_VideoConfiguration) SetPropertyPixelsPerXLogicalInch(value uint32) (err error) { + return instance.SetProperty("PixelsPerXLogicalInch", (value)) +} + +// GetPixelsPerXLogicalInch gets the value of PixelsPerXLogicalInch for the instance +func (instance *Win32_VideoConfiguration) GetPropertyPixelsPerXLogicalInch() (value uint32, err error) { + retValue, err := instance.GetProperty("PixelsPerXLogicalInch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPixelsPerYLogicalInch sets the value of PixelsPerYLogicalInch for the instance +func (instance *Win32_VideoConfiguration) SetPropertyPixelsPerYLogicalInch(value uint32) (err error) { + return instance.SetProperty("PixelsPerYLogicalInch", (value)) +} + +// GetPixelsPerYLogicalInch gets the value of PixelsPerYLogicalInch for the instance +func (instance *Win32_VideoConfiguration) GetPropertyPixelsPerYLogicalInch() (value uint32, err error) { + retValue, err := instance.GetProperty("PixelsPerYLogicalInch") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRefreshRate sets the value of RefreshRate for the instance +func (instance *Win32_VideoConfiguration) SetPropertyRefreshRate(value uint32) (err error) { + return instance.SetProperty("RefreshRate", (value)) +} + +// GetRefreshRate gets the value of RefreshRate for the instance +func (instance *Win32_VideoConfiguration) GetPropertyRefreshRate() (value uint32, err error) { + retValue, err := instance.GetProperty("RefreshRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScanMode sets the value of ScanMode for the instance +func (instance *Win32_VideoConfiguration) SetPropertyScanMode(value string) (err error) { + return instance.SetProperty("ScanMode", (value)) +} + +// GetScanMode gets the value of ScanMode for the instance +func (instance *Win32_VideoConfiguration) GetPropertyScanMode() (value string, err error) { + retValue, err := instance.GetProperty("ScanMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetScreenHeight sets the value of ScreenHeight for the instance +func (instance *Win32_VideoConfiguration) SetPropertyScreenHeight(value uint32) (err error) { + return instance.SetProperty("ScreenHeight", (value)) +} + +// GetScreenHeight gets the value of ScreenHeight for the instance +func (instance *Win32_VideoConfiguration) GetPropertyScreenHeight() (value uint32, err error) { + retValue, err := instance.GetProperty("ScreenHeight") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetScreenWidth sets the value of ScreenWidth for the instance +func (instance *Win32_VideoConfiguration) SetPropertyScreenWidth(value uint32) (err error) { + return instance.SetProperty("ScreenWidth", (value)) +} + +// GetScreenWidth gets the value of ScreenWidth for the instance +func (instance *Win32_VideoConfiguration) GetPropertyScreenWidth() (value uint32, err error) { + retValue, err := instance.GetProperty("ScreenWidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemPaletteEntries sets the value of SystemPaletteEntries for the instance +func (instance *Win32_VideoConfiguration) SetPropertySystemPaletteEntries(value uint32) (err error) { + return instance.SetProperty("SystemPaletteEntries", (value)) +} + +// GetSystemPaletteEntries gets the value of SystemPaletteEntries for the instance +func (instance *Win32_VideoConfiguration) GetPropertySystemPaletteEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemPaletteEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVerticalResolution sets the value of VerticalResolution for the instance +func (instance *Win32_VideoConfiguration) SetPropertyVerticalResolution(value uint32) (err error) { + return instance.SetProperty("VerticalResolution", (value)) +} + +// GetVerticalResolution gets the value of VerticalResolution for the instance +func (instance *Win32_VideoConfiguration) GetPropertyVerticalResolution() (value uint32, err error) { + retValue, err := instance.GetProperty("VerticalResolution") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoController.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoController.go new file mode 100644 index 00000000..19259df5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoController.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_VideoController struct +type Win32_VideoController struct { + *CIM_PCVideoController + + // + AdapterCompatibility string + + // + AdapterDACType string + + // + AdapterRAM uint32 + + // + ColorTableEntries uint32 + + // + DeviceSpecificPens uint32 + + // + DitherType uint32 + + // + DriverDate string + + // + DriverVersion string + + // + ICMIntent uint32 + + // + ICMMethod uint32 + + // + InfFilename string + + // + InfSection string + + // + InstalledDisplayDrivers string + + // + Monochrome bool + + // + ReservedSystemPaletteEntries uint32 + + // + SpecificationVersion uint32 + + // + SystemPaletteEntries uint32 + + // + VideoModeDescription string +} + +func NewWin32_VideoControllerEx1(instance *cim.WmiInstance) (newInstance *Win32_VideoController, err error) { + tmp, err := NewCIM_PCVideoControllerEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VideoController{ + CIM_PCVideoController: tmp, + } + return +} + +func NewWin32_VideoControllerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VideoController, err error) { + tmp, err := NewCIM_PCVideoControllerEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VideoController{ + CIM_PCVideoController: tmp, + } + return +} + +// SetAdapterCompatibility sets the value of AdapterCompatibility for the instance +func (instance *Win32_VideoController) SetPropertyAdapterCompatibility(value string) (err error) { + return instance.SetProperty("AdapterCompatibility", (value)) +} + +// GetAdapterCompatibility gets the value of AdapterCompatibility for the instance +func (instance *Win32_VideoController) GetPropertyAdapterCompatibility() (value string, err error) { + retValue, err := instance.GetProperty("AdapterCompatibility") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterDACType sets the value of AdapterDACType for the instance +func (instance *Win32_VideoController) SetPropertyAdapterDACType(value string) (err error) { + return instance.SetProperty("AdapterDACType", (value)) +} + +// GetAdapterDACType gets the value of AdapterDACType for the instance +func (instance *Win32_VideoController) GetPropertyAdapterDACType() (value string, err error) { + retValue, err := instance.GetProperty("AdapterDACType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAdapterRAM sets the value of AdapterRAM for the instance +func (instance *Win32_VideoController) SetPropertyAdapterRAM(value uint32) (err error) { + return instance.SetProperty("AdapterRAM", (value)) +} + +// GetAdapterRAM gets the value of AdapterRAM for the instance +func (instance *Win32_VideoController) GetPropertyAdapterRAM() (value uint32, err error) { + retValue, err := instance.GetProperty("AdapterRAM") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetColorTableEntries sets the value of ColorTableEntries for the instance +func (instance *Win32_VideoController) SetPropertyColorTableEntries(value uint32) (err error) { + return instance.SetProperty("ColorTableEntries", (value)) +} + +// GetColorTableEntries gets the value of ColorTableEntries for the instance +func (instance *Win32_VideoController) GetPropertyColorTableEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ColorTableEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceSpecificPens sets the value of DeviceSpecificPens for the instance +func (instance *Win32_VideoController) SetPropertyDeviceSpecificPens(value uint32) (err error) { + return instance.SetProperty("DeviceSpecificPens", (value)) +} + +// GetDeviceSpecificPens gets the value of DeviceSpecificPens for the instance +func (instance *Win32_VideoController) GetPropertyDeviceSpecificPens() (value uint32, err error) { + retValue, err := instance.GetProperty("DeviceSpecificPens") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDitherType sets the value of DitherType for the instance +func (instance *Win32_VideoController) SetPropertyDitherType(value uint32) (err error) { + return instance.SetProperty("DitherType", (value)) +} + +// GetDitherType gets the value of DitherType for the instance +func (instance *Win32_VideoController) GetPropertyDitherType() (value uint32, err error) { + retValue, err := instance.GetProperty("DitherType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDriverDate sets the value of DriverDate for the instance +func (instance *Win32_VideoController) SetPropertyDriverDate(value string) (err error) { + return instance.SetProperty("DriverDate", (value)) +} + +// GetDriverDate gets the value of DriverDate for the instance +func (instance *Win32_VideoController) GetPropertyDriverDate() (value string, err error) { + retValue, err := instance.GetProperty("DriverDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriverVersion sets the value of DriverVersion for the instance +func (instance *Win32_VideoController) SetPropertyDriverVersion(value string) (err error) { + return instance.SetProperty("DriverVersion", (value)) +} + +// GetDriverVersion gets the value of DriverVersion for the instance +func (instance *Win32_VideoController) GetPropertyDriverVersion() (value string, err error) { + retValue, err := instance.GetProperty("DriverVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetICMIntent sets the value of ICMIntent for the instance +func (instance *Win32_VideoController) SetPropertyICMIntent(value uint32) (err error) { + return instance.SetProperty("ICMIntent", (value)) +} + +// GetICMIntent gets the value of ICMIntent for the instance +func (instance *Win32_VideoController) GetPropertyICMIntent() (value uint32, err error) { + retValue, err := instance.GetProperty("ICMIntent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetICMMethod sets the value of ICMMethod for the instance +func (instance *Win32_VideoController) SetPropertyICMMethod(value uint32) (err error) { + return instance.SetProperty("ICMMethod", (value)) +} + +// GetICMMethod gets the value of ICMMethod for the instance +func (instance *Win32_VideoController) GetPropertyICMMethod() (value uint32, err error) { + retValue, err := instance.GetProperty("ICMMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInfFilename sets the value of InfFilename for the instance +func (instance *Win32_VideoController) SetPropertyInfFilename(value string) (err error) { + return instance.SetProperty("InfFilename", (value)) +} + +// GetInfFilename gets the value of InfFilename for the instance +func (instance *Win32_VideoController) GetPropertyInfFilename() (value string, err error) { + retValue, err := instance.GetProperty("InfFilename") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInfSection sets the value of InfSection for the instance +func (instance *Win32_VideoController) SetPropertyInfSection(value string) (err error) { + return instance.SetProperty("InfSection", (value)) +} + +// GetInfSection gets the value of InfSection for the instance +func (instance *Win32_VideoController) GetPropertyInfSection() (value string, err error) { + retValue, err := instance.GetProperty("InfSection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInstalledDisplayDrivers sets the value of InstalledDisplayDrivers for the instance +func (instance *Win32_VideoController) SetPropertyInstalledDisplayDrivers(value string) (err error) { + return instance.SetProperty("InstalledDisplayDrivers", (value)) +} + +// GetInstalledDisplayDrivers gets the value of InstalledDisplayDrivers for the instance +func (instance *Win32_VideoController) GetPropertyInstalledDisplayDrivers() (value string, err error) { + retValue, err := instance.GetProperty("InstalledDisplayDrivers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMonochrome sets the value of Monochrome for the instance +func (instance *Win32_VideoController) SetPropertyMonochrome(value bool) (err error) { + return instance.SetProperty("Monochrome", (value)) +} + +// GetMonochrome gets the value of Monochrome for the instance +func (instance *Win32_VideoController) GetPropertyMonochrome() (value bool, err error) { + retValue, err := instance.GetProperty("Monochrome") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReservedSystemPaletteEntries sets the value of ReservedSystemPaletteEntries for the instance +func (instance *Win32_VideoController) SetPropertyReservedSystemPaletteEntries(value uint32) (err error) { + return instance.SetProperty("ReservedSystemPaletteEntries", (value)) +} + +// GetReservedSystemPaletteEntries gets the value of ReservedSystemPaletteEntries for the instance +func (instance *Win32_VideoController) GetPropertyReservedSystemPaletteEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("ReservedSystemPaletteEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSpecificationVersion sets the value of SpecificationVersion for the instance +func (instance *Win32_VideoController) SetPropertySpecificationVersion(value uint32) (err error) { + return instance.SetProperty("SpecificationVersion", (value)) +} + +// GetSpecificationVersion gets the value of SpecificationVersion for the instance +func (instance *Win32_VideoController) GetPropertySpecificationVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("SpecificationVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSystemPaletteEntries sets the value of SystemPaletteEntries for the instance +func (instance *Win32_VideoController) SetPropertySystemPaletteEntries(value uint32) (err error) { + return instance.SetProperty("SystemPaletteEntries", (value)) +} + +// GetSystemPaletteEntries gets the value of SystemPaletteEntries for the instance +func (instance *Win32_VideoController) GetPropertySystemPaletteEntries() (value uint32, err error) { + retValue, err := instance.GetProperty("SystemPaletteEntries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVideoModeDescription sets the value of VideoModeDescription for the instance +func (instance *Win32_VideoController) SetPropertyVideoModeDescription(value string) (err error) { + return instance.SetProperty("VideoModeDescription", (value)) +} + +// GetVideoModeDescription gets the value of VideoModeDescription for the instance +func (instance *Win32_VideoController) GetPropertyVideoModeDescription() (value string, err error) { + retValue, err := instance.GetProperty("VideoModeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoSettings.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoSettings.go new file mode 100644 index 00000000..c9ecdff8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VideoSettings.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_VideoSettings struct +type Win32_VideoSettings struct { + *CIM_VideoSetting +} + +func NewWin32_VideoSettingsEx1(instance *cim.WmiInstance) (newInstance *Win32_VideoSettings, err error) { + tmp, err := NewCIM_VideoSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VideoSettings{ + CIM_VideoSetting: tmp, + } + return +} + +func NewWin32_VideoSettingsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VideoSettings, err error) { + tmp, err := NewCIM_VideoSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VideoSettings{ + CIM_VideoSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VoltageProbe.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VoltageProbe.go new file mode 100644 index 00000000..9bb0a1f6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VoltageProbe.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_VoltageProbe struct +type Win32_VoltageProbe struct { + *CIM_VoltageSensor +} + +func NewWin32_VoltageProbeEx1(instance *cim.WmiInstance) (newInstance *Win32_VoltageProbe, err error) { + tmp, err := NewCIM_VoltageSensorEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VoltageProbe{ + CIM_VoltageSensor: tmp, + } + return +} + +func NewWin32_VoltageProbeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VoltageProbe, err error) { + tmp, err := NewCIM_VoltageSensorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VoltageProbe{ + CIM_VoltageSensor: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Volume.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Volume.go new file mode 100644 index 00000000..2b792bfc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_Volume.go @@ -0,0 +1,810 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_Volume struct +type Win32_Volume struct { + *CIM_StorageVolume + + // + Automount bool + + // + BootVolume bool + + // + Capacity uint64 + + // + Compressed bool + + // + DirtyBitSet bool + + // + DriveLetter string + + // + DriveType uint32 + + // + FileSystem string + + // + FreeSpace uint64 + + // + IndexingEnabled bool + + // + Label string + + // + MaximumFileNameLength uint32 + + // + PageFilePresent bool + + // + QuotasEnabled bool + + // + QuotasIncomplete bool + + // + QuotasRebuilding bool + + // + SerialNumber uint32 + + // + SupportsDiskQuotas bool + + // + SupportsFileBasedCompression bool + + // + SystemVolume bool +} + +func NewWin32_VolumeEx1(instance *cim.WmiInstance) (newInstance *Win32_Volume, err error) { + tmp, err := NewCIM_StorageVolumeEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_Volume{ + CIM_StorageVolume: tmp, + } + return +} + +func NewWin32_VolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_Volume, err error) { + tmp, err := NewCIM_StorageVolumeEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_Volume{ + CIM_StorageVolume: tmp, + } + return +} + +// SetAutomount sets the value of Automount for the instance +func (instance *Win32_Volume) SetPropertyAutomount(value bool) (err error) { + return instance.SetProperty("Automount", (value)) +} + +// GetAutomount gets the value of Automount for the instance +func (instance *Win32_Volume) GetPropertyAutomount() (value bool, err error) { + retValue, err := instance.GetProperty("Automount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBootVolume sets the value of BootVolume for the instance +func (instance *Win32_Volume) SetPropertyBootVolume(value bool) (err error) { + return instance.SetProperty("BootVolume", (value)) +} + +// GetBootVolume gets the value of BootVolume for the instance +func (instance *Win32_Volume) GetPropertyBootVolume() (value bool, err error) { + retValue, err := instance.GetProperty("BootVolume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCapacity sets the value of Capacity for the instance +func (instance *Win32_Volume) SetPropertyCapacity(value uint64) (err error) { + return instance.SetProperty("Capacity", (value)) +} + +// GetCapacity gets the value of Capacity for the instance +func (instance *Win32_Volume) GetPropertyCapacity() (value uint64, err error) { + retValue, err := instance.GetProperty("Capacity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCompressed sets the value of Compressed for the instance +func (instance *Win32_Volume) SetPropertyCompressed(value bool) (err error) { + return instance.SetProperty("Compressed", (value)) +} + +// GetCompressed gets the value of Compressed for the instance +func (instance *Win32_Volume) GetPropertyCompressed() (value bool, err error) { + retValue, err := instance.GetProperty("Compressed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDirtyBitSet sets the value of DirtyBitSet for the instance +func (instance *Win32_Volume) SetPropertyDirtyBitSet(value bool) (err error) { + return instance.SetProperty("DirtyBitSet", (value)) +} + +// GetDirtyBitSet gets the value of DirtyBitSet for the instance +func (instance *Win32_Volume) GetPropertyDirtyBitSet() (value bool, err error) { + retValue, err := instance.GetProperty("DirtyBitSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDriveLetter sets the value of DriveLetter for the instance +func (instance *Win32_Volume) SetPropertyDriveLetter(value string) (err error) { + return instance.SetProperty("DriveLetter", (value)) +} + +// GetDriveLetter gets the value of DriveLetter for the instance +func (instance *Win32_Volume) GetPropertyDriveLetter() (value string, err error) { + retValue, err := instance.GetProperty("DriveLetter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDriveType sets the value of DriveType for the instance +func (instance *Win32_Volume) SetPropertyDriveType(value uint32) (err error) { + return instance.SetProperty("DriveType", (value)) +} + +// GetDriveType gets the value of DriveType for the instance +func (instance *Win32_Volume) GetPropertyDriveType() (value uint32, err error) { + retValue, err := instance.GetProperty("DriveType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileSystem sets the value of FileSystem for the instance +func (instance *Win32_Volume) SetPropertyFileSystem(value string) (err error) { + return instance.SetProperty("FileSystem", (value)) +} + +// GetFileSystem gets the value of FileSystem for the instance +func (instance *Win32_Volume) GetPropertyFileSystem() (value string, err error) { + retValue, err := instance.GetProperty("FileSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFreeSpace sets the value of FreeSpace for the instance +func (instance *Win32_Volume) SetPropertyFreeSpace(value uint64) (err error) { + return instance.SetProperty("FreeSpace", (value)) +} + +// GetFreeSpace gets the value of FreeSpace for the instance +func (instance *Win32_Volume) GetPropertyFreeSpace() (value uint64, err error) { + retValue, err := instance.GetProperty("FreeSpace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIndexingEnabled sets the value of IndexingEnabled for the instance +func (instance *Win32_Volume) SetPropertyIndexingEnabled(value bool) (err error) { + return instance.SetProperty("IndexingEnabled", (value)) +} + +// GetIndexingEnabled gets the value of IndexingEnabled for the instance +func (instance *Win32_Volume) GetPropertyIndexingEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IndexingEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLabel sets the value of Label for the instance +func (instance *Win32_Volume) SetPropertyLabel(value string) (err error) { + return instance.SetProperty("Label", (value)) +} + +// GetLabel gets the value of Label for the instance +func (instance *Win32_Volume) GetPropertyLabel() (value string, err error) { + retValue, err := instance.GetProperty("Label") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumFileNameLength sets the value of MaximumFileNameLength for the instance +func (instance *Win32_Volume) SetPropertyMaximumFileNameLength(value uint32) (err error) { + return instance.SetProperty("MaximumFileNameLength", (value)) +} + +// GetMaximumFileNameLength gets the value of MaximumFileNameLength for the instance +func (instance *Win32_Volume) GetPropertyMaximumFileNameLength() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumFileNameLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPageFilePresent sets the value of PageFilePresent for the instance +func (instance *Win32_Volume) SetPropertyPageFilePresent(value bool) (err error) { + return instance.SetProperty("PageFilePresent", (value)) +} + +// GetPageFilePresent gets the value of PageFilePresent for the instance +func (instance *Win32_Volume) GetPropertyPageFilePresent() (value bool, err error) { + retValue, err := instance.GetProperty("PageFilePresent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasEnabled sets the value of QuotasEnabled for the instance +func (instance *Win32_Volume) SetPropertyQuotasEnabled(value bool) (err error) { + return instance.SetProperty("QuotasEnabled", (value)) +} + +// GetQuotasEnabled gets the value of QuotasEnabled for the instance +func (instance *Win32_Volume) GetPropertyQuotasEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasIncomplete sets the value of QuotasIncomplete for the instance +func (instance *Win32_Volume) SetPropertyQuotasIncomplete(value bool) (err error) { + return instance.SetProperty("QuotasIncomplete", (value)) +} + +// GetQuotasIncomplete gets the value of QuotasIncomplete for the instance +func (instance *Win32_Volume) GetPropertyQuotasIncomplete() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasIncomplete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetQuotasRebuilding sets the value of QuotasRebuilding for the instance +func (instance *Win32_Volume) SetPropertyQuotasRebuilding(value bool) (err error) { + return instance.SetProperty("QuotasRebuilding", (value)) +} + +// GetQuotasRebuilding gets the value of QuotasRebuilding for the instance +func (instance *Win32_Volume) GetPropertyQuotasRebuilding() (value bool, err error) { + retValue, err := instance.GetProperty("QuotasRebuilding") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *Win32_Volume) SetPropertySerialNumber(value uint32) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *Win32_Volume) GetPropertySerialNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSupportsDiskQuotas sets the value of SupportsDiskQuotas for the instance +func (instance *Win32_Volume) SetPropertySupportsDiskQuotas(value bool) (err error) { + return instance.SetProperty("SupportsDiskQuotas", (value)) +} + +// GetSupportsDiskQuotas gets the value of SupportsDiskQuotas for the instance +func (instance *Win32_Volume) GetPropertySupportsDiskQuotas() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDiskQuotas") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFileBasedCompression sets the value of SupportsFileBasedCompression for the instance +func (instance *Win32_Volume) SetPropertySupportsFileBasedCompression(value bool) (err error) { + return instance.SetProperty("SupportsFileBasedCompression", (value)) +} + +// GetSupportsFileBasedCompression gets the value of SupportsFileBasedCompression for the instance +func (instance *Win32_Volume) GetPropertySupportsFileBasedCompression() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFileBasedCompression") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSystemVolume sets the value of SystemVolume for the instance +func (instance *Win32_Volume) SetPropertySystemVolume(value bool) (err error) { + return instance.SetProperty("SystemVolume", (value)) +} + +// GetSystemVolume gets the value of SystemVolume for the instance +func (instance *Win32_Volume) GetPropertySystemVolume() (value bool, err error) { + retValue, err := instance.GetProperty("SystemVolume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +// +// +// +// +// + +// +func (instance *Win32_Volume) Chkdsk( /* IN */ FixErrors bool, + /* IN */ VigorousIndexCheck bool, + /* IN */ SkipFolderCycle bool, + /* IN */ ForceDismount bool, + /* IN */ RecoverBadSectors bool, + /* IN */ OkToRunAtBootUp bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Chkdsk", FixErrors, VigorousIndexCheck, SkipFolderCycle, ForceDismount, RecoverBadSectors, OkToRunAtBootUp) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_Volume) ScheduleAutoChk( /* IN */ Volume []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ScheduleAutoChk", Volume) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *Win32_Volume) ExcludeFromAutoChk( /* IN */ Volume []string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("ExcludeFromAutoChk", Volume) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// + +// +func (instance *Win32_Volume) Format( /* IN */ FileSystem string, + /* IN */ QuickFormat bool, + /* IN */ ClusterSize uint32, + /* IN */ Label string, + /* IN */ EnableCompression bool, + /* IN */ Version uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Format", FileSystem, QuickFormat, ClusterSize, Label, EnableCompression, Version) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +// +func (instance *Win32_Volume) Defrag( /* IN */ Force bool, + /* OUT */ DefragAnalysis interface{}) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Defrag", Force) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *Win32_Volume) DefragAnalysis( /* OUT */ DefragRecommended bool, + /* OUT */ DefragAnalysis interface{}) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DefragAnalysis") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *Win32_Volume) AddMountPoint( /* IN */ Directory string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AddMountPoint", Directory) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *Win32_Volume) Mount() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Mount") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *Win32_Volume) Dismount( /* IN */ Force bool, + /* IN */ Permanent bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Dismount", Force, Permanent) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeChangeEvent.go new file mode 100644 index 00000000..bbdcbf6a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeChangeEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_VolumeChangeEvent struct +type Win32_VolumeChangeEvent struct { + *Win32_DeviceChangeEvent + + // + DriveName string +} + +func NewWin32_VolumeChangeEventEx1(instance *cim.WmiInstance) (newInstance *Win32_VolumeChangeEvent, err error) { + tmp, err := NewWin32_DeviceChangeEventEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VolumeChangeEvent{ + Win32_DeviceChangeEvent: tmp, + } + return +} + +func NewWin32_VolumeChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VolumeChangeEvent, err error) { + tmp, err := NewWin32_DeviceChangeEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VolumeChangeEvent{ + Win32_DeviceChangeEvent: tmp, + } + return +} + +// SetDriveName sets the value of DriveName for the instance +func (instance *Win32_VolumeChangeEvent) SetPropertyDriveName(value string) (err error) { + return instance.SetProperty("DriveName", (value)) +} + +// GetDriveName gets the value of DriveName for the instance +func (instance *Win32_VolumeChangeEvent) GetPropertyDriveName() (value string, err error) { + retValue, err := instance.GetProperty("DriveName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuota.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuota.go new file mode 100644 index 00000000..c0ada782 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuota.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_VolumeQuota struct +type Win32_VolumeQuota struct { + *CIM_ElementSetting +} + +func NewWin32_VolumeQuotaEx1(instance *cim.WmiInstance) (newInstance *Win32_VolumeQuota, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VolumeQuota{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_VolumeQuotaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VolumeQuota, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VolumeQuota{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuotaSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuotaSetting.go new file mode 100644 index 00000000..80d4e9f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeQuotaSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_VolumeQuotaSetting struct +type Win32_VolumeQuotaSetting struct { + *CIM_ElementSetting +} + +func NewWin32_VolumeQuotaSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_VolumeQuotaSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_VolumeQuotaSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_VolumeQuotaSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VolumeQuotaSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VolumeQuotaSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeUserQuota.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeUserQuota.go new file mode 100644 index 00000000..c5660c77 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_VolumeUserQuota.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_VolumeUserQuota struct +type Win32_VolumeUserQuota struct { + *cim.WmiInstance + + // + Account Win32_Account + + // + DiskSpaceUsed uint64 + + // + Limit uint64 + + // + Status uint32 + + // + Volume Win32_Volume + + // + WarningLimit uint64 +} + +func NewWin32_VolumeUserQuotaEx1(instance *cim.WmiInstance) (newInstance *Win32_VolumeUserQuota, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_VolumeUserQuota{ + WmiInstance: tmp, + } + return +} + +func NewWin32_VolumeUserQuotaEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_VolumeUserQuota, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_VolumeUserQuota{ + WmiInstance: tmp, + } + return +} + +// SetAccount sets the value of Account for the instance +func (instance *Win32_VolumeUserQuota) SetPropertyAccount(value Win32_Account) (err error) { + return instance.SetProperty("Account", (value)) +} + +// GetAccount gets the value of Account for the instance +func (instance *Win32_VolumeUserQuota) GetPropertyAccount() (value Win32_Account, err error) { + retValue, err := instance.GetProperty("Account") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Account) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Account is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Account(valuetmp) + + return +} + +// SetDiskSpaceUsed sets the value of DiskSpaceUsed for the instance +func (instance *Win32_VolumeUserQuota) SetPropertyDiskSpaceUsed(value uint64) (err error) { + return instance.SetProperty("DiskSpaceUsed", (value)) +} + +// GetDiskSpaceUsed gets the value of DiskSpaceUsed for the instance +func (instance *Win32_VolumeUserQuota) GetPropertyDiskSpaceUsed() (value uint64, err error) { + retValue, err := instance.GetProperty("DiskSpaceUsed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLimit sets the value of Limit for the instance +func (instance *Win32_VolumeUserQuota) SetPropertyLimit(value uint64) (err error) { + return instance.SetProperty("Limit", (value)) +} + +// GetLimit gets the value of Limit for the instance +func (instance *Win32_VolumeUserQuota) GetPropertyLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("Limit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *Win32_VolumeUserQuota) SetPropertyStatus(value uint32) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *Win32_VolumeUserQuota) GetPropertyStatus() (value uint32, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *Win32_VolumeUserQuota) SetPropertyVolume(value Win32_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *Win32_VolumeUserQuota) GetPropertyVolume() (value Win32_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(Win32_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " Win32_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32_Volume(valuetmp) + + return +} + +// SetWarningLimit sets the value of WarningLimit for the instance +func (instance *Win32_VolumeUserQuota) SetPropertyWarningLimit(value uint64) (err error) { + return instance.SetProperty("WarningLimit", (value)) +} + +// GetWarningLimit gets the value of WarningLimit for the instance +func (instance *Win32_VolumeUserQuota) GetPropertyWarningLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("WarningLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMIElementSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMIElementSetting.go new file mode 100644 index 00000000..9d3ed41b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMIElementSetting.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// Win32_WMIElementSetting struct +type Win32_WMIElementSetting struct { + *CIM_ElementSetting +} + +func NewWin32_WMIElementSettingEx1(instance *cim.WmiInstance) (newInstance *Win32_WMIElementSetting, err error) { + tmp, err := NewCIM_ElementSettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_WMIElementSetting{ + CIM_ElementSetting: tmp, + } + return +} + +func NewWin32_WMIElementSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_WMIElementSetting, err error) { + tmp, err := NewCIM_ElementSettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_WMIElementSetting{ + CIM_ElementSetting: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMISetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMISetting.go new file mode 100644 index 00000000..088e86d0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WMISetting.go @@ -0,0 +1,771 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_WMISetting struct +type Win32_WMISetting struct { + *CIM_Setting + + // + ASPScriptDefaultNamespace string + + // + ASPScriptEnabled bool + + // + AutorecoverMofs []string + + // + AutoStartWin9X uint32 + + // + BackupInterval uint32 + + // + BackupLastTime string + + // + BuildVersion string + + // + DatabaseDirectory string + + // + DatabaseMaxSize uint32 + + // + EnableAnonWin9xConnections bool + + // + EnableEvents bool + + // + EnableStartupHeapPreallocation bool + + // + HighThresholdOnClientObjects uint32 + + // + HighThresholdOnEvents uint32 + + // + InstallationDirectory string + + // + LastStartupHeapPreallocation uint32 + + // + LoggingDirectory string + + // + LoggingLevel uint32 + + // + LowThresholdOnClientObjects uint32 + + // + LowThresholdOnEvents uint32 + + // + MaxLogFileSize uint32 + + // + MaxWaitOnClientObjects uint32 + + // + MaxWaitOnEvents uint32 + + // + MofSelfInstallDirectory string +} + +func NewWin32_WMISettingEx1(instance *cim.WmiInstance) (newInstance *Win32_WMISetting, err error) { + tmp, err := NewCIM_SettingEx1(instance) + + if err != nil { + return + } + newInstance = &Win32_WMISetting{ + CIM_Setting: tmp, + } + return +} + +func NewWin32_WMISettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_WMISetting, err error) { + tmp, err := NewCIM_SettingEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_WMISetting{ + CIM_Setting: tmp, + } + return +} + +// SetASPScriptDefaultNamespace sets the value of ASPScriptDefaultNamespace for the instance +func (instance *Win32_WMISetting) SetPropertyASPScriptDefaultNamespace(value string) (err error) { + return instance.SetProperty("ASPScriptDefaultNamespace", (value)) +} + +// GetASPScriptDefaultNamespace gets the value of ASPScriptDefaultNamespace for the instance +func (instance *Win32_WMISetting) GetPropertyASPScriptDefaultNamespace() (value string, err error) { + retValue, err := instance.GetProperty("ASPScriptDefaultNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetASPScriptEnabled sets the value of ASPScriptEnabled for the instance +func (instance *Win32_WMISetting) SetPropertyASPScriptEnabled(value bool) (err error) { + return instance.SetProperty("ASPScriptEnabled", (value)) +} + +// GetASPScriptEnabled gets the value of ASPScriptEnabled for the instance +func (instance *Win32_WMISetting) GetPropertyASPScriptEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("ASPScriptEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetAutorecoverMofs sets the value of AutorecoverMofs for the instance +func (instance *Win32_WMISetting) SetPropertyAutorecoverMofs(value []string) (err error) { + return instance.SetProperty("AutorecoverMofs", (value)) +} + +// GetAutorecoverMofs gets the value of AutorecoverMofs for the instance +func (instance *Win32_WMISetting) GetPropertyAutorecoverMofs() (value []string, err error) { + retValue, err := instance.GetProperty("AutorecoverMofs") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetAutoStartWin9X sets the value of AutoStartWin9X for the instance +func (instance *Win32_WMISetting) SetPropertyAutoStartWin9X(value uint32) (err error) { + return instance.SetProperty("AutoStartWin9X", (value)) +} + +// GetAutoStartWin9X gets the value of AutoStartWin9X for the instance +func (instance *Win32_WMISetting) GetPropertyAutoStartWin9X() (value uint32, err error) { + retValue, err := instance.GetProperty("AutoStartWin9X") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBackupInterval sets the value of BackupInterval for the instance +func (instance *Win32_WMISetting) SetPropertyBackupInterval(value uint32) (err error) { + return instance.SetProperty("BackupInterval", (value)) +} + +// GetBackupInterval gets the value of BackupInterval for the instance +func (instance *Win32_WMISetting) GetPropertyBackupInterval() (value uint32, err error) { + retValue, err := instance.GetProperty("BackupInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetBackupLastTime sets the value of BackupLastTime for the instance +func (instance *Win32_WMISetting) SetPropertyBackupLastTime(value string) (err error) { + return instance.SetProperty("BackupLastTime", (value)) +} + +// GetBackupLastTime gets the value of BackupLastTime for the instance +func (instance *Win32_WMISetting) GetPropertyBackupLastTime() (value string, err error) { + retValue, err := instance.GetProperty("BackupLastTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetBuildVersion sets the value of BuildVersion for the instance +func (instance *Win32_WMISetting) SetPropertyBuildVersion(value string) (err error) { + return instance.SetProperty("BuildVersion", (value)) +} + +// GetBuildVersion gets the value of BuildVersion for the instance +func (instance *Win32_WMISetting) GetPropertyBuildVersion() (value string, err error) { + retValue, err := instance.GetProperty("BuildVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDatabaseDirectory sets the value of DatabaseDirectory for the instance +func (instance *Win32_WMISetting) SetPropertyDatabaseDirectory(value string) (err error) { + return instance.SetProperty("DatabaseDirectory", (value)) +} + +// GetDatabaseDirectory gets the value of DatabaseDirectory for the instance +func (instance *Win32_WMISetting) GetPropertyDatabaseDirectory() (value string, err error) { + retValue, err := instance.GetProperty("DatabaseDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDatabaseMaxSize sets the value of DatabaseMaxSize for the instance +func (instance *Win32_WMISetting) SetPropertyDatabaseMaxSize(value uint32) (err error) { + return instance.SetProperty("DatabaseMaxSize", (value)) +} + +// GetDatabaseMaxSize gets the value of DatabaseMaxSize for the instance +func (instance *Win32_WMISetting) GetPropertyDatabaseMaxSize() (value uint32, err error) { + retValue, err := instance.GetProperty("DatabaseMaxSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetEnableAnonWin9xConnections sets the value of EnableAnonWin9xConnections for the instance +func (instance *Win32_WMISetting) SetPropertyEnableAnonWin9xConnections(value bool) (err error) { + return instance.SetProperty("EnableAnonWin9xConnections", (value)) +} + +// GetEnableAnonWin9xConnections gets the value of EnableAnonWin9xConnections for the instance +func (instance *Win32_WMISetting) GetPropertyEnableAnonWin9xConnections() (value bool, err error) { + retValue, err := instance.GetProperty("EnableAnonWin9xConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnableEvents sets the value of EnableEvents for the instance +func (instance *Win32_WMISetting) SetPropertyEnableEvents(value bool) (err error) { + return instance.SetProperty("EnableEvents", (value)) +} + +// GetEnableEvents gets the value of EnableEvents for the instance +func (instance *Win32_WMISetting) GetPropertyEnableEvents() (value bool, err error) { + retValue, err := instance.GetProperty("EnableEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnableStartupHeapPreallocation sets the value of EnableStartupHeapPreallocation for the instance +func (instance *Win32_WMISetting) SetPropertyEnableStartupHeapPreallocation(value bool) (err error) { + return instance.SetProperty("EnableStartupHeapPreallocation", (value)) +} + +// GetEnableStartupHeapPreallocation gets the value of EnableStartupHeapPreallocation for the instance +func (instance *Win32_WMISetting) GetPropertyEnableStartupHeapPreallocation() (value bool, err error) { + retValue, err := instance.GetProperty("EnableStartupHeapPreallocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHighThresholdOnClientObjects sets the value of HighThresholdOnClientObjects for the instance +func (instance *Win32_WMISetting) SetPropertyHighThresholdOnClientObjects(value uint32) (err error) { + return instance.SetProperty("HighThresholdOnClientObjects", (value)) +} + +// GetHighThresholdOnClientObjects gets the value of HighThresholdOnClientObjects for the instance +func (instance *Win32_WMISetting) GetPropertyHighThresholdOnClientObjects() (value uint32, err error) { + retValue, err := instance.GetProperty("HighThresholdOnClientObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHighThresholdOnEvents sets the value of HighThresholdOnEvents for the instance +func (instance *Win32_WMISetting) SetPropertyHighThresholdOnEvents(value uint32) (err error) { + return instance.SetProperty("HighThresholdOnEvents", (value)) +} + +// GetHighThresholdOnEvents gets the value of HighThresholdOnEvents for the instance +func (instance *Win32_WMISetting) GetPropertyHighThresholdOnEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("HighThresholdOnEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetInstallationDirectory sets the value of InstallationDirectory for the instance +func (instance *Win32_WMISetting) SetPropertyInstallationDirectory(value string) (err error) { + return instance.SetProperty("InstallationDirectory", (value)) +} + +// GetInstallationDirectory gets the value of InstallationDirectory for the instance +func (instance *Win32_WMISetting) GetPropertyInstallationDirectory() (value string, err error) { + retValue, err := instance.GetProperty("InstallationDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLastStartupHeapPreallocation sets the value of LastStartupHeapPreallocation for the instance +func (instance *Win32_WMISetting) SetPropertyLastStartupHeapPreallocation(value uint32) (err error) { + return instance.SetProperty("LastStartupHeapPreallocation", (value)) +} + +// GetLastStartupHeapPreallocation gets the value of LastStartupHeapPreallocation for the instance +func (instance *Win32_WMISetting) GetPropertyLastStartupHeapPreallocation() (value uint32, err error) { + retValue, err := instance.GetProperty("LastStartupHeapPreallocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLoggingDirectory sets the value of LoggingDirectory for the instance +func (instance *Win32_WMISetting) SetPropertyLoggingDirectory(value string) (err error) { + return instance.SetProperty("LoggingDirectory", (value)) +} + +// GetLoggingDirectory gets the value of LoggingDirectory for the instance +func (instance *Win32_WMISetting) GetPropertyLoggingDirectory() (value string, err error) { + retValue, err := instance.GetProperty("LoggingDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLoggingLevel sets the value of LoggingLevel for the instance +func (instance *Win32_WMISetting) SetPropertyLoggingLevel(value uint32) (err error) { + return instance.SetProperty("LoggingLevel", (value)) +} + +// GetLoggingLevel gets the value of LoggingLevel for the instance +func (instance *Win32_WMISetting) GetPropertyLoggingLevel() (value uint32, err error) { + retValue, err := instance.GetProperty("LoggingLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowThresholdOnClientObjects sets the value of LowThresholdOnClientObjects for the instance +func (instance *Win32_WMISetting) SetPropertyLowThresholdOnClientObjects(value uint32) (err error) { + return instance.SetProperty("LowThresholdOnClientObjects", (value)) +} + +// GetLowThresholdOnClientObjects gets the value of LowThresholdOnClientObjects for the instance +func (instance *Win32_WMISetting) GetPropertyLowThresholdOnClientObjects() (value uint32, err error) { + retValue, err := instance.GetProperty("LowThresholdOnClientObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLowThresholdOnEvents sets the value of LowThresholdOnEvents for the instance +func (instance *Win32_WMISetting) SetPropertyLowThresholdOnEvents(value uint32) (err error) { + return instance.SetProperty("LowThresholdOnEvents", (value)) +} + +// GetLowThresholdOnEvents gets the value of LowThresholdOnEvents for the instance +func (instance *Win32_WMISetting) GetPropertyLowThresholdOnEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("LowThresholdOnEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxLogFileSize sets the value of MaxLogFileSize for the instance +func (instance *Win32_WMISetting) SetPropertyMaxLogFileSize(value uint32) (err error) { + return instance.SetProperty("MaxLogFileSize", (value)) +} + +// GetMaxLogFileSize gets the value of MaxLogFileSize for the instance +func (instance *Win32_WMISetting) GetPropertyMaxLogFileSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxLogFileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxWaitOnClientObjects sets the value of MaxWaitOnClientObjects for the instance +func (instance *Win32_WMISetting) SetPropertyMaxWaitOnClientObjects(value uint32) (err error) { + return instance.SetProperty("MaxWaitOnClientObjects", (value)) +} + +// GetMaxWaitOnClientObjects gets the value of MaxWaitOnClientObjects for the instance +func (instance *Win32_WMISetting) GetPropertyMaxWaitOnClientObjects() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxWaitOnClientObjects") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMaxWaitOnEvents sets the value of MaxWaitOnEvents for the instance +func (instance *Win32_WMISetting) SetPropertyMaxWaitOnEvents(value uint32) (err error) { + return instance.SetProperty("MaxWaitOnEvents", (value)) +} + +// GetMaxWaitOnEvents gets the value of MaxWaitOnEvents for the instance +func (instance *Win32_WMISetting) GetPropertyMaxWaitOnEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("MaxWaitOnEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetMofSelfInstallDirectory sets the value of MofSelfInstallDirectory for the instance +func (instance *Win32_WMISetting) SetPropertyMofSelfInstallDirectory(value string) (err error) { + return instance.SetProperty("MofSelfInstallDirectory", (value)) +} + +// GetMofSelfInstallDirectory gets the value of MofSelfInstallDirectory for the instance +func (instance *Win32_WMISetting) GetPropertyMofSelfInstallDirectory() (value string, err error) { + retValue, err := instance.GetProperty("MofSelfInstallDirectory") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WinSAT.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WinSAT.go new file mode 100644 index 00000000..d43b6ba9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/Win32_WinSAT.go @@ -0,0 +1,291 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// Win32_WinSAT struct +type Win32_WinSAT struct { + *cim.WmiInstance + + // + CPUScore float32 + + // + D3DScore float32 + + // + DiskScore float32 + + // + GraphicsScore float32 + + // + MemoryScore float32 + + // + TimeTaken string + + // + WinSATAssessmentState WinSAT_WinSATAssessmentState + + // + WinSPRLevel float32 +} + +func NewWin32_WinSATEx1(instance *cim.WmiInstance) (newInstance *Win32_WinSAT, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &Win32_WinSAT{ + WmiInstance: tmp, + } + return +} + +func NewWin32_WinSATEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *Win32_WinSAT, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &Win32_WinSAT{ + WmiInstance: tmp, + } + return +} + +// SetCPUScore sets the value of CPUScore for the instance +func (instance *Win32_WinSAT) SetPropertyCPUScore(value float32) (err error) { + return instance.SetProperty("CPUScore", (value)) +} + +// GetCPUScore gets the value of CPUScore for the instance +func (instance *Win32_WinSAT) GetPropertyCPUScore() (value float32, err error) { + retValue, err := instance.GetProperty("CPUScore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetD3DScore sets the value of D3DScore for the instance +func (instance *Win32_WinSAT) SetPropertyD3DScore(value float32) (err error) { + return instance.SetProperty("D3DScore", (value)) +} + +// GetD3DScore gets the value of D3DScore for the instance +func (instance *Win32_WinSAT) GetPropertyD3DScore() (value float32, err error) { + retValue, err := instance.GetProperty("D3DScore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetDiskScore sets the value of DiskScore for the instance +func (instance *Win32_WinSAT) SetPropertyDiskScore(value float32) (err error) { + return instance.SetProperty("DiskScore", (value)) +} + +// GetDiskScore gets the value of DiskScore for the instance +func (instance *Win32_WinSAT) GetPropertyDiskScore() (value float32, err error) { + retValue, err := instance.GetProperty("DiskScore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetGraphicsScore sets the value of GraphicsScore for the instance +func (instance *Win32_WinSAT) SetPropertyGraphicsScore(value float32) (err error) { + return instance.SetProperty("GraphicsScore", (value)) +} + +// GetGraphicsScore gets the value of GraphicsScore for the instance +func (instance *Win32_WinSAT) GetPropertyGraphicsScore() (value float32, err error) { + retValue, err := instance.GetProperty("GraphicsScore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetMemoryScore sets the value of MemoryScore for the instance +func (instance *Win32_WinSAT) SetPropertyMemoryScore(value float32) (err error) { + return instance.SetProperty("MemoryScore", (value)) +} + +// GetMemoryScore gets the value of MemoryScore for the instance +func (instance *Win32_WinSAT) GetPropertyMemoryScore() (value float32, err error) { + retValue, err := instance.GetProperty("MemoryScore") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} + +// SetTimeTaken sets the value of TimeTaken for the instance +func (instance *Win32_WinSAT) SetPropertyTimeTaken(value string) (err error) { + return instance.SetProperty("TimeTaken", (value)) +} + +// GetTimeTaken gets the value of TimeTaken for the instance +func (instance *Win32_WinSAT) GetPropertyTimeTaken() (value string, err error) { + retValue, err := instance.GetProperty("TimeTaken") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetWinSATAssessmentState sets the value of WinSATAssessmentState for the instance +func (instance *Win32_WinSAT) SetPropertyWinSATAssessmentState(value WinSAT_WinSATAssessmentState) (err error) { + return instance.SetProperty("WinSATAssessmentState", (value)) +} + +// GetWinSATAssessmentState gets the value of WinSATAssessmentState for the instance +func (instance *Win32_WinSAT) GetPropertyWinSATAssessmentState() (value WinSAT_WinSATAssessmentState, err error) { + retValue, err := instance.GetProperty("WinSATAssessmentState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = WinSAT_WinSATAssessmentState(valuetmp) + + return +} + +// SetWinSPRLevel sets the value of WinSPRLevel for the instance +func (instance *Win32_WinSAT) SetPropertyWinSPRLevel(value float32) (err error) { + return instance.SetProperty("WinSPRLevel", (value)) +} + +// GetWinSPRLevel gets the value of WinSPRLevel for the instance +func (instance *Win32_WinSAT) GetPropertyWinSPRLevel() (value float32, err error) { + retValue, err := instance.GetProperty("WinSPRLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/WinSAT_WinSATAssessmentState.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/WinSAT_WinSATAssessmentState.go new file mode 100644 index 00000000..d9dbb06c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/WinSAT_WinSATAssessmentState.go @@ -0,0 +1,25 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source WinSAT_WinSATAssessmentState +////////////////////////////////////////////// +package cimv2 + +// WinSAT_WinSATAssessmentState +type WinSAT_WinSATAssessmentState int + +const ( + // StateUnknown enum + WinSAT_WinSATAssessmentState_StateUnknown WinSAT_WinSATAssessmentState = 0 + // Valid enum + WinSAT_WinSATAssessmentState_Valid WinSAT_WinSATAssessmentState = 1 + // IncoherentWithHardware enum + WinSAT_WinSATAssessmentState_IncoherentWithHardware WinSAT_WinSATAssessmentState = 2 + // NoAssessmentAvailable enum + WinSAT_WinSATAssessmentState_NoAssessmentAvailable WinSAT_WinSATAssessmentState = 3 + // Invalid enum + WinSAT_WinSATAssessmentState_Invalid WinSAT_WinSATAssessmentState = 4 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/thisNAMESPACE.go b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/thisNAMESPACE.go new file mode 100644 index 00000000..33e3b505 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/cimv2/thisNAMESPACE.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.CIMV2 +////////////////////////////////////////////// +package cimv2 + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __thisNAMESPACE struct +type __thisNAMESPACE struct { + *__SystemClass + + // + SECURITY_DESCRIPTOR []uint8 +} + +func New__thisNAMESPACEEx1(instance *cim.WmiInstance) (newInstance *__thisNAMESPACE, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__thisNAMESPACE{ + __SystemClass: tmp, + } + return +} + +func New__thisNAMESPACEEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__thisNAMESPACE, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__thisNAMESPACE{ + __SystemClass: tmp, + } + return +} + +// SetSECURITY_DESCRIPTOR sets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__thisNAMESPACE) SetPropertySECURITY_DESCRIPTOR(value []uint8) (err error) { + return instance.SetProperty("SECURITY_DESCRIPTOR", (value)) +} + +// GetSECURITY_DESCRIPTOR gets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__thisNAMESPACE) GetPropertySECURITY_DESCRIPTOR() (value []uint8, err error) { + retValue, err := instance.GetProperty("SECURITY_DESCRIPTOR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ACE.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ACE.go new file mode 100644 index 00000000..55abedef --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ACE.go @@ -0,0 +1,260 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ACE struct +type __ACE struct { + *__SecurityRelatedClass + + // + AccessMask uint32 + + // + AceFlags uint32 + + // + AceType uint32 + + // + GuidInheritedObjectType string + + // + GuidObjectType string + + // + TIME_CREATED uint64 + + // + Trustee __Trustee +} + +func New__ACEEx1(instance *cim.WmiInstance) (newInstance *__ACE, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__ACE{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__ACEEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ACE, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ACE{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetAccessMask sets the value of AccessMask for the instance +func (instance *__ACE) SetPropertyAccessMask(value uint32) (err error) { + return instance.SetProperty("AccessMask", (value)) +} + +// GetAccessMask gets the value of AccessMask for the instance +func (instance *__ACE) GetPropertyAccessMask() (value uint32, err error) { + retValue, err := instance.GetProperty("AccessMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAceFlags sets the value of AceFlags for the instance +func (instance *__ACE) SetPropertyAceFlags(value uint32) (err error) { + return instance.SetProperty("AceFlags", (value)) +} + +// GetAceFlags gets the value of AceFlags for the instance +func (instance *__ACE) GetPropertyAceFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("AceFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetAceType sets the value of AceType for the instance +func (instance *__ACE) SetPropertyAceType(value uint32) (err error) { + return instance.SetProperty("AceType", (value)) +} + +// GetAceType gets the value of AceType for the instance +func (instance *__ACE) GetPropertyAceType() (value uint32, err error) { + retValue, err := instance.GetProperty("AceType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetGuidInheritedObjectType sets the value of GuidInheritedObjectType for the instance +func (instance *__ACE) SetPropertyGuidInheritedObjectType(value string) (err error) { + return instance.SetProperty("GuidInheritedObjectType", (value)) +} + +// GetGuidInheritedObjectType gets the value of GuidInheritedObjectType for the instance +func (instance *__ACE) GetPropertyGuidInheritedObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidInheritedObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetGuidObjectType sets the value of GuidObjectType for the instance +func (instance *__ACE) SetPropertyGuidObjectType(value string) (err error) { + return instance.SetProperty("GuidObjectType", (value)) +} + +// GetGuidObjectType gets the value of GuidObjectType for the instance +func (instance *__ACE) GetPropertyGuidObjectType() (value string, err error) { + retValue, err := instance.GetProperty("GuidObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__ACE) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__ACE) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTrustee sets the value of Trustee for the instance +func (instance *__ACE) SetPropertyTrustee(value __Trustee) (err error) { + return instance.SetProperty("Trustee", (value)) +} + +// GetTrustee gets the value of Trustee for the instance +func (instance *__ACE) GetPropertyTrustee() (value __Trustee, err error) { + retValue, err := instance.GetProperty("Trustee") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Trustee) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Trustee is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Trustee(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AbsoluteTimerInstruction.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AbsoluteTimerInstruction.go new file mode 100644 index 00000000..a0aefee8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AbsoluteTimerInstruction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __AbsoluteTimerInstruction struct +type __AbsoluteTimerInstruction struct { + *__TimerInstruction + + // + EventDateTime string +} + +func New__AbsoluteTimerInstructionEx1(instance *cim.WmiInstance) (newInstance *__AbsoluteTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx1(instance) + + if err != nil { + return + } + newInstance = &__AbsoluteTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +func New__AbsoluteTimerInstructionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__AbsoluteTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__AbsoluteTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +// SetEventDateTime sets the value of EventDateTime for the instance +func (instance *__AbsoluteTimerInstruction) SetPropertyEventDateTime(value string) (err error) { + return instance.SetProperty("EventDateTime", (value)) +} + +// GetEventDateTime gets the value of EventDateTime for the instance +func (instance *__AbsoluteTimerInstruction) GetPropertyEventDateTime() (value string, err error) { + retValue, err := instance.GetProperty("EventDateTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AggregateEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AggregateEvent.go new file mode 100644 index 00000000..6722c717 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/AggregateEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __AggregateEvent struct +type __AggregateEvent struct { + *__IndicationRelated + + // + NumberOfEvents uint32 + + // + Representative interface{} +} + +func New__AggregateEventEx1(instance *cim.WmiInstance) (newInstance *__AggregateEvent, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__AggregateEvent{ + __IndicationRelated: tmp, + } + return +} + +func New__AggregateEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__AggregateEvent, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__AggregateEvent{ + __IndicationRelated: tmp, + } + return +} + +// SetNumberOfEvents sets the value of NumberOfEvents for the instance +func (instance *__AggregateEvent) SetPropertyNumberOfEvents(value uint32) (err error) { + return instance.SetProperty("NumberOfEvents", (value)) +} + +// GetNumberOfEvents gets the value of NumberOfEvents for the instance +func (instance *__AggregateEvent) GetPropertyNumberOfEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetRepresentative sets the value of Representative for the instance +func (instance *__AggregateEvent) SetPropertyRepresentative(value interface{}) (err error) { + return instance.SetProperty("Representative", (value)) +} + +// GetRepresentative gets the value of Representative for the instance +func (instance *__AggregateEvent) GetPropertyRepresentative() (value interface{}, err error) { + retValue, err := instance.GetProperty("Representative") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassCreation.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassCreation.go new file mode 100644 index 00000000..356e5a7f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassCreation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClassCreation struct +type CIM_ClassCreation struct { + *CIM_ClassIndication +} + +func NewCIM_ClassCreationEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassCreation, err error) { + tmp, err := NewCIM_ClassIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassCreation{ + CIM_ClassIndication: tmp, + } + return +} + +func NewCIM_ClassCreationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassCreation, err error) { + tmp, err := NewCIM_ClassIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassCreation{ + CIM_ClassIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassDeletion.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassDeletion.go new file mode 100644 index 00000000..fece2ac3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassDeletion.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_ClassDeletion struct +type CIM_ClassDeletion struct { + *CIM_ClassIndication +} + +func NewCIM_ClassDeletionEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassDeletion, err error) { + tmp, err := NewCIM_ClassIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassDeletion{ + CIM_ClassIndication: tmp, + } + return +} + +func NewCIM_ClassDeletionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassDeletion, err error) { + tmp, err := NewCIM_ClassIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassDeletion{ + CIM_ClassIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassIndication.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassIndication.go new file mode 100644 index 00000000..a771335e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassIndication.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ClassIndication struct +type CIM_ClassIndication struct { + *CIM_Indication + + // The current definition of the class that is created, changed or deleted in the schema. In the case of a CIM_ClassDeletion Indication, the definition for the class just prior to deletion should be placed in this property. + ClassDefinition interface{} +} + +func NewCIM_ClassIndicationEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassIndication, err error) { + tmp, err := NewCIM_IndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassIndication{ + CIM_Indication: tmp, + } + return +} + +func NewCIM_ClassIndicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassIndication, err error) { + tmp, err := NewCIM_IndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassIndication{ + CIM_Indication: tmp, + } + return +} + +// SetClassDefinition sets the value of ClassDefinition for the instance +func (instance *CIM_ClassIndication) SetPropertyClassDefinition(value interface{}) (err error) { + return instance.SetProperty("ClassDefinition", (value)) +} + +// GetClassDefinition gets the value of ClassDefinition for the instance +func (instance *CIM_ClassIndication) GetPropertyClassDefinition() (value interface{}, err error) { + retValue, err := instance.GetProperty("ClassDefinition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassModification.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassModification.go new file mode 100644 index 00000000..d900839e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_ClassModification.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_ClassModification struct +type CIM_ClassModification struct { + *CIM_ClassIndication + + // A copy of the 'previous' class definition whose change generated the Indication. PreviousClassDefinition contains an 'older' copy of the class' information, as compared to what is found in the ClassDefinition property (inherited from ClassIndication). + PreviousClassDefinition interface{} +} + +func NewCIM_ClassModificationEx1(instance *cim.WmiInstance) (newInstance *CIM_ClassModification, err error) { + tmp, err := NewCIM_ClassIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_ClassModification{ + CIM_ClassIndication: tmp, + } + return +} + +func NewCIM_ClassModificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_ClassModification, err error) { + tmp, err := NewCIM_ClassIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_ClassModification{ + CIM_ClassIndication: tmp, + } + return +} + +// SetPreviousClassDefinition sets the value of PreviousClassDefinition for the instance +func (instance *CIM_ClassModification) SetPropertyPreviousClassDefinition(value interface{}) (err error) { + return instance.SetProperty("PreviousClassDefinition", (value)) +} + +// GetPreviousClassDefinition gets the value of PreviousClassDefinition for the instance +func (instance *CIM_ClassModification) GetPropertyPreviousClassDefinition() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousClassDefinition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Error.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Error.go new file mode 100644 index 00000000..67222f41 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Error.go @@ -0,0 +1,503 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Error struct +type CIM_Error struct { + *cim.WmiInstance + + // + CIMStatusCode uint32 + + // + CIMStatusCodeDescription string + + // + ErrorSource string + + // + ErrorSourceFormat uint16 + + // + ErrorType uint16 + + // + Message string + + // + MessageArguments []string + + // + MessageID string + + // + OtherErrorSourceFormat string + + // + OtherErrorType string + + // + OwningEntity string + + // + PerceivedSeverity uint16 + + // + ProbableCause uint16 + + // + ProbableCauseDescription string + + // + RecommendedActions []string +} + +func NewCIM_ErrorEx1(instance *cim.WmiInstance) (newInstance *CIM_Error, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Error{ + WmiInstance: tmp, + } + return +} + +func NewCIM_ErrorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Error, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Error{ + WmiInstance: tmp, + } + return +} + +// SetCIMStatusCode sets the value of CIMStatusCode for the instance +func (instance *CIM_Error) SetPropertyCIMStatusCode(value uint32) (err error) { + return instance.SetProperty("CIMStatusCode", (value)) +} + +// GetCIMStatusCode gets the value of CIMStatusCode for the instance +func (instance *CIM_Error) GetPropertyCIMStatusCode() (value uint32, err error) { + retValue, err := instance.GetProperty("CIMStatusCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCIMStatusCodeDescription sets the value of CIMStatusCodeDescription for the instance +func (instance *CIM_Error) SetPropertyCIMStatusCodeDescription(value string) (err error) { + return instance.SetProperty("CIMStatusCodeDescription", (value)) +} + +// GetCIMStatusCodeDescription gets the value of CIMStatusCodeDescription for the instance +func (instance *CIM_Error) GetPropertyCIMStatusCodeDescription() (value string, err error) { + retValue, err := instance.GetProperty("CIMStatusCodeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorSource sets the value of ErrorSource for the instance +func (instance *CIM_Error) SetPropertyErrorSource(value string) (err error) { + return instance.SetProperty("ErrorSource", (value)) +} + +// GetErrorSource gets the value of ErrorSource for the instance +func (instance *CIM_Error) GetPropertyErrorSource() (value string, err error) { + retValue, err := instance.GetProperty("ErrorSource") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorSourceFormat sets the value of ErrorSourceFormat for the instance +func (instance *CIM_Error) SetPropertyErrorSourceFormat(value uint16) (err error) { + return instance.SetProperty("ErrorSourceFormat", (value)) +} + +// GetErrorSourceFormat gets the value of ErrorSourceFormat for the instance +func (instance *CIM_Error) GetPropertyErrorSourceFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorSourceFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorType sets the value of ErrorType for the instance +func (instance *CIM_Error) SetPropertyErrorType(value uint16) (err error) { + return instance.SetProperty("ErrorType", (value)) +} + +// GetErrorType gets the value of ErrorType for the instance +func (instance *CIM_Error) GetPropertyErrorType() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMessage sets the value of Message for the instance +func (instance *CIM_Error) SetPropertyMessage(value string) (err error) { + return instance.SetProperty("Message", (value)) +} + +// GetMessage gets the value of Message for the instance +func (instance *CIM_Error) GetPropertyMessage() (value string, err error) { + retValue, err := instance.GetProperty("Message") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMessageArguments sets the value of MessageArguments for the instance +func (instance *CIM_Error) SetPropertyMessageArguments(value []string) (err error) { + return instance.SetProperty("MessageArguments", (value)) +} + +// GetMessageArguments gets the value of MessageArguments for the instance +func (instance *CIM_Error) GetPropertyMessageArguments() (value []string, err error) { + retValue, err := instance.GetProperty("MessageArguments") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetMessageID sets the value of MessageID for the instance +func (instance *CIM_Error) SetPropertyMessageID(value string) (err error) { + return instance.SetProperty("MessageID", (value)) +} + +// GetMessageID gets the value of MessageID for the instance +func (instance *CIM_Error) GetPropertyMessageID() (value string, err error) { + retValue, err := instance.GetProperty("MessageID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherErrorSourceFormat sets the value of OtherErrorSourceFormat for the instance +func (instance *CIM_Error) SetPropertyOtherErrorSourceFormat(value string) (err error) { + return instance.SetProperty("OtherErrorSourceFormat", (value)) +} + +// GetOtherErrorSourceFormat gets the value of OtherErrorSourceFormat for the instance +func (instance *CIM_Error) GetPropertyOtherErrorSourceFormat() (value string, err error) { + retValue, err := instance.GetProperty("OtherErrorSourceFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherErrorType sets the value of OtherErrorType for the instance +func (instance *CIM_Error) SetPropertyOtherErrorType(value string) (err error) { + return instance.SetProperty("OtherErrorType", (value)) +} + +// GetOtherErrorType gets the value of OtherErrorType for the instance +func (instance *CIM_Error) GetPropertyOtherErrorType() (value string, err error) { + retValue, err := instance.GetProperty("OtherErrorType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOwningEntity sets the value of OwningEntity for the instance +func (instance *CIM_Error) SetPropertyOwningEntity(value string) (err error) { + return instance.SetProperty("OwningEntity", (value)) +} + +// GetOwningEntity gets the value of OwningEntity for the instance +func (instance *CIM_Error) GetPropertyOwningEntity() (value string, err error) { + retValue, err := instance.GetProperty("OwningEntity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerceivedSeverity sets the value of PerceivedSeverity for the instance +func (instance *CIM_Error) SetPropertyPerceivedSeverity(value uint16) (err error) { + return instance.SetProperty("PerceivedSeverity", (value)) +} + +// GetPerceivedSeverity gets the value of PerceivedSeverity for the instance +func (instance *CIM_Error) GetPropertyPerceivedSeverity() (value uint16, err error) { + retValue, err := instance.GetProperty("PerceivedSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetProbableCause sets the value of ProbableCause for the instance +func (instance *CIM_Error) SetPropertyProbableCause(value uint16) (err error) { + return instance.SetProperty("ProbableCause", (value)) +} + +// GetProbableCause gets the value of ProbableCause for the instance +func (instance *CIM_Error) GetPropertyProbableCause() (value uint16, err error) { + retValue, err := instance.GetProperty("ProbableCause") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetProbableCauseDescription sets the value of ProbableCauseDescription for the instance +func (instance *CIM_Error) SetPropertyProbableCauseDescription(value string) (err error) { + return instance.SetProperty("ProbableCauseDescription", (value)) +} + +// GetProbableCauseDescription gets the value of ProbableCauseDescription for the instance +func (instance *CIM_Error) GetPropertyProbableCauseDescription() (value string, err error) { + retValue, err := instance.GetProperty("ProbableCauseDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecommendedActions sets the value of RecommendedActions for the instance +func (instance *CIM_Error) SetPropertyRecommendedActions(value []string) (err error) { + return instance.SetProperty("RecommendedActions", (value)) +} + +// GetRecommendedActions gets the value of RecommendedActions for the instance +func (instance *CIM_Error) GetPropertyRecommendedActions() (value []string, err error) { + retValue, err := instance.GetProperty("RecommendedActions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Indication.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Indication.go new file mode 100644 index 00000000..abf22be1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_Indication.go @@ -0,0 +1,315 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_Indication struct +type CIM_Indication struct { + *cim.WmiInstance + + // A list of IndicationIdentifiers whose notifications are correlated with (related to) this one. + CorrelatedIndications []string + + // An identifier for the indication filter that selects this indication and causes it to be sent. This property is to be filled out by the indication sending service. The value shall be correlatable with the Name property of the instance of CIM_IndicationFilter describing the criteria of the indication. The value of the IndicationFilterName should be formatted using the following algorithm: < OrgID > : < LocalID >, where < OrgID > and < LocalID > are separated by a colon (:) and < OrgID > shall include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the value or that is a registered ID assigned to the business entity by a recognized global authority. In addition, to ensure uniqueness, < OrgID > shall not contain a colon (:).When using this algorithm, the first colon to appear in the value shall appear between < OrgID > and < LocalID >. < LocalID > is chosen by the business entity and shall be used uniquely. + IndicationFilterName string + + // An identifier for the Indication. This property is similar to a key value in that it can be used for identification, when correlating Indications (see the CorrelatedIndications array). Its value SHOULD be unique as long as correlations are reported, but MAY be reused or left NULL if no future Indications will reference it in their CorrelatedIndications array.To ensure uniqueness, the value of IndicationIdentifier should be constructed using the following "preferred" algorithm: + ///: + ///Where and are separated by a colon (:), and where must include a copyrighted, trademarked, or otherwise unique name that is owned by the business entity that is creating or defining the IndicationIdentifier or that is a recognized ID that is assigned to the business entity by a recognized global authority. (This requirement is similar to the _ structure of Schema class names.) In addition, to ensure uniqueness must not contain a colon (:). When using this algorithm, the first colon to appear in IndicationIdentifier must appear between and . + /// is chosen by the business entity and should not be re-used to identify different underlying (real-world) elements. + ///If the above "preferred" algorithm is not used, the defining entity should assure that the resulting IndicationIdentifier is not re-used across any IndicationIdentifiers that are produced by this or other providers for the NameSpace of this instance. + ///For DMTF-defined instances, the "preferred" algorithm should be used with the set to CIM. + IndicationIdentifier string + + // The time and date of creation of the Indication. The property may be set to NULL if the entity creating the Indication is not capable of determining this information. Note that IndicationTime may be the same for two Indications that are generated in rapid succession. + IndicationTime string + + // Holds the value of the user defined severity value when 'PerceivedSeverity' is 1 ("Other"). + OtherSeverity string + + // An enumerated value that describes the severity of the Indication from the notifier's point of view: + ///1 - Other, by CIM convention, is used to indicate that the Severity's value can be found in the OtherSeverity property. + ///3 - Degraded/Warning should be used when its appropriate to let the user decide if action is needed. + ///4 - Minor should be used to indicate action is needed, but the situation is not serious at this time. + ///5 - Major should be used to indicate action is needed NOW. + ///6 - Critical should be used to indicate action is needed NOW and the scope is broad (perhaps an imminent outage to a critical resource will result). + ///7 - Fatal/NonRecoverable should be used to indicate an error occurred, but it's too late to take remedial action. + ///2 and 0 - Information and Unknown (respectively) follow common usage. Literally, the Indication is purely informational or its severity is simply unknown. + PerceivedSeverity Indication_PerceivedSeverity + + // The sequence context portion of a sequence identifier for the indication. The sequence number portion of the sequence identifier is provided by the SequenceNumber property. The combination of both property values represents the sequence identifier for the indication. + ///The sequence identifier for the indication enables a CIM listener to identify duplicate indications when the CIM service attempts the delivery retry of indications, to reorder indications that arrive out-of-order, and to detect lost indications. + ///If a CIM service does not support sequence identifiers for indications, this property shall be NULL. + ///If a CIM service supports sequence identifiers for indications, this property shall be maintained by the CIM service for each registered listener destination, and its value shall uniquely identify the CIM service and the indication service within the CIM service such that restarts of the CIM service and deregistration of listener destinations to the CIM service cause the value to change, without reusing earlier values for a sufficiently long time. + ///When retrying the delivery of an indication, this property shall have the same value as in the original delivery. + ///To guarantee this uniqueness, the property value should be constructed using the following format (defined in ABNF): sequence-context = indication-service-name "#" cim-service-start-id "#" listener-destination-creation-time + ///Where: indication-service-name is the value of the Name property of the CIM_IndicationService instance responsible for delivering the indication. cim-service-start-id is an identifier that uniquely identifies the CIM service start, for example via a timestamp of the start time, or via a counter that increases for each start or restart. listener-destination-creation-time is a timestamp of the creation time of the CIM_ListenerDestination instance representing the listener destination. + ///Since this format is only a recommendation, CIM clients shall treat the value as an opaque identifier for the sequence context and shall not rely on this format. + SequenceContext string + + // The sequence number portion of a sequence identifier for the indication. The sequence context portion of the sequence identifier is provided by the SequenceContext property. The combination of both property values represents the sequence identifier for the indication. + ///The sequence identifier for the indication enables a CIM listener to identify duplicate indications when the CIM service attempts the delivery retry of indications, to reorder indications that arrive out-of-order, and to detect lost indications. + ///If a CIM service does not support sequence identifiers for indications, this property shall be NULL. + ///If a CIM service supports sequence identifiers for indications, this property shall be maintained by the CIM service for each registered listener destination, and its value shall uniquely identify the indication within the sequence context provided by SequenceContext. It shall start at 0 whenever the sequence context string changes. Otherwise, it shall be increased by 1 for every new indication to that listener destination, and it shall wrap to 0 when the value range is exceeded. + ///When retrying the delivery of an indication, this property shall have the same value as in the original delivery. + SequenceNumber int64 +} + +func NewCIM_IndicationEx1(instance *cim.WmiInstance) (newInstance *CIM_Indication, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &CIM_Indication{ + WmiInstance: tmp, + } + return +} + +func NewCIM_IndicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_Indication, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_Indication{ + WmiInstance: tmp, + } + return +} + +// SetCorrelatedIndications sets the value of CorrelatedIndications for the instance +func (instance *CIM_Indication) SetPropertyCorrelatedIndications(value []string) (err error) { + return instance.SetProperty("CorrelatedIndications", (value)) +} + +// GetCorrelatedIndications gets the value of CorrelatedIndications for the instance +func (instance *CIM_Indication) GetPropertyCorrelatedIndications() (value []string, err error) { + retValue, err := instance.GetProperty("CorrelatedIndications") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetIndicationFilterName sets the value of IndicationFilterName for the instance +func (instance *CIM_Indication) SetPropertyIndicationFilterName(value string) (err error) { + return instance.SetProperty("IndicationFilterName", (value)) +} + +// GetIndicationFilterName gets the value of IndicationFilterName for the instance +func (instance *CIM_Indication) GetPropertyIndicationFilterName() (value string, err error) { + retValue, err := instance.GetProperty("IndicationFilterName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndicationIdentifier sets the value of IndicationIdentifier for the instance +func (instance *CIM_Indication) SetPropertyIndicationIdentifier(value string) (err error) { + return instance.SetProperty("IndicationIdentifier", (value)) +} + +// GetIndicationIdentifier gets the value of IndicationIdentifier for the instance +func (instance *CIM_Indication) GetPropertyIndicationIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("IndicationIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIndicationTime sets the value of IndicationTime for the instance +func (instance *CIM_Indication) SetPropertyIndicationTime(value string) (err error) { + return instance.SetProperty("IndicationTime", (value)) +} + +// GetIndicationTime gets the value of IndicationTime for the instance +func (instance *CIM_Indication) GetPropertyIndicationTime() (value string, err error) { + retValue, err := instance.GetProperty("IndicationTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherSeverity sets the value of OtherSeverity for the instance +func (instance *CIM_Indication) SetPropertyOtherSeverity(value string) (err error) { + return instance.SetProperty("OtherSeverity", (value)) +} + +// GetOtherSeverity gets the value of OtherSeverity for the instance +func (instance *CIM_Indication) GetPropertyOtherSeverity() (value string, err error) { + retValue, err := instance.GetProperty("OtherSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerceivedSeverity sets the value of PerceivedSeverity for the instance +func (instance *CIM_Indication) SetPropertyPerceivedSeverity(value Indication_PerceivedSeverity) (err error) { + return instance.SetProperty("PerceivedSeverity", (value)) +} + +// GetPerceivedSeverity gets the value of PerceivedSeverity for the instance +func (instance *CIM_Indication) GetPropertyPerceivedSeverity() (value Indication_PerceivedSeverity, err error) { + retValue, err := instance.GetProperty("PerceivedSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Indication_PerceivedSeverity(valuetmp) + + return +} + +// SetSequenceContext sets the value of SequenceContext for the instance +func (instance *CIM_Indication) SetPropertySequenceContext(value string) (err error) { + return instance.SetProperty("SequenceContext", (value)) +} + +// GetSequenceContext gets the value of SequenceContext for the instance +func (instance *CIM_Indication) GetPropertySequenceContext() (value string, err error) { + retValue, err := instance.GetProperty("SequenceContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSequenceNumber sets the value of SequenceNumber for the instance +func (instance *CIM_Indication) SetPropertySequenceNumber(value int64) (err error) { + return instance.SetProperty("SequenceNumber", (value)) +} + +// GetSequenceNumber gets the value of SequenceNumber for the instance +func (instance *CIM_Indication) GetPropertySequenceNumber() (value int64, err error) { + retValue, err := instance.GetProperty("SequenceNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstCreation.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstCreation.go new file mode 100644 index 00000000..a743dc98 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstCreation.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_InstCreation struct +type CIM_InstCreation struct { + *CIM_InstIndication +} + +func NewCIM_InstCreationEx1(instance *cim.WmiInstance) (newInstance *CIM_InstCreation, err error) { + tmp, err := NewCIM_InstIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstCreation{ + CIM_InstIndication: tmp, + } + return +} + +func NewCIM_InstCreationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstCreation, err error) { + tmp, err := NewCIM_InstIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstCreation{ + CIM_InstIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstDeletion.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstDeletion.go new file mode 100644 index 00000000..6e999b16 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstDeletion.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// CIM_InstDeletion struct +type CIM_InstDeletion struct { + *CIM_InstIndication +} + +func NewCIM_InstDeletionEx1(instance *cim.WmiInstance) (newInstance *CIM_InstDeletion, err error) { + tmp, err := NewCIM_InstIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstDeletion{ + CIM_InstIndication: tmp, + } + return +} + +func NewCIM_InstDeletionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstDeletion, err error) { + tmp, err := NewCIM_InstIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstDeletion{ + CIM_InstIndication: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstIndication.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstIndication.go new file mode 100644 index 00000000..d1f270bc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstIndication.go @@ -0,0 +1,142 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_InstIndication struct +type CIM_InstIndication struct { + *CIM_Indication + + // A copy of the instance that changed to generate the Indication. SourceInstance contains the current values of the properties selected by the Indication Filter's Query. In the case of CIM_InstDeletion, the property values are copied before the instance is deleted. + SourceInstance interface{} + + // The host name or IP address of the SourceInstance. + SourceInstanceHost string + + // The Model Path of the SourceInstance. The following format MUST be used to encode the Model Path: + ///:.="", + ///="", ... + SourceInstanceModelPath string +} + +func NewCIM_InstIndicationEx1(instance *cim.WmiInstance) (newInstance *CIM_InstIndication, err error) { + tmp, err := NewCIM_IndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstIndication{ + CIM_Indication: tmp, + } + return +} + +func NewCIM_InstIndicationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstIndication, err error) { + tmp, err := NewCIM_IndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstIndication{ + CIM_Indication: tmp, + } + return +} + +// SetSourceInstance sets the value of SourceInstance for the instance +func (instance *CIM_InstIndication) SetPropertySourceInstance(value interface{}) (err error) { + return instance.SetProperty("SourceInstance", (value)) +} + +// GetSourceInstance gets the value of SourceInstance for the instance +func (instance *CIM_InstIndication) GetPropertySourceInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("SourceInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetSourceInstanceHost sets the value of SourceInstanceHost for the instance +func (instance *CIM_InstIndication) SetPropertySourceInstanceHost(value string) (err error) { + return instance.SetProperty("SourceInstanceHost", (value)) +} + +// GetSourceInstanceHost gets the value of SourceInstanceHost for the instance +func (instance *CIM_InstIndication) GetPropertySourceInstanceHost() (value string, err error) { + retValue, err := instance.GetProperty("SourceInstanceHost") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceInstanceModelPath sets the value of SourceInstanceModelPath for the instance +func (instance *CIM_InstIndication) SetPropertySourceInstanceModelPath(value string) (err error) { + return instance.SetProperty("SourceInstanceModelPath", (value)) +} + +// GetSourceInstanceModelPath gets the value of SourceInstanceModelPath for the instance +func (instance *CIM_InstIndication) GetPropertySourceInstanceModelPath() (value string, err error) { + retValue, err := instance.GetProperty("SourceInstanceModelPath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstModification.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstModification.go new file mode 100644 index 00000000..c0731719 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/CIM_InstModification.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// CIM_InstModification struct +type CIM_InstModification struct { + *CIM_InstIndication + + // A copy of the 'previous' instance whose change generated the Indication. PreviousInstance contains 'older' values of an instance's properties (as compared to SourceInstance), selected by the IndicationFilter's Query. + PreviousInstance interface{} +} + +func NewCIM_InstModificationEx1(instance *cim.WmiInstance) (newInstance *CIM_InstModification, err error) { + tmp, err := NewCIM_InstIndicationEx1(instance) + + if err != nil { + return + } + newInstance = &CIM_InstModification{ + CIM_InstIndication: tmp, + } + return +} + +func NewCIM_InstModificationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *CIM_InstModification, err error) { + tmp, err := NewCIM_InstIndicationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &CIM_InstModification{ + CIM_InstIndication: tmp, + } + return +} + +// SetPreviousInstance sets the value of PreviousInstance for the instance +func (instance *CIM_InstModification) SetPropertyPreviousInstance(value interface{}) (err error) { + return instance.SetProperty("PreviousInstance", (value)) +} + +// GetPreviousInstance gets the value of PreviousInstance for the instance +func (instance *CIM_InstModification) GetPropertyPreviousInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassCreationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassCreationEvent.go new file mode 100644 index 00000000..3a333653 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassCreationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __ClassCreationEvent struct +type __ClassCreationEvent struct { + *__ClassOperationEvent +} + +func New__ClassCreationEventEx1(instance *cim.WmiInstance) (newInstance *__ClassCreationEvent, err error) { + tmp, err := New__ClassOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassCreationEvent{ + __ClassOperationEvent: tmp, + } + return +} + +func New__ClassCreationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassCreationEvent, err error) { + tmp, err := New__ClassOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassCreationEvent{ + __ClassOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassDeletionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassDeletionEvent.go new file mode 100644 index 00000000..72b392d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassDeletionEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __ClassDeletionEvent struct +type __ClassDeletionEvent struct { + *__ClassOperationEvent +} + +func New__ClassDeletionEventEx1(instance *cim.WmiInstance) (newInstance *__ClassDeletionEvent, err error) { + tmp, err := New__ClassOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassDeletionEvent{ + __ClassOperationEvent: tmp, + } + return +} + +func New__ClassDeletionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassDeletionEvent, err error) { + tmp, err := New__ClassOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassDeletionEvent{ + __ClassOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassModificationEvent.go new file mode 100644 index 00000000..e1abd57a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassModificationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ClassModificationEvent struct +type __ClassModificationEvent struct { + *__ClassOperationEvent + + // + PreviousClass interface{} +} + +func New__ClassModificationEventEx1(instance *cim.WmiInstance) (newInstance *__ClassModificationEvent, err error) { + tmp, err := New__ClassOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassModificationEvent{ + __ClassOperationEvent: tmp, + } + return +} + +func New__ClassModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassModificationEvent, err error) { + tmp, err := New__ClassOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassModificationEvent{ + __ClassOperationEvent: tmp, + } + return +} + +// SetPreviousClass sets the value of PreviousClass for the instance +func (instance *__ClassModificationEvent) SetPropertyPreviousClass(value interface{}) (err error) { + return instance.SetProperty("PreviousClass", (value)) +} + +// GetPreviousClass gets the value of PreviousClass for the instance +func (instance *__ClassModificationEvent) GetPropertyPreviousClass() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassOperationEvent.go new file mode 100644 index 00000000..75f94a4c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassOperationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ClassOperationEvent struct +type __ClassOperationEvent struct { + *__Event + + // + TargetClass interface{} +} + +func New__ClassOperationEventEx1(instance *cim.WmiInstance) (newInstance *__ClassOperationEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassOperationEvent{ + __Event: tmp, + } + return +} + +func New__ClassOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassOperationEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassOperationEvent{ + __Event: tmp, + } + return +} + +// SetTargetClass sets the value of TargetClass for the instance +func (instance *__ClassOperationEvent) SetPropertyTargetClass(value interface{}) (err error) { + return instance.SetProperty("TargetClass", (value)) +} + +// GetTargetClass gets the value of TargetClass for the instance +func (instance *__ClassOperationEvent) GetPropertyTargetClass() (value interface{}, err error) { + retValue, err := instance.GetProperty("TargetClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassProviderRegistration.go new file mode 100644 index 00000000..7ec30156 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ClassProviderRegistration.go @@ -0,0 +1,263 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ClassProviderRegistration struct +type __ClassProviderRegistration struct { + *__ObjectProviderRegistration + + // + CacheRefreshInterval string + + // + PerUserSchema bool + + // + ReferencedSetQueries []string + + // + ResultSetQueries []string + + // + ReSynchroniseOnNamespaceOpen bool + + // + UnsupportedQueries []string + + // + Version uint32 +} + +func New__ClassProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__ClassProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__ClassProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} + +func New__ClassProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ClassProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ClassProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} + +// SetCacheRefreshInterval sets the value of CacheRefreshInterval for the instance +func (instance *__ClassProviderRegistration) SetPropertyCacheRefreshInterval(value string) (err error) { + return instance.SetProperty("CacheRefreshInterval", (value)) +} + +// GetCacheRefreshInterval gets the value of CacheRefreshInterval for the instance +func (instance *__ClassProviderRegistration) GetPropertyCacheRefreshInterval() (value string, err error) { + retValue, err := instance.GetProperty("CacheRefreshInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerUserSchema sets the value of PerUserSchema for the instance +func (instance *__ClassProviderRegistration) SetPropertyPerUserSchema(value bool) (err error) { + return instance.SetProperty("PerUserSchema", (value)) +} + +// GetPerUserSchema gets the value of PerUserSchema for the instance +func (instance *__ClassProviderRegistration) GetPropertyPerUserSchema() (value bool, err error) { + retValue, err := instance.GetProperty("PerUserSchema") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetReferencedSetQueries sets the value of ReferencedSetQueries for the instance +func (instance *__ClassProviderRegistration) SetPropertyReferencedSetQueries(value []string) (err error) { + return instance.SetProperty("ReferencedSetQueries", (value)) +} + +// GetReferencedSetQueries gets the value of ReferencedSetQueries for the instance +func (instance *__ClassProviderRegistration) GetPropertyReferencedSetQueries() (value []string, err error) { + retValue, err := instance.GetProperty("ReferencedSetQueries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetResultSetQueries sets the value of ResultSetQueries for the instance +func (instance *__ClassProviderRegistration) SetPropertyResultSetQueries(value []string) (err error) { + return instance.SetProperty("ResultSetQueries", (value)) +} + +// GetResultSetQueries gets the value of ResultSetQueries for the instance +func (instance *__ClassProviderRegistration) GetPropertyResultSetQueries() (value []string, err error) { + retValue, err := instance.GetProperty("ResultSetQueries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetReSynchroniseOnNamespaceOpen sets the value of ReSynchroniseOnNamespaceOpen for the instance +func (instance *__ClassProviderRegistration) SetPropertyReSynchroniseOnNamespaceOpen(value bool) (err error) { + return instance.SetProperty("ReSynchroniseOnNamespaceOpen", (value)) +} + +// GetReSynchroniseOnNamespaceOpen gets the value of ReSynchroniseOnNamespaceOpen for the instance +func (instance *__ClassProviderRegistration) GetPropertyReSynchroniseOnNamespaceOpen() (value bool, err error) { + retValue, err := instance.GetProperty("ReSynchroniseOnNamespaceOpen") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetUnsupportedQueries sets the value of UnsupportedQueries for the instance +func (instance *__ClassProviderRegistration) SetPropertyUnsupportedQueries(value []string) (err error) { + return instance.SetProperty("UnsupportedQueries", (value)) +} + +// GetUnsupportedQueries gets the value of UnsupportedQueries for the instance +func (instance *__ClassProviderRegistration) GetPropertyUnsupportedQueries() (value []string, err error) { + retValue, err := instance.GetProperty("UnsupportedQueries") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *__ClassProviderRegistration) SetPropertyVersion(value uint32) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *__ClassProviderRegistration) GetPropertyVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ConsumerFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ConsumerFailureEvent.go new file mode 100644 index 00000000..73cde9d3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ConsumerFailureEvent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ConsumerFailureEvent struct +type __ConsumerFailureEvent struct { + *__EventDroppedEvent + + // + ErrorCode uint32 + + // + ErrorDescription string + + // + ErrorObject __ExtendedStatus +} + +func New__ConsumerFailureEventEx1(instance *cim.WmiInstance) (newInstance *__ConsumerFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx1(instance) + + if err != nil { + return + } + newInstance = &__ConsumerFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +func New__ConsumerFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ConsumerFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ConsumerFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +// SetErrorCode sets the value of ErrorCode for the instance +func (instance *__ConsumerFailureEvent) SetPropertyErrorCode(value uint32) (err error) { + return instance.SetProperty("ErrorCode", (value)) +} + +// GetErrorCode gets the value of ErrorCode for the instance +func (instance *__ConsumerFailureEvent) GetPropertyErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *__ConsumerFailureEvent) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *__ConsumerFailureEvent) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorObject sets the value of ErrorObject for the instance +func (instance *__ConsumerFailureEvent) SetPropertyErrorObject(value __ExtendedStatus) (err error) { + return instance.SetProperty("ErrorObject", (value)) +} + +// GetErrorObject gets the value of ErrorObject for the instance +func (instance *__ConsumerFailureEvent) GetPropertyErrorObject() (value __ExtendedStatus, err error) { + retValue, err := instance.GetProperty("ErrorObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__ExtendedStatus) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ExtendedStatus is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __ExtendedStatus(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Event.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Event.go new file mode 100644 index 00000000..aa87931d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Event.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Event struct +type __Event struct { + *__IndicationRelated + + // + SECURITY_DESCRIPTOR []uint8 + + // + TIME_CREATED uint64 +} + +func New__EventEx1(instance *cim.WmiInstance) (newInstance *__Event, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__Event{ + __IndicationRelated: tmp, + } + return +} + +func New__EventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Event, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Event{ + __IndicationRelated: tmp, + } + return +} + +// SetSECURITY_DESCRIPTOR sets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__Event) SetPropertySECURITY_DESCRIPTOR(value []uint8) (err error) { + return instance.SetProperty("SECURITY_DESCRIPTOR", (value)) +} + +// GetSECURITY_DESCRIPTOR gets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__Event) GetPropertySECURITY_DESCRIPTOR() (value []uint8, err error) { + retValue, err := instance.GetProperty("SECURITY_DESCRIPTOR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__Event) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__Event) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumer.go new file mode 100644 index 00000000..9e7172a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumer.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventConsumer struct +type __EventConsumer struct { + *__IndicationRelated + + // + CreatorSID []uint8 + + // + MachineName string + + // + MaximumQueueSize uint32 +} + +func New__EventConsumerEx1(instance *cim.WmiInstance) (newInstance *__EventConsumer, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__EventConsumer{ + __IndicationRelated: tmp, + } + return +} + +func New__EventConsumerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventConsumer, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventConsumer{ + __IndicationRelated: tmp, + } + return +} + +// SetCreatorSID sets the value of CreatorSID for the instance +func (instance *__EventConsumer) SetPropertyCreatorSID(value []uint8) (err error) { + return instance.SetProperty("CreatorSID", (value)) +} + +// GetCreatorSID gets the value of CreatorSID for the instance +func (instance *__EventConsumer) GetPropertyCreatorSID() (value []uint8, err error) { + retValue, err := instance.GetProperty("CreatorSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetMachineName sets the value of MachineName for the instance +func (instance *__EventConsumer) SetPropertyMachineName(value string) (err error) { + return instance.SetProperty("MachineName", (value)) +} + +// GetMachineName gets the value of MachineName for the instance +func (instance *__EventConsumer) GetPropertyMachineName() (value string, err error) { + retValue, err := instance.GetProperty("MachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaximumQueueSize sets the value of MaximumQueueSize for the instance +func (instance *__EventConsumer) SetPropertyMaximumQueueSize(value uint32) (err error) { + return instance.SetProperty("MaximumQueueSize", (value)) +} + +// GetMaximumQueueSize gets the value of MaximumQueueSize for the instance +func (instance *__EventConsumer) GetPropertyMaximumQueueSize() (value uint32, err error) { + retValue, err := instance.GetProperty("MaximumQueueSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumerProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumerProviderRegistration.go new file mode 100644 index 00000000..fce89752 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventConsumerProviderRegistration.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventConsumerProviderRegistration struct +type __EventConsumerProviderRegistration struct { + *__ProviderRegistration + + // + ConsumerClassNames []string +} + +func New__EventConsumerProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__EventConsumerProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__EventConsumerProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__EventConsumerProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventConsumerProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventConsumerProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetConsumerClassNames sets the value of ConsumerClassNames for the instance +func (instance *__EventConsumerProviderRegistration) SetPropertyConsumerClassNames(value []string) (err error) { + return instance.SetProperty("ConsumerClassNames", (value)) +} + +// GetConsumerClassNames gets the value of ConsumerClassNames for the instance +func (instance *__EventConsumerProviderRegistration) GetPropertyConsumerClassNames() (value []string, err error) { + retValue, err := instance.GetProperty("ConsumerClassNames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventDroppedEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventDroppedEvent.go new file mode 100644 index 00000000..9f814558 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventDroppedEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventDroppedEvent struct +type __EventDroppedEvent struct { + *__SystemEvent + + // + Event __Event + + // + IntendedConsumer __EventConsumer +} + +func New__EventDroppedEventEx1(instance *cim.WmiInstance) (newInstance *__EventDroppedEvent, err error) { + tmp, err := New__SystemEventEx1(instance) + + if err != nil { + return + } + newInstance = &__EventDroppedEvent{ + __SystemEvent: tmp, + } + return +} + +func New__EventDroppedEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventDroppedEvent, err error) { + tmp, err := New__SystemEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventDroppedEvent{ + __SystemEvent: tmp, + } + return +} + +// SetEvent sets the value of Event for the instance +func (instance *__EventDroppedEvent) SetPropertyEvent(value __Event) (err error) { + return instance.SetProperty("Event", (value)) +} + +// GetEvent gets the value of Event for the instance +func (instance *__EventDroppedEvent) GetPropertyEvent() (value __Event, err error) { + retValue, err := instance.GetProperty("Event") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Event) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Event is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Event(valuetmp) + + return +} + +// SetIntendedConsumer sets the value of IntendedConsumer for the instance +func (instance *__EventDroppedEvent) SetPropertyIntendedConsumer(value __EventConsumer) (err error) { + return instance.SetProperty("IntendedConsumer", (value)) +} + +// GetIntendedConsumer gets the value of IntendedConsumer for the instance +func (instance *__EventDroppedEvent) GetPropertyIntendedConsumer() (value __EventConsumer, err error) { + retValue, err := instance.GetProperty("IntendedConsumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventConsumer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventConsumer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventConsumer(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventFilter.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventFilter.go new file mode 100644 index 00000000..9913d731 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventFilter.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventFilter struct +type __EventFilter struct { + *__IndicationRelated + + // + CreatorSID []uint8 + + // + EventAccess string + + // + EventNamespace string + + // + Name string + + // + Query string + + // + QueryLanguage string +} + +func New__EventFilterEx1(instance *cim.WmiInstance) (newInstance *__EventFilter, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__EventFilter{ + __IndicationRelated: tmp, + } + return +} + +func New__EventFilterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventFilter, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventFilter{ + __IndicationRelated: tmp, + } + return +} + +// SetCreatorSID sets the value of CreatorSID for the instance +func (instance *__EventFilter) SetPropertyCreatorSID(value []uint8) (err error) { + return instance.SetProperty("CreatorSID", (value)) +} + +// GetCreatorSID gets the value of CreatorSID for the instance +func (instance *__EventFilter) GetPropertyCreatorSID() (value []uint8, err error) { + retValue, err := instance.GetProperty("CreatorSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetEventAccess sets the value of EventAccess for the instance +func (instance *__EventFilter) SetPropertyEventAccess(value string) (err error) { + return instance.SetProperty("EventAccess", (value)) +} + +// GetEventAccess gets the value of EventAccess for the instance +func (instance *__EventFilter) GetPropertyEventAccess() (value string, err error) { + retValue, err := instance.GetProperty("EventAccess") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEventNamespace sets the value of EventNamespace for the instance +func (instance *__EventFilter) SetPropertyEventNamespace(value string) (err error) { + return instance.SetProperty("EventNamespace", (value)) +} + +// GetEventNamespace gets the value of EventNamespace for the instance +func (instance *__EventFilter) GetPropertyEventNamespace() (value string, err error) { + retValue, err := instance.GetProperty("EventNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *__EventFilter) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__EventFilter) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQuery sets the value of Query for the instance +func (instance *__EventFilter) SetPropertyQuery(value string) (err error) { + return instance.SetProperty("Query", (value)) +} + +// GetQuery gets the value of Query for the instance +func (instance *__EventFilter) GetPropertyQuery() (value string, err error) { + retValue, err := instance.GetProperty("Query") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetQueryLanguage sets the value of QueryLanguage for the instance +func (instance *__EventFilter) SetPropertyQueryLanguage(value string) (err error) { + return instance.SetProperty("QueryLanguage", (value)) +} + +// GetQueryLanguage gets the value of QueryLanguage for the instance +func (instance *__EventFilter) GetPropertyQueryLanguage() (value string, err error) { + retValue, err := instance.GetProperty("QueryLanguage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventGenerator.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventGenerator.go new file mode 100644 index 00000000..b28e38bb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventGenerator.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __EventGenerator struct +type __EventGenerator struct { + *__IndicationRelated +} + +func New__EventGeneratorEx1(instance *cim.WmiInstance) (newInstance *__EventGenerator, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__EventGenerator{ + __IndicationRelated: tmp, + } + return +} + +func New__EventGeneratorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventGenerator, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventGenerator{ + __IndicationRelated: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventProviderRegistration.go new file mode 100644 index 00000000..4fb73b38 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventProviderRegistration.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventProviderRegistration struct +type __EventProviderRegistration struct { + *__ProviderRegistration + + // + EventQueryList []string +} + +func New__EventProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__EventProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__EventProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__EventProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetEventQueryList sets the value of EventQueryList for the instance +func (instance *__EventProviderRegistration) SetPropertyEventQueryList(value []string) (err error) { + return instance.SetProperty("EventQueryList", (value)) +} + +// GetEventQueryList gets the value of EventQueryList for the instance +func (instance *__EventProviderRegistration) GetPropertyEventQueryList() (value []string, err error) { + retValue, err := instance.GetProperty("EventQueryList") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventQueueOverflowEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventQueueOverflowEvent.go new file mode 100644 index 00000000..a1c110cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/EventQueueOverflowEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __EventQueueOverflowEvent struct +type __EventQueueOverflowEvent struct { + *__EventDroppedEvent + + // + CurrentQueueSize uint32 +} + +func New__EventQueueOverflowEventEx1(instance *cim.WmiInstance) (newInstance *__EventQueueOverflowEvent, err error) { + tmp, err := New__EventDroppedEventEx1(instance) + + if err != nil { + return + } + newInstance = &__EventQueueOverflowEvent{ + __EventDroppedEvent: tmp, + } + return +} + +func New__EventQueueOverflowEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__EventQueueOverflowEvent, err error) { + tmp, err := New__EventDroppedEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__EventQueueOverflowEvent{ + __EventDroppedEvent: tmp, + } + return +} + +// SetCurrentQueueSize sets the value of CurrentQueueSize for the instance +func (instance *__EventQueueOverflowEvent) SetPropertyCurrentQueueSize(value uint32) (err error) { + return instance.SetProperty("CurrentQueueSize", (value)) +} + +// GetCurrentQueueSize gets the value of CurrentQueueSize for the instance +func (instance *__EventQueueOverflowEvent) GetPropertyCurrentQueueSize() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentQueueSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtendedStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtendedStatus.go new file mode 100644 index 00000000..be13c78e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtendedStatus.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ExtendedStatus struct +type __ExtendedStatus struct { + *__NotifyStatus + + // + Description string + + // + Operation string + + // + ParameterInfo string + + // + ProviderName string +} + +func New__ExtendedStatusEx1(instance *cim.WmiInstance) (newInstance *__ExtendedStatus, err error) { + tmp, err := New__NotifyStatusEx1(instance) + + if err != nil { + return + } + newInstance = &__ExtendedStatus{ + __NotifyStatus: tmp, + } + return +} + +func New__ExtendedStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ExtendedStatus, err error) { + tmp, err := New__NotifyStatusEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ExtendedStatus{ + __NotifyStatus: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *__ExtendedStatus) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *__ExtendedStatus) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperation sets the value of Operation for the instance +func (instance *__ExtendedStatus) SetPropertyOperation(value string) (err error) { + return instance.SetProperty("Operation", (value)) +} + +// GetOperation gets the value of Operation for the instance +func (instance *__ExtendedStatus) GetPropertyOperation() (value string, err error) { + retValue, err := instance.GetProperty("Operation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParameterInfo sets the value of ParameterInfo for the instance +func (instance *__ExtendedStatus) SetPropertyParameterInfo(value string) (err error) { + return instance.SetProperty("ParameterInfo", (value)) +} + +// GetParameterInfo gets the value of ParameterInfo for the instance +func (instance *__ExtendedStatus) GetPropertyParameterInfo() (value string, err error) { + retValue, err := instance.GetProperty("ParameterInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProviderName sets the value of ProviderName for the instance +func (instance *__ExtendedStatus) SetPropertyProviderName(value string) (err error) { + return instance.SetProperty("ProviderName", (value)) +} + +// GetProviderName gets the value of ProviderName for the instance +func (instance *__ExtendedStatus) GetPropertyProviderName() (value string, err error) { + retValue, err := instance.GetProperty("ProviderName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtrinsicEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtrinsicEvent.go new file mode 100644 index 00000000..e71d3b36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ExtrinsicEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __ExtrinsicEvent struct +type __ExtrinsicEvent struct { + *__Event +} + +func New__ExtrinsicEventEx1(instance *cim.WmiInstance) (newInstance *__ExtrinsicEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__ExtrinsicEvent{ + __Event: tmp, + } + return +} + +func New__ExtrinsicEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ExtrinsicEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ExtrinsicEvent{ + __Event: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/FilterToConsumerBinding.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/FilterToConsumerBinding.go new file mode 100644 index 00000000..a0f87be6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/FilterToConsumerBinding.go @@ -0,0 +1,261 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __FilterToConsumerBinding struct +type __FilterToConsumerBinding struct { + *__IndicationRelated + + // + Consumer __EventConsumer + + // + CreatorSID []uint8 + + // + DeliverSynchronously bool + + // + DeliveryQoS uint32 + + // + Filter __EventFilter + + // + MaintainSecurityContext bool + + // + SlowDownProviders bool +} + +func New__FilterToConsumerBindingEx1(instance *cim.WmiInstance) (newInstance *__FilterToConsumerBinding, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__FilterToConsumerBinding{ + __IndicationRelated: tmp, + } + return +} + +func New__FilterToConsumerBindingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__FilterToConsumerBinding, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__FilterToConsumerBinding{ + __IndicationRelated: tmp, + } + return +} + +// SetConsumer sets the value of Consumer for the instance +func (instance *__FilterToConsumerBinding) SetPropertyConsumer(value __EventConsumer) (err error) { + return instance.SetProperty("Consumer", (value)) +} + +// GetConsumer gets the value of Consumer for the instance +func (instance *__FilterToConsumerBinding) GetPropertyConsumer() (value __EventConsumer, err error) { + retValue, err := instance.GetProperty("Consumer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventConsumer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventConsumer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventConsumer(valuetmp) + + return +} + +// SetCreatorSID sets the value of CreatorSID for the instance +func (instance *__FilterToConsumerBinding) SetPropertyCreatorSID(value []uint8) (err error) { + return instance.SetProperty("CreatorSID", (value)) +} + +// GetCreatorSID gets the value of CreatorSID for the instance +func (instance *__FilterToConsumerBinding) GetPropertyCreatorSID() (value []uint8, err error) { + retValue, err := instance.GetProperty("CreatorSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetDeliverSynchronously sets the value of DeliverSynchronously for the instance +func (instance *__FilterToConsumerBinding) SetPropertyDeliverSynchronously(value bool) (err error) { + return instance.SetProperty("DeliverSynchronously", (value)) +} + +// GetDeliverSynchronously gets the value of DeliverSynchronously for the instance +func (instance *__FilterToConsumerBinding) GetPropertyDeliverSynchronously() (value bool, err error) { + retValue, err := instance.GetProperty("DeliverSynchronously") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDeliveryQoS sets the value of DeliveryQoS for the instance +func (instance *__FilterToConsumerBinding) SetPropertyDeliveryQoS(value uint32) (err error) { + return instance.SetProperty("DeliveryQoS", (value)) +} + +// GetDeliveryQoS gets the value of DeliveryQoS for the instance +func (instance *__FilterToConsumerBinding) GetPropertyDeliveryQoS() (value uint32, err error) { + retValue, err := instance.GetProperty("DeliveryQoS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFilter sets the value of Filter for the instance +func (instance *__FilterToConsumerBinding) SetPropertyFilter(value __EventFilter) (err error) { + return instance.SetProperty("Filter", (value)) +} + +// GetFilter gets the value of Filter for the instance +func (instance *__FilterToConsumerBinding) GetPropertyFilter() (value __EventFilter, err error) { + retValue, err := instance.GetProperty("Filter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__EventFilter) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __EventFilter is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __EventFilter(valuetmp) + + return +} + +// SetMaintainSecurityContext sets the value of MaintainSecurityContext for the instance +func (instance *__FilterToConsumerBinding) SetPropertyMaintainSecurityContext(value bool) (err error) { + return instance.SetProperty("MaintainSecurityContext", (value)) +} + +// GetMaintainSecurityContext gets the value of MaintainSecurityContext for the instance +func (instance *__FilterToConsumerBinding) GetPropertyMaintainSecurityContext() (value bool, err error) { + retValue, err := instance.GetProperty("MaintainSecurityContext") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSlowDownProviders sets the value of SlowDownProviders for the instance +func (instance *__FilterToConsumerBinding) SetPropertySlowDownProviders(value bool) (err error) { + return instance.SetProperty("SlowDownProviders", (value)) +} + +// GetSlowDownProviders gets the value of SlowDownProviders for the instance +func (instance *__FilterToConsumerBinding) GetPropertySlowDownProviders() (value bool, err error) { + retValue, err := instance.GetProperty("SlowDownProviders") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IndicationRelated.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IndicationRelated.go new file mode 100644 index 00000000..9bb16b1b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IndicationRelated.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __IndicationRelated struct +type __IndicationRelated struct { + *__SystemClass +} + +func New__IndicationRelatedEx1(instance *cim.WmiInstance) (newInstance *__IndicationRelated, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__IndicationRelated{ + __SystemClass: tmp, + } + return +} + +func New__IndicationRelatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__IndicationRelated, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__IndicationRelated{ + __SystemClass: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Indication_PerceivedSeverity.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Indication_PerceivedSeverity.go new file mode 100644 index 00000000..9a06b610 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Indication_PerceivedSeverity.go @@ -0,0 +1,33 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Indication_PerceivedSeverity +////////////////////////////////////////////// +package storage + +// Indication_PerceivedSeverity +type Indication_PerceivedSeverity int + +const ( + // Unknown enum + Indication_PerceivedSeverity_Unknown Indication_PerceivedSeverity = 0 + // Other enum + Indication_PerceivedSeverity_Other Indication_PerceivedSeverity = 1 + // Information enum + Indication_PerceivedSeverity_Information Indication_PerceivedSeverity = 2 + // Degraded_Warning enum + Indication_PerceivedSeverity_Degraded_Warning Indication_PerceivedSeverity = 3 + // Minor enum + Indication_PerceivedSeverity_Minor Indication_PerceivedSeverity = 4 + // Major enum + Indication_PerceivedSeverity_Major Indication_PerceivedSeverity = 5 + // Critical enum + Indication_PerceivedSeverity_Critical Indication_PerceivedSeverity = 6 + // Fatal_NonRecoverable enum + Indication_PerceivedSeverity_Fatal_NonRecoverable Indication_PerceivedSeverity = 7 + // DMTF_Reserved enum + Indication_PerceivedSeverity_DMTF_Reserved Indication_PerceivedSeverity = 8 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceCreationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceCreationEvent.go new file mode 100644 index 00000000..fac8cdf1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceCreationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __InstanceCreationEvent struct +type __InstanceCreationEvent struct { + *__InstanceOperationEvent +} + +func New__InstanceCreationEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceCreationEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceCreationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__InstanceCreationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceCreationEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceCreationEvent{ + __InstanceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceDeletionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceDeletionEvent.go new file mode 100644 index 00000000..1680878d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceDeletionEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __InstanceDeletionEvent struct +type __InstanceDeletionEvent struct { + *__InstanceOperationEvent +} + +func New__InstanceDeletionEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceDeletionEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceDeletionEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__InstanceDeletionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceDeletionEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceDeletionEvent{ + __InstanceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceModificationEvent.go new file mode 100644 index 00000000..1d529801 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceModificationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __InstanceModificationEvent struct +type __InstanceModificationEvent struct { + *__InstanceOperationEvent + + // + PreviousInstance interface{} +} + +func New__InstanceModificationEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceModificationEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceModificationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__InstanceModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceModificationEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceModificationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +// SetPreviousInstance sets the value of PreviousInstance for the instance +func (instance *__InstanceModificationEvent) SetPropertyPreviousInstance(value interface{}) (err error) { + return instance.SetProperty("PreviousInstance", (value)) +} + +// GetPreviousInstance gets the value of PreviousInstance for the instance +func (instance *__InstanceModificationEvent) GetPropertyPreviousInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("PreviousInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceOperationEvent.go new file mode 100644 index 00000000..e5c9dbc9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceOperationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __InstanceOperationEvent struct +type __InstanceOperationEvent struct { + *__Event + + // + TargetInstance interface{} +} + +func New__InstanceOperationEventEx1(instance *cim.WmiInstance) (newInstance *__InstanceOperationEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceOperationEvent{ + __Event: tmp, + } + return +} + +func New__InstanceOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceOperationEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceOperationEvent{ + __Event: tmp, + } + return +} + +// SetTargetInstance sets the value of TargetInstance for the instance +func (instance *__InstanceOperationEvent) SetPropertyTargetInstance(value interface{}) (err error) { + return instance.SetProperty("TargetInstance", (value)) +} + +// GetTargetInstance gets the value of TargetInstance for the instance +func (instance *__InstanceOperationEvent) GetPropertyTargetInstance() (value interface{}, err error) { + retValue, err := instance.GetProperty("TargetInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceProviderRegistration.go new file mode 100644 index 00000000..6a32c9e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/InstanceProviderRegistration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __InstanceProviderRegistration struct +type __InstanceProviderRegistration struct { + *__ObjectProviderRegistration +} + +func New__InstanceProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__InstanceProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__InstanceProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} + +func New__InstanceProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__InstanceProviderRegistration, err error) { + tmp, err := New__ObjectProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__InstanceProviderRegistration{ + __ObjectProviderRegistration: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IntervalTimerInstruction.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IntervalTimerInstruction.go new file mode 100644 index 00000000..6d27e319 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/IntervalTimerInstruction.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __IntervalTimerInstruction struct +type __IntervalTimerInstruction struct { + *__TimerInstruction + + // + IntervalBetweenEvents uint32 +} + +func New__IntervalTimerInstructionEx1(instance *cim.WmiInstance) (newInstance *__IntervalTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx1(instance) + + if err != nil { + return + } + newInstance = &__IntervalTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +func New__IntervalTimerInstructionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__IntervalTimerInstruction, err error) { + tmp, err := New__TimerInstructionEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__IntervalTimerInstruction{ + __TimerInstruction: tmp, + } + return +} + +// SetIntervalBetweenEvents sets the value of IntervalBetweenEvents for the instance +func (instance *__IntervalTimerInstruction) SetPropertyIntervalBetweenEvents(value uint32) (err error) { + return instance.SetProperty("IntervalBetweenEvents", (value)) +} + +// GetIntervalBetweenEvents gets the value of IntervalBetweenEvents for the instance +func (instance *__IntervalTimerInstruction) GetPropertyIntervalBetweenEvents() (value uint32, err error) { + retValue, err := instance.GetProperty("IntervalBetweenEvents") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DedupProperties.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DedupProperties.go new file mode 100644 index 00000000..367ad1ef --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DedupProperties.go @@ -0,0 +1,291 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_DedupProperties struct +type MSFT_DedupProperties struct { + *cim.WmiInstance + + // + InPolicyFilesCount uint64 + + // + InPolicyFilesSize uint64 + + // + OptimizedFilesCount uint64 + + // + OptimizedFilesSavingsRate uint32 + + // + OptimizedFilesSize uint64 + + // + SavingsRate uint32 + + // + SavingsSize uint64 + + // + UnoptimizedSize uint64 +} + +func NewMSFT_DedupPropertiesEx1(instance *cim.WmiInstance) (newInstance *MSFT_DedupProperties, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_DedupProperties{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_DedupPropertiesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_DedupProperties, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_DedupProperties{ + WmiInstance: tmp, + } + return +} + +// SetInPolicyFilesCount sets the value of InPolicyFilesCount for the instance +func (instance *MSFT_DedupProperties) SetPropertyInPolicyFilesCount(value uint64) (err error) { + return instance.SetProperty("InPolicyFilesCount", (value)) +} + +// GetInPolicyFilesCount gets the value of InPolicyFilesCount for the instance +func (instance *MSFT_DedupProperties) GetPropertyInPolicyFilesCount() (value uint64, err error) { + retValue, err := instance.GetProperty("InPolicyFilesCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInPolicyFilesSize sets the value of InPolicyFilesSize for the instance +func (instance *MSFT_DedupProperties) SetPropertyInPolicyFilesSize(value uint64) (err error) { + return instance.SetProperty("InPolicyFilesSize", (value)) +} + +// GetInPolicyFilesSize gets the value of InPolicyFilesSize for the instance +func (instance *MSFT_DedupProperties) GetPropertyInPolicyFilesSize() (value uint64, err error) { + retValue, err := instance.GetProperty("InPolicyFilesSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOptimizedFilesCount sets the value of OptimizedFilesCount for the instance +func (instance *MSFT_DedupProperties) SetPropertyOptimizedFilesCount(value uint64) (err error) { + return instance.SetProperty("OptimizedFilesCount", (value)) +} + +// GetOptimizedFilesCount gets the value of OptimizedFilesCount for the instance +func (instance *MSFT_DedupProperties) GetPropertyOptimizedFilesCount() (value uint64, err error) { + retValue, err := instance.GetProperty("OptimizedFilesCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOptimizedFilesSavingsRate sets the value of OptimizedFilesSavingsRate for the instance +func (instance *MSFT_DedupProperties) SetPropertyOptimizedFilesSavingsRate(value uint32) (err error) { + return instance.SetProperty("OptimizedFilesSavingsRate", (value)) +} + +// GetOptimizedFilesSavingsRate gets the value of OptimizedFilesSavingsRate for the instance +func (instance *MSFT_DedupProperties) GetPropertyOptimizedFilesSavingsRate() (value uint32, err error) { + retValue, err := instance.GetProperty("OptimizedFilesSavingsRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOptimizedFilesSize sets the value of OptimizedFilesSize for the instance +func (instance *MSFT_DedupProperties) SetPropertyOptimizedFilesSize(value uint64) (err error) { + return instance.SetProperty("OptimizedFilesSize", (value)) +} + +// GetOptimizedFilesSize gets the value of OptimizedFilesSize for the instance +func (instance *MSFT_DedupProperties) GetPropertyOptimizedFilesSize() (value uint64, err error) { + retValue, err := instance.GetProperty("OptimizedFilesSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSavingsRate sets the value of SavingsRate for the instance +func (instance *MSFT_DedupProperties) SetPropertySavingsRate(value uint32) (err error) { + return instance.SetProperty("SavingsRate", (value)) +} + +// GetSavingsRate gets the value of SavingsRate for the instance +func (instance *MSFT_DedupProperties) GetPropertySavingsRate() (value uint32, err error) { + retValue, err := instance.GetProperty("SavingsRate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSavingsSize sets the value of SavingsSize for the instance +func (instance *MSFT_DedupProperties) SetPropertySavingsSize(value uint64) (err error) { + return instance.SetProperty("SavingsSize", (value)) +} + +// GetSavingsSize gets the value of SavingsSize for the instance +func (instance *MSFT_DedupProperties) GetPropertySavingsSize() (value uint64, err error) { + retValue, err := instance.GetProperty("SavingsSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUnoptimizedSize sets the value of UnoptimizedSize for the instance +func (instance *MSFT_DedupProperties) SetPropertyUnoptimizedSize(value uint64) (err error) { + return instance.SetProperty("UnoptimizedSize", (value)) +} + +// GetUnoptimizedSize gets the value of UnoptimizedSize for the instance +func (instance *MSFT_DedupProperties) GetPropertyUnoptimizedSize() (value uint64, err error) { + retValue, err := instance.GetProperty("UnoptimizedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Disk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Disk.go new file mode 100644 index 00000000..95c39e3e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Disk.go @@ -0,0 +1,1252 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_Disk struct +type MSFT_Disk struct { + *MSFT_StorageObject + + // + AdapterSerialNumber string + + // + AllocatedSize uint64 + + // + BootFromDisk bool + + // + BusType uint16 + + // + FirmwareVersion string + + // + FriendlyName string + + // + Guid string + + // + HealthStatus uint16 + + // + IsBoot bool + + // + IsClustered bool + + // + IsHighlyAvailable bool + + // + IsOffline bool + + // + IsReadOnly bool + + // + IsScaleOut bool + + // + IsSystem bool + + // + LargestFreeExtent uint64 + + // + Location string + + // + LogicalSectorSize uint32 + + // + Manufacturer string + + // + Model string + + // + Number uint32 + + // + NumberOfPartitions uint32 + + // + OfflineReason uint16 + + // + OperationalStatus []uint16 + + // + PartitionStyle uint16 + + // + Path string + + // + PhysicalSectorSize uint32 + + // + ProvisioningType uint16 + + // + SerialNumber string + + // + Signature uint32 + + // + Size uint64 + + // + UniqueIdFormat uint16 +} + +func NewMSFT_DiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_Disk, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_Disk{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_DiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_Disk, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_Disk{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAdapterSerialNumber sets the value of AdapterSerialNumber for the instance +func (instance *MSFT_Disk) SetPropertyAdapterSerialNumber(value string) (err error) { + return instance.SetProperty("AdapterSerialNumber", (value)) +} + +// GetAdapterSerialNumber gets the value of AdapterSerialNumber for the instance +func (instance *MSFT_Disk) GetPropertyAdapterSerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("AdapterSerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAllocatedSize sets the value of AllocatedSize for the instance +func (instance *MSFT_Disk) SetPropertyAllocatedSize(value uint64) (err error) { + return instance.SetProperty("AllocatedSize", (value)) +} + +// GetAllocatedSize gets the value of AllocatedSize for the instance +func (instance *MSFT_Disk) GetPropertyAllocatedSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocatedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBootFromDisk sets the value of BootFromDisk for the instance +func (instance *MSFT_Disk) SetPropertyBootFromDisk(value bool) (err error) { + return instance.SetProperty("BootFromDisk", (value)) +} + +// GetBootFromDisk gets the value of BootFromDisk for the instance +func (instance *MSFT_Disk) GetPropertyBootFromDisk() (value bool, err error) { + retValue, err := instance.GetProperty("BootFromDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBusType sets the value of BusType for the instance +func (instance *MSFT_Disk) SetPropertyBusType(value uint16) (err error) { + return instance.SetProperty("BusType", (value)) +} + +// GetBusType gets the value of BusType for the instance +func (instance *MSFT_Disk) GetPropertyBusType() (value uint16, err error) { + retValue, err := instance.GetProperty("BusType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFirmwareVersion sets the value of FirmwareVersion for the instance +func (instance *MSFT_Disk) SetPropertyFirmwareVersion(value string) (err error) { + return instance.SetProperty("FirmwareVersion", (value)) +} + +// GetFirmwareVersion gets the value of FirmwareVersion for the instance +func (instance *MSFT_Disk) GetPropertyFirmwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("FirmwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_Disk) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_Disk) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetGuid sets the value of Guid for the instance +func (instance *MSFT_Disk) SetPropertyGuid(value string) (err error) { + return instance.SetProperty("Guid", (value)) +} + +// GetGuid gets the value of Guid for the instance +func (instance *MSFT_Disk) GetPropertyGuid() (value string, err error) { + retValue, err := instance.GetProperty("Guid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_Disk) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_Disk) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIsBoot sets the value of IsBoot for the instance +func (instance *MSFT_Disk) SetPropertyIsBoot(value bool) (err error) { + return instance.SetProperty("IsBoot", (value)) +} + +// GetIsBoot gets the value of IsBoot for the instance +func (instance *MSFT_Disk) GetPropertyIsBoot() (value bool, err error) { + retValue, err := instance.GetProperty("IsBoot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsClustered sets the value of IsClustered for the instance +func (instance *MSFT_Disk) SetPropertyIsClustered(value bool) (err error) { + return instance.SetProperty("IsClustered", (value)) +} + +// GetIsClustered gets the value of IsClustered for the instance +func (instance *MSFT_Disk) GetPropertyIsClustered() (value bool, err error) { + retValue, err := instance.GetProperty("IsClustered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsHighlyAvailable sets the value of IsHighlyAvailable for the instance +func (instance *MSFT_Disk) SetPropertyIsHighlyAvailable(value bool) (err error) { + return instance.SetProperty("IsHighlyAvailable", (value)) +} + +// GetIsHighlyAvailable gets the value of IsHighlyAvailable for the instance +func (instance *MSFT_Disk) GetPropertyIsHighlyAvailable() (value bool, err error) { + retValue, err := instance.GetProperty("IsHighlyAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsOffline sets the value of IsOffline for the instance +func (instance *MSFT_Disk) SetPropertyIsOffline(value bool) (err error) { + return instance.SetProperty("IsOffline", (value)) +} + +// GetIsOffline gets the value of IsOffline for the instance +func (instance *MSFT_Disk) GetPropertyIsOffline() (value bool, err error) { + retValue, err := instance.GetProperty("IsOffline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsReadOnly sets the value of IsReadOnly for the instance +func (instance *MSFT_Disk) SetPropertyIsReadOnly(value bool) (err error) { + return instance.SetProperty("IsReadOnly", (value)) +} + +// GetIsReadOnly gets the value of IsReadOnly for the instance +func (instance *MSFT_Disk) GetPropertyIsReadOnly() (value bool, err error) { + retValue, err := instance.GetProperty("IsReadOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsScaleOut sets the value of IsScaleOut for the instance +func (instance *MSFT_Disk) SetPropertyIsScaleOut(value bool) (err error) { + return instance.SetProperty("IsScaleOut", (value)) +} + +// GetIsScaleOut gets the value of IsScaleOut for the instance +func (instance *MSFT_Disk) GetPropertyIsScaleOut() (value bool, err error) { + retValue, err := instance.GetProperty("IsScaleOut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsSystem sets the value of IsSystem for the instance +func (instance *MSFT_Disk) SetPropertyIsSystem(value bool) (err error) { + return instance.SetProperty("IsSystem", (value)) +} + +// GetIsSystem gets the value of IsSystem for the instance +func (instance *MSFT_Disk) GetPropertyIsSystem() (value bool, err error) { + retValue, err := instance.GetProperty("IsSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLargestFreeExtent sets the value of LargestFreeExtent for the instance +func (instance *MSFT_Disk) SetPropertyLargestFreeExtent(value uint64) (err error) { + return instance.SetProperty("LargestFreeExtent", (value)) +} + +// GetLargestFreeExtent gets the value of LargestFreeExtent for the instance +func (instance *MSFT_Disk) GetPropertyLargestFreeExtent() (value uint64, err error) { + retValue, err := instance.GetProperty("LargestFreeExtent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLocation sets the value of Location for the instance +func (instance *MSFT_Disk) SetPropertyLocation(value string) (err error) { + return instance.SetProperty("Location", (value)) +} + +// GetLocation gets the value of Location for the instance +func (instance *MSFT_Disk) GetPropertyLocation() (value string, err error) { + retValue, err := instance.GetProperty("Location") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLogicalSectorSize sets the value of LogicalSectorSize for the instance +func (instance *MSFT_Disk) SetPropertyLogicalSectorSize(value uint32) (err error) { + return instance.SetProperty("LogicalSectorSize", (value)) +} + +// GetLogicalSectorSize gets the value of LogicalSectorSize for the instance +func (instance *MSFT_Disk) GetPropertyLogicalSectorSize() (value uint32, err error) { + retValue, err := instance.GetProperty("LogicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *MSFT_Disk) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *MSFT_Disk) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *MSFT_Disk) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *MSFT_Disk) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNumber sets the value of Number for the instance +func (instance *MSFT_Disk) SetPropertyNumber(value uint32) (err error) { + return instance.SetProperty("Number", (value)) +} + +// GetNumber gets the value of Number for the instance +func (instance *MSFT_Disk) GetPropertyNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("Number") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfPartitions sets the value of NumberOfPartitions for the instance +func (instance *MSFT_Disk) SetPropertyNumberOfPartitions(value uint32) (err error) { + return instance.SetProperty("NumberOfPartitions", (value)) +} + +// GetNumberOfPartitions gets the value of NumberOfPartitions for the instance +func (instance *MSFT_Disk) GetPropertyNumberOfPartitions() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfPartitions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOfflineReason sets the value of OfflineReason for the instance +func (instance *MSFT_Disk) SetPropertyOfflineReason(value uint16) (err error) { + return instance.SetProperty("OfflineReason", (value)) +} + +// GetOfflineReason gets the value of OfflineReason for the instance +func (instance *MSFT_Disk) GetPropertyOfflineReason() (value uint16, err error) { + retValue, err := instance.GetProperty("OfflineReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_Disk) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_Disk) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPartitionStyle sets the value of PartitionStyle for the instance +func (instance *MSFT_Disk) SetPropertyPartitionStyle(value uint16) (err error) { + return instance.SetProperty("PartitionStyle", (value)) +} + +// GetPartitionStyle gets the value of PartitionStyle for the instance +func (instance *MSFT_Disk) GetPropertyPartitionStyle() (value uint16, err error) { + retValue, err := instance.GetProperty("PartitionStyle") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPath sets the value of Path for the instance +func (instance *MSFT_Disk) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *MSFT_Disk) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPhysicalSectorSize sets the value of PhysicalSectorSize for the instance +func (instance *MSFT_Disk) SetPropertyPhysicalSectorSize(value uint32) (err error) { + return instance.SetProperty("PhysicalSectorSize", (value)) +} + +// GetPhysicalSectorSize gets the value of PhysicalSectorSize for the instance +func (instance *MSFT_Disk) GetPropertyPhysicalSectorSize() (value uint32, err error) { + retValue, err := instance.GetProperty("PhysicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetProvisioningType sets the value of ProvisioningType for the instance +func (instance *MSFT_Disk) SetPropertyProvisioningType(value uint16) (err error) { + return instance.SetProperty("ProvisioningType", (value)) +} + +// GetProvisioningType gets the value of ProvisioningType for the instance +func (instance *MSFT_Disk) GetPropertyProvisioningType() (value uint16, err error) { + retValue, err := instance.GetProperty("ProvisioningType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *MSFT_Disk) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *MSFT_Disk) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSignature sets the value of Signature for the instance +func (instance *MSFT_Disk) SetPropertySignature(value uint32) (err error) { + return instance.SetProperty("Signature", (value)) +} + +// GetSignature gets the value of Signature for the instance +func (instance *MSFT_Disk) GetPropertySignature() (value uint32, err error) { + retValue, err := instance.GetProperty("Signature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_Disk) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_Disk) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUniqueIdFormat sets the value of UniqueIdFormat for the instance +func (instance *MSFT_Disk) SetPropertyUniqueIdFormat(value uint16) (err error) { + return instance.SetProperty("UniqueIdFormat", (value)) +} + +// GetUniqueIdFormat gets the value of UniqueIdFormat for the instance +func (instance *MSFT_Disk) GetPropertyUniqueIdFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("UniqueIdFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// +// +// +// + +// +// +// +func (instance *MSFT_Disk) CreatePartition( /* IN */ Size uint64, + /* IN */ UseMaximumSize bool, + /* IN */ Offset uint64, + /* IN */ Alignment uint32, + /* IN */ DriveLetter byte, + /* IN */ AssignDriveLetter bool, + /* IN */ MbrType uint16, + /* IN */ GptType string, + /* IN */ IsHidden bool, + /* IN */ IsActive bool, + /* OUT */ CreatedPartition MSFT_Partition, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreatePartition", Size, UseMaximumSize, Offset, Alignment, DriveLetter, AssignDriveLetter, MbrType, GptType, IsHidden, IsActive) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Disk) Initialize( /* IN */ PartitionStyle uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Initialize", PartitionStyle) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +// +// +func (instance *MSFT_Disk) Clear( /* IN */ RemoveData bool, + /* IN */ RemoveOEM bool, + /* IN */ ZeroOutEntireDisk bool, + /* IN */ Sanitize bool, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Clear", RemoveData, RemoveOEM, ZeroOutEntireDisk, Sanitize, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Disk) ConvertStyle( /* IN */ PartitionStyle uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("ConvertStyle", PartitionStyle) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_Disk) Offline( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Offline") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_Disk) Online( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Online") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *MSFT_Disk) SetAttributes( /* IN */ IsReadOnly bool, + /* IN */ Signature uint32, + /* IN */ Guid string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", IsReadOnly, Signature, Guid) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_Disk) Refresh( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Refresh") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_Disk) CreateVolume( /* IN */ FriendlyName string, + /* IN */ FileSystem uint16, + /* IN */ AccessPath string, + /* IN */ AllocationUnitSize uint32, + /* OUT */ CreatedVolume MSFT_Volume, + /* OPTIONAL IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateVolume", FriendlyName, FileSystem, AccessPath, AllocationUnitSize, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_Disk) EnableHighAvailability( /* IN */ ScaleOut bool, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("EnableHighAvailability", ScaleOut, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_Disk) DisableHighAvailability( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DisableHighAvailability", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImage.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImage.go new file mode 100644 index 00000000..806211e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImage.go @@ -0,0 +1,356 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_DiskImage struct +type MSFT_DiskImage struct { + *cim.WmiInstance + + // + Attached bool + + // + BlockSize uint64 + + // + DevicePath string + + // + FileSize uint64 + + // + ImagePath string + + // + LogicalSectorSize uint64 + + // + Number uint32 + + // + Size uint64 + + // + StorageType uint32 +} + +func NewMSFT_DiskImageEx1(instance *cim.WmiInstance) (newInstance *MSFT_DiskImage, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_DiskImage{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_DiskImageEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_DiskImage, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_DiskImage{ + WmiInstance: tmp, + } + return +} + +// SetAttached sets the value of Attached for the instance +func (instance *MSFT_DiskImage) SetPropertyAttached(value bool) (err error) { + return instance.SetProperty("Attached", (value)) +} + +// GetAttached gets the value of Attached for the instance +func (instance *MSFT_DiskImage) GetPropertyAttached() (value bool, err error) { + retValue, err := instance.GetProperty("Attached") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetBlockSize sets the value of BlockSize for the instance +func (instance *MSFT_DiskImage) SetPropertyBlockSize(value uint64) (err error) { + return instance.SetProperty("BlockSize", (value)) +} + +// GetBlockSize gets the value of BlockSize for the instance +func (instance *MSFT_DiskImage) GetPropertyBlockSize() (value uint64, err error) { + retValue, err := instance.GetProperty("BlockSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDevicePath sets the value of DevicePath for the instance +func (instance *MSFT_DiskImage) SetPropertyDevicePath(value string) (err error) { + return instance.SetProperty("DevicePath", (value)) +} + +// GetDevicePath gets the value of DevicePath for the instance +func (instance *MSFT_DiskImage) GetPropertyDevicePath() (value string, err error) { + retValue, err := instance.GetProperty("DevicePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSize sets the value of FileSize for the instance +func (instance *MSFT_DiskImage) SetPropertyFileSize(value uint64) (err error) { + return instance.SetProperty("FileSize", (value)) +} + +// GetFileSize gets the value of FileSize for the instance +func (instance *MSFT_DiskImage) GetPropertyFileSize() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetImagePath sets the value of ImagePath for the instance +func (instance *MSFT_DiskImage) SetPropertyImagePath(value string) (err error) { + return instance.SetProperty("ImagePath", (value)) +} + +// GetImagePath gets the value of ImagePath for the instance +func (instance *MSFT_DiskImage) GetPropertyImagePath() (value string, err error) { + retValue, err := instance.GetProperty("ImagePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLogicalSectorSize sets the value of LogicalSectorSize for the instance +func (instance *MSFT_DiskImage) SetPropertyLogicalSectorSize(value uint64) (err error) { + return instance.SetProperty("LogicalSectorSize", (value)) +} + +// GetLogicalSectorSize gets the value of LogicalSectorSize for the instance +func (instance *MSFT_DiskImage) GetPropertyLogicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNumber sets the value of Number for the instance +func (instance *MSFT_DiskImage) SetPropertyNumber(value uint32) (err error) { + return instance.SetProperty("Number", (value)) +} + +// GetNumber gets the value of Number for the instance +func (instance *MSFT_DiskImage) GetPropertyNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("Number") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_DiskImage) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_DiskImage) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStorageType sets the value of StorageType for the instance +func (instance *MSFT_DiskImage) SetPropertyStorageType(value uint32) (err error) { + return instance.SetProperty("StorageType", (value)) +} + +// GetStorageType gets the value of StorageType for the instance +func (instance *MSFT_DiskImage) GetPropertyStorageType() (value uint32, err error) { + retValue, err := instance.GetProperty("StorageType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// + +// +// +func (instance *MSFT_DiskImage) Mount( /* IN */ Access uint16, + /* IN */ NoDriveLetter bool, + /* OUT */ DiskImage MSFT_DiskImage) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Mount", Access, NoDriveLetter) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_DiskImage) Dismount( /* OUT */ DiskImage MSFT_DiskImage) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Dismount") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImageToVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImageToVolume.go new file mode 100644 index 00000000..4bb32563 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskImageToVolume.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_DiskImageToVolume struct +type MSFT_DiskImageToVolume struct { + *cim.WmiInstance + + // + DiskImage MSFT_DiskImage + + // + Volume MSFT_Volume +} + +func NewMSFT_DiskImageToVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_DiskImageToVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_DiskImageToVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_DiskImageToVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_DiskImageToVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_DiskImageToVolume{ + WmiInstance: tmp, + } + return +} + +// SetDiskImage sets the value of DiskImage for the instance +func (instance *MSFT_DiskImageToVolume) SetPropertyDiskImage(value MSFT_DiskImage) (err error) { + return instance.SetProperty("DiskImage", (value)) +} + +// GetDiskImage gets the value of DiskImage for the instance +func (instance *MSFT_DiskImageToVolume) GetPropertyDiskImage() (value MSFT_DiskImage, err error) { + retValue, err := instance.GetProperty("DiskImage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_DiskImage) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_DiskImage is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_DiskImage(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_DiskImageToVolume) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_DiskImageToVolume) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToPartition.go new file mode 100644 index 00000000..b6d31c2a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToPartition.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_DiskToPartition struct +type MSFT_DiskToPartition struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + Partition MSFT_Partition +} + +func NewMSFT_DiskToPartitionEx1(instance *cim.WmiInstance) (newInstance *MSFT_DiskToPartition, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_DiskToPartition{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_DiskToPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_DiskToPartition, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_DiskToPartition{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_DiskToPartition) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_DiskToPartition) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetPartition sets the value of Partition for the instance +func (instance *MSFT_DiskToPartition) SetPropertyPartition(value MSFT_Partition) (err error) { + return instance.SetProperty("Partition", (value)) +} + +// GetPartition gets the value of Partition for the instance +func (instance *MSFT_DiskToPartition) GetPropertyPartition() (value MSFT_Partition, err error) { + retValue, err := instance.GetProperty("Partition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Partition) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Partition is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Partition(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToStorageReliabilityCounter.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToStorageReliabilityCounter.go new file mode 100644 index 00000000..e66fe870 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_DiskToStorageReliabilityCounter.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_DiskToStorageReliabilityCounter struct +type MSFT_DiskToStorageReliabilityCounter struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + StorageReliabilityCounter MSFT_StorageReliabilityCounter +} + +func NewMSFT_DiskToStorageReliabilityCounterEx1(instance *cim.WmiInstance) (newInstance *MSFT_DiskToStorageReliabilityCounter, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_DiskToStorageReliabilityCounter{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_DiskToStorageReliabilityCounterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_DiskToStorageReliabilityCounter, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_DiskToStorageReliabilityCounter{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_DiskToStorageReliabilityCounter) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_DiskToStorageReliabilityCounter) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetStorageReliabilityCounter sets the value of StorageReliabilityCounter for the instance +func (instance *MSFT_DiskToStorageReliabilityCounter) SetPropertyStorageReliabilityCounter(value MSFT_StorageReliabilityCounter) (err error) { + return instance.SetProperty("StorageReliabilityCounter", (value)) +} + +// GetStorageReliabilityCounter gets the value of StorageReliabilityCounter for the instance +func (instance *MSFT_DiskToStorageReliabilityCounter) GetPropertyStorageReliabilityCounter() (value MSFT_StorageReliabilityCounter, err error) { + retValue, err := instance.GetProperty("StorageReliabilityCounter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageReliabilityCounter) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageReliabilityCounter is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageReliabilityCounter(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ExtendedStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ExtendedStatus.go new file mode 100644 index 00000000..b030a50d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ExtendedStatus.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_ExtendedStatus struct +type MSFT_ExtendedStatus struct { + *CIM_Error +} + +func NewMSFT_ExtendedStatusEx1(instance *cim.WmiInstance) (newInstance *MSFT_ExtendedStatus, err error) { + tmp, err := NewCIM_ErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ExtendedStatus{ + CIM_Error: tmp, + } + return +} + +func NewMSFT_ExtendedStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ExtendedStatus, err error) { + tmp, err := NewCIM_ErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ExtendedStatus{ + CIM_Error: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileIntegrity.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileIntegrity.go new file mode 100644 index 00000000..25805e4b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileIntegrity.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileIntegrity struct +type MSFT_FileIntegrity struct { + *cim.WmiInstance + + // + Enabled bool + + // + Enforced bool + + // + FileName string +} + +func NewMSFT_FileIntegrityEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileIntegrity, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_FileIntegrity{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_FileIntegrityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileIntegrity, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileIntegrity{ + WmiInstance: tmp, + } + return +} + +// SetEnabled sets the value of Enabled for the instance +func (instance *MSFT_FileIntegrity) SetPropertyEnabled(value bool) (err error) { + return instance.SetProperty("Enabled", (value)) +} + +// GetEnabled gets the value of Enabled for the instance +func (instance *MSFT_FileIntegrity) GetPropertyEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("Enabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnforced sets the value of Enforced for the instance +func (instance *MSFT_FileIntegrity) SetPropertyEnforced(value bool) (err error) { + return instance.SetProperty("Enforced", (value)) +} + +// GetEnforced gets the value of Enforced for the instance +func (instance *MSFT_FileIntegrity) GetPropertyEnforced() (value bool, err error) { + retValue, err := instance.GetProperty("Enforced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFileName sets the value of FileName for the instance +func (instance *MSFT_FileIntegrity) SetPropertyFileName(value string) (err error) { + return instance.SetProperty("FileName", (value)) +} + +// GetFileName gets the value of FileName for the instance +func (instance *MSFT_FileIntegrity) GetPropertyFileName() (value string, err error) { + retValue, err := instance.GetProperty("FileName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// + +// +// +// +func (instance *MSFT_FileIntegrity) Get( /* IN */ FileName string, + /* OUT */ FileIntegrity MSFT_FileIntegrity, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Get", FileName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileIntegrity) Repair( /* IN */ FileName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Repair", FileName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *MSFT_FileIntegrity) Set( /* IN */ FileName string, + /* IN */ Enable bool, + /* IN */ Enforce bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Set", FileName, Enable, Enforce) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServer.go new file mode 100644 index 00000000..73073561 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServer.go @@ -0,0 +1,398 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileServer struct +type MSFT_FileServer struct { + *MSFT_StorageObject + + // + FileSharingProtocols []uint16 + + // + FileSharingProtocolVersions []string + + // + FriendlyName string + + // + HealthStatus uint16 + + // + HostNames []string + + // + OperationalStatus []uint16 + + // + OtherOperationalStatusDescription string + + // + SupportsContinuouslyAvailableFileShare bool + + // + SupportsFileShareCreation bool +} + +func NewMSFT_FileServerEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileServer, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_FileServer{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_FileServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileServer, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileServer{ + MSFT_StorageObject: tmp, + } + return +} + +// SetFileSharingProtocols sets the value of FileSharingProtocols for the instance +func (instance *MSFT_FileServer) SetPropertyFileSharingProtocols(value []uint16) (err error) { + return instance.SetProperty("FileSharingProtocols", (value)) +} + +// GetFileSharingProtocols gets the value of FileSharingProtocols for the instance +func (instance *MSFT_FileServer) GetPropertyFileSharingProtocols() (value []uint16, err error) { + retValue, err := instance.GetProperty("FileSharingProtocols") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetFileSharingProtocolVersions sets the value of FileSharingProtocolVersions for the instance +func (instance *MSFT_FileServer) SetPropertyFileSharingProtocolVersions(value []string) (err error) { + return instance.SetProperty("FileSharingProtocolVersions", (value)) +} + +// GetFileSharingProtocolVersions gets the value of FileSharingProtocolVersions for the instance +func (instance *MSFT_FileServer) GetPropertyFileSharingProtocolVersions() (value []string, err error) { + retValue, err := instance.GetProperty("FileSharingProtocolVersions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_FileServer) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_FileServer) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_FileServer) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_FileServer) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHostNames sets the value of HostNames for the instance +func (instance *MSFT_FileServer) SetPropertyHostNames(value []string) (err error) { + return instance.SetProperty("HostNames", (value)) +} + +// GetHostNames gets the value of HostNames for the instance +func (instance *MSFT_FileServer) GetPropertyHostNames() (value []string, err error) { + retValue, err := instance.GetProperty("HostNames") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_FileServer) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_FileServer) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherOperationalStatusDescription sets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_FileServer) SetPropertyOtherOperationalStatusDescription(value string) (err error) { + return instance.SetProperty("OtherOperationalStatusDescription", (value)) +} + +// GetOtherOperationalStatusDescription gets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_FileServer) GetPropertyOtherOperationalStatusDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherOperationalStatusDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportsContinuouslyAvailableFileShare sets the value of SupportsContinuouslyAvailableFileShare for the instance +func (instance *MSFT_FileServer) SetPropertySupportsContinuouslyAvailableFileShare(value bool) (err error) { + return instance.SetProperty("SupportsContinuouslyAvailableFileShare", (value)) +} + +// GetSupportsContinuouslyAvailableFileShare gets the value of SupportsContinuouslyAvailableFileShare for the instance +func (instance *MSFT_FileServer) GetPropertySupportsContinuouslyAvailableFileShare() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsContinuouslyAvailableFileShare") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFileShareCreation sets the value of SupportsFileShareCreation for the instance +func (instance *MSFT_FileServer) SetPropertySupportsFileShareCreation(value bool) (err error) { + return instance.SetProperty("SupportsFileShareCreation", (value)) +} + +// GetSupportsFileShareCreation gets the value of SupportsFileShareCreation for the instance +func (instance *MSFT_FileServer) GetPropertySupportsFileShareCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFileShareCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_FileServer) CreateFileShare( /* IN */ Name string, + /* IN */ Description string, + /* IN */ SourceVolume MSFT_Volume, + /* IN */ VolumeRelativePath string, + /* IN */ ContinuouslyAvailable bool, + /* IN */ EncryptData bool, + /* IN */ FileSharingProtocol uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedFileShare MSFT_FileShare, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateFileShare", Name, Description, SourceVolume, VolumeRelativePath, ContinuouslyAvailable, EncryptData, FileSharingProtocol, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_FileServer) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileServer) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToFileShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToFileShare.go new file mode 100644 index 00000000..635b20a3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToFileShare.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileServerToFileShare struct +type MSFT_FileServerToFileShare struct { + *cim.WmiInstance + + // + FileServer MSFT_FileServer + + // + FileShare MSFT_FileShare +} + +func NewMSFT_FileServerToFileShareEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileServerToFileShare, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_FileServerToFileShare{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_FileServerToFileShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileServerToFileShare, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileServerToFileShare{ + WmiInstance: tmp, + } + return +} + +// SetFileServer sets the value of FileServer for the instance +func (instance *MSFT_FileServerToFileShare) SetPropertyFileServer(value MSFT_FileServer) (err error) { + return instance.SetProperty("FileServer", (value)) +} + +// GetFileServer gets the value of FileServer for the instance +func (instance *MSFT_FileServerToFileShare) GetPropertyFileServer() (value MSFT_FileServer, err error) { + retValue, err := instance.GetProperty("FileServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_FileServer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_FileServer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_FileServer(valuetmp) + + return +} + +// SetFileShare sets the value of FileShare for the instance +func (instance *MSFT_FileServerToFileShare) SetPropertyFileShare(value MSFT_FileShare) (err error) { + return instance.SetProperty("FileShare", (value)) +} + +// GetFileShare gets the value of FileShare for the instance +func (instance *MSFT_FileServerToFileShare) GetPropertyFileShare() (value MSFT_FileShare, err error) { + retValue, err := instance.GetProperty("FileShare") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_FileShare) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_FileShare is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_FileShare(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToVolume.go new file mode 100644 index 00000000..a8b18a42 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileServerToVolume.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileServerToVolume struct +type MSFT_FileServerToVolume struct { + *cim.WmiInstance + + // + FileServer MSFT_FileServer + + // + Volume MSFT_Volume +} + +func NewMSFT_FileServerToVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileServerToVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_FileServerToVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_FileServerToVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileServerToVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileServerToVolume{ + WmiInstance: tmp, + } + return +} + +// SetFileServer sets the value of FileServer for the instance +func (instance *MSFT_FileServerToVolume) SetPropertyFileServer(value MSFT_FileServer) (err error) { + return instance.SetProperty("FileServer", (value)) +} + +// GetFileServer gets the value of FileServer for the instance +func (instance *MSFT_FileServerToVolume) GetPropertyFileServer() (value MSFT_FileServer, err error) { + retValue, err := instance.GetProperty("FileServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_FileServer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_FileServer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_FileServer(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_FileServerToVolume) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_FileServerToVolume) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShare.go new file mode 100644 index 00000000..1d071630 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShare.go @@ -0,0 +1,502 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileShare struct +type MSFT_FileShare struct { + *MSFT_StorageObject + + // + ContinuouslyAvailable bool + + // + Description string + + // + EncryptData bool + + // + FileSharingProtocol uint16 + + // + HealthStatus uint16 + + // + Name string + + // + OperationalStatus []uint16 + + // + ShareState uint16 + + // + VolumeRelativePath string +} + +func NewMSFT_FileShareEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileShare, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_FileShare{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_FileShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileShare, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileShare{ + MSFT_StorageObject: tmp, + } + return +} + +// SetContinuouslyAvailable sets the value of ContinuouslyAvailable for the instance +func (instance *MSFT_FileShare) SetPropertyContinuouslyAvailable(value bool) (err error) { + return instance.SetProperty("ContinuouslyAvailable", (value)) +} + +// GetContinuouslyAvailable gets the value of ContinuouslyAvailable for the instance +func (instance *MSFT_FileShare) GetPropertyContinuouslyAvailable() (value bool, err error) { + retValue, err := instance.GetProperty("ContinuouslyAvailable") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_FileShare) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_FileShare) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEncryptData sets the value of EncryptData for the instance +func (instance *MSFT_FileShare) SetPropertyEncryptData(value bool) (err error) { + return instance.SetProperty("EncryptData", (value)) +} + +// GetEncryptData gets the value of EncryptData for the instance +func (instance *MSFT_FileShare) GetPropertyEncryptData() (value bool, err error) { + retValue, err := instance.GetProperty("EncryptData") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFileSharingProtocol sets the value of FileSharingProtocol for the instance +func (instance *MSFT_FileShare) SetPropertyFileSharingProtocol(value uint16) (err error) { + return instance.SetProperty("FileSharingProtocol", (value)) +} + +// GetFileSharingProtocol gets the value of FileSharingProtocol for the instance +func (instance *MSFT_FileShare) GetPropertyFileSharingProtocol() (value uint16, err error) { + retValue, err := instance.GetProperty("FileSharingProtocol") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_FileShare) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_FileShare) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_FileShare) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_FileShare) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_FileShare) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_FileShare) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetShareState sets the value of ShareState for the instance +func (instance *MSFT_FileShare) SetPropertyShareState(value uint16) (err error) { + return instance.SetProperty("ShareState", (value)) +} + +// GetShareState gets the value of ShareState for the instance +func (instance *MSFT_FileShare) GetPropertyShareState() (value uint16, err error) { + retValue, err := instance.GetProperty("ShareState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVolumeRelativePath sets the value of VolumeRelativePath for the instance +func (instance *MSFT_FileShare) SetPropertyVolumeRelativePath(value string) (err error) { + return instance.SetProperty("VolumeRelativePath", (value)) +} + +// GetVolumeRelativePath gets the value of VolumeRelativePath for the instance +func (instance *MSFT_FileShare) GetPropertyVolumeRelativePath() (value string, err error) { + retValue, err := instance.GetProperty("VolumeRelativePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// + +// +// +// +func (instance *MSFT_FileShare) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileShare) SetDescription( /* IN */ Description string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDescription", Description) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileShare) SetAttributes( /* IN */ EncryptData bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", EncryptData) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_FileShare) GetAccessControlEntries( /* OUT */ AccessControlEntries []MSFT_FileShareAccessControlEntry, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetAccessControlEntries") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_FileShare) GrantAccess( /* IN */ AccountNames []string, + /* IN */ AccessRight uint32, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GrantAccess", AccountNames, AccessRight) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileShare) RevokeAccess( /* IN */ AccountNames []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RevokeAccess", AccountNames) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileShare) BlockAccess( /* IN */ AccountNames []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("BlockAccess", AccountNames) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_FileShare) UnblockAccess( /* IN */ AccountNames []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("UnblockAccess", AccountNames) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_FileShare) Diagnose( /* OUT */ DiagnoseResults []MSFT_StorageDiagnoseResult, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Diagnose") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_FileShare) GetActions( /* OUT */ ActionResults []MSFT_HealthAction, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetActions") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShareAccessControlEntry.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShareAccessControlEntry.go new file mode 100644 index 00000000..3c7fd305 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileShareAccessControlEntry.go @@ -0,0 +1,141 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileShareAccessControlEntry struct +type MSFT_FileShareAccessControlEntry struct { + *cim.WmiInstance + + // + AccessControlType uint16 + + // + AccessRight uint16 + + // + AccountName string +} + +func NewMSFT_FileShareAccessControlEntryEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileShareAccessControlEntry, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_FileShareAccessControlEntry{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_FileShareAccessControlEntryEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileShareAccessControlEntry, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileShareAccessControlEntry{ + WmiInstance: tmp, + } + return +} + +// SetAccessControlType sets the value of AccessControlType for the instance +func (instance *MSFT_FileShareAccessControlEntry) SetPropertyAccessControlType(value uint16) (err error) { + return instance.SetProperty("AccessControlType", (value)) +} + +// GetAccessControlType gets the value of AccessControlType for the instance +func (instance *MSFT_FileShareAccessControlEntry) GetPropertyAccessControlType() (value uint16, err error) { + retValue, err := instance.GetProperty("AccessControlType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAccessRight sets the value of AccessRight for the instance +func (instance *MSFT_FileShareAccessControlEntry) SetPropertyAccessRight(value uint16) (err error) { + return instance.SetProperty("AccessRight", (value)) +} + +// GetAccessRight gets the value of AccessRight for the instance +func (instance *MSFT_FileShareAccessControlEntry) GetPropertyAccessRight() (value uint16, err error) { + retValue, err := instance.GetProperty("AccessRight") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAccountName sets the value of AccountName for the instance +func (instance *MSFT_FileShareAccessControlEntry) SetPropertyAccountName(value string) (err error) { + return instance.SetProperty("AccountName", (value)) +} + +// GetAccountName gets the value of AccountName for the instance +func (instance *MSFT_FileShareAccessControlEntry) GetPropertyAccountName() (value string, err error) { + retValue, err := instance.GetProperty("AccountName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileStorageTier.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileStorageTier.go new file mode 100644 index 00000000..7c18ffe0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_FileStorageTier.go @@ -0,0 +1,353 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_FileStorageTier struct +type MSFT_FileStorageTier struct { + *cim.WmiInstance + + // + DesiredStorageTierClass uint16 + + // + DesiredStorageTierName string + + // + FilePath string + + // + FileSize uint64 + + // + FileSizeOnDesiredStorageTier uint64 + + // + FileSizeOnDesiredStorageTierClass uint64 + + // + PlacementStatus uint16 + + // + State uint16 +} + +func NewMSFT_FileStorageTierEx1(instance *cim.WmiInstance) (newInstance *MSFT_FileStorageTier, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_FileStorageTier{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_FileStorageTierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_FileStorageTier, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_FileStorageTier{ + WmiInstance: tmp, + } + return +} + +// SetDesiredStorageTierClass sets the value of DesiredStorageTierClass for the instance +func (instance *MSFT_FileStorageTier) SetPropertyDesiredStorageTierClass(value uint16) (err error) { + return instance.SetProperty("DesiredStorageTierClass", (value)) +} + +// GetDesiredStorageTierClass gets the value of DesiredStorageTierClass for the instance +func (instance *MSFT_FileStorageTier) GetPropertyDesiredStorageTierClass() (value uint16, err error) { + retValue, err := instance.GetProperty("DesiredStorageTierClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDesiredStorageTierName sets the value of DesiredStorageTierName for the instance +func (instance *MSFT_FileStorageTier) SetPropertyDesiredStorageTierName(value string) (err error) { + return instance.SetProperty("DesiredStorageTierName", (value)) +} + +// GetDesiredStorageTierName gets the value of DesiredStorageTierName for the instance +func (instance *MSFT_FileStorageTier) GetPropertyDesiredStorageTierName() (value string, err error) { + retValue, err := instance.GetProperty("DesiredStorageTierName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFilePath sets the value of FilePath for the instance +func (instance *MSFT_FileStorageTier) SetPropertyFilePath(value string) (err error) { + return instance.SetProperty("FilePath", (value)) +} + +// GetFilePath gets the value of FilePath for the instance +func (instance *MSFT_FileStorageTier) GetPropertyFilePath() (value string, err error) { + retValue, err := instance.GetProperty("FilePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSize sets the value of FileSize for the instance +func (instance *MSFT_FileStorageTier) SetPropertyFileSize(value uint64) (err error) { + return instance.SetProperty("FileSize", (value)) +} + +// GetFileSize gets the value of FileSize for the instance +func (instance *MSFT_FileStorageTier) GetPropertyFileSize() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileSizeOnDesiredStorageTier sets the value of FileSizeOnDesiredStorageTier for the instance +func (instance *MSFT_FileStorageTier) SetPropertyFileSizeOnDesiredStorageTier(value uint64) (err error) { + return instance.SetProperty("FileSizeOnDesiredStorageTier", (value)) +} + +// GetFileSizeOnDesiredStorageTier gets the value of FileSizeOnDesiredStorageTier for the instance +func (instance *MSFT_FileStorageTier) GetPropertyFileSizeOnDesiredStorageTier() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSizeOnDesiredStorageTier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFileSizeOnDesiredStorageTierClass sets the value of FileSizeOnDesiredStorageTierClass for the instance +func (instance *MSFT_FileStorageTier) SetPropertyFileSizeOnDesiredStorageTierClass(value uint64) (err error) { + return instance.SetProperty("FileSizeOnDesiredStorageTierClass", (value)) +} + +// GetFileSizeOnDesiredStorageTierClass gets the value of FileSizeOnDesiredStorageTierClass for the instance +func (instance *MSFT_FileStorageTier) GetPropertyFileSizeOnDesiredStorageTierClass() (value uint64, err error) { + retValue, err := instance.GetProperty("FileSizeOnDesiredStorageTierClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPlacementStatus sets the value of PlacementStatus for the instance +func (instance *MSFT_FileStorageTier) SetPropertyPlacementStatus(value uint16) (err error) { + return instance.SetProperty("PlacementStatus", (value)) +} + +// GetPlacementStatus gets the value of PlacementStatus for the instance +func (instance *MSFT_FileStorageTier) GetPropertyPlacementStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("PlacementStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *MSFT_FileStorageTier) SetPropertyState(value uint16) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *MSFT_FileStorageTier) GetPropertyState() (value uint16, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +// +// + +// +// +func (instance *MSFT_FileStorageTier) Get( /* IN */ FilePath string, + /* IN */ VolumeDriveLetter byte, + /* IN */ VolumePath string, + /* IN */ Volume MSFT_Volume, + /* OUT */ FileStorageTier []MSFT_FileStorageTier) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Get", FilePath, VolumeDriveLetter, VolumePath, Volume) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +func (instance *MSFT_FileStorageTier) Set( /* IN */ FilePath string, + /* IN */ DesiredStorageTierFriendlyName string, + /* IN */ DesiredStorageTierUniqueId string, + /* IN */ DesiredStorageTierClass uint16, + /* IN */ DesiredStorageTier MSFT_StorageTier) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Set", FilePath, DesiredStorageTierFriendlyName, DesiredStorageTierUniqueId, DesiredStorageTierClass, DesiredStorageTier) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *MSFT_FileStorageTier) Clear( /* IN */ FilePath string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Clear", FilePath) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthAction.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthAction.go new file mode 100644 index 00000000..d589500e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthAction.go @@ -0,0 +1,441 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_HealthAction struct +type MSFT_HealthAction struct { + *MSFT_StorageObject + + // + Description string + + // + ErrorCode uint32 + + // + ErrorDescription string + + // + MessageParameters []string + + // + PercentComplete uint16 + + // + Reason string + + // + ReportingObjectId string + + // + ReportingObjectType string + + // + ReportingObjectUniqueId string + + // + StartTime string + + // + State uint16 + + // + Status string + + // + Type string +} + +func NewMSFT_HealthActionEx1(instance *cim.WmiInstance) (newInstance *MSFT_HealthAction, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_HealthAction{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_HealthActionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_HealthAction, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_HealthAction{ + MSFT_StorageObject: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_HealthAction) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_HealthAction) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorCode sets the value of ErrorCode for the instance +func (instance *MSFT_HealthAction) SetPropertyErrorCode(value uint32) (err error) { + return instance.SetProperty("ErrorCode", (value)) +} + +// GetErrorCode gets the value of ErrorCode for the instance +func (instance *MSFT_HealthAction) GetPropertyErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *MSFT_HealthAction) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *MSFT_HealthAction) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMessageParameters sets the value of MessageParameters for the instance +func (instance *MSFT_HealthAction) SetPropertyMessageParameters(value []string) (err error) { + return instance.SetProperty("MessageParameters", (value)) +} + +// GetMessageParameters gets the value of MessageParameters for the instance +func (instance *MSFT_HealthAction) GetPropertyMessageParameters() (value []string, err error) { + retValue, err := instance.GetProperty("MessageParameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPercentComplete sets the value of PercentComplete for the instance +func (instance *MSFT_HealthAction) SetPropertyPercentComplete(value uint16) (err error) { + return instance.SetProperty("PercentComplete", (value)) +} + +// GetPercentComplete gets the value of PercentComplete for the instance +func (instance *MSFT_HealthAction) GetPropertyPercentComplete() (value uint16, err error) { + retValue, err := instance.GetProperty("PercentComplete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReason sets the value of Reason for the instance +func (instance *MSFT_HealthAction) SetPropertyReason(value string) (err error) { + return instance.SetProperty("Reason", (value)) +} + +// GetReason gets the value of Reason for the instance +func (instance *MSFT_HealthAction) GetPropertyReason() (value string, err error) { + retValue, err := instance.GetProperty("Reason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReportingObjectId sets the value of ReportingObjectId for the instance +func (instance *MSFT_HealthAction) SetPropertyReportingObjectId(value string) (err error) { + return instance.SetProperty("ReportingObjectId", (value)) +} + +// GetReportingObjectId gets the value of ReportingObjectId for the instance +func (instance *MSFT_HealthAction) GetPropertyReportingObjectId() (value string, err error) { + retValue, err := instance.GetProperty("ReportingObjectId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReportingObjectType sets the value of ReportingObjectType for the instance +func (instance *MSFT_HealthAction) SetPropertyReportingObjectType(value string) (err error) { + return instance.SetProperty("ReportingObjectType", (value)) +} + +// GetReportingObjectType gets the value of ReportingObjectType for the instance +func (instance *MSFT_HealthAction) GetPropertyReportingObjectType() (value string, err error) { + retValue, err := instance.GetProperty("ReportingObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReportingObjectUniqueId sets the value of ReportingObjectUniqueId for the instance +func (instance *MSFT_HealthAction) SetPropertyReportingObjectUniqueId(value string) (err error) { + return instance.SetProperty("ReportingObjectUniqueId", (value)) +} + +// GetReportingObjectUniqueId gets the value of ReportingObjectUniqueId for the instance +func (instance *MSFT_HealthAction) GetPropertyReportingObjectUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("ReportingObjectUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartTime sets the value of StartTime for the instance +func (instance *MSFT_HealthAction) SetPropertyStartTime(value string) (err error) { + return instance.SetProperty("StartTime", (value)) +} + +// GetStartTime gets the value of StartTime for the instance +func (instance *MSFT_HealthAction) GetPropertyStartTime() (value string, err error) { + retValue, err := instance.GetProperty("StartTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *MSFT_HealthAction) SetPropertyState(value uint16) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *MSFT_HealthAction) GetPropertyState() (value uint16, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *MSFT_HealthAction) SetPropertyStatus(value string) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *MSFT_HealthAction) GetPropertyStatus() (value string, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *MSFT_HealthAction) SetPropertyType(value string) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *MSFT_HealthAction) GetPropertyType() (value string, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthActionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthActionEvent.go new file mode 100644 index 00000000..48d5e937 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthActionEvent.go @@ -0,0 +1,320 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_HealthActionEvent struct +type MSFT_HealthActionEvent struct { + *MSFT_StorageEvent + + // + ChangeType uint16 + + // + HealthActionId string + + // + HealthActionType string + + // + PercentComplete uint16 + + // + Reason string + + // + StartTime string + + // + State uint16 + + // + Status string + + // + StorageSubsystemUniqueId string +} + +func NewMSFT_HealthActionEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_HealthActionEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_HealthActionEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_HealthActionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_HealthActionEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_HealthActionEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +// SetChangeType sets the value of ChangeType for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyChangeType(value uint16) (err error) { + return instance.SetProperty("ChangeType", (value)) +} + +// GetChangeType gets the value of ChangeType for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyChangeType() (value uint16, err error) { + retValue, err := instance.GetProperty("ChangeType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHealthActionId sets the value of HealthActionId for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyHealthActionId(value string) (err error) { + return instance.SetProperty("HealthActionId", (value)) +} + +// GetHealthActionId gets the value of HealthActionId for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyHealthActionId() (value string, err error) { + retValue, err := instance.GetProperty("HealthActionId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthActionType sets the value of HealthActionType for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyHealthActionType(value string) (err error) { + return instance.SetProperty("HealthActionType", (value)) +} + +// GetHealthActionType gets the value of HealthActionType for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyHealthActionType() (value string, err error) { + retValue, err := instance.GetProperty("HealthActionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPercentComplete sets the value of PercentComplete for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyPercentComplete(value uint16) (err error) { + return instance.SetProperty("PercentComplete", (value)) +} + +// GetPercentComplete gets the value of PercentComplete for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyPercentComplete() (value uint16, err error) { + retValue, err := instance.GetProperty("PercentComplete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReason sets the value of Reason for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyReason(value string) (err error) { + return instance.SetProperty("Reason", (value)) +} + +// GetReason gets the value of Reason for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyReason() (value string, err error) { + retValue, err := instance.GetProperty("Reason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStartTime sets the value of StartTime for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyStartTime(value string) (err error) { + return instance.SetProperty("StartTime", (value)) +} + +// GetStartTime gets the value of StartTime for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyStartTime() (value string, err error) { + retValue, err := instance.GetProperty("StartTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyState(value uint16) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyState() (value uint16, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyStatus(value string) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyStatus() (value string, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStorageSubsystemUniqueId sets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_HealthActionEvent) SetPropertyStorageSubsystemUniqueId(value string) (err error) { + return instance.SetProperty("StorageSubsystemUniqueId", (value)) +} + +// GetStorageSubsystemUniqueId gets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_HealthActionEvent) GetPropertyStorageSubsystemUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("StorageSubsystemUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecord.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecord.go new file mode 100644 index 00000000..c40d1ae8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecord.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_HealthRecord struct +type MSFT_HealthRecord struct { + *cim.WmiInstance + + // + Name string + + // + Units uint16 +} + +func NewMSFT_HealthRecordEx1(instance *cim.WmiInstance) (newInstance *MSFT_HealthRecord, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_HealthRecord{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_HealthRecordEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_HealthRecord, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_HealthRecord{ + WmiInstance: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_HealthRecord) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_HealthRecord) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUnits sets the value of Units for the instance +func (instance *MSFT_HealthRecord) SetPropertyUnits(value uint16) (err error) { + return instance.SetProperty("Units", (value)) +} + +// GetUnits gets the value of Units for the instance +func (instance *MSFT_HealthRecord) GetPropertyUnits() (value uint16, err error) { + retValue, err := instance.GetProperty("Units") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordReal64.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordReal64.go new file mode 100644 index 00000000..697c0481 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordReal64.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_HealthRecordReal64 struct +type MSFT_HealthRecordReal64 struct { + *MSFT_HealthRecord + + // + Value float64 +} + +func NewMSFT_HealthRecordReal64Ex1(instance *cim.WmiInstance) (newInstance *MSFT_HealthRecordReal64, err error) { + tmp, err := NewMSFT_HealthRecordEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_HealthRecordReal64{ + MSFT_HealthRecord: tmp, + } + return +} + +func NewMSFT_HealthRecordReal64Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_HealthRecordReal64, err error) { + tmp, err := NewMSFT_HealthRecordEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_HealthRecordReal64{ + MSFT_HealthRecord: tmp, + } + return +} + +// SetValue sets the value of Value for the instance +func (instance *MSFT_HealthRecordReal64) SetPropertyValue(value float64) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *MSFT_HealthRecordReal64) GetPropertyValue() (value float64, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(float64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " float64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = float64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordUInt64.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordUInt64.go new file mode 100644 index 00000000..e4d50c0a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_HealthRecordUInt64.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_HealthRecordUInt64 struct +type MSFT_HealthRecordUInt64 struct { + *MSFT_HealthRecord + + // + Value uint64 +} + +func NewMSFT_HealthRecordUInt64Ex1(instance *cim.WmiInstance) (newInstance *MSFT_HealthRecordUInt64, err error) { + tmp, err := NewMSFT_HealthRecordEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_HealthRecordUInt64{ + MSFT_HealthRecord: tmp, + } + return +} + +func NewMSFT_HealthRecordUInt64Ex6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_HealthRecordUInt64, err error) { + tmp, err := NewMSFT_HealthRecordEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_HealthRecordUInt64{ + MSFT_HealthRecord: tmp, + } + return +} + +// SetValue sets the value of Value for the instance +func (instance *MSFT_HealthRecordUInt64) SetPropertyValue(value uint64) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *MSFT_HealthRecordUInt64) GetPropertyValue() (value uint64, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorId.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorId.go new file mode 100644 index 00000000..79af1e57 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorId.go @@ -0,0 +1,187 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_InitiatorId struct +type MSFT_InitiatorId struct { + *MSFT_StorageObject + + // + HostType []uint16 + + // + InitiatorAddress string + + // + OtherHostTypeDescription []string + + // + Type uint16 +} + +func NewMSFT_InitiatorIdEx1(instance *cim.WmiInstance) (newInstance *MSFT_InitiatorId, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorId{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_InitiatorIdEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_InitiatorId, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorId{ + MSFT_StorageObject: tmp, + } + return +} + +// SetHostType sets the value of HostType for the instance +func (instance *MSFT_InitiatorId) SetPropertyHostType(value []uint16) (err error) { + return instance.SetProperty("HostType", (value)) +} + +// GetHostType gets the value of HostType for the instance +func (instance *MSFT_InitiatorId) GetPropertyHostType() (value []uint16, err error) { + retValue, err := instance.GetProperty("HostType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetInitiatorAddress sets the value of InitiatorAddress for the instance +func (instance *MSFT_InitiatorId) SetPropertyInitiatorAddress(value string) (err error) { + return instance.SetProperty("InitiatorAddress", (value)) +} + +// GetInitiatorAddress gets the value of InitiatorAddress for the instance +func (instance *MSFT_InitiatorId) GetPropertyInitiatorAddress() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherHostTypeDescription sets the value of OtherHostTypeDescription for the instance +func (instance *MSFT_InitiatorId) SetPropertyOtherHostTypeDescription(value []string) (err error) { + return instance.SetProperty("OtherHostTypeDescription", (value)) +} + +// GetOtherHostTypeDescription gets the value of OtherHostTypeDescription for the instance +func (instance *MSFT_InitiatorId) GetPropertyOtherHostTypeDescription() (value []string, err error) { + retValue, err := instance.GetProperty("OtherHostTypeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetType sets the value of Type for the instance +func (instance *MSFT_InitiatorId) SetPropertyType(value uint16) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *MSFT_InitiatorId) GetPropertyType() (value uint16, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +func (instance *MSFT_InitiatorId) DeleteObject( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorIdToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorIdToVirtualDisk.go new file mode 100644 index 00000000..1f534252 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorIdToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_InitiatorIdToVirtualDisk struct +type MSFT_InitiatorIdToVirtualDisk struct { + *cim.WmiInstance + + // + InitiatorId MSFT_InitiatorId + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_InitiatorIdToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_InitiatorIdToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_InitiatorIdToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_InitiatorIdToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_InitiatorIdToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorIdToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorId sets the value of InitiatorId for the instance +func (instance *MSFT_InitiatorIdToVirtualDisk) SetPropertyInitiatorId(value MSFT_InitiatorId) (err error) { + return instance.SetProperty("InitiatorId", (value)) +} + +// GetInitiatorId gets the value of InitiatorId for the instance +func (instance *MSFT_InitiatorIdToVirtualDisk) GetPropertyInitiatorId() (value MSFT_InitiatorId, err error) { + retValue, err := instance.GetProperty("InitiatorId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_InitiatorId) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_InitiatorId is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_InitiatorId(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_InitiatorIdToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_InitiatorIdToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPort.go new file mode 100644 index 00000000..d911657f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPort.go @@ -0,0 +1,372 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_InitiatorPort struct +type MSFT_InitiatorPort struct { + *cim.WmiInstance + + // + AlternateNodeAddress []string + + // + AlternatePortAddress []string + + // + ConnectionType uint16 + + // + InstanceName string + + // + NodeAddress string + + // + ObjectId string + + // + OperationalStatus []uint16 + + // + OtherConnectionTypeDescription string + + // + PortAddress string + + // + PortType uint16 +} + +func NewMSFT_InitiatorPortEx1(instance *cim.WmiInstance) (newInstance *MSFT_InitiatorPort, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPort{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_InitiatorPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_InitiatorPort, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPort{ + WmiInstance: tmp, + } + return +} + +// SetAlternateNodeAddress sets the value of AlternateNodeAddress for the instance +func (instance *MSFT_InitiatorPort) SetPropertyAlternateNodeAddress(value []string) (err error) { + return instance.SetProperty("AlternateNodeAddress", (value)) +} + +// GetAlternateNodeAddress gets the value of AlternateNodeAddress for the instance +func (instance *MSFT_InitiatorPort) GetPropertyAlternateNodeAddress() (value []string, err error) { + retValue, err := instance.GetProperty("AlternateNodeAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetAlternatePortAddress sets the value of AlternatePortAddress for the instance +func (instance *MSFT_InitiatorPort) SetPropertyAlternatePortAddress(value []string) (err error) { + return instance.SetProperty("AlternatePortAddress", (value)) +} + +// GetAlternatePortAddress gets the value of AlternatePortAddress for the instance +func (instance *MSFT_InitiatorPort) GetPropertyAlternatePortAddress() (value []string, err error) { + retValue, err := instance.GetProperty("AlternatePortAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetConnectionType sets the value of ConnectionType for the instance +func (instance *MSFT_InitiatorPort) SetPropertyConnectionType(value uint16) (err error) { + return instance.SetProperty("ConnectionType", (value)) +} + +// GetConnectionType gets the value of ConnectionType for the instance +func (instance *MSFT_InitiatorPort) GetPropertyConnectionType() (value uint16, err error) { + retValue, err := instance.GetProperty("ConnectionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInstanceName sets the value of InstanceName for the instance +func (instance *MSFT_InitiatorPort) SetPropertyInstanceName(value string) (err error) { + return instance.SetProperty("InstanceName", (value)) +} + +// GetInstanceName gets the value of InstanceName for the instance +func (instance *MSFT_InitiatorPort) GetPropertyInstanceName() (value string, err error) { + retValue, err := instance.GetProperty("InstanceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNodeAddress sets the value of NodeAddress for the instance +func (instance *MSFT_InitiatorPort) SetPropertyNodeAddress(value string) (err error) { + return instance.SetProperty("NodeAddress", (value)) +} + +// GetNodeAddress gets the value of NodeAddress for the instance +func (instance *MSFT_InitiatorPort) GetPropertyNodeAddress() (value string, err error) { + retValue, err := instance.GetProperty("NodeAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetObjectId sets the value of ObjectId for the instance +func (instance *MSFT_InitiatorPort) SetPropertyObjectId(value string) (err error) { + return instance.SetProperty("ObjectId", (value)) +} + +// GetObjectId gets the value of ObjectId for the instance +func (instance *MSFT_InitiatorPort) GetPropertyObjectId() (value string, err error) { + retValue, err := instance.GetProperty("ObjectId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_InitiatorPort) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_InitiatorPort) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherConnectionTypeDescription sets the value of OtherConnectionTypeDescription for the instance +func (instance *MSFT_InitiatorPort) SetPropertyOtherConnectionTypeDescription(value string) (err error) { + return instance.SetProperty("OtherConnectionTypeDescription", (value)) +} + +// GetOtherConnectionTypeDescription gets the value of OtherConnectionTypeDescription for the instance +func (instance *MSFT_InitiatorPort) GetPropertyOtherConnectionTypeDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherConnectionTypeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortAddress sets the value of PortAddress for the instance +func (instance *MSFT_InitiatorPort) SetPropertyPortAddress(value string) (err error) { + return instance.SetProperty("PortAddress", (value)) +} + +// GetPortAddress gets the value of PortAddress for the instance +func (instance *MSFT_InitiatorPort) GetPropertyPortAddress() (value string, err error) { + retValue, err := instance.GetProperty("PortAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortType sets the value of PortType for the instance +func (instance *MSFT_InitiatorPort) SetPropertyPortType(value uint16) (err error) { + return instance.SetProperty("PortType", (value)) +} + +// GetPortType gets the value of PortType for the instance +func (instance *MSFT_InitiatorPort) GetPropertyPortType() (value uint16, err error) { + retValue, err := instance.GetProperty("PortType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// + +// +// +func (instance *MSFT_InitiatorPort) SetNodeAddress( /* IN */ NodeAddress string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetNodeAddress", NodeAddress) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSIConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSIConnection.go new file mode 100644 index 00000000..c914afd5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSIConnection.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_InitiatorPortToiSCSIConnection struct +type MSFT_InitiatorPortToiSCSIConnection struct { + *cim.WmiInstance + + // + InitiatorPort MSFT_InitiatorPort + + // + iSCSIConnection MSFT_iSCSIConnection +} + +func NewMSFT_InitiatorPortToiSCSIConnectionEx1(instance *cim.WmiInstance) (newInstance *MSFT_InitiatorPortToiSCSIConnection, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPortToiSCSIConnection{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_InitiatorPortToiSCSIConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_InitiatorPortToiSCSIConnection, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPortToiSCSIConnection{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorPort sets the value of InitiatorPort for the instance +func (instance *MSFT_InitiatorPortToiSCSIConnection) SetPropertyInitiatorPort(value MSFT_InitiatorPort) (err error) { + return instance.SetProperty("InitiatorPort", (value)) +} + +// GetInitiatorPort gets the value of InitiatorPort for the instance +func (instance *MSFT_InitiatorPortToiSCSIConnection) GetPropertyInitiatorPort() (value MSFT_InitiatorPort, err error) { + retValue, err := instance.GetProperty("InitiatorPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_InitiatorPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_InitiatorPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_InitiatorPort(valuetmp) + + return +} + +// SetiSCSIConnection sets the value of iSCSIConnection for the instance +func (instance *MSFT_InitiatorPortToiSCSIConnection) SetPropertyiSCSIConnection(value MSFT_iSCSIConnection) (err error) { + return instance.SetProperty("iSCSIConnection", (value)) +} + +// GetiSCSIConnection gets the value of iSCSIConnection for the instance +func (instance *MSFT_InitiatorPortToiSCSIConnection) GetPropertyiSCSIConnection() (value MSFT_iSCSIConnection, err error) { + retValue, err := instance.GetProperty("iSCSIConnection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSIConnection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSIConnection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSIConnection(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSISession.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSISession.go new file mode 100644 index 00000000..3743e41c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSISession.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_InitiatorPortToiSCSISession struct +type MSFT_InitiatorPortToiSCSISession struct { + *cim.WmiInstance + + // + InitiatorPort MSFT_InitiatorPort + + // + iSCSISession MSFT_iSCSISession +} + +func NewMSFT_InitiatorPortToiSCSISessionEx1(instance *cim.WmiInstance) (newInstance *MSFT_InitiatorPortToiSCSISession, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPortToiSCSISession{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_InitiatorPortToiSCSISessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_InitiatorPortToiSCSISession, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPortToiSCSISession{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorPort sets the value of InitiatorPort for the instance +func (instance *MSFT_InitiatorPortToiSCSISession) SetPropertyInitiatorPort(value MSFT_InitiatorPort) (err error) { + return instance.SetProperty("InitiatorPort", (value)) +} + +// GetInitiatorPort gets the value of InitiatorPort for the instance +func (instance *MSFT_InitiatorPortToiSCSISession) GetPropertyInitiatorPort() (value MSFT_InitiatorPort, err error) { + retValue, err := instance.GetProperty("InitiatorPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_InitiatorPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_InitiatorPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_InitiatorPort(valuetmp) + + return +} + +// SetiSCSISession sets the value of iSCSISession for the instance +func (instance *MSFT_InitiatorPortToiSCSISession) SetPropertyiSCSISession(value MSFT_iSCSISession) (err error) { + return instance.SetProperty("iSCSISession", (value)) +} + +// GetiSCSISession gets the value of iSCSISession for the instance +func (instance *MSFT_InitiatorPortToiSCSISession) GetPropertyiSCSISession() (value MSFT_iSCSISession, err error) { + retValue, err := instance.GetProperty("iSCSISession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSISession) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSISession is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSISession(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSITarget.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSITarget.go new file mode 100644 index 00000000..f39fa979 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_InitiatorPortToiSCSITarget.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_InitiatorPortToiSCSITarget struct +type MSFT_InitiatorPortToiSCSITarget struct { + *cim.WmiInstance + + // + InitiatorPort MSFT_InitiatorPort + + // + iSCSITarget MSFT_iSCSITarget +} + +func NewMSFT_InitiatorPortToiSCSITargetEx1(instance *cim.WmiInstance) (newInstance *MSFT_InitiatorPortToiSCSITarget, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPortToiSCSITarget{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_InitiatorPortToiSCSITargetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_InitiatorPortToiSCSITarget, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_InitiatorPortToiSCSITarget{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorPort sets the value of InitiatorPort for the instance +func (instance *MSFT_InitiatorPortToiSCSITarget) SetPropertyInitiatorPort(value MSFT_InitiatorPort) (err error) { + return instance.SetProperty("InitiatorPort", (value)) +} + +// GetInitiatorPort gets the value of InitiatorPort for the instance +func (instance *MSFT_InitiatorPortToiSCSITarget) GetPropertyInitiatorPort() (value MSFT_InitiatorPort, err error) { + retValue, err := instance.GetProperty("InitiatorPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_InitiatorPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_InitiatorPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_InitiatorPort(valuetmp) + + return +} + +// SetiSCSITarget sets the value of iSCSITarget for the instance +func (instance *MSFT_InitiatorPortToiSCSITarget) SetPropertyiSCSITarget(value MSFT_iSCSITarget) (err error) { + return instance.SetProperty("iSCSITarget", (value)) +} + +// GetiSCSITarget gets the value of iSCSITarget for the instance +func (instance *MSFT_InitiatorPortToiSCSITarget) GetPropertyiSCSITarget() (value MSFT_iSCSITarget, err error) { + retValue, err := instance.GetProperty("iSCSITarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITarget) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITarget is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITarget(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSet.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSet.go new file mode 100644 index 00000000..66fba832 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSet.go @@ -0,0 +1,351 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_MaskingSet struct +type MSFT_MaskingSet struct { + *MSFT_StorageObject + + // + FriendlyName string + + // + HostType uint16 + + // + Name string +} + +func NewMSFT_MaskingSetEx1(instance *cim.WmiInstance) (newInstance *MSFT_MaskingSet, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_MaskingSet{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_MaskingSetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_MaskingSet, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_MaskingSet{ + MSFT_StorageObject: tmp, + } + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_MaskingSet) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_MaskingSet) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHostType sets the value of HostType for the instance +func (instance *MSFT_MaskingSet) SetPropertyHostType(value uint16) (err error) { + return instance.SetProperty("HostType", (value)) +} + +// GetHostType gets the value of HostType for the instance +func (instance *MSFT_MaskingSet) GetPropertyHostType() (value uint16, err error) { + retValue, err := instance.GetProperty("HostType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_MaskingSet) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_MaskingSet) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_MaskingSet) AddInitiatorId( /* IN */ InitiatorIds []string, + /* IN */ HostType uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddInitiatorId", InitiatorIds, HostType, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_MaskingSet) RemoveInitiatorId( /* IN */ InitiatorIds []string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveInitiatorId", InitiatorIds, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_MaskingSet) AddTargetPort( /* IN */ TargetPortAddresses []string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddTargetPort", TargetPortAddresses, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_MaskingSet) RemoveTargetPort( /* IN */ TargetPortAddresses []string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveTargetPort", TargetPortAddresses, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +// +// +func (instance *MSFT_MaskingSet) AddVirtualDisk( /* IN */ VirtualDiskNames []string, + /* IN */ DeviceNumbers []string, + /* IN */ DeviceAccesses []uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddVirtualDisk", VirtualDiskNames, DeviceNumbers, DeviceAccesses, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_MaskingSet) RemoveVirtualDisk( /* IN */ VirtualDiskNames []string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveVirtualDisk", VirtualDiskNames, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_MaskingSet) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_MaskingSet) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_MaskingSet) GetSecurityDescriptor( /* OUT */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_MaskingSet) SetSecurityDescriptor( /* IN */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetSecurityDescriptor", SecurityDescriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToInitiatorId.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToInitiatorId.go new file mode 100644 index 00000000..e11cd5ab --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToInitiatorId.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_MaskingSetToInitiatorId struct +type MSFT_MaskingSetToInitiatorId struct { + *cim.WmiInstance + + // + InitiatorId MSFT_InitiatorId + + // + MaskingSet MSFT_MaskingSet +} + +func NewMSFT_MaskingSetToInitiatorIdEx1(instance *cim.WmiInstance) (newInstance *MSFT_MaskingSetToInitiatorId, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_MaskingSetToInitiatorId{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_MaskingSetToInitiatorIdEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_MaskingSetToInitiatorId, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_MaskingSetToInitiatorId{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorId sets the value of InitiatorId for the instance +func (instance *MSFT_MaskingSetToInitiatorId) SetPropertyInitiatorId(value MSFT_InitiatorId) (err error) { + return instance.SetProperty("InitiatorId", (value)) +} + +// GetInitiatorId gets the value of InitiatorId for the instance +func (instance *MSFT_MaskingSetToInitiatorId) GetPropertyInitiatorId() (value MSFT_InitiatorId, err error) { + retValue, err := instance.GetProperty("InitiatorId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_InitiatorId) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_InitiatorId is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_InitiatorId(valuetmp) + + return +} + +// SetMaskingSet sets the value of MaskingSet for the instance +func (instance *MSFT_MaskingSetToInitiatorId) SetPropertyMaskingSet(value MSFT_MaskingSet) (err error) { + return instance.SetProperty("MaskingSet", (value)) +} + +// GetMaskingSet gets the value of MaskingSet for the instance +func (instance *MSFT_MaskingSetToInitiatorId) GetPropertyMaskingSet() (value MSFT_MaskingSet, err error) { + retValue, err := instance.GetProperty("MaskingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_MaskingSet) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_MaskingSet is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_MaskingSet(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToTargetPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToTargetPort.go new file mode 100644 index 00000000..851ef30b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToTargetPort.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_MaskingSetToTargetPort struct +type MSFT_MaskingSetToTargetPort struct { + *cim.WmiInstance + + // + MaskingSet MSFT_MaskingSet + + // + TargetPort MSFT_TargetPort +} + +func NewMSFT_MaskingSetToTargetPortEx1(instance *cim.WmiInstance) (newInstance *MSFT_MaskingSetToTargetPort, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_MaskingSetToTargetPort{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_MaskingSetToTargetPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_MaskingSetToTargetPort, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_MaskingSetToTargetPort{ + WmiInstance: tmp, + } + return +} + +// SetMaskingSet sets the value of MaskingSet for the instance +func (instance *MSFT_MaskingSetToTargetPort) SetPropertyMaskingSet(value MSFT_MaskingSet) (err error) { + return instance.SetProperty("MaskingSet", (value)) +} + +// GetMaskingSet gets the value of MaskingSet for the instance +func (instance *MSFT_MaskingSetToTargetPort) GetPropertyMaskingSet() (value MSFT_MaskingSet, err error) { + retValue, err := instance.GetProperty("MaskingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_MaskingSet) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_MaskingSet is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_MaskingSet(valuetmp) + + return +} + +// SetTargetPort sets the value of TargetPort for the instance +func (instance *MSFT_MaskingSetToTargetPort) SetPropertyTargetPort(value MSFT_TargetPort) (err error) { + return instance.SetProperty("TargetPort", (value)) +} + +// GetTargetPort gets the value of TargetPort for the instance +func (instance *MSFT_MaskingSetToTargetPort) GetPropertyTargetPort() (value MSFT_TargetPort, err error) { + retValue, err := instance.GetProperty("TargetPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_TargetPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_TargetPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_TargetPort(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToVirtualDisk.go new file mode 100644 index 00000000..5cf6b88b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_MaskingSetToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_MaskingSetToVirtualDisk struct +type MSFT_MaskingSetToVirtualDisk struct { + *cim.WmiInstance + + // + MaskingSet MSFT_MaskingSet + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_MaskingSetToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_MaskingSetToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_MaskingSetToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_MaskingSetToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_MaskingSetToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_MaskingSetToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetMaskingSet sets the value of MaskingSet for the instance +func (instance *MSFT_MaskingSetToVirtualDisk) SetPropertyMaskingSet(value MSFT_MaskingSet) (err error) { + return instance.SetProperty("MaskingSet", (value)) +} + +// GetMaskingSet gets the value of MaskingSet for the instance +func (instance *MSFT_MaskingSetToVirtualDisk) GetPropertyMaskingSet() (value MSFT_MaskingSet, err error) { + retValue, err := instance.GetProperty("MaskingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_MaskingSet) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_MaskingSet is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_MaskingSet(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_MaskingSetToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_MaskingSetToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_OffloadDataTransferSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_OffloadDataTransferSetting.go new file mode 100644 index 00000000..485b0f26 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_OffloadDataTransferSetting.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_OffloadDataTransferSetting struct +type MSFT_OffloadDataTransferSetting struct { + *MSFT_StorageObject + + // + NumberOfTokensInUse uint32 + + // + NumberOfTokensMax uint32 + + // + OptimalDataTokenSize uint32 + + // + SupportInterSubsystem bool +} + +func NewMSFT_OffloadDataTransferSettingEx1(instance *cim.WmiInstance) (newInstance *MSFT_OffloadDataTransferSetting, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_OffloadDataTransferSetting{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_OffloadDataTransferSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_OffloadDataTransferSetting, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_OffloadDataTransferSetting{ + MSFT_StorageObject: tmp, + } + return +} + +// SetNumberOfTokensInUse sets the value of NumberOfTokensInUse for the instance +func (instance *MSFT_OffloadDataTransferSetting) SetPropertyNumberOfTokensInUse(value uint32) (err error) { + return instance.SetProperty("NumberOfTokensInUse", (value)) +} + +// GetNumberOfTokensInUse gets the value of NumberOfTokensInUse for the instance +func (instance *MSFT_OffloadDataTransferSetting) GetPropertyNumberOfTokensInUse() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfTokensInUse") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetNumberOfTokensMax sets the value of NumberOfTokensMax for the instance +func (instance *MSFT_OffloadDataTransferSetting) SetPropertyNumberOfTokensMax(value uint32) (err error) { + return instance.SetProperty("NumberOfTokensMax", (value)) +} + +// GetNumberOfTokensMax gets the value of NumberOfTokensMax for the instance +func (instance *MSFT_OffloadDataTransferSetting) GetPropertyNumberOfTokensMax() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfTokensMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOptimalDataTokenSize sets the value of OptimalDataTokenSize for the instance +func (instance *MSFT_OffloadDataTransferSetting) SetPropertyOptimalDataTokenSize(value uint32) (err error) { + return instance.SetProperty("OptimalDataTokenSize", (value)) +} + +// GetOptimalDataTokenSize gets the value of OptimalDataTokenSize for the instance +func (instance *MSFT_OffloadDataTransferSetting) GetPropertyOptimalDataTokenSize() (value uint32, err error) { + retValue, err := instance.GetProperty("OptimalDataTokenSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSupportInterSubsystem sets the value of SupportInterSubsystem for the instance +func (instance *MSFT_OffloadDataTransferSetting) SetPropertySupportInterSubsystem(value bool) (err error) { + return instance.SetProperty("SupportInterSubsystem", (value)) +} + +// GetSupportInterSubsystem gets the value of SupportInterSubsystem for the instance +func (instance *MSFT_OffloadDataTransferSetting) GetPropertySupportInterSubsystem() (value bool, err error) { + retValue, err := instance.GetProperty("SupportInterSubsystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Partition.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Partition.go new file mode 100644 index 00000000..b07ae267 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Partition.go @@ -0,0 +1,850 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_Partition struct +type MSFT_Partition struct { + *MSFT_StorageObject + + // + AccessPaths []string + + // + DiskId string + + // + DiskNumber uint32 + + // + DriveLetter byte + + // + GptType string + + // + Guid string + + // + IsActive bool + + // + IsBoot bool + + // + IsDAX bool + + // + IsHidden bool + + // + IsOffline bool + + // + IsReadOnly bool + + // + IsShadowCopy bool + + // + IsSystem bool + + // + MbrType uint16 + + // + NoDefaultDriveLetter bool + + // + Offset uint64 + + // + OperationalStatus uint16 + + // + PartitionNumber uint32 + + // + Size uint64 + + // + TransitionState uint16 +} + +func NewMSFT_PartitionEx1(instance *cim.WmiInstance) (newInstance *MSFT_Partition, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_Partition{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_PartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_Partition, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_Partition{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAccessPaths sets the value of AccessPaths for the instance +func (instance *MSFT_Partition) SetPropertyAccessPaths(value []string) (err error) { + return instance.SetProperty("AccessPaths", (value)) +} + +// GetAccessPaths gets the value of AccessPaths for the instance +func (instance *MSFT_Partition) GetPropertyAccessPaths() (value []string, err error) { + retValue, err := instance.GetProperty("AccessPaths") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetDiskId sets the value of DiskId for the instance +func (instance *MSFT_Partition) SetPropertyDiskId(value string) (err error) { + return instance.SetProperty("DiskId", (value)) +} + +// GetDiskId gets the value of DiskId for the instance +func (instance *MSFT_Partition) GetPropertyDiskId() (value string, err error) { + retValue, err := instance.GetProperty("DiskId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetDiskNumber sets the value of DiskNumber for the instance +func (instance *MSFT_Partition) SetPropertyDiskNumber(value uint32) (err error) { + return instance.SetProperty("DiskNumber", (value)) +} + +// GetDiskNumber gets the value of DiskNumber for the instance +func (instance *MSFT_Partition) GetPropertyDiskNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDriveLetter sets the value of DriveLetter for the instance +func (instance *MSFT_Partition) SetPropertyDriveLetter(value byte) (err error) { + return instance.SetProperty("DriveLetter", (value)) +} + +// GetDriveLetter gets the value of DriveLetter for the instance +func (instance *MSFT_Partition) GetPropertyDriveLetter() (value byte, err error) { + retValue, err := instance.GetProperty("DriveLetter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(byte) + if !ok { + err = errors.Wrapf(errors.InvalidType, " byte is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = byte(valuetmp) + + return +} + +// SetGptType sets the value of GptType for the instance +func (instance *MSFT_Partition) SetPropertyGptType(value string) (err error) { + return instance.SetProperty("GptType", (value)) +} + +// GetGptType gets the value of GptType for the instance +func (instance *MSFT_Partition) GetPropertyGptType() (value string, err error) { + retValue, err := instance.GetProperty("GptType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetGuid sets the value of Guid for the instance +func (instance *MSFT_Partition) SetPropertyGuid(value string) (err error) { + return instance.SetProperty("Guid", (value)) +} + +// GetGuid gets the value of Guid for the instance +func (instance *MSFT_Partition) GetPropertyGuid() (value string, err error) { + retValue, err := instance.GetProperty("Guid") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsActive sets the value of IsActive for the instance +func (instance *MSFT_Partition) SetPropertyIsActive(value bool) (err error) { + return instance.SetProperty("IsActive", (value)) +} + +// GetIsActive gets the value of IsActive for the instance +func (instance *MSFT_Partition) GetPropertyIsActive() (value bool, err error) { + retValue, err := instance.GetProperty("IsActive") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsBoot sets the value of IsBoot for the instance +func (instance *MSFT_Partition) SetPropertyIsBoot(value bool) (err error) { + return instance.SetProperty("IsBoot", (value)) +} + +// GetIsBoot gets the value of IsBoot for the instance +func (instance *MSFT_Partition) GetPropertyIsBoot() (value bool, err error) { + retValue, err := instance.GetProperty("IsBoot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsDAX sets the value of IsDAX for the instance +func (instance *MSFT_Partition) SetPropertyIsDAX(value bool) (err error) { + return instance.SetProperty("IsDAX", (value)) +} + +// GetIsDAX gets the value of IsDAX for the instance +func (instance *MSFT_Partition) GetPropertyIsDAX() (value bool, err error) { + retValue, err := instance.GetProperty("IsDAX") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsHidden sets the value of IsHidden for the instance +func (instance *MSFT_Partition) SetPropertyIsHidden(value bool) (err error) { + return instance.SetProperty("IsHidden", (value)) +} + +// GetIsHidden gets the value of IsHidden for the instance +func (instance *MSFT_Partition) GetPropertyIsHidden() (value bool, err error) { + retValue, err := instance.GetProperty("IsHidden") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsOffline sets the value of IsOffline for the instance +func (instance *MSFT_Partition) SetPropertyIsOffline(value bool) (err error) { + return instance.SetProperty("IsOffline", (value)) +} + +// GetIsOffline gets the value of IsOffline for the instance +func (instance *MSFT_Partition) GetPropertyIsOffline() (value bool, err error) { + retValue, err := instance.GetProperty("IsOffline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsReadOnly sets the value of IsReadOnly for the instance +func (instance *MSFT_Partition) SetPropertyIsReadOnly(value bool) (err error) { + return instance.SetProperty("IsReadOnly", (value)) +} + +// GetIsReadOnly gets the value of IsReadOnly for the instance +func (instance *MSFT_Partition) GetPropertyIsReadOnly() (value bool, err error) { + retValue, err := instance.GetProperty("IsReadOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsShadowCopy sets the value of IsShadowCopy for the instance +func (instance *MSFT_Partition) SetPropertyIsShadowCopy(value bool) (err error) { + return instance.SetProperty("IsShadowCopy", (value)) +} + +// GetIsShadowCopy gets the value of IsShadowCopy for the instance +func (instance *MSFT_Partition) GetPropertyIsShadowCopy() (value bool, err error) { + retValue, err := instance.GetProperty("IsShadowCopy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsSystem sets the value of IsSystem for the instance +func (instance *MSFT_Partition) SetPropertyIsSystem(value bool) (err error) { + return instance.SetProperty("IsSystem", (value)) +} + +// GetIsSystem gets the value of IsSystem for the instance +func (instance *MSFT_Partition) GetPropertyIsSystem() (value bool, err error) { + retValue, err := instance.GetProperty("IsSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMbrType sets the value of MbrType for the instance +func (instance *MSFT_Partition) SetPropertyMbrType(value uint16) (err error) { + return instance.SetProperty("MbrType", (value)) +} + +// GetMbrType gets the value of MbrType for the instance +func (instance *MSFT_Partition) GetPropertyMbrType() (value uint16, err error) { + retValue, err := instance.GetProperty("MbrType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNoDefaultDriveLetter sets the value of NoDefaultDriveLetter for the instance +func (instance *MSFT_Partition) SetPropertyNoDefaultDriveLetter(value bool) (err error) { + return instance.SetProperty("NoDefaultDriveLetter", (value)) +} + +// GetNoDefaultDriveLetter gets the value of NoDefaultDriveLetter for the instance +func (instance *MSFT_Partition) GetPropertyNoDefaultDriveLetter() (value bool, err error) { + retValue, err := instance.GetProperty("NoDefaultDriveLetter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOffset sets the value of Offset for the instance +func (instance *MSFT_Partition) SetPropertyOffset(value uint64) (err error) { + return instance.SetProperty("Offset", (value)) +} + +// GetOffset gets the value of Offset for the instance +func (instance *MSFT_Partition) GetPropertyOffset() (value uint64, err error) { + retValue, err := instance.GetProperty("Offset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_Partition) SetPropertyOperationalStatus(value uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_Partition) GetPropertyOperationalStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPartitionNumber sets the value of PartitionNumber for the instance +func (instance *MSFT_Partition) SetPropertyPartitionNumber(value uint32) (err error) { + return instance.SetProperty("PartitionNumber", (value)) +} + +// GetPartitionNumber gets the value of PartitionNumber for the instance +func (instance *MSFT_Partition) GetPropertyPartitionNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("PartitionNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_Partition) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_Partition) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTransitionState sets the value of TransitionState for the instance +func (instance *MSFT_Partition) SetPropertyTransitionState(value uint16) (err error) { + return instance.SetProperty("TransitionState", (value)) +} + +// GetTransitionState gets the value of TransitionState for the instance +func (instance *MSFT_Partition) GetPropertyTransitionState() (value uint16, err error) { + retValue, err := instance.GetProperty("TransitionState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +func (instance *MSFT_Partition) DeleteObject( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_Partition) GetAccessPaths( /* OUT */ AccessPaths []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetAccessPaths") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_Partition) AddAccessPath( /* IN */ AccessPath string, + /* IN */ AssignDriveLetter bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddAccessPath", AccessPath, AssignDriveLetter) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Partition) RemoveAccessPath( /* IN */ AccessPath string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveAccessPath", AccessPath) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Partition) Resize( /* IN */ Size uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Resize", Size) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +func (instance *MSFT_Partition) GetSupportedSize( /* OUT */ SizeMin uint64, + /* OUT */ SizeMax uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedSize") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_Partition) Online( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Online") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_Partition) Offline( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Offline") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_Partition) SetAttributes( /* IN */ IsReadOnly bool, + /* IN */ NoDefaultDriveLetter bool, + /* IN */ IsActive bool, + /* IN */ IsHidden bool, + /* IN */ IsShadowCopy bool, + /* IN */ IsDAX bool, + /* IN */ MbrType uint16, + /* IN */ GptType string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", IsReadOnly, NoDefaultDriveLetter, IsActive, IsHidden, IsShadowCopy, IsDAX, MbrType, GptType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToReplicaPeer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToReplicaPeer.go new file mode 100644 index 00000000..d4b9dfcf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToReplicaPeer.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_PartitionToReplicaPeer struct +type MSFT_PartitionToReplicaPeer struct { + *MSFT_Synchronized + + // + Partition MSFT_Partition + + // + ReplicaPeer MSFT_ReplicaPeer +} + +func NewMSFT_PartitionToReplicaPeerEx1(instance *cim.WmiInstance) (newInstance *MSFT_PartitionToReplicaPeer, err error) { + tmp, err := NewMSFT_SynchronizedEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_PartitionToReplicaPeer{ + MSFT_Synchronized: tmp, + } + return +} + +func NewMSFT_PartitionToReplicaPeerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_PartitionToReplicaPeer, err error) { + tmp, err := NewMSFT_SynchronizedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_PartitionToReplicaPeer{ + MSFT_Synchronized: tmp, + } + return +} + +// SetPartition sets the value of Partition for the instance +func (instance *MSFT_PartitionToReplicaPeer) SetPropertyPartition(value MSFT_Partition) (err error) { + return instance.SetProperty("Partition", (value)) +} + +// GetPartition gets the value of Partition for the instance +func (instance *MSFT_PartitionToReplicaPeer) GetPropertyPartition() (value MSFT_Partition, err error) { + retValue, err := instance.GetProperty("Partition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Partition) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Partition is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Partition(valuetmp) + + return +} + +// SetReplicaPeer sets the value of ReplicaPeer for the instance +func (instance *MSFT_PartitionToReplicaPeer) SetPropertyReplicaPeer(value MSFT_ReplicaPeer) (err error) { + return instance.SetProperty("ReplicaPeer", (value)) +} + +// GetReplicaPeer gets the value of ReplicaPeer for the instance +func (instance *MSFT_PartitionToReplicaPeer) GetPropertyReplicaPeer() (value MSFT_ReplicaPeer, err error) { + retValue, err := instance.GetProperty("ReplicaPeer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicaPeer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicaPeer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicaPeer(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToVolume.go new file mode 100644 index 00000000..c076fbff --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PartitionToVolume.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_PartitionToVolume struct +type MSFT_PartitionToVolume struct { + *cim.WmiInstance + + // + Partition MSFT_Partition + + // + Volume MSFT_Volume +} + +func NewMSFT_PartitionToVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_PartitionToVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_PartitionToVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_PartitionToVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_PartitionToVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_PartitionToVolume{ + WmiInstance: tmp, + } + return +} + +// SetPartition sets the value of Partition for the instance +func (instance *MSFT_PartitionToVolume) SetPropertyPartition(value MSFT_Partition) (err error) { + return instance.SetProperty("Partition", (value)) +} + +// GetPartition gets the value of Partition for the instance +func (instance *MSFT_PartitionToVolume) GetPropertyPartition() (value MSFT_Partition, err error) { + retValue, err := instance.GetProperty("Partition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Partition) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Partition is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Partition(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_PartitionToVolume) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_PartitionToVolume) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDisk.go new file mode 100644 index 00000000..beb38049 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDisk.go @@ -0,0 +1,985 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_PhysicalDisk struct +type MSFT_PhysicalDisk struct { + *MSFT_StorageFaultDomain + + // + AdapterSerialNumber string + + // + AllocatedSize uint64 + + // + BusType uint16 + + // + CannotPoolReason []uint16 + + // + CanPool bool + + // + DeviceId string + + // + EnclosureNumber uint16 + + // + FirmwareVersion string + + // + IsIndicationEnabled bool + + // + IsPartial bool + + // + LogicalSectorSize uint64 + + // + MediaType uint16 + + // + OtherCannotPoolReasonDescription string + + // + PartNumber string + + // + PhysicalSectorSize uint64 + + // + Size uint64 + + // + SlotNumber uint16 + + // + SoftwareVersion string + + // + SpindleSpeed uint32 + + // + StoragePoolUniqueId string + + // + SupportedUsages []uint16 + + // + UniqueIdFormat uint16 + + // + Usage uint16 + + // + VirtualDiskFootprint uint64 +} + +func NewMSFT_PhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_PhysicalDisk, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_PhysicalDisk{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +func NewMSFT_PhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_PhysicalDisk, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_PhysicalDisk{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +// SetAdapterSerialNumber sets the value of AdapterSerialNumber for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyAdapterSerialNumber(value string) (err error) { + return instance.SetProperty("AdapterSerialNumber", (value)) +} + +// GetAdapterSerialNumber gets the value of AdapterSerialNumber for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyAdapterSerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("AdapterSerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetAllocatedSize sets the value of AllocatedSize for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyAllocatedSize(value uint64) (err error) { + return instance.SetProperty("AllocatedSize", (value)) +} + +// GetAllocatedSize gets the value of AllocatedSize for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyAllocatedSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocatedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBusType sets the value of BusType for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyBusType(value uint16) (err error) { + return instance.SetProperty("BusType", (value)) +} + +// GetBusType gets the value of BusType for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyBusType() (value uint16, err error) { + retValue, err := instance.GetProperty("BusType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCannotPoolReason sets the value of CannotPoolReason for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyCannotPoolReason(value []uint16) (err error) { + return instance.SetProperty("CannotPoolReason", (value)) +} + +// GetCannotPoolReason gets the value of CannotPoolReason for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyCannotPoolReason() (value []uint16, err error) { + retValue, err := instance.GetProperty("CannotPoolReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetCanPool sets the value of CanPool for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyCanPool(value bool) (err error) { + return instance.SetProperty("CanPool", (value)) +} + +// GetCanPool gets the value of CanPool for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyCanPool() (value bool, err error) { + retValue, err := instance.GetProperty("CanPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDeviceId sets the value of DeviceId for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyDeviceId(value string) (err error) { + return instance.SetProperty("DeviceId", (value)) +} + +// GetDeviceId gets the value of DeviceId for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyDeviceId() (value string, err error) { + retValue, err := instance.GetProperty("DeviceId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEnclosureNumber sets the value of EnclosureNumber for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyEnclosureNumber(value uint16) (err error) { + return instance.SetProperty("EnclosureNumber", (value)) +} + +// GetEnclosureNumber gets the value of EnclosureNumber for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyEnclosureNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("EnclosureNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFirmwareVersion sets the value of FirmwareVersion for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyFirmwareVersion(value string) (err error) { + return instance.SetProperty("FirmwareVersion", (value)) +} + +// GetFirmwareVersion gets the value of FirmwareVersion for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyFirmwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("FirmwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsIndicationEnabled sets the value of IsIndicationEnabled for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyIsIndicationEnabled(value bool) (err error) { + return instance.SetProperty("IsIndicationEnabled", (value)) +} + +// GetIsIndicationEnabled gets the value of IsIndicationEnabled for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyIsIndicationEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IsIndicationEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsPartial sets the value of IsPartial for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyIsPartial(value bool) (err error) { + return instance.SetProperty("IsPartial", (value)) +} + +// GetIsPartial gets the value of IsPartial for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyIsPartial() (value bool, err error) { + retValue, err := instance.GetProperty("IsPartial") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLogicalSectorSize sets the value of LogicalSectorSize for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyLogicalSectorSize(value uint64) (err error) { + return instance.SetProperty("LogicalSectorSize", (value)) +} + +// GetLogicalSectorSize gets the value of LogicalSectorSize for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyLogicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyMediaType(value uint16) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyMediaType() (value uint16, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOtherCannotPoolReasonDescription sets the value of OtherCannotPoolReasonDescription for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyOtherCannotPoolReasonDescription(value string) (err error) { + return instance.SetProperty("OtherCannotPoolReasonDescription", (value)) +} + +// GetOtherCannotPoolReasonDescription gets the value of OtherCannotPoolReasonDescription for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyOtherCannotPoolReasonDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherCannotPoolReasonDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPartNumber sets the value of PartNumber for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyPartNumber(value string) (err error) { + return instance.SetProperty("PartNumber", (value)) +} + +// GetPartNumber gets the value of PartNumber for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyPartNumber() (value string, err error) { + retValue, err := instance.GetProperty("PartNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPhysicalSectorSize sets the value of PhysicalSectorSize for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyPhysicalSectorSize(value uint64) (err error) { + return instance.SetProperty("PhysicalSectorSize", (value)) +} + +// GetPhysicalSectorSize gets the value of PhysicalSectorSize for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyPhysicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("PhysicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_PhysicalDisk) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_PhysicalDisk) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSlotNumber sets the value of SlotNumber for the instance +func (instance *MSFT_PhysicalDisk) SetPropertySlotNumber(value uint16) (err error) { + return instance.SetProperty("SlotNumber", (value)) +} + +// GetSlotNumber gets the value of SlotNumber for the instance +func (instance *MSFT_PhysicalDisk) GetPropertySlotNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("SlotNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSoftwareVersion sets the value of SoftwareVersion for the instance +func (instance *MSFT_PhysicalDisk) SetPropertySoftwareVersion(value string) (err error) { + return instance.SetProperty("SoftwareVersion", (value)) +} + +// GetSoftwareVersion gets the value of SoftwareVersion for the instance +func (instance *MSFT_PhysicalDisk) GetPropertySoftwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("SoftwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSpindleSpeed sets the value of SpindleSpeed for the instance +func (instance *MSFT_PhysicalDisk) SetPropertySpindleSpeed(value uint32) (err error) { + return instance.SetProperty("SpindleSpeed", (value)) +} + +// GetSpindleSpeed gets the value of SpindleSpeed for the instance +func (instance *MSFT_PhysicalDisk) GetPropertySpindleSpeed() (value uint32, err error) { + retValue, err := instance.GetProperty("SpindleSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStoragePoolUniqueId sets the value of StoragePoolUniqueId for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyStoragePoolUniqueId(value string) (err error) { + return instance.SetProperty("StoragePoolUniqueId", (value)) +} + +// GetStoragePoolUniqueId gets the value of StoragePoolUniqueId for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyStoragePoolUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("StoragePoolUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportedUsages sets the value of SupportedUsages for the instance +func (instance *MSFT_PhysicalDisk) SetPropertySupportedUsages(value []uint16) (err error) { + return instance.SetProperty("SupportedUsages", (value)) +} + +// GetSupportedUsages gets the value of SupportedUsages for the instance +func (instance *MSFT_PhysicalDisk) GetPropertySupportedUsages() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedUsages") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetUniqueIdFormat sets the value of UniqueIdFormat for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyUniqueIdFormat(value uint16) (err error) { + return instance.SetProperty("UniqueIdFormat", (value)) +} + +// GetUniqueIdFormat gets the value of UniqueIdFormat for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyUniqueIdFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("UniqueIdFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetUsage sets the value of Usage for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyUsage(value uint16) (err error) { + return instance.SetProperty("Usage", (value)) +} + +// GetUsage gets the value of Usage for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyUsage() (value uint16, err error) { + retValue, err := instance.GetProperty("Usage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVirtualDiskFootprint sets the value of VirtualDiskFootprint for the instance +func (instance *MSFT_PhysicalDisk) SetPropertyVirtualDiskFootprint(value uint64) (err error) { + return instance.SetProperty("VirtualDiskFootprint", (value)) +} + +// GetVirtualDiskFootprint gets the value of VirtualDiskFootprint for the instance +func (instance *MSFT_PhysicalDisk) GetPropertyVirtualDiskFootprint() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskFootprint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// +// +// +func (instance *MSFT_PhysicalDisk) GetPhysicalExtent( /* OUT */ PhysicalExtents []MSFT_PhysicalExtent, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetPhysicalExtent") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +// +func (instance *MSFT_PhysicalDisk) Maintenance( /* IN */ EnableIndication bool, + /* IN */ EnableMaintenanceMode bool, + /* IN */ Timeout uint32, + /* IN */ IgnoreDetachedVirtualDisks bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Maintenance", EnableIndication, EnableMaintenanceMode, Timeout, IgnoreDetachedVirtualDisks) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_PhysicalDisk) Reset( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Reset") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_PhysicalDisk) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_PhysicalDisk) SetDescription( /* IN */ Description string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDescription", Description) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_PhysicalDisk) SetUsage( /* IN */ Usage uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetUsage", Usage) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *MSFT_PhysicalDisk) SetAttributes( /* IN */ MediaType uint16, + /* IN */ StorageEnclosureId string, + /* IN */ StorageScaleUnitId string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", MediaType, StorageEnclosureId, StorageScaleUnitId) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_PhysicalDisk) IsDeviceCacheEnabled( /* OUT */ IsDeviceCacheEnabled bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("IsDeviceCacheEnabled") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_PhysicalDisk) IsPowerProtected( /* OUT */ IsPowerProtected bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("IsPowerProtected") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +func (instance *MSFT_PhysicalDisk) GetFirmwareInformation( /* OUT */ SupportsUpdate bool, + /* OUT */ NumberOfSlots uint16, + /* OUT */ ActiveSlotNumber uint16, + /* OUT */ SlotNumber []uint16, + /* OUT */ IsSlotWritable []bool, + /* OUT */ FirmwareVersionInSlot []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetFirmwareInformation") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_PhysicalDisk) UpdateFirmware( /* IN */ ImagePath string, + /* IN */ SlotNumber uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("UpdateFirmware", ImagePath, SlotNumber) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDiskToStorageReliabilityCounter.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDiskToStorageReliabilityCounter.go new file mode 100644 index 00000000..70bf4eb8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalDiskToStorageReliabilityCounter.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_PhysicalDiskToStorageReliabilityCounter struct +type MSFT_PhysicalDiskToStorageReliabilityCounter struct { + *cim.WmiInstance + + // + PhysicalDisk MSFT_PhysicalDisk + + // + StorageReliabilityCounter MSFT_StorageReliabilityCounter +} + +func NewMSFT_PhysicalDiskToStorageReliabilityCounterEx1(instance *cim.WmiInstance) (newInstance *MSFT_PhysicalDiskToStorageReliabilityCounter, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_PhysicalDiskToStorageReliabilityCounter{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_PhysicalDiskToStorageReliabilityCounterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_PhysicalDiskToStorageReliabilityCounter, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_PhysicalDiskToStorageReliabilityCounter{ + WmiInstance: tmp, + } + return +} + +// SetPhysicalDisk sets the value of PhysicalDisk for the instance +func (instance *MSFT_PhysicalDiskToStorageReliabilityCounter) SetPropertyPhysicalDisk(value MSFT_PhysicalDisk) (err error) { + return instance.SetProperty("PhysicalDisk", (value)) +} + +// GetPhysicalDisk gets the value of PhysicalDisk for the instance +func (instance *MSFT_PhysicalDiskToStorageReliabilityCounter) GetPropertyPhysicalDisk() (value MSFT_PhysicalDisk, err error) { + retValue, err := instance.GetProperty("PhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_PhysicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_PhysicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_PhysicalDisk(valuetmp) + + return +} + +// SetStorageReliabilityCounter sets the value of StorageReliabilityCounter for the instance +func (instance *MSFT_PhysicalDiskToStorageReliabilityCounter) SetPropertyStorageReliabilityCounter(value MSFT_StorageReliabilityCounter) (err error) { + return instance.SetProperty("StorageReliabilityCounter", (value)) +} + +// GetStorageReliabilityCounter gets the value of StorageReliabilityCounter for the instance +func (instance *MSFT_PhysicalDiskToStorageReliabilityCounter) GetPropertyStorageReliabilityCounter() (value MSFT_StorageReliabilityCounter, err error) { + retValue, err := instance.GetProperty("StorageReliabilityCounter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageReliabilityCounter) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageReliabilityCounter is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageReliabilityCounter(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalExtent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalExtent.go new file mode 100644 index 00000000..ec589a4b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_PhysicalExtent.go @@ -0,0 +1,413 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_PhysicalExtent struct +type MSFT_PhysicalExtent struct { + *cim.WmiInstance + + // + ColumnNumber uint16 + + // + CopyNumber uint16 + + // + Flags uint64 + + // + OperationalDetails []string + + // + OperationalStatus []uint16 + + // + PhysicalDiskOffset uint64 + + // + PhysicalDiskUniqueId string + + // + ReplacementCopyNumber uint16 + + // + Size uint64 + + // + StorageTierUniqueId string + + // + VirtualDiskOffset uint64 + + // + VirtualDiskUniqueId string +} + +func NewMSFT_PhysicalExtentEx1(instance *cim.WmiInstance) (newInstance *MSFT_PhysicalExtent, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_PhysicalExtent{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_PhysicalExtentEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_PhysicalExtent, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_PhysicalExtent{ + WmiInstance: tmp, + } + return +} + +// SetColumnNumber sets the value of ColumnNumber for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyColumnNumber(value uint16) (err error) { + return instance.SetProperty("ColumnNumber", (value)) +} + +// GetColumnNumber gets the value of ColumnNumber for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyColumnNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("ColumnNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCopyNumber sets the value of CopyNumber for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyCopyNumber(value uint16) (err error) { + return instance.SetProperty("CopyNumber", (value)) +} + +// GetCopyNumber gets the value of CopyNumber for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyCopyNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("CopyNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyFlags(value uint64) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyFlags() (value uint64, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetOperationalDetails sets the value of OperationalDetails for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyOperationalDetails(value []string) (err error) { + return instance.SetProperty("OperationalDetails", (value)) +} + +// GetOperationalDetails gets the value of OperationalDetails for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyOperationalDetails() (value []string, err error) { + retValue, err := instance.GetProperty("OperationalDetails") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPhysicalDiskOffset sets the value of PhysicalDiskOffset for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyPhysicalDiskOffset(value uint64) (err error) { + return instance.SetProperty("PhysicalDiskOffset", (value)) +} + +// GetPhysicalDiskOffset gets the value of PhysicalDiskOffset for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyPhysicalDiskOffset() (value uint64, err error) { + retValue, err := instance.GetProperty("PhysicalDiskOffset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPhysicalDiskUniqueId sets the value of PhysicalDiskUniqueId for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyPhysicalDiskUniqueId(value string) (err error) { + return instance.SetProperty("PhysicalDiskUniqueId", (value)) +} + +// GetPhysicalDiskUniqueId gets the value of PhysicalDiskUniqueId for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyPhysicalDiskUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("PhysicalDiskUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReplacementCopyNumber sets the value of ReplacementCopyNumber for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyReplacementCopyNumber(value uint16) (err error) { + return instance.SetProperty("ReplacementCopyNumber", (value)) +} + +// GetReplacementCopyNumber gets the value of ReplacementCopyNumber for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyReplacementCopyNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplacementCopyNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_PhysicalExtent) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_PhysicalExtent) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStorageTierUniqueId sets the value of StorageTierUniqueId for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyStorageTierUniqueId(value string) (err error) { + return instance.SetProperty("StorageTierUniqueId", (value)) +} + +// GetStorageTierUniqueId gets the value of StorageTierUniqueId for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyStorageTierUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("StorageTierUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVirtualDiskOffset sets the value of VirtualDiskOffset for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyVirtualDiskOffset(value uint64) (err error) { + return instance.SetProperty("VirtualDiskOffset", (value)) +} + +// GetVirtualDiskOffset gets the value of VirtualDiskOffset for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyVirtualDiskOffset() (value uint64, err error) { + retValue, err := instance.GetProperty("VirtualDiskOffset") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVirtualDiskUniqueId sets the value of VirtualDiskUniqueId for the instance +func (instance *MSFT_PhysicalExtent) SetPropertyVirtualDiskUniqueId(value string) (err error) { + return instance.SetProperty("VirtualDiskUniqueId", (value)) +} + +// GetVirtualDiskUniqueId gets the value of VirtualDiskUniqueId for the instance +func (instance *MSFT_PhysicalExtent) GetPropertyVirtualDiskUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("VirtualDiskUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicaPeer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicaPeer.go new file mode 100644 index 00000000..4cb1c852 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicaPeer.go @@ -0,0 +1,290 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicaPeer struct +type MSFT_ReplicaPeer struct { + *MSFT_StorageObject + + // + IsPrimary bool + + // + PeerObject MSFT_StorageObject + + // + PeerObjectId string + + // + PeerObjectName string + + // + PeerObjectType uint16 + + // + PeerProviderURI string + + // + PeerSubsystemName string + + // + PeerUniqueId string +} + +func NewMSFT_ReplicaPeerEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicaPeer, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ReplicaPeer{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_ReplicaPeerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicaPeer, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicaPeer{ + MSFT_StorageObject: tmp, + } + return +} + +// SetIsPrimary sets the value of IsPrimary for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyIsPrimary(value bool) (err error) { + return instance.SetProperty("IsPrimary", (value)) +} + +// GetIsPrimary gets the value of IsPrimary for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyIsPrimary() (value bool, err error) { + retValue, err := instance.GetProperty("IsPrimary") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPeerObject sets the value of PeerObject for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerObject(value MSFT_StorageObject) (err error) { + return instance.SetProperty("PeerObject", (value)) +} + +// GetPeerObject gets the value of PeerObject for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerObject() (value MSFT_StorageObject, err error) { + retValue, err := instance.GetProperty("PeerObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageObject) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageObject is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageObject(valuetmp) + + return +} + +// SetPeerObjectId sets the value of PeerObjectId for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerObjectId(value string) (err error) { + return instance.SetProperty("PeerObjectId", (value)) +} + +// GetPeerObjectId gets the value of PeerObjectId for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerObjectId() (value string, err error) { + retValue, err := instance.GetProperty("PeerObjectId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPeerObjectName sets the value of PeerObjectName for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerObjectName(value string) (err error) { + return instance.SetProperty("PeerObjectName", (value)) +} + +// GetPeerObjectName gets the value of PeerObjectName for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerObjectName() (value string, err error) { + retValue, err := instance.GetProperty("PeerObjectName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPeerObjectType sets the value of PeerObjectType for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerObjectType(value uint16) (err error) { + return instance.SetProperty("PeerObjectType", (value)) +} + +// GetPeerObjectType gets the value of PeerObjectType for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerObjectType() (value uint16, err error) { + retValue, err := instance.GetProperty("PeerObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPeerProviderURI sets the value of PeerProviderURI for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerProviderURI(value string) (err error) { + return instance.SetProperty("PeerProviderURI", (value)) +} + +// GetPeerProviderURI gets the value of PeerProviderURI for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerProviderURI() (value string, err error) { + retValue, err := instance.GetProperty("PeerProviderURI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPeerSubsystemName sets the value of PeerSubsystemName for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerSubsystemName(value string) (err error) { + return instance.SetProperty("PeerSubsystemName", (value)) +} + +// GetPeerSubsystemName gets the value of PeerSubsystemName for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerSubsystemName() (value string, err error) { + retValue, err := instance.GetProperty("PeerSubsystemName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPeerUniqueId sets the value of PeerUniqueId for the instance +func (instance *MSFT_ReplicaPeer) SetPropertyPeerUniqueId(value string) (err error) { + return instance.SetProperty("PeerUniqueId", (value)) +} + +// GetPeerUniqueId gets the value of PeerUniqueId for the instance +func (instance *MSFT_ReplicaPeer) GetPropertyPeerUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("PeerUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationCapabilities.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationCapabilities.go new file mode 100644 index 00000000..ae472b99 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationCapabilities.go @@ -0,0 +1,590 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicationCapabilities struct +type MSFT_ReplicationCapabilities struct { + *MSFT_StorageObject + + // + DefaultRecoveryPointObjective uint32 + + // + SupportedAsynchronousActions []uint16 + + // + SupportedLogVolumeFeatures []uint16 + + // + SupportedMaximumLogSize uint64 + + // + SupportedMinimumLogSize uint64 + + // + SupportedObjectTypes []uint16 + + // + SupportedReplicatedPartitionFeatures []uint16 + + // + SupportedReplicationTypes []uint16 + + // + SupportedSynchronousActions []uint16 + + // + SupportsCreateReplicationRelationshipMethod bool + + // + SupportsEmptyReplicationGroup bool + + // + SupportsFullDiscovery bool + + // + SupportsReplicationGroup bool +} + +func NewMSFT_ReplicationCapabilitiesEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicationCapabilities, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationCapabilities{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_ReplicationCapabilitiesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicationCapabilities, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationCapabilities{ + MSFT_StorageObject: tmp, + } + return +} + +// SetDefaultRecoveryPointObjective sets the value of DefaultRecoveryPointObjective for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertyDefaultRecoveryPointObjective(value uint32) (err error) { + return instance.SetProperty("DefaultRecoveryPointObjective", (value)) +} + +// GetDefaultRecoveryPointObjective gets the value of DefaultRecoveryPointObjective for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertyDefaultRecoveryPointObjective() (value uint32, err error) { + retValue, err := instance.GetProperty("DefaultRecoveryPointObjective") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSupportedAsynchronousActions sets the value of SupportedAsynchronousActions for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedAsynchronousActions(value []uint16) (err error) { + return instance.SetProperty("SupportedAsynchronousActions", (value)) +} + +// GetSupportedAsynchronousActions gets the value of SupportedAsynchronousActions for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedAsynchronousActions() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedAsynchronousActions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedLogVolumeFeatures sets the value of SupportedLogVolumeFeatures for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedLogVolumeFeatures(value []uint16) (err error) { + return instance.SetProperty("SupportedLogVolumeFeatures", (value)) +} + +// GetSupportedLogVolumeFeatures gets the value of SupportedLogVolumeFeatures for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedLogVolumeFeatures() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedLogVolumeFeatures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedMaximumLogSize sets the value of SupportedMaximumLogSize for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedMaximumLogSize(value uint64) (err error) { + return instance.SetProperty("SupportedMaximumLogSize", (value)) +} + +// GetSupportedMaximumLogSize gets the value of SupportedMaximumLogSize for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedMaximumLogSize() (value uint64, err error) { + retValue, err := instance.GetProperty("SupportedMaximumLogSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSupportedMinimumLogSize sets the value of SupportedMinimumLogSize for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedMinimumLogSize(value uint64) (err error) { + return instance.SetProperty("SupportedMinimumLogSize", (value)) +} + +// GetSupportedMinimumLogSize gets the value of SupportedMinimumLogSize for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedMinimumLogSize() (value uint64, err error) { + retValue, err := instance.GetProperty("SupportedMinimumLogSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSupportedObjectTypes sets the value of SupportedObjectTypes for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedObjectTypes(value []uint16) (err error) { + return instance.SetProperty("SupportedObjectTypes", (value)) +} + +// GetSupportedObjectTypes gets the value of SupportedObjectTypes for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedObjectTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedObjectTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedReplicatedPartitionFeatures sets the value of SupportedReplicatedPartitionFeatures for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedReplicatedPartitionFeatures(value []uint16) (err error) { + return instance.SetProperty("SupportedReplicatedPartitionFeatures", (value)) +} + +// GetSupportedReplicatedPartitionFeatures gets the value of SupportedReplicatedPartitionFeatures for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedReplicatedPartitionFeatures() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedReplicatedPartitionFeatures") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedReplicationTypes sets the value of SupportedReplicationTypes for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedReplicationTypes(value []uint16) (err error) { + return instance.SetProperty("SupportedReplicationTypes", (value)) +} + +// GetSupportedReplicationTypes gets the value of SupportedReplicationTypes for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedReplicationTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedReplicationTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedSynchronousActions sets the value of SupportedSynchronousActions for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportedSynchronousActions(value []uint16) (err error) { + return instance.SetProperty("SupportedSynchronousActions", (value)) +} + +// GetSupportedSynchronousActions gets the value of SupportedSynchronousActions for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportedSynchronousActions() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedSynchronousActions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportsCreateReplicationRelationshipMethod sets the value of SupportsCreateReplicationRelationshipMethod for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportsCreateReplicationRelationshipMethod(value bool) (err error) { + return instance.SetProperty("SupportsCreateReplicationRelationshipMethod", (value)) +} + +// GetSupportsCreateReplicationRelationshipMethod gets the value of SupportsCreateReplicationRelationshipMethod for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportsCreateReplicationRelationshipMethod() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsCreateReplicationRelationshipMethod") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsEmptyReplicationGroup sets the value of SupportsEmptyReplicationGroup for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportsEmptyReplicationGroup(value bool) (err error) { + return instance.SetProperty("SupportsEmptyReplicationGroup", (value)) +} + +// GetSupportsEmptyReplicationGroup gets the value of SupportsEmptyReplicationGroup for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportsEmptyReplicationGroup() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsEmptyReplicationGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFullDiscovery sets the value of SupportsFullDiscovery for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportsFullDiscovery(value bool) (err error) { + return instance.SetProperty("SupportsFullDiscovery", (value)) +} + +// GetSupportsFullDiscovery gets the value of SupportsFullDiscovery for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportsFullDiscovery() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFullDiscovery") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsReplicationGroup sets the value of SupportsReplicationGroup for the instance +func (instance *MSFT_ReplicationCapabilities) SetPropertySupportsReplicationGroup(value bool) (err error) { + return instance.SetProperty("SupportsReplicationGroup", (value)) +} + +// GetSupportsReplicationGroup gets the value of SupportsReplicationGroup for the instance +func (instance *MSFT_ReplicationCapabilities) GetPropertySupportsReplicationGroup() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsReplicationGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// + +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetSupportedOperations( /* IN */ ReplicationType uint16, + /* OUT */ SupportedOperations []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedOperations", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetSupportedGroupOperations( /* IN */ ReplicationType uint16, + /* OUT */ SupportedGroupOperations []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedGroupOperations", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetSupportedFeatures( /* IN */ ReplicationType uint16, + /* OUT */ Features []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedFeatures", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetSupportedGroupFeatures( /* IN */ ReplicationType uint16, + /* OUT */ GroupFeatures []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedGroupFeatures", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetSupportedCopyStates( /* IN */ ReplicationType uint16, + /* OUT */ SupportedCopyStates []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedCopyStates", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetSupportedGroupCopyStates( /* IN */ ReplicationType uint16, + /* OUT */ SupportedCopyStates []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedGroupCopyStates", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +// +// +func (instance *MSFT_ReplicationCapabilities) GetRecoveryPointData( /* IN */ ReplicationType uint16, + /* OUT */ DefaultRecoveryPoint uint32, + /* OUT */ RecoveryPointValues []uint32, + /* OUT */ RecoveryPointIndicator uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetRecoveryPointData", ReplicationType) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroup.go new file mode 100644 index 00000000..857bd37e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroup.go @@ -0,0 +1,341 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicationGroup struct +type MSFT_ReplicationGroup struct { + *MSFT_StorageObject + + // + Description string + + // + FriendlyName string + + // + HealthStatus uint16 + + // + OperationalStatus []uint16 +} + +func NewMSFT_ReplicationGroupEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicationGroup, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroup{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_ReplicationGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicationGroup, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroup{ + MSFT_StorageObject: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_ReplicationGroup) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_ReplicationGroup) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_ReplicationGroup) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_ReplicationGroup) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_ReplicationGroup) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_ReplicationGroup) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_ReplicationGroup) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_ReplicationGroup) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// + +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_ReplicationGroup) CreateReplica( /* IN */ FriendlyName string, + /* IN */ TargetStorageSubsystem MSFT_ReplicaPeer, + /* IN */ TargetGroupObjectId string, + /* IN */ TargetStoragePoolObjectId string, + /* IN */ RecoveryPointObjective uint32, + /* IN */ ReplicationSettings MSFT_ReplicationSettings, + /* IN */ SyncType uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedReplicaPeer MSFT_ReplicaPeer, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateReplica", FriendlyName, TargetStorageSubsystem, TargetGroupObjectId, TargetStoragePoolObjectId, RecoveryPointObjective, ReplicationSettings, SyncType, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// + +// +// +// +func (instance *MSFT_ReplicationGroup) SetReplicationRelationship( /* IN */ Operation uint16, + /* IN */ TargetGroup MSFT_ReplicaPeer, + /* IN */ SourceStorageObjects []MSFT_StorageObject, + /* IN */ TargetStorageObjects []MSFT_StorageObject, + /* IN */ SyncPairs []MSFT_Synchronized, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetReplicationRelationship", Operation, TargetGroup, SourceStorageObjects, TargetStorageObjects, SyncPairs, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_ReplicationGroup) SetReplicationSettings( /* IN */ ReplicationSettings MSFT_ReplicationSettings, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetReplicationSettings", ReplicationSettings) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_ReplicationGroup) GetReplicationSettings( /* OUT */ ReplicationSettings MSFT_ReplicationSettings, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetReplicationSettings") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_ReplicationGroup) AddMember( /* IN */ StorageObjects []MSFT_StorageObject, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddMember", StorageObjects) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_ReplicationGroup) RemoveMember( /* IN */ StorageObjects []MSFT_StorageObject, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveMember", StorageObjects) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_ReplicationGroup) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_ReplicationGroup) DeleteObject( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToPartition.go new file mode 100644 index 00000000..a58591b8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToPartition.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicationGroupToPartition struct +type MSFT_ReplicationGroupToPartition struct { + *cim.WmiInstance + + // + Partition MSFT_Partition + + // + ReplicationGroup MSFT_ReplicationGroup +} + +func NewMSFT_ReplicationGroupToPartitionEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicationGroupToPartition, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroupToPartition{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_ReplicationGroupToPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicationGroupToPartition, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroupToPartition{ + WmiInstance: tmp, + } + return +} + +// SetPartition sets the value of Partition for the instance +func (instance *MSFT_ReplicationGroupToPartition) SetPropertyPartition(value MSFT_Partition) (err error) { + return instance.SetProperty("Partition", (value)) +} + +// GetPartition gets the value of Partition for the instance +func (instance *MSFT_ReplicationGroupToPartition) GetPropertyPartition() (value MSFT_Partition, err error) { + retValue, err := instance.GetProperty("Partition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Partition) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Partition is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Partition(valuetmp) + + return +} + +// SetReplicationGroup sets the value of ReplicationGroup for the instance +func (instance *MSFT_ReplicationGroupToPartition) SetPropertyReplicationGroup(value MSFT_ReplicationGroup) (err error) { + return instance.SetProperty("ReplicationGroup", (value)) +} + +// GetReplicationGroup gets the value of ReplicationGroup for the instance +func (instance *MSFT_ReplicationGroupToPartition) GetPropertyReplicationGroup() (value MSFT_ReplicationGroup, err error) { + retValue, err := instance.GetProperty("ReplicationGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicationGroup) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicationGroup is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicationGroup(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToReplicaPeer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToReplicaPeer.go new file mode 100644 index 00000000..3a316a0b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToReplicaPeer.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicationGroupToReplicaPeer struct +type MSFT_ReplicationGroupToReplicaPeer struct { + *MSFT_Synchronized + + // + ConsistencyState uint16 + + // + ConsistencyType uint16 + + // + ReplicaPeer MSFT_ReplicaPeer + + // + ReplicationGroup MSFT_ReplicationGroup +} + +func NewMSFT_ReplicationGroupToReplicaPeerEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicationGroupToReplicaPeer, err error) { + tmp, err := NewMSFT_SynchronizedEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroupToReplicaPeer{ + MSFT_Synchronized: tmp, + } + return +} + +func NewMSFT_ReplicationGroupToReplicaPeerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicationGroupToReplicaPeer, err error) { + tmp, err := NewMSFT_SynchronizedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroupToReplicaPeer{ + MSFT_Synchronized: tmp, + } + return +} + +// SetConsistencyState sets the value of ConsistencyState for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) SetPropertyConsistencyState(value uint16) (err error) { + return instance.SetProperty("ConsistencyState", (value)) +} + +// GetConsistencyState gets the value of ConsistencyState for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) GetPropertyConsistencyState() (value uint16, err error) { + retValue, err := instance.GetProperty("ConsistencyState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetConsistencyType sets the value of ConsistencyType for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) SetPropertyConsistencyType(value uint16) (err error) { + return instance.SetProperty("ConsistencyType", (value)) +} + +// GetConsistencyType gets the value of ConsistencyType for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) GetPropertyConsistencyType() (value uint16, err error) { + retValue, err := instance.GetProperty("ConsistencyType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReplicaPeer sets the value of ReplicaPeer for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) SetPropertyReplicaPeer(value MSFT_ReplicaPeer) (err error) { + return instance.SetProperty("ReplicaPeer", (value)) +} + +// GetReplicaPeer gets the value of ReplicaPeer for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) GetPropertyReplicaPeer() (value MSFT_ReplicaPeer, err error) { + retValue, err := instance.GetProperty("ReplicaPeer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicaPeer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicaPeer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicaPeer(valuetmp) + + return +} + +// SetReplicationGroup sets the value of ReplicationGroup for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) SetPropertyReplicationGroup(value MSFT_ReplicationGroup) (err error) { + return instance.SetProperty("ReplicationGroup", (value)) +} + +// GetReplicationGroup gets the value of ReplicationGroup for the instance +func (instance *MSFT_ReplicationGroupToReplicaPeer) GetPropertyReplicationGroup() (value MSFT_ReplicationGroup, err error) { + retValue, err := instance.GetProperty("ReplicationGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicationGroup) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicationGroup is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicationGroup(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToVirtualDisk.go new file mode 100644 index 00000000..f30365bd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationGroupToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicationGroupToVirtualDisk struct +type MSFT_ReplicationGroupToVirtualDisk struct { + *cim.WmiInstance + + // + ReplicationGroup MSFT_ReplicationGroup + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_ReplicationGroupToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicationGroupToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroupToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_ReplicationGroupToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicationGroupToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationGroupToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetReplicationGroup sets the value of ReplicationGroup for the instance +func (instance *MSFT_ReplicationGroupToVirtualDisk) SetPropertyReplicationGroup(value MSFT_ReplicationGroup) (err error) { + return instance.SetProperty("ReplicationGroup", (value)) +} + +// GetReplicationGroup gets the value of ReplicationGroup for the instance +func (instance *MSFT_ReplicationGroupToVirtualDisk) GetPropertyReplicationGroup() (value MSFT_ReplicationGroup, err error) { + retValue, err := instance.GetProperty("ReplicationGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicationGroup) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicationGroup is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicationGroup(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_ReplicationGroupToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_ReplicationGroupToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationSettings.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationSettings.go new file mode 100644 index 00000000..bb1ee856 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ReplicationSettings.go @@ -0,0 +1,232 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ReplicationSettings struct +type MSFT_ReplicationSettings struct { + *cim.WmiInstance + + // + LogDevices []MSFT_Volume + + // + LogSizeInBytes uint64 + + // + ReplicationQuorum uint16 + + // + SyncMode uint16 + + // + TargetElementSupplier uint16 + + // + ThinProvisioningPolicy uint16 +} + +func NewMSFT_ReplicationSettingsEx1(instance *cim.WmiInstance) (newInstance *MSFT_ReplicationSettings, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_ReplicationSettings{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_ReplicationSettingsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ReplicationSettings, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ReplicationSettings{ + WmiInstance: tmp, + } + return +} + +// SetLogDevices sets the value of LogDevices for the instance +func (instance *MSFT_ReplicationSettings) SetPropertyLogDevices(value []MSFT_Volume) (err error) { + return instance.SetProperty("LogDevices", (value)) +} + +// GetLogDevices gets the value of LogDevices for the instance +func (instance *MSFT_ReplicationSettings) GetPropertyLogDevices() (value []MSFT_Volume, err error) { + retValue, err := instance.GetProperty("LogDevices") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, MSFT_Volume(valuetmp)) + } + + return +} + +// SetLogSizeInBytes sets the value of LogSizeInBytes for the instance +func (instance *MSFT_ReplicationSettings) SetPropertyLogSizeInBytes(value uint64) (err error) { + return instance.SetProperty("LogSizeInBytes", (value)) +} + +// GetLogSizeInBytes gets the value of LogSizeInBytes for the instance +func (instance *MSFT_ReplicationSettings) GetPropertyLogSizeInBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("LogSizeInBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReplicationQuorum sets the value of ReplicationQuorum for the instance +func (instance *MSFT_ReplicationSettings) SetPropertyReplicationQuorum(value uint16) (err error) { + return instance.SetProperty("ReplicationQuorum", (value)) +} + +// GetReplicationQuorum gets the value of ReplicationQuorum for the instance +func (instance *MSFT_ReplicationSettings) GetPropertyReplicationQuorum() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplicationQuorum") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSyncMode sets the value of SyncMode for the instance +func (instance *MSFT_ReplicationSettings) SetPropertySyncMode(value uint16) (err error) { + return instance.SetProperty("SyncMode", (value)) +} + +// GetSyncMode gets the value of SyncMode for the instance +func (instance *MSFT_ReplicationSettings) GetPropertySyncMode() (value uint16, err error) { + retValue, err := instance.GetProperty("SyncMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTargetElementSupplier sets the value of TargetElementSupplier for the instance +func (instance *MSFT_ReplicationSettings) SetPropertyTargetElementSupplier(value uint16) (err error) { + return instance.SetProperty("TargetElementSupplier", (value)) +} + +// GetTargetElementSupplier gets the value of TargetElementSupplier for the instance +func (instance *MSFT_ReplicationSettings) GetPropertyTargetElementSupplier() (value uint16, err error) { + retValue, err := instance.GetProperty("TargetElementSupplier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetThinProvisioningPolicy sets the value of ThinProvisioningPolicy for the instance +func (instance *MSFT_ReplicationSettings) SetPropertyThinProvisioningPolicy(value uint16) (err error) { + return instance.SetProperty("ThinProvisioningPolicy", (value)) +} + +// GetThinProvisioningPolicy gets the value of ThinProvisioningPolicy for the instance +func (instance *MSFT_ReplicationSettings) GetPropertyThinProvisioningPolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("ThinProvisioningPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ResiliencySetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ResiliencySetting.go new file mode 100644 index 00000000..971e200c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_ResiliencySetting.go @@ -0,0 +1,648 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_ResiliencySetting struct +type MSFT_ResiliencySetting struct { + *MSFT_StorageObject + + // + Description string + + // + InterleaveDefault uint64 + + // + InterleaveMax uint64 + + // + InterleaveMin uint64 + + // + Name string + + // + NumberOfColumnsDefault uint16 + + // + NumberOfColumnsMax uint16 + + // + NumberOfColumnsMin uint16 + + // + NumberOfDataCopiesDefault uint16 + + // + NumberOfDataCopiesMax uint16 + + // + NumberOfDataCopiesMin uint16 + + // + NumberOfGroupsDefault uint16 + + // + NumberOfGroupsMax uint16 + + // + NumberOfGroupsMin uint16 + + // + ParityLayout uint16 + + // + PhysicalDiskRedundancyDefault uint16 + + // + PhysicalDiskRedundancyMax uint16 + + // + PhysicalDiskRedundancyMin uint16 + + // + RequestNoSinglePointOfFailure bool +} + +func NewMSFT_ResiliencySettingEx1(instance *cim.WmiInstance) (newInstance *MSFT_ResiliencySetting, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_ResiliencySetting{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_ResiliencySettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_ResiliencySetting, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_ResiliencySetting{ + MSFT_StorageObject: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInterleaveDefault sets the value of InterleaveDefault for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyInterleaveDefault(value uint64) (err error) { + return instance.SetProperty("InterleaveDefault", (value)) +} + +// GetInterleaveDefault gets the value of InterleaveDefault for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyInterleaveDefault() (value uint64, err error) { + retValue, err := instance.GetProperty("InterleaveDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterleaveMax sets the value of InterleaveMax for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyInterleaveMax(value uint64) (err error) { + return instance.SetProperty("InterleaveMax", (value)) +} + +// GetInterleaveMax gets the value of InterleaveMax for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyInterleaveMax() (value uint64, err error) { + retValue, err := instance.GetProperty("InterleaveMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterleaveMin sets the value of InterleaveMin for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyInterleaveMin(value uint64) (err error) { + return instance.SetProperty("InterleaveMin", (value)) +} + +// GetInterleaveMin gets the value of InterleaveMin for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyInterleaveMin() (value uint64, err error) { + retValue, err := instance.GetProperty("InterleaveMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNumberOfColumnsDefault sets the value of NumberOfColumnsDefault for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfColumnsDefault(value uint16) (err error) { + return instance.SetProperty("NumberOfColumnsDefault", (value)) +} + +// GetNumberOfColumnsDefault gets the value of NumberOfColumnsDefault for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfColumnsDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfColumnsDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfColumnsMax sets the value of NumberOfColumnsMax for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfColumnsMax(value uint16) (err error) { + return instance.SetProperty("NumberOfColumnsMax", (value)) +} + +// GetNumberOfColumnsMax gets the value of NumberOfColumnsMax for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfColumnsMax() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfColumnsMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfColumnsMin sets the value of NumberOfColumnsMin for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfColumnsMin(value uint16) (err error) { + return instance.SetProperty("NumberOfColumnsMin", (value)) +} + +// GetNumberOfColumnsMin gets the value of NumberOfColumnsMin for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfColumnsMin() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfColumnsMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfDataCopiesDefault sets the value of NumberOfDataCopiesDefault for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfDataCopiesDefault(value uint16) (err error) { + return instance.SetProperty("NumberOfDataCopiesDefault", (value)) +} + +// GetNumberOfDataCopiesDefault gets the value of NumberOfDataCopiesDefault for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfDataCopiesDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfDataCopiesDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfDataCopiesMax sets the value of NumberOfDataCopiesMax for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfDataCopiesMax(value uint16) (err error) { + return instance.SetProperty("NumberOfDataCopiesMax", (value)) +} + +// GetNumberOfDataCopiesMax gets the value of NumberOfDataCopiesMax for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfDataCopiesMax() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfDataCopiesMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfDataCopiesMin sets the value of NumberOfDataCopiesMin for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfDataCopiesMin(value uint16) (err error) { + return instance.SetProperty("NumberOfDataCopiesMin", (value)) +} + +// GetNumberOfDataCopiesMin gets the value of NumberOfDataCopiesMin for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfDataCopiesMin() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfDataCopiesMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfGroupsDefault sets the value of NumberOfGroupsDefault for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfGroupsDefault(value uint16) (err error) { + return instance.SetProperty("NumberOfGroupsDefault", (value)) +} + +// GetNumberOfGroupsDefault gets the value of NumberOfGroupsDefault for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfGroupsDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfGroupsDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfGroupsMax sets the value of NumberOfGroupsMax for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfGroupsMax(value uint16) (err error) { + return instance.SetProperty("NumberOfGroupsMax", (value)) +} + +// GetNumberOfGroupsMax gets the value of NumberOfGroupsMax for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfGroupsMax() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfGroupsMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfGroupsMin sets the value of NumberOfGroupsMin for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyNumberOfGroupsMin(value uint16) (err error) { + return instance.SetProperty("NumberOfGroupsMin", (value)) +} + +// GetNumberOfGroupsMin gets the value of NumberOfGroupsMin for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyNumberOfGroupsMin() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfGroupsMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetParityLayout sets the value of ParityLayout for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyParityLayout(value uint16) (err error) { + return instance.SetProperty("ParityLayout", (value)) +} + +// GetParityLayout gets the value of ParityLayout for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyParityLayout() (value uint16, err error) { + retValue, err := instance.GetProperty("ParityLayout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPhysicalDiskRedundancyDefault sets the value of PhysicalDiskRedundancyDefault for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyPhysicalDiskRedundancyDefault(value uint16) (err error) { + return instance.SetProperty("PhysicalDiskRedundancyDefault", (value)) +} + +// GetPhysicalDiskRedundancyDefault gets the value of PhysicalDiskRedundancyDefault for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyPhysicalDiskRedundancyDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("PhysicalDiskRedundancyDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPhysicalDiskRedundancyMax sets the value of PhysicalDiskRedundancyMax for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyPhysicalDiskRedundancyMax(value uint16) (err error) { + return instance.SetProperty("PhysicalDiskRedundancyMax", (value)) +} + +// GetPhysicalDiskRedundancyMax gets the value of PhysicalDiskRedundancyMax for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyPhysicalDiskRedundancyMax() (value uint16, err error) { + retValue, err := instance.GetProperty("PhysicalDiskRedundancyMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPhysicalDiskRedundancyMin sets the value of PhysicalDiskRedundancyMin for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyPhysicalDiskRedundancyMin(value uint16) (err error) { + return instance.SetProperty("PhysicalDiskRedundancyMin", (value)) +} + +// GetPhysicalDiskRedundancyMin gets the value of PhysicalDiskRedundancyMin for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyPhysicalDiskRedundancyMin() (value uint16, err error) { + retValue, err := instance.GetProperty("PhysicalDiskRedundancyMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRequestNoSinglePointOfFailure sets the value of RequestNoSinglePointOfFailure for the instance +func (instance *MSFT_ResiliencySetting) SetPropertyRequestNoSinglePointOfFailure(value bool) (err error) { + return instance.SetProperty("RequestNoSinglePointOfFailure", (value)) +} + +// GetRequestNoSinglePointOfFailure gets the value of RequestNoSinglePointOfFailure for the instance +func (instance *MSFT_ResiliencySetting) GetPropertyRequestNoSinglePointOfFailure() (value bool, err error) { + retValue, err := instance.GetProperty("RequestNoSinglePointOfFailure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +// +// +// +// +// + +// +// +func (instance *MSFT_ResiliencySetting) SetDefaults( /* IN */ NumberOfDataCopiesDefault uint16, + /* IN */ PhysicalDiskRedundancyDefault uint16, + /* IN */ NumberOfColumnsDefault uint16, + /* IN */ AutoNumberOfColumns bool, + /* IN */ InterleaveDefault uint64, + /* IN */ NumberOfGroupsDefault uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDefaults", NumberOfDataCopiesDefault, PhysicalDiskRedundancyDefault, NumberOfColumnsDefault, AutoNumberOfColumns, InterleaveDefault, NumberOfGroupsDefault) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetCacheConfiguration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetCacheConfiguration.go new file mode 100644 index 00000000..7b7b4ca7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetCacheConfiguration.go @@ -0,0 +1,752 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_SBLTargetCacheConfiguration struct +type MSFT_SBLTargetCacheConfiguration struct { + *cim.WmiInstance + + // + CacheBehavior uint64 + + // + CachePageSizeinKB uint32 + + // + CurrentCacheModeHDD uint32 + + // + CurrentCacheModeSSD uint32 + + // + CurrentState uint32 + + // + CurrentStateProgress uint64 + + // + CurrentStateProgressMax uint64 + + // + DesiredCacheModeHDD uint32 + + // + DesiredCacheModeSSD uint32 + + // + DesiredState uint32 + + // + FlashMetadataReserveBytes uint64 + + // + FlashReservePercent uint32 + + // + Identifier string + + // + ProvisioningStage uint64 + + // + ProvisioningStageMax uint64 + + // + SpacesDirectEnabled bool +} + +func NewMSFT_SBLTargetCacheConfigurationEx1(instance *cim.WmiInstance) (newInstance *MSFT_SBLTargetCacheConfiguration, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_SBLTargetCacheConfiguration{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_SBLTargetCacheConfigurationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SBLTargetCacheConfiguration, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SBLTargetCacheConfiguration{ + WmiInstance: tmp, + } + return +} + +// SetCacheBehavior sets the value of CacheBehavior for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCacheBehavior(value uint64) (err error) { + return instance.SetProperty("CacheBehavior", (value)) +} + +// GetCacheBehavior gets the value of CacheBehavior for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCacheBehavior() (value uint64, err error) { + retValue, err := instance.GetProperty("CacheBehavior") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCachePageSizeinKB sets the value of CachePageSizeinKB for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCachePageSizeinKB(value uint32) (err error) { + return instance.SetProperty("CachePageSizeinKB", (value)) +} + +// GetCachePageSizeinKB gets the value of CachePageSizeinKB for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCachePageSizeinKB() (value uint32, err error) { + retValue, err := instance.GetProperty("CachePageSizeinKB") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentCacheModeHDD sets the value of CurrentCacheModeHDD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCurrentCacheModeHDD(value uint32) (err error) { + return instance.SetProperty("CurrentCacheModeHDD", (value)) +} + +// GetCurrentCacheModeHDD gets the value of CurrentCacheModeHDD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCurrentCacheModeHDD() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentCacheModeHDD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentCacheModeSSD sets the value of CurrentCacheModeSSD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCurrentCacheModeSSD(value uint32) (err error) { + return instance.SetProperty("CurrentCacheModeSSD", (value)) +} + +// GetCurrentCacheModeSSD gets the value of CurrentCacheModeSSD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCurrentCacheModeSSD() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentCacheModeSSD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentState sets the value of CurrentState for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCurrentState(value uint32) (err error) { + return instance.SetProperty("CurrentState", (value)) +} + +// GetCurrentState gets the value of CurrentState for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCurrentState() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentStateProgress sets the value of CurrentStateProgress for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCurrentStateProgress(value uint64) (err error) { + return instance.SetProperty("CurrentStateProgress", (value)) +} + +// GetCurrentStateProgress gets the value of CurrentStateProgress for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCurrentStateProgress() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentStateProgress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetCurrentStateProgressMax sets the value of CurrentStateProgressMax for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyCurrentStateProgressMax(value uint64) (err error) { + return instance.SetProperty("CurrentStateProgressMax", (value)) +} + +// GetCurrentStateProgressMax gets the value of CurrentStateProgressMax for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyCurrentStateProgressMax() (value uint64, err error) { + retValue, err := instance.GetProperty("CurrentStateProgressMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDesiredCacheModeHDD sets the value of DesiredCacheModeHDD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyDesiredCacheModeHDD(value uint32) (err error) { + return instance.SetProperty("DesiredCacheModeHDD", (value)) +} + +// GetDesiredCacheModeHDD gets the value of DesiredCacheModeHDD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyDesiredCacheModeHDD() (value uint32, err error) { + retValue, err := instance.GetProperty("DesiredCacheModeHDD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDesiredCacheModeSSD sets the value of DesiredCacheModeSSD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyDesiredCacheModeSSD(value uint32) (err error) { + return instance.SetProperty("DesiredCacheModeSSD", (value)) +} + +// GetDesiredCacheModeSSD gets the value of DesiredCacheModeSSD for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyDesiredCacheModeSSD() (value uint32, err error) { + retValue, err := instance.GetProperty("DesiredCacheModeSSD") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDesiredState sets the value of DesiredState for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyDesiredState(value uint32) (err error) { + return instance.SetProperty("DesiredState", (value)) +} + +// GetDesiredState gets the value of DesiredState for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyDesiredState() (value uint32, err error) { + retValue, err := instance.GetProperty("DesiredState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFlashMetadataReserveBytes sets the value of FlashMetadataReserveBytes for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyFlashMetadataReserveBytes(value uint64) (err error) { + return instance.SetProperty("FlashMetadataReserveBytes", (value)) +} + +// GetFlashMetadataReserveBytes gets the value of FlashMetadataReserveBytes for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyFlashMetadataReserveBytes() (value uint64, err error) { + retValue, err := instance.GetProperty("FlashMetadataReserveBytes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFlashReservePercent sets the value of FlashReservePercent for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyFlashReservePercent(value uint32) (err error) { + return instance.SetProperty("FlashReservePercent", (value)) +} + +// GetFlashReservePercent gets the value of FlashReservePercent for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyFlashReservePercent() (value uint32, err error) { + retValue, err := instance.GetProperty("FlashReservePercent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIdentifier sets the value of Identifier for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyIdentifier(value string) (err error) { + return instance.SetProperty("Identifier", (value)) +} + +// GetIdentifier gets the value of Identifier for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("Identifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetProvisioningStage sets the value of ProvisioningStage for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyProvisioningStage(value uint64) (err error) { + return instance.SetProperty("ProvisioningStage", (value)) +} + +// GetProvisioningStage gets the value of ProvisioningStage for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyProvisioningStage() (value uint64, err error) { + retValue, err := instance.GetProperty("ProvisioningStage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProvisioningStageMax sets the value of ProvisioningStageMax for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertyProvisioningStageMax(value uint64) (err error) { + return instance.SetProperty("ProvisioningStageMax", (value)) +} + +// GetProvisioningStageMax gets the value of ProvisioningStageMax for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertyProvisioningStageMax() (value uint64, err error) { + retValue, err := instance.GetProperty("ProvisioningStageMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSpacesDirectEnabled sets the value of SpacesDirectEnabled for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) SetPropertySpacesDirectEnabled(value bool) (err error) { + return instance.SetProperty("SpacesDirectEnabled", (value)) +} + +// GetSpacesDirectEnabled gets the value of SpacesDirectEnabled for the instance +func (instance *MSFT_SBLTargetCacheConfiguration) GetPropertySpacesDirectEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("SpacesDirectEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) NotifyDisk( /* IN */ DiskGuid string, + /* IN */ PoolId string, + /* IN */ Name string, + /* IN */ Description string, + /* IN */ Manufacturer string, + /* IN */ ProductId string, + /* IN */ Serial string, + /* IN */ SlotNumber uint32, + /* IN */ EnclosureId string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("NotifyDisk", DiskGuid, PoolId, Name, Description, Manufacturer, ProductId, Serial, SlotNumber, EnclosureId) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) NotifyEnclosure( /* IN */ EnclosureGuid string, + /* IN */ Name string, + /* IN */ Description string, + /* IN */ Manufacturer string, + /* IN */ ProductId string, + /* IN */ Serial string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("NotifyEnclosure", EnclosureGuid, Name, Description, Manufacturer, ProductId, Serial) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) NotifyDiskStateChange( /* IN */ DiskGuid string, + /* IN */ StateChange uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("NotifyDiskStateChange", DiskGuid, StateChange) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) SetDiskUsage( /* IN */ DiskGuid string, + /* IN */ UseForStorageSpacesDirect uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDiskUsage", DiskGuid, UseForStorageSpacesDirect) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) StartOptimize( /* IN */ Flags uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("StartOptimize", Flags) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) CheckSystemSupportsCacheState( /* IN */ CacheState uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("CheckSystemSupportsCacheState", CacheState) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) CheckDiskSupportsCacheState( /* IN */ DiskGuid string, + /* IN */ CacheState uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("CheckDiskSupportsCacheState", DiskGuid, CacheState) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +// +// +// +func (instance *MSFT_SBLTargetCacheConfiguration) CheckAllDisksSupportCache( /* IN */ CacheState uint32, + /* OUT */ DiskGuids []string, + /* OUT */ DiskNumbers []uint32, + /* OUT */ SupportStatuses []uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CheckAllDisksSupportCache", CacheState) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_SBLTargetCacheConfiguration) QueryBoundDevices( /* IN */ DiskGuid string, + /* OUT */ BoundDiskGuids []string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("QueryBoundDevices", DiskGuid) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) SetDiskCacheMode( /* IN */ DiskGuid string, + /* IN */ CacheMode uint32, + /* IN */ Flags uint32, + /* IN */ Originator uint32, + /* IN */ Force bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDiskCacheMode", DiskGuid, CacheMode, Flags, Originator, Force) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *MSFT_SBLTargetCacheConfiguration) SetDiskCacheHint( /* IN */ DiskGuid string, + /* IN */ CacheHint uint32, + /* IN */ Flags uint32, + /* IN */ Originator uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDiskCacheHint", DiskGuid, CacheHint, Flags, Originator) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetDisk.go new file mode 100644 index 00000000..c2140f23 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SBLTargetDisk.go @@ -0,0 +1,471 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_SBLTargetDisk struct +type MSFT_SBLTargetDisk struct { + *cim.WmiInstance + + // + CacheMode uint32 + + // + CurrentUsage uint32 + + // + DesiredUsage uint32 + + // + DeviceNumber uint32 + + // + Identifier string + + // + IsFlash bool + + // + IsSblCacheDevice bool + + // + LastStateChangeTime string + + // + ReadMediaErrorCount uint64 + + // + ReadTotalErrorCount uint64 + + // + SblAttributes uint32 + + // + State uint32 + + // + WriteMediaErrorCount uint64 + + // + WriteTotalErrorCount uint64 +} + +func NewMSFT_SBLTargetDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_SBLTargetDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_SBLTargetDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_SBLTargetDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SBLTargetDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SBLTargetDisk{ + WmiInstance: tmp, + } + return +} + +// SetCacheMode sets the value of CacheMode for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyCacheMode(value uint32) (err error) { + return instance.SetProperty("CacheMode", (value)) +} + +// GetCacheMode gets the value of CacheMode for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyCacheMode() (value uint32, err error) { + retValue, err := instance.GetProperty("CacheMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetCurrentUsage sets the value of CurrentUsage for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyCurrentUsage(value uint32) (err error) { + return instance.SetProperty("CurrentUsage", (value)) +} + +// GetCurrentUsage gets the value of CurrentUsage for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyCurrentUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("CurrentUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDesiredUsage sets the value of DesiredUsage for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyDesiredUsage(value uint32) (err error) { + return instance.SetProperty("DesiredUsage", (value)) +} + +// GetDesiredUsage gets the value of DesiredUsage for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyDesiredUsage() (value uint32, err error) { + retValue, err := instance.GetProperty("DesiredUsage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDeviceNumber sets the value of DeviceNumber for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyDeviceNumber(value uint32) (err error) { + return instance.SetProperty("DeviceNumber", (value)) +} + +// GetDeviceNumber gets the value of DeviceNumber for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyDeviceNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("DeviceNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetIdentifier sets the value of Identifier for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyIdentifier(value string) (err error) { + return instance.SetProperty("Identifier", (value)) +} + +// GetIdentifier gets the value of Identifier for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("Identifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsFlash sets the value of IsFlash for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyIsFlash(value bool) (err error) { + return instance.SetProperty("IsFlash", (value)) +} + +// GetIsFlash gets the value of IsFlash for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyIsFlash() (value bool, err error) { + retValue, err := instance.GetProperty("IsFlash") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsSblCacheDevice sets the value of IsSblCacheDevice for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyIsSblCacheDevice(value bool) (err error) { + return instance.SetProperty("IsSblCacheDevice", (value)) +} + +// GetIsSblCacheDevice gets the value of IsSblCacheDevice for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyIsSblCacheDevice() (value bool, err error) { + retValue, err := instance.GetProperty("IsSblCacheDevice") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLastStateChangeTime sets the value of LastStateChangeTime for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyLastStateChangeTime(value string) (err error) { + return instance.SetProperty("LastStateChangeTime", (value)) +} + +// GetLastStateChangeTime gets the value of LastStateChangeTime for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyLastStateChangeTime() (value string, err error) { + retValue, err := instance.GetProperty("LastStateChangeTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReadMediaErrorCount sets the value of ReadMediaErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyReadMediaErrorCount(value uint64) (err error) { + return instance.SetProperty("ReadMediaErrorCount", (value)) +} + +// GetReadMediaErrorCount gets the value of ReadMediaErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyReadMediaErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadMediaErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadTotalErrorCount sets the value of ReadTotalErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyReadTotalErrorCount(value uint64) (err error) { + return instance.SetProperty("ReadTotalErrorCount", (value)) +} + +// GetReadTotalErrorCount gets the value of ReadTotalErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyReadTotalErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadTotalErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSblAttributes sets the value of SblAttributes for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertySblAttributes(value uint32) (err error) { + return instance.SetProperty("SblAttributes", (value)) +} + +// GetSblAttributes gets the value of SblAttributes for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertySblAttributes() (value uint32, err error) { + retValue, err := instance.GetProperty("SblAttributes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetState sets the value of State for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyState(value uint32) (err error) { + return instance.SetProperty("State", (value)) +} + +// GetState gets the value of State for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyState() (value uint32, err error) { + retValue, err := instance.GetProperty("State") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetWriteMediaErrorCount sets the value of WriteMediaErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyWriteMediaErrorCount(value uint64) (err error) { + return instance.SetProperty("WriteMediaErrorCount", (value)) +} + +// GetWriteMediaErrorCount gets the value of WriteMediaErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyWriteMediaErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteMediaErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteTotalErrorCount sets the value of WriteTotalErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) SetPropertyWriteTotalErrorCount(value uint64) (err error) { + return instance.SetProperty("WriteTotalErrorCount", (value)) +} + +// GetWriteTotalErrorCount gets the value of WriteTotalErrorCount for the instance +func (instance *MSFT_SBLTargetDisk) GetPropertyWriteTotalErrorCount() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteTotalErrorCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError.go new file mode 100644 index 00000000..ea0a6f13 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SoftError struct +type MSFT_SoftError struct { + *CIM_Error +} + +func NewMSFT_SoftErrorEx1(instance *cim.WmiInstance) (newInstance *MSFT_SoftError, err error) { + tmp, err := NewCIM_ErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SoftError{ + CIM_Error: tmp, + } + return +} + +func NewMSFT_SoftErrorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SoftError, err error) { + tmp, err := NewCIM_ErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SoftError{ + CIM_Error: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_EmptyCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_EmptyCache.go new file mode 100644 index 00000000..c6080c86 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_EmptyCache.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SoftError_EmptyCache struct +type MSFT_SoftError_EmptyCache struct { + *MSFT_SoftError +} + +func NewMSFT_SoftError_EmptyCacheEx1(instance *cim.WmiInstance) (newInstance *MSFT_SoftError_EmptyCache, err error) { + tmp, err := NewMSFT_SoftErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_EmptyCache{ + MSFT_SoftError: tmp, + } + return +} + +func NewMSFT_SoftError_EmptyCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SoftError_EmptyCache, err error) { + tmp, err := NewMSFT_SoftErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_EmptyCache{ + MSFT_SoftError: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotAuthenticated.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotAuthenticated.go new file mode 100644 index 00000000..de645a1d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotAuthenticated.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SoftError_NotAuthenticated struct +type MSFT_SoftError_NotAuthenticated struct { + *MSFT_SoftError +} + +func NewMSFT_SoftError_NotAuthenticatedEx1(instance *cim.WmiInstance) (newInstance *MSFT_SoftError_NotAuthenticated, err error) { + tmp, err := NewMSFT_SoftErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_NotAuthenticated{ + MSFT_SoftError: tmp, + } + return +} + +func NewMSFT_SoftError_NotAuthenticatedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SoftError_NotAuthenticated, err error) { + tmp, err := NewMSFT_SoftErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_NotAuthenticated{ + MSFT_SoftError: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotInCache.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotInCache.go new file mode 100644 index 00000000..026c111f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_NotInCache.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SoftError_NotInCache struct +type MSFT_SoftError_NotInCache struct { + *MSFT_SoftError +} + +func NewMSFT_SoftError_NotInCacheEx1(instance *cim.WmiInstance) (newInstance *MSFT_SoftError_NotInCache, err error) { + tmp, err := NewMSFT_SoftErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_NotInCache{ + MSFT_SoftError: tmp, + } + return +} + +func NewMSFT_SoftError_NotInCacheEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SoftError_NotInCache, err error) { + tmp, err := NewMSFT_SoftErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_NotInCache{ + MSFT_SoftError: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_RelativePath.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_RelativePath.go new file mode 100644 index 00000000..badc71d1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_SoftError_RelativePath.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_SoftError_RelativePath struct +type MSFT_SoftError_RelativePath struct { + *MSFT_SoftError +} + +func NewMSFT_SoftError_RelativePathEx1(instance *cim.WmiInstance) (newInstance *MSFT_SoftError_RelativePath, err error) { + tmp, err := NewMSFT_SoftErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_RelativePath{ + MSFT_SoftError: tmp, + } + return +} + +func NewMSFT_SoftError_RelativePathEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_SoftError_RelativePath, err error) { + tmp, err := NewMSFT_SoftErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_SoftError_RelativePath{ + MSFT_SoftError: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageAlertEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageAlertEvent.go new file mode 100644 index 00000000..3b22d0f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageAlertEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageAlertEvent struct +type MSFT_StorageAlertEvent struct { + *MSFT_StorageEvent + + // + AlertType uint16 +} + +func NewMSFT_StorageAlertEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageAlertEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageAlertEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_StorageAlertEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageAlertEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageAlertEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +// SetAlertType sets the value of AlertType for the instance +func (instance *MSFT_StorageAlertEvent) SetPropertyAlertType(value uint16) (err error) { + return instance.SetProperty("AlertType", (value)) +} + +// GetAlertType gets the value of AlertType for the instance +func (instance *MSFT_StorageAlertEvent) GetPropertyAlertType() (value uint16, err error) { + retValue, err := instance.GetProperty("AlertType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageArrivalEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageArrivalEvent.go new file mode 100644 index 00000000..c40db283 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageArrivalEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageArrivalEvent struct +type MSFT_StorageArrivalEvent struct { + *MSFT_StorageEvent +} + +func NewMSFT_StorageArrivalEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageArrivalEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageArrivalEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_StorageArrivalEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageArrivalEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageArrivalEvent{ + MSFT_StorageEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageChassis.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageChassis.go new file mode 100644 index 00000000..16c164ee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageChassis.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageChassis struct +type MSFT_StorageChassis struct { + *MSFT_StorageFaultDomain +} + +func NewMSFT_StorageChassisEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageChassis, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageChassis{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +func NewMSFT_StorageChassisEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageChassis, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageChassis{ + MSFT_StorageFaultDomain: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDepartureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDepartureEvent.go new file mode 100644 index 00000000..305d2c5b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDepartureEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageDepartureEvent struct +type MSFT_StorageDepartureEvent struct { + *MSFT_StorageEvent +} + +func NewMSFT_StorageDepartureEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageDepartureEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageDepartureEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_StorageDepartureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageDepartureEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageDepartureEvent{ + MSFT_StorageEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDiagnoseResult.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDiagnoseResult.go new file mode 100644 index 00000000..21e46aae --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageDiagnoseResult.go @@ -0,0 +1,352 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageDiagnoseResult struct +type MSFT_StorageDiagnoseResult struct { + *cim.WmiInstance + + // + FaultId string + + // + FaultingObjectDescription string + + // + FaultingObjectLocation string + + // + FaultingObjectType string + + // + FaultingObjectUniqueId string + + // + FaultTime string + + // + FaultType string + + // + PerceivedSeverity uint16 + + // + Reason string + + // + RecommendedActions []string +} + +func NewMSFT_StorageDiagnoseResultEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageDiagnoseResult, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageDiagnoseResult{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageDiagnoseResultEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageDiagnoseResult, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageDiagnoseResult{ + WmiInstance: tmp, + } + return +} + +// SetFaultId sets the value of FaultId for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultId(value string) (err error) { + return instance.SetProperty("FaultId", (value)) +} + +// GetFaultId gets the value of FaultId for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultId() (value string, err error) { + retValue, err := instance.GetProperty("FaultId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectDescription sets the value of FaultingObjectDescription for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultingObjectDescription(value string) (err error) { + return instance.SetProperty("FaultingObjectDescription", (value)) +} + +// GetFaultingObjectDescription gets the value of FaultingObjectDescription for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultingObjectDescription() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectLocation sets the value of FaultingObjectLocation for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultingObjectLocation(value string) (err error) { + return instance.SetProperty("FaultingObjectLocation", (value)) +} + +// GetFaultingObjectLocation gets the value of FaultingObjectLocation for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultingObjectLocation() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectLocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectType sets the value of FaultingObjectType for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultingObjectType(value string) (err error) { + return instance.SetProperty("FaultingObjectType", (value)) +} + +// GetFaultingObjectType gets the value of FaultingObjectType for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultingObjectType() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectUniqueId sets the value of FaultingObjectUniqueId for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultingObjectUniqueId(value string) (err error) { + return instance.SetProperty("FaultingObjectUniqueId", (value)) +} + +// GetFaultingObjectUniqueId gets the value of FaultingObjectUniqueId for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultingObjectUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultTime sets the value of FaultTime for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultTime(value string) (err error) { + return instance.SetProperty("FaultTime", (value)) +} + +// GetFaultTime gets the value of FaultTime for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultTime() (value string, err error) { + retValue, err := instance.GetProperty("FaultTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultType sets the value of FaultType for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyFaultType(value string) (err error) { + return instance.SetProperty("FaultType", (value)) +} + +// GetFaultType gets the value of FaultType for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyFaultType() (value string, err error) { + retValue, err := instance.GetProperty("FaultType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerceivedSeverity sets the value of PerceivedSeverity for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyPerceivedSeverity(value uint16) (err error) { + return instance.SetProperty("PerceivedSeverity", (value)) +} + +// GetPerceivedSeverity gets the value of PerceivedSeverity for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyPerceivedSeverity() (value uint16, err error) { + retValue, err := instance.GetProperty("PerceivedSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReason sets the value of Reason for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyReason(value string) (err error) { + return instance.SetProperty("Reason", (value)) +} + +// GetReason gets the value of Reason for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyReason() (value string, err error) { + retValue, err := instance.GetProperty("Reason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecommendedActions sets the value of RecommendedActions for the instance +func (instance *MSFT_StorageDiagnoseResult) SetPropertyRecommendedActions(value []string) (err error) { + return instance.SetProperty("RecommendedActions", (value)) +} + +// GetRecommendedActions gets the value of RecommendedActions for the instance +func (instance *MSFT_StorageDiagnoseResult) GetPropertyRecommendedActions() (value []string, err error) { + retValue, err := instance.GetProperty("RecommendedActions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosure.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosure.go new file mode 100644 index 00000000..cc98a1a9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosure.go @@ -0,0 +1,520 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageEnclosure struct +type MSFT_StorageEnclosure struct { + *MSFT_StorageFaultDomain + + // + BusType uint16 + + // + CurrentSensorOperationalStatus []uint16 + + // + DeviceId string + + // + FanOperationalStatus []uint16 + + // + FirmwareVersion string + + // + IOControllerOperationalStatus []uint16 + + // + NumberOfSlots uint32 + + // + PowerSupplyOperationalStatus []uint16 + + // + SlotOperationalStatus []uint16 + + // + TemperatureSensorOperationalStatus []uint16 + + // + VoltageSensorOperationalStatus []uint16 +} + +func NewMSFT_StorageEnclosureEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageEnclosure, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageEnclosure{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +func NewMSFT_StorageEnclosureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageEnclosure, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageEnclosure{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +// SetBusType sets the value of BusType for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyBusType(value uint16) (err error) { + return instance.SetProperty("BusType", (value)) +} + +// GetBusType gets the value of BusType for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyBusType() (value uint16, err error) { + retValue, err := instance.GetProperty("BusType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCurrentSensorOperationalStatus sets the value of CurrentSensorOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyCurrentSensorOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("CurrentSensorOperationalStatus", (value)) +} + +// GetCurrentSensorOperationalStatus gets the value of CurrentSensorOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyCurrentSensorOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("CurrentSensorOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetDeviceId sets the value of DeviceId for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyDeviceId(value string) (err error) { + return instance.SetProperty("DeviceId", (value)) +} + +// GetDeviceId gets the value of DeviceId for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyDeviceId() (value string, err error) { + retValue, err := instance.GetProperty("DeviceId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFanOperationalStatus sets the value of FanOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyFanOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("FanOperationalStatus", (value)) +} + +// GetFanOperationalStatus gets the value of FanOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyFanOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("FanOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetFirmwareVersion sets the value of FirmwareVersion for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyFirmwareVersion(value string) (err error) { + return instance.SetProperty("FirmwareVersion", (value)) +} + +// GetFirmwareVersion gets the value of FirmwareVersion for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyFirmwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("FirmwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIOControllerOperationalStatus sets the value of IOControllerOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyIOControllerOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("IOControllerOperationalStatus", (value)) +} + +// GetIOControllerOperationalStatus gets the value of IOControllerOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyIOControllerOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("IOControllerOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetNumberOfSlots sets the value of NumberOfSlots for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyNumberOfSlots(value uint32) (err error) { + return instance.SetProperty("NumberOfSlots", (value)) +} + +// GetNumberOfSlots gets the value of NumberOfSlots for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyNumberOfSlots() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetPowerSupplyOperationalStatus sets the value of PowerSupplyOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyPowerSupplyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("PowerSupplyOperationalStatus", (value)) +} + +// GetPowerSupplyOperationalStatus gets the value of PowerSupplyOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyPowerSupplyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("PowerSupplyOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSlotOperationalStatus sets the value of SlotOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertySlotOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("SlotOperationalStatus", (value)) +} + +// GetSlotOperationalStatus gets the value of SlotOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertySlotOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("SlotOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetTemperatureSensorOperationalStatus sets the value of TemperatureSensorOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyTemperatureSensorOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("TemperatureSensorOperationalStatus", (value)) +} + +// GetTemperatureSensorOperationalStatus gets the value of TemperatureSensorOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyTemperatureSensorOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("TemperatureSensorOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetVoltageSensorOperationalStatus sets the value of VoltageSensorOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) SetPropertyVoltageSensorOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("VoltageSensorOperationalStatus", (value)) +} + +// GetVoltageSensorOperationalStatus gets the value of VoltageSensorOperationalStatus for the instance +func (instance *MSFT_StorageEnclosure) GetPropertyVoltageSensorOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("VoltageSensorOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// + +// +// + +// +// +func (instance *MSFT_StorageEnclosure) IdentifyElement( /* IN */ Enable bool, + /* IN */ SlotNumbers []uint32, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("IdentifyElement", Enable, SlotNumbers) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_StorageEnclosure) GetVendorData( /* IN */ PageNumber uint16, + /* OUT */ VendorData string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetVendorData", PageNumber) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +// +func (instance *MSFT_StorageEnclosure) Maintenance( /* IN */ EnableMaintenanceMode bool, + /* IN */ Timeout uint32, + /* IN */ Model string, + /* IN */ Manufacturer string, + /* IN */ IgnoreDetachedVirtualDisks bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Maintenance", EnableMaintenanceMode, Timeout, Model, Manufacturer, IgnoreDetachedVirtualDisks) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_StorageEnclosure) PowerElement( /* IN */ Off bool, + /* IN */ SlotNumbers []uint32, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("PowerElement", Off, SlotNumbers) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +func (instance *MSFT_StorageEnclosure) GetFirmwareInformation( /* OUT */ SupportsUpdate bool, + /* OUT */ NumberOfSlots uint16, + /* OUT */ ActiveSlotNumber uint16, + /* OUT */ SlotNumber []uint16, + /* OUT */ IsSlotWritable []bool, + /* OUT */ FirmwareVersionInSlot []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetFirmwareInformation") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_StorageEnclosure) UpdateFirmware( /* IN */ ImagePath string, + /* IN */ SlotNumber uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("UpdateFirmware", ImagePath, SlotNumber) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosureToPhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosureToPhysicalDisk.go new file mode 100644 index 00000000..4335f4df --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEnclosureToPhysicalDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageEnclosureToPhysicalDisk struct +type MSFT_StorageEnclosureToPhysicalDisk struct { + *cim.WmiInstance + + // + PhysicalDisk MSFT_PhysicalDisk + + // + StorageEnclosure MSFT_StorageEnclosure +} + +func NewMSFT_StorageEnclosureToPhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageEnclosureToPhysicalDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageEnclosureToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageEnclosureToPhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageEnclosureToPhysicalDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageEnclosureToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +// SetPhysicalDisk sets the value of PhysicalDisk for the instance +func (instance *MSFT_StorageEnclosureToPhysicalDisk) SetPropertyPhysicalDisk(value MSFT_PhysicalDisk) (err error) { + return instance.SetProperty("PhysicalDisk", (value)) +} + +// GetPhysicalDisk gets the value of PhysicalDisk for the instance +func (instance *MSFT_StorageEnclosureToPhysicalDisk) GetPropertyPhysicalDisk() (value MSFT_PhysicalDisk, err error) { + retValue, err := instance.GetProperty("PhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_PhysicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_PhysicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_PhysicalDisk(valuetmp) + + return +} + +// SetStorageEnclosure sets the value of StorageEnclosure for the instance +func (instance *MSFT_StorageEnclosureToPhysicalDisk) SetPropertyStorageEnclosure(value MSFT_StorageEnclosure) (err error) { + return instance.SetProperty("StorageEnclosure", (value)) +} + +// GetStorageEnclosure gets the value of StorageEnclosure for the instance +func (instance *MSFT_StorageEnclosureToPhysicalDisk) GetPropertyStorageEnclosure() (value MSFT_StorageEnclosure, err error) { + retValue, err := instance.GetProperty("StorageEnclosure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageEnclosure) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageEnclosure is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageEnclosure(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEvent.go new file mode 100644 index 00000000..ede9d0a1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageEvent.go @@ -0,0 +1,321 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageEvent struct +type MSFT_StorageEvent struct { + *cim.WmiInstance + + // + Description string + + // + EventTime string + + // + PerceivedSeverity uint16 + + // + SourceClassName string + + // + SourceInstance MSFT_StorageObject + + // + SourceNamespace string + + // + SourceObjectId string + + // + SourceServer string + + // + StorageSubsystemObjectId string +} + +func NewMSFT_StorageEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageEvent, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageEvent{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageEvent, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageEvent{ + WmiInstance: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_StorageEvent) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_StorageEvent) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEventTime sets the value of EventTime for the instance +func (instance *MSFT_StorageEvent) SetPropertyEventTime(value string) (err error) { + return instance.SetProperty("EventTime", (value)) +} + +// GetEventTime gets the value of EventTime for the instance +func (instance *MSFT_StorageEvent) GetPropertyEventTime() (value string, err error) { + retValue, err := instance.GetProperty("EventTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerceivedSeverity sets the value of PerceivedSeverity for the instance +func (instance *MSFT_StorageEvent) SetPropertyPerceivedSeverity(value uint16) (err error) { + return instance.SetProperty("PerceivedSeverity", (value)) +} + +// GetPerceivedSeverity gets the value of PerceivedSeverity for the instance +func (instance *MSFT_StorageEvent) GetPropertyPerceivedSeverity() (value uint16, err error) { + retValue, err := instance.GetProperty("PerceivedSeverity") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSourceClassName sets the value of SourceClassName for the instance +func (instance *MSFT_StorageEvent) SetPropertySourceClassName(value string) (err error) { + return instance.SetProperty("SourceClassName", (value)) +} + +// GetSourceClassName gets the value of SourceClassName for the instance +func (instance *MSFT_StorageEvent) GetPropertySourceClassName() (value string, err error) { + retValue, err := instance.GetProperty("SourceClassName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceInstance sets the value of SourceInstance for the instance +func (instance *MSFT_StorageEvent) SetPropertySourceInstance(value MSFT_StorageObject) (err error) { + return instance.SetProperty("SourceInstance", (value)) +} + +// GetSourceInstance gets the value of SourceInstance for the instance +func (instance *MSFT_StorageEvent) GetPropertySourceInstance() (value MSFT_StorageObject, err error) { + retValue, err := instance.GetProperty("SourceInstance") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageObject) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageObject is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageObject(valuetmp) + + return +} + +// SetSourceNamespace sets the value of SourceNamespace for the instance +func (instance *MSFT_StorageEvent) SetPropertySourceNamespace(value string) (err error) { + return instance.SetProperty("SourceNamespace", (value)) +} + +// GetSourceNamespace gets the value of SourceNamespace for the instance +func (instance *MSFT_StorageEvent) GetPropertySourceNamespace() (value string, err error) { + retValue, err := instance.GetProperty("SourceNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceObjectId sets the value of SourceObjectId for the instance +func (instance *MSFT_StorageEvent) SetPropertySourceObjectId(value string) (err error) { + return instance.SetProperty("SourceObjectId", (value)) +} + +// GetSourceObjectId gets the value of SourceObjectId for the instance +func (instance *MSFT_StorageEvent) GetPropertySourceObjectId() (value string, err error) { + retValue, err := instance.GetProperty("SourceObjectId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSourceServer sets the value of SourceServer for the instance +func (instance *MSFT_StorageEvent) SetPropertySourceServer(value string) (err error) { + return instance.SetProperty("SourceServer", (value)) +} + +// GetSourceServer gets the value of SourceServer for the instance +func (instance *MSFT_StorageEvent) GetPropertySourceServer() (value string, err error) { + retValue, err := instance.GetProperty("SourceServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStorageSubsystemObjectId sets the value of StorageSubsystemObjectId for the instance +func (instance *MSFT_StorageEvent) SetPropertyStorageSubsystemObjectId(value string) (err error) { + return instance.SetProperty("StorageSubsystemObjectId", (value)) +} + +// GetStorageSubsystemObjectId gets the value of StorageSubsystemObjectId for the instance +func (instance *MSFT_StorageEvent) GetPropertyStorageSubsystemObjectId() (value string, err error) { + retValue, err := instance.GetProperty("StorageSubsystemObjectId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageExtendedStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageExtendedStatus.go new file mode 100644 index 00000000..7df63675 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageExtendedStatus.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageExtendedStatus struct +type MSFT_StorageExtendedStatus struct { + *CIM_Error +} + +func NewMSFT_StorageExtendedStatusEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageExtendedStatus, err error) { + tmp, err := NewCIM_ErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageExtendedStatus{ + CIM_Error: tmp, + } + return +} + +func NewMSFT_StorageExtendedStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageExtendedStatus, err error) { + tmp, err := NewCIM_ErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageExtendedStatus{ + CIM_Error: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomain.go new file mode 100644 index 00000000..6b206749 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomain.go @@ -0,0 +1,322 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageFaultDomain struct +type MSFT_StorageFaultDomain struct { + *MSFT_StorageObject + + // + Description string + + // + FriendlyName string + + // + HealthStatus uint16 + + // + Manufacturer string + + // + Model string + + // + OperationalDetails []string + + // + OperationalStatus []uint16 + + // + PhysicalLocation string + + // + SerialNumber string +} + +func NewMSFT_StorageFaultDomainEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageFaultDomain, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageFaultDomain{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageFaultDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageFaultDomain, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageFaultDomain{ + MSFT_StorageObject: tmp, + } + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperationalDetails sets the value of OperationalDetails for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyOperationalDetails(value []string) (err error) { + return instance.SetProperty("OperationalDetails", (value)) +} + +// GetOperationalDetails gets the value of OperationalDetails for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyOperationalDetails() (value []string, err error) { + retValue, err := instance.GetProperty("OperationalDetails") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPhysicalLocation sets the value of PhysicalLocation for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertyPhysicalLocation(value string) (err error) { + return instance.SetProperty("PhysicalLocation", (value)) +} + +// GetPhysicalLocation gets the value of PhysicalLocation for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertyPhysicalLocation() (value string, err error) { + retValue, err := instance.GetProperty("PhysicalLocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *MSFT_StorageFaultDomain) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *MSFT_StorageFaultDomain) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomainToStorageFaultDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomainToStorageFaultDomain.go new file mode 100644 index 00000000..cc4be93d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultDomainToStorageFaultDomain.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageFaultDomainToStorageFaultDomain struct +type MSFT_StorageFaultDomainToStorageFaultDomain struct { + *cim.WmiInstance + + // + SourceStorageFaultDomain MSFT_StorageFaultDomain + + // + TargetStorageFaultDomain MSFT_StorageFaultDomain +} + +func NewMSFT_StorageFaultDomainToStorageFaultDomainEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageFaultDomainToStorageFaultDomain, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageFaultDomainToStorageFaultDomain{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageFaultDomainToStorageFaultDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageFaultDomainToStorageFaultDomain, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageFaultDomainToStorageFaultDomain{ + WmiInstance: tmp, + } + return +} + +// SetSourceStorageFaultDomain sets the value of SourceStorageFaultDomain for the instance +func (instance *MSFT_StorageFaultDomainToStorageFaultDomain) SetPropertySourceStorageFaultDomain(value MSFT_StorageFaultDomain) (err error) { + return instance.SetProperty("SourceStorageFaultDomain", (value)) +} + +// GetSourceStorageFaultDomain gets the value of SourceStorageFaultDomain for the instance +func (instance *MSFT_StorageFaultDomainToStorageFaultDomain) GetPropertySourceStorageFaultDomain() (value MSFT_StorageFaultDomain, err error) { + retValue, err := instance.GetProperty("SourceStorageFaultDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageFaultDomain) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageFaultDomain is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageFaultDomain(valuetmp) + + return +} + +// SetTargetStorageFaultDomain sets the value of TargetStorageFaultDomain for the instance +func (instance *MSFT_StorageFaultDomainToStorageFaultDomain) SetPropertyTargetStorageFaultDomain(value MSFT_StorageFaultDomain) (err error) { + return instance.SetProperty("TargetStorageFaultDomain", (value)) +} + +// GetTargetStorageFaultDomain gets the value of TargetStorageFaultDomain for the instance +func (instance *MSFT_StorageFaultDomainToStorageFaultDomain) GetPropertyTargetStorageFaultDomain() (value MSFT_StorageFaultDomain, err error) { + retValue, err := instance.GetProperty("TargetStorageFaultDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageFaultDomain) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageFaultDomain is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageFaultDomain(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultEvent.go new file mode 100644 index 00000000..c694fe00 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageFaultEvent.go @@ -0,0 +1,381 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageFaultEvent struct +type MSFT_StorageFaultEvent struct { + *MSFT_StorageEvent + + // + ChangeType uint16 + + // + FaultId string + + // + FaultingObjectDescription string + + // + FaultingObjectLocation string + + // + FaultingObjectType string + + // + FaultingObjectUniqueId string + + // + FaultType string + + // + Reason string + + // + RecommendedActions []string + + // + SourceUniqueId string + + // + StorageSubsystemUniqueId string +} + +func NewMSFT_StorageFaultEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageFaultEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageFaultEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_StorageFaultEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageFaultEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageFaultEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +// SetChangeType sets the value of ChangeType for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyChangeType(value uint16) (err error) { + return instance.SetProperty("ChangeType", (value)) +} + +// GetChangeType gets the value of ChangeType for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyChangeType() (value uint16, err error) { + retValue, err := instance.GetProperty("ChangeType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFaultId sets the value of FaultId for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyFaultId(value string) (err error) { + return instance.SetProperty("FaultId", (value)) +} + +// GetFaultId gets the value of FaultId for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyFaultId() (value string, err error) { + retValue, err := instance.GetProperty("FaultId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectDescription sets the value of FaultingObjectDescription for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyFaultingObjectDescription(value string) (err error) { + return instance.SetProperty("FaultingObjectDescription", (value)) +} + +// GetFaultingObjectDescription gets the value of FaultingObjectDescription for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyFaultingObjectDescription() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectLocation sets the value of FaultingObjectLocation for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyFaultingObjectLocation(value string) (err error) { + return instance.SetProperty("FaultingObjectLocation", (value)) +} + +// GetFaultingObjectLocation gets the value of FaultingObjectLocation for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyFaultingObjectLocation() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectLocation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectType sets the value of FaultingObjectType for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyFaultingObjectType(value string) (err error) { + return instance.SetProperty("FaultingObjectType", (value)) +} + +// GetFaultingObjectType gets the value of FaultingObjectType for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyFaultingObjectType() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultingObjectUniqueId sets the value of FaultingObjectUniqueId for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyFaultingObjectUniqueId(value string) (err error) { + return instance.SetProperty("FaultingObjectUniqueId", (value)) +} + +// GetFaultingObjectUniqueId gets the value of FaultingObjectUniqueId for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyFaultingObjectUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("FaultingObjectUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultType sets the value of FaultType for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyFaultType(value string) (err error) { + return instance.SetProperty("FaultType", (value)) +} + +// GetFaultType gets the value of FaultType for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyFaultType() (value string, err error) { + retValue, err := instance.GetProperty("FaultType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReason sets the value of Reason for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyReason(value string) (err error) { + return instance.SetProperty("Reason", (value)) +} + +// GetReason gets the value of Reason for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyReason() (value string, err error) { + retValue, err := instance.GetProperty("Reason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRecommendedActions sets the value of RecommendedActions for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyRecommendedActions(value []string) (err error) { + return instance.SetProperty("RecommendedActions", (value)) +} + +// GetRecommendedActions gets the value of RecommendedActions for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyRecommendedActions() (value []string, err error) { + retValue, err := instance.GetProperty("RecommendedActions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSourceUniqueId sets the value of SourceUniqueId for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertySourceUniqueId(value string) (err error) { + return instance.SetProperty("SourceUniqueId", (value)) +} + +// GetSourceUniqueId gets the value of SourceUniqueId for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertySourceUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("SourceUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStorageSubsystemUniqueId sets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_StorageFaultEvent) SetPropertyStorageSubsystemUniqueId(value string) (err error) { + return instance.SetProperty("StorageSubsystemUniqueId", (value)) +} + +// GetStorageSubsystemUniqueId gets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_StorageFaultEvent) GetPropertyStorageSubsystemUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("StorageSubsystemUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealth.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealth.go new file mode 100644 index 00000000..09fb6319 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealth.go @@ -0,0 +1,176 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageHealth struct +type MSFT_StorageHealth struct { + *MSFT_StorageObject +} + +func NewMSFT_StorageHealthEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageHealth, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageHealth{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageHealthEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageHealth, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageHealth{ + MSFT_StorageObject: tmp, + } + return +} + +// + +// + +// +// +// +func (instance *MSFT_StorageHealth) GetSetting( /* IN */ Name string, + /* OUT */ StorageHealthSetting []MSFT_StorageHealthSetting, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSetting", Name) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_StorageHealth) SetSetting( /* IN */ Name string, + /* IN */ Value string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetSetting", Name, Value) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageHealth) RemoveSetting( /* IN */ Name string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveSetting", Name) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_StorageHealth) GetReport( /* IN */ TargetObject MSFT_StorageObject, + /* IN */ Count uint32, + /* OUT */ Reports []MSFT_StorageHealthReport, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetReport", TargetObject, Count) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_StorageHealth) Maintenance( /* IN */ TargetObject MSFT_StorageFaultDomain, + /* IN */ EnableMaintenanceMode bool, + /* IN */ IgnoreDetachedVirtualDisks bool, + /* IN */ Timeout uint32, + /* IN */ Model string, + /* IN */ Manufacturer string, + /* IN */ ValidationFlags uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Maintenance", TargetObject, EnableMaintenanceMode, IgnoreDetachedVirtualDisks, Timeout, Model, Manufacturer, ValidationFlags) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageHealth) RemoveIntent( /* IN */ TargetObject MSFT_StorageObject, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveIntent", TargetObject) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthReport.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthReport.go new file mode 100644 index 00000000..20e65675 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthReport.go @@ -0,0 +1,142 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageHealthReport struct +type MSFT_StorageHealthReport struct { + *cim.WmiInstance + + // + Records []MSFT_HealthRecord + + // + ReportedObjectUniqueId string + + // + StorageSubsystemUniqueId string +} + +func NewMSFT_StorageHealthReportEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageHealthReport, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageHealthReport{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageHealthReportEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageHealthReport, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageHealthReport{ + WmiInstance: tmp, + } + return +} + +// SetRecords sets the value of Records for the instance +func (instance *MSFT_StorageHealthReport) SetPropertyRecords(value []MSFT_HealthRecord) (err error) { + return instance.SetProperty("Records", (value)) +} + +// GetRecords gets the value of Records for the instance +func (instance *MSFT_StorageHealthReport) GetPropertyRecords() (value []MSFT_HealthRecord, err error) { + retValue, err := instance.GetProperty("Records") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(MSFT_HealthRecord) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_HealthRecord is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, MSFT_HealthRecord(valuetmp)) + } + + return +} + +// SetReportedObjectUniqueId sets the value of ReportedObjectUniqueId for the instance +func (instance *MSFT_StorageHealthReport) SetPropertyReportedObjectUniqueId(value string) (err error) { + return instance.SetProperty("ReportedObjectUniqueId", (value)) +} + +// GetReportedObjectUniqueId gets the value of ReportedObjectUniqueId for the instance +func (instance *MSFT_StorageHealthReport) GetPropertyReportedObjectUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("ReportedObjectUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStorageSubsystemUniqueId sets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_StorageHealthReport) SetPropertyStorageSubsystemUniqueId(value string) (err error) { + return instance.SetProperty("StorageSubsystemUniqueId", (value)) +} + +// GetStorageSubsystemUniqueId gets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_StorageHealthReport) GetPropertyStorageSubsystemUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("StorageSubsystemUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthSetting.go new file mode 100644 index 00000000..4c117e47 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageHealthSetting struct +type MSFT_StorageHealthSetting struct { + *cim.WmiInstance + + // + Name string + + // + Value string +} + +func NewMSFT_StorageHealthSettingEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageHealthSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageHealthSetting{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageHealthSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageHealthSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageHealthSetting{ + WmiInstance: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StorageHealthSetting) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StorageHealthSetting) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetValue sets the value of Value for the instance +func (instance *MSFT_StorageHealthSetting) SetPropertyValue(value string) (err error) { + return instance.SetProperty("Value", (value)) +} + +// GetValue gets the value of Value for the instance +func (instance *MSFT_StorageHealthSetting) GetPropertyValue() (value string, err error) { + retValue, err := instance.GetProperty("Value") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthStatusChangeEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthStatusChangeEvent.go new file mode 100644 index 00000000..121d4cd7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageHealthStatusChangeEvent.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageHealthStatusChangeEvent struct +type MSFT_StorageHealthStatusChangeEvent struct { + *MSFT_StorageEvent + + // + CurrentHealthStatus uint16 + + // + PreviousHealthStatus uint16 + + // + SourceUniqueId string + + // + StorageSubsystemUniqueId string +} + +func NewMSFT_StorageHealthStatusChangeEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageHealthStatusChangeEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageHealthStatusChangeEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_StorageHealthStatusChangeEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageHealthStatusChangeEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageHealthStatusChangeEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +// SetCurrentHealthStatus sets the value of CurrentHealthStatus for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) SetPropertyCurrentHealthStatus(value uint16) (err error) { + return instance.SetProperty("CurrentHealthStatus", (value)) +} + +// GetCurrentHealthStatus gets the value of CurrentHealthStatus for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) GetPropertyCurrentHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("CurrentHealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPreviousHealthStatus sets the value of PreviousHealthStatus for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) SetPropertyPreviousHealthStatus(value uint16) (err error) { + return instance.SetProperty("PreviousHealthStatus", (value)) +} + +// GetPreviousHealthStatus gets the value of PreviousHealthStatus for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) GetPropertyPreviousHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("PreviousHealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSourceUniqueId sets the value of SourceUniqueId for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) SetPropertySourceUniqueId(value string) (err error) { + return instance.SetProperty("SourceUniqueId", (value)) +} + +// GetSourceUniqueId gets the value of SourceUniqueId for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) GetPropertySourceUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("SourceUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStorageSubsystemUniqueId sets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) SetPropertyStorageSubsystemUniqueId(value string) (err error) { + return instance.SetProperty("StorageSubsystemUniqueId", (value)) +} + +// GetStorageSubsystemUniqueId gets the value of StorageSubsystemUniqueId for the instance +func (instance *MSFT_StorageHealthStatusChangeEvent) GetPropertyStorageSubsystemUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("StorageSubsystemUniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJob.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJob.go new file mode 100644 index 00000000..5168145a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJob.go @@ -0,0 +1,747 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageJob struct +type MSFT_StorageJob struct { + *MSFT_StorageObject + + // + BytesProcessed uint64 + + // + BytesTotal uint64 + + // + DeleteOnCompletion bool + + // + Description string + + // + ElapsedTime string + + // + ErrorCode uint16 + + // + ErrorDescription string + + // + IsBackgroundTask bool + + // + JobState uint16 + + // + JobStatus string + + // + LocalOrUtcTime uint16 + + // + Name string + + // + OperationalStatus []uint16 + + // + OtherRecoveryAction string + + // + PercentComplete uint16 + + // + RecoveryAction uint16 + + // + StartTime string + + // + StatusDescriptions []string + + // + TimeBeforeRemoval string + + // + TimeOfLastStateChange string + + // + TimeSubmitted string +} + +func NewMSFT_StorageJobEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageJob, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageJob{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageJobEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageJob, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageJob{ + MSFT_StorageObject: tmp, + } + return +} + +// SetBytesProcessed sets the value of BytesProcessed for the instance +func (instance *MSFT_StorageJob) SetPropertyBytesProcessed(value uint64) (err error) { + return instance.SetProperty("BytesProcessed", (value)) +} + +// GetBytesProcessed gets the value of BytesProcessed for the instance +func (instance *MSFT_StorageJob) GetPropertyBytesProcessed() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesProcessed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBytesTotal sets the value of BytesTotal for the instance +func (instance *MSFT_StorageJob) SetPropertyBytesTotal(value uint64) (err error) { + return instance.SetProperty("BytesTotal", (value)) +} + +// GetBytesTotal gets the value of BytesTotal for the instance +func (instance *MSFT_StorageJob) GetPropertyBytesTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("BytesTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetDeleteOnCompletion sets the value of DeleteOnCompletion for the instance +func (instance *MSFT_StorageJob) SetPropertyDeleteOnCompletion(value bool) (err error) { + return instance.SetProperty("DeleteOnCompletion", (value)) +} + +// GetDeleteOnCompletion gets the value of DeleteOnCompletion for the instance +func (instance *MSFT_StorageJob) GetPropertyDeleteOnCompletion() (value bool, err error) { + retValue, err := instance.GetProperty("DeleteOnCompletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_StorageJob) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_StorageJob) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetElapsedTime sets the value of ElapsedTime for the instance +func (instance *MSFT_StorageJob) SetPropertyElapsedTime(value string) (err error) { + return instance.SetProperty("ElapsedTime", (value)) +} + +// GetElapsedTime gets the value of ElapsedTime for the instance +func (instance *MSFT_StorageJob) GetPropertyElapsedTime() (value string, err error) { + retValue, err := instance.GetProperty("ElapsedTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetErrorCode sets the value of ErrorCode for the instance +func (instance *MSFT_StorageJob) SetPropertyErrorCode(value uint16) (err error) { + return instance.SetProperty("ErrorCode", (value)) +} + +// GetErrorCode gets the value of ErrorCode for the instance +func (instance *MSFT_StorageJob) GetPropertyErrorCode() (value uint16, err error) { + retValue, err := instance.GetProperty("ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *MSFT_StorageJob) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *MSFT_StorageJob) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsBackgroundTask sets the value of IsBackgroundTask for the instance +func (instance *MSFT_StorageJob) SetPropertyIsBackgroundTask(value bool) (err error) { + return instance.SetProperty("IsBackgroundTask", (value)) +} + +// GetIsBackgroundTask gets the value of IsBackgroundTask for the instance +func (instance *MSFT_StorageJob) GetPropertyIsBackgroundTask() (value bool, err error) { + retValue, err := instance.GetProperty("IsBackgroundTask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetJobState sets the value of JobState for the instance +func (instance *MSFT_StorageJob) SetPropertyJobState(value uint16) (err error) { + return instance.SetProperty("JobState", (value)) +} + +// GetJobState gets the value of JobState for the instance +func (instance *MSFT_StorageJob) GetPropertyJobState() (value uint16, err error) { + retValue, err := instance.GetProperty("JobState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetJobStatus sets the value of JobStatus for the instance +func (instance *MSFT_StorageJob) SetPropertyJobStatus(value string) (err error) { + return instance.SetProperty("JobStatus", (value)) +} + +// GetJobStatus gets the value of JobStatus for the instance +func (instance *MSFT_StorageJob) GetPropertyJobStatus() (value string, err error) { + retValue, err := instance.GetProperty("JobStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetLocalOrUtcTime sets the value of LocalOrUtcTime for the instance +func (instance *MSFT_StorageJob) SetPropertyLocalOrUtcTime(value uint16) (err error) { + return instance.SetProperty("LocalOrUtcTime", (value)) +} + +// GetLocalOrUtcTime gets the value of LocalOrUtcTime for the instance +func (instance *MSFT_StorageJob) GetPropertyLocalOrUtcTime() (value uint16, err error) { + retValue, err := instance.GetProperty("LocalOrUtcTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StorageJob) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StorageJob) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StorageJob) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StorageJob) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherRecoveryAction sets the value of OtherRecoveryAction for the instance +func (instance *MSFT_StorageJob) SetPropertyOtherRecoveryAction(value string) (err error) { + return instance.SetProperty("OtherRecoveryAction", (value)) +} + +// GetOtherRecoveryAction gets the value of OtherRecoveryAction for the instance +func (instance *MSFT_StorageJob) GetPropertyOtherRecoveryAction() (value string, err error) { + retValue, err := instance.GetProperty("OtherRecoveryAction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPercentComplete sets the value of PercentComplete for the instance +func (instance *MSFT_StorageJob) SetPropertyPercentComplete(value uint16) (err error) { + return instance.SetProperty("PercentComplete", (value)) +} + +// GetPercentComplete gets the value of PercentComplete for the instance +func (instance *MSFT_StorageJob) GetPropertyPercentComplete() (value uint16, err error) { + retValue, err := instance.GetProperty("PercentComplete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRecoveryAction sets the value of RecoveryAction for the instance +func (instance *MSFT_StorageJob) SetPropertyRecoveryAction(value uint16) (err error) { + return instance.SetProperty("RecoveryAction", (value)) +} + +// GetRecoveryAction gets the value of RecoveryAction for the instance +func (instance *MSFT_StorageJob) GetPropertyRecoveryAction() (value uint16, err error) { + retValue, err := instance.GetProperty("RecoveryAction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetStartTime sets the value of StartTime for the instance +func (instance *MSFT_StorageJob) SetPropertyStartTime(value string) (err error) { + return instance.SetProperty("StartTime", (value)) +} + +// GetStartTime gets the value of StartTime for the instance +func (instance *MSFT_StorageJob) GetPropertyStartTime() (value string, err error) { + retValue, err := instance.GetProperty("StartTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStatusDescriptions sets the value of StatusDescriptions for the instance +func (instance *MSFT_StorageJob) SetPropertyStatusDescriptions(value []string) (err error) { + return instance.SetProperty("StatusDescriptions", (value)) +} + +// GetStatusDescriptions gets the value of StatusDescriptions for the instance +func (instance *MSFT_StorageJob) GetPropertyStatusDescriptions() (value []string, err error) { + retValue, err := instance.GetProperty("StatusDescriptions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetTimeBeforeRemoval sets the value of TimeBeforeRemoval for the instance +func (instance *MSFT_StorageJob) SetPropertyTimeBeforeRemoval(value string) (err error) { + return instance.SetProperty("TimeBeforeRemoval", (value)) +} + +// GetTimeBeforeRemoval gets the value of TimeBeforeRemoval for the instance +func (instance *MSFT_StorageJob) GetPropertyTimeBeforeRemoval() (value string, err error) { + retValue, err := instance.GetProperty("TimeBeforeRemoval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeOfLastStateChange sets the value of TimeOfLastStateChange for the instance +func (instance *MSFT_StorageJob) SetPropertyTimeOfLastStateChange(value string) (err error) { + return instance.SetProperty("TimeOfLastStateChange", (value)) +} + +// GetTimeOfLastStateChange gets the value of TimeOfLastStateChange for the instance +func (instance *MSFT_StorageJob) GetPropertyTimeOfLastStateChange() (value string, err error) { + retValue, err := instance.GetProperty("TimeOfLastStateChange") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeSubmitted sets the value of TimeSubmitted for the instance +func (instance *MSFT_StorageJob) SetPropertyTimeSubmitted(value string) (err error) { + return instance.SetProperty("TimeSubmitted", (value)) +} + +// GetTimeSubmitted gets the value of TimeSubmitted for the instance +func (instance *MSFT_StorageJob) GetPropertyTimeSubmitted() (value string, err error) { + retValue, err := instance.GetProperty("TimeSubmitted") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// + +// +// +func (instance *MSFT_StorageJob) RequestStateChange( /* IN */ RequestedState uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RequestStateChange", RequestedState) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_StorageJob) GetExtendedStatus( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetExtendedStatus") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_StorageJob) GetMessages( /* OUT */ Channels []uint16, + /* OUT */ Messages []string) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetMessages") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_StorageJob) GetOutParameters( /* OUT */ OutParameters MSFT_StorageJobOutParams) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetOutParameters") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobOutParams.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobOutParams.go new file mode 100644 index 00000000..b465e315 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobOutParams.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageJobOutParams struct +type MSFT_StorageJobOutParams struct { + *cim.WmiInstance +} + +func NewMSFT_StorageJobOutParamsEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageJobOutParams, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageJobOutParams{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageJobOutParamsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageJobOutParams, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageJobOutParams{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobToAffectedStorageObject.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobToAffectedStorageObject.go new file mode 100644 index 00000000..47cf886c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageJobToAffectedStorageObject.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageJobToAffectedStorageObject struct +type MSFT_StorageJobToAffectedStorageObject struct { + *cim.WmiInstance + + // + AffectedStorageObject MSFT_StorageObject + + // + StorageJob MSFT_StorageJob +} + +func NewMSFT_StorageJobToAffectedStorageObjectEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageJobToAffectedStorageObject, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageJobToAffectedStorageObject{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageJobToAffectedStorageObjectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageJobToAffectedStorageObject, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageJobToAffectedStorageObject{ + WmiInstance: tmp, + } + return +} + +// SetAffectedStorageObject sets the value of AffectedStorageObject for the instance +func (instance *MSFT_StorageJobToAffectedStorageObject) SetPropertyAffectedStorageObject(value MSFT_StorageObject) (err error) { + return instance.SetProperty("AffectedStorageObject", (value)) +} + +// GetAffectedStorageObject gets the value of AffectedStorageObject for the instance +func (instance *MSFT_StorageJobToAffectedStorageObject) GetPropertyAffectedStorageObject() (value MSFT_StorageObject, err error) { + retValue, err := instance.GetProperty("AffectedStorageObject") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageObject) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageObject is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageObject(valuetmp) + + return +} + +// SetStorageJob sets the value of StorageJob for the instance +func (instance *MSFT_StorageJobToAffectedStorageObject) SetPropertyStorageJob(value MSFT_StorageJob) (err error) { + return instance.SetProperty("StorageJob", (value)) +} + +// GetStorageJob gets the value of StorageJob for the instance +func (instance *MSFT_StorageJobToAffectedStorageObject) GetPropertyStorageJob() (value MSFT_StorageJob, err error) { + retValue, err := instance.GetProperty("StorageJob") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageJob) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageJob is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageJob(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageModificationEvent.go new file mode 100644 index 00000000..2674815a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageModificationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageModificationEvent struct +type MSFT_StorageModificationEvent struct { + *MSFT_StorageEvent +} + +func NewMSFT_StorageModificationEventEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageModificationEvent, err error) { + tmp, err := NewMSFT_StorageEventEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageModificationEvent{ + MSFT_StorageEvent: tmp, + } + return +} + +func NewMSFT_StorageModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageModificationEvent, err error) { + tmp, err := NewMSFT_StorageEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageModificationEvent{ + MSFT_StorageEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNode.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNode.go new file mode 100644 index 00000000..cba00848 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNode.go @@ -0,0 +1,322 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNode struct +type MSFT_StorageNode struct { + *MSFT_StorageObject + + // + FirmwareVersion string + + // + Manufacturer string + + // + Model string + + // + Name string + + // + NameFormat uint16 + + // + OperationalStatus uint16 + + // + OtherIdentifyingInfo []string + + // + OtherIdentifyingInfoDescription []string + + // + SerialNumber string +} + +func NewMSFT_StorageNodeEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNode, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageNode{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageNodeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNode, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNode{ + MSFT_StorageObject: tmp, + } + return +} + +// SetFirmwareVersion sets the value of FirmwareVersion for the instance +func (instance *MSFT_StorageNode) SetPropertyFirmwareVersion(value string) (err error) { + return instance.SetProperty("FirmwareVersion", (value)) +} + +// GetFirmwareVersion gets the value of FirmwareVersion for the instance +func (instance *MSFT_StorageNode) GetPropertyFirmwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("FirmwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *MSFT_StorageNode) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *MSFT_StorageNode) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetModel sets the value of Model for the instance +func (instance *MSFT_StorageNode) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *MSFT_StorageNode) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StorageNode) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StorageNode) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNameFormat sets the value of NameFormat for the instance +func (instance *MSFT_StorageNode) SetPropertyNameFormat(value uint16) (err error) { + return instance.SetProperty("NameFormat", (value)) +} + +// GetNameFormat gets the value of NameFormat for the instance +func (instance *MSFT_StorageNode) GetPropertyNameFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("NameFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StorageNode) SetPropertyOperationalStatus(value uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StorageNode) GetPropertyOperationalStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOtherIdentifyingInfo sets the value of OtherIdentifyingInfo for the instance +func (instance *MSFT_StorageNode) SetPropertyOtherIdentifyingInfo(value []string) (err error) { + return instance.SetProperty("OtherIdentifyingInfo", (value)) +} + +// GetOtherIdentifyingInfo gets the value of OtherIdentifyingInfo for the instance +func (instance *MSFT_StorageNode) GetPropertyOtherIdentifyingInfo() (value []string, err error) { + retValue, err := instance.GetProperty("OtherIdentifyingInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOtherIdentifyingInfoDescription sets the value of OtherIdentifyingInfoDescription for the instance +func (instance *MSFT_StorageNode) SetPropertyOtherIdentifyingInfoDescription(value []string) (err error) { + return instance.SetProperty("OtherIdentifyingInfoDescription", (value)) +} + +// GetOtherIdentifyingInfoDescription gets the value of OtherIdentifyingInfoDescription for the instance +func (instance *MSFT_StorageNode) GetPropertyOtherIdentifyingInfoDescription() (value []string, err error) { + retValue, err := instance.GetProperty("OtherIdentifyingInfoDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *MSFT_StorageNode) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *MSFT_StorageNode) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToDisk.go new file mode 100644 index 00000000..b0a81cfa --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToDisk.go @@ -0,0 +1,292 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNodeToDisk struct +type MSFT_StorageNodeToDisk struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + DiskNumber uint32 + + // + HealthStatus uint16 + + // + IsOffline bool + + // + IsReadOnly bool + + // + OfflineReason uint16 + + // + OperationalStatus []uint16 + + // + StorageNode MSFT_StorageNode +} + +func NewMSFT_StorageNodeToDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNodeToDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageNodeToDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNodeToDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToDisk{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetDiskNumber sets the value of DiskNumber for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyDiskNumber(value uint32) (err error) { + return instance.SetProperty("DiskNumber", (value)) +} + +// GetDiskNumber gets the value of DiskNumber for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyDiskNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIsOffline sets the value of IsOffline for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyIsOffline(value bool) (err error) { + return instance.SetProperty("IsOffline", (value)) +} + +// GetIsOffline gets the value of IsOffline for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyIsOffline() (value bool, err error) { + retValue, err := instance.GetProperty("IsOffline") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsReadOnly sets the value of IsReadOnly for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyIsReadOnly(value bool) (err error) { + return instance.SetProperty("IsReadOnly", (value)) +} + +// GetIsReadOnly gets the value of IsReadOnly for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyIsReadOnly() (value bool, err error) { + retValue, err := instance.GetProperty("IsReadOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOfflineReason sets the value of OfflineReason for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyOfflineReason(value uint16) (err error) { + return instance.SetProperty("OfflineReason", (value)) +} + +// GetOfflineReason gets the value of OfflineReason for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyOfflineReason() (value uint16, err error) { + retValue, err := instance.GetProperty("OfflineReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToDisk) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToDisk) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToPhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToPhysicalDisk.go new file mode 100644 index 00000000..d177647c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToPhysicalDisk.go @@ -0,0 +1,354 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNodeToPhysicalDisk struct +type MSFT_StorageNodeToPhysicalDisk struct { + *cim.WmiInstance + + // + DiskNumber uint32 + + // + HealthStatus uint16 + + // + IsMpioEnabled bool + + // + IsPhysicallyConnected bool + + // + LoadBalancePolicy uint16 + + // + OperationalStatus []uint16 + + // + PathId []string + + // + PathState []uint16 + + // + PhysicalDisk MSFT_PhysicalDisk + + // + StorageNode MSFT_StorageNode +} + +func NewMSFT_StorageNodeToPhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNodeToPhysicalDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageNodeToPhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNodeToPhysicalDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +// SetDiskNumber sets the value of DiskNumber for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyDiskNumber(value uint32) (err error) { + return instance.SetProperty("DiskNumber", (value)) +} + +// GetDiskNumber gets the value of DiskNumber for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyDiskNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("DiskNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIsMpioEnabled sets the value of IsMpioEnabled for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyIsMpioEnabled(value bool) (err error) { + return instance.SetProperty("IsMpioEnabled", (value)) +} + +// GetIsMpioEnabled gets the value of IsMpioEnabled for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyIsMpioEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IsMpioEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsPhysicallyConnected sets the value of IsPhysicallyConnected for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyIsPhysicallyConnected(value bool) (err error) { + return instance.SetProperty("IsPhysicallyConnected", (value)) +} + +// GetIsPhysicallyConnected gets the value of IsPhysicallyConnected for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyIsPhysicallyConnected() (value bool, err error) { + retValue, err := instance.GetProperty("IsPhysicallyConnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLoadBalancePolicy sets the value of LoadBalancePolicy for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyLoadBalancePolicy(value uint16) (err error) { + return instance.SetProperty("LoadBalancePolicy", (value)) +} + +// GetLoadBalancePolicy gets the value of LoadBalancePolicy for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyLoadBalancePolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("LoadBalancePolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPathId sets the value of PathId for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyPathId(value []string) (err error) { + return instance.SetProperty("PathId", (value)) +} + +// GetPathId gets the value of PathId for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyPathId() (value []string, err error) { + retValue, err := instance.GetProperty("PathId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetPathState sets the value of PathState for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyPathState(value []uint16) (err error) { + return instance.SetProperty("PathState", (value)) +} + +// GetPathState gets the value of PathState for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyPathState() (value []uint16, err error) { + retValue, err := instance.GetProperty("PathState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPhysicalDisk sets the value of PhysicalDisk for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyPhysicalDisk(value MSFT_PhysicalDisk) (err error) { + return instance.SetProperty("PhysicalDisk", (value)) +} + +// GetPhysicalDisk gets the value of PhysicalDisk for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyPhysicalDisk() (value MSFT_PhysicalDisk, err error) { + retValue, err := instance.GetProperty("PhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_PhysicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_PhysicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_PhysicalDisk(valuetmp) + + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToPhysicalDisk) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStorageEnclosure.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStorageEnclosure.go new file mode 100644 index 00000000..3ae28efb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStorageEnclosure.go @@ -0,0 +1,418 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNodeToStorageEnclosure struct +type MSFT_StorageNodeToStorageEnclosure struct { + *cim.WmiInstance + + // + CurrentSensorOperationalStatus []uint16 + + // + EnclosureNumber uint32 + + // + FanOperationalStatus []uint16 + + // + HealthStatus uint16 + + // + IOControllerOperationalStatus []uint16 + + // + IsPhysicallyConnected bool + + // + PowerSupplyOperationalStatus []uint16 + + // + SlotOperationalStatus []uint16 + + // + StorageEnclosure MSFT_StorageEnclosure + + // + StorageNode MSFT_StorageNode + + // + TemperatureSensorOperationalStatus []uint16 + + // + VoltageSensorOperationalStatus []uint16 +} + +func NewMSFT_StorageNodeToStorageEnclosureEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNodeToStorageEnclosure, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToStorageEnclosure{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageNodeToStorageEnclosureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNodeToStorageEnclosure, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToStorageEnclosure{ + WmiInstance: tmp, + } + return +} + +// SetCurrentSensorOperationalStatus sets the value of CurrentSensorOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyCurrentSensorOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("CurrentSensorOperationalStatus", (value)) +} + +// GetCurrentSensorOperationalStatus gets the value of CurrentSensorOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyCurrentSensorOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("CurrentSensorOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetEnclosureNumber sets the value of EnclosureNumber for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyEnclosureNumber(value uint32) (err error) { + return instance.SetProperty("EnclosureNumber", (value)) +} + +// GetEnclosureNumber gets the value of EnclosureNumber for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyEnclosureNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("EnclosureNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFanOperationalStatus sets the value of FanOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyFanOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("FanOperationalStatus", (value)) +} + +// GetFanOperationalStatus gets the value of FanOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyFanOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("FanOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIOControllerOperationalStatus sets the value of IOControllerOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyIOControllerOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("IOControllerOperationalStatus", (value)) +} + +// GetIOControllerOperationalStatus gets the value of IOControllerOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyIOControllerOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("IOControllerOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetIsPhysicallyConnected sets the value of IsPhysicallyConnected for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyIsPhysicallyConnected(value bool) (err error) { + return instance.SetProperty("IsPhysicallyConnected", (value)) +} + +// GetIsPhysicallyConnected gets the value of IsPhysicallyConnected for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyIsPhysicallyConnected() (value bool, err error) { + retValue, err := instance.GetProperty("IsPhysicallyConnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPowerSupplyOperationalStatus sets the value of PowerSupplyOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyPowerSupplyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("PowerSupplyOperationalStatus", (value)) +} + +// GetPowerSupplyOperationalStatus gets the value of PowerSupplyOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyPowerSupplyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("PowerSupplyOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSlotOperationalStatus sets the value of SlotOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertySlotOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("SlotOperationalStatus", (value)) +} + +// GetSlotOperationalStatus gets the value of SlotOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertySlotOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("SlotOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetStorageEnclosure sets the value of StorageEnclosure for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyStorageEnclosure(value MSFT_StorageEnclosure) (err error) { + return instance.SetProperty("StorageEnclosure", (value)) +} + +// GetStorageEnclosure gets the value of StorageEnclosure for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyStorageEnclosure() (value MSFT_StorageEnclosure, err error) { + retValue, err := instance.GetProperty("StorageEnclosure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageEnclosure) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageEnclosure is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageEnclosure(valuetmp) + + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} + +// SetTemperatureSensorOperationalStatus sets the value of TemperatureSensorOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyTemperatureSensorOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("TemperatureSensorOperationalStatus", (value)) +} + +// GetTemperatureSensorOperationalStatus gets the value of TemperatureSensorOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyTemperatureSensorOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("TemperatureSensorOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetVoltageSensorOperationalStatus sets the value of VoltageSensorOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) SetPropertyVoltageSensorOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("VoltageSensorOperationalStatus", (value)) +} + +// GetVoltageSensorOperationalStatus gets the value of VoltageSensorOperationalStatus for the instance +func (instance *MSFT_StorageNodeToStorageEnclosure) GetPropertyVoltageSensorOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("VoltageSensorOperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStoragePool.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStoragePool.go new file mode 100644 index 00000000..2cded689 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToStoragePool.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNodeToStoragePool struct +type MSFT_StorageNodeToStoragePool struct { + *cim.WmiInstance + + // + StorageNode MSFT_StorageNode + + // + StoragePool MSFT_StoragePool +} + +func NewMSFT_StorageNodeToStoragePoolEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNodeToStoragePool, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToStoragePool{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageNodeToStoragePoolEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNodeToStoragePool, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToStoragePool{ + WmiInstance: tmp, + } + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToStoragePool) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToStoragePool) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StorageNodeToStoragePool) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StorageNodeToStoragePool) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVirtualDisk.go new file mode 100644 index 00000000..35d81102 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNodeToVirtualDisk struct +type MSFT_StorageNodeToVirtualDisk struct { + *cim.WmiInstance + + // + StorageNode MSFT_StorageNode + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_StorageNodeToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNodeToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageNodeToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNodeToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToVirtualDisk) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToVirtualDisk) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_StorageNodeToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_StorageNodeToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVolume.go new file mode 100644 index 00000000..03814191 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageNodeToVolume.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageNodeToVolume struct +type MSFT_StorageNodeToVolume struct { + *cim.WmiInstance + + // + StorageNode MSFT_StorageNode + + // + Volume MSFT_Volume +} + +func NewMSFT_StorageNodeToVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageNodeToVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageNodeToVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageNodeToVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageNodeToVolume{ + WmiInstance: tmp, + } + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToVolume) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageNodeToVolume) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_StorageNodeToVolume) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_StorageNodeToVolume) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageObject.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageObject.go new file mode 100644 index 00000000..c2bb86dc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageObject.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageObject struct +type MSFT_StorageObject struct { + *cim.WmiInstance + + // + ObjectId string + + // + PassThroughClass string + + // + PassThroughIds string + + // + PassThroughNamespace string + + // + PassThroughServer string + + // + UniqueId string +} + +func NewMSFT_StorageObjectEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageObject, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageObject{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageObjectEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageObject, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageObject{ + WmiInstance: tmp, + } + return +} + +// SetObjectId sets the value of ObjectId for the instance +func (instance *MSFT_StorageObject) SetPropertyObjectId(value string) (err error) { + return instance.SetProperty("ObjectId", (value)) +} + +// GetObjectId gets the value of ObjectId for the instance +func (instance *MSFT_StorageObject) GetPropertyObjectId() (value string, err error) { + retValue, err := instance.GetProperty("ObjectId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPassThroughClass sets the value of PassThroughClass for the instance +func (instance *MSFT_StorageObject) SetPropertyPassThroughClass(value string) (err error) { + return instance.SetProperty("PassThroughClass", (value)) +} + +// GetPassThroughClass gets the value of PassThroughClass for the instance +func (instance *MSFT_StorageObject) GetPropertyPassThroughClass() (value string, err error) { + retValue, err := instance.GetProperty("PassThroughClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPassThroughIds sets the value of PassThroughIds for the instance +func (instance *MSFT_StorageObject) SetPropertyPassThroughIds(value string) (err error) { + return instance.SetProperty("PassThroughIds", (value)) +} + +// GetPassThroughIds gets the value of PassThroughIds for the instance +func (instance *MSFT_StorageObject) GetPropertyPassThroughIds() (value string, err error) { + retValue, err := instance.GetProperty("PassThroughIds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPassThroughNamespace sets the value of PassThroughNamespace for the instance +func (instance *MSFT_StorageObject) SetPropertyPassThroughNamespace(value string) (err error) { + return instance.SetProperty("PassThroughNamespace", (value)) +} + +// GetPassThroughNamespace gets the value of PassThroughNamespace for the instance +func (instance *MSFT_StorageObject) GetPropertyPassThroughNamespace() (value string, err error) { + retValue, err := instance.GetProperty("PassThroughNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPassThroughServer sets the value of PassThroughServer for the instance +func (instance *MSFT_StorageObject) SetPropertyPassThroughServer(value string) (err error) { + return instance.SetProperty("PassThroughServer", (value)) +} + +// GetPassThroughServer gets the value of PassThroughServer for the instance +func (instance *MSFT_StorageObject) GetPropertyPassThroughServer() (value string, err error) { + retValue, err := instance.GetProperty("PassThroughServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUniqueId sets the value of UniqueId for the instance +func (instance *MSFT_StorageObject) SetPropertyUniqueId(value string) (err error) { + return instance.SetProperty("UniqueId", (value)) +} + +// GetUniqueId gets the value of UniqueId for the instance +func (instance *MSFT_StorageObject) GetPropertyUniqueId() (value string, err error) { + retValue, err := instance.GetProperty("UniqueId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePool.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePool.go new file mode 100644 index 00000000..56cb03b4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePool.go @@ -0,0 +1,1415 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StoragePool struct +type MSFT_StoragePool struct { + *MSFT_StorageObject + + // + AllocatedSize uint64 + + // + ClearOnDeallocate bool + + // + EnclosureAwareDefault bool + + // + FaultDomainAwarenessDefault uint16 + + // + FriendlyName string + + // + HealthStatus uint16 + + // + IsClustered bool + + // + IsPowerProtected bool + + // + IsPrimordial bool + + // + IsReadOnly bool + + // + LogicalSectorSize uint64 + + // + MediaTypeDefault uint16 + + // + Name string + + // + OperationalStatus []uint16 + + // + OtherOperationalStatusDescription string + + // + OtherUsageDescription string + + // + PhysicalSectorSize uint64 + + // + ProvisioningTypeDefault uint16 + + // + ReadOnlyReason uint16 + + // + RepairPolicy uint16 + + // + ResiliencySettingNameDefault string + + // + RetireMissingPhysicalDisks uint16 + + // + Size uint64 + + // + SupportedProvisioningTypes []uint16 + + // + SupportsDeduplication bool + + // + ThinProvisioningAlertThresholds []uint16 + + // + Usage uint16 + + // + Version uint16 + + // + WriteCacheSizeDefault uint64 + + // + WriteCacheSizeMax uint64 + + // + WriteCacheSizeMin uint64 +} + +func NewMSFT_StoragePoolEx1(instance *cim.WmiInstance) (newInstance *MSFT_StoragePool, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StoragePool{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StoragePoolEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StoragePool, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StoragePool{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAllocatedSize sets the value of AllocatedSize for the instance +func (instance *MSFT_StoragePool) SetPropertyAllocatedSize(value uint64) (err error) { + return instance.SetProperty("AllocatedSize", (value)) +} + +// GetAllocatedSize gets the value of AllocatedSize for the instance +func (instance *MSFT_StoragePool) GetPropertyAllocatedSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocatedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetClearOnDeallocate sets the value of ClearOnDeallocate for the instance +func (instance *MSFT_StoragePool) SetPropertyClearOnDeallocate(value bool) (err error) { + return instance.SetProperty("ClearOnDeallocate", (value)) +} + +// GetClearOnDeallocate gets the value of ClearOnDeallocate for the instance +func (instance *MSFT_StoragePool) GetPropertyClearOnDeallocate() (value bool, err error) { + retValue, err := instance.GetProperty("ClearOnDeallocate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetEnclosureAwareDefault sets the value of EnclosureAwareDefault for the instance +func (instance *MSFT_StoragePool) SetPropertyEnclosureAwareDefault(value bool) (err error) { + return instance.SetProperty("EnclosureAwareDefault", (value)) +} + +// GetEnclosureAwareDefault gets the value of EnclosureAwareDefault for the instance +func (instance *MSFT_StoragePool) GetPropertyEnclosureAwareDefault() (value bool, err error) { + retValue, err := instance.GetProperty("EnclosureAwareDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetFaultDomainAwarenessDefault sets the value of FaultDomainAwarenessDefault for the instance +func (instance *MSFT_StoragePool) SetPropertyFaultDomainAwarenessDefault(value uint16) (err error) { + return instance.SetProperty("FaultDomainAwarenessDefault", (value)) +} + +// GetFaultDomainAwarenessDefault gets the value of FaultDomainAwarenessDefault for the instance +func (instance *MSFT_StoragePool) GetPropertyFaultDomainAwarenessDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("FaultDomainAwarenessDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_StoragePool) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_StoragePool) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_StoragePool) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_StoragePool) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetIsClustered sets the value of IsClustered for the instance +func (instance *MSFT_StoragePool) SetPropertyIsClustered(value bool) (err error) { + return instance.SetProperty("IsClustered", (value)) +} + +// GetIsClustered gets the value of IsClustered for the instance +func (instance *MSFT_StoragePool) GetPropertyIsClustered() (value bool, err error) { + retValue, err := instance.GetProperty("IsClustered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsPowerProtected sets the value of IsPowerProtected for the instance +func (instance *MSFT_StoragePool) SetPropertyIsPowerProtected(value bool) (err error) { + return instance.SetProperty("IsPowerProtected", (value)) +} + +// GetIsPowerProtected gets the value of IsPowerProtected for the instance +func (instance *MSFT_StoragePool) GetPropertyIsPowerProtected() (value bool, err error) { + retValue, err := instance.GetProperty("IsPowerProtected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsPrimordial sets the value of IsPrimordial for the instance +func (instance *MSFT_StoragePool) SetPropertyIsPrimordial(value bool) (err error) { + return instance.SetProperty("IsPrimordial", (value)) +} + +// GetIsPrimordial gets the value of IsPrimordial for the instance +func (instance *MSFT_StoragePool) GetPropertyIsPrimordial() (value bool, err error) { + retValue, err := instance.GetProperty("IsPrimordial") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsReadOnly sets the value of IsReadOnly for the instance +func (instance *MSFT_StoragePool) SetPropertyIsReadOnly(value bool) (err error) { + return instance.SetProperty("IsReadOnly", (value)) +} + +// GetIsReadOnly gets the value of IsReadOnly for the instance +func (instance *MSFT_StoragePool) GetPropertyIsReadOnly() (value bool, err error) { + retValue, err := instance.GetProperty("IsReadOnly") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLogicalSectorSize sets the value of LogicalSectorSize for the instance +func (instance *MSFT_StoragePool) SetPropertyLogicalSectorSize(value uint64) (err error) { + return instance.SetProperty("LogicalSectorSize", (value)) +} + +// GetLogicalSectorSize gets the value of LogicalSectorSize for the instance +func (instance *MSFT_StoragePool) GetPropertyLogicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMediaTypeDefault sets the value of MediaTypeDefault for the instance +func (instance *MSFT_StoragePool) SetPropertyMediaTypeDefault(value uint16) (err error) { + return instance.SetProperty("MediaTypeDefault", (value)) +} + +// GetMediaTypeDefault gets the value of MediaTypeDefault for the instance +func (instance *MSFT_StoragePool) GetPropertyMediaTypeDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("MediaTypeDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StoragePool) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StoragePool) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StoragePool) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StoragePool) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherOperationalStatusDescription sets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_StoragePool) SetPropertyOtherOperationalStatusDescription(value string) (err error) { + return instance.SetProperty("OtherOperationalStatusDescription", (value)) +} + +// GetOtherOperationalStatusDescription gets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_StoragePool) GetPropertyOtherOperationalStatusDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherOperationalStatusDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherUsageDescription sets the value of OtherUsageDescription for the instance +func (instance *MSFT_StoragePool) SetPropertyOtherUsageDescription(value string) (err error) { + return instance.SetProperty("OtherUsageDescription", (value)) +} + +// GetOtherUsageDescription gets the value of OtherUsageDescription for the instance +func (instance *MSFT_StoragePool) GetPropertyOtherUsageDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherUsageDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPhysicalSectorSize sets the value of PhysicalSectorSize for the instance +func (instance *MSFT_StoragePool) SetPropertyPhysicalSectorSize(value uint64) (err error) { + return instance.SetProperty("PhysicalSectorSize", (value)) +} + +// GetPhysicalSectorSize gets the value of PhysicalSectorSize for the instance +func (instance *MSFT_StoragePool) GetPropertyPhysicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("PhysicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProvisioningTypeDefault sets the value of ProvisioningTypeDefault for the instance +func (instance *MSFT_StoragePool) SetPropertyProvisioningTypeDefault(value uint16) (err error) { + return instance.SetProperty("ProvisioningTypeDefault", (value)) +} + +// GetProvisioningTypeDefault gets the value of ProvisioningTypeDefault for the instance +func (instance *MSFT_StoragePool) GetPropertyProvisioningTypeDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("ProvisioningTypeDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReadOnlyReason sets the value of ReadOnlyReason for the instance +func (instance *MSFT_StoragePool) SetPropertyReadOnlyReason(value uint16) (err error) { + return instance.SetProperty("ReadOnlyReason", (value)) +} + +// GetReadOnlyReason gets the value of ReadOnlyReason for the instance +func (instance *MSFT_StoragePool) GetPropertyReadOnlyReason() (value uint16, err error) { + retValue, err := instance.GetProperty("ReadOnlyReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRepairPolicy sets the value of RepairPolicy for the instance +func (instance *MSFT_StoragePool) SetPropertyRepairPolicy(value uint16) (err error) { + return instance.SetProperty("RepairPolicy", (value)) +} + +// GetRepairPolicy gets the value of RepairPolicy for the instance +func (instance *MSFT_StoragePool) GetPropertyRepairPolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("RepairPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetResiliencySettingNameDefault sets the value of ResiliencySettingNameDefault for the instance +func (instance *MSFT_StoragePool) SetPropertyResiliencySettingNameDefault(value string) (err error) { + return instance.SetProperty("ResiliencySettingNameDefault", (value)) +} + +// GetResiliencySettingNameDefault gets the value of ResiliencySettingNameDefault for the instance +func (instance *MSFT_StoragePool) GetPropertyResiliencySettingNameDefault() (value string, err error) { + retValue, err := instance.GetProperty("ResiliencySettingNameDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRetireMissingPhysicalDisks sets the value of RetireMissingPhysicalDisks for the instance +func (instance *MSFT_StoragePool) SetPropertyRetireMissingPhysicalDisks(value uint16) (err error) { + return instance.SetProperty("RetireMissingPhysicalDisks", (value)) +} + +// GetRetireMissingPhysicalDisks gets the value of RetireMissingPhysicalDisks for the instance +func (instance *MSFT_StoragePool) GetPropertyRetireMissingPhysicalDisks() (value uint16, err error) { + retValue, err := instance.GetProperty("RetireMissingPhysicalDisks") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_StoragePool) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_StoragePool) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSupportedProvisioningTypes sets the value of SupportedProvisioningTypes for the instance +func (instance *MSFT_StoragePool) SetPropertySupportedProvisioningTypes(value []uint16) (err error) { + return instance.SetProperty("SupportedProvisioningTypes", (value)) +} + +// GetSupportedProvisioningTypes gets the value of SupportedProvisioningTypes for the instance +func (instance *MSFT_StoragePool) GetPropertySupportedProvisioningTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedProvisioningTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportsDeduplication sets the value of SupportsDeduplication for the instance +func (instance *MSFT_StoragePool) SetPropertySupportsDeduplication(value bool) (err error) { + return instance.SetProperty("SupportsDeduplication", (value)) +} + +// GetSupportsDeduplication gets the value of SupportsDeduplication for the instance +func (instance *MSFT_StoragePool) GetPropertySupportsDeduplication() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDeduplication") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetThinProvisioningAlertThresholds sets the value of ThinProvisioningAlertThresholds for the instance +func (instance *MSFT_StoragePool) SetPropertyThinProvisioningAlertThresholds(value []uint16) (err error) { + return instance.SetProperty("ThinProvisioningAlertThresholds", (value)) +} + +// GetThinProvisioningAlertThresholds gets the value of ThinProvisioningAlertThresholds for the instance +func (instance *MSFT_StoragePool) GetPropertyThinProvisioningAlertThresholds() (value []uint16, err error) { + retValue, err := instance.GetProperty("ThinProvisioningAlertThresholds") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetUsage sets the value of Usage for the instance +func (instance *MSFT_StoragePool) SetPropertyUsage(value uint16) (err error) { + return instance.SetProperty("Usage", (value)) +} + +// GetUsage gets the value of Usage for the instance +func (instance *MSFT_StoragePool) GetPropertyUsage() (value uint16, err error) { + retValue, err := instance.GetProperty("Usage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *MSFT_StoragePool) SetPropertyVersion(value uint16) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *MSFT_StoragePool) GetPropertyVersion() (value uint16, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWriteCacheSizeDefault sets the value of WriteCacheSizeDefault for the instance +func (instance *MSFT_StoragePool) SetPropertyWriteCacheSizeDefault(value uint64) (err error) { + return instance.SetProperty("WriteCacheSizeDefault", (value)) +} + +// GetWriteCacheSizeDefault gets the value of WriteCacheSizeDefault for the instance +func (instance *MSFT_StoragePool) GetPropertyWriteCacheSizeDefault() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheSizeDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheSizeMax sets the value of WriteCacheSizeMax for the instance +func (instance *MSFT_StoragePool) SetPropertyWriteCacheSizeMax(value uint64) (err error) { + return instance.SetProperty("WriteCacheSizeMax", (value)) +} + +// GetWriteCacheSizeMax gets the value of WriteCacheSizeMax for the instance +func (instance *MSFT_StoragePool) GetPropertyWriteCacheSizeMax() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheSizeMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteCacheSizeMin sets the value of WriteCacheSizeMin for the instance +func (instance *MSFT_StoragePool) SetPropertyWriteCacheSizeMin(value uint64) (err error) { + return instance.SetProperty("WriteCacheSizeMin", (value)) +} + +// GetWriteCacheSizeMin gets the value of WriteCacheSizeMin for the instance +func (instance *MSFT_StoragePool) GetPropertyWriteCacheSizeMin() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheSizeMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_StoragePool) CreateVirtualDisk( /* IN */ FriendlyName string, + /* IN */ Size uint64, + /* IN */ UseMaximumSize bool, + /* IN */ ProvisioningType uint16, + /* IN */ AllocationUnitSize uint64, + /* IN */ MediaType uint16, + /* IN */ ResiliencySettingName string, + /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* IN */ NumberOfDataCopies uint16, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ AutoNumberOfColumns bool, + /* IN */ Interleave uint64, + /* IN */ NumberOfGroups uint16, + /* IN */ IsEnclosureAware bool, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ColumnIsolation uint16, + /* IN */ PhysicalDisksToUse []MSFT_PhysicalDisk, + /* IN */ StorageFaultDomainsToUse []MSFT_StorageFaultDomain, + /* IN */ StorageTiers []MSFT_StorageTier, + /* IN */ StorageTierSizes []uint64, + /* IN */ WriteCacheSize uint64, + /* IN */ AutoWriteCacheSize bool, + /* IN */ ReadCacheSize uint64, + /* IN */ RunAsJob bool, + /* OUT */ CreatedVirtualDisk MSFT_VirtualDisk, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateVirtualDisk", FriendlyName, Size, UseMaximumSize, ProvisioningType, AllocationUnitSize, MediaType, ResiliencySettingName, Usage, OtherUsageDescription, NumberOfDataCopies, PhysicalDiskRedundancy, NumberOfColumns, AutoNumberOfColumns, Interleave, NumberOfGroups, IsEnclosureAware, FaultDomainAwareness, ColumnIsolation, PhysicalDisksToUse, StorageFaultDomainsToUse, StorageTiers, StorageTierSizes, WriteCacheSize, AutoWriteCacheSize, ReadCacheSize, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_StoragePool) CreateVolume( /* IN */ FriendlyName string, + /* IN */ Size uint64, + /* IN */ StorageTiers []MSFT_StorageTier, + /* IN */ StorageTierSizes []uint64, + /* IN */ ProvisioningType uint16, + /* IN */ ResiliencySettingName string, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ FileSystem uint16, + /* IN */ AccessPath string, + /* IN */ AllocationUnitSize uint32, + /* IN */ ReadCacheSize uint64, + /* IN */ FileServer MSFT_FileServer, + /* OUT */ CreatedVolume MSFT_Volume, + /* OPTIONAL IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateVolume", FriendlyName, Size, StorageTiers, StorageTierSizes, ProvisioningType, ResiliencySettingName, PhysicalDiskRedundancy, NumberOfColumns, FileSystem, AccessPath, AllocationUnitSize, ReadCacheSize, FileServer, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_StoragePool) CreateStorageTier( /* IN */ FriendlyName string, + /* IN */ ProvisioningType uint16, + /* IN */ AllocationUnitSize uint64, + /* IN */ MediaType uint16, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ColumnIsolation uint16, + /* IN */ StorageFaultDomainsToUse []MSFT_StorageFaultDomain, + /* IN */ ResiliencySettingName string, + /* IN */ Usage uint16, + /* IN */ Interleave uint64, + /* IN */ NumberOfDataCopies uint16, + /* IN */ NumberOfGroups uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ Description string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageTier MSFT_StorageTier, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateStorageTier", FriendlyName, ProvisioningType, AllocationUnitSize, MediaType, FaultDomainAwareness, ColumnIsolation, StorageFaultDomainsToUse, ResiliencySettingName, Usage, Interleave, NumberOfDataCopies, NumberOfGroups, NumberOfColumns, PhysicalDiskRedundancy, Description, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_StoragePool) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_StoragePool) Upgrade( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Upgrade") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_StoragePool) Optimize( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Optimize", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_StoragePool) AddPhysicalDisk( /* IN */ PhysicalDisks []MSFT_PhysicalDisk, + /* IN */ Usage uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddPhysicalDisk", PhysicalDisks, Usage, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_StoragePool) RemovePhysicalDisk( /* IN */ PhysicalDisks []MSFT_PhysicalDisk, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemovePhysicalDisk", PhysicalDisks, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +// +// +// +func (instance *MSFT_StoragePool) GetSupportedSize( /* IN */ ResiliencySettingName string, + /* IN */ FaultDomainAwareness uint16, + /* OUT */ SupportedSizes []uint64, + /* OUT */ VirtualDiskSizeMin uint64, + /* OUT */ VirtualDiskSizeMax uint64, + /* OUT */ VirtualDiskSizeDivisor uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedSize", ResiliencySettingName, FaultDomainAwareness) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_StoragePool) GetSecurityDescriptor( /* OUT */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StoragePool) SetSecurityDescriptor( /* IN */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetSecurityDescriptor", SecurityDescriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StoragePool) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_StoragePool) SetUsage( /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetUsage", Usage, OtherUsageDescription) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_StoragePool) SetDefaults( /* IN */ ProvisioningTypeDefault uint16, + /* IN */ MediaTypeDefault uint16, + /* IN */ ResiliencySettingNameDefault string, + /* IN */ EnclosureAwareDefault bool, + /* IN */ FaultDomainAwarenessDefault uint16, + /* IN */ WriteCacheSizeDefault uint64, + /* IN */ AutoWriteCacheSize bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDefaults", ProvisioningTypeDefault, MediaTypeDefault, ResiliencySettingNameDefault, EnclosureAwareDefault, FaultDomainAwarenessDefault, WriteCacheSizeDefault, AutoWriteCacheSize) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// + +// +// +func (instance *MSFT_StoragePool) SetAttributes( /* IN */ IsReadOnly bool, + /* IN */ ClearOnDeallocate bool, + /* IN */ IsPowerProtected bool, + /* IN */ RepairPolicy uint16, + /* IN */ RetireMissingPhysicalDisks uint16, + /* IN */ ThinProvisioningAlertThresholds []uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", IsReadOnly, ClearOnDeallocate, IsPowerProtected, RepairPolicy, RetireMissingPhysicalDisks, ThinProvisioningAlertThresholds) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToPhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToPhysicalDisk.go new file mode 100644 index 00000000..6180c6d2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToPhysicalDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StoragePoolToPhysicalDisk struct +type MSFT_StoragePoolToPhysicalDisk struct { + *cim.WmiInstance + + // + PhysicalDisk MSFT_PhysicalDisk + + // + StoragePool MSFT_StoragePool +} + +func NewMSFT_StoragePoolToPhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StoragePoolToPhysicalDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StoragePoolToPhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StoragePoolToPhysicalDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +// SetPhysicalDisk sets the value of PhysicalDisk for the instance +func (instance *MSFT_StoragePoolToPhysicalDisk) SetPropertyPhysicalDisk(value MSFT_PhysicalDisk) (err error) { + return instance.SetProperty("PhysicalDisk", (value)) +} + +// GetPhysicalDisk gets the value of PhysicalDisk for the instance +func (instance *MSFT_StoragePoolToPhysicalDisk) GetPropertyPhysicalDisk() (value MSFT_PhysicalDisk, err error) { + retValue, err := instance.GetProperty("PhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_PhysicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_PhysicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_PhysicalDisk(valuetmp) + + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToPhysicalDisk) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToPhysicalDisk) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToResiliencySetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToResiliencySetting.go new file mode 100644 index 00000000..3878f86f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToResiliencySetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StoragePoolToResiliencySetting struct +type MSFT_StoragePoolToResiliencySetting struct { + *cim.WmiInstance + + // + ResiliencySetting MSFT_ResiliencySetting + + // + StoragePool MSFT_StoragePool +} + +func NewMSFT_StoragePoolToResiliencySettingEx1(instance *cim.WmiInstance) (newInstance *MSFT_StoragePoolToResiliencySetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToResiliencySetting{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StoragePoolToResiliencySettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StoragePoolToResiliencySetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToResiliencySetting{ + WmiInstance: tmp, + } + return +} + +// SetResiliencySetting sets the value of ResiliencySetting for the instance +func (instance *MSFT_StoragePoolToResiliencySetting) SetPropertyResiliencySetting(value MSFT_ResiliencySetting) (err error) { + return instance.SetProperty("ResiliencySetting", (value)) +} + +// GetResiliencySetting gets the value of ResiliencySetting for the instance +func (instance *MSFT_StoragePoolToResiliencySetting) GetPropertyResiliencySetting() (value MSFT_ResiliencySetting, err error) { + retValue, err := instance.GetProperty("ResiliencySetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ResiliencySetting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ResiliencySetting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ResiliencySetting(valuetmp) + + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToResiliencySetting) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToResiliencySetting) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToStorageTier.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToStorageTier.go new file mode 100644 index 00000000..44d42e5b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToStorageTier.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StoragePoolToStorageTier struct +type MSFT_StoragePoolToStorageTier struct { + *cim.WmiInstance + + // + StoragePool MSFT_StoragePool + + // + StorageTier MSFT_StorageTier +} + +func NewMSFT_StoragePoolToStorageTierEx1(instance *cim.WmiInstance) (newInstance *MSFT_StoragePoolToStorageTier, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToStorageTier{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StoragePoolToStorageTierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StoragePoolToStorageTier, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToStorageTier{ + WmiInstance: tmp, + } + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToStorageTier) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToStorageTier) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} + +// SetStorageTier sets the value of StorageTier for the instance +func (instance *MSFT_StoragePoolToStorageTier) SetPropertyStorageTier(value MSFT_StorageTier) (err error) { + return instance.SetProperty("StorageTier", (value)) +} + +// GetStorageTier gets the value of StorageTier for the instance +func (instance *MSFT_StoragePoolToStorageTier) GetPropertyStorageTier() (value MSFT_StorageTier, err error) { + retValue, err := instance.GetProperty("StorageTier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageTier) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageTier is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageTier(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVirtualDisk.go new file mode 100644 index 00000000..8f5e7e38 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StoragePoolToVirtualDisk struct +type MSFT_StoragePoolToVirtualDisk struct { + *cim.WmiInstance + + // + StoragePool MSFT_StoragePool + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_StoragePoolToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StoragePoolToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StoragePoolToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StoragePoolToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToVirtualDisk) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToVirtualDisk) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_StoragePoolToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_StoragePoolToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVolume.go new file mode 100644 index 00000000..60a72c27 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StoragePoolToVolume.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StoragePoolToVolume struct +type MSFT_StoragePoolToVolume struct { + *cim.WmiInstance + + // + StoragePool MSFT_StoragePool + + // + Volume MSFT_Volume +} + +func NewMSFT_StoragePoolToVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_StoragePoolToVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StoragePoolToVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StoragePoolToVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StoragePoolToVolume{ + WmiInstance: tmp, + } + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToVolume) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StoragePoolToVolume) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_StoragePoolToVolume) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_StoragePoolToVolume) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProvider.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProvider.go new file mode 100644 index 00000000..8b271da6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProvider.go @@ -0,0 +1,472 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageProvider struct +type MSFT_StorageProvider struct { + *MSFT_StorageObject + + // + CimServerName string + + // + Manufacturer string + + // + Name string + + // + RemoteSubsystemCacheMode uint16 + + // + SupportedRemoteSubsystemCacheModes []uint16 + + // + SupportsSubsystemRegistration bool + + // + Type uint16 + + // + URI string + + // + URI_IP string + + // + Version string +} + +func NewMSFT_StorageProviderEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageProvider, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageProvider{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageProviderEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageProvider, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageProvider{ + MSFT_StorageObject: tmp, + } + return +} + +// SetCimServerName sets the value of CimServerName for the instance +func (instance *MSFT_StorageProvider) SetPropertyCimServerName(value string) (err error) { + return instance.SetProperty("CimServerName", (value)) +} + +// GetCimServerName gets the value of CimServerName for the instance +func (instance *MSFT_StorageProvider) GetPropertyCimServerName() (value string, err error) { + retValue, err := instance.GetProperty("CimServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *MSFT_StorageProvider) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *MSFT_StorageProvider) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StorageProvider) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StorageProvider) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetRemoteSubsystemCacheMode sets the value of RemoteSubsystemCacheMode for the instance +func (instance *MSFT_StorageProvider) SetPropertyRemoteSubsystemCacheMode(value uint16) (err error) { + return instance.SetProperty("RemoteSubsystemCacheMode", (value)) +} + +// GetRemoteSubsystemCacheMode gets the value of RemoteSubsystemCacheMode for the instance +func (instance *MSFT_StorageProvider) GetPropertyRemoteSubsystemCacheMode() (value uint16, err error) { + retValue, err := instance.GetProperty("RemoteSubsystemCacheMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSupportedRemoteSubsystemCacheModes sets the value of SupportedRemoteSubsystemCacheModes for the instance +func (instance *MSFT_StorageProvider) SetPropertySupportedRemoteSubsystemCacheModes(value []uint16) (err error) { + return instance.SetProperty("SupportedRemoteSubsystemCacheModes", (value)) +} + +// GetSupportedRemoteSubsystemCacheModes gets the value of SupportedRemoteSubsystemCacheModes for the instance +func (instance *MSFT_StorageProvider) GetPropertySupportedRemoteSubsystemCacheModes() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedRemoteSubsystemCacheModes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportsSubsystemRegistration sets the value of SupportsSubsystemRegistration for the instance +func (instance *MSFT_StorageProvider) SetPropertySupportsSubsystemRegistration(value bool) (err error) { + return instance.SetProperty("SupportsSubsystemRegistration", (value)) +} + +// GetSupportsSubsystemRegistration gets the value of SupportsSubsystemRegistration for the instance +func (instance *MSFT_StorageProvider) GetPropertySupportsSubsystemRegistration() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSubsystemRegistration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *MSFT_StorageProvider) SetPropertyType(value uint16) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *MSFT_StorageProvider) GetPropertyType() (value uint16, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetURI sets the value of URI for the instance +func (instance *MSFT_StorageProvider) SetPropertyURI(value string) (err error) { + return instance.SetProperty("URI", (value)) +} + +// GetURI gets the value of URI for the instance +func (instance *MSFT_StorageProvider) GetPropertyURI() (value string, err error) { + retValue, err := instance.GetProperty("URI") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetURI_IP sets the value of URI_IP for the instance +func (instance *MSFT_StorageProvider) SetPropertyURI_IP(value string) (err error) { + return instance.SetProperty("URI_IP", (value)) +} + +// GetURI_IP gets the value of URI_IP for the instance +func (instance *MSFT_StorageProvider) GetPropertyURI_IP() (value string, err error) { + retValue, err := instance.GetProperty("URI_IP") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *MSFT_StorageProvider) SetPropertyVersion(value string) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *MSFT_StorageProvider) GetPropertyVersion() (value string, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_StorageProvider) Discover( /* IN */ DiscoveryLevel uint16, + /* IN */ RootObject MSFT_StorageObject, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Discover", DiscoveryLevel, RootObject, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_StorageProvider) GetSecurityDescriptor( /* OUT */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageProvider) SetSecurityDescriptor( /* IN */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetSecurityDescriptor", SecurityDescriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_StorageProvider) RegisterSubsystem( /* IN */ ComputerName string, + /* IN */ Credential string, + /* OUT */ RegisteredSubsystem MSFT_StorageSubSystem, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RegisterSubsystem", ComputerName, Credential) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *MSFT_StorageProvider) UnregisterSubsystem( /* IN */ Subsystem MSFT_StorageSubSystem, + /* IN */ StorageSubSystemUniqueId string, + /* IN */ Force bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("UnregisterSubsystem", Subsystem, StorageSubSystemUniqueId, Force) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageProvider) SetAttributes( /* IN */ RemoteSubsystemCacheMode uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", RemoteSubsystemCacheMode) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProviderToStorageSubSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProviderToStorageSubSystem.go new file mode 100644 index 00000000..623a012d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageProviderToStorageSubSystem.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageProviderToStorageSubSystem struct +type MSFT_StorageProviderToStorageSubSystem struct { + *cim.WmiInstance + + // + StorageProvider MSFT_StorageProvider + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageProviderToStorageSubSystemEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageProviderToStorageSubSystem, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageProviderToStorageSubSystem{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageProviderToStorageSubSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageProviderToStorageSubSystem, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageProviderToStorageSubSystem{ + WmiInstance: tmp, + } + return +} + +// SetStorageProvider sets the value of StorageProvider for the instance +func (instance *MSFT_StorageProviderToStorageSubSystem) SetPropertyStorageProvider(value MSFT_StorageProvider) (err error) { + return instance.SetProperty("StorageProvider", (value)) +} + +// GetStorageProvider gets the value of StorageProvider for the instance +func (instance *MSFT_StorageProviderToStorageSubSystem) GetPropertyStorageProvider() (value MSFT_StorageProvider, err error) { + retValue, err := instance.GetProperty("StorageProvider") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageProvider) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageProvider is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageProvider(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageProviderToStorageSubSystem) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageProviderToStorageSubSystem) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSFlow.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSFlow.go new file mode 100644 index 00000000..d1466afd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSFlow.go @@ -0,0 +1,651 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageQoSFlow struct +type MSFT_StorageQoSFlow struct { + *cim.WmiInstance + + // + BandwidthLimit uint64 + + // + FilePath string + + // + FlowId string + + // + InitiatorBandwidth uint64 + + // + InitiatorId string + + // + InitiatorIOPS uint64 + + // + InitiatorLatency uint64 + + // + InitiatorName string + + // + InitiatorNodeName string + + // + Interval uint64 + + // + Limit uint64 + + // + PolicyId string + + // + Reservation uint64 + + // + Status uint16 + + // + StorageNodeBandwidth uint64 + + // + StorageNodeIOPS uint64 + + // + StorageNodeLatency uint64 + + // + StorageNodeName string + + // + TimeStamp uint64 + + // + VolumeId string +} + +func NewMSFT_StorageQoSFlowEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageQoSFlow, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSFlow{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageQoSFlowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageQoSFlow, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSFlow{ + WmiInstance: tmp, + } + return +} + +// SetBandwidthLimit sets the value of BandwidthLimit for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyBandwidthLimit(value uint64) (err error) { + return instance.SetProperty("BandwidthLimit", (value)) +} + +// GetBandwidthLimit gets the value of BandwidthLimit for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyBandwidthLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("BandwidthLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFilePath sets the value of FilePath for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyFilePath(value string) (err error) { + return instance.SetProperty("FilePath", (value)) +} + +// GetFilePath gets the value of FilePath for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyFilePath() (value string, err error) { + retValue, err := instance.GetProperty("FilePath") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlowId sets the value of FlowId for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyFlowId(value string) (err error) { + return instance.SetProperty("FlowId", (value)) +} + +// GetFlowId gets the value of FlowId for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyFlowId() (value string, err error) { + retValue, err := instance.GetProperty("FlowId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorBandwidth sets the value of InitiatorBandwidth for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInitiatorBandwidth(value uint64) (err error) { + return instance.SetProperty("InitiatorBandwidth", (value)) +} + +// GetInitiatorBandwidth gets the value of InitiatorBandwidth for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInitiatorBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("InitiatorBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInitiatorId sets the value of InitiatorId for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInitiatorId(value string) (err error) { + return instance.SetProperty("InitiatorId", (value)) +} + +// GetInitiatorId gets the value of InitiatorId for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInitiatorId() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorIOPS sets the value of InitiatorIOPS for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInitiatorIOPS(value uint64) (err error) { + return instance.SetProperty("InitiatorIOPS", (value)) +} + +// GetInitiatorIOPS gets the value of InitiatorIOPS for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInitiatorIOPS() (value uint64, err error) { + retValue, err := instance.GetProperty("InitiatorIOPS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInitiatorLatency sets the value of InitiatorLatency for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInitiatorLatency(value uint64) (err error) { + return instance.SetProperty("InitiatorLatency", (value)) +} + +// GetInitiatorLatency gets the value of InitiatorLatency for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInitiatorLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("InitiatorLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInitiatorName sets the value of InitiatorName for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInitiatorName(value string) (err error) { + return instance.SetProperty("InitiatorName", (value)) +} + +// GetInitiatorName gets the value of InitiatorName for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInitiatorName() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorNodeName sets the value of InitiatorNodeName for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInitiatorNodeName(value string) (err error) { + return instance.SetProperty("InitiatorNodeName", (value)) +} + +// GetInitiatorNodeName gets the value of InitiatorNodeName for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInitiatorNodeName() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorNodeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInterval sets the value of Interval for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyInterval(value uint64) (err error) { + return instance.SetProperty("Interval", (value)) +} + +// GetInterval gets the value of Interval for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyInterval() (value uint64, err error) { + retValue, err := instance.GetProperty("Interval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLimit sets the value of Limit for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyLimit(value uint64) (err error) { + return instance.SetProperty("Limit", (value)) +} + +// GetLimit gets the value of Limit for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("Limit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetPolicyId sets the value of PolicyId for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyPolicyId(value string) (err error) { + return instance.SetProperty("PolicyId", (value)) +} + +// GetPolicyId gets the value of PolicyId for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyPolicyId() (value string, err error) { + retValue, err := instance.GetProperty("PolicyId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReservation sets the value of Reservation for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyReservation(value uint64) (err error) { + return instance.SetProperty("Reservation", (value)) +} + +// GetReservation gets the value of Reservation for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyReservation() (value uint64, err error) { + retValue, err := instance.GetProperty("Reservation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyStatus(value uint16) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetStorageNodeBandwidth sets the value of StorageNodeBandwidth for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyStorageNodeBandwidth(value uint64) (err error) { + return instance.SetProperty("StorageNodeBandwidth", (value)) +} + +// GetStorageNodeBandwidth gets the value of StorageNodeBandwidth for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyStorageNodeBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("StorageNodeBandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStorageNodeIOPS sets the value of StorageNodeIOPS for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyStorageNodeIOPS(value uint64) (err error) { + return instance.SetProperty("StorageNodeIOPS", (value)) +} + +// GetStorageNodeIOPS gets the value of StorageNodeIOPS for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyStorageNodeIOPS() (value uint64, err error) { + retValue, err := instance.GetProperty("StorageNodeIOPS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStorageNodeLatency sets the value of StorageNodeLatency for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyStorageNodeLatency(value uint64) (err error) { + return instance.SetProperty("StorageNodeLatency", (value)) +} + +// GetStorageNodeLatency gets the value of StorageNodeLatency for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyStorageNodeLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("StorageNodeLatency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStorageNodeName sets the value of StorageNodeName for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyStorageNodeName(value string) (err error) { + return instance.SetProperty("StorageNodeName", (value)) +} + +// GetStorageNodeName gets the value of StorageNodeName for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyStorageNodeName() (value string, err error) { + retValue, err := instance.GetProperty("StorageNodeName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTimeStamp sets the value of TimeStamp for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyTimeStamp(value uint64) (err error) { + return instance.SetProperty("TimeStamp", (value)) +} + +// GetTimeStamp gets the value of TimeStamp for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyTimeStamp() (value uint64, err error) { + retValue, err := instance.GetProperty("TimeStamp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeId sets the value of VolumeId for the instance +func (instance *MSFT_StorageQoSFlow) SetPropertyVolumeId(value string) (err error) { + return instance.SetProperty("VolumeId", (value)) +} + +// GetVolumeId gets the value of VolumeId for the instance +func (instance *MSFT_StorageQoSFlow) GetPropertyVolumeId() (value string, err error) { + retValue, err := instance.GetProperty("VolumeId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicy.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicy.go new file mode 100644 index 00000000..bff48c2a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicy.go @@ -0,0 +1,325 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageQoSPolicy struct +type MSFT_StorageQoSPolicy struct { + *cim.WmiInstance + + // + BandwidthLimit uint64 + + // + Name string + + // + ParentPolicy string + + // + PolicyId string + + // + PolicyType uint16 + + // + Status uint16 + + // + ThroughputLimit uint64 + + // + ThroughputReservation uint64 +} + +func NewMSFT_StorageQoSPolicyEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageQoSPolicy, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicy{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageQoSPolicyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageQoSPolicy, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicy{ + WmiInstance: tmp, + } + return +} + +// SetBandwidthLimit sets the value of BandwidthLimit for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyBandwidthLimit(value uint64) (err error) { + return instance.SetProperty("BandwidthLimit", (value)) +} + +// GetBandwidthLimit gets the value of BandwidthLimit for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyBandwidthLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("BandwidthLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParentPolicy sets the value of ParentPolicy for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyParentPolicy(value string) (err error) { + return instance.SetProperty("ParentPolicy", (value)) +} + +// GetParentPolicy gets the value of ParentPolicy for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyParentPolicy() (value string, err error) { + retValue, err := instance.GetProperty("ParentPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPolicyId sets the value of PolicyId for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyPolicyId(value string) (err error) { + return instance.SetProperty("PolicyId", (value)) +} + +// GetPolicyId gets the value of PolicyId for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyPolicyId() (value string, err error) { + retValue, err := instance.GetProperty("PolicyId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPolicyType sets the value of PolicyType for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyPolicyType(value uint16) (err error) { + return instance.SetProperty("PolicyType", (value)) +} + +// GetPolicyType gets the value of PolicyType for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyPolicyType() (value uint16, err error) { + retValue, err := instance.GetProperty("PolicyType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyStatus(value uint16) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetThroughputLimit sets the value of ThroughputLimit for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyThroughputLimit(value uint64) (err error) { + return instance.SetProperty("ThroughputLimit", (value)) +} + +// GetThroughputLimit gets the value of ThroughputLimit for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyThroughputLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("ThroughputLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetThroughputReservation sets the value of ThroughputReservation for the instance +func (instance *MSFT_StorageQoSPolicy) SetPropertyThroughputReservation(value uint64) (err error) { + return instance.SetProperty("ThroughputReservation", (value)) +} + +// GetThroughputReservation gets the value of ThroughputReservation for the instance +func (instance *MSFT_StorageQoSPolicy) GetPropertyThroughputReservation() (value uint64, err error) { + retValue, err := instance.GetProperty("ThroughputReservation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// +// +// +// + +// +func (instance *MSFT_StorageQoSPolicy) SetAttributes( /* IN */ NewName string, + /* IN */ Limit uint64, + /* IN */ Reservation uint64, + /* IN */ BandwidthLimit uint64) (result int32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetAttributes", NewName, Limit, Reservation, BandwidthLimit) + if err != nil { + return + } + result = int32(retVal) + return + +} + +// + +// +func (instance *MSFT_StorageQoSPolicy) DeletePolicy() (result int32, err error) { + retVal, err := instance.InvokeMethodWithReturn("DeletePolicy") + if err != nil { + return + } + result = int32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyStore.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyStore.go new file mode 100644 index 00000000..e89cc659 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyStore.go @@ -0,0 +1,143 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageQoSPolicyStore struct +type MSFT_StorageQoSPolicyStore struct { + *cim.WmiInstance + + // + Id string + + // + IOPSNormalizationSize uint32 +} + +func NewMSFT_StorageQoSPolicyStoreEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageQoSPolicyStore, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicyStore{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageQoSPolicyStoreEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageQoSPolicyStore, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicyStore{ + WmiInstance: tmp, + } + return +} + +// SetId sets the value of Id for the instance +func (instance *MSFT_StorageQoSPolicyStore) SetPropertyId(value string) (err error) { + return instance.SetProperty("Id", (value)) +} + +// GetId gets the value of Id for the instance +func (instance *MSFT_StorageQoSPolicyStore) GetPropertyId() (value string, err error) { + retValue, err := instance.GetProperty("Id") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIOPSNormalizationSize sets the value of IOPSNormalizationSize for the instance +func (instance *MSFT_StorageQoSPolicyStore) SetPropertyIOPSNormalizationSize(value uint32) (err error) { + return instance.SetProperty("IOPSNormalizationSize", (value)) +} + +// GetIOPSNormalizationSize gets the value of IOPSNormalizationSize for the instance +func (instance *MSFT_StorageQoSPolicyStore) GetPropertyIOPSNormalizationSize() (value uint32, err error) { + retValue, err := instance.GetProperty("IOPSNormalizationSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// + +// +// +func (instance *MSFT_StorageQoSPolicyStore) CreatePolicy( /* IN/OUT */ Policy MSFT_StorageQoSPolicy) (result int32, err error) { + retVal, err := instance.InvokeMethod("CreatePolicy") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = int32(retValue) + return + +} + +// + +// + +// +func (instance *MSFT_StorageQoSPolicyStore) SetAttributes( /* IN */ IOPSNormalizationSize uint32) (result int32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetAttributes", IOPSNormalizationSize) + if err != nil { + return + } + result = int32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToChildPolicy.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToChildPolicy.go new file mode 100644 index 00000000..6a69dc04 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToChildPolicy.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageQoSPolicyToChildPolicy struct +type MSFT_StorageQoSPolicyToChildPolicy struct { + *cim.WmiInstance + + // + ChildPolicy MSFT_StorageQoSPolicy + + // + ParentPolicy MSFT_StorageQoSPolicy +} + +func NewMSFT_StorageQoSPolicyToChildPolicyEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageQoSPolicyToChildPolicy, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicyToChildPolicy{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageQoSPolicyToChildPolicyEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageQoSPolicyToChildPolicy, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicyToChildPolicy{ + WmiInstance: tmp, + } + return +} + +// SetChildPolicy sets the value of ChildPolicy for the instance +func (instance *MSFT_StorageQoSPolicyToChildPolicy) SetPropertyChildPolicy(value MSFT_StorageQoSPolicy) (err error) { + return instance.SetProperty("ChildPolicy", (value)) +} + +// GetChildPolicy gets the value of ChildPolicy for the instance +func (instance *MSFT_StorageQoSPolicyToChildPolicy) GetPropertyChildPolicy() (value MSFT_StorageQoSPolicy, err error) { + retValue, err := instance.GetProperty("ChildPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageQoSPolicy) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageQoSPolicy is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageQoSPolicy(valuetmp) + + return +} + +// SetParentPolicy sets the value of ParentPolicy for the instance +func (instance *MSFT_StorageQoSPolicyToChildPolicy) SetPropertyParentPolicy(value MSFT_StorageQoSPolicy) (err error) { + return instance.SetProperty("ParentPolicy", (value)) +} + +// GetParentPolicy gets the value of ParentPolicy for the instance +func (instance *MSFT_StorageQoSPolicyToChildPolicy) GetPropertyParentPolicy() (value MSFT_StorageQoSPolicy, err error) { + retValue, err := instance.GetProperty("ParentPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageQoSPolicy) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageQoSPolicy is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageQoSPolicy(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToFlow.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToFlow.go new file mode 100644 index 00000000..7c09d644 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSPolicyToFlow.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageQoSPolicyToFlow struct +type MSFT_StorageQoSPolicyToFlow struct { + *cim.WmiInstance + + // + Flow MSFT_StorageQoSFlow + + // + Policy MSFT_StorageQoSPolicy +} + +func NewMSFT_StorageQoSPolicyToFlowEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageQoSPolicyToFlow, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicyToFlow{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageQoSPolicyToFlowEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageQoSPolicyToFlow, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSPolicyToFlow{ + WmiInstance: tmp, + } + return +} + +// SetFlow sets the value of Flow for the instance +func (instance *MSFT_StorageQoSPolicyToFlow) SetPropertyFlow(value MSFT_StorageQoSFlow) (err error) { + return instance.SetProperty("Flow", (value)) +} + +// GetFlow gets the value of Flow for the instance +func (instance *MSFT_StorageQoSPolicyToFlow) GetPropertyFlow() (value MSFT_StorageQoSFlow, err error) { + retValue, err := instance.GetProperty("Flow") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageQoSFlow) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageQoSFlow is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageQoSFlow(valuetmp) + + return +} + +// SetPolicy sets the value of Policy for the instance +func (instance *MSFT_StorageQoSPolicyToFlow) SetPropertyPolicy(value MSFT_StorageQoSPolicy) (err error) { + return instance.SetProperty("Policy", (value)) +} + +// GetPolicy gets the value of Policy for the instance +func (instance *MSFT_StorageQoSPolicyToFlow) GetPropertyPolicy() (value MSFT_StorageQoSPolicy, err error) { + retValue, err := instance.GetProperty("Policy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageQoSPolicy) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageQoSPolicy is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageQoSPolicy(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSVolume.go new file mode 100644 index 00000000..58d60c1f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageQoSVolume.go @@ -0,0 +1,381 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageQoSVolume struct +type MSFT_StorageQoSVolume struct { + *cim.WmiInstance + + // + Bandwidth uint64 + + // + BandwidthLimit uint64 + + // + Interval uint64 + + // + IOPS uint64 + + // + Latency uint64 + + // + Limit uint64 + + // + Mountpoint string + + // + Reservation uint64 + + // + Status uint16 + + // + TimeStamp uint64 + + // + VolumeId string +} + +func NewMSFT_StorageQoSVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageQoSVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageQoSVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageQoSVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageQoSVolume{ + WmiInstance: tmp, + } + return +} + +// SetBandwidth sets the value of Bandwidth for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyBandwidth(value uint64) (err error) { + return instance.SetProperty("Bandwidth", (value)) +} + +// GetBandwidth gets the value of Bandwidth for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyBandwidth() (value uint64, err error) { + retValue, err := instance.GetProperty("Bandwidth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetBandwidthLimit sets the value of BandwidthLimit for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyBandwidthLimit(value uint64) (err error) { + return instance.SetProperty("BandwidthLimit", (value)) +} + +// GetBandwidthLimit gets the value of BandwidthLimit for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyBandwidthLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("BandwidthLimit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetInterval sets the value of Interval for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyInterval(value uint64) (err error) { + return instance.SetProperty("Interval", (value)) +} + +// GetInterval gets the value of Interval for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyInterval() (value uint64, err error) { + retValue, err := instance.GetProperty("Interval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIOPS sets the value of IOPS for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyIOPS(value uint64) (err error) { + return instance.SetProperty("IOPS", (value)) +} + +// GetIOPS gets the value of IOPS for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyIOPS() (value uint64, err error) { + retValue, err := instance.GetProperty("IOPS") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLatency sets the value of Latency for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyLatency(value uint64) (err error) { + return instance.SetProperty("Latency", (value)) +} + +// GetLatency gets the value of Latency for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyLatency() (value uint64, err error) { + retValue, err := instance.GetProperty("Latency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLimit sets the value of Limit for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyLimit(value uint64) (err error) { + return instance.SetProperty("Limit", (value)) +} + +// GetLimit gets the value of Limit for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyLimit() (value uint64, err error) { + retValue, err := instance.GetProperty("Limit") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMountpoint sets the value of Mountpoint for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyMountpoint(value string) (err error) { + return instance.SetProperty("Mountpoint", (value)) +} + +// GetMountpoint gets the value of Mountpoint for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyMountpoint() (value string, err error) { + retValue, err := instance.GetProperty("Mountpoint") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetReservation sets the value of Reservation for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyReservation(value uint64) (err error) { + return instance.SetProperty("Reservation", (value)) +} + +// GetReservation gets the value of Reservation for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyReservation() (value uint64, err error) { + retValue, err := instance.GetProperty("Reservation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStatus sets the value of Status for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyStatus(value uint16) (err error) { + return instance.SetProperty("Status", (value)) +} + +// GetStatus gets the value of Status for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("Status") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetTimeStamp sets the value of TimeStamp for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyTimeStamp(value uint64) (err error) { + return instance.SetProperty("TimeStamp", (value)) +} + +// GetTimeStamp gets the value of TimeStamp for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyTimeStamp() (value uint64, err error) { + retValue, err := instance.GetProperty("TimeStamp") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetVolumeId sets the value of VolumeId for the instance +func (instance *MSFT_StorageQoSVolume) SetPropertyVolumeId(value string) (err error) { + return instance.SetProperty("VolumeId", (value)) +} + +// GetVolumeId gets the value of VolumeId for the instance +func (instance *MSFT_StorageQoSVolume) GetPropertyVolumeId() (value string, err error) { + retValue, err := instance.GetProperty("VolumeId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageRack.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageRack.go new file mode 100644 index 00000000..b5996bcb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageRack.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageRack struct +type MSFT_StorageRack struct { + *MSFT_StorageFaultDomain +} + +func NewMSFT_StorageRackEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageRack, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageRack{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +func NewMSFT_StorageRackEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageRack, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageRack{ + MSFT_StorageFaultDomain: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageReliabilityCounter.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageReliabilityCounter.go new file mode 100644 index 00000000..d2991a61 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageReliabilityCounter.go @@ -0,0 +1,633 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageReliabilityCounter struct +type MSFT_StorageReliabilityCounter struct { + *MSFT_StorageObject + + // + DeviceId string + + // + FlushLatencyMax uint64 + + // + LoadUnloadCycleCount uint32 + + // + LoadUnloadCycleCountMax uint32 + + // + ManufactureDate string + + // + PowerOnHours uint32 + + // + ReadErrorsCorrected uint64 + + // + ReadErrorsTotal uint64 + + // + ReadErrorsUncorrected uint64 + + // + ReadLatencyMax uint64 + + // + StartStopCycleCount uint32 + + // + StartStopCycleCountMax uint32 + + // + Temperature uint8 + + // + TemperatureMax uint8 + + // + Wear uint8 + + // + WriteErrorsCorrected uint64 + + // + WriteErrorsTotal uint64 + + // + WriteErrorsUncorrected uint64 + + // + WriteLatencyMax uint64 +} + +func NewMSFT_StorageReliabilityCounterEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageReliabilityCounter, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageReliabilityCounter{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageReliabilityCounterEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageReliabilityCounter, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageReliabilityCounter{ + MSFT_StorageObject: tmp, + } + return +} + +// SetDeviceId sets the value of DeviceId for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyDeviceId(value string) (err error) { + return instance.SetProperty("DeviceId", (value)) +} + +// GetDeviceId gets the value of DeviceId for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyDeviceId() (value string, err error) { + retValue, err := instance.GetProperty("DeviceId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlushLatencyMax sets the value of FlushLatencyMax for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyFlushLatencyMax(value uint64) (err error) { + return instance.SetProperty("FlushLatencyMax", (value)) +} + +// GetFlushLatencyMax gets the value of FlushLatencyMax for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyFlushLatencyMax() (value uint64, err error) { + retValue, err := instance.GetProperty("FlushLatencyMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetLoadUnloadCycleCount sets the value of LoadUnloadCycleCount for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyLoadUnloadCycleCount(value uint32) (err error) { + return instance.SetProperty("LoadUnloadCycleCount", (value)) +} + +// GetLoadUnloadCycleCount gets the value of LoadUnloadCycleCount for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyLoadUnloadCycleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("LoadUnloadCycleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetLoadUnloadCycleCountMax sets the value of LoadUnloadCycleCountMax for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyLoadUnloadCycleCountMax(value uint32) (err error) { + return instance.SetProperty("LoadUnloadCycleCountMax", (value)) +} + +// GetLoadUnloadCycleCountMax gets the value of LoadUnloadCycleCountMax for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyLoadUnloadCycleCountMax() (value uint32, err error) { + retValue, err := instance.GetProperty("LoadUnloadCycleCountMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetManufactureDate sets the value of ManufactureDate for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyManufactureDate(value string) (err error) { + return instance.SetProperty("ManufactureDate", (value)) +} + +// GetManufactureDate gets the value of ManufactureDate for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyManufactureDate() (value string, err error) { + retValue, err := instance.GetProperty("ManufactureDate") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPowerOnHours sets the value of PowerOnHours for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyPowerOnHours(value uint32) (err error) { + return instance.SetProperty("PowerOnHours", (value)) +} + +// GetPowerOnHours gets the value of PowerOnHours for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyPowerOnHours() (value uint32, err error) { + retValue, err := instance.GetProperty("PowerOnHours") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReadErrorsCorrected sets the value of ReadErrorsCorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyReadErrorsCorrected(value uint64) (err error) { + return instance.SetProperty("ReadErrorsCorrected", (value)) +} + +// GetReadErrorsCorrected gets the value of ReadErrorsCorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyReadErrorsCorrected() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsCorrected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsTotal sets the value of ReadErrorsTotal for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyReadErrorsTotal(value uint64) (err error) { + return instance.SetProperty("ReadErrorsTotal", (value)) +} + +// GetReadErrorsTotal gets the value of ReadErrorsTotal for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyReadErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadErrorsUncorrected sets the value of ReadErrorsUncorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyReadErrorsUncorrected(value uint64) (err error) { + return instance.SetProperty("ReadErrorsUncorrected", (value)) +} + +// GetReadErrorsUncorrected gets the value of ReadErrorsUncorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyReadErrorsUncorrected() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadErrorsUncorrected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetReadLatencyMax sets the value of ReadLatencyMax for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyReadLatencyMax(value uint64) (err error) { + return instance.SetProperty("ReadLatencyMax", (value)) +} + +// GetReadLatencyMax gets the value of ReadLatencyMax for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyReadLatencyMax() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadLatencyMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStartStopCycleCount sets the value of StartStopCycleCount for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyStartStopCycleCount(value uint32) (err error) { + return instance.SetProperty("StartStopCycleCount", (value)) +} + +// GetStartStopCycleCount gets the value of StartStopCycleCount for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyStartStopCycleCount() (value uint32, err error) { + retValue, err := instance.GetProperty("StartStopCycleCount") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetStartStopCycleCountMax sets the value of StartStopCycleCountMax for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyStartStopCycleCountMax(value uint32) (err error) { + return instance.SetProperty("StartStopCycleCountMax", (value)) +} + +// GetStartStopCycleCountMax gets the value of StartStopCycleCountMax for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyStartStopCycleCountMax() (value uint32, err error) { + retValue, err := instance.GetProperty("StartStopCycleCountMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTemperature sets the value of Temperature for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyTemperature(value uint8) (err error) { + return instance.SetProperty("Temperature", (value)) +} + +// GetTemperature gets the value of Temperature for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyTemperature() (value uint8, err error) { + retValue, err := instance.GetProperty("Temperature") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetTemperatureMax sets the value of TemperatureMax for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyTemperatureMax(value uint8) (err error) { + return instance.SetProperty("TemperatureMax", (value)) +} + +// GetTemperatureMax gets the value of TemperatureMax for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyTemperatureMax() (value uint8, err error) { + retValue, err := instance.GetProperty("TemperatureMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetWear sets the value of Wear for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyWear(value uint8) (err error) { + return instance.SetProperty("Wear", (value)) +} + +// GetWear gets the value of Wear for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyWear() (value uint8, err error) { + retValue, err := instance.GetProperty("Wear") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint8(valuetmp) + + return +} + +// SetWriteErrorsCorrected sets the value of WriteErrorsCorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyWriteErrorsCorrected(value uint64) (err error) { + return instance.SetProperty("WriteErrorsCorrected", (value)) +} + +// GetWriteErrorsCorrected gets the value of WriteErrorsCorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyWriteErrorsCorrected() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsCorrected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsTotal sets the value of WriteErrorsTotal for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyWriteErrorsTotal(value uint64) (err error) { + return instance.SetProperty("WriteErrorsTotal", (value)) +} + +// GetWriteErrorsTotal gets the value of WriteErrorsTotal for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyWriteErrorsTotal() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsTotal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteErrorsUncorrected sets the value of WriteErrorsUncorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyWriteErrorsUncorrected(value uint64) (err error) { + return instance.SetProperty("WriteErrorsUncorrected", (value)) +} + +// GetWriteErrorsUncorrected gets the value of WriteErrorsUncorrected for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyWriteErrorsUncorrected() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteErrorsUncorrected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetWriteLatencyMax sets the value of WriteLatencyMax for the instance +func (instance *MSFT_StorageReliabilityCounter) SetPropertyWriteLatencyMax(value uint64) (err error) { + return instance.SetProperty("WriteLatencyMax", (value)) +} + +// GetWriteLatencyMax gets the value of WriteLatencyMax for the instance +func (instance *MSFT_StorageReliabilityCounter) GetPropertyWriteLatencyMax() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteLatencyMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// +func (instance *MSFT_StorageReliabilityCounter) Reset() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Reset") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageScaleUnit.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageScaleUnit.go new file mode 100644 index 00000000..8fc7224c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageScaleUnit.go @@ -0,0 +1,74 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageScaleUnit struct +type MSFT_StorageScaleUnit struct { + *MSFT_StorageFaultDomain +} + +func NewMSFT_StorageScaleUnitEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageScaleUnit, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageScaleUnit{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +func NewMSFT_StorageScaleUnitEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageScaleUnit, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageScaleUnit{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +// + +// +// +// +// +// + +// +// +func (instance *MSFT_StorageScaleUnit) Maintenance( /* IN */ EnableMaintenanceMode bool, + /* IN */ Timeout uint32, + /* IN */ Model string, + /* IN */ Manufacturer string, + /* IN */ IgnoreDetachedVirtualDisks bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Maintenance", EnableMaintenanceMode, Timeout, Model, Manufacturer, IgnoreDetachedVirtualDisks) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSetting.go new file mode 100644 index 00000000..f9ee55c1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSetting.go @@ -0,0 +1,156 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSetting struct +type MSFT_StorageSetting struct { + *cim.WmiInstance + + // + NewDiskPolicy uint16 + + // + ScrubPolicy uint32 +} + +func NewMSFT_StorageSettingEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSetting{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSetting{ + WmiInstance: tmp, + } + return +} + +// SetNewDiskPolicy sets the value of NewDiskPolicy for the instance +func (instance *MSFT_StorageSetting) SetPropertyNewDiskPolicy(value uint16) (err error) { + return instance.SetProperty("NewDiskPolicy", (value)) +} + +// GetNewDiskPolicy gets the value of NewDiskPolicy for the instance +func (instance *MSFT_StorageSetting) GetPropertyNewDiskPolicy() (value uint16, err error) { + retValue, err := instance.GetProperty("NewDiskPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetScrubPolicy sets the value of ScrubPolicy for the instance +func (instance *MSFT_StorageSetting) SetPropertyScrubPolicy(value uint32) (err error) { + return instance.SetProperty("ScrubPolicy", (value)) +} + +// GetScrubPolicy gets the value of ScrubPolicy for the instance +func (instance *MSFT_StorageSetting) GetPropertyScrubPolicy() (value uint32, err error) { + retValue, err := instance.GetProperty("ScrubPolicy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// + +// +// +func (instance *MSFT_StorageSetting) Get( /* OUT */ StorageSetting MSFT_StorageSetting) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Get") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +func (instance *MSFT_StorageSetting) Set( /* IN */ NewDiskPolicy uint16, + /* IN */ ScrubPolicy uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Set", NewDiskPolicy, ScrubPolicy) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *MSFT_StorageSetting) UpdateHostStorageCache() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("UpdateHostStorageCache") + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSite.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSite.go new file mode 100644 index 00000000..d59a3c98 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSite.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// MSFT_StorageSite struct +type MSFT_StorageSite struct { + *MSFT_StorageFaultDomain +} + +func NewMSFT_StorageSiteEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSite, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageSite{ + MSFT_StorageFaultDomain: tmp, + } + return +} + +func NewMSFT_StorageSiteEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSite, err error) { + tmp, err := NewMSFT_StorageFaultDomainEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSite{ + MSFT_StorageFaultDomain: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystem.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystem.go new file mode 100644 index 00000000..6449e927 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystem.go @@ -0,0 +1,2530 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystem struct +type MSFT_StorageSubSystem struct { + *MSFT_StorageObject + + // + AutomaticClusteringEnabled bool + + // + CimServerName string + + // + CurrentCacheLevel uint16 + + // + DataTieringType uint16 + + // + Description string + + // + FaultDomainAwarenessDefault uint16 + + // + FirmwareVersion string + + // + FriendlyName string + + // + HealthStatus uint16 + + // + iSCSITargetCreationScheme uint16 + + // + Manufacturer string + + // + MaskingClientSelectableDeviceNumbers bool + + // + MaskingMapCountMax uint16 + + // + MaskingOneInitiatorIdPerView bool + + // + MaskingOtherValidInitiatorIdTypes []string + + // + MaskingPortsPerView uint16 + + // + MaskingValidInitiatorIdTypes []uint16 + + // + Model string + + // + Name string + + // + NameFormat uint16 + + // + NumberOfSlots uint32 + + // + OperationalStatus []uint16 + + // + OtherHostTypeDescription []string + + // + OtherIdentifyingInfo []string + + // + OtherIdentifyingInfoDescription []string + + // + OtherOperationalStatusDescription string + + // + PhysicalDisksPerStoragePoolMin uint16 + + // + ReplicasPerSourceCloneMax uint16 + + // + ReplicasPerSourceMirrorMax uint16 + + // + ReplicasPerSourceSnapshotMax uint16 + + // + SerialNumber string + + // + StorageConnectionType uint16 + + // + SupportedDeduplicationFileSystemTypes []uint16 + + // + SupportedDeduplicationObjectTypes []uint16 + + // + SupportedFileServerProtocols []uint16 + + // + SupportedFileSystems []uint16 + + // + SupportedHostType []uint16 + + // + SupportsAutomaticStoragePoolSelection bool + + // + SupportsCloneLocal bool + + // + SupportsCloneRemote bool + + // + SupportsContinuouslyAvailableFileServer bool + + // + SupportsFileServer bool + + // + SupportsFileServerCreation bool + + // + SupportsMaskingVirtualDiskToHosts bool + + // + SupportsMirrorLocal bool + + // + SupportsMirrorRemote bool + + // + SupportsMultipleResiliencySettingsPerStoragePool bool + + // + SupportsSnapshotLocal bool + + // + SupportsSnapshotRemote bool + + // + SupportsStoragePoolAddPhysicalDisk bool + + // + SupportsStoragePoolCreation bool + + // + SupportsStoragePoolDeletion bool + + // + SupportsStoragePoolFriendlyNameModification bool + + // + SupportsStoragePoolRemovePhysicalDisk bool + + // + SupportsStorageTierCreation bool + + // + SupportsStorageTierDeletion bool + + // + SupportsStorageTieredVirtualDiskCreation bool + + // + SupportsStorageTierFriendlyNameModification bool + + // + SupportsStorageTierResize bool + + // + SupportsVirtualDiskCapacityExpansion bool + + // + SupportsVirtualDiskCapacityReduction bool + + // + SupportsVirtualDiskCreation bool + + // + SupportsVirtualDiskDeletion bool + + // + SupportsVirtualDiskModification bool + + // + SupportsVirtualDiskRepair bool + + // + SupportsVolumeCreation bool + + // + Tag string +} + +func NewMSFT_StorageSubSystemEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystem, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystem{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageSubSystemEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystem, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystem{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAutomaticClusteringEnabled sets the value of AutomaticClusteringEnabled for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyAutomaticClusteringEnabled(value bool) (err error) { + return instance.SetProperty("AutomaticClusteringEnabled", (value)) +} + +// GetAutomaticClusteringEnabled gets the value of AutomaticClusteringEnabled for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyAutomaticClusteringEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("AutomaticClusteringEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetCimServerName sets the value of CimServerName for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyCimServerName(value string) (err error) { + return instance.SetProperty("CimServerName", (value)) +} + +// GetCimServerName gets the value of CimServerName for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyCimServerName() (value string, err error) { + retValue, err := instance.GetProperty("CimServerName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCurrentCacheLevel sets the value of CurrentCacheLevel for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyCurrentCacheLevel(value uint16) (err error) { + return instance.SetProperty("CurrentCacheLevel", (value)) +} + +// GetCurrentCacheLevel gets the value of CurrentCacheLevel for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyCurrentCacheLevel() (value uint16, err error) { + retValue, err := instance.GetProperty("CurrentCacheLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDataTieringType sets the value of DataTieringType for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyDataTieringType(value uint16) (err error) { + return instance.SetProperty("DataTieringType", (value)) +} + +// GetDataTieringType gets the value of DataTieringType for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyDataTieringType() (value uint16, err error) { + retValue, err := instance.GetProperty("DataTieringType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultDomainAwarenessDefault sets the value of FaultDomainAwarenessDefault for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyFaultDomainAwarenessDefault(value uint16) (err error) { + return instance.SetProperty("FaultDomainAwarenessDefault", (value)) +} + +// GetFaultDomainAwarenessDefault gets the value of FaultDomainAwarenessDefault for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyFaultDomainAwarenessDefault() (value uint16, err error) { + retValue, err := instance.GetProperty("FaultDomainAwarenessDefault") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFirmwareVersion sets the value of FirmwareVersion for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyFirmwareVersion(value string) (err error) { + return instance.SetProperty("FirmwareVersion", (value)) +} + +// GetFirmwareVersion gets the value of FirmwareVersion for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyFirmwareVersion() (value string, err error) { + retValue, err := instance.GetProperty("FirmwareVersion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetiSCSITargetCreationScheme sets the value of iSCSITargetCreationScheme for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyiSCSITargetCreationScheme(value uint16) (err error) { + return instance.SetProperty("iSCSITargetCreationScheme", (value)) +} + +// GetiSCSITargetCreationScheme gets the value of iSCSITargetCreationScheme for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyiSCSITargetCreationScheme() (value uint16, err error) { + retValue, err := instance.GetProperty("iSCSITargetCreationScheme") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetManufacturer sets the value of Manufacturer for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyManufacturer(value string) (err error) { + return instance.SetProperty("Manufacturer", (value)) +} + +// GetManufacturer gets the value of Manufacturer for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyManufacturer() (value string, err error) { + retValue, err := instance.GetProperty("Manufacturer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetMaskingClientSelectableDeviceNumbers sets the value of MaskingClientSelectableDeviceNumbers for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyMaskingClientSelectableDeviceNumbers(value bool) (err error) { + return instance.SetProperty("MaskingClientSelectableDeviceNumbers", (value)) +} + +// GetMaskingClientSelectableDeviceNumbers gets the value of MaskingClientSelectableDeviceNumbers for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyMaskingClientSelectableDeviceNumbers() (value bool, err error) { + retValue, err := instance.GetProperty("MaskingClientSelectableDeviceNumbers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMaskingMapCountMax sets the value of MaskingMapCountMax for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyMaskingMapCountMax(value uint16) (err error) { + return instance.SetProperty("MaskingMapCountMax", (value)) +} + +// GetMaskingMapCountMax gets the value of MaskingMapCountMax for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyMaskingMapCountMax() (value uint16, err error) { + retValue, err := instance.GetProperty("MaskingMapCountMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaskingOneInitiatorIdPerView sets the value of MaskingOneInitiatorIdPerView for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyMaskingOneInitiatorIdPerView(value bool) (err error) { + return instance.SetProperty("MaskingOneInitiatorIdPerView", (value)) +} + +// GetMaskingOneInitiatorIdPerView gets the value of MaskingOneInitiatorIdPerView for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyMaskingOneInitiatorIdPerView() (value bool, err error) { + retValue, err := instance.GetProperty("MaskingOneInitiatorIdPerView") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetMaskingOtherValidInitiatorIdTypes sets the value of MaskingOtherValidInitiatorIdTypes for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyMaskingOtherValidInitiatorIdTypes(value []string) (err error) { + return instance.SetProperty("MaskingOtherValidInitiatorIdTypes", (value)) +} + +// GetMaskingOtherValidInitiatorIdTypes gets the value of MaskingOtherValidInitiatorIdTypes for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyMaskingOtherValidInitiatorIdTypes() (value []string, err error) { + retValue, err := instance.GetProperty("MaskingOtherValidInitiatorIdTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetMaskingPortsPerView sets the value of MaskingPortsPerView for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyMaskingPortsPerView(value uint16) (err error) { + return instance.SetProperty("MaskingPortsPerView", (value)) +} + +// GetMaskingPortsPerView gets the value of MaskingPortsPerView for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyMaskingPortsPerView() (value uint16, err error) { + retValue, err := instance.GetProperty("MaskingPortsPerView") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaskingValidInitiatorIdTypes sets the value of MaskingValidInitiatorIdTypes for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyMaskingValidInitiatorIdTypes(value []uint16) (err error) { + return instance.SetProperty("MaskingValidInitiatorIdTypes", (value)) +} + +// GetMaskingValidInitiatorIdTypes gets the value of MaskingValidInitiatorIdTypes for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyMaskingValidInitiatorIdTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("MaskingValidInitiatorIdTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetModel sets the value of Model for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyModel(value string) (err error) { + return instance.SetProperty("Model", (value)) +} + +// GetModel gets the value of Model for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyModel() (value string, err error) { + retValue, err := instance.GetProperty("Model") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNameFormat sets the value of NameFormat for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyNameFormat(value uint16) (err error) { + return instance.SetProperty("NameFormat", (value)) +} + +// GetNameFormat gets the value of NameFormat for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyNameFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("NameFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfSlots sets the value of NumberOfSlots for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyNumberOfSlots(value uint32) (err error) { + return instance.SetProperty("NumberOfSlots", (value)) +} + +// GetNumberOfSlots gets the value of NumberOfSlots for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyNumberOfSlots() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfSlots") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherHostTypeDescription sets the value of OtherHostTypeDescription for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyOtherHostTypeDescription(value []string) (err error) { + return instance.SetProperty("OtherHostTypeDescription", (value)) +} + +// GetOtherHostTypeDescription gets the value of OtherHostTypeDescription for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyOtherHostTypeDescription() (value []string, err error) { + retValue, err := instance.GetProperty("OtherHostTypeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOtherIdentifyingInfo sets the value of OtherIdentifyingInfo for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyOtherIdentifyingInfo(value []string) (err error) { + return instance.SetProperty("OtherIdentifyingInfo", (value)) +} + +// GetOtherIdentifyingInfo gets the value of OtherIdentifyingInfo for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyOtherIdentifyingInfo() (value []string, err error) { + retValue, err := instance.GetProperty("OtherIdentifyingInfo") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOtherIdentifyingInfoDescription sets the value of OtherIdentifyingInfoDescription for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyOtherIdentifyingInfoDescription(value []string) (err error) { + return instance.SetProperty("OtherIdentifyingInfoDescription", (value)) +} + +// GetOtherIdentifyingInfoDescription gets the value of OtherIdentifyingInfoDescription for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyOtherIdentifyingInfoDescription() (value []string, err error) { + retValue, err := instance.GetProperty("OtherIdentifyingInfoDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetOtherOperationalStatusDescription sets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyOtherOperationalStatusDescription(value string) (err error) { + return instance.SetProperty("OtherOperationalStatusDescription", (value)) +} + +// GetOtherOperationalStatusDescription gets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyOtherOperationalStatusDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherOperationalStatusDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPhysicalDisksPerStoragePoolMin sets the value of PhysicalDisksPerStoragePoolMin for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyPhysicalDisksPerStoragePoolMin(value uint16) (err error) { + return instance.SetProperty("PhysicalDisksPerStoragePoolMin", (value)) +} + +// GetPhysicalDisksPerStoragePoolMin gets the value of PhysicalDisksPerStoragePoolMin for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyPhysicalDisksPerStoragePoolMin() (value uint16, err error) { + retValue, err := instance.GetProperty("PhysicalDisksPerStoragePoolMin") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReplicasPerSourceCloneMax sets the value of ReplicasPerSourceCloneMax for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyReplicasPerSourceCloneMax(value uint16) (err error) { + return instance.SetProperty("ReplicasPerSourceCloneMax", (value)) +} + +// GetReplicasPerSourceCloneMax gets the value of ReplicasPerSourceCloneMax for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyReplicasPerSourceCloneMax() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplicasPerSourceCloneMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReplicasPerSourceMirrorMax sets the value of ReplicasPerSourceMirrorMax for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyReplicasPerSourceMirrorMax(value uint16) (err error) { + return instance.SetProperty("ReplicasPerSourceMirrorMax", (value)) +} + +// GetReplicasPerSourceMirrorMax gets the value of ReplicasPerSourceMirrorMax for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyReplicasPerSourceMirrorMax() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplicasPerSourceMirrorMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReplicasPerSourceSnapshotMax sets the value of ReplicasPerSourceSnapshotMax for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyReplicasPerSourceSnapshotMax(value uint16) (err error) { + return instance.SetProperty("ReplicasPerSourceSnapshotMax", (value)) +} + +// GetReplicasPerSourceSnapshotMax gets the value of ReplicasPerSourceSnapshotMax for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyReplicasPerSourceSnapshotMax() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplicasPerSourceSnapshotMax") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSerialNumber sets the value of SerialNumber for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySerialNumber(value string) (err error) { + return instance.SetProperty("SerialNumber", (value)) +} + +// GetSerialNumber gets the value of SerialNumber for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySerialNumber() (value string, err error) { + retValue, err := instance.GetProperty("SerialNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetStorageConnectionType sets the value of StorageConnectionType for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyStorageConnectionType(value uint16) (err error) { + return instance.SetProperty("StorageConnectionType", (value)) +} + +// GetStorageConnectionType gets the value of StorageConnectionType for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyStorageConnectionType() (value uint16, err error) { + retValue, err := instance.GetProperty("StorageConnectionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSupportedDeduplicationFileSystemTypes sets the value of SupportedDeduplicationFileSystemTypes for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportedDeduplicationFileSystemTypes(value []uint16) (err error) { + return instance.SetProperty("SupportedDeduplicationFileSystemTypes", (value)) +} + +// GetSupportedDeduplicationFileSystemTypes gets the value of SupportedDeduplicationFileSystemTypes for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportedDeduplicationFileSystemTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedDeduplicationFileSystemTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedDeduplicationObjectTypes sets the value of SupportedDeduplicationObjectTypes for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportedDeduplicationObjectTypes(value []uint16) (err error) { + return instance.SetProperty("SupportedDeduplicationObjectTypes", (value)) +} + +// GetSupportedDeduplicationObjectTypes gets the value of SupportedDeduplicationObjectTypes for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportedDeduplicationObjectTypes() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedDeduplicationObjectTypes") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedFileServerProtocols sets the value of SupportedFileServerProtocols for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportedFileServerProtocols(value []uint16) (err error) { + return instance.SetProperty("SupportedFileServerProtocols", (value)) +} + +// GetSupportedFileServerProtocols gets the value of SupportedFileServerProtocols for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportedFileServerProtocols() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedFileServerProtocols") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedFileSystems sets the value of SupportedFileSystems for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportedFileSystems(value []uint16) (err error) { + return instance.SetProperty("SupportedFileSystems", (value)) +} + +// GetSupportedFileSystems gets the value of SupportedFileSystems for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportedFileSystems() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedFileSystems") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportedHostType sets the value of SupportedHostType for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportedHostType(value []uint16) (err error) { + return instance.SetProperty("SupportedHostType", (value)) +} + +// GetSupportedHostType gets the value of SupportedHostType for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportedHostType() (value []uint16, err error) { + retValue, err := instance.GetProperty("SupportedHostType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetSupportsAutomaticStoragePoolSelection sets the value of SupportsAutomaticStoragePoolSelection for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsAutomaticStoragePoolSelection(value bool) (err error) { + return instance.SetProperty("SupportsAutomaticStoragePoolSelection", (value)) +} + +// GetSupportsAutomaticStoragePoolSelection gets the value of SupportsAutomaticStoragePoolSelection for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsAutomaticStoragePoolSelection() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsAutomaticStoragePoolSelection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsCloneLocal sets the value of SupportsCloneLocal for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsCloneLocal(value bool) (err error) { + return instance.SetProperty("SupportsCloneLocal", (value)) +} + +// GetSupportsCloneLocal gets the value of SupportsCloneLocal for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsCloneLocal() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsCloneLocal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsCloneRemote sets the value of SupportsCloneRemote for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsCloneRemote(value bool) (err error) { + return instance.SetProperty("SupportsCloneRemote", (value)) +} + +// GetSupportsCloneRemote gets the value of SupportsCloneRemote for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsCloneRemote() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsCloneRemote") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsContinuouslyAvailableFileServer sets the value of SupportsContinuouslyAvailableFileServer for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsContinuouslyAvailableFileServer(value bool) (err error) { + return instance.SetProperty("SupportsContinuouslyAvailableFileServer", (value)) +} + +// GetSupportsContinuouslyAvailableFileServer gets the value of SupportsContinuouslyAvailableFileServer for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsContinuouslyAvailableFileServer() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsContinuouslyAvailableFileServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFileServer sets the value of SupportsFileServer for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsFileServer(value bool) (err error) { + return instance.SetProperty("SupportsFileServer", (value)) +} + +// GetSupportsFileServer gets the value of SupportsFileServer for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsFileServer() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFileServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsFileServerCreation sets the value of SupportsFileServerCreation for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsFileServerCreation(value bool) (err error) { + return instance.SetProperty("SupportsFileServerCreation", (value)) +} + +// GetSupportsFileServerCreation gets the value of SupportsFileServerCreation for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsFileServerCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsFileServerCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsMaskingVirtualDiskToHosts sets the value of SupportsMaskingVirtualDiskToHosts for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsMaskingVirtualDiskToHosts(value bool) (err error) { + return instance.SetProperty("SupportsMaskingVirtualDiskToHosts", (value)) +} + +// GetSupportsMaskingVirtualDiskToHosts gets the value of SupportsMaskingVirtualDiskToHosts for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsMaskingVirtualDiskToHosts() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsMaskingVirtualDiskToHosts") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsMirrorLocal sets the value of SupportsMirrorLocal for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsMirrorLocal(value bool) (err error) { + return instance.SetProperty("SupportsMirrorLocal", (value)) +} + +// GetSupportsMirrorLocal gets the value of SupportsMirrorLocal for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsMirrorLocal() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsMirrorLocal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsMirrorRemote sets the value of SupportsMirrorRemote for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsMirrorRemote(value bool) (err error) { + return instance.SetProperty("SupportsMirrorRemote", (value)) +} + +// GetSupportsMirrorRemote gets the value of SupportsMirrorRemote for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsMirrorRemote() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsMirrorRemote") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsMultipleResiliencySettingsPerStoragePool sets the value of SupportsMultipleResiliencySettingsPerStoragePool for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsMultipleResiliencySettingsPerStoragePool(value bool) (err error) { + return instance.SetProperty("SupportsMultipleResiliencySettingsPerStoragePool", (value)) +} + +// GetSupportsMultipleResiliencySettingsPerStoragePool gets the value of SupportsMultipleResiliencySettingsPerStoragePool for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsMultipleResiliencySettingsPerStoragePool() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsMultipleResiliencySettingsPerStoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsSnapshotLocal sets the value of SupportsSnapshotLocal for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsSnapshotLocal(value bool) (err error) { + return instance.SetProperty("SupportsSnapshotLocal", (value)) +} + +// GetSupportsSnapshotLocal gets the value of SupportsSnapshotLocal for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsSnapshotLocal() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSnapshotLocal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsSnapshotRemote sets the value of SupportsSnapshotRemote for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsSnapshotRemote(value bool) (err error) { + return instance.SetProperty("SupportsSnapshotRemote", (value)) +} + +// GetSupportsSnapshotRemote gets the value of SupportsSnapshotRemote for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsSnapshotRemote() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSnapshotRemote") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStoragePoolAddPhysicalDisk sets the value of SupportsStoragePoolAddPhysicalDisk for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStoragePoolAddPhysicalDisk(value bool) (err error) { + return instance.SetProperty("SupportsStoragePoolAddPhysicalDisk", (value)) +} + +// GetSupportsStoragePoolAddPhysicalDisk gets the value of SupportsStoragePoolAddPhysicalDisk for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStoragePoolAddPhysicalDisk() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStoragePoolAddPhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStoragePoolCreation sets the value of SupportsStoragePoolCreation for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStoragePoolCreation(value bool) (err error) { + return instance.SetProperty("SupportsStoragePoolCreation", (value)) +} + +// GetSupportsStoragePoolCreation gets the value of SupportsStoragePoolCreation for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStoragePoolCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStoragePoolCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStoragePoolDeletion sets the value of SupportsStoragePoolDeletion for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStoragePoolDeletion(value bool) (err error) { + return instance.SetProperty("SupportsStoragePoolDeletion", (value)) +} + +// GetSupportsStoragePoolDeletion gets the value of SupportsStoragePoolDeletion for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStoragePoolDeletion() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStoragePoolDeletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStoragePoolFriendlyNameModification sets the value of SupportsStoragePoolFriendlyNameModification for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStoragePoolFriendlyNameModification(value bool) (err error) { + return instance.SetProperty("SupportsStoragePoolFriendlyNameModification", (value)) +} + +// GetSupportsStoragePoolFriendlyNameModification gets the value of SupportsStoragePoolFriendlyNameModification for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStoragePoolFriendlyNameModification() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStoragePoolFriendlyNameModification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStoragePoolRemovePhysicalDisk sets the value of SupportsStoragePoolRemovePhysicalDisk for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStoragePoolRemovePhysicalDisk(value bool) (err error) { + return instance.SetProperty("SupportsStoragePoolRemovePhysicalDisk", (value)) +} + +// GetSupportsStoragePoolRemovePhysicalDisk gets the value of SupportsStoragePoolRemovePhysicalDisk for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStoragePoolRemovePhysicalDisk() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStoragePoolRemovePhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStorageTierCreation sets the value of SupportsStorageTierCreation for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStorageTierCreation(value bool) (err error) { + return instance.SetProperty("SupportsStorageTierCreation", (value)) +} + +// GetSupportsStorageTierCreation gets the value of SupportsStorageTierCreation for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStorageTierCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStorageTierCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStorageTierDeletion sets the value of SupportsStorageTierDeletion for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStorageTierDeletion(value bool) (err error) { + return instance.SetProperty("SupportsStorageTierDeletion", (value)) +} + +// GetSupportsStorageTierDeletion gets the value of SupportsStorageTierDeletion for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStorageTierDeletion() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStorageTierDeletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStorageTieredVirtualDiskCreation sets the value of SupportsStorageTieredVirtualDiskCreation for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStorageTieredVirtualDiskCreation(value bool) (err error) { + return instance.SetProperty("SupportsStorageTieredVirtualDiskCreation", (value)) +} + +// GetSupportsStorageTieredVirtualDiskCreation gets the value of SupportsStorageTieredVirtualDiskCreation for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStorageTieredVirtualDiskCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStorageTieredVirtualDiskCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStorageTierFriendlyNameModification sets the value of SupportsStorageTierFriendlyNameModification for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStorageTierFriendlyNameModification(value bool) (err error) { + return instance.SetProperty("SupportsStorageTierFriendlyNameModification", (value)) +} + +// GetSupportsStorageTierFriendlyNameModification gets the value of SupportsStorageTierFriendlyNameModification for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStorageTierFriendlyNameModification() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStorageTierFriendlyNameModification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsStorageTierResize sets the value of SupportsStorageTierResize for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsStorageTierResize(value bool) (err error) { + return instance.SetProperty("SupportsStorageTierResize", (value)) +} + +// GetSupportsStorageTierResize gets the value of SupportsStorageTierResize for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsStorageTierResize() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsStorageTierResize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVirtualDiskCapacityExpansion sets the value of SupportsVirtualDiskCapacityExpansion for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVirtualDiskCapacityExpansion(value bool) (err error) { + return instance.SetProperty("SupportsVirtualDiskCapacityExpansion", (value)) +} + +// GetSupportsVirtualDiskCapacityExpansion gets the value of SupportsVirtualDiskCapacityExpansion for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVirtualDiskCapacityExpansion() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVirtualDiskCapacityExpansion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVirtualDiskCapacityReduction sets the value of SupportsVirtualDiskCapacityReduction for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVirtualDiskCapacityReduction(value bool) (err error) { + return instance.SetProperty("SupportsVirtualDiskCapacityReduction", (value)) +} + +// GetSupportsVirtualDiskCapacityReduction gets the value of SupportsVirtualDiskCapacityReduction for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVirtualDiskCapacityReduction() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVirtualDiskCapacityReduction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVirtualDiskCreation sets the value of SupportsVirtualDiskCreation for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVirtualDiskCreation(value bool) (err error) { + return instance.SetProperty("SupportsVirtualDiskCreation", (value)) +} + +// GetSupportsVirtualDiskCreation gets the value of SupportsVirtualDiskCreation for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVirtualDiskCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVirtualDiskCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVirtualDiskDeletion sets the value of SupportsVirtualDiskDeletion for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVirtualDiskDeletion(value bool) (err error) { + return instance.SetProperty("SupportsVirtualDiskDeletion", (value)) +} + +// GetSupportsVirtualDiskDeletion gets the value of SupportsVirtualDiskDeletion for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVirtualDiskDeletion() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVirtualDiskDeletion") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVirtualDiskModification sets the value of SupportsVirtualDiskModification for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVirtualDiskModification(value bool) (err error) { + return instance.SetProperty("SupportsVirtualDiskModification", (value)) +} + +// GetSupportsVirtualDiskModification gets the value of SupportsVirtualDiskModification for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVirtualDiskModification() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVirtualDiskModification") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVirtualDiskRepair sets the value of SupportsVirtualDiskRepair for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVirtualDiskRepair(value bool) (err error) { + return instance.SetProperty("SupportsVirtualDiskRepair", (value)) +} + +// GetSupportsVirtualDiskRepair gets the value of SupportsVirtualDiskRepair for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVirtualDiskRepair() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVirtualDiskRepair") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsVolumeCreation sets the value of SupportsVolumeCreation for the instance +func (instance *MSFT_StorageSubSystem) SetPropertySupportsVolumeCreation(value bool) (err error) { + return instance.SetProperty("SupportsVolumeCreation", (value)) +} + +// GetSupportsVolumeCreation gets the value of SupportsVolumeCreation for the instance +func (instance *MSFT_StorageSubSystem) GetPropertySupportsVolumeCreation() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsVolumeCreation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTag sets the value of Tag for the instance +func (instance *MSFT_StorageSubSystem) SetPropertyTag(value string) (err error) { + return instance.SetProperty("Tag", (value)) +} + +// GetTag gets the value of Tag for the instance +func (instance *MSFT_StorageSubSystem) GetPropertyTag() (value string, err error) { + retValue, err := instance.GetProperty("Tag") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_StorageSubSystem) CreateStoragePool( /* IN */ FriendlyName string, + /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* IN */ PhysicalDisks []MSFT_PhysicalDisk, + /* IN */ ResiliencySettingNameDefault string, + /* IN */ ProvisioningTypeDefault uint16, + /* IN */ MediaTypeDefault uint16, + /* IN */ LogicalSectorSizeDefault uint64, + /* IN */ EnclosureAwareDefault bool, + /* IN */ FaultDomainAwarenessDefault uint16, + /* IN */ WriteCacheSizeDefault uint64, + /* IN */ AutoWriteCacheSize bool, + /* IN */ Version uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStoragePool MSFT_StoragePool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateStoragePool", FriendlyName, Usage, OtherUsageDescription, PhysicalDisks, ResiliencySettingNameDefault, ProvisioningTypeDefault, MediaTypeDefault, LogicalSectorSizeDefault, EnclosureAwareDefault, FaultDomainAwarenessDefault, WriteCacheSizeDefault, AutoWriteCacheSize, Version, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +// +func (instance *MSFT_StorageSubSystem) CreateVirtualDisk( /* IN */ FriendlyName string, + /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* IN/OUT */ Size uint64, + /* IN */ UseMaximumSize bool, + /* IN */ NumberOfDataCopies uint16, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ Interleave uint64, + /* IN */ ParityLayout uint16, + /* IN */ RequestNoSinglePointOfFailure bool, + /* IN */ IsEnclosureAware bool, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ProvisioningType uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedVirtualDisk MSFT_VirtualDisk, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateVirtualDisk", FriendlyName, Usage, OtherUsageDescription, UseMaximumSize, NumberOfDataCopies, PhysicalDiskRedundancy, NumberOfColumns, Interleave, ParityLayout, RequestNoSinglePointOfFailure, IsEnclosureAware, FaultDomainAwareness, ProvisioningType, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_StorageSubSystem) CreateMaskingSet( /* IN */ FriendlyName string, + /* IN */ VirtualDiskNames []string, + /* IN */ DeviceAccesses []uint16, + /* IN */ DeviceNumbers []string, + /* IN */ TargetPortAddresses []string, + /* IN */ InitiatorAddresses []string, + /* IN */ HostType uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ CreatedMaskingSet MSFT_MaskingSet, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateMaskingSet", FriendlyName, VirtualDiskNames, DeviceAccesses, DeviceNumbers, TargetPortAddresses, InitiatorAddresses, HostType, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_StorageSubSystem) GetSecurityDescriptor( /* OUT */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageSubSystem) SetSecurityDescriptor( /* IN */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetSecurityDescriptor", SecurityDescriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageSubSystem) SetDescription( /* IN */ Description string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDescription", Description) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_StorageSubSystem) SetAttributes( /* IN */ AutomaticClusteringEnabled bool, + /* IN */ FaultDomainAwarenessDefault uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", AutomaticClusteringEnabled, FaultDomainAwarenessDefault) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +// +func (instance *MSFT_StorageSubSystem) CreateReplicationRelationship( /* IN */ FriendlyName string, + /* IN */ SyncType uint16, + /* IN */ TargetStorageSubsystem MSFT_ReplicaPeer, + /* IN */ SourceReplicationGroupFriendlyName string, + /* IN */ SourceReplicationGroupDescription string, + /* IN */ SourceStorageElements []MSFT_StorageObject, + /* IN */ SourceGroupSettings MSFT_ReplicationSettings, + /* IN */ TargetReplicationGroupFriendlyName string, + /* IN */ TargetReplicationGroupDescription string, + /* IN */ TargetStorageElements []MSFT_StorageObject, + /* IN */ TargetStoragePool MSFT_StoragePool, + /* IN */ TargetStoragePools []MSFT_StoragePool, + /* IN */ TargetGroupSettings MSFT_ReplicationSettings, + /* IN */ RecoveryPointObjective uint32, + /* IN */ RunAsJob bool, + /* IN/OUT */ SourceGroup MSFT_ReplicationGroup, + /* IN */ TargetGroup MSFT_ReplicationGroup, + /* OUT */ CreatedReplicaPeer MSFT_ReplicaPeer, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateReplicationRelationship", FriendlyName, SyncType, TargetStorageSubsystem, SourceReplicationGroupFriendlyName, SourceReplicationGroupDescription, SourceStorageElements, SourceGroupSettings, TargetReplicationGroupFriendlyName, TargetReplicationGroupDescription, TargetStorageElements, TargetStoragePool, TargetStoragePools, TargetGroupSettings, RecoveryPointObjective, RunAsJob, TargetGroup) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_StorageSubSystem) DeleteReplicationRelationship( /* IN */ SourceReplicationGroup MSFT_ReplicationGroup, + /* IN */ TargetGroupReplicaPeer MSFT_ReplicaPeer, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteReplicationRelationship", SourceReplicationGroup, TargetGroupReplicaPeer, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_StorageSubSystem) CreateReplicationGroup( /* IN */ FriendlyName string, + /* IN */ Description string, + /* IN */ StorageElements []MSFT_StorageObject, + /* IN */ ReplicationSettings MSFT_ReplicationSettings, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ CreatedReplicationGroup MSFT_ReplicationGroup, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateReplicationGroup", FriendlyName, Description, StorageElements, ReplicationSettings, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +// +// +// +func (instance *MSFT_StorageSubSystem) CreateFileServer( /* IN */ FriendlyName string, + /* IN */ FileSharingProtocols []uint16, + /* IN */ HostNames []string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedFileServer MSFT_FileServer, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateFileServer", FriendlyName, FileSharingProtocols, HostNames, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_StorageSubSystem) GetDiagnosticInfo( /* IN */ DestinationPath string, + /* IN */ TimeSpan uint32, + /* IN */ ActivityId string, + /* IN */ ExcludeOperationalLog bool, + /* IN */ ExcludeDiagnosticLog bool, + /* IN */ IncludeLiveDump bool, + /* IN */ CopyExistingInfoOnly bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetDiagnosticInfo", DestinationPath, TimeSpan, ActivityId, ExcludeOperationalLog, ExcludeDiagnosticLog, IncludeLiveDump, CopyExistingInfoOnly) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_StorageSubSystem) ClearDiagnosticInfo( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("ClearDiagnosticInfo") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_StorageSubSystem) StartDiagnosticLog( /* IN */ Level uint16, + /* IN */ MaxLogSize uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("StartDiagnosticLog", Level, MaxLogSize) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_StorageSubSystem) StopDiagnosticLog( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("StopDiagnosticLog") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_StorageSubSystem) Diagnose( /* OUT */ DiagnoseResults []MSFT_StorageDiagnoseResult, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Diagnose") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_StorageSubSystem) GetActions( /* OUT */ ActionResults []MSFT_HealthAction, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetActions") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToDisk.go new file mode 100644 index 00000000..3a5f89b7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToDisk struct +type MSFT_StorageSubSystemToDisk struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToDisk{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_StorageSubSystemToDisk) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_StorageSubSystemToDisk) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToDisk) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToDisk) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileServer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileServer.go new file mode 100644 index 00000000..11a0a132 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileServer.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToFileServer struct +type MSFT_StorageSubSystemToFileServer struct { + *cim.WmiInstance + + // + FileServer MSFT_FileServer + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToFileServerEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToFileServer, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToFileServer{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToFileServerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToFileServer, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToFileServer{ + WmiInstance: tmp, + } + return +} + +// SetFileServer sets the value of FileServer for the instance +func (instance *MSFT_StorageSubSystemToFileServer) SetPropertyFileServer(value MSFT_FileServer) (err error) { + return instance.SetProperty("FileServer", (value)) +} + +// GetFileServer gets the value of FileServer for the instance +func (instance *MSFT_StorageSubSystemToFileServer) GetPropertyFileServer() (value MSFT_FileServer, err error) { + retValue, err := instance.GetProperty("FileServer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_FileServer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_FileServer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_FileServer(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToFileServer) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToFileServer) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileShare.go new file mode 100644 index 00000000..9ef9ca15 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToFileShare.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToFileShare struct +type MSFT_StorageSubSystemToFileShare struct { + *cim.WmiInstance + + // + FileShare MSFT_FileShare + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToFileShareEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToFileShare, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToFileShare{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToFileShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToFileShare, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToFileShare{ + WmiInstance: tmp, + } + return +} + +// SetFileShare sets the value of FileShare for the instance +func (instance *MSFT_StorageSubSystemToFileShare) SetPropertyFileShare(value MSFT_FileShare) (err error) { + return instance.SetProperty("FileShare", (value)) +} + +// GetFileShare gets the value of FileShare for the instance +func (instance *MSFT_StorageSubSystemToFileShare) GetPropertyFileShare() (value MSFT_FileShare, err error) { + retValue, err := instance.GetProperty("FileShare") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_FileShare) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_FileShare is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_FileShare(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToFileShare) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToFileShare) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToInitiatorId.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToInitiatorId.go new file mode 100644 index 00000000..5ef51e2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToInitiatorId.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToInitiatorId struct +type MSFT_StorageSubSystemToInitiatorId struct { + *cim.WmiInstance + + // + InitiatorId MSFT_InitiatorId + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToInitiatorIdEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToInitiatorId, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToInitiatorId{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToInitiatorIdEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToInitiatorId, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToInitiatorId{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorId sets the value of InitiatorId for the instance +func (instance *MSFT_StorageSubSystemToInitiatorId) SetPropertyInitiatorId(value MSFT_InitiatorId) (err error) { + return instance.SetProperty("InitiatorId", (value)) +} + +// GetInitiatorId gets the value of InitiatorId for the instance +func (instance *MSFT_StorageSubSystemToInitiatorId) GetPropertyInitiatorId() (value MSFT_InitiatorId, err error) { + retValue, err := instance.GetProperty("InitiatorId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_InitiatorId) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_InitiatorId is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_InitiatorId(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToInitiatorId) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToInitiatorId) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToMaskingSet.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToMaskingSet.go new file mode 100644 index 00000000..135a59fb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToMaskingSet.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToMaskingSet struct +type MSFT_StorageSubSystemToMaskingSet struct { + *cim.WmiInstance + + // + MaskingSet MSFT_MaskingSet + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToMaskingSetEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToMaskingSet, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToMaskingSet{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToMaskingSetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToMaskingSet, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToMaskingSet{ + WmiInstance: tmp, + } + return +} + +// SetMaskingSet sets the value of MaskingSet for the instance +func (instance *MSFT_StorageSubSystemToMaskingSet) SetPropertyMaskingSet(value MSFT_MaskingSet) (err error) { + return instance.SetProperty("MaskingSet", (value)) +} + +// GetMaskingSet gets the value of MaskingSet for the instance +func (instance *MSFT_StorageSubSystemToMaskingSet) GetPropertyMaskingSet() (value MSFT_MaskingSet, err error) { + retValue, err := instance.GetProperty("MaskingSet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_MaskingSet) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_MaskingSet is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_MaskingSet(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToMaskingSet) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToMaskingSet) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToOffloadDataTransferSetting.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToOffloadDataTransferSetting.go new file mode 100644 index 00000000..87f5c9c3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToOffloadDataTransferSetting.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToOffloadDataTransferSetting struct +type MSFT_StorageSubSystemToOffloadDataTransferSetting struct { + *cim.WmiInstance + + // + OffloadDataTransferSetting MSFT_OffloadDataTransferSetting + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToOffloadDataTransferSettingEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToOffloadDataTransferSetting, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToOffloadDataTransferSetting{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToOffloadDataTransferSettingEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToOffloadDataTransferSetting, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToOffloadDataTransferSetting{ + WmiInstance: tmp, + } + return +} + +// SetOffloadDataTransferSetting sets the value of OffloadDataTransferSetting for the instance +func (instance *MSFT_StorageSubSystemToOffloadDataTransferSetting) SetPropertyOffloadDataTransferSetting(value MSFT_OffloadDataTransferSetting) (err error) { + return instance.SetProperty("OffloadDataTransferSetting", (value)) +} + +// GetOffloadDataTransferSetting gets the value of OffloadDataTransferSetting for the instance +func (instance *MSFT_StorageSubSystemToOffloadDataTransferSetting) GetPropertyOffloadDataTransferSetting() (value MSFT_OffloadDataTransferSetting, err error) { + retValue, err := instance.GetProperty("OffloadDataTransferSetting") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_OffloadDataTransferSetting) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_OffloadDataTransferSetting is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_OffloadDataTransferSetting(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToOffloadDataTransferSetting) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToOffloadDataTransferSetting) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPartition.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPartition.go new file mode 100644 index 00000000..9e0015b9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPartition.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToPartition struct +type MSFT_StorageSubSystemToPartition struct { + *cim.WmiInstance + + // + Partition MSFT_Partition + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToPartitionEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToPartition, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToPartition{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToPartitionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToPartition, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToPartition{ + WmiInstance: tmp, + } + return +} + +// SetPartition sets the value of Partition for the instance +func (instance *MSFT_StorageSubSystemToPartition) SetPropertyPartition(value MSFT_Partition) (err error) { + return instance.SetProperty("Partition", (value)) +} + +// GetPartition gets the value of Partition for the instance +func (instance *MSFT_StorageSubSystemToPartition) GetPropertyPartition() (value MSFT_Partition, err error) { + retValue, err := instance.GetProperty("Partition") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Partition) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Partition is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Partition(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToPartition) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToPartition) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPhysicalDisk.go new file mode 100644 index 00000000..3c6e8ec8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToPhysicalDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToPhysicalDisk struct +type MSFT_StorageSubSystemToPhysicalDisk struct { + *cim.WmiInstance + + // + PhysicalDisk MSFT_PhysicalDisk + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToPhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToPhysicalDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToPhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToPhysicalDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +// SetPhysicalDisk sets the value of PhysicalDisk for the instance +func (instance *MSFT_StorageSubSystemToPhysicalDisk) SetPropertyPhysicalDisk(value MSFT_PhysicalDisk) (err error) { + return instance.SetProperty("PhysicalDisk", (value)) +} + +// GetPhysicalDisk gets the value of PhysicalDisk for the instance +func (instance *MSFT_StorageSubSystemToPhysicalDisk) GetPropertyPhysicalDisk() (value MSFT_PhysicalDisk, err error) { + retValue, err := instance.GetProperty("PhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_PhysicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_PhysicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_PhysicalDisk(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToPhysicalDisk) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToPhysicalDisk) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicaPeer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicaPeer.go new file mode 100644 index 00000000..07e186f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicaPeer.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToReplicaPeer struct +type MSFT_StorageSubSystemToReplicaPeer struct { + *cim.WmiInstance + + // + ReplicaPeer MSFT_ReplicaPeer + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToReplicaPeerEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToReplicaPeer, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToReplicaPeer{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToReplicaPeerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToReplicaPeer, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToReplicaPeer{ + WmiInstance: tmp, + } + return +} + +// SetReplicaPeer sets the value of ReplicaPeer for the instance +func (instance *MSFT_StorageSubSystemToReplicaPeer) SetPropertyReplicaPeer(value MSFT_ReplicaPeer) (err error) { + return instance.SetProperty("ReplicaPeer", (value)) +} + +// GetReplicaPeer gets the value of ReplicaPeer for the instance +func (instance *MSFT_StorageSubSystemToReplicaPeer) GetPropertyReplicaPeer() (value MSFT_ReplicaPeer, err error) { + retValue, err := instance.GetProperty("ReplicaPeer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicaPeer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicaPeer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicaPeer(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToReplicaPeer) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToReplicaPeer) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationCapabilities.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationCapabilities.go new file mode 100644 index 00000000..e6ee9c12 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationCapabilities.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToReplicationCapabilities struct +type MSFT_StorageSubSystemToReplicationCapabilities struct { + *cim.WmiInstance + + // + ReplicationCapabilities MSFT_ReplicationCapabilities + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToReplicationCapabilitiesEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToReplicationCapabilities, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToReplicationCapabilities{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToReplicationCapabilitiesEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToReplicationCapabilities, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToReplicationCapabilities{ + WmiInstance: tmp, + } + return +} + +// SetReplicationCapabilities sets the value of ReplicationCapabilities for the instance +func (instance *MSFT_StorageSubSystemToReplicationCapabilities) SetPropertyReplicationCapabilities(value MSFT_ReplicationCapabilities) (err error) { + return instance.SetProperty("ReplicationCapabilities", (value)) +} + +// GetReplicationCapabilities gets the value of ReplicationCapabilities for the instance +func (instance *MSFT_StorageSubSystemToReplicationCapabilities) GetPropertyReplicationCapabilities() (value MSFT_ReplicationCapabilities, err error) { + retValue, err := instance.GetProperty("ReplicationCapabilities") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicationCapabilities) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicationCapabilities is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicationCapabilities(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToReplicationCapabilities) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToReplicationCapabilities) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationGroup.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationGroup.go new file mode 100644 index 00000000..41845c59 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToReplicationGroup.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToReplicationGroup struct +type MSFT_StorageSubSystemToReplicationGroup struct { + *cim.WmiInstance + + // + ReplicationGroup MSFT_ReplicationGroup + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToReplicationGroupEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToReplicationGroup, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToReplicationGroup{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToReplicationGroupEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToReplicationGroup, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToReplicationGroup{ + WmiInstance: tmp, + } + return +} + +// SetReplicationGroup sets the value of ReplicationGroup for the instance +func (instance *MSFT_StorageSubSystemToReplicationGroup) SetPropertyReplicationGroup(value MSFT_ReplicationGroup) (err error) { + return instance.SetProperty("ReplicationGroup", (value)) +} + +// GetReplicationGroup gets the value of ReplicationGroup for the instance +func (instance *MSFT_StorageSubSystemToReplicationGroup) GetPropertyReplicationGroup() (value MSFT_ReplicationGroup, err error) { + retValue, err := instance.GetProperty("ReplicationGroup") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicationGroup) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicationGroup is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicationGroup(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToReplicationGroup) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToReplicationGroup) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageEnclosure.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageEnclosure.go new file mode 100644 index 00000000..a5aebf84 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageEnclosure.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToStorageEnclosure struct +type MSFT_StorageSubSystemToStorageEnclosure struct { + *cim.WmiInstance + + // + StorageEnclosure MSFT_StorageEnclosure + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToStorageEnclosureEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToStorageEnclosure, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageEnclosure{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToStorageEnclosureEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToStorageEnclosure, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageEnclosure{ + WmiInstance: tmp, + } + return +} + +// SetStorageEnclosure sets the value of StorageEnclosure for the instance +func (instance *MSFT_StorageSubSystemToStorageEnclosure) SetPropertyStorageEnclosure(value MSFT_StorageEnclosure) (err error) { + return instance.SetProperty("StorageEnclosure", (value)) +} + +// GetStorageEnclosure gets the value of StorageEnclosure for the instance +func (instance *MSFT_StorageSubSystemToStorageEnclosure) GetPropertyStorageEnclosure() (value MSFT_StorageEnclosure, err error) { + retValue, err := instance.GetProperty("StorageEnclosure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageEnclosure) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageEnclosure is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageEnclosure(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageEnclosure) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageEnclosure) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageFaultDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageFaultDomain.go new file mode 100644 index 00000000..f1f42941 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageFaultDomain.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToStorageFaultDomain struct +type MSFT_StorageSubSystemToStorageFaultDomain struct { + *cim.WmiInstance + + // + StorageFaultDomain MSFT_StorageFaultDomain + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToStorageFaultDomainEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToStorageFaultDomain, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageFaultDomain{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToStorageFaultDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToStorageFaultDomain, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageFaultDomain{ + WmiInstance: tmp, + } + return +} + +// SetStorageFaultDomain sets the value of StorageFaultDomain for the instance +func (instance *MSFT_StorageSubSystemToStorageFaultDomain) SetPropertyStorageFaultDomain(value MSFT_StorageFaultDomain) (err error) { + return instance.SetProperty("StorageFaultDomain", (value)) +} + +// GetStorageFaultDomain gets the value of StorageFaultDomain for the instance +func (instance *MSFT_StorageSubSystemToStorageFaultDomain) GetPropertyStorageFaultDomain() (value MSFT_StorageFaultDomain, err error) { + retValue, err := instance.GetProperty("StorageFaultDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageFaultDomain) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageFaultDomain is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageFaultDomain(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageFaultDomain) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageFaultDomain) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageHealth.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageHealth.go new file mode 100644 index 00000000..e2935bb1 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageHealth.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToStorageHealth struct +type MSFT_StorageSubSystemToStorageHealth struct { + *cim.WmiInstance + + // + StorageHealth MSFT_StorageHealth + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToStorageHealthEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToStorageHealth, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageHealth{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToStorageHealthEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToStorageHealth, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageHealth{ + WmiInstance: tmp, + } + return +} + +// SetStorageHealth sets the value of StorageHealth for the instance +func (instance *MSFT_StorageSubSystemToStorageHealth) SetPropertyStorageHealth(value MSFT_StorageHealth) (err error) { + return instance.SetProperty("StorageHealth", (value)) +} + +// GetStorageHealth gets the value of StorageHealth for the instance +func (instance *MSFT_StorageSubSystemToStorageHealth) GetPropertyStorageHealth() (value MSFT_StorageHealth, err error) { + retValue, err := instance.GetProperty("StorageHealth") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageHealth) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageHealth is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageHealth(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageHealth) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageHealth) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageNode.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageNode.go new file mode 100644 index 00000000..e8b225f3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStorageNode.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToStorageNode struct +type MSFT_StorageSubSystemToStorageNode struct { + *cim.WmiInstance + + // + StorageNode MSFT_StorageNode + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToStorageNodeEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToStorageNode, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageNode{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToStorageNodeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToStorageNode, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStorageNode{ + WmiInstance: tmp, + } + return +} + +// SetStorageNode sets the value of StorageNode for the instance +func (instance *MSFT_StorageSubSystemToStorageNode) SetPropertyStorageNode(value MSFT_StorageNode) (err error) { + return instance.SetProperty("StorageNode", (value)) +} + +// GetStorageNode gets the value of StorageNode for the instance +func (instance *MSFT_StorageSubSystemToStorageNode) GetPropertyStorageNode() (value MSFT_StorageNode, err error) { + retValue, err := instance.GetProperty("StorageNode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageNode) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageNode is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageNode(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageNode) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStorageNode) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStoragePool.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStoragePool.go new file mode 100644 index 00000000..6946f6ab --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToStoragePool.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToStoragePool struct +type MSFT_StorageSubSystemToStoragePool struct { + *cim.WmiInstance + + // + StoragePool MSFT_StoragePool + + // + StorageSubSystem MSFT_StorageSubSystem +} + +func NewMSFT_StorageSubSystemToStoragePoolEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToStoragePool, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStoragePool{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToStoragePoolEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToStoragePool, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToStoragePool{ + WmiInstance: tmp, + } + return +} + +// SetStoragePool sets the value of StoragePool for the instance +func (instance *MSFT_StorageSubSystemToStoragePool) SetPropertyStoragePool(value MSFT_StoragePool) (err error) { + return instance.SetProperty("StoragePool", (value)) +} + +// GetStoragePool gets the value of StoragePool for the instance +func (instance *MSFT_StorageSubSystemToStoragePool) GetPropertyStoragePool() (value MSFT_StoragePool, err error) { + retValue, err := instance.GetProperty("StoragePool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StoragePool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StoragePool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StoragePool(valuetmp) + + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStoragePool) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToStoragePool) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPort.go new file mode 100644 index 00000000..38f1968a --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPort.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToTargetPort struct +type MSFT_StorageSubSystemToTargetPort struct { + *cim.WmiInstance + + // + StorageSubSystem MSFT_StorageSubSystem + + // + TargetPort MSFT_TargetPort +} + +func NewMSFT_StorageSubSystemToTargetPortEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToTargetPort, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToTargetPort{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToTargetPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToTargetPort, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToTargetPort{ + WmiInstance: tmp, + } + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToTargetPort) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToTargetPort) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} + +// SetTargetPort sets the value of TargetPort for the instance +func (instance *MSFT_StorageSubSystemToTargetPort) SetPropertyTargetPort(value MSFT_TargetPort) (err error) { + return instance.SetProperty("TargetPort", (value)) +} + +// GetTargetPort gets the value of TargetPort for the instance +func (instance *MSFT_StorageSubSystemToTargetPort) GetPropertyTargetPort() (value MSFT_TargetPort, err error) { + retValue, err := instance.GetProperty("TargetPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_TargetPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_TargetPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_TargetPort(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPortal.go new file mode 100644 index 00000000..651b4245 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToTargetPortal.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToTargetPortal struct +type MSFT_StorageSubSystemToTargetPortal struct { + *cim.WmiInstance + + // + StorageSubSystem MSFT_StorageSubSystem + + // + TargetPortal MSFT_TargetPortal +} + +func NewMSFT_StorageSubSystemToTargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToTargetPortal, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToTargetPortal{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToTargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToTargetPortal, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToTargetPortal{ + WmiInstance: tmp, + } + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToTargetPortal) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToTargetPortal) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} + +// SetTargetPortal sets the value of TargetPortal for the instance +func (instance *MSFT_StorageSubSystemToTargetPortal) SetPropertyTargetPortal(value MSFT_TargetPortal) (err error) { + return instance.SetProperty("TargetPortal", (value)) +} + +// GetTargetPortal gets the value of TargetPortal for the instance +func (instance *MSFT_StorageSubSystemToTargetPortal) GetPropertyTargetPortal() (value MSFT_TargetPortal, err error) { + retValue, err := instance.GetProperty("TargetPortal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_TargetPortal) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_TargetPortal is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_TargetPortal(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVirtualDisk.go new file mode 100644 index 00000000..04159074 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToVirtualDisk struct +type MSFT_StorageSubSystemToVirtualDisk struct { + *cim.WmiInstance + + // + StorageSubSystem MSFT_StorageSubSystem + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_StorageSubSystemToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToVirtualDisk) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToVirtualDisk) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_StorageSubSystemToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_StorageSubSystemToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVolume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVolume.go new file mode 100644 index 00000000..72d94be9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageSubSystemToVolume.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageSubSystemToVolume struct +type MSFT_StorageSubSystemToVolume struct { + *cim.WmiInstance + + // + StorageSubSystem MSFT_StorageSubSystem + + // + Volume MSFT_Volume +} + +func NewMSFT_StorageSubSystemToVolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageSubSystemToVolume, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToVolume{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_StorageSubSystemToVolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageSubSystemToVolume, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageSubSystemToVolume{ + WmiInstance: tmp, + } + return +} + +// SetStorageSubSystem sets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToVolume) SetPropertyStorageSubSystem(value MSFT_StorageSubSystem) (err error) { + return instance.SetProperty("StorageSubSystem", (value)) +} + +// GetStorageSubSystem gets the value of StorageSubSystem for the instance +func (instance *MSFT_StorageSubSystemToVolume) GetPropertyStorageSubSystem() (value MSFT_StorageSubSystem, err error) { + retValue, err := instance.GetProperty("StorageSubSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageSubSystem) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageSubSystem is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageSubSystem(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_StorageSubSystemToVolume) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_StorageSubSystemToVolume) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageTier.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageTier.go new file mode 100644 index 00000000..c5e342c8 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_StorageTier.go @@ -0,0 +1,826 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_StorageTier struct +type MSFT_StorageTier struct { + *MSFT_StorageObject + + // + AllocatedSize uint64 + + // + AllocationUnitSize uint64 + + // + ColumnIsolation uint16 + + // + Description string + + // + FaultDomainAwareness uint16 + + // + FootprintOnPool uint64 + + // + FriendlyName string + + // + Interleave uint64 + + // + MediaType uint16 + + // + NumberOfColumns uint16 + + // + NumberOfDataCopies uint16 + + // + NumberOfGroups uint16 + + // + ParityLayout uint16 + + // + PhysicalDiskRedundancy uint16 + + // + ProvisioningType uint16 + + // + ResiliencySettingName string + + // + Size uint64 + + // + TierClass uint16 + + // + Usage uint16 +} + +func NewMSFT_StorageTierEx1(instance *cim.WmiInstance) (newInstance *MSFT_StorageTier, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_StorageTier{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_StorageTierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_StorageTier, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_StorageTier{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAllocatedSize sets the value of AllocatedSize for the instance +func (instance *MSFT_StorageTier) SetPropertyAllocatedSize(value uint64) (err error) { + return instance.SetProperty("AllocatedSize", (value)) +} + +// GetAllocatedSize gets the value of AllocatedSize for the instance +func (instance *MSFT_StorageTier) GetPropertyAllocatedSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocatedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationUnitSize sets the value of AllocationUnitSize for the instance +func (instance *MSFT_StorageTier) SetPropertyAllocationUnitSize(value uint64) (err error) { + return instance.SetProperty("AllocationUnitSize", (value)) +} + +// GetAllocationUnitSize gets the value of AllocationUnitSize for the instance +func (instance *MSFT_StorageTier) GetPropertyAllocationUnitSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationUnitSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetColumnIsolation sets the value of ColumnIsolation for the instance +func (instance *MSFT_StorageTier) SetPropertyColumnIsolation(value uint16) (err error) { + return instance.SetProperty("ColumnIsolation", (value)) +} + +// GetColumnIsolation gets the value of ColumnIsolation for the instance +func (instance *MSFT_StorageTier) GetPropertyColumnIsolation() (value uint16, err error) { + retValue, err := instance.GetProperty("ColumnIsolation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDescription sets the value of Description for the instance +func (instance *MSFT_StorageTier) SetPropertyDescription(value string) (err error) { + return instance.SetProperty("Description", (value)) +} + +// GetDescription gets the value of Description for the instance +func (instance *MSFT_StorageTier) GetPropertyDescription() (value string, err error) { + retValue, err := instance.GetProperty("Description") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFaultDomainAwareness sets the value of FaultDomainAwareness for the instance +func (instance *MSFT_StorageTier) SetPropertyFaultDomainAwareness(value uint16) (err error) { + return instance.SetProperty("FaultDomainAwareness", (value)) +} + +// GetFaultDomainAwareness gets the value of FaultDomainAwareness for the instance +func (instance *MSFT_StorageTier) GetPropertyFaultDomainAwareness() (value uint16, err error) { + retValue, err := instance.GetProperty("FaultDomainAwareness") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFootprintOnPool sets the value of FootprintOnPool for the instance +func (instance *MSFT_StorageTier) SetPropertyFootprintOnPool(value uint64) (err error) { + return instance.SetProperty("FootprintOnPool", (value)) +} + +// GetFootprintOnPool gets the value of FootprintOnPool for the instance +func (instance *MSFT_StorageTier) GetPropertyFootprintOnPool() (value uint64, err error) { + retValue, err := instance.GetProperty("FootprintOnPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_StorageTier) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_StorageTier) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInterleave sets the value of Interleave for the instance +func (instance *MSFT_StorageTier) SetPropertyInterleave(value uint64) (err error) { + return instance.SetProperty("Interleave", (value)) +} + +// GetInterleave gets the value of Interleave for the instance +func (instance *MSFT_StorageTier) GetPropertyInterleave() (value uint64, err error) { + retValue, err := instance.GetProperty("Interleave") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *MSFT_StorageTier) SetPropertyMediaType(value uint16) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *MSFT_StorageTier) GetPropertyMediaType() (value uint16, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfColumns sets the value of NumberOfColumns for the instance +func (instance *MSFT_StorageTier) SetPropertyNumberOfColumns(value uint16) (err error) { + return instance.SetProperty("NumberOfColumns", (value)) +} + +// GetNumberOfColumns gets the value of NumberOfColumns for the instance +func (instance *MSFT_StorageTier) GetPropertyNumberOfColumns() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfColumns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfDataCopies sets the value of NumberOfDataCopies for the instance +func (instance *MSFT_StorageTier) SetPropertyNumberOfDataCopies(value uint16) (err error) { + return instance.SetProperty("NumberOfDataCopies", (value)) +} + +// GetNumberOfDataCopies gets the value of NumberOfDataCopies for the instance +func (instance *MSFT_StorageTier) GetPropertyNumberOfDataCopies() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfDataCopies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfGroups sets the value of NumberOfGroups for the instance +func (instance *MSFT_StorageTier) SetPropertyNumberOfGroups(value uint16) (err error) { + return instance.SetProperty("NumberOfGroups", (value)) +} + +// GetNumberOfGroups gets the value of NumberOfGroups for the instance +func (instance *MSFT_StorageTier) GetPropertyNumberOfGroups() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetParityLayout sets the value of ParityLayout for the instance +func (instance *MSFT_StorageTier) SetPropertyParityLayout(value uint16) (err error) { + return instance.SetProperty("ParityLayout", (value)) +} + +// GetParityLayout gets the value of ParityLayout for the instance +func (instance *MSFT_StorageTier) GetPropertyParityLayout() (value uint16, err error) { + retValue, err := instance.GetProperty("ParityLayout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPhysicalDiskRedundancy sets the value of PhysicalDiskRedundancy for the instance +func (instance *MSFT_StorageTier) SetPropertyPhysicalDiskRedundancy(value uint16) (err error) { + return instance.SetProperty("PhysicalDiskRedundancy", (value)) +} + +// GetPhysicalDiskRedundancy gets the value of PhysicalDiskRedundancy for the instance +func (instance *MSFT_StorageTier) GetPropertyPhysicalDiskRedundancy() (value uint16, err error) { + retValue, err := instance.GetProperty("PhysicalDiskRedundancy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetProvisioningType sets the value of ProvisioningType for the instance +func (instance *MSFT_StorageTier) SetPropertyProvisioningType(value uint16) (err error) { + return instance.SetProperty("ProvisioningType", (value)) +} + +// GetProvisioningType gets the value of ProvisioningType for the instance +func (instance *MSFT_StorageTier) GetPropertyProvisioningType() (value uint16, err error) { + retValue, err := instance.GetProperty("ProvisioningType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetResiliencySettingName sets the value of ResiliencySettingName for the instance +func (instance *MSFT_StorageTier) SetPropertyResiliencySettingName(value string) (err error) { + return instance.SetProperty("ResiliencySettingName", (value)) +} + +// GetResiliencySettingName gets the value of ResiliencySettingName for the instance +func (instance *MSFT_StorageTier) GetPropertyResiliencySettingName() (value string, err error) { + retValue, err := instance.GetProperty("ResiliencySettingName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_StorageTier) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_StorageTier) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetTierClass sets the value of TierClass for the instance +func (instance *MSFT_StorageTier) SetPropertyTierClass(value uint16) (err error) { + return instance.SetProperty("TierClass", (value)) +} + +// GetTierClass gets the value of TierClass for the instance +func (instance *MSFT_StorageTier) GetPropertyTierClass() (value uint16, err error) { + retValue, err := instance.GetProperty("TierClass") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetUsage sets the value of Usage for the instance +func (instance *MSFT_StorageTier) SetPropertyUsage(value uint16) (err error) { + return instance.SetProperty("Usage", (value)) +} + +// GetUsage gets the value of Usage for the instance +func (instance *MSFT_StorageTier) GetPropertyUsage() (value uint16, err error) { + retValue, err := instance.GetProperty("Usage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +// +func (instance *MSFT_StorageTier) GetPhysicalExtent( /* OUT */ PhysicalExtents []MSFT_PhysicalExtent, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetPhysicalExtent") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_StorageTier) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +// +func (instance *MSFT_StorageTier) Resize( /* IN/OUT */ Size uint64, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Resize", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageTier) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_StorageTier) SetAttributes( /* IN */ ProvisioningType uint16, + /* IN */ AllocationUnitSize uint64, + /* IN */ MediaType uint16, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ColumnIsolation uint16, + /* IN */ ResiliencySettingName string, + /* IN */ Usage uint16, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfDataCopies uint16, + /* IN */ NumberOfGroups uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ Interleave uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", ProvisioningType, AllocationUnitSize, MediaType, FaultDomainAwareness, ColumnIsolation, ResiliencySettingName, Usage, PhysicalDiskRedundancy, NumberOfDataCopies, NumberOfGroups, NumberOfColumns, Interleave) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_StorageTier) SetDescription( /* IN */ Description string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDescription", Description) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +// +// +// +func (instance *MSFT_StorageTier) GetSupportedSize( /* IN */ ResiliencySettingName string, + /* OUT */ SupportedSizes []uint64, + /* OUT */ TierSizeMin uint64, + /* OUT */ TierSizeMax uint64, + /* OUT */ TierSizeDivisor uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedSize", ResiliencySettingName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_StorageTier) AddStorageFaultDomain( /* IN */ StorageFaultDomains []MSFT_StorageFaultDomain, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddStorageFaultDomain", StorageFaultDomains, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_StorageTier) RemoveStorageFaultDomain( /* IN */ StorageFaultDomains []MSFT_StorageFaultDomain, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveStorageFaultDomain", StorageFaultDomains, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Synchronized.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Synchronized.go new file mode 100644 index 00000000..35fc2d8f --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Synchronized.go @@ -0,0 +1,471 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_Synchronized struct +type MSFT_Synchronized struct { + *cim.WmiInstance + + // + CopyMethodology uint16 + + // + CopyPriority uint16 + + // + CopyState uint16 + + // + CopyType uint16 + + // + PercentSynced uint16 + + // + ProgressStatus uint16 + + // + RecoveryPointObjective uint32 + + // + ReplicaType uint16 + + // + RequestedCopyState uint16 + + // + SyncMaintained bool + + // + SyncMode uint16 + + // + SyncState uint16 + + // + SyncTime string + + // + SyncType uint16 +} + +func NewMSFT_SynchronizedEx1(instance *cim.WmiInstance) (newInstance *MSFT_Synchronized, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_Synchronized{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_SynchronizedEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_Synchronized, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_Synchronized{ + WmiInstance: tmp, + } + return +} + +// SetCopyMethodology sets the value of CopyMethodology for the instance +func (instance *MSFT_Synchronized) SetPropertyCopyMethodology(value uint16) (err error) { + return instance.SetProperty("CopyMethodology", (value)) +} + +// GetCopyMethodology gets the value of CopyMethodology for the instance +func (instance *MSFT_Synchronized) GetPropertyCopyMethodology() (value uint16, err error) { + retValue, err := instance.GetProperty("CopyMethodology") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCopyPriority sets the value of CopyPriority for the instance +func (instance *MSFT_Synchronized) SetPropertyCopyPriority(value uint16) (err error) { + return instance.SetProperty("CopyPriority", (value)) +} + +// GetCopyPriority gets the value of CopyPriority for the instance +func (instance *MSFT_Synchronized) GetPropertyCopyPriority() (value uint16, err error) { + retValue, err := instance.GetProperty("CopyPriority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCopyState sets the value of CopyState for the instance +func (instance *MSFT_Synchronized) SetPropertyCopyState(value uint16) (err error) { + return instance.SetProperty("CopyState", (value)) +} + +// GetCopyState gets the value of CopyState for the instance +func (instance *MSFT_Synchronized) GetPropertyCopyState() (value uint16, err error) { + retValue, err := instance.GetProperty("CopyState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetCopyType sets the value of CopyType for the instance +func (instance *MSFT_Synchronized) SetPropertyCopyType(value uint16) (err error) { + return instance.SetProperty("CopyType", (value)) +} + +// GetCopyType gets the value of CopyType for the instance +func (instance *MSFT_Synchronized) GetPropertyCopyType() (value uint16, err error) { + retValue, err := instance.GetProperty("CopyType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPercentSynced sets the value of PercentSynced for the instance +func (instance *MSFT_Synchronized) SetPropertyPercentSynced(value uint16) (err error) { + return instance.SetProperty("PercentSynced", (value)) +} + +// GetPercentSynced gets the value of PercentSynced for the instance +func (instance *MSFT_Synchronized) GetPropertyPercentSynced() (value uint16, err error) { + retValue, err := instance.GetProperty("PercentSynced") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetProgressStatus sets the value of ProgressStatus for the instance +func (instance *MSFT_Synchronized) SetPropertyProgressStatus(value uint16) (err error) { + return instance.SetProperty("ProgressStatus", (value)) +} + +// GetProgressStatus gets the value of ProgressStatus for the instance +func (instance *MSFT_Synchronized) GetPropertyProgressStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("ProgressStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRecoveryPointObjective sets the value of RecoveryPointObjective for the instance +func (instance *MSFT_Synchronized) SetPropertyRecoveryPointObjective(value uint32) (err error) { + return instance.SetProperty("RecoveryPointObjective", (value)) +} + +// GetRecoveryPointObjective gets the value of RecoveryPointObjective for the instance +func (instance *MSFT_Synchronized) GetPropertyRecoveryPointObjective() (value uint32, err error) { + retValue, err := instance.GetProperty("RecoveryPointObjective") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetReplicaType sets the value of ReplicaType for the instance +func (instance *MSFT_Synchronized) SetPropertyReplicaType(value uint16) (err error) { + return instance.SetProperty("ReplicaType", (value)) +} + +// GetReplicaType gets the value of ReplicaType for the instance +func (instance *MSFT_Synchronized) GetPropertyReplicaType() (value uint16, err error) { + retValue, err := instance.GetProperty("ReplicaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRequestedCopyState sets the value of RequestedCopyState for the instance +func (instance *MSFT_Synchronized) SetPropertyRequestedCopyState(value uint16) (err error) { + return instance.SetProperty("RequestedCopyState", (value)) +} + +// GetRequestedCopyState gets the value of RequestedCopyState for the instance +func (instance *MSFT_Synchronized) GetPropertyRequestedCopyState() (value uint16, err error) { + retValue, err := instance.GetProperty("RequestedCopyState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSyncMaintained sets the value of SyncMaintained for the instance +func (instance *MSFT_Synchronized) SetPropertySyncMaintained(value bool) (err error) { + return instance.SetProperty("SyncMaintained", (value)) +} + +// GetSyncMaintained gets the value of SyncMaintained for the instance +func (instance *MSFT_Synchronized) GetPropertySyncMaintained() (value bool, err error) { + retValue, err := instance.GetProperty("SyncMaintained") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSyncMode sets the value of SyncMode for the instance +func (instance *MSFT_Synchronized) SetPropertySyncMode(value uint16) (err error) { + return instance.SetProperty("SyncMode", (value)) +} + +// GetSyncMode gets the value of SyncMode for the instance +func (instance *MSFT_Synchronized) GetPropertySyncMode() (value uint16, err error) { + retValue, err := instance.GetProperty("SyncMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSyncState sets the value of SyncState for the instance +func (instance *MSFT_Synchronized) SetPropertySyncState(value uint16) (err error) { + return instance.SetProperty("SyncState", (value)) +} + +// GetSyncState gets the value of SyncState for the instance +func (instance *MSFT_Synchronized) GetPropertySyncState() (value uint16, err error) { + retValue, err := instance.GetProperty("SyncState") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSyncTime sets the value of SyncTime for the instance +func (instance *MSFT_Synchronized) SetPropertySyncTime(value string) (err error) { + return instance.SetProperty("SyncTime", (value)) +} + +// GetSyncTime gets the value of SyncTime for the instance +func (instance *MSFT_Synchronized) GetPropertySyncTime() (value string, err error) { + retValue, err := instance.GetProperty("SyncTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSyncType sets the value of SyncType for the instance +func (instance *MSFT_Synchronized) SetPropertySyncType(value uint16) (err error) { + return instance.SetProperty("SyncType", (value)) +} + +// GetSyncType gets the value of SyncType for the instance +func (instance *MSFT_Synchronized) GetPropertySyncType() (value uint16, err error) { + retValue, err := instance.GetProperty("SyncType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPort.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPort.go new file mode 100644 index 00000000..0abcaac5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPort.go @@ -0,0 +1,593 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_TargetPort struct +type MSFT_TargetPort struct { + *MSFT_StorageObject + + // + ConnectionType uint16 + + // + FriendlyName string + + // + HealthStatus uint16 + + // + LinkTechnology uint16 + + // + MaxSpeed uint64 + + // + NetworkAddresses []string + + // + NodeAddress string + + // + OperationalStatus []uint16 + + // + OtherConnectionTypeDescription string + + // + OtherLinkTechnology string + + // + OtherOperationalStatusDescription string + + // + PortAddress string + + // + PortNumbers []uint16 + + // + PortType uint16 + + // + Role uint16 + + // + Speed uint64 + + // + StorageControllerId string + + // + UsageRestriction uint16 +} + +func NewMSFT_TargetPortEx1(instance *cim.WmiInstance) (newInstance *MSFT_TargetPort, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_TargetPort{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_TargetPortEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_TargetPort, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_TargetPort{ + MSFT_StorageObject: tmp, + } + return +} + +// SetConnectionType sets the value of ConnectionType for the instance +func (instance *MSFT_TargetPort) SetPropertyConnectionType(value uint16) (err error) { + return instance.SetProperty("ConnectionType", (value)) +} + +// GetConnectionType gets the value of ConnectionType for the instance +func (instance *MSFT_TargetPort) GetPropertyConnectionType() (value uint16, err error) { + retValue, err := instance.GetProperty("ConnectionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_TargetPort) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_TargetPort) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_TargetPort) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_TargetPort) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetLinkTechnology sets the value of LinkTechnology for the instance +func (instance *MSFT_TargetPort) SetPropertyLinkTechnology(value uint16) (err error) { + return instance.SetProperty("LinkTechnology", (value)) +} + +// GetLinkTechnology gets the value of LinkTechnology for the instance +func (instance *MSFT_TargetPort) GetPropertyLinkTechnology() (value uint16, err error) { + retValue, err := instance.GetProperty("LinkTechnology") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetMaxSpeed sets the value of MaxSpeed for the instance +func (instance *MSFT_TargetPort) SetPropertyMaxSpeed(value uint64) (err error) { + return instance.SetProperty("MaxSpeed", (value)) +} + +// GetMaxSpeed gets the value of MaxSpeed for the instance +func (instance *MSFT_TargetPort) GetPropertyMaxSpeed() (value uint64, err error) { + retValue, err := instance.GetProperty("MaxSpeed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetNetworkAddresses sets the value of NetworkAddresses for the instance +func (instance *MSFT_TargetPort) SetPropertyNetworkAddresses(value []string) (err error) { + return instance.SetProperty("NetworkAddresses", (value)) +} + +// GetNetworkAddresses gets the value of NetworkAddresses for the instance +func (instance *MSFT_TargetPort) GetPropertyNetworkAddresses() (value []string, err error) { + retValue, err := instance.GetProperty("NetworkAddresses") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetNodeAddress sets the value of NodeAddress for the instance +func (instance *MSFT_TargetPort) SetPropertyNodeAddress(value string) (err error) { + return instance.SetProperty("NodeAddress", (value)) +} + +// GetNodeAddress gets the value of NodeAddress for the instance +func (instance *MSFT_TargetPort) GetPropertyNodeAddress() (value string, err error) { + retValue, err := instance.GetProperty("NodeAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_TargetPort) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_TargetPort) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherConnectionTypeDescription sets the value of OtherConnectionTypeDescription for the instance +func (instance *MSFT_TargetPort) SetPropertyOtherConnectionTypeDescription(value string) (err error) { + return instance.SetProperty("OtherConnectionTypeDescription", (value)) +} + +// GetOtherConnectionTypeDescription gets the value of OtherConnectionTypeDescription for the instance +func (instance *MSFT_TargetPort) GetPropertyOtherConnectionTypeDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherConnectionTypeDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherLinkTechnology sets the value of OtherLinkTechnology for the instance +func (instance *MSFT_TargetPort) SetPropertyOtherLinkTechnology(value string) (err error) { + return instance.SetProperty("OtherLinkTechnology", (value)) +} + +// GetOtherLinkTechnology gets the value of OtherLinkTechnology for the instance +func (instance *MSFT_TargetPort) GetPropertyOtherLinkTechnology() (value string, err error) { + retValue, err := instance.GetProperty("OtherLinkTechnology") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherOperationalStatusDescription sets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_TargetPort) SetPropertyOtherOperationalStatusDescription(value string) (err error) { + return instance.SetProperty("OtherOperationalStatusDescription", (value)) +} + +// GetOtherOperationalStatusDescription gets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_TargetPort) GetPropertyOtherOperationalStatusDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherOperationalStatusDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortAddress sets the value of PortAddress for the instance +func (instance *MSFT_TargetPort) SetPropertyPortAddress(value string) (err error) { + return instance.SetProperty("PortAddress", (value)) +} + +// GetPortAddress gets the value of PortAddress for the instance +func (instance *MSFT_TargetPort) GetPropertyPortAddress() (value string, err error) { + retValue, err := instance.GetProperty("PortAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortNumbers sets the value of PortNumbers for the instance +func (instance *MSFT_TargetPort) SetPropertyPortNumbers(value []uint16) (err error) { + return instance.SetProperty("PortNumbers", (value)) +} + +// GetPortNumbers gets the value of PortNumbers for the instance +func (instance *MSFT_TargetPort) GetPropertyPortNumbers() (value []uint16, err error) { + retValue, err := instance.GetProperty("PortNumbers") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPortType sets the value of PortType for the instance +func (instance *MSFT_TargetPort) SetPropertyPortType(value uint16) (err error) { + return instance.SetProperty("PortType", (value)) +} + +// GetPortType gets the value of PortType for the instance +func (instance *MSFT_TargetPort) GetPropertyPortType() (value uint16, err error) { + retValue, err := instance.GetProperty("PortType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetRole sets the value of Role for the instance +func (instance *MSFT_TargetPort) SetPropertyRole(value uint16) (err error) { + return instance.SetProperty("Role", (value)) +} + +// GetRole gets the value of Role for the instance +func (instance *MSFT_TargetPort) GetPropertyRole() (value uint16, err error) { + retValue, err := instance.GetProperty("Role") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetSpeed sets the value of Speed for the instance +func (instance *MSFT_TargetPort) SetPropertySpeed(value uint64) (err error) { + return instance.SetProperty("Speed", (value)) +} + +// GetSpeed gets the value of Speed for the instance +func (instance *MSFT_TargetPort) GetPropertySpeed() (value uint64, err error) { + retValue, err := instance.GetProperty("Speed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetStorageControllerId sets the value of StorageControllerId for the instance +func (instance *MSFT_TargetPort) SetPropertyStorageControllerId(value string) (err error) { + return instance.SetProperty("StorageControllerId", (value)) +} + +// GetStorageControllerId gets the value of StorageControllerId for the instance +func (instance *MSFT_TargetPort) GetPropertyStorageControllerId() (value string, err error) { + retValue, err := instance.GetProperty("StorageControllerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUsageRestriction sets the value of UsageRestriction for the instance +func (instance *MSFT_TargetPort) SetPropertyUsageRestriction(value uint16) (err error) { + return instance.SetProperty("UsageRestriction", (value)) +} + +// GetUsageRestriction gets the value of UsageRestriction for the instance +func (instance *MSFT_TargetPort) GetPropertyUsageRestriction() (value uint16, err error) { + retValue, err := instance.GetProperty("UsageRestriction") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToTargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToTargetPortal.go new file mode 100644 index 00000000..2c954be4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToTargetPortal.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_TargetPortToTargetPortal struct +type MSFT_TargetPortToTargetPortal struct { + *cim.WmiInstance + + // + TargetPort MSFT_TargetPort + + // + TargetPortal MSFT_TargetPortal +} + +func NewMSFT_TargetPortToTargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_TargetPortToTargetPortal, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_TargetPortToTargetPortal{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_TargetPortToTargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_TargetPortToTargetPortal, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_TargetPortToTargetPortal{ + WmiInstance: tmp, + } + return +} + +// SetTargetPort sets the value of TargetPort for the instance +func (instance *MSFT_TargetPortToTargetPortal) SetPropertyTargetPort(value MSFT_TargetPort) (err error) { + return instance.SetProperty("TargetPort", (value)) +} + +// GetTargetPort gets the value of TargetPort for the instance +func (instance *MSFT_TargetPortToTargetPortal) GetPropertyTargetPort() (value MSFT_TargetPort, err error) { + retValue, err := instance.GetProperty("TargetPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_TargetPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_TargetPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_TargetPort(valuetmp) + + return +} + +// SetTargetPortal sets the value of TargetPortal for the instance +func (instance *MSFT_TargetPortToTargetPortal) SetPropertyTargetPortal(value MSFT_TargetPortal) (err error) { + return instance.SetProperty("TargetPortal", (value)) +} + +// GetTargetPortal gets the value of TargetPortal for the instance +func (instance *MSFT_TargetPortToTargetPortal) GetPropertyTargetPortal() (value MSFT_TargetPortal, err error) { + retValue, err := instance.GetProperty("TargetPortal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_TargetPortal) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_TargetPortal is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_TargetPortal(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToVirtualDisk.go new file mode 100644 index 00000000..2c6cbb64 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortToVirtualDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_TargetPortToVirtualDisk struct +type MSFT_TargetPortToVirtualDisk struct { + *cim.WmiInstance + + // + TargetPort MSFT_TargetPort + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_TargetPortToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_TargetPortToVirtualDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_TargetPortToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_TargetPortToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_TargetPortToVirtualDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_TargetPortToVirtualDisk{ + WmiInstance: tmp, + } + return +} + +// SetTargetPort sets the value of TargetPort for the instance +func (instance *MSFT_TargetPortToVirtualDisk) SetPropertyTargetPort(value MSFT_TargetPort) (err error) { + return instance.SetProperty("TargetPort", (value)) +} + +// GetTargetPort gets the value of TargetPort for the instance +func (instance *MSFT_TargetPortToVirtualDisk) GetPropertyTargetPort() (value MSFT_TargetPort, err error) { + retValue, err := instance.GetProperty("TargetPort") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_TargetPort) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_TargetPort is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_TargetPort(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_TargetPortToVirtualDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_TargetPortToVirtualDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortal.go new file mode 100644 index 00000000..4b21c4b5 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_TargetPortal.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_TargetPortal struct +type MSFT_TargetPortal struct { + *MSFT_StorageObject + + // + IPv4Address string + + // + IPv6Address string + + // + PortNumber uint32 + + // + SubnetMask string +} + +func NewMSFT_TargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_TargetPortal, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_TargetPortal{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_TargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_TargetPortal, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_TargetPortal{ + MSFT_StorageObject: tmp, + } + return +} + +// SetIPv4Address sets the value of IPv4Address for the instance +func (instance *MSFT_TargetPortal) SetPropertyIPv4Address(value string) (err error) { + return instance.SetProperty("IPv4Address", (value)) +} + +// GetIPv4Address gets the value of IPv4Address for the instance +func (instance *MSFT_TargetPortal) GetPropertyIPv4Address() (value string, err error) { + retValue, err := instance.GetProperty("IPv4Address") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIPv6Address sets the value of IPv6Address for the instance +func (instance *MSFT_TargetPortal) SetPropertyIPv6Address(value string) (err error) { + return instance.SetProperty("IPv6Address", (value)) +} + +// GetIPv6Address gets the value of IPv6Address for the instance +func (instance *MSFT_TargetPortal) GetPropertyIPv6Address() (value string, err error) { + retValue, err := instance.GetProperty("IPv6Address") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPortNumber sets the value of PortNumber for the instance +func (instance *MSFT_TargetPortal) SetPropertyPortNumber(value uint32) (err error) { + return instance.SetProperty("PortNumber", (value)) +} + +// GetPortNumber gets the value of PortNumber for the instance +func (instance *MSFT_TargetPortal) GetPropertyPortNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("PortNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSubnetMask sets the value of SubnetMask for the instance +func (instance *MSFT_TargetPortal) SetPropertySubnetMask(value string) (err error) { + return instance.SetProperty("SubnetMask", (value)) +} + +// GetSubnetMask gets the value of SubnetMask for the instance +func (instance *MSFT_TargetPortal) GetPropertySubnetMask() (value string, err error) { + retValue, err := instance.GetProperty("SubnetMask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDisk.go new file mode 100644 index 00000000..e6514192 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDisk.go @@ -0,0 +1,1692 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDisk struct +type MSFT_VirtualDisk struct { + *MSFT_StorageObject + + // + Access uint16 + + // + AllocatedSize uint64 + + // + AllocationUnitSize uint64 + + // + ColumnIsolation uint16 + + // + DetachedReason uint16 + + // + FaultDomainAwareness uint16 + + // + FootprintOnPool uint64 + + // + FriendlyName string + + // + HealthStatus uint16 + + // + Interleave uint64 + + // + IsDeduplicationEnabled bool + + // + IsEnclosureAware bool + + // + IsManualAttach bool + + // + IsSnapshot bool + + // + IsTiered bool + + // + LogicalSectorSize uint64 + + // + MediaType uint16 + + // + Name string + + // + NameFormat uint16 + + // + NumberOfAvailableCopies uint16 + + // + NumberOfColumns uint16 + + // + NumberOfDataCopies uint16 + + // + NumberOfGroups uint16 + + // + OperationalStatus []uint16 + + // + OtherOperationalStatusDescription string + + // + OtherUsageDescription string + + // + ParityLayout uint16 + + // + PhysicalDiskRedundancy uint16 + + // + PhysicalSectorSize uint64 + + // + ProvisioningType uint16 + + // + ReadCacheSize uint64 + + // + RequestNoSinglePointOfFailure bool + + // + ResiliencySettingName string + + // + Size uint64 + + // + UniqueIdFormat uint16 + + // + UniqueIdFormatDescription string + + // + Usage uint16 + + // + WriteCacheSize uint64 +} + +func NewMSFT_VirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDisk, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDisk{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_VirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDisk, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDisk{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAccess sets the value of Access for the instance +func (instance *MSFT_VirtualDisk) SetPropertyAccess(value uint16) (err error) { + return instance.SetProperty("Access", (value)) +} + +// GetAccess gets the value of Access for the instance +func (instance *MSFT_VirtualDisk) GetPropertyAccess() (value uint16, err error) { + retValue, err := instance.GetProperty("Access") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetAllocatedSize sets the value of AllocatedSize for the instance +func (instance *MSFT_VirtualDisk) SetPropertyAllocatedSize(value uint64) (err error) { + return instance.SetProperty("AllocatedSize", (value)) +} + +// GetAllocatedSize gets the value of AllocatedSize for the instance +func (instance *MSFT_VirtualDisk) GetPropertyAllocatedSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocatedSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetAllocationUnitSize sets the value of AllocationUnitSize for the instance +func (instance *MSFT_VirtualDisk) SetPropertyAllocationUnitSize(value uint64) (err error) { + return instance.SetProperty("AllocationUnitSize", (value)) +} + +// GetAllocationUnitSize gets the value of AllocationUnitSize for the instance +func (instance *MSFT_VirtualDisk) GetPropertyAllocationUnitSize() (value uint64, err error) { + retValue, err := instance.GetProperty("AllocationUnitSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetColumnIsolation sets the value of ColumnIsolation for the instance +func (instance *MSFT_VirtualDisk) SetPropertyColumnIsolation(value uint16) (err error) { + return instance.SetProperty("ColumnIsolation", (value)) +} + +// GetColumnIsolation gets the value of ColumnIsolation for the instance +func (instance *MSFT_VirtualDisk) GetPropertyColumnIsolation() (value uint16, err error) { + retValue, err := instance.GetProperty("ColumnIsolation") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetDetachedReason sets the value of DetachedReason for the instance +func (instance *MSFT_VirtualDisk) SetPropertyDetachedReason(value uint16) (err error) { + return instance.SetProperty("DetachedReason", (value)) +} + +// GetDetachedReason gets the value of DetachedReason for the instance +func (instance *MSFT_VirtualDisk) GetPropertyDetachedReason() (value uint16, err error) { + retValue, err := instance.GetProperty("DetachedReason") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFaultDomainAwareness sets the value of FaultDomainAwareness for the instance +func (instance *MSFT_VirtualDisk) SetPropertyFaultDomainAwareness(value uint16) (err error) { + return instance.SetProperty("FaultDomainAwareness", (value)) +} + +// GetFaultDomainAwareness gets the value of FaultDomainAwareness for the instance +func (instance *MSFT_VirtualDisk) GetPropertyFaultDomainAwareness() (value uint16, err error) { + retValue, err := instance.GetProperty("FaultDomainAwareness") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetFootprintOnPool sets the value of FootprintOnPool for the instance +func (instance *MSFT_VirtualDisk) SetPropertyFootprintOnPool(value uint64) (err error) { + return instance.SetProperty("FootprintOnPool", (value)) +} + +// GetFootprintOnPool gets the value of FootprintOnPool for the instance +func (instance *MSFT_VirtualDisk) GetPropertyFootprintOnPool() (value uint64, err error) { + retValue, err := instance.GetProperty("FootprintOnPool") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetFriendlyName sets the value of FriendlyName for the instance +func (instance *MSFT_VirtualDisk) SetPropertyFriendlyName(value string) (err error) { + return instance.SetProperty("FriendlyName", (value)) +} + +// GetFriendlyName gets the value of FriendlyName for the instance +func (instance *MSFT_VirtualDisk) GetPropertyFriendlyName() (value string, err error) { + retValue, err := instance.GetProperty("FriendlyName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_VirtualDisk) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_VirtualDisk) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetInterleave sets the value of Interleave for the instance +func (instance *MSFT_VirtualDisk) SetPropertyInterleave(value uint64) (err error) { + return instance.SetProperty("Interleave", (value)) +} + +// GetInterleave gets the value of Interleave for the instance +func (instance *MSFT_VirtualDisk) GetPropertyInterleave() (value uint64, err error) { + retValue, err := instance.GetProperty("Interleave") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetIsDeduplicationEnabled sets the value of IsDeduplicationEnabled for the instance +func (instance *MSFT_VirtualDisk) SetPropertyIsDeduplicationEnabled(value bool) (err error) { + return instance.SetProperty("IsDeduplicationEnabled", (value)) +} + +// GetIsDeduplicationEnabled gets the value of IsDeduplicationEnabled for the instance +func (instance *MSFT_VirtualDisk) GetPropertyIsDeduplicationEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("IsDeduplicationEnabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsEnclosureAware sets the value of IsEnclosureAware for the instance +func (instance *MSFT_VirtualDisk) SetPropertyIsEnclosureAware(value bool) (err error) { + return instance.SetProperty("IsEnclosureAware", (value)) +} + +// GetIsEnclosureAware gets the value of IsEnclosureAware for the instance +func (instance *MSFT_VirtualDisk) GetPropertyIsEnclosureAware() (value bool, err error) { + retValue, err := instance.GetProperty("IsEnclosureAware") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsManualAttach sets the value of IsManualAttach for the instance +func (instance *MSFT_VirtualDisk) SetPropertyIsManualAttach(value bool) (err error) { + return instance.SetProperty("IsManualAttach", (value)) +} + +// GetIsManualAttach gets the value of IsManualAttach for the instance +func (instance *MSFT_VirtualDisk) GetPropertyIsManualAttach() (value bool, err error) { + retValue, err := instance.GetProperty("IsManualAttach") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsSnapshot sets the value of IsSnapshot for the instance +func (instance *MSFT_VirtualDisk) SetPropertyIsSnapshot(value bool) (err error) { + return instance.SetProperty("IsSnapshot", (value)) +} + +// GetIsSnapshot gets the value of IsSnapshot for the instance +func (instance *MSFT_VirtualDisk) GetPropertyIsSnapshot() (value bool, err error) { + retValue, err := instance.GetProperty("IsSnapshot") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsTiered sets the value of IsTiered for the instance +func (instance *MSFT_VirtualDisk) SetPropertyIsTiered(value bool) (err error) { + return instance.SetProperty("IsTiered", (value)) +} + +// GetIsTiered gets the value of IsTiered for the instance +func (instance *MSFT_VirtualDisk) GetPropertyIsTiered() (value bool, err error) { + retValue, err := instance.GetProperty("IsTiered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetLogicalSectorSize sets the value of LogicalSectorSize for the instance +func (instance *MSFT_VirtualDisk) SetPropertyLogicalSectorSize(value uint64) (err error) { + return instance.SetProperty("LogicalSectorSize", (value)) +} + +// GetLogicalSectorSize gets the value of LogicalSectorSize for the instance +func (instance *MSFT_VirtualDisk) GetPropertyLogicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("LogicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetMediaType sets the value of MediaType for the instance +func (instance *MSFT_VirtualDisk) SetPropertyMediaType(value uint16) (err error) { + return instance.SetProperty("MediaType", (value)) +} + +// GetMediaType gets the value of MediaType for the instance +func (instance *MSFT_VirtualDisk) GetPropertyMediaType() (value uint16, err error) { + retValue, err := instance.GetProperty("MediaType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *MSFT_VirtualDisk) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *MSFT_VirtualDisk) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetNameFormat sets the value of NameFormat for the instance +func (instance *MSFT_VirtualDisk) SetPropertyNameFormat(value uint16) (err error) { + return instance.SetProperty("NameFormat", (value)) +} + +// GetNameFormat gets the value of NameFormat for the instance +func (instance *MSFT_VirtualDisk) GetPropertyNameFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("NameFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfAvailableCopies sets the value of NumberOfAvailableCopies for the instance +func (instance *MSFT_VirtualDisk) SetPropertyNumberOfAvailableCopies(value uint16) (err error) { + return instance.SetProperty("NumberOfAvailableCopies", (value)) +} + +// GetNumberOfAvailableCopies gets the value of NumberOfAvailableCopies for the instance +func (instance *MSFT_VirtualDisk) GetPropertyNumberOfAvailableCopies() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfAvailableCopies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfColumns sets the value of NumberOfColumns for the instance +func (instance *MSFT_VirtualDisk) SetPropertyNumberOfColumns(value uint16) (err error) { + return instance.SetProperty("NumberOfColumns", (value)) +} + +// GetNumberOfColumns gets the value of NumberOfColumns for the instance +func (instance *MSFT_VirtualDisk) GetPropertyNumberOfColumns() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfColumns") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfDataCopies sets the value of NumberOfDataCopies for the instance +func (instance *MSFT_VirtualDisk) SetPropertyNumberOfDataCopies(value uint16) (err error) { + return instance.SetProperty("NumberOfDataCopies", (value)) +} + +// GetNumberOfDataCopies gets the value of NumberOfDataCopies for the instance +func (instance *MSFT_VirtualDisk) GetPropertyNumberOfDataCopies() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfDataCopies") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetNumberOfGroups sets the value of NumberOfGroups for the instance +func (instance *MSFT_VirtualDisk) SetPropertyNumberOfGroups(value uint16) (err error) { + return instance.SetProperty("NumberOfGroups", (value)) +} + +// GetNumberOfGroups gets the value of NumberOfGroups for the instance +func (instance *MSFT_VirtualDisk) GetPropertyNumberOfGroups() (value uint16, err error) { + retValue, err := instance.GetProperty("NumberOfGroups") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_VirtualDisk) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_VirtualDisk) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetOtherOperationalStatusDescription sets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_VirtualDisk) SetPropertyOtherOperationalStatusDescription(value string) (err error) { + return instance.SetProperty("OtherOperationalStatusDescription", (value)) +} + +// GetOtherOperationalStatusDescription gets the value of OtherOperationalStatusDescription for the instance +func (instance *MSFT_VirtualDisk) GetPropertyOtherOperationalStatusDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherOperationalStatusDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetOtherUsageDescription sets the value of OtherUsageDescription for the instance +func (instance *MSFT_VirtualDisk) SetPropertyOtherUsageDescription(value string) (err error) { + return instance.SetProperty("OtherUsageDescription", (value)) +} + +// GetOtherUsageDescription gets the value of OtherUsageDescription for the instance +func (instance *MSFT_VirtualDisk) GetPropertyOtherUsageDescription() (value string, err error) { + retValue, err := instance.GetProperty("OtherUsageDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParityLayout sets the value of ParityLayout for the instance +func (instance *MSFT_VirtualDisk) SetPropertyParityLayout(value uint16) (err error) { + return instance.SetProperty("ParityLayout", (value)) +} + +// GetParityLayout gets the value of ParityLayout for the instance +func (instance *MSFT_VirtualDisk) GetPropertyParityLayout() (value uint16, err error) { + retValue, err := instance.GetProperty("ParityLayout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPhysicalDiskRedundancy sets the value of PhysicalDiskRedundancy for the instance +func (instance *MSFT_VirtualDisk) SetPropertyPhysicalDiskRedundancy(value uint16) (err error) { + return instance.SetProperty("PhysicalDiskRedundancy", (value)) +} + +// GetPhysicalDiskRedundancy gets the value of PhysicalDiskRedundancy for the instance +func (instance *MSFT_VirtualDisk) GetPropertyPhysicalDiskRedundancy() (value uint16, err error) { + retValue, err := instance.GetProperty("PhysicalDiskRedundancy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetPhysicalSectorSize sets the value of PhysicalSectorSize for the instance +func (instance *MSFT_VirtualDisk) SetPropertyPhysicalSectorSize(value uint64) (err error) { + return instance.SetProperty("PhysicalSectorSize", (value)) +} + +// GetPhysicalSectorSize gets the value of PhysicalSectorSize for the instance +func (instance *MSFT_VirtualDisk) GetPropertyPhysicalSectorSize() (value uint64, err error) { + retValue, err := instance.GetProperty("PhysicalSectorSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetProvisioningType sets the value of ProvisioningType for the instance +func (instance *MSFT_VirtualDisk) SetPropertyProvisioningType(value uint16) (err error) { + return instance.SetProperty("ProvisioningType", (value)) +} + +// GetProvisioningType gets the value of ProvisioningType for the instance +func (instance *MSFT_VirtualDisk) GetPropertyProvisioningType() (value uint16, err error) { + retValue, err := instance.GetProperty("ProvisioningType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetReadCacheSize sets the value of ReadCacheSize for the instance +func (instance *MSFT_VirtualDisk) SetPropertyReadCacheSize(value uint64) (err error) { + return instance.SetProperty("ReadCacheSize", (value)) +} + +// GetReadCacheSize gets the value of ReadCacheSize for the instance +func (instance *MSFT_VirtualDisk) GetPropertyReadCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("ReadCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetRequestNoSinglePointOfFailure sets the value of RequestNoSinglePointOfFailure for the instance +func (instance *MSFT_VirtualDisk) SetPropertyRequestNoSinglePointOfFailure(value bool) (err error) { + return instance.SetProperty("RequestNoSinglePointOfFailure", (value)) +} + +// GetRequestNoSinglePointOfFailure gets the value of RequestNoSinglePointOfFailure for the instance +func (instance *MSFT_VirtualDisk) GetPropertyRequestNoSinglePointOfFailure() (value bool, err error) { + retValue, err := instance.GetProperty("RequestNoSinglePointOfFailure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetResiliencySettingName sets the value of ResiliencySettingName for the instance +func (instance *MSFT_VirtualDisk) SetPropertyResiliencySettingName(value string) (err error) { + return instance.SetProperty("ResiliencySettingName", (value)) +} + +// GetResiliencySettingName gets the value of ResiliencySettingName for the instance +func (instance *MSFT_VirtualDisk) GetPropertyResiliencySettingName() (value string, err error) { + retValue, err := instance.GetProperty("ResiliencySettingName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_VirtualDisk) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_VirtualDisk) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetUniqueIdFormat sets the value of UniqueIdFormat for the instance +func (instance *MSFT_VirtualDisk) SetPropertyUniqueIdFormat(value uint16) (err error) { + return instance.SetProperty("UniqueIdFormat", (value)) +} + +// GetUniqueIdFormat gets the value of UniqueIdFormat for the instance +func (instance *MSFT_VirtualDisk) GetPropertyUniqueIdFormat() (value uint16, err error) { + retValue, err := instance.GetProperty("UniqueIdFormat") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetUniqueIdFormatDescription sets the value of UniqueIdFormatDescription for the instance +func (instance *MSFT_VirtualDisk) SetPropertyUniqueIdFormatDescription(value string) (err error) { + return instance.SetProperty("UniqueIdFormatDescription", (value)) +} + +// GetUniqueIdFormatDescription gets the value of UniqueIdFormatDescription for the instance +func (instance *MSFT_VirtualDisk) GetPropertyUniqueIdFormatDescription() (value string, err error) { + retValue, err := instance.GetProperty("UniqueIdFormatDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetUsage sets the value of Usage for the instance +func (instance *MSFT_VirtualDisk) SetPropertyUsage(value uint16) (err error) { + return instance.SetProperty("Usage", (value)) +} + +// GetUsage gets the value of Usage for the instance +func (instance *MSFT_VirtualDisk) GetPropertyUsage() (value uint16, err error) { + retValue, err := instance.GetProperty("Usage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetWriteCacheSize sets the value of WriteCacheSize for the instance +func (instance *MSFT_VirtualDisk) SetPropertyWriteCacheSize(value uint64) (err error) { + return instance.SetProperty("WriteCacheSize", (value)) +} + +// GetWriteCacheSize gets the value of WriteCacheSize for the instance +func (instance *MSFT_VirtualDisk) GetPropertyWriteCacheSize() (value uint64, err error) { + retValue, err := instance.GetProperty("WriteCacheSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// +// +// +func (instance *MSFT_VirtualDisk) GetPhysicalExtent( /* OUT */ PhysicalExtents []MSFT_PhysicalExtent, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetPhysicalExtent") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_VirtualDisk) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) Show( /* IN */ TargetPortAddresses []string, + /* IN */ InitiatorAddress string, + /* IN */ HostType uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Show", TargetPortAddresses, InitiatorAddress, HostType, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) Hide( /* IN */ TargetPortAddresses []string, + /* IN */ InitiatorAddress string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Hide", TargetPortAddresses, InitiatorAddress, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +// +func (instance *MSFT_VirtualDisk) CreateSnapshot( /* IN */ FriendlyName string, + /* IN */ TargetStoragePoolName string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ CreatedVirtualDisk MSFT_VirtualDisk, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateSnapshot", FriendlyName, TargetStoragePoolName, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +// +func (instance *MSFT_VirtualDisk) CreateClone( /* IN */ FriendlyName string, + /* IN */ TargetStoragePoolName string, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ CreatedVirtualDisk MSFT_VirtualDisk, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateClone", FriendlyName, TargetStoragePoolName, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +// +func (instance *MSFT_VirtualDisk) Resize( /* IN/OUT */ Size uint64, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Resize", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_VirtualDisk) Repair( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Repair", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_VirtualDisk) GetSecurityDescriptor( /* OUT */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_VirtualDisk) SetSecurityDescriptor( /* IN */ SecurityDescriptor string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetSecurityDescriptor", SecurityDescriptor) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_VirtualDisk) SetFriendlyName( /* IN */ FriendlyName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFriendlyName", FriendlyName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *MSFT_VirtualDisk) SetUsage( /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetUsage", Usage, OtherUsageDescription) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +func (instance *MSFT_VirtualDisk) SetAttributes( /* IN */ IsManualAttach bool, + /* IN */ StorageNodeName string, + /* IN */ Access uint16, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", IsManualAttach, StorageNodeName, Access) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_VirtualDisk) SetProperties( /* IN */ ProvisioningType uint16, + /* IN */ AllocationUnitSize uint64, + /* IN */ MediaType uint16, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ColumnIsolation uint16, + /* IN */ ResiliencySettingName string, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfDataCopies uint16, + /* IN */ NumberOfGroups uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ Interleave uint64, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetProperties", ProvisioningType, AllocationUnitSize, MediaType, FaultDomainAwareness, ColumnIsolation, ResiliencySettingName, PhysicalDiskRedundancy, NumberOfDataCopies, NumberOfGroups, NumberOfColumns, Interleave) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_VirtualDisk) Attach( /* IN */ StorageNodeName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Attach", StorageNodeName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_VirtualDisk) Detach( /* IN */ StorageNodeName string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Detach", StorageNodeName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) AddPhysicalDisk( /* IN */ PhysicalDisks []MSFT_PhysicalDisk, + /* IN */ Usage uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddPhysicalDisk", PhysicalDisks, Usage, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) RemovePhysicalDisk( /* IN */ PhysicalDisks []MSFT_PhysicalDisk, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemovePhysicalDisk", PhysicalDisks, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) AddStorageFaultDomain( /* IN */ StorageFaultDomains []MSFT_StorageFaultDomain, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("AddStorageFaultDomain", StorageFaultDomains, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) RemoveStorageFaultDomain( /* IN */ StorageFaultDomains []MSFT_StorageFaultDomain, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("RemoveStorageFaultDomain", StorageFaultDomains, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_VirtualDisk) CreateReplica( /* IN */ FriendlyName string, + /* IN */ TargetStorageSubsystem MSFT_ReplicaPeer, + /* IN */ TargetVirtualDiskObjectId string, + /* IN */ TargetStoragePoolObjectId string, + /* IN */ RecoveryPointObjective uint16, + /* IN */ ReplicationSettings MSFT_ReplicationSettings, + /* IN */ SyncType uint16, + /* IN */ RunAsJob bool, + /* OUT */ CreatedReplicaPeer MSFT_ReplicaPeer, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateReplica", FriendlyName, TargetStorageSubsystem, TargetVirtualDiskObjectId, TargetStoragePoolObjectId, RecoveryPointObjective, ReplicationSettings, SyncType, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// + +// +// +// +func (instance *MSFT_VirtualDisk) SetReplicationRelationship( /* IN */ Operation uint16, + /* IN */ VirtualDiskReplicaPeer MSFT_ReplicaPeer, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetReplicationRelationship", Operation, VirtualDiskReplicaPeer, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToDisk.go new file mode 100644 index 00000000..b811259e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDiskToDisk struct +type MSFT_VirtualDiskToDisk struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_VirtualDiskToDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDiskToDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_VirtualDiskToDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDiskToDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToDisk{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_VirtualDiskToDisk) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_VirtualDiskToDisk) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToPhysicalDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToPhysicalDisk.go new file mode 100644 index 00000000..08d7193c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToPhysicalDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDiskToPhysicalDisk struct +type MSFT_VirtualDiskToPhysicalDisk struct { + *cim.WmiInstance + + // + PhysicalDisk MSFT_PhysicalDisk + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_VirtualDiskToPhysicalDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDiskToPhysicalDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_VirtualDiskToPhysicalDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDiskToPhysicalDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToPhysicalDisk{ + WmiInstance: tmp, + } + return +} + +// SetPhysicalDisk sets the value of PhysicalDisk for the instance +func (instance *MSFT_VirtualDiskToPhysicalDisk) SetPropertyPhysicalDisk(value MSFT_PhysicalDisk) (err error) { + return instance.SetProperty("PhysicalDisk", (value)) +} + +// GetPhysicalDisk gets the value of PhysicalDisk for the instance +func (instance *MSFT_VirtualDiskToPhysicalDisk) GetPropertyPhysicalDisk() (value MSFT_PhysicalDisk, err error) { + retValue, err := instance.GetProperty("PhysicalDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_PhysicalDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_PhysicalDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_PhysicalDisk(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToPhysicalDisk) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToPhysicalDisk) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToReplicaPeer.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToReplicaPeer.go new file mode 100644 index 00000000..21631fba --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToReplicaPeer.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDiskToReplicaPeer struct +type MSFT_VirtualDiskToReplicaPeer struct { + *MSFT_Synchronized + + // + ReplicaPeer MSFT_ReplicaPeer + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_VirtualDiskToReplicaPeerEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDiskToReplicaPeer, err error) { + tmp, err := NewMSFT_SynchronizedEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToReplicaPeer{ + MSFT_Synchronized: tmp, + } + return +} + +func NewMSFT_VirtualDiskToReplicaPeerEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDiskToReplicaPeer, err error) { + tmp, err := NewMSFT_SynchronizedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToReplicaPeer{ + MSFT_Synchronized: tmp, + } + return +} + +// SetReplicaPeer sets the value of ReplicaPeer for the instance +func (instance *MSFT_VirtualDiskToReplicaPeer) SetPropertyReplicaPeer(value MSFT_ReplicaPeer) (err error) { + return instance.SetProperty("ReplicaPeer", (value)) +} + +// GetReplicaPeer gets the value of ReplicaPeer for the instance +func (instance *MSFT_VirtualDiskToReplicaPeer) GetPropertyReplicaPeer() (value MSFT_ReplicaPeer, err error) { + retValue, err := instance.GetProperty("ReplicaPeer") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_ReplicaPeer) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_ReplicaPeer is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_ReplicaPeer(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToReplicaPeer) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToReplicaPeer) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageFaultDomain.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageFaultDomain.go new file mode 100644 index 00000000..4cf7949c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageFaultDomain.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDiskToStorageFaultDomain struct +type MSFT_VirtualDiskToStorageFaultDomain struct { + *cim.WmiInstance + + // + StorageFaultDomain MSFT_StorageFaultDomain + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_VirtualDiskToStorageFaultDomainEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDiskToStorageFaultDomain, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToStorageFaultDomain{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_VirtualDiskToStorageFaultDomainEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDiskToStorageFaultDomain, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToStorageFaultDomain{ + WmiInstance: tmp, + } + return +} + +// SetStorageFaultDomain sets the value of StorageFaultDomain for the instance +func (instance *MSFT_VirtualDiskToStorageFaultDomain) SetPropertyStorageFaultDomain(value MSFT_StorageFaultDomain) (err error) { + return instance.SetProperty("StorageFaultDomain", (value)) +} + +// GetStorageFaultDomain gets the value of StorageFaultDomain for the instance +func (instance *MSFT_VirtualDiskToStorageFaultDomain) GetPropertyStorageFaultDomain() (value MSFT_StorageFaultDomain, err error) { + retValue, err := instance.GetProperty("StorageFaultDomain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageFaultDomain) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageFaultDomain is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageFaultDomain(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToStorageFaultDomain) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToStorageFaultDomain) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageTier.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageTier.go new file mode 100644 index 00000000..82dd6f28 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToStorageTier.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDiskToStorageTier struct +type MSFT_VirtualDiskToStorageTier struct { + *cim.WmiInstance + + // + StorageTier MSFT_StorageTier + + // + VirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_VirtualDiskToStorageTierEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDiskToStorageTier, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToStorageTier{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_VirtualDiskToStorageTierEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDiskToStorageTier, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToStorageTier{ + WmiInstance: tmp, + } + return +} + +// SetStorageTier sets the value of StorageTier for the instance +func (instance *MSFT_VirtualDiskToStorageTier) SetPropertyStorageTier(value MSFT_StorageTier) (err error) { + return instance.SetProperty("StorageTier", (value)) +} + +// GetStorageTier gets the value of StorageTier for the instance +func (instance *MSFT_VirtualDiskToStorageTier) GetPropertyStorageTier() (value MSFT_StorageTier, err error) { + retValue, err := instance.GetProperty("StorageTier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_StorageTier) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_StorageTier is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_StorageTier(valuetmp) + + return +} + +// SetVirtualDisk sets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToStorageTier) SetPropertyVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("VirtualDisk", (value)) +} + +// GetVirtualDisk gets the value of VirtualDisk for the instance +func (instance *MSFT_VirtualDiskToStorageTier) GetPropertyVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("VirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToVirtualDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToVirtualDisk.go new file mode 100644 index 00000000..92ea1647 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VirtualDiskToVirtualDisk.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VirtualDiskToVirtualDisk struct +type MSFT_VirtualDiskToVirtualDisk struct { + *MSFT_Synchronized + + // + SourceVirtualDisk MSFT_VirtualDisk + + // + TargetVirtualDisk MSFT_VirtualDisk +} + +func NewMSFT_VirtualDiskToVirtualDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_VirtualDiskToVirtualDisk, err error) { + tmp, err := NewMSFT_SynchronizedEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToVirtualDisk{ + MSFT_Synchronized: tmp, + } + return +} + +func NewMSFT_VirtualDiskToVirtualDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VirtualDiskToVirtualDisk, err error) { + tmp, err := NewMSFT_SynchronizedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VirtualDiskToVirtualDisk{ + MSFT_Synchronized: tmp, + } + return +} + +// SetSourceVirtualDisk sets the value of SourceVirtualDisk for the instance +func (instance *MSFT_VirtualDiskToVirtualDisk) SetPropertySourceVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("SourceVirtualDisk", (value)) +} + +// GetSourceVirtualDisk gets the value of SourceVirtualDisk for the instance +func (instance *MSFT_VirtualDiskToVirtualDisk) GetPropertySourceVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("SourceVirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} + +// SetTargetVirtualDisk sets the value of TargetVirtualDisk for the instance +func (instance *MSFT_VirtualDiskToVirtualDisk) SetPropertyTargetVirtualDisk(value MSFT_VirtualDisk) (err error) { + return instance.SetProperty("TargetVirtualDisk", (value)) +} + +// GetTargetVirtualDisk gets the value of TargetVirtualDisk for the instance +func (instance *MSFT_VirtualDiskToVirtualDisk) GetPropertyTargetVirtualDisk() (value MSFT_VirtualDisk, err error) { + retValue, err := instance.GetProperty("TargetVirtualDisk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_VirtualDisk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_VirtualDisk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_VirtualDisk(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume.go new file mode 100644 index 00000000..8a7d3b8b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume.go @@ -0,0 +1,744 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_Volume struct +type MSFT_Volume struct { + *MSFT_StorageObject + + // + AllocationUnitSize uint32 + + // + DedupMode uint32 + + // + DriveLetter byte + + // + DriveType uint32 + + // + FileSystem string + + // + FileSystemLabel string + + // + FileSystemType uint16 + + // + HealthStatus uint16 + + // + OperationalStatus []uint16 + + // + Path string + + // + Size uint64 + + // + SizeRemaining uint64 +} + +func NewMSFT_VolumeEx1(instance *cim.WmiInstance) (newInstance *MSFT_Volume, err error) { + tmp, err := NewMSFT_StorageObjectEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_Volume{ + MSFT_StorageObject: tmp, + } + return +} + +func NewMSFT_VolumeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_Volume, err error) { + tmp, err := NewMSFT_StorageObjectEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_Volume{ + MSFT_StorageObject: tmp, + } + return +} + +// SetAllocationUnitSize sets the value of AllocationUnitSize for the instance +func (instance *MSFT_Volume) SetPropertyAllocationUnitSize(value uint32) (err error) { + return instance.SetProperty("AllocationUnitSize", (value)) +} + +// GetAllocationUnitSize gets the value of AllocationUnitSize for the instance +func (instance *MSFT_Volume) GetPropertyAllocationUnitSize() (value uint32, err error) { + retValue, err := instance.GetProperty("AllocationUnitSize") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDedupMode sets the value of DedupMode for the instance +func (instance *MSFT_Volume) SetPropertyDedupMode(value uint32) (err error) { + return instance.SetProperty("DedupMode", (value)) +} + +// GetDedupMode gets the value of DedupMode for the instance +func (instance *MSFT_Volume) GetPropertyDedupMode() (value uint32, err error) { + retValue, err := instance.GetProperty("DedupMode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDriveLetter sets the value of DriveLetter for the instance +func (instance *MSFT_Volume) SetPropertyDriveLetter(value byte) (err error) { + return instance.SetProperty("DriveLetter", (value)) +} + +// GetDriveLetter gets the value of DriveLetter for the instance +func (instance *MSFT_Volume) GetPropertyDriveLetter() (value byte, err error) { + retValue, err := instance.GetProperty("DriveLetter") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(byte) + if !ok { + err = errors.Wrapf(errors.InvalidType, " byte is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = byte(valuetmp) + + return +} + +// SetDriveType sets the value of DriveType for the instance +func (instance *MSFT_Volume) SetPropertyDriveType(value uint32) (err error) { + return instance.SetProperty("DriveType", (value)) +} + +// GetDriveType gets the value of DriveType for the instance +func (instance *MSFT_Volume) GetPropertyDriveType() (value uint32, err error) { + retValue, err := instance.GetProperty("DriveType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetFileSystem sets the value of FileSystem for the instance +func (instance *MSFT_Volume) SetPropertyFileSystem(value string) (err error) { + return instance.SetProperty("FileSystem", (value)) +} + +// GetFileSystem gets the value of FileSystem for the instance +func (instance *MSFT_Volume) GetPropertyFileSystem() (value string, err error) { + retValue, err := instance.GetProperty("FileSystem") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSystemLabel sets the value of FileSystemLabel for the instance +func (instance *MSFT_Volume) SetPropertyFileSystemLabel(value string) (err error) { + return instance.SetProperty("FileSystemLabel", (value)) +} + +// GetFileSystemLabel gets the value of FileSystemLabel for the instance +func (instance *MSFT_Volume) GetPropertyFileSystemLabel() (value string, err error) { + retValue, err := instance.GetProperty("FileSystemLabel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFileSystemType sets the value of FileSystemType for the instance +func (instance *MSFT_Volume) SetPropertyFileSystemType(value uint16) (err error) { + return instance.SetProperty("FileSystemType", (value)) +} + +// GetFileSystemType gets the value of FileSystemType for the instance +func (instance *MSFT_Volume) GetPropertyFileSystemType() (value uint16, err error) { + retValue, err := instance.GetProperty("FileSystemType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetHealthStatus sets the value of HealthStatus for the instance +func (instance *MSFT_Volume) SetPropertyHealthStatus(value uint16) (err error) { + return instance.SetProperty("HealthStatus", (value)) +} + +// GetHealthStatus gets the value of HealthStatus for the instance +func (instance *MSFT_Volume) GetPropertyHealthStatus() (value uint16, err error) { + retValue, err := instance.GetProperty("HealthStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// SetOperationalStatus sets the value of OperationalStatus for the instance +func (instance *MSFT_Volume) SetPropertyOperationalStatus(value []uint16) (err error) { + return instance.SetProperty("OperationalStatus", (value)) +} + +// GetOperationalStatus gets the value of OperationalStatus for the instance +func (instance *MSFT_Volume) GetPropertyOperationalStatus() (value []uint16, err error) { + retValue, err := instance.GetProperty("OperationalStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint16(valuetmp)) + } + + return +} + +// SetPath sets the value of Path for the instance +func (instance *MSFT_Volume) SetPropertyPath(value string) (err error) { + return instance.SetProperty("Path", (value)) +} + +// GetPath gets the value of Path for the instance +func (instance *MSFT_Volume) GetPropertyPath() (value string, err error) { + retValue, err := instance.GetProperty("Path") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSize sets the value of Size for the instance +func (instance *MSFT_Volume) SetPropertySize(value uint64) (err error) { + return instance.SetProperty("Size", (value)) +} + +// GetSize gets the value of Size for the instance +func (instance *MSFT_Volume) GetPropertySize() (value uint64, err error) { + retValue, err := instance.GetProperty("Size") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// SetSizeRemaining sets the value of SizeRemaining for the instance +func (instance *MSFT_Volume) SetPropertySizeRemaining(value uint64) (err error) { + return instance.SetProperty("SizeRemaining", (value)) +} + +// GetSizeRemaining gets the value of SizeRemaining for the instance +func (instance *MSFT_Volume) GetPropertySizeRemaining() (value uint64, err error) { + retValue, err := instance.GetProperty("SizeRemaining") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} + +// + +// + +// +// +// +func (instance *MSFT_Volume) DeleteObject( /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("DeleteObject", RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *MSFT_Volume) Format( /* IN */ FileSystem string, + /* IN */ FileSystemLabel string, + /* IN */ AllocationUnitSize uint32, + /* IN */ Full bool, + /* IN */ Force bool, + /* IN */ Compress bool, + /* IN */ ShortFileNameSupport bool, + /* IN */ SetIntegrityStreams bool, + /* IN */ UseLargeFRS bool, + /* IN */ DisableHeatGathering bool, + /* IN */ IsDAX bool, + /* IN */ RunAsJob bool, + /* OUT */ FormattedVolume MSFT_Volume, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Format", FileSystem, FileSystemLabel, AllocationUnitSize, Full, Force, Compress, ShortFileNameSupport, SetIntegrityStreams, UseLargeFRS, DisableHeatGathering, IsDAX, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +// +// +// +func (instance *MSFT_Volume) Repair( /* IN */ OfflineScanAndFix bool, + /* IN */ Scan bool, + /* IN */ SpotFix bool, + /* OUT */ Output uint32, + /* OPTIONAL IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Repair", OfflineScanAndFix, Scan, SpotFix, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// +// +// + +// +// +// +func (instance *MSFT_Volume) Optimize( /* IN */ ReTrim bool, + /* IN */ Analyze bool, + /* IN */ Defrag bool, + /* IN */ SlabConsolidate bool, + /* IN */ TierOptimize bool, + /* IN */ NormalPriority bool, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Optimize", ReTrim, Analyze, Defrag, SlabConsolidate, TierOptimize, NormalPriority, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Volume) SetFileSystemLabel( /* IN */ FileSystemLabel string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetFileSystemLabel", FileSystemLabel) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_Volume) GetSupportedFileSystems( /* OUT */ SupportedFileSystems []string, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedFileSystems") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +// +func (instance *MSFT_Volume) GetSupportedClusterSizes( /* IN */ FileSystem string, + /* OUT */ SupportedClusterSizes []uint32, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSupportedClusterSizes", FileSystem) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_Volume) GetCorruptionCount( /* OUT */ CorruptionCount uint32, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetCorruptionCount") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *MSFT_Volume) GetAttributes( /* OUT */ VolumeScrubEnabled bool) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetAttributes") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Volume) SetAttributes( /* IN */ EnableVolumeScrub bool, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetAttributes", EnableVolumeScrub) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +func (instance *MSFT_Volume) Flush() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Flush") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// + +// +// +// +func (instance *MSFT_Volume) Resize( /* IN */ Size uint64, + /* IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Resize", Size, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_Volume) Diagnose( /* OUT */ DiagnoseResults []MSFT_StorageDiagnoseResult, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Diagnose") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +// +func (instance *MSFT_Volume) SetDedupMode( /* IN */ DedupMode uint32, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("SetDedupMode", DedupMode) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_Volume) GetDedupProperties( /* OUT */ DedupProperties MSFT_DedupProperties, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetDedupProperties") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +func (instance *MSFT_Volume) GetActions( /* OUT */ ActionResults []MSFT_HealthAction, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetActions") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VolumeToFileShare.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VolumeToFileShare.go new file mode 100644 index 00000000..74c6a9f0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_VolumeToFileShare.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_VolumeToFileShare struct +type MSFT_VolumeToFileShare struct { + *cim.WmiInstance + + // + FileShare MSFT_FileShare + + // + Volume MSFT_Volume +} + +func NewMSFT_VolumeToFileShareEx1(instance *cim.WmiInstance) (newInstance *MSFT_VolumeToFileShare, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_VolumeToFileShare{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_VolumeToFileShareEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_VolumeToFileShare, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_VolumeToFileShare{ + WmiInstance: tmp, + } + return +} + +// SetFileShare sets the value of FileShare for the instance +func (instance *MSFT_VolumeToFileShare) SetPropertyFileShare(value MSFT_FileShare) (err error) { + return instance.SetProperty("FileShare", (value)) +} + +// GetFileShare gets the value of FileShare for the instance +func (instance *MSFT_VolumeToFileShare) GetPropertyFileShare() (value MSFT_FileShare, err error) { + retValue, err := instance.GetProperty("FileShare") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_FileShare) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_FileShare is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_FileShare(valuetmp) + + return +} + +// SetVolume sets the value of Volume for the instance +func (instance *MSFT_VolumeToFileShare) SetPropertyVolume(value MSFT_Volume) (err error) { + return instance.SetProperty("Volume", (value)) +} + +// GetVolume gets the value of Volume for the instance +func (instance *MSFT_VolumeToFileShare) GetPropertyVolume() (value MSFT_Volume, err error) { + retValue, err := instance.GetProperty("Volume") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Volume) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Volume is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Volume(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume_Repair_AsyncOutput.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume_Repair_AsyncOutput.go new file mode 100644 index 00000000..e806a97e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_Volume_Repair_AsyncOutput.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_Volume_Repair_AsyncOutput struct +type MSFT_Volume_Repair_AsyncOutput struct { + *MSFT_StorageJobOutParams + + // + Output uint32 +} + +func NewMSFT_Volume_Repair_AsyncOutputEx1(instance *cim.WmiInstance) (newInstance *MSFT_Volume_Repair_AsyncOutput, err error) { + tmp, err := NewMSFT_StorageJobOutParamsEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_Volume_Repair_AsyncOutput{ + MSFT_StorageJobOutParams: tmp, + } + return +} + +func NewMSFT_Volume_Repair_AsyncOutputEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_Volume_Repair_AsyncOutput, err error) { + tmp, err := NewMSFT_StorageJobOutParamsEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_Volume_Repair_AsyncOutput{ + MSFT_StorageJobOutParams: tmp, + } + return +} + +// SetOutput sets the value of Output for the instance +func (instance *MSFT_Volume_Repair_AsyncOutput) SetPropertyOutput(value uint32) (err error) { + return instance.SetProperty("Output", (value)) +} + +// GetOutput gets the value of Output for the instance +func (instance *MSFT_Volume_Repair_AsyncOutput) GetPropertyOutput() (value uint32, err error) { + retValue, err := instance.GetProperty("Output") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_WmiError.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_WmiError.go new file mode 100644 index 00000000..21f077d6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_WmiError.go @@ -0,0 +1,170 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_WmiError struct +type MSFT_WmiError struct { + *CIM_Error + + // Error Category. + error_Category uint16 + + // Error code. + error_Code uint32 + + // Error Type. + error_Type string + + // Windows error message. + error_WindowsErrorMessage string +} + +func NewMSFT_WmiErrorEx1(instance *cim.WmiInstance) (newInstance *MSFT_WmiError, err error) { + tmp, err := NewCIM_ErrorEx1(instance) + + if err != nil { + return + } + newInstance = &MSFT_WmiError{ + CIM_Error: tmp, + } + return +} + +func NewMSFT_WmiErrorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_WmiError, err error) { + tmp, err := NewCIM_ErrorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_WmiError{ + CIM_Error: tmp, + } + return +} + +// Seterror_Category sets the value of error_Category for the instance +func (instance *MSFT_WmiError) SetPropertyerror_Category(value uint16) (err error) { + return instance.SetProperty("error_Category", (value)) +} + +// Geterror_Category gets the value of error_Category for the instance +func (instance *MSFT_WmiError) GetPropertyerror_Category() (value uint16, err error) { + retValue, err := instance.GetProperty("error_Category") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// Seterror_Code sets the value of error_Code for the instance +func (instance *MSFT_WmiError) SetPropertyerror_Code(value uint32) (err error) { + return instance.SetProperty("error_Code", (value)) +} + +// Geterror_Code gets the value of error_Code for the instance +func (instance *MSFT_WmiError) GetPropertyerror_Code() (value uint32, err error) { + retValue, err := instance.GetProperty("error_Code") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// Seterror_Type sets the value of error_Type for the instance +func (instance *MSFT_WmiError) SetPropertyerror_Type(value string) (err error) { + return instance.SetProperty("error_Type", (value)) +} + +// Geterror_Type gets the value of error_Type for the instance +func (instance *MSFT_WmiError) GetPropertyerror_Type() (value string, err error) { + retValue, err := instance.GetProperty("error_Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// Seterror_WindowsErrorMessage sets the value of error_WindowsErrorMessage for the instance +func (instance *MSFT_WmiError) SetPropertyerror_WindowsErrorMessage(value string) (err error) { + return instance.SetProperty("error_WindowsErrorMessage", (value)) +} + +// Geterror_WindowsErrorMessage gets the value of error_WindowsErrorMessage for the instance +func (instance *MSFT_WmiError) GetPropertyerror_WindowsErrorMessage() (value string, err error) { + retValue, err := instance.GetProperty("error_WindowsErrorMessage") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnection.go new file mode 100644 index 00000000..276708c6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnection.go @@ -0,0 +1,201 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSIConnection struct +type MSFT_iSCSIConnection struct { + *cim.WmiInstance + + // + ConnectionIdentifier string + + // + InitiatorAddress string + + // + InitiatorPortNumber uint32 + + // + TargetAddress string + + // + TargetPortNumber uint32 +} + +func NewMSFT_iSCSIConnectionEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSIConnection, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSIConnection{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSIConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSIConnection, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSIConnection{ + WmiInstance: tmp, + } + return +} + +// SetConnectionIdentifier sets the value of ConnectionIdentifier for the instance +func (instance *MSFT_iSCSIConnection) SetPropertyConnectionIdentifier(value string) (err error) { + return instance.SetProperty("ConnectionIdentifier", (value)) +} + +// GetConnectionIdentifier gets the value of ConnectionIdentifier for the instance +func (instance *MSFT_iSCSIConnection) GetPropertyConnectionIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("ConnectionIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorAddress sets the value of InitiatorAddress for the instance +func (instance *MSFT_iSCSIConnection) SetPropertyInitiatorAddress(value string) (err error) { + return instance.SetProperty("InitiatorAddress", (value)) +} + +// GetInitiatorAddress gets the value of InitiatorAddress for the instance +func (instance *MSFT_iSCSIConnection) GetPropertyInitiatorAddress() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorPortNumber sets the value of InitiatorPortNumber for the instance +func (instance *MSFT_iSCSIConnection) SetPropertyInitiatorPortNumber(value uint32) (err error) { + return instance.SetProperty("InitiatorPortNumber", (value)) +} + +// GetInitiatorPortNumber gets the value of InitiatorPortNumber for the instance +func (instance *MSFT_iSCSIConnection) GetPropertyInitiatorPortNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("InitiatorPortNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTargetAddress sets the value of TargetAddress for the instance +func (instance *MSFT_iSCSIConnection) SetPropertyTargetAddress(value string) (err error) { + return instance.SetProperty("TargetAddress", (value)) +} + +// GetTargetAddress gets the value of TargetAddress for the instance +func (instance *MSFT_iSCSIConnection) GetPropertyTargetAddress() (value string, err error) { + retValue, err := instance.GetProperty("TargetAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTargetPortNumber sets the value of TargetPortNumber for the instance +func (instance *MSFT_iSCSIConnection) SetPropertyTargetPortNumber(value uint32) (err error) { + return instance.SetProperty("TargetPortNumber", (value)) +} + +// GetTargetPortNumber gets the value of TargetPortNumber for the instance +func (instance *MSFT_iSCSIConnection) GetPropertyTargetPortNumber() (value uint32, err error) { + retValue, err := instance.GetProperty("TargetPortNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToDisk.go new file mode 100644 index 00000000..2ccb384d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSIConnectionToDisk struct +type MSFT_iSCSIConnectionToDisk struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + iSCSIConnection MSFT_iSCSIConnection +} + +func NewMSFT_iSCSIConnectionToDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSIConnectionToDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSIConnectionToDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSIConnectionToDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSIConnectionToDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSIConnectionToDisk{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_iSCSIConnectionToDisk) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_iSCSIConnectionToDisk) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetiSCSIConnection sets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSIConnectionToDisk) SetPropertyiSCSIConnection(value MSFT_iSCSIConnection) (err error) { + return instance.SetProperty("iSCSIConnection", (value)) +} + +// GetiSCSIConnection gets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSIConnectionToDisk) GetPropertyiSCSIConnection() (value MSFT_iSCSIConnection, err error) { + retValue, err := instance.GetProperty("iSCSIConnection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSIConnection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSIConnection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSIConnection(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToiSCSITargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToiSCSITargetPortal.go new file mode 100644 index 00000000..fbc93654 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSIConnectionToiSCSITargetPortal.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSIConnectionToiSCSITargetPortal struct +type MSFT_iSCSIConnectionToiSCSITargetPortal struct { + *cim.WmiInstance + + // + iSCSIConnection MSFT_iSCSIConnection + + // + iSCSITargetPortal MSFT_iSCSITargetPortal +} + +func NewMSFT_iSCSIConnectionToiSCSITargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSIConnectionToiSCSITargetPortal, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSIConnectionToiSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSIConnectionToiSCSITargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSIConnectionToiSCSITargetPortal, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSIConnectionToiSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +// SetiSCSIConnection sets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSIConnectionToiSCSITargetPortal) SetPropertyiSCSIConnection(value MSFT_iSCSIConnection) (err error) { + return instance.SetProperty("iSCSIConnection", (value)) +} + +// GetiSCSIConnection gets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSIConnectionToiSCSITargetPortal) GetPropertyiSCSIConnection() (value MSFT_iSCSIConnection, err error) { + retValue, err := instance.GetProperty("iSCSIConnection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSIConnection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSIConnection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSIConnection(valuetmp) + + return +} + +// SetiSCSITargetPortal sets the value of iSCSITargetPortal for the instance +func (instance *MSFT_iSCSIConnectionToiSCSITargetPortal) SetPropertyiSCSITargetPortal(value MSFT_iSCSITargetPortal) (err error) { + return instance.SetProperty("iSCSITargetPortal", (value)) +} + +// GetiSCSITargetPortal gets the value of iSCSITargetPortal for the instance +func (instance *MSFT_iSCSIConnectionToiSCSITargetPortal) GetPropertyiSCSITargetPortal() (value MSFT_iSCSITargetPortal, err error) { + retValue, err := instance.GetProperty("iSCSITargetPortal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITargetPortal) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITargetPortal is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITargetPortal(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISession.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISession.go new file mode 100644 index 00000000..75ded6ec --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISession.go @@ -0,0 +1,518 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSISession struct +type MSFT_iSCSISession struct { + *cim.WmiInstance + + // + AuthenticationType string + + // + InitiatorInstanceName string + + // + InitiatorNodeAddress string + + // + InitiatorPortalAddress string + + // + InitiatorSideIdentifier string + + // + IsConnected bool + + // + IsDataDigest bool + + // + IsDiscovered bool + + // + IsHeaderDigest bool + + // + IsPersistent bool + + // + NumberOfConnections uint32 + + // + SessionIdentifier string + + // + TargetNodeAddress string + + // + TargetSideIdentifier string +} + +func NewMSFT_iSCSISessionEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSISession, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSISession{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSISessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSISession, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSISession{ + WmiInstance: tmp, + } + return +} + +// SetAuthenticationType sets the value of AuthenticationType for the instance +func (instance *MSFT_iSCSISession) SetPropertyAuthenticationType(value string) (err error) { + return instance.SetProperty("AuthenticationType", (value)) +} + +// GetAuthenticationType gets the value of AuthenticationType for the instance +func (instance *MSFT_iSCSISession) GetPropertyAuthenticationType() (value string, err error) { + retValue, err := instance.GetProperty("AuthenticationType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorInstanceName sets the value of InitiatorInstanceName for the instance +func (instance *MSFT_iSCSISession) SetPropertyInitiatorInstanceName(value string) (err error) { + return instance.SetProperty("InitiatorInstanceName", (value)) +} + +// GetInitiatorInstanceName gets the value of InitiatorInstanceName for the instance +func (instance *MSFT_iSCSISession) GetPropertyInitiatorInstanceName() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorInstanceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorNodeAddress sets the value of InitiatorNodeAddress for the instance +func (instance *MSFT_iSCSISession) SetPropertyInitiatorNodeAddress(value string) (err error) { + return instance.SetProperty("InitiatorNodeAddress", (value)) +} + +// GetInitiatorNodeAddress gets the value of InitiatorNodeAddress for the instance +func (instance *MSFT_iSCSISession) GetPropertyInitiatorNodeAddress() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorNodeAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorPortalAddress sets the value of InitiatorPortalAddress for the instance +func (instance *MSFT_iSCSISession) SetPropertyInitiatorPortalAddress(value string) (err error) { + return instance.SetProperty("InitiatorPortalAddress", (value)) +} + +// GetInitiatorPortalAddress gets the value of InitiatorPortalAddress for the instance +func (instance *MSFT_iSCSISession) GetPropertyInitiatorPortalAddress() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorPortalAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorSideIdentifier sets the value of InitiatorSideIdentifier for the instance +func (instance *MSFT_iSCSISession) SetPropertyInitiatorSideIdentifier(value string) (err error) { + return instance.SetProperty("InitiatorSideIdentifier", (value)) +} + +// GetInitiatorSideIdentifier gets the value of InitiatorSideIdentifier for the instance +func (instance *MSFT_iSCSISession) GetPropertyInitiatorSideIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorSideIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsConnected sets the value of IsConnected for the instance +func (instance *MSFT_iSCSISession) SetPropertyIsConnected(value bool) (err error) { + return instance.SetProperty("IsConnected", (value)) +} + +// GetIsConnected gets the value of IsConnected for the instance +func (instance *MSFT_iSCSISession) GetPropertyIsConnected() (value bool, err error) { + retValue, err := instance.GetProperty("IsConnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsDataDigest sets the value of IsDataDigest for the instance +func (instance *MSFT_iSCSISession) SetPropertyIsDataDigest(value bool) (err error) { + return instance.SetProperty("IsDataDigest", (value)) +} + +// GetIsDataDigest gets the value of IsDataDigest for the instance +func (instance *MSFT_iSCSISession) GetPropertyIsDataDigest() (value bool, err error) { + retValue, err := instance.GetProperty("IsDataDigest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsDiscovered sets the value of IsDiscovered for the instance +func (instance *MSFT_iSCSISession) SetPropertyIsDiscovered(value bool) (err error) { + return instance.SetProperty("IsDiscovered", (value)) +} + +// GetIsDiscovered gets the value of IsDiscovered for the instance +func (instance *MSFT_iSCSISession) GetPropertyIsDiscovered() (value bool, err error) { + retValue, err := instance.GetProperty("IsDiscovered") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsHeaderDigest sets the value of IsHeaderDigest for the instance +func (instance *MSFT_iSCSISession) SetPropertyIsHeaderDigest(value bool) (err error) { + return instance.SetProperty("IsHeaderDigest", (value)) +} + +// GetIsHeaderDigest gets the value of IsHeaderDigest for the instance +func (instance *MSFT_iSCSISession) GetPropertyIsHeaderDigest() (value bool, err error) { + retValue, err := instance.GetProperty("IsHeaderDigest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsPersistent sets the value of IsPersistent for the instance +func (instance *MSFT_iSCSISession) SetPropertyIsPersistent(value bool) (err error) { + return instance.SetProperty("IsPersistent", (value)) +} + +// GetIsPersistent gets the value of IsPersistent for the instance +func (instance *MSFT_iSCSISession) GetPropertyIsPersistent() (value bool, err error) { + retValue, err := instance.GetProperty("IsPersistent") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNumberOfConnections sets the value of NumberOfConnections for the instance +func (instance *MSFT_iSCSISession) SetPropertyNumberOfConnections(value uint32) (err error) { + return instance.SetProperty("NumberOfConnections", (value)) +} + +// GetNumberOfConnections gets the value of NumberOfConnections for the instance +func (instance *MSFT_iSCSISession) GetPropertyNumberOfConnections() (value uint32, err error) { + retValue, err := instance.GetProperty("NumberOfConnections") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSessionIdentifier sets the value of SessionIdentifier for the instance +func (instance *MSFT_iSCSISession) SetPropertySessionIdentifier(value string) (err error) { + return instance.SetProperty("SessionIdentifier", (value)) +} + +// GetSessionIdentifier gets the value of SessionIdentifier for the instance +func (instance *MSFT_iSCSISession) GetPropertySessionIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("SessionIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTargetNodeAddress sets the value of TargetNodeAddress for the instance +func (instance *MSFT_iSCSISession) SetPropertyTargetNodeAddress(value string) (err error) { + return instance.SetProperty("TargetNodeAddress", (value)) +} + +// GetTargetNodeAddress gets the value of TargetNodeAddress for the instance +func (instance *MSFT_iSCSISession) GetPropertyTargetNodeAddress() (value string, err error) { + retValue, err := instance.GetProperty("TargetNodeAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTargetSideIdentifier sets the value of TargetSideIdentifier for the instance +func (instance *MSFT_iSCSISession) SetPropertyTargetSideIdentifier(value string) (err error) { + return instance.SetProperty("TargetSideIdentifier", (value)) +} + +// GetTargetSideIdentifier gets the value of TargetSideIdentifier for the instance +func (instance *MSFT_iSCSISession) GetPropertyTargetSideIdentifier() (value string, err error) { + retValue, err := instance.GetProperty("TargetSideIdentifier") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// +// +// + +// +func (instance *MSFT_iSCSISession) Register( /* IN */ IsMultipathEnabled bool, + /* IN */ ChapUsername string, + /* IN */ ChapSecret string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Register", IsMultipathEnabled, ChapUsername, ChapSecret) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *MSFT_iSCSISession) Unregister() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Unregister") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *MSFT_iSCSISession) SetCHAPSecret( /* IN */ ChapSecret string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetCHAPSecret", ChapSecret) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToDisk.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToDisk.go new file mode 100644 index 00000000..bfe584e9 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToDisk.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSISessionToDisk struct +type MSFT_iSCSISessionToDisk struct { + *cim.WmiInstance + + // + Disk MSFT_Disk + + // + iSCSISession MSFT_iSCSISession +} + +func NewMSFT_iSCSISessionToDiskEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSISessionToDisk, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSISessionToDisk{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSISessionToDiskEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSISessionToDisk, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSISessionToDisk{ + WmiInstance: tmp, + } + return +} + +// SetDisk sets the value of Disk for the instance +func (instance *MSFT_iSCSISessionToDisk) SetPropertyDisk(value MSFT_Disk) (err error) { + return instance.SetProperty("Disk", (value)) +} + +// GetDisk gets the value of Disk for the instance +func (instance *MSFT_iSCSISessionToDisk) GetPropertyDisk() (value MSFT_Disk, err error) { + retValue, err := instance.GetProperty("Disk") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_Disk) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_Disk is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_Disk(valuetmp) + + return +} + +// SetiSCSISession sets the value of iSCSISession for the instance +func (instance *MSFT_iSCSISessionToDisk) SetPropertyiSCSISession(value MSFT_iSCSISession) (err error) { + return instance.SetProperty("iSCSISession", (value)) +} + +// GetiSCSISession gets the value of iSCSISession for the instance +func (instance *MSFT_iSCSISessionToDisk) GetPropertyiSCSISession() (value MSFT_iSCSISession, err error) { + retValue, err := instance.GetProperty("iSCSISession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSISession) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSISession is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSISession(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSIConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSIConnection.go new file mode 100644 index 00000000..029211dd --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSIConnection.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSISessionToiSCSIConnection struct +type MSFT_iSCSISessionToiSCSIConnection struct { + *cim.WmiInstance + + // + iSCSIConnection MSFT_iSCSIConnection + + // + iSCSISession MSFT_iSCSISession +} + +func NewMSFT_iSCSISessionToiSCSIConnectionEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSISessionToiSCSIConnection, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSISessionToiSCSIConnection{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSISessionToiSCSIConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSISessionToiSCSIConnection, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSISessionToiSCSIConnection{ + WmiInstance: tmp, + } + return +} + +// SetiSCSIConnection sets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSISessionToiSCSIConnection) SetPropertyiSCSIConnection(value MSFT_iSCSIConnection) (err error) { + return instance.SetProperty("iSCSIConnection", (value)) +} + +// GetiSCSIConnection gets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSISessionToiSCSIConnection) GetPropertyiSCSIConnection() (value MSFT_iSCSIConnection, err error) { + retValue, err := instance.GetProperty("iSCSIConnection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSIConnection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSIConnection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSIConnection(valuetmp) + + return +} + +// SetiSCSISession sets the value of iSCSISession for the instance +func (instance *MSFT_iSCSISessionToiSCSIConnection) SetPropertyiSCSISession(value MSFT_iSCSISession) (err error) { + return instance.SetProperty("iSCSISession", (value)) +} + +// GetiSCSISession gets the value of iSCSISession for the instance +func (instance *MSFT_iSCSISessionToiSCSIConnection) GetPropertyiSCSISession() (value MSFT_iSCSISession, err error) { + retValue, err := instance.GetProperty("iSCSISession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSISession) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSISession is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSISession(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSITargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSITargetPortal.go new file mode 100644 index 00000000..9f881ccf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSISessionToiSCSITargetPortal.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSISessionToiSCSITargetPortal struct +type MSFT_iSCSISessionToiSCSITargetPortal struct { + *cim.WmiInstance + + // + iSCSISession MSFT_iSCSISession + + // + iSCSITargetPortal MSFT_iSCSITargetPortal +} + +func NewMSFT_iSCSISessionToiSCSITargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSISessionToiSCSITargetPortal, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSISessionToiSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSISessionToiSCSITargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSISessionToiSCSITargetPortal, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSISessionToiSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +// SetiSCSISession sets the value of iSCSISession for the instance +func (instance *MSFT_iSCSISessionToiSCSITargetPortal) SetPropertyiSCSISession(value MSFT_iSCSISession) (err error) { + return instance.SetProperty("iSCSISession", (value)) +} + +// GetiSCSISession gets the value of iSCSISession for the instance +func (instance *MSFT_iSCSISessionToiSCSITargetPortal) GetPropertyiSCSISession() (value MSFT_iSCSISession, err error) { + retValue, err := instance.GetProperty("iSCSISession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSISession) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSISession is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSISession(valuetmp) + + return +} + +// SetiSCSITargetPortal sets the value of iSCSITargetPortal for the instance +func (instance *MSFT_iSCSISessionToiSCSITargetPortal) SetPropertyiSCSITargetPortal(value MSFT_iSCSITargetPortal) (err error) { + return instance.SetProperty("iSCSITargetPortal", (value)) +} + +// GetiSCSITargetPortal gets the value of iSCSITargetPortal for the instance +func (instance *MSFT_iSCSISessionToiSCSITargetPortal) GetPropertyiSCSITargetPortal() (value MSFT_iSCSITargetPortal, err error) { + retValue, err := instance.GetProperty("iSCSITargetPortal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITargetPortal) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITargetPortal is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITargetPortal(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITarget.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITarget.go new file mode 100644 index 00000000..49090065 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITarget.go @@ -0,0 +1,181 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSITarget struct +type MSFT_iSCSITarget struct { + *cim.WmiInstance + + // + IsConnected bool + + // + NodeAddress string +} + +func NewMSFT_iSCSITargetEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSITarget, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSITarget{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSITargetEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSITarget, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSITarget{ + WmiInstance: tmp, + } + return +} + +// SetIsConnected sets the value of IsConnected for the instance +func (instance *MSFT_iSCSITarget) SetPropertyIsConnected(value bool) (err error) { + return instance.SetProperty("IsConnected", (value)) +} + +// GetIsConnected gets the value of IsConnected for the instance +func (instance *MSFT_iSCSITarget) GetPropertyIsConnected() (value bool, err error) { + retValue, err := instance.GetProperty("IsConnected") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetNodeAddress sets the value of NodeAddress for the instance +func (instance *MSFT_iSCSITarget) SetPropertyNodeAddress(value string) (err error) { + return instance.SetProperty("NodeAddress", (value)) +} + +// GetNodeAddress gets the value of NodeAddress for the instance +func (instance *MSFT_iSCSITarget) GetPropertyNodeAddress() (value string, err error) { + retValue, err := instance.GetProperty("NodeAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// + +// + +// +func (instance *MSFT_iSCSITarget) Disconnect( /* IN */ SessionIdentifier string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Disconnect", SessionIdentifier) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +func (instance *MSFT_iSCSITarget) Update() (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Update") + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_iSCSITarget) Connect( /* IN */ NodeAddress string, + /* IN */ TargetPortalAddress string, + /* IN */ TargetPortalPortNumber uint16, + /* IN */ InitiatorPortalAddress string, + /* IN */ IsDataDigest bool, + /* IN */ IsHeaderDigest bool, + /* IN */ ReportToPnP bool, + /* IN */ AuthenticationType string, + /* IN */ ChapUsername string, + /* IN */ ChapSecret string, + /* IN */ IsMultipathEnabled bool, + /* IN */ IsPersistent bool, + /* IN */ InitiatorInstanceName string, + /* OUT */ CreatediSCSISession MSFT_iSCSISession) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Connect", NodeAddress, TargetPortalAddress, TargetPortalPortNumber, InitiatorPortalAddress, IsDataDigest, IsHeaderDigest, ReportToPnP, AuthenticationType, ChapUsername, ChapSecret, IsMultipathEnabled, IsPersistent, InitiatorInstanceName) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetPortal.go new file mode 100644 index 00000000..fa165bdc --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetPortal.go @@ -0,0 +1,307 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSITargetPortal struct +type MSFT_iSCSITargetPortal struct { + *cim.WmiInstance + + // + InitiatorInstanceName string + + // + InitiatorPortalAddress string + + // + IsDataDigest bool + + // + IsHeaderDigest bool + + // + TargetPortalAddress string + + // + TargetPortalPortNumber uint16 +} + +func NewMSFT_iSCSITargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSITargetPortal, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSITargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSITargetPortal, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +// SetInitiatorInstanceName sets the value of InitiatorInstanceName for the instance +func (instance *MSFT_iSCSITargetPortal) SetPropertyInitiatorInstanceName(value string) (err error) { + return instance.SetProperty("InitiatorInstanceName", (value)) +} + +// GetInitiatorInstanceName gets the value of InitiatorInstanceName for the instance +func (instance *MSFT_iSCSITargetPortal) GetPropertyInitiatorInstanceName() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorInstanceName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitiatorPortalAddress sets the value of InitiatorPortalAddress for the instance +func (instance *MSFT_iSCSITargetPortal) SetPropertyInitiatorPortalAddress(value string) (err error) { + return instance.SetProperty("InitiatorPortalAddress", (value)) +} + +// GetInitiatorPortalAddress gets the value of InitiatorPortalAddress for the instance +func (instance *MSFT_iSCSITargetPortal) GetPropertyInitiatorPortalAddress() (value string, err error) { + retValue, err := instance.GetProperty("InitiatorPortalAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetIsDataDigest sets the value of IsDataDigest for the instance +func (instance *MSFT_iSCSITargetPortal) SetPropertyIsDataDigest(value bool) (err error) { + return instance.SetProperty("IsDataDigest", (value)) +} + +// GetIsDataDigest gets the value of IsDataDigest for the instance +func (instance *MSFT_iSCSITargetPortal) GetPropertyIsDataDigest() (value bool, err error) { + retValue, err := instance.GetProperty("IsDataDigest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetIsHeaderDigest sets the value of IsHeaderDigest for the instance +func (instance *MSFT_iSCSITargetPortal) SetPropertyIsHeaderDigest(value bool) (err error) { + return instance.SetProperty("IsHeaderDigest", (value)) +} + +// GetIsHeaderDigest gets the value of IsHeaderDigest for the instance +func (instance *MSFT_iSCSITargetPortal) GetPropertyIsHeaderDigest() (value bool, err error) { + retValue, err := instance.GetProperty("IsHeaderDigest") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTargetPortalAddress sets the value of TargetPortalAddress for the instance +func (instance *MSFT_iSCSITargetPortal) SetPropertyTargetPortalAddress(value string) (err error) { + return instance.SetProperty("TargetPortalAddress", (value)) +} + +// GetTargetPortalAddress gets the value of TargetPortalAddress for the instance +func (instance *MSFT_iSCSITargetPortal) GetPropertyTargetPortalAddress() (value string, err error) { + retValue, err := instance.GetProperty("TargetPortalAddress") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTargetPortalPortNumber sets the value of TargetPortalPortNumber for the instance +func (instance *MSFT_iSCSITargetPortal) SetPropertyTargetPortalPortNumber(value uint16) (err error) { + return instance.SetProperty("TargetPortalPortNumber", (value)) +} + +// GetTargetPortalPortNumber gets the value of TargetPortalPortNumber for the instance +func (instance *MSFT_iSCSITargetPortal) GetPropertyTargetPortalPortNumber() (value uint16, err error) { + retValue, err := instance.GetProperty("TargetPortalPortNumber") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint16) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint16 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint16(valuetmp) + + return +} + +// + +// +// +// +// +// +// +// +// +// + +// +// +func (instance *MSFT_iSCSITargetPortal) New( /* IN */ TargetPortalAddress string, + /* IN */ TargetPortalPortNumber uint16, + /* IN */ InitiatorInstanceName string, + /* IN */ InitiatorPortalAddress string, + /* IN */ AuthenticationType string, + /* IN */ ChapUsername string, + /* IN */ ChapSecret string, + /* IN */ IsHeaderDigest bool, + /* IN */ IsDataDigest bool, + /* OUT */ CreatedTargetPortal MSFT_iSCSITargetPortal) (result uint32, err error) { + retVal, err := instance.InvokeMethod("New", TargetPortalAddress, TargetPortalPortNumber, InitiatorInstanceName, InitiatorPortalAddress, AuthenticationType, ChapUsername, ChapSecret, IsHeaderDigest, IsDataDigest) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// + +// +func (instance *MSFT_iSCSITargetPortal) Remove( /* IN */ InitiatorInstanceName string, + /* IN */ InitiatorPortalAddress string, + /* IN */ TargetPortalPortNumber uint16, + /* IN */ TargetPortalAddress string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Remove", InitiatorInstanceName, InitiatorPortalAddress, TargetPortalPortNumber, TargetPortalAddress) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// + +// +func (instance *MSFT_iSCSITargetPortal) Update( /* IN */ InitiatorInstanceName string, + /* IN */ InitiatorPortalAddress string, + /* IN */ TargetPortalAddress string, + /* IN */ TargetPortalPortNumber uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Update", InitiatorInstanceName, InitiatorPortalAddress, TargetPortalAddress, TargetPortalPortNumber) + if err != nil { + return + } + result = uint32(retVal) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSIConnection.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSIConnection.go new file mode 100644 index 00000000..02e325ed --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSIConnection.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSITargetToiSCSIConnection struct +type MSFT_iSCSITargetToiSCSIConnection struct { + *cim.WmiInstance + + // + iSCSIConnection MSFT_iSCSIConnection + + // + iSCSITarget MSFT_iSCSITarget +} + +func NewMSFT_iSCSITargetToiSCSIConnectionEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSITargetToiSCSIConnection, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetToiSCSIConnection{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSITargetToiSCSIConnectionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSITargetToiSCSIConnection, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetToiSCSIConnection{ + WmiInstance: tmp, + } + return +} + +// SetiSCSIConnection sets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSITargetToiSCSIConnection) SetPropertyiSCSIConnection(value MSFT_iSCSIConnection) (err error) { + return instance.SetProperty("iSCSIConnection", (value)) +} + +// GetiSCSIConnection gets the value of iSCSIConnection for the instance +func (instance *MSFT_iSCSITargetToiSCSIConnection) GetPropertyiSCSIConnection() (value MSFT_iSCSIConnection, err error) { + retValue, err := instance.GetProperty("iSCSIConnection") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSIConnection) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSIConnection is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSIConnection(valuetmp) + + return +} + +// SetiSCSITarget sets the value of iSCSITarget for the instance +func (instance *MSFT_iSCSITargetToiSCSIConnection) SetPropertyiSCSITarget(value MSFT_iSCSITarget) (err error) { + return instance.SetProperty("iSCSITarget", (value)) +} + +// GetiSCSITarget gets the value of iSCSITarget for the instance +func (instance *MSFT_iSCSITargetToiSCSIConnection) GetPropertyiSCSITarget() (value MSFT_iSCSITarget, err error) { + retValue, err := instance.GetProperty("iSCSITarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITarget) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITarget is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITarget(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSISession.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSISession.go new file mode 100644 index 00000000..b49e2ae4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSISession.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSITargetToiSCSISession struct +type MSFT_iSCSITargetToiSCSISession struct { + *cim.WmiInstance + + // + iSCSISession MSFT_iSCSISession + + // + iSCSITarget MSFT_iSCSITarget +} + +func NewMSFT_iSCSITargetToiSCSISessionEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSITargetToiSCSISession, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetToiSCSISession{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSITargetToiSCSISessionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSITargetToiSCSISession, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetToiSCSISession{ + WmiInstance: tmp, + } + return +} + +// SetiSCSISession sets the value of iSCSISession for the instance +func (instance *MSFT_iSCSITargetToiSCSISession) SetPropertyiSCSISession(value MSFT_iSCSISession) (err error) { + return instance.SetProperty("iSCSISession", (value)) +} + +// GetiSCSISession gets the value of iSCSISession for the instance +func (instance *MSFT_iSCSITargetToiSCSISession) GetPropertyiSCSISession() (value MSFT_iSCSISession, err error) { + retValue, err := instance.GetProperty("iSCSISession") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSISession) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSISession is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSISession(valuetmp) + + return +} + +// SetiSCSITarget sets the value of iSCSITarget for the instance +func (instance *MSFT_iSCSITargetToiSCSISession) SetPropertyiSCSITarget(value MSFT_iSCSITarget) (err error) { + return instance.SetProperty("iSCSITarget", (value)) +} + +// GetiSCSITarget gets the value of iSCSITarget for the instance +func (instance *MSFT_iSCSITargetToiSCSISession) GetPropertyiSCSITarget() (value MSFT_iSCSITarget, err error) { + retValue, err := instance.GetProperty("iSCSITarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITarget) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITarget is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITarget(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSITargetPortal.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSITargetPortal.go new file mode 100644 index 00000000..4746aae6 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MSFT_iSCSITargetToiSCSITargetPortal.go @@ -0,0 +1,111 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// MSFT_iSCSITargetToiSCSITargetPortal struct +type MSFT_iSCSITargetToiSCSITargetPortal struct { + *cim.WmiInstance + + // + iSCSITarget MSFT_iSCSITarget + + // + iSCSITargetPortal MSFT_iSCSITargetPortal +} + +func NewMSFT_iSCSITargetToiSCSITargetPortalEx1(instance *cim.WmiInstance) (newInstance *MSFT_iSCSITargetToiSCSITargetPortal, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetToiSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +func NewMSFT_iSCSITargetToiSCSITargetPortalEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *MSFT_iSCSITargetToiSCSITargetPortal, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &MSFT_iSCSITargetToiSCSITargetPortal{ + WmiInstance: tmp, + } + return +} + +// SetiSCSITarget sets the value of iSCSITarget for the instance +func (instance *MSFT_iSCSITargetToiSCSITargetPortal) SetPropertyiSCSITarget(value MSFT_iSCSITarget) (err error) { + return instance.SetProperty("iSCSITarget", (value)) +} + +// GetiSCSITarget gets the value of iSCSITarget for the instance +func (instance *MSFT_iSCSITargetToiSCSITargetPortal) GetPropertyiSCSITarget() (value MSFT_iSCSITarget, err error) { + retValue, err := instance.GetProperty("iSCSITarget") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITarget) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITarget is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITarget(valuetmp) + + return +} + +// SetiSCSITargetPortal sets the value of iSCSITargetPortal for the instance +func (instance *MSFT_iSCSITargetToiSCSITargetPortal) SetPropertyiSCSITargetPortal(value MSFT_iSCSITargetPortal) (err error) { + return instance.SetProperty("iSCSITargetPortal", (value)) +} + +// GetiSCSITargetPortal gets the value of iSCSITargetPortal for the instance +func (instance *MSFT_iSCSITargetToiSCSITargetPortal) GetPropertyiSCSITargetPortal() (value MSFT_iSCSITargetPortal, err error) { + retValue, err := instance.GetProperty("iSCSITargetPortal") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(MSFT_iSCSITargetPortal) + if !ok { + err = errors.Wrapf(errors.InvalidType, " MSFT_iSCSITargetPortal is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = MSFT_iSCSITargetPortal(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodInvocationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodInvocationEvent.go new file mode 100644 index 00000000..8c534310 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodInvocationEvent.go @@ -0,0 +1,140 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __MethodInvocationEvent struct +type __MethodInvocationEvent struct { + *__InstanceOperationEvent + + // + Method string + + // + Parameters interface{} + + // + PreCall bool +} + +func New__MethodInvocationEventEx1(instance *cim.WmiInstance) (newInstance *__MethodInvocationEvent, err error) { + tmp, err := New__InstanceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__MethodInvocationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +func New__MethodInvocationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__MethodInvocationEvent, err error) { + tmp, err := New__InstanceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__MethodInvocationEvent{ + __InstanceOperationEvent: tmp, + } + return +} + +// SetMethod sets the value of Method for the instance +func (instance *__MethodInvocationEvent) SetPropertyMethod(value string) (err error) { + return instance.SetProperty("Method", (value)) +} + +// GetMethod gets the value of Method for the instance +func (instance *__MethodInvocationEvent) GetPropertyMethod() (value string, err error) { + retValue, err := instance.GetProperty("Method") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetParameters sets the value of Parameters for the instance +func (instance *__MethodInvocationEvent) SetPropertyParameters(value interface{}) (err error) { + return instance.SetProperty("Parameters", (value)) +} + +// GetParameters gets the value of Parameters for the instance +func (instance *__MethodInvocationEvent) GetPropertyParameters() (value interface{}, err error) { + retValue, err := instance.GetProperty("Parameters") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(interface{}) + if !ok { + err = errors.Wrapf(errors.InvalidType, " interface{} is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = interface{}(valuetmp) + + return +} + +// SetPreCall sets the value of PreCall for the instance +func (instance *__MethodInvocationEvent) SetPropertyPreCall(value bool) (err error) { + return instance.SetProperty("PreCall", (value)) +} + +// GetPreCall gets the value of PreCall for the instance +func (instance *__MethodInvocationEvent) GetPropertyPreCall() (value bool, err error) { + retValue, err := instance.GetProperty("PreCall") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodProviderRegistration.go new file mode 100644 index 00000000..5df05a38 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/MethodProviderRegistration.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __MethodProviderRegistration struct +type __MethodProviderRegistration struct { + *__ProviderRegistration +} + +func New__MethodProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__MethodProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__MethodProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__MethodProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__MethodProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__MethodProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NTLMUser9X.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NTLMUser9X.go new file mode 100644 index 00000000..7c069eb4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NTLMUser9X.go @@ -0,0 +1,200 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NTLMUser9X struct +type __NTLMUser9X struct { + *__SecurityRelatedClass + + // + Authority string + + // + Flags int32 + + // + Mask int32 + + // + Name string + + // + Type int32 +} + +func New__NTLMUser9XEx1(instance *cim.WmiInstance) (newInstance *__NTLMUser9X, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__NTLMUser9X{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__NTLMUser9XEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NTLMUser9X, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NTLMUser9X{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetAuthority sets the value of Authority for the instance +func (instance *__NTLMUser9X) SetPropertyAuthority(value string) (err error) { + return instance.SetProperty("Authority", (value)) +} + +// GetAuthority gets the value of Authority for the instance +func (instance *__NTLMUser9X) GetPropertyAuthority() (value string, err error) { + retValue, err := instance.GetProperty("Authority") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetFlags sets the value of Flags for the instance +func (instance *__NTLMUser9X) SetPropertyFlags(value int32) (err error) { + return instance.SetProperty("Flags", (value)) +} + +// GetFlags gets the value of Flags for the instance +func (instance *__NTLMUser9X) GetPropertyFlags() (value int32, err error) { + retValue, err := instance.GetProperty("Flags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetMask sets the value of Mask for the instance +func (instance *__NTLMUser9X) SetPropertyMask(value int32) (err error) { + return instance.SetProperty("Mask", (value)) +} + +// GetMask gets the value of Mask for the instance +func (instance *__NTLMUser9X) GetPropertyMask() (value int32, err error) { + retValue, err := instance.GetProperty("Mask") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *__NTLMUser9X) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__NTLMUser9X) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetType sets the value of Type for the instance +func (instance *__NTLMUser9X) SetPropertyType(value int32) (err error) { + return instance.SetProperty("Type", (value)) +} + +// GetType gets the value of Type for the instance +func (instance *__NTLMUser9X) GetPropertyType() (value int32, err error) { + retValue, err := instance.GetProperty("Type") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Namespace.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Namespace.go new file mode 100644 index 00000000..db90da35 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Namespace.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Namespace struct +type __Namespace struct { + *__SystemClass + + // + Name string +} + +func New__NamespaceEx1(instance *cim.WmiInstance) (newInstance *__Namespace, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__Namespace{ + __SystemClass: tmp, + } + return +} + +func New__NamespaceEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Namespace, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Namespace{ + __SystemClass: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *__Namespace) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__Namespace) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceCreationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceCreationEvent.go new file mode 100644 index 00000000..602c134b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceCreationEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __NamespaceCreationEvent struct +type __NamespaceCreationEvent struct { + *__NamespaceOperationEvent +} + +func New__NamespaceCreationEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceCreationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceCreationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +func New__NamespaceCreationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceCreationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceCreationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceDeletionEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceDeletionEvent.go new file mode 100644 index 00000000..bb206a63 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceDeletionEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __NamespaceDeletionEvent struct +type __NamespaceDeletionEvent struct { + *__NamespaceOperationEvent +} + +func New__NamespaceDeletionEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceDeletionEvent, err error) { + tmp, err := New__NamespaceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceDeletionEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +func New__NamespaceDeletionEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceDeletionEvent, err error) { + tmp, err := New__NamespaceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceDeletionEvent{ + __NamespaceOperationEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceModificationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceModificationEvent.go new file mode 100644 index 00000000..55e09d36 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceModificationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NamespaceModificationEvent struct +type __NamespaceModificationEvent struct { + *__NamespaceOperationEvent + + // + PreviousNamespace __Namespace +} + +func New__NamespaceModificationEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceModificationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceModificationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +func New__NamespaceModificationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceModificationEvent, err error) { + tmp, err := New__NamespaceOperationEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceModificationEvent{ + __NamespaceOperationEvent: tmp, + } + return +} + +// SetPreviousNamespace sets the value of PreviousNamespace for the instance +func (instance *__NamespaceModificationEvent) SetPropertyPreviousNamespace(value __Namespace) (err error) { + return instance.SetProperty("PreviousNamespace", (value)) +} + +// GetPreviousNamespace gets the value of PreviousNamespace for the instance +func (instance *__NamespaceModificationEvent) GetPropertyPreviousNamespace() (value __Namespace, err error) { + retValue, err := instance.GetProperty("PreviousNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Namespace) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Namespace is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Namespace(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceOperationEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceOperationEvent.go new file mode 100644 index 00000000..291a20b3 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NamespaceOperationEvent.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NamespaceOperationEvent struct +type __NamespaceOperationEvent struct { + *__Event + + // + TargetNamespace __Namespace +} + +func New__NamespaceOperationEventEx1(instance *cim.WmiInstance) (newInstance *__NamespaceOperationEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__NamespaceOperationEvent{ + __Event: tmp, + } + return +} + +func New__NamespaceOperationEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NamespaceOperationEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NamespaceOperationEvent{ + __Event: tmp, + } + return +} + +// SetTargetNamespace sets the value of TargetNamespace for the instance +func (instance *__NamespaceOperationEvent) SetPropertyTargetNamespace(value __Namespace) (err error) { + return instance.SetProperty("TargetNamespace", (value)) +} + +// GetTargetNamespace gets the value of TargetNamespace for the instance +func (instance *__NamespaceOperationEvent) GetPropertyTargetNamespace() (value __Namespace, err error) { + retValue, err := instance.GetProperty("TargetNamespace") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Namespace) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Namespace is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Namespace(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NotifyStatus.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NotifyStatus.go new file mode 100644 index 00000000..8d36b68e --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/NotifyStatus.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __NotifyStatus struct +type __NotifyStatus struct { + *cim.WmiInstance + + // + StatusCode uint32 +} + +func New__NotifyStatusEx1(instance *cim.WmiInstance) (newInstance *__NotifyStatus, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__NotifyStatus{ + WmiInstance: tmp, + } + return +} + +func New__NotifyStatusEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__NotifyStatus, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__NotifyStatus{ + WmiInstance: tmp, + } + return +} + +// SetStatusCode sets the value of StatusCode for the instance +func (instance *__NotifyStatus) SetPropertyStatusCode(value uint32) (err error) { + return instance.SetProperty("StatusCode", (value)) +} + +// GetStatusCode gets the value of StatusCode for the instance +func (instance *__NotifyStatus) GetPropertyStatusCode() (value uint32, err error) { + retValue, err := instance.GetProperty("StatusCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration.go new file mode 100644 index 00000000..1e250137 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration.go @@ -0,0 +1,291 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ObjectProviderRegistration struct +type __ObjectProviderRegistration struct { + *__ProviderRegistration + + // + InteractionType ObjectProviderRegistration_InteractionType + + // + QuerySupportLevels []string + + // + SupportsBatching bool + + // + SupportsDelete bool + + // + SupportsEnumeration bool + + // + SupportsGet bool + + // + SupportsPut bool + + // + SupportsTransactions bool +} + +func New__ObjectProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__ObjectProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__ObjectProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__ObjectProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ObjectProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ObjectProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetInteractionType sets the value of InteractionType for the instance +func (instance *__ObjectProviderRegistration) SetPropertyInteractionType(value ObjectProviderRegistration_InteractionType) (err error) { + return instance.SetProperty("InteractionType", (value)) +} + +// GetInteractionType gets the value of InteractionType for the instance +func (instance *__ObjectProviderRegistration) GetPropertyInteractionType() (value ObjectProviderRegistration_InteractionType, err error) { + retValue, err := instance.GetProperty("InteractionType") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = ObjectProviderRegistration_InteractionType(valuetmp) + + return +} + +// SetQuerySupportLevels sets the value of QuerySupportLevels for the instance +func (instance *__ObjectProviderRegistration) SetPropertyQuerySupportLevels(value []string) (err error) { + return instance.SetProperty("QuerySupportLevels", (value)) +} + +// GetQuerySupportLevels gets the value of QuerySupportLevels for the instance +func (instance *__ObjectProviderRegistration) GetPropertyQuerySupportLevels() (value []string, err error) { + retValue, err := instance.GetProperty("QuerySupportLevels") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, string(valuetmp)) + } + + return +} + +// SetSupportsBatching sets the value of SupportsBatching for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsBatching(value bool) (err error) { + return instance.SetProperty("SupportsBatching", (value)) +} + +// GetSupportsBatching gets the value of SupportsBatching for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsBatching() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsBatching") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsDelete sets the value of SupportsDelete for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsDelete(value bool) (err error) { + return instance.SetProperty("SupportsDelete", (value)) +} + +// GetSupportsDelete gets the value of SupportsDelete for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsDelete() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsDelete") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsEnumeration sets the value of SupportsEnumeration for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsEnumeration(value bool) (err error) { + return instance.SetProperty("SupportsEnumeration", (value)) +} + +// GetSupportsEnumeration gets the value of SupportsEnumeration for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsEnumeration() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsEnumeration") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsGet sets the value of SupportsGet for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsGet(value bool) (err error) { + return instance.SetProperty("SupportsGet", (value)) +} + +// GetSupportsGet gets the value of SupportsGet for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsGet() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsGet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsPut sets the value of SupportsPut for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsPut(value bool) (err error) { + return instance.SetProperty("SupportsPut", (value)) +} + +// GetSupportsPut gets the value of SupportsPut for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsPut() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsPut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsTransactions sets the value of SupportsTransactions for the instance +func (instance *__ObjectProviderRegistration) SetPropertySupportsTransactions(value bool) (err error) { + return instance.SetProperty("SupportsTransactions", (value)) +} + +// GetSupportsTransactions gets the value of SupportsTransactions for the instance +func (instance *__ObjectProviderRegistration) GetPropertySupportsTransactions() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsTransactions") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration_InteractionType.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration_InteractionType.go new file mode 100644 index 00000000..8c448fe7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ObjectProviderRegistration_InteractionType.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source ObjectProviderRegistration_InteractionType +////////////////////////////////////////////// +package storage + +// ObjectProviderRegistration_InteractionType +type ObjectProviderRegistration_InteractionType int + +const ( + // Pull enum + ObjectProviderRegistration_InteractionType_Pull ObjectProviderRegistration_InteractionType = 0 + // Push enum + ObjectProviderRegistration_InteractionType_Push ObjectProviderRegistration_InteractionType = 1 + // PushVerify enum + ObjectProviderRegistration_InteractionType_PushVerify ObjectProviderRegistration_InteractionType = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PARAMETERS.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PARAMETERS.go new file mode 100644 index 00000000..f83acb6c --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PARAMETERS.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __PARAMETERS struct +type __PARAMETERS struct { + *cim.WmiInstance +} + +func New__PARAMETERSEx1(instance *cim.WmiInstance) (newInstance *__PARAMETERS, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__PARAMETERS{ + WmiInstance: tmp, + } + return +} + +func New__PARAMETERSEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__PARAMETERS, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__PARAMETERS{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PS_StorageCmdlets.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PS_StorageCmdlets.go new file mode 100644 index 00000000..cf24ee2d --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PS_StorageCmdlets.go @@ -0,0 +1,551 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// PS_StorageCmdlets struct +type PS_StorageCmdlets struct { + *cim.WmiInstance +} + +func NewPS_StorageCmdletsEx1(instance *cim.WmiInstance) (newInstance *PS_StorageCmdlets, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &PS_StorageCmdlets{ + WmiInstance: tmp, + } + return +} + +func NewPS_StorageCmdletsEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *PS_StorageCmdlets, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &PS_StorageCmdlets{ + WmiInstance: tmp, + } + return +} + +// + +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetDisk( /* IN */ InputObject []MSFT_Disk, + /* IN */ UniqueId string, + /* IN */ Path string, + /* IN */ Number uint32, + /* IN */ PartitionStyle uint16, + /* IN */ IsReadOnly bool, + /* IN */ IsOffline bool, + /* IN */ Signature uint32, + /* IN */ Guid string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetDisk", InputObject, UniqueId, Path, Number, PartitionStyle, IsReadOnly, IsOffline, Signature, Guid) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetVolume( /* IN */ InputObject []MSFT_Volume, + /* IN */ UniqueId string, + /* IN */ Path string, + /* IN */ FileSystemLabel string, + /* IN */ DriveLetter byte, + /* IN */ NewFileSystemLabel string, + /* IN */ DedupMode uint32) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetVolume", InputObject, UniqueId, Path, FileSystemLabel, DriveLetter, NewFileSystemLabel, DedupMode) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetPartition( /* IN */ InputObject []MSFT_Partition, + /* IN */ DiskId string, + /* IN */ Offset uint64, + /* IN */ DiskNumber uint32, + /* IN */ PartitionNumber uint32, + /* IN */ DriveLetter byte, + /* IN */ NewDriveLetter byte, + /* IN */ IsOffline bool, + /* IN */ IsReadOnly bool, + /* IN */ NoDefaultDriveLetter bool, + /* IN */ IsActive bool, + /* IN */ IsHidden bool, + /* IN */ IsShadowCopy bool, + /* IN */ IsDAX bool, + /* IN */ MbrType uint16, + /* IN */ GptType string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPartition", InputObject, DiskId, Offset, DiskNumber, PartitionNumber, DriveLetter, NewDriveLetter, IsOffline, IsReadOnly, NoDefaultDriveLetter, IsActive, IsHidden, IsShadowCopy, IsDAX, MbrType, GptType) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetPhysicalDisk( /* IN */ InputObject []MSFT_PhysicalDisk, + /* IN */ UniqueId string, + /* IN */ FriendlyName string, + /* IN */ NewFriendlyName string, + /* IN */ Description string, + /* IN */ Usage uint16, + /* IN */ MediaType uint16, + /* IN */ StorageEnclosureId string, + /* IN */ StorageScaleUnitId string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetPhysicalDisk", InputObject, UniqueId, FriendlyName, NewFriendlyName, Description, Usage, MediaType, StorageEnclosureId, StorageScaleUnitId) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetStoragePool( /* IN */ InputObject []MSFT_StoragePool, + /* IN */ UniqueId string, + /* IN */ Name string, + /* IN */ FriendlyName string, + /* IN */ NewFriendlyName string, + /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* IN */ ProvisioningTypeDefault uint16, + /* IN */ MediaTypeDefault uint16, + /* IN */ ResiliencySettingNameDefault string, + /* IN */ EnclosureAwareDefault bool, + /* IN */ FaultDomainAwarenessDefault uint16, + /* IN */ WriteCacheSizeDefault uint64, + /* IN */ AutoWriteCacheSize bool, + /* IN */ IsReadOnly bool, + /* IN */ ClearOnDeallocate bool, + /* IN */ IsPowerProtected bool, + /* IN */ RepairPolicy uint16, + /* IN */ RetireMissingPhysicalDisks uint16, + /* IN */ ThinProvisioningAlertThresholds []uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetStoragePool", InputObject, UniqueId, Name, FriendlyName, NewFriendlyName, Usage, OtherUsageDescription, ProvisioningTypeDefault, MediaTypeDefault, ResiliencySettingNameDefault, EnclosureAwareDefault, FaultDomainAwarenessDefault, WriteCacheSizeDefault, AutoWriteCacheSize, IsReadOnly, ClearOnDeallocate, IsPowerProtected, RepairPolicy, RetireMissingPhysicalDisks, ThinProvisioningAlertThresholds) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetVirtualDisk( /* IN */ InputObject []MSFT_VirtualDisk, + /* IN */ UniqueId string, + /* IN */ Name string, + /* IN */ FriendlyName string, + /* IN */ NewFriendlyName string, + /* IN */ Usage uint16, + /* IN */ OtherUsageDescription string, + /* IN */ IsManualAttach bool, + /* IN */ StorageNodeName string, + /* IN */ Access uint16, + /* IN */ ProvisioningType uint16, + /* IN */ AllocationUnitSize uint64, + /* IN */ MediaType uint16, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ColumnIsolation uint16, + /* IN */ ResiliencySettingName string, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfDataCopies uint16, + /* IN */ NumberOfGroups uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ Interleave uint64) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetVirtualDisk", InputObject, UniqueId, Name, FriendlyName, NewFriendlyName, Usage, OtherUsageDescription, IsManualAttach, StorageNodeName, Access, ProvisioningType, AllocationUnitSize, MediaType, FaultDomainAwareness, ColumnIsolation, ResiliencySettingName, PhysicalDiskRedundancy, NumberOfDataCopies, NumberOfGroups, NumberOfColumns, Interleave) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetStorageTier( /* IN */ InputObject []MSFT_StorageTier, + /* IN */ UniqueId string, + /* IN */ FriendlyName string, + /* IN */ NewFriendlyName string, + /* IN */ ProvisioningType uint16, + /* IN */ AllocationUnitSize uint64, + /* IN */ MediaType uint16, + /* IN */ FaultDomainAwareness uint16, + /* IN */ ColumnIsolation uint16, + /* IN */ ResiliencySettingName string, + /* IN */ Usage uint16, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfDataCopies uint16, + /* IN */ NumberOfGroups uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ Interleave uint64, + /* IN */ Description string) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetStorageTier", InputObject, UniqueId, FriendlyName, NewFriendlyName, ProvisioningType, AllocationUnitSize, MediaType, FaultDomainAwareness, ColumnIsolation, ResiliencySettingName, Usage, PhysicalDiskRedundancy, NumberOfDataCopies, NumberOfGroups, NumberOfColumns, Interleave, Description) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetStorageSubSystem( /* IN */ InputObject []MSFT_StorageSubSystem, + /* IN */ UniqueId string, + /* IN */ Name string, + /* IN */ FriendlyName string, + /* IN */ Description string, + /* IN */ AutomaticClusteringEnabled bool, + /* IN */ FaultDomainAwarenessDefault uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetStorageSubSystem", InputObject, UniqueId, Name, FriendlyName, Description, AutomaticClusteringEnabled, FaultDomainAwarenessDefault) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) AddPhysicalDisk( /* IN */ StoragePool MSFT_StoragePool, + /* IN */ StoragePoolUniqueId string, + /* IN */ StoragePoolName string, + /* IN */ StoragePoolFriendlyName string, + /* IN */ VirtualDisk MSFT_VirtualDisk, + /* IN */ VirtualDiskUniqueId string, + /* IN */ VirtualDiskName string, + /* IN */ VirtualDiskFriendlyName string, + /* IN */ PhysicalDisks []MSFT_PhysicalDisk, + /* IN */ Usage uint16) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("AddPhysicalDisk", StoragePool, StoragePoolUniqueId, StoragePoolName, StoragePoolFriendlyName, VirtualDisk, VirtualDiskUniqueId, VirtualDiskName, VirtualDiskFriendlyName, PhysicalDisks, Usage) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) RemovePhysicalDisk( /* IN */ StoragePool MSFT_StoragePool, + /* IN */ StoragePoolUniqueId string, + /* IN */ StoragePoolName string, + /* IN */ StoragePoolFriendlyName string, + /* IN */ VirtualDisk MSFT_VirtualDisk, + /* IN */ VirtualDiskUniqueId string, + /* IN */ VirtualDiskName string, + /* IN */ VirtualDiskFriendlyName string, + /* IN */ PhysicalDisks []MSFT_PhysicalDisk) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("RemovePhysicalDisk", StoragePool, StoragePoolUniqueId, StoragePoolName, StoragePoolFriendlyName, VirtualDisk, VirtualDiskUniqueId, VirtualDiskName, VirtualDiskFriendlyName, PhysicalDisks) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *PS_StorageCmdlets) LaunchProviderHost( /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("LaunchProviderHost") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +// +// +// + +// +func (instance *PS_StorageCmdlets) SetFileShare( /* IN */ InputObject []MSFT_FileShare, + /* IN */ UniqueId string, + /* IN */ Name string, + /* IN */ Description string, + /* IN */ EncryptData bool) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetFileShare", InputObject, UniqueId, Name, Description, EncryptData) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// + +// +// +// +// +func (instance *PS_StorageCmdlets) CreateVolume( /* IN */ StoragePool MSFT_StoragePool, + /* IN */ StoragePoolUniqueId string, + /* IN */ StoragePoolName string, + /* IN */ StoragePoolFriendlyName string, + /* IN */ Disk MSFT_Disk, + /* IN */ DiskNumber uint32, + /* IN */ DiskPath string, + /* IN */ DiskUniqueId string, + /* IN */ FriendlyName string, + /* IN */ Size uint64, + /* IN */ StorageTiers []MSFT_StorageTier, + /* IN */ StorageTierSizes []uint64, + /* IN */ ProvisioningType uint16, + /* IN */ ResiliencySettingName string, + /* IN */ PhysicalDiskRedundancy uint16, + /* IN */ NumberOfColumns uint16, + /* IN */ FileSystem uint16, + /* IN */ AccessPath string, + /* IN */ AllocationUnitSize uint32, + /* IN */ ReadCacheSize uint64, + /* IN */ FileServer MSFT_FileServer, + /* OUT */ CreatedVolume []MSFT_Volume, + /* OPTIONAL IN */ RunAsJob bool, + /* OUT */ CreatedStorageJob MSFT_StorageJob, + /* OUT */ ExtendedStatus MSFT_StorageExtendedStatus) (result uint32, err error) { + retVal, err := instance.InvokeMethod("CreateVolume", StoragePool, StoragePoolUniqueId, StoragePoolName, StoragePoolFriendlyName, Disk, DiskNumber, DiskPath, DiskUniqueId, FriendlyName, Size, StorageTiers, StorageTierSizes, ProvisioningType, ResiliencySettingName, PhysicalDiskRedundancy, NumberOfColumns, FileSystem, AccessPath, AllocationUnitSize, ReadCacheSize, FileServer, RunAsJob) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// + +// +// +func (instance *PS_StorageCmdlets) GetStorageReliabilityCounter( /* IN */ PhysicalDisk MSFT_PhysicalDisk, + /* IN */ Disk MSFT_Disk, + /* OUT */ StorageReliabilityCounter MSFT_StorageReliabilityCounter) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetStorageReliabilityCounter", PhysicalDisk, Disk) + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PropertyProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PropertyProviderRegistration.go new file mode 100644 index 00000000..0b21dbd7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/PropertyProviderRegistration.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __PropertyProviderRegistration struct +type __PropertyProviderRegistration struct { + *__ProviderRegistration + + // + SupportsGet bool + + // + SupportsPut bool +} + +func New__PropertyProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__PropertyProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx1(instance) + + if err != nil { + return + } + newInstance = &__PropertyProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +func New__PropertyProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__PropertyProviderRegistration, err error) { + tmp, err := New__ProviderRegistrationEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__PropertyProviderRegistration{ + __ProviderRegistration: tmp, + } + return +} + +// SetSupportsGet sets the value of SupportsGet for the instance +func (instance *__PropertyProviderRegistration) SetPropertySupportsGet(value bool) (err error) { + return instance.SetProperty("SupportsGet", (value)) +} + +// GetSupportsGet gets the value of SupportsGet for the instance +func (instance *__PropertyProviderRegistration) GetPropertySupportsGet() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsGet") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsPut sets the value of SupportsPut for the instance +func (instance *__PropertyProviderRegistration) SetPropertySupportsPut(value bool) (err error) { + return instance.SetProperty("SupportsPut", (value)) +} + +// GetSupportsPut gets the value of SupportsPut for the instance +func (instance *__PropertyProviderRegistration) GetPropertySupportsPut() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsPut") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Provider.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Provider.go new file mode 100644 index 00000000..975afcb0 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Provider.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Provider struct +type __Provider struct { + *__SystemClass + + // + Name string +} + +func New__ProviderEx1(instance *cim.WmiInstance) (newInstance *__Provider, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__Provider{ + __SystemClass: tmp, + } + return +} + +func New__ProviderEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Provider, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Provider{ + __SystemClass: tmp, + } + return +} + +// SetName sets the value of Name for the instance +func (instance *__Provider) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__Provider) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ProviderRegistration.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ProviderRegistration.go new file mode 100644 index 00000000..342ae011 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/ProviderRegistration.go @@ -0,0 +1,80 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __ProviderRegistration struct +type __ProviderRegistration struct { + *__SystemClass + + // + provider __Provider +} + +func New__ProviderRegistrationEx1(instance *cim.WmiInstance) (newInstance *__ProviderRegistration, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__ProviderRegistration{ + __SystemClass: tmp, + } + return +} + +func New__ProviderRegistrationEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__ProviderRegistration, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__ProviderRegistration{ + __SystemClass: tmp, + } + return +} + +// Setprovider sets the value of provider for the instance +func (instance *__ProviderRegistration) SetPropertyprovider(value __Provider) (err error) { + return instance.SetProperty("provider", (value)) +} + +// Getprovider gets the value of provider for the instance +func (instance *__ProviderRegistration) GetPropertyprovider() (value __Provider, err error) { + retValue, err := instance.GetProperty("provider") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__Provider) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __Provider is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __Provider(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/QOSFailureEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/QOSFailureEvent.go new file mode 100644 index 00000000..bbf232ee --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/QOSFailureEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __QOSFailureEvent struct +type __QOSFailureEvent struct { + *__EventDroppedEvent + + // + ErrorCode uint32 + + // + ErrorDescription string +} + +func New__QOSFailureEventEx1(instance *cim.WmiInstance) (newInstance *__QOSFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx1(instance) + + if err != nil { + return + } + newInstance = &__QOSFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +func New__QOSFailureEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__QOSFailureEvent, err error) { + tmp, err := New__EventDroppedEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__QOSFailureEvent{ + __EventDroppedEvent: tmp, + } + return +} + +// SetErrorCode sets the value of ErrorCode for the instance +func (instance *__QOSFailureEvent) SetPropertyErrorCode(value uint32) (err error) { + return instance.SetProperty("ErrorCode", (value)) +} + +// GetErrorCode gets the value of ErrorCode for the instance +func (instance *__QOSFailureEvent) GetPropertyErrorCode() (value uint32, err error) { + retValue, err := instance.GetProperty("ErrorCode") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetErrorDescription sets the value of ErrorDescription for the instance +func (instance *__QOSFailureEvent) SetPropertyErrorDescription(value string) (err error) { + return instance.SetProperty("ErrorDescription", (value)) +} + +// GetErrorDescription gets the value of ErrorDescription for the instance +func (instance *__QOSFailureEvent) GetPropertyErrorDescription() (value string, err error) { + retValue, err := instance.GetProperty("ErrorDescription") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityDescriptor.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityDescriptor.go new file mode 100644 index 00000000..f9cc5e5b --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityDescriptor.go @@ -0,0 +1,232 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __SecurityDescriptor struct +type __SecurityDescriptor struct { + *__SecurityRelatedClass + + // + ControlFlags uint32 + + // + DACL []__ACE + + // + Group __ACE + + // + Owner __ACE + + // + SACL []__ACE + + // + TIME_CREATED uint64 +} + +func New__SecurityDescriptorEx1(instance *cim.WmiInstance) (newInstance *__SecurityDescriptor, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__SecurityDescriptor{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__SecurityDescriptorEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SecurityDescriptor, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SecurityDescriptor{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetControlFlags sets the value of ControlFlags for the instance +func (instance *__SecurityDescriptor) SetPropertyControlFlags(value uint32) (err error) { + return instance.SetProperty("ControlFlags", (value)) +} + +// GetControlFlags gets the value of ControlFlags for the instance +func (instance *__SecurityDescriptor) GetPropertyControlFlags() (value uint32, err error) { + retValue, err := instance.GetProperty("ControlFlags") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetDACL sets the value of DACL for the instance +func (instance *__SecurityDescriptor) SetPropertyDACL(value []__ACE) (err error) { + return instance.SetProperty("DACL", (value)) +} + +// GetDACL gets the value of DACL for the instance +func (instance *__SecurityDescriptor) GetPropertyDACL() (value []__ACE, err error) { + retValue, err := instance.GetProperty("DACL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, __ACE(valuetmp)) + } + + return +} + +// SetGroup sets the value of Group for the instance +func (instance *__SecurityDescriptor) SetPropertyGroup(value __ACE) (err error) { + return instance.SetProperty("Group", (value)) +} + +// GetGroup gets the value of Group for the instance +func (instance *__SecurityDescriptor) GetPropertyGroup() (value __ACE, err error) { + retValue, err := instance.GetProperty("Group") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __ACE(valuetmp) + + return +} + +// SetOwner sets the value of Owner for the instance +func (instance *__SecurityDescriptor) SetPropertyOwner(value __ACE) (err error) { + return instance.SetProperty("Owner", (value)) +} + +// GetOwner gets the value of Owner for the instance +func (instance *__SecurityDescriptor) GetPropertyOwner() (value __ACE, err error) { + retValue, err := instance.GetProperty("Owner") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = __ACE(valuetmp) + + return +} + +// SetSACL sets the value of SACL for the instance +func (instance *__SecurityDescriptor) SetPropertySACL(value []__ACE) (err error) { + return instance.SetProperty("SACL", (value)) +} + +// GetSACL gets the value of SACL for the instance +func (instance *__SecurityDescriptor) GetPropertySACL() (value []__ACE, err error) { + retValue, err := instance.GetProperty("SACL") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(__ACE) + if !ok { + err = errors.Wrapf(errors.InvalidType, " __ACE is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, __ACE(valuetmp)) + } + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__SecurityDescriptor) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__SecurityDescriptor) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityRelatedClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityRelatedClass.go new file mode 100644 index 00000000..d962defb --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SecurityRelatedClass.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SecurityRelatedClass struct +type __SecurityRelatedClass struct { + *cim.WmiInstance +} + +func New__SecurityRelatedClassEx1(instance *cim.WmiInstance) (newInstance *__SecurityRelatedClass, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__SecurityRelatedClass{ + WmiInstance: tmp, + } + return +} + +func New__SecurityRelatedClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SecurityRelatedClass, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SecurityRelatedClass{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemClass.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemClass.go new file mode 100644 index 00000000..71d35347 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemClass.go @@ -0,0 +1,49 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SystemClass struct +type __SystemClass struct { + *cim.WmiInstance +} + +func New__SystemClassEx1(instance *cim.WmiInstance) (newInstance *__SystemClass, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__SystemClass{ + WmiInstance: tmp, + } + return +} + +func New__SystemClassEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SystemClass, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SystemClass{ + WmiInstance: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemEvent.go new file mode 100644 index 00000000..3a287ff4 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemEvent.go @@ -0,0 +1,48 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SystemEvent struct +type __SystemEvent struct { + *__ExtrinsicEvent +} + +func New__SystemEventEx1(instance *cim.WmiInstance) (newInstance *__SystemEvent, err error) { + tmp, err := New__ExtrinsicEventEx1(instance) + + if err != nil { + return + } + newInstance = &__SystemEvent{ + __ExtrinsicEvent: tmp, + } + return +} + +func New__SystemEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SystemEvent, err error) { + tmp, err := New__ExtrinsicEventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SystemEvent{ + __ExtrinsicEvent: tmp, + } + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemSecurity.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemSecurity.go new file mode 100644 index 00000000..ac4a7eb2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/SystemSecurity.go @@ -0,0 +1,154 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/instance" + "github.com/microsoft/wmi/pkg/base/query" + cim "github.com/microsoft/wmi/pkg/wmiinstance" +) + +// __SystemSecurity struct +type __SystemSecurity struct { + *cim.WmiInstance +} + +func New__SystemSecurityEx1(instance *cim.WmiInstance) (newInstance *__SystemSecurity, err error) { + tmp, err := instance, nil + + if err != nil { + return + } + newInstance = &__SystemSecurity{ + WmiInstance: tmp, + } + return +} + +func New__SystemSecurityEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__SystemSecurity, err error) { + tmp, err := instance.GetWmiInstance(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__SystemSecurity{ + WmiInstance: tmp, + } + return +} + +// + +// +// +func (instance *__SystemSecurity) GetSD( /* OUT */ SD []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSD") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *__SystemSecurity) GetSecurityDescriptor( /* OUT */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetSecurityDescriptor") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// +// +func (instance *__SystemSecurity) Get9XUserList( /* OUT */ ul []__NTLMUser9X) (result uint32, err error) { + retVal, err := instance.InvokeMethod("Get9XUserList") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} + +// + +// + +// +func (instance *__SystemSecurity) SetSD( /* IN */ SD []uint8) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSD", SD) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *__SystemSecurity) SetSecurityDescriptor( /* IN */ Descriptor __SecurityDescriptor) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("SetSecurityDescriptor", Descriptor) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// + +// +func (instance *__SystemSecurity) Set9XUserList( /* IN */ ul []__NTLMUser9X) (result uint32, err error) { + retVal, err := instance.InvokeMethodWithReturn("Set9XUserList", ul) + if err != nil { + return + } + result = uint32(retVal) + return + +} + +// + +// +// +func (instance *__SystemSecurity) GetCallerAccessRights( /* OUT */ rights int32) (result uint32, err error) { + retVal, err := instance.InvokeMethod("GetCallerAccessRights") + if err != nil { + return + } + retValue := retVal[0].(int32) + result = uint32(retValue) + return + +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerEvent.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerEvent.go new file mode 100644 index 00000000..0727c5a7 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerEvent.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __TimerEvent struct +type __TimerEvent struct { + *__Event + + // + NumFirings uint32 + + // + TimerId string +} + +func New__TimerEventEx1(instance *cim.WmiInstance) (newInstance *__TimerEvent, err error) { + tmp, err := New__EventEx1(instance) + + if err != nil { + return + } + newInstance = &__TimerEvent{ + __Event: tmp, + } + return +} + +func New__TimerEventEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__TimerEvent, err error) { + tmp, err := New__EventEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__TimerEvent{ + __Event: tmp, + } + return +} + +// SetNumFirings sets the value of NumFirings for the instance +func (instance *__TimerEvent) SetPropertyNumFirings(value uint32) (err error) { + return instance.SetProperty("NumFirings", (value)) +} + +// GetNumFirings gets the value of NumFirings for the instance +func (instance *__TimerEvent) GetPropertyNumFirings() (value uint32, err error) { + retValue, err := instance.GetProperty("NumFirings") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetTimerId sets the value of TimerId for the instance +func (instance *__TimerEvent) SetPropertyTimerId(value string) (err error) { + return instance.SetProperty("TimerId", (value)) +} + +// GetTimerId gets the value of TimerId for the instance +func (instance *__TimerEvent) GetPropertyTimerId() (value string, err error) { + retValue, err := instance.GetProperty("TimerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerInstruction.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerInstruction.go new file mode 100644 index 00000000..8e6e47ce --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerInstruction.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __TimerInstruction struct +type __TimerInstruction struct { + *__EventGenerator + + // + SkipIfPassed bool + + // + TimerId string +} + +func New__TimerInstructionEx1(instance *cim.WmiInstance) (newInstance *__TimerInstruction, err error) { + tmp, err := New__EventGeneratorEx1(instance) + + if err != nil { + return + } + newInstance = &__TimerInstruction{ + __EventGenerator: tmp, + } + return +} + +func New__TimerInstructionEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__TimerInstruction, err error) { + tmp, err := New__EventGeneratorEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__TimerInstruction{ + __EventGenerator: tmp, + } + return +} + +// SetSkipIfPassed sets the value of SkipIfPassed for the instance +func (instance *__TimerInstruction) SetPropertySkipIfPassed(value bool) (err error) { + return instance.SetProperty("SkipIfPassed", (value)) +} + +// GetSkipIfPassed gets the value of SkipIfPassed for the instance +func (instance *__TimerInstruction) GetPropertySkipIfPassed() (value bool, err error) { + retValue, err := instance.GetProperty("SkipIfPassed") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetTimerId sets the value of TimerId for the instance +func (instance *__TimerInstruction) SetPropertyTimerId(value string) (err error) { + return instance.SetProperty("TimerId", (value)) +} + +// GetTimerId gets the value of TimerId for the instance +func (instance *__TimerInstruction) GetPropertyTimerId() (value string, err error) { + retValue, err := instance.GetProperty("TimerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerNextFiring.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerNextFiring.go new file mode 100644 index 00000000..1f797ee2 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/TimerNextFiring.go @@ -0,0 +1,110 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __TimerNextFiring struct +type __TimerNextFiring struct { + *__IndicationRelated + + // + NextEvent64BitTime int64 + + // + TimerId string +} + +func New__TimerNextFiringEx1(instance *cim.WmiInstance) (newInstance *__TimerNextFiring, err error) { + tmp, err := New__IndicationRelatedEx1(instance) + + if err != nil { + return + } + newInstance = &__TimerNextFiring{ + __IndicationRelated: tmp, + } + return +} + +func New__TimerNextFiringEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__TimerNextFiring, err error) { + tmp, err := New__IndicationRelatedEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__TimerNextFiring{ + __IndicationRelated: tmp, + } + return +} + +// SetNextEvent64BitTime sets the value of NextEvent64BitTime for the instance +func (instance *__TimerNextFiring) SetPropertyNextEvent64BitTime(value int64) (err error) { + return instance.SetProperty("NextEvent64BitTime", (value)) +} + +// GetNextEvent64BitTime gets the value of NextEvent64BitTime for the instance +func (instance *__TimerNextFiring) GetPropertyNextEvent64BitTime() (value int64, err error) { + retValue, err := instance.GetProperty("NextEvent64BitTime") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int64(valuetmp) + + return +} + +// SetTimerId sets the value of TimerId for the instance +func (instance *__TimerNextFiring) SetPropertyTimerId(value string) (err error) { + return instance.SetProperty("TimerId", (value)) +} + +// GetTimerId gets the value of TimerId for the instance +func (instance *__TimerNextFiring) GetPropertyTimerId() (value string, err error) { + retValue, err := instance.GetProperty("TimerId") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Trustee.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Trustee.go new file mode 100644 index 00000000..092df8cf --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Trustee.go @@ -0,0 +1,231 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Trustee struct +type __Trustee struct { + *__SecurityRelatedClass + + // + Domain string + + // + Name string + + // + SID []uint8 + + // + SidLength uint32 + + // + SIDString string + + // + TIME_CREATED uint64 +} + +func New__TrusteeEx1(instance *cim.WmiInstance) (newInstance *__Trustee, err error) { + tmp, err := New__SecurityRelatedClassEx1(instance) + + if err != nil { + return + } + newInstance = &__Trustee{ + __SecurityRelatedClass: tmp, + } + return +} + +func New__TrusteeEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Trustee, err error) { + tmp, err := New__SecurityRelatedClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Trustee{ + __SecurityRelatedClass: tmp, + } + return +} + +// SetDomain sets the value of Domain for the instance +func (instance *__Trustee) SetPropertyDomain(value string) (err error) { + return instance.SetProperty("Domain", (value)) +} + +// GetDomain gets the value of Domain for the instance +func (instance *__Trustee) GetPropertyDomain() (value string, err error) { + retValue, err := instance.GetProperty("Domain") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetName sets the value of Name for the instance +func (instance *__Trustee) SetPropertyName(value string) (err error) { + return instance.SetProperty("Name", (value)) +} + +// GetName gets the value of Name for the instance +func (instance *__Trustee) GetPropertyName() (value string, err error) { + retValue, err := instance.GetProperty("Name") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSID sets the value of SID for the instance +func (instance *__Trustee) SetPropertySID(value []uint8) (err error) { + return instance.SetProperty("SID", (value)) +} + +// GetSID gets the value of SID for the instance +func (instance *__Trustee) GetPropertySID() (value []uint8, err error) { + retValue, err := instance.GetProperty("SID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} + +// SetSidLength sets the value of SidLength for the instance +func (instance *__Trustee) SetPropertySidLength(value uint32) (err error) { + return instance.SetProperty("SidLength", (value)) +} + +// GetSidLength gets the value of SidLength for the instance +func (instance *__Trustee) GetPropertySidLength() (value uint32, err error) { + retValue, err := instance.GetProperty("SidLength") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} + +// SetSIDString sets the value of SIDString for the instance +func (instance *__Trustee) SetPropertySIDString(value string) (err error) { + return instance.SetProperty("SIDString", (value)) +} + +// GetSIDString gets the value of SIDString for the instance +func (instance *__Trustee) GetPropertySIDString() (value string, err error) { + retValue, err := instance.GetProperty("SIDString") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetTIME_CREATED sets the value of TIME_CREATED for the instance +func (instance *__Trustee) SetPropertyTIME_CREATED(value uint64) (err error) { + return instance.SetProperty("TIME_CREATED", (value)) +} + +// GetTIME_CREATED gets the value of TIME_CREATED for the instance +func (instance *__Trustee) GetPropertyTIME_CREATED() (value uint64, err error) { + retValue, err := instance.GetProperty("TIME_CREATED") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint64) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint64 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint64(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider.go new file mode 100644 index 00000000..75cb9364 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider.go @@ -0,0 +1,740 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __Win32Provider struct +type __Win32Provider struct { + *__Provider + + // + ClientLoadableCLSID string + + // + CLSID string + + // + Concurrency int32 + + // + DefaultMachineName string + + // + Enabled bool + + // + HostingModel string + + // + ImpersonationLevel Win32Provider_ImpersonationLevel + + // + InitializationReentrancy Win32Provider_InitializationReentrancy + + // + InitializationTimeoutInterval string + + // + InitializeAsAdminFirst bool + + // + OperationTimeoutInterval string + + // + PerLocaleInitialization bool + + // + PerUserInitialization bool + + // + Pure bool + + // + SecurityDescriptor string + + // + SupportsExplicitShutdown bool + + // + SupportsExtendedStatus bool + + // + SupportsQuotas bool + + // + SupportsSendStatus bool + + // + SupportsShutdown bool + + // + SupportsThrottling bool + + // + UnloadTimeout string + + // + Version uint32 +} + +func New__Win32ProviderEx1(instance *cim.WmiInstance) (newInstance *__Win32Provider, err error) { + tmp, err := New__ProviderEx1(instance) + + if err != nil { + return + } + newInstance = &__Win32Provider{ + __Provider: tmp, + } + return +} + +func New__Win32ProviderEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__Win32Provider, err error) { + tmp, err := New__ProviderEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__Win32Provider{ + __Provider: tmp, + } + return +} + +// SetClientLoadableCLSID sets the value of ClientLoadableCLSID for the instance +func (instance *__Win32Provider) SetPropertyClientLoadableCLSID(value string) (err error) { + return instance.SetProperty("ClientLoadableCLSID", (value)) +} + +// GetClientLoadableCLSID gets the value of ClientLoadableCLSID for the instance +func (instance *__Win32Provider) GetPropertyClientLoadableCLSID() (value string, err error) { + retValue, err := instance.GetProperty("ClientLoadableCLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetCLSID sets the value of CLSID for the instance +func (instance *__Win32Provider) SetPropertyCLSID(value string) (err error) { + return instance.SetProperty("CLSID", (value)) +} + +// GetCLSID gets the value of CLSID for the instance +func (instance *__Win32Provider) GetPropertyCLSID() (value string, err error) { + retValue, err := instance.GetProperty("CLSID") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetConcurrency sets the value of Concurrency for the instance +func (instance *__Win32Provider) SetPropertyConcurrency(value int32) (err error) { + return instance.SetProperty("Concurrency", (value)) +} + +// GetConcurrency gets the value of Concurrency for the instance +func (instance *__Win32Provider) GetPropertyConcurrency() (value int32, err error) { + retValue, err := instance.GetProperty("Concurrency") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = int32(valuetmp) + + return +} + +// SetDefaultMachineName sets the value of DefaultMachineName for the instance +func (instance *__Win32Provider) SetPropertyDefaultMachineName(value string) (err error) { + return instance.SetProperty("DefaultMachineName", (value)) +} + +// GetDefaultMachineName gets the value of DefaultMachineName for the instance +func (instance *__Win32Provider) GetPropertyDefaultMachineName() (value string, err error) { + retValue, err := instance.GetProperty("DefaultMachineName") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetEnabled sets the value of Enabled for the instance +func (instance *__Win32Provider) SetPropertyEnabled(value bool) (err error) { + return instance.SetProperty("Enabled", (value)) +} + +// GetEnabled gets the value of Enabled for the instance +func (instance *__Win32Provider) GetPropertyEnabled() (value bool, err error) { + retValue, err := instance.GetProperty("Enabled") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetHostingModel sets the value of HostingModel for the instance +func (instance *__Win32Provider) SetPropertyHostingModel(value string) (err error) { + return instance.SetProperty("HostingModel", (value)) +} + +// GetHostingModel gets the value of HostingModel for the instance +func (instance *__Win32Provider) GetPropertyHostingModel() (value string, err error) { + retValue, err := instance.GetProperty("HostingModel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetImpersonationLevel sets the value of ImpersonationLevel for the instance +func (instance *__Win32Provider) SetPropertyImpersonationLevel(value Win32Provider_ImpersonationLevel) (err error) { + return instance.SetProperty("ImpersonationLevel", (value)) +} + +// GetImpersonationLevel gets the value of ImpersonationLevel for the instance +func (instance *__Win32Provider) GetPropertyImpersonationLevel() (value Win32Provider_ImpersonationLevel, err error) { + retValue, err := instance.GetProperty("ImpersonationLevel") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32Provider_ImpersonationLevel(valuetmp) + + return +} + +// SetInitializationReentrancy sets the value of InitializationReentrancy for the instance +func (instance *__Win32Provider) SetPropertyInitializationReentrancy(value Win32Provider_InitializationReentrancy) (err error) { + return instance.SetProperty("InitializationReentrancy", (value)) +} + +// GetInitializationReentrancy gets the value of InitializationReentrancy for the instance +func (instance *__Win32Provider) GetPropertyInitializationReentrancy() (value Win32Provider_InitializationReentrancy, err error) { + retValue, err := instance.GetProperty("InitializationReentrancy") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(int32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " int32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = Win32Provider_InitializationReentrancy(valuetmp) + + return +} + +// SetInitializationTimeoutInterval sets the value of InitializationTimeoutInterval for the instance +func (instance *__Win32Provider) SetPropertyInitializationTimeoutInterval(value string) (err error) { + return instance.SetProperty("InitializationTimeoutInterval", (value)) +} + +// GetInitializationTimeoutInterval gets the value of InitializationTimeoutInterval for the instance +func (instance *__Win32Provider) GetPropertyInitializationTimeoutInterval() (value string, err error) { + retValue, err := instance.GetProperty("InitializationTimeoutInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetInitializeAsAdminFirst sets the value of InitializeAsAdminFirst for the instance +func (instance *__Win32Provider) SetPropertyInitializeAsAdminFirst(value bool) (err error) { + return instance.SetProperty("InitializeAsAdminFirst", (value)) +} + +// GetInitializeAsAdminFirst gets the value of InitializeAsAdminFirst for the instance +func (instance *__Win32Provider) GetPropertyInitializeAsAdminFirst() (value bool, err error) { + retValue, err := instance.GetProperty("InitializeAsAdminFirst") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetOperationTimeoutInterval sets the value of OperationTimeoutInterval for the instance +func (instance *__Win32Provider) SetPropertyOperationTimeoutInterval(value string) (err error) { + return instance.SetProperty("OperationTimeoutInterval", (value)) +} + +// GetOperationTimeoutInterval gets the value of OperationTimeoutInterval for the instance +func (instance *__Win32Provider) GetPropertyOperationTimeoutInterval() (value string, err error) { + retValue, err := instance.GetProperty("OperationTimeoutInterval") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetPerLocaleInitialization sets the value of PerLocaleInitialization for the instance +func (instance *__Win32Provider) SetPropertyPerLocaleInitialization(value bool) (err error) { + return instance.SetProperty("PerLocaleInitialization", (value)) +} + +// GetPerLocaleInitialization gets the value of PerLocaleInitialization for the instance +func (instance *__Win32Provider) GetPropertyPerLocaleInitialization() (value bool, err error) { + retValue, err := instance.GetProperty("PerLocaleInitialization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPerUserInitialization sets the value of PerUserInitialization for the instance +func (instance *__Win32Provider) SetPropertyPerUserInitialization(value bool) (err error) { + return instance.SetProperty("PerUserInitialization", (value)) +} + +// GetPerUserInitialization gets the value of PerUserInitialization for the instance +func (instance *__Win32Provider) GetPropertyPerUserInitialization() (value bool, err error) { + retValue, err := instance.GetProperty("PerUserInitialization") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetPure sets the value of Pure for the instance +func (instance *__Win32Provider) SetPropertyPure(value bool) (err error) { + return instance.SetProperty("Pure", (value)) +} + +// GetPure gets the value of Pure for the instance +func (instance *__Win32Provider) GetPropertyPure() (value bool, err error) { + retValue, err := instance.GetProperty("Pure") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSecurityDescriptor sets the value of SecurityDescriptor for the instance +func (instance *__Win32Provider) SetPropertySecurityDescriptor(value string) (err error) { + return instance.SetProperty("SecurityDescriptor", (value)) +} + +// GetSecurityDescriptor gets the value of SecurityDescriptor for the instance +func (instance *__Win32Provider) GetPropertySecurityDescriptor() (value string, err error) { + retValue, err := instance.GetProperty("SecurityDescriptor") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetSupportsExplicitShutdown sets the value of SupportsExplicitShutdown for the instance +func (instance *__Win32Provider) SetPropertySupportsExplicitShutdown(value bool) (err error) { + return instance.SetProperty("SupportsExplicitShutdown", (value)) +} + +// GetSupportsExplicitShutdown gets the value of SupportsExplicitShutdown for the instance +func (instance *__Win32Provider) GetPropertySupportsExplicitShutdown() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsExplicitShutdown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsExtendedStatus sets the value of SupportsExtendedStatus for the instance +func (instance *__Win32Provider) SetPropertySupportsExtendedStatus(value bool) (err error) { + return instance.SetProperty("SupportsExtendedStatus", (value)) +} + +// GetSupportsExtendedStatus gets the value of SupportsExtendedStatus for the instance +func (instance *__Win32Provider) GetPropertySupportsExtendedStatus() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsExtendedStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsQuotas sets the value of SupportsQuotas for the instance +func (instance *__Win32Provider) SetPropertySupportsQuotas(value bool) (err error) { + return instance.SetProperty("SupportsQuotas", (value)) +} + +// GetSupportsQuotas gets the value of SupportsQuotas for the instance +func (instance *__Win32Provider) GetPropertySupportsQuotas() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsQuotas") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsSendStatus sets the value of SupportsSendStatus for the instance +func (instance *__Win32Provider) SetPropertySupportsSendStatus(value bool) (err error) { + return instance.SetProperty("SupportsSendStatus", (value)) +} + +// GetSupportsSendStatus gets the value of SupportsSendStatus for the instance +func (instance *__Win32Provider) GetPropertySupportsSendStatus() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsSendStatus") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsShutdown sets the value of SupportsShutdown for the instance +func (instance *__Win32Provider) SetPropertySupportsShutdown(value bool) (err error) { + return instance.SetProperty("SupportsShutdown", (value)) +} + +// GetSupportsShutdown gets the value of SupportsShutdown for the instance +func (instance *__Win32Provider) GetPropertySupportsShutdown() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsShutdown") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetSupportsThrottling sets the value of SupportsThrottling for the instance +func (instance *__Win32Provider) SetPropertySupportsThrottling(value bool) (err error) { + return instance.SetProperty("SupportsThrottling", (value)) +} + +// GetSupportsThrottling gets the value of SupportsThrottling for the instance +func (instance *__Win32Provider) GetPropertySupportsThrottling() (value bool, err error) { + retValue, err := instance.GetProperty("SupportsThrottling") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(bool) + if !ok { + err = errors.Wrapf(errors.InvalidType, " bool is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = bool(valuetmp) + + return +} + +// SetUnloadTimeout sets the value of UnloadTimeout for the instance +func (instance *__Win32Provider) SetPropertyUnloadTimeout(value string) (err error) { + return instance.SetProperty("UnloadTimeout", (value)) +} + +// GetUnloadTimeout gets the value of UnloadTimeout for the instance +func (instance *__Win32Provider) GetPropertyUnloadTimeout() (value string, err error) { + retValue, err := instance.GetProperty("UnloadTimeout") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(string) + if !ok { + err = errors.Wrapf(errors.InvalidType, " string is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = string(valuetmp) + + return +} + +// SetVersion sets the value of Version for the instance +func (instance *__Win32Provider) SetPropertyVersion(value uint32) (err error) { + return instance.SetProperty("Version", (value)) +} + +// GetVersion gets the value of Version for the instance +func (instance *__Win32Provider) GetPropertyVersion() (value uint32, err error) { + retValue, err := instance.GetProperty("Version") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + valuetmp, ok := retValue.(uint32) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint32 is Invalid. Expected %s", reflect.TypeOf(retValue)) + return + } + + value = uint32(valuetmp) + + return +} diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_ImpersonationLevel.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_ImpersonationLevel.go new file mode 100644 index 00000000..9ba78c00 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_ImpersonationLevel.go @@ -0,0 +1,17 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Win32Provider_ImpersonationLevel +////////////////////////////////////////////// +package storage + +// Win32Provider_ImpersonationLevel +type Win32Provider_ImpersonationLevel int + +const ( + // None enum + Win32Provider_ImpersonationLevel_None Win32Provider_ImpersonationLevel = 0 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_InitializationReentrancy.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_InitializationReentrancy.go new file mode 100644 index 00000000..a480eb22 --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/Win32Provider_InitializationReentrancy.go @@ -0,0 +1,21 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source Win32Provider_InitializationReentrancy +////////////////////////////////////////////// +package storage + +// Win32Provider_InitializationReentrancy +type Win32Provider_InitializationReentrancy int + +const ( + // CLSID enum + Win32Provider_InitializationReentrancy_CLSID Win32Provider_InitializationReentrancy = 0 + // Namespace enum + Win32Provider_InitializationReentrancy_Namespace Win32Provider_InitializationReentrancy = 1 + // COM_Object enum + Win32Provider_InitializationReentrancy_COM_Object Win32Provider_InitializationReentrancy = 2 +) diff --git a/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/thisNAMESPACE.go b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/thisNAMESPACE.go new file mode 100644 index 00000000..62e850af --- /dev/null +++ b/vendor/github.com/Microsoft/wmi/server2019/root/microsoft/windows/storage/thisNAMESPACE.go @@ -0,0 +1,81 @@ +// Copyright 2019 (c) Microsoft Corporation. +// Licensed under the MIT license. + +// +// Author: +// Auto Generated on 9/18/2020 using wmigen +// Source root.Microsoft.Windows.Storage +////////////////////////////////////////////// +package storage + +import ( + "github.com/microsoft/wmi/pkg/base/query" + "github.com/microsoft/wmi/pkg/errors" + cim "github.com/microsoft/wmi/pkg/wmiinstance" + "reflect" +) + +// __thisNAMESPACE struct +type __thisNAMESPACE struct { + *__SystemClass + + // + SECURITY_DESCRIPTOR []uint8 +} + +func New__thisNAMESPACEEx1(instance *cim.WmiInstance) (newInstance *__thisNAMESPACE, err error) { + tmp, err := New__SystemClassEx1(instance) + + if err != nil { + return + } + newInstance = &__thisNAMESPACE{ + __SystemClass: tmp, + } + return +} + +func New__thisNAMESPACEEx6(hostName string, + wmiNamespace string, + userName string, + password string, + domainName string, + query *query.WmiQuery) (newInstance *__thisNAMESPACE, err error) { + tmp, err := New__SystemClassEx6(hostName, wmiNamespace, userName, password, domainName, query) + + if err != nil { + return + } + newInstance = &__thisNAMESPACE{ + __SystemClass: tmp, + } + return +} + +// SetSECURITY_DESCRIPTOR sets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__thisNAMESPACE) SetPropertySECURITY_DESCRIPTOR(value []uint8) (err error) { + return instance.SetProperty("SECURITY_DESCRIPTOR", (value)) +} + +// GetSECURITY_DESCRIPTOR gets the value of SECURITY_DESCRIPTOR for the instance +func (instance *__thisNAMESPACE) GetPropertySECURITY_DESCRIPTOR() (value []uint8, err error) { + retValue, err := instance.GetProperty("SECURITY_DESCRIPTOR") + if err != nil { + return + } + if retValue == nil { + // Doesn't have any value. Return empty + return + } + + for _, interfaceValue := range retValue.([]interface{}) { + valuetmp, ok := interfaceValue.(uint8) + if !ok { + err = errors.Wrapf(errors.InvalidType, " uint8 is Invalid. Expected %s", reflect.TypeOf(interfaceValue)) + return + } + value = append(value, uint8(valuetmp)) + } + + return +} diff --git a/vendor/github.com/go-ole/go-ole/.travis.yml b/vendor/github.com/go-ole/go-ole/.travis.yml new file mode 100644 index 00000000..28f740cd --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/.travis.yml @@ -0,0 +1,8 @@ +language: go +sudo: false + +go: + - 1.9.x + - 1.10.x + - 1.11.x + - tip diff --git a/vendor/github.com/go-ole/go-ole/ChangeLog.md b/vendor/github.com/go-ole/go-ole/ChangeLog.md new file mode 100644 index 00000000..4ba6a8c6 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/ChangeLog.md @@ -0,0 +1,49 @@ +# Version 1.x.x + +* **Add more test cases and reference new test COM server project.** (Placeholder for future additions) + +# Version 1.2.0-alphaX + +**Minimum supported version is now Go 1.4. Go 1.1 support is deprecated, but should still build.** + + * Added CI configuration for Travis-CI and AppVeyor. + * Added test InterfaceID and ClassID for the COM Test Server project. + * Added more inline documentation (#83). + * Added IEnumVARIANT implementation (#88). + * Added IEnumVARIANT test cases (#99, #100, #101). + * Added support for retrieving `time.Time` from VARIANT (#92). + * Added test case for IUnknown (#64). + * Added test case for IDispatch (#64). + * Added test cases for scalar variants (#64, #76). + +# Version 1.1.1 + + * Fixes for Linux build. + * Fixes for Windows build. + +# Version 1.1.0 + +The change to provide building on all platforms is a new feature. The increase in minor version reflects that and allows those who wish to stay on 1.0.x to continue to do so. Support for 1.0.x will be limited to bug fixes. + + * Move GUID out of variables.go into its own file to make new documentation available. + * Move OleError out of ole.go into its own file to make new documentation available. + * Add documentation to utility functions. + * Add documentation to variant receiver functions. + * Add documentation to ole structures. + * Make variant available to other systems outside of Windows. + * Make OLE structures available to other systems outside of Windows. + +## New Features + + * Library should now be built on all platforms supported by Go. Library will NOOP on any platform that is not Windows. + * More functions are now documented and available on godoc.org. + +# Version 1.0.1 + + 1. Fix package references from repository location change. + +# Version 1.0.0 + +This version is stable enough for use. The COM API is still incomplete, but provides enough functionality for accessing COM servers using IDispatch interface. + +There is no changelog for this version. Check commits for history. diff --git a/vendor/github.com/go-ole/go-ole/LICENSE b/vendor/github.com/go-ole/go-ole/LICENSE new file mode 100644 index 00000000..623ec06f --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright © 2013-2017 Yasuhiro Matsumoto, + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/go-ole/go-ole/README.md b/vendor/github.com/go-ole/go-ole/README.md new file mode 100644 index 00000000..7b577558 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/README.md @@ -0,0 +1,46 @@ +# Go OLE + +[![Build status](https://ci.appveyor.com/api/projects/status/qr0u2sf7q43us9fj?svg=true)](https://ci.appveyor.com/project/jacobsantos/go-ole-jgs28) +[![Build Status](https://travis-ci.org/go-ole/go-ole.svg?branch=master)](https://travis-ci.org/go-ole/go-ole) +[![GoDoc](https://godoc.org/github.com/go-ole/go-ole?status.svg)](https://godoc.org/github.com/go-ole/go-ole) + +Go bindings for Windows COM using shared libraries instead of cgo. + +By Yasuhiro Matsumoto. + +## Install + +To experiment with go-ole, you can just compile and run the example program: + +``` +go get github.com/go-ole/go-ole +cd /path/to/go-ole/ +go test + +cd /path/to/go-ole/example/excel +go run excel.go +``` + +## Continuous Integration + +Continuous integration configuration has been added for both Travis-CI and AppVeyor. You will have to add these to your own account for your fork in order for it to run. + +**Travis-CI** + +Travis-CI was added to check builds on Linux to ensure that `go get` works when cross building. Currently, Travis-CI is not used to test cross-building, but this may be changed in the future. It is also not currently possible to test the library on Linux, since COM API is specific to Windows and it is not currently possible to run a COM server on Linux or even connect to a remote COM server. + +**AppVeyor** + +AppVeyor is used to build on Windows using the (in-development) test COM server. It is currently only used to test the build and ensure that the code works on Windows. It will be used to register a COM server and then run the test cases based on the test COM server. + +The tests currently do run and do pass and this should be maintained with commits. + +## Versioning + +Go OLE uses [semantic versioning](http://semver.org) for version numbers, which is similar to the version contract of the Go language. Which means that the major version will always maintain backwards compatibility with minor versions. Minor versions will only add new additions and changes. Fixes will always be in patch. + +This contract should allow you to upgrade to new minor and patch versions without breakage or modifications to your existing code. Leave a ticket, if there is breakage, so that it could be fixed. + +## LICENSE + +Under the MIT License: http://mattn.mit-license.org/2013 diff --git a/vendor/github.com/go-ole/go-ole/SECURITY.md b/vendor/github.com/go-ole/go-ole/SECURITY.md new file mode 100644 index 00000000..dac28152 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +Security updates are applied only to the latest release. + +## Reporting a Vulnerability + +If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. + +Please disclose it at [security advisory](https://github.com/go-ole/go-ole/security/advisories/new). + +This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure. diff --git a/vendor/github.com/go-ole/go-ole/appveyor.yml b/vendor/github.com/go-ole/go-ole/appveyor.yml new file mode 100644 index 00000000..8df7fa26 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/appveyor.yml @@ -0,0 +1,68 @@ +# Notes: +# - Minimal appveyor.yml file is an empty file. All sections are optional. +# - Indent each level of configuration with 2 spaces. Do not use tabs! +# - All section names are case-sensitive. +# - Section names should be unique on each level. + +version: "1.3.0.{build}-alpha-{branch}" + +os: Visual Studio 2019 + +build: off + +skip_tags: true + +clone_folder: c:\gopath\src\github.com\go-ole\go-ole + +environment: + GOPATH: c:\gopath + GOROOT: c:\go + DOWNLOADPLATFORM: "x64" + +before_test: + # - Download COM Server + - ps: Start-FileDownload "https://github.com/go-ole/test-com-server/releases/download/v1.0.2/test-com-server-${env:DOWNLOADPLATFORM}.zip" + - 7z e test-com-server-%DOWNLOADPLATFORM%.zip -oc:\gopath\src\github.com\go-ole\go-ole > NUL + - c:\gopath\src\github.com\go-ole\go-ole\build\register-assembly.bat + +test_script: + - go test -v -cover ./... + # go vet has false positives on unsafe.Pointer with windows/sys. Disabling since it is recommended to use go test instead. + # - go vet ./... + +branches: + only: + - master + - v1.2 + - v1.1 + - v1.0 + +matrix: + allow_failures: + - environment: + GOROOT: C:\go-x86 + DOWNLOADPLATFORM: "x86" + - environment: + GOROOT: C:\go118 + DOWNLOADPLATFORM: "x64" + - environment: + GOROOT: C:\go118-x86 + DOWNLOADPLATFORM: "x86" + +install: + - go version + - go env + - go get -u golang.org/x/tools/cmd/cover + - go get -u golang.org/x/tools/cmd/godoc + - go get -u golang.org/x/tools/cmd/stringer + +build_script: + - cd c:\gopath\src\github.com\go-ole\go-ole + - go get -v -t ./... + - go build + +# disable automatic tests +test: on + +# disable deployment +deploy: off diff --git a/vendor/github.com/go-ole/go-ole/com.go b/vendor/github.com/go-ole/go-ole/com.go new file mode 100644 index 00000000..cabbac01 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/com.go @@ -0,0 +1,386 @@ +// +build windows + +package ole + +import ( + "syscall" + "unicode/utf16" + "unsafe" +) + +var ( + procCoInitialize = modole32.NewProc("CoInitialize") + procCoInitializeEx = modole32.NewProc("CoInitializeEx") + procCoInitializeSecurity = modole32.NewProc("CoInitializeSecurity") + procCoUninitialize = modole32.NewProc("CoUninitialize") + procCoCreateInstance = modole32.NewProc("CoCreateInstance") + procCoTaskMemFree = modole32.NewProc("CoTaskMemFree") + procCLSIDFromProgID = modole32.NewProc("CLSIDFromProgID") + procCLSIDFromString = modole32.NewProc("CLSIDFromString") + procStringFromCLSID = modole32.NewProc("StringFromCLSID") + procStringFromIID = modole32.NewProc("StringFromIID") + procIIDFromString = modole32.NewProc("IIDFromString") + procCoGetObject = modole32.NewProc("CoGetObject") + procGetUserDefaultLCID = modkernel32.NewProc("GetUserDefaultLCID") + procCopyMemory = modkernel32.NewProc("RtlMoveMemory") + procVariantInit = modoleaut32.NewProc("VariantInit") + procVariantClear = modoleaut32.NewProc("VariantClear") + procVariantTimeToSystemTime = modoleaut32.NewProc("VariantTimeToSystemTime") + procSysAllocString = modoleaut32.NewProc("SysAllocString") + procSysAllocStringLen = modoleaut32.NewProc("SysAllocStringLen") + procSysFreeString = modoleaut32.NewProc("SysFreeString") + procSysStringLen = modoleaut32.NewProc("SysStringLen") + procCreateDispTypeInfo = modoleaut32.NewProc("CreateDispTypeInfo") + procCreateStdDispatch = modoleaut32.NewProc("CreateStdDispatch") + procGetActiveObject = modoleaut32.NewProc("GetActiveObject") + + procGetMessageW = moduser32.NewProc("GetMessageW") + procDispatchMessageW = moduser32.NewProc("DispatchMessageW") +) + +// This is to enable calling COM Security initialization multiple times +var bSecurityInit bool = false + +// coInitialize initializes COM library on current thread. +// +// MSDN documentation suggests that this function should not be called. Call +// CoInitializeEx() instead. The reason has to do with threading and this +// function is only for single-threaded apartments. +// +// That said, most users of the library have gotten away with just this +// function. If you are experiencing threading issues, then use +// CoInitializeEx(). +func coInitialize() (err error) { + // http://msdn.microsoft.com/en-us/library/windows/desktop/ms678543(v=vs.85).aspx + // Suggests that no value should be passed to CoInitialized. + // Could just be Call() since the parameter is optional. <-- Needs testing to be sure. + hr, _, _ := procCoInitialize.Call(uintptr(0)) + if hr != 0 { + err = NewError(hr) + } + return +} + +// coInitializeEx initializes COM library with concurrency model. +func coInitializeEx(coinit uint32) (err error) { + // http://msdn.microsoft.com/en-us/library/windows/desktop/ms695279(v=vs.85).aspx + // Suggests that the first parameter is not only optional but should always be NULL. + hr, _, _ := procCoInitializeEx.Call(uintptr(0), uintptr(coinit)) + if hr != 0 { + err = NewError(hr) + } + return +} + +// coInitializeSecurity: Registers security and sets the default security values +// for the process. +func coInitializeSecurity(cAuthSvc int32, + dwAuthnLevel uint32, + dwImpLevel uint32, + dwCapabilities uint32) (err error) { + // Check COM Security initialization has done previously + if !bSecurityInit { + // https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-coinitializesecurity + hr, _, _ := procCoInitializeSecurity.Call( + uintptr(0), // Allow *all* VSS writers to communicate back! + uintptr(cAuthSvc), // Default COM authentication service + uintptr(0), // Default COM authorization service + uintptr(0), // Reserved parameter + uintptr(dwAuthnLevel), // Strongest COM authentication level + uintptr(dwImpLevel), // Minimal impersonation abilities + uintptr(0), // Default COM authentication settings + uintptr(dwCapabilities), // Cloaking + uintptr(0)) // eserved parameter + if hr != 0 { + err = NewError(hr) + } else { + // COM Security initialization done make global flag true. + bSecurityInit = true + } + } + return +} + +// CoInitialize initializes COM library on current thread. +// +// MSDN documentation suggests that this function should not be called. Call +// CoInitializeEx() instead. The reason has to do with threading and this +// function is only for single-threaded apartments. +// +// That said, most users of the library have gotten away with just this +// function. If you are experiencing threading issues, then use +// CoInitializeEx(). +func CoInitialize(p uintptr) (err error) { + // p is ignored and won't be used. + // Avoid any variable not used errors. + p = uintptr(0) + return coInitialize() +} + +// CoInitializeEx initializes COM library with concurrency model. +func CoInitializeEx(p uintptr, coinit uint32) (err error) { + // Avoid any variable not used errors. + p = uintptr(0) + return coInitializeEx(coinit) +} + +// CoUninitialize uninitializes COM Library. +func CoUninitialize() { + procCoUninitialize.Call() +} + +// CoInitializeSecurity: Registers security and sets the default security values +// for the process. +func CoInitializeSecurity(cAuthSvc int32, + dwAuthnLevel uint32, + dwImpLevel uint32, + dwCapabilities uint32) (err error) { + return coInitializeSecurity(cAuthSvc, dwAuthnLevel, dwImpLevel, dwCapabilities) +} + +// CoTaskMemFree frees memory pointer. +func CoTaskMemFree(memptr uintptr) { + procCoTaskMemFree.Call(memptr) +} + +// CLSIDFromProgID retrieves Class Identifier with the given Program Identifier. +// +// The Programmatic Identifier must be registered, because it will be looked up +// in the Windows Registry. The registry entry has the following keys: CLSID, +// Insertable, Protocol and Shell +// (https://msdn.microsoft.com/en-us/library/dd542719(v=vs.85).aspx). +// +// programID identifies the class id with less precision and is not guaranteed +// to be unique. These are usually found in the registry under +// HKEY_LOCAL_MACHINE\SOFTWARE\Classes, usually with the format of +// "Program.Component.Version" with version being optional. +// +// CLSIDFromProgID in Windows API. +func CLSIDFromProgID(progId string) (clsid *GUID, err error) { + var guid GUID + lpszProgID := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(progId))) + hr, _, _ := procCLSIDFromProgID.Call(lpszProgID, uintptr(unsafe.Pointer(&guid))) + if hr != 0 { + err = NewError(hr) + } + clsid = &guid + return +} + +// CLSIDFromString retrieves Class ID from string representation. +// +// This is technically the string version of the GUID and will convert the +// string to object. +// +// CLSIDFromString in Windows API. +func CLSIDFromString(str string) (clsid *GUID, err error) { + var guid GUID + lpsz := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(str))) + hr, _, _ := procCLSIDFromString.Call(lpsz, uintptr(unsafe.Pointer(&guid))) + if hr != 0 { + err = NewError(hr) + } + clsid = &guid + return +} + +// StringFromCLSID returns GUID formated string from GUID object. +func StringFromCLSID(clsid *GUID) (str string, err error) { + var p *uint16 + hr, _, _ := procStringFromCLSID.Call(uintptr(unsafe.Pointer(clsid)), uintptr(unsafe.Pointer(&p))) + if hr != 0 { + err = NewError(hr) + } + str = LpOleStrToString(p) + return +} + +// IIDFromString returns GUID from program ID. +func IIDFromString(progId string) (clsid *GUID, err error) { + var guid GUID + lpsz := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(progId))) + hr, _, _ := procIIDFromString.Call(lpsz, uintptr(unsafe.Pointer(&guid))) + if hr != 0 { + err = NewError(hr) + } + clsid = &guid + return +} + +// StringFromIID returns GUID formatted string from GUID object. +func StringFromIID(iid *GUID) (str string, err error) { + var p *uint16 + hr, _, _ := procStringFromIID.Call(uintptr(unsafe.Pointer(iid)), uintptr(unsafe.Pointer(&p))) + if hr != 0 { + err = NewError(hr) + } + str = LpOleStrToString(p) + return +} + +// CreateInstance of single uninitialized object with GUID. +func CreateInstance(clsid *GUID, iid *GUID) (unk *IUnknown, err error) { + if iid == nil { + iid = IID_IUnknown + } + hr, _, _ := procCoCreateInstance.Call( + uintptr(unsafe.Pointer(clsid)), + 0, + CLSCTX_SERVER, + uintptr(unsafe.Pointer(iid)), + uintptr(unsafe.Pointer(&unk))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// GetActiveObject retrieves pointer to active object. +func GetActiveObject(clsid *GUID, iid *GUID) (unk *IUnknown, err error) { + if iid == nil { + iid = IID_IUnknown + } + hr, _, _ := procGetActiveObject.Call( + uintptr(unsafe.Pointer(clsid)), + uintptr(unsafe.Pointer(iid)), + uintptr(unsafe.Pointer(&unk))) + if hr != 0 { + err = NewError(hr) + } + return +} + +type BindOpts struct { + CbStruct uint32 + GrfFlags uint32 + GrfMode uint32 + TickCountDeadline uint32 +} + +// GetObject retrieves pointer to active object. +func GetObject(programID string, bindOpts *BindOpts, iid *GUID) (unk *IUnknown, err error) { + if bindOpts != nil { + bindOpts.CbStruct = uint32(unsafe.Sizeof(BindOpts{})) + } + if iid == nil { + iid = IID_IUnknown + } + hr, _, _ := procCoGetObject.Call( + uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(programID))), + uintptr(unsafe.Pointer(bindOpts)), + uintptr(unsafe.Pointer(iid)), + uintptr(unsafe.Pointer(&unk))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// VariantInit initializes variant. +func VariantInit(v *VARIANT) (err error) { + hr, _, _ := procVariantInit.Call(uintptr(unsafe.Pointer(v))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// VariantClear clears value in Variant settings to VT_EMPTY. +func VariantClear(v *VARIANT) (err error) { + hr, _, _ := procVariantClear.Call(uintptr(unsafe.Pointer(v))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// SysAllocString allocates memory for string and copies string into memory. +func SysAllocString(v string) (ss *int16) { + pss, _, _ := procSysAllocString.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(v)))) + ss = (*int16)(unsafe.Pointer(pss)) + return +} + +// SysAllocStringLen copies up to length of given string returning pointer. +func SysAllocStringLen(v string) (ss *int16) { + utf16 := utf16.Encode([]rune(v + "\x00")) + ptr := &utf16[0] + + pss, _, _ := procSysAllocStringLen.Call(uintptr(unsafe.Pointer(ptr)), uintptr(len(utf16)-1)) + ss = (*int16)(unsafe.Pointer(pss)) + return +} + +// SysFreeString frees string system memory. This must be called with SysAllocString. +func SysFreeString(v *int16) (err error) { + hr, _, _ := procSysFreeString.Call(uintptr(unsafe.Pointer(v))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// SysStringLen is the length of the system allocated string. +func SysStringLen(v *int16) uint32 { + l, _, _ := procSysStringLen.Call(uintptr(unsafe.Pointer(v))) + return uint32(l) +} + +// CreateStdDispatch provides default IDispatch implementation for IUnknown. +// +// This handles default IDispatch implementation for objects. It haves a few +// limitations with only supporting one language. It will also only return +// default exception codes. +func CreateStdDispatch(unk *IUnknown, v uintptr, ptinfo *IUnknown) (disp *IDispatch, err error) { + hr, _, _ := procCreateStdDispatch.Call( + uintptr(unsafe.Pointer(unk)), + v, + uintptr(unsafe.Pointer(ptinfo)), + uintptr(unsafe.Pointer(&disp))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// CreateDispTypeInfo provides default ITypeInfo implementation for IDispatch. +// +// This will not handle the full implementation of the interface. +func CreateDispTypeInfo(idata *INTERFACEDATA) (pptinfo *IUnknown, err error) { + hr, _, _ := procCreateDispTypeInfo.Call( + uintptr(unsafe.Pointer(idata)), + uintptr(GetUserDefaultLCID()), + uintptr(unsafe.Pointer(&pptinfo))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// copyMemory moves location of a block of memory. +func copyMemory(dest unsafe.Pointer, src unsafe.Pointer, length uint32) { + procCopyMemory.Call(uintptr(dest), uintptr(src), uintptr(length)) +} + +// GetUserDefaultLCID retrieves current user default locale. +func GetUserDefaultLCID() (lcid uint32) { + ret, _, _ := procGetUserDefaultLCID.Call() + lcid = uint32(ret) + return +} + +// GetMessage in message queue from runtime. +// +// This function appears to block. PeekMessage does not block. +func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32) (ret int32, err error) { + r0, _, err := procGetMessageW.Call(uintptr(unsafe.Pointer(msg)), uintptr(hwnd), uintptr(MsgFilterMin), uintptr(MsgFilterMax)) + ret = int32(r0) + return +} + +// DispatchMessage to window procedure. +func DispatchMessage(msg *Msg) (ret int32) { + r0, _, _ := procDispatchMessageW.Call(uintptr(unsafe.Pointer(msg))) + ret = int32(r0) + return +} diff --git a/vendor/github.com/go-ole/go-ole/com_func.go b/vendor/github.com/go-ole/go-ole/com_func.go new file mode 100644 index 00000000..cef539d9 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/com_func.go @@ -0,0 +1,174 @@ +// +build !windows + +package ole + +import ( + "time" + "unsafe" +) + +// coInitialize initializes COM library on current thread. +// +// MSDN documentation suggests that this function should not be called. Call +// CoInitializeEx() instead. The reason has to do with threading and this +// function is only for single-threaded apartments. +// +// That said, most users of the library have gotten away with just this +// function. If you are experiencing threading issues, then use +// CoInitializeEx(). +func coInitialize() error { + return NewError(E_NOTIMPL) +} + +// coInitializeEx initializes COM library with concurrency model. +func coInitializeEx(coinit uint32) error { + return NewError(E_NOTIMPL) +} + +// CoInitialize initializes COM library on current thread. +// +// MSDN documentation suggests that this function should not be called. Call +// CoInitializeEx() instead. The reason has to do with threading and this +// function is only for single-threaded apartments. +// +// That said, most users of the library have gotten away with just this +// function. If you are experiencing threading issues, then use +// CoInitializeEx(). +func CoInitialize(p uintptr) error { + return NewError(E_NOTIMPL) +} + +// CoInitializeEx initializes COM library with concurrency model. +func CoInitializeEx(p uintptr, coinit uint32) error { + return NewError(E_NOTIMPL) +} + +// CoUninitialize uninitializes COM Library. +func CoUninitialize() {} + +// CoTaskMemFree frees memory pointer. +func CoTaskMemFree(memptr uintptr) {} + +// CLSIDFromProgID retrieves Class Identifier with the given Program Identifier. +// +// The Programmatic Identifier must be registered, because it will be looked up +// in the Windows Registry. The registry entry has the following keys: CLSID, +// Insertable, Protocol and Shell +// (https://msdn.microsoft.com/en-us/library/dd542719(v=vs.85).aspx). +// +// programID identifies the class id with less precision and is not guaranteed +// to be unique. These are usually found in the registry under +// HKEY_LOCAL_MACHINE\SOFTWARE\Classes, usually with the format of +// "Program.Component.Version" with version being optional. +// +// CLSIDFromProgID in Windows API. +func CLSIDFromProgID(progId string) (*GUID, error) { + return nil, NewError(E_NOTIMPL) +} + +// CLSIDFromString retrieves Class ID from string representation. +// +// This is technically the string version of the GUID and will convert the +// string to object. +// +// CLSIDFromString in Windows API. +func CLSIDFromString(str string) (*GUID, error) { + return nil, NewError(E_NOTIMPL) +} + +// StringFromCLSID returns GUID formated string from GUID object. +func StringFromCLSID(clsid *GUID) (string, error) { + return "", NewError(E_NOTIMPL) +} + +// IIDFromString returns GUID from program ID. +func IIDFromString(progId string) (*GUID, error) { + return nil, NewError(E_NOTIMPL) +} + +// StringFromIID returns GUID formatted string from GUID object. +func StringFromIID(iid *GUID) (string, error) { + return "", NewError(E_NOTIMPL) +} + +// CreateInstance of single uninitialized object with GUID. +func CreateInstance(clsid *GUID, iid *GUID) (*IUnknown, error) { + return nil, NewError(E_NOTIMPL) +} + +// GetActiveObject retrieves pointer to active object. +func GetActiveObject(clsid *GUID, iid *GUID) (*IUnknown, error) { + return nil, NewError(E_NOTIMPL) +} + +// VariantInit initializes variant. +func VariantInit(v *VARIANT) error { + return NewError(E_NOTIMPL) +} + +// VariantClear clears value in Variant settings to VT_EMPTY. +func VariantClear(v *VARIANT) error { + return NewError(E_NOTIMPL) +} + +// SysAllocString allocates memory for string and copies string into memory. +func SysAllocString(v string) *int16 { + u := int16(0) + return &u +} + +// SysAllocStringLen copies up to length of given string returning pointer. +func SysAllocStringLen(v string) *int16 { + u := int16(0) + return &u +} + +// SysFreeString frees string system memory. This must be called with SysAllocString. +func SysFreeString(v *int16) error { + return NewError(E_NOTIMPL) +} + +// SysStringLen is the length of the system allocated string. +func SysStringLen(v *int16) uint32 { + return uint32(0) +} + +// CreateStdDispatch provides default IDispatch implementation for IUnknown. +// +// This handles default IDispatch implementation for objects. It haves a few +// limitations with only supporting one language. It will also only return +// default exception codes. +func CreateStdDispatch(unk *IUnknown, v uintptr, ptinfo *IUnknown) (*IDispatch, error) { + return nil, NewError(E_NOTIMPL) +} + +// CreateDispTypeInfo provides default ITypeInfo implementation for IDispatch. +// +// This will not handle the full implementation of the interface. +func CreateDispTypeInfo(idata *INTERFACEDATA) (*IUnknown, error) { + return nil, NewError(E_NOTIMPL) +} + +// copyMemory moves location of a block of memory. +func copyMemory(dest unsafe.Pointer, src unsafe.Pointer, length uint32) {} + +// GetUserDefaultLCID retrieves current user default locale. +func GetUserDefaultLCID() uint32 { + return uint32(0) +} + +// GetMessage in message queue from runtime. +// +// This function appears to block. PeekMessage does not block. +func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32) (int32, error) { + return int32(0), NewError(E_NOTIMPL) +} + +// DispatchMessage to window procedure. +func DispatchMessage(msg *Msg) int32 { + return int32(0) +} + +func GetVariantDate(value uint64) (time.Time, error) { + return time.Now(), NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/connect.go b/vendor/github.com/go-ole/go-ole/connect.go new file mode 100644 index 00000000..b2ac2ec6 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/connect.go @@ -0,0 +1,192 @@ +package ole + +// Connection contains IUnknown for fluent interface interaction. +// +// Deprecated. Use oleutil package instead. +type Connection struct { + Object *IUnknown // Access COM +} + +// Initialize COM. +func (*Connection) Initialize() (err error) { + return coInitialize() +} + +// Uninitialize COM. +func (*Connection) Uninitialize() { + CoUninitialize() +} + +// Create IUnknown object based first on ProgId and then from String. +func (c *Connection) Create(progId string) (err error) { + var clsid *GUID + clsid, err = CLSIDFromProgID(progId) + if err != nil { + clsid, err = CLSIDFromString(progId) + if err != nil { + return + } + } + + unknown, err := CreateInstance(clsid, IID_IUnknown) + if err != nil { + return + } + c.Object = unknown + + return +} + +// Release IUnknown object. +func (c *Connection) Release() { + c.Object.Release() +} + +// Load COM object from list of programIDs or strings. +func (c *Connection) Load(names ...string) (errors []error) { + var tempErrors []error = make([]error, len(names)) + var numErrors int = 0 + for _, name := range names { + err := c.Create(name) + if err != nil { + tempErrors = append(tempErrors, err) + numErrors += 1 + continue + } + break + } + + copy(errors, tempErrors[0:numErrors]) + return +} + +// Dispatch returns Dispatch object. +func (c *Connection) Dispatch() (object *Dispatch, err error) { + dispatch, err := c.Object.QueryInterface(IID_IDispatch) + if err != nil { + return + } + object = &Dispatch{dispatch} + return +} + +// Dispatch stores IDispatch object. +type Dispatch struct { + Object *IDispatch // Dispatch object. +} + +// Call method on IDispatch with parameters. +func (d *Dispatch) Call(method string, params ...interface{}) (result *VARIANT, err error) { + id, err := d.GetId(method) + if err != nil { + return + } + + result, err = d.Invoke(id, DISPATCH_METHOD, params) + return +} + +// MustCall method on IDispatch with parameters. +func (d *Dispatch) MustCall(method string, params ...interface{}) (result *VARIANT) { + id, err := d.GetId(method) + if err != nil { + panic(err) + } + + result, err = d.Invoke(id, DISPATCH_METHOD, params) + if err != nil { + panic(err) + } + + return +} + +// Get property on IDispatch with parameters. +func (d *Dispatch) Get(name string, params ...interface{}) (result *VARIANT, err error) { + id, err := d.GetId(name) + if err != nil { + return + } + result, err = d.Invoke(id, DISPATCH_PROPERTYGET, params) + return +} + +// MustGet property on IDispatch with parameters. +func (d *Dispatch) MustGet(name string, params ...interface{}) (result *VARIANT) { + id, err := d.GetId(name) + if err != nil { + panic(err) + } + + result, err = d.Invoke(id, DISPATCH_PROPERTYGET, params) + if err != nil { + panic(err) + } + return +} + +// Set property on IDispatch with parameters. +func (d *Dispatch) Set(name string, params ...interface{}) (result *VARIANT, err error) { + id, err := d.GetId(name) + if err != nil { + return + } + result, err = d.Invoke(id, DISPATCH_PROPERTYPUT, params) + return +} + +// MustSet property on IDispatch with parameters. +func (d *Dispatch) MustSet(name string, params ...interface{}) (result *VARIANT) { + id, err := d.GetId(name) + if err != nil { + panic(err) + } + + result, err = d.Invoke(id, DISPATCH_PROPERTYPUT, params) + if err != nil { + panic(err) + } + return +} + +// GetId retrieves ID of name on IDispatch. +func (d *Dispatch) GetId(name string) (id int32, err error) { + var dispid []int32 + dispid, err = d.Object.GetIDsOfName([]string{name}) + if err != nil { + return + } + id = dispid[0] + return +} + +// GetIds retrieves all IDs of names on IDispatch. +func (d *Dispatch) GetIds(names ...string) (dispid []int32, err error) { + dispid, err = d.Object.GetIDsOfName(names) + return +} + +// Invoke IDispatch on DisplayID of dispatch type with parameters. +// +// There have been problems where if send cascading params..., it would error +// out because the parameters would be empty. +func (d *Dispatch) Invoke(id int32, dispatch int16, params []interface{}) (result *VARIANT, err error) { + if len(params) < 1 { + result, err = d.Object.Invoke(id, dispatch) + } else { + result, err = d.Object.Invoke(id, dispatch, params...) + } + return +} + +// Release IDispatch object. +func (d *Dispatch) Release() { + d.Object.Release() +} + +// Connect initializes COM and attempts to load IUnknown based on given names. +func Connect(names ...string) (connection *Connection) { + connection.Initialize() + connection.Load(names...) + return +} diff --git a/vendor/github.com/go-ole/go-ole/constants.go b/vendor/github.com/go-ole/go-ole/constants.go new file mode 100644 index 00000000..fd0c6d74 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/constants.go @@ -0,0 +1,153 @@ +package ole + +const ( + CLSCTX_INPROC_SERVER = 1 + CLSCTX_INPROC_HANDLER = 2 + CLSCTX_LOCAL_SERVER = 4 + CLSCTX_INPROC_SERVER16 = 8 + CLSCTX_REMOTE_SERVER = 16 + CLSCTX_ALL = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER + CLSCTX_INPROC = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER + CLSCTX_SERVER = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER +) + +const ( + COINIT_APARTMENTTHREADED = 0x2 + COINIT_MULTITHREADED = 0x0 + COINIT_DISABLE_OLE1DDE = 0x4 + COINIT_SPEED_OVER_MEMORY = 0x8 +) + +const ( + DISPATCH_METHOD = 1 + DISPATCH_PROPERTYGET = 2 + DISPATCH_PROPERTYPUT = 4 + DISPATCH_PROPERTYPUTREF = 8 +) + +const ( + S_OK = 0x00000000 + E_UNEXPECTED = 0x8000FFFF + E_NOTIMPL = 0x80004001 + E_OUTOFMEMORY = 0x8007000E + E_INVALIDARG = 0x80070057 + E_NOINTERFACE = 0x80004002 + E_POINTER = 0x80004003 + E_HANDLE = 0x80070006 + E_ABORT = 0x80004004 + E_FAIL = 0x80004005 + E_ACCESSDENIED = 0x80070005 + E_PENDING = 0x8000000A + + CO_E_CLASSSTRING = 0x800401F3 +) + +const ( + CC_FASTCALL = iota + CC_CDECL + CC_MSCPASCAL + CC_PASCAL = CC_MSCPASCAL + CC_MACPASCAL + CC_STDCALL + CC_FPFASTCALL + CC_SYSCALL + CC_MPWCDECL + CC_MPWPASCAL + CC_MAX = CC_MPWPASCAL +) + +type VT uint16 + +const ( + VT_EMPTY VT = 0x0 + VT_NULL VT = 0x1 + VT_I2 VT = 0x2 + VT_I4 VT = 0x3 + VT_R4 VT = 0x4 + VT_R8 VT = 0x5 + VT_CY VT = 0x6 + VT_DATE VT = 0x7 + VT_BSTR VT = 0x8 + VT_DISPATCH VT = 0x9 + VT_ERROR VT = 0xa + VT_BOOL VT = 0xb + VT_VARIANT VT = 0xc + VT_UNKNOWN VT = 0xd + VT_DECIMAL VT = 0xe + VT_I1 VT = 0x10 + VT_UI1 VT = 0x11 + VT_UI2 VT = 0x12 + VT_UI4 VT = 0x13 + VT_I8 VT = 0x14 + VT_UI8 VT = 0x15 + VT_INT VT = 0x16 + VT_UINT VT = 0x17 + VT_VOID VT = 0x18 + VT_HRESULT VT = 0x19 + VT_PTR VT = 0x1a + VT_SAFEARRAY VT = 0x1b + VT_CARRAY VT = 0x1c + VT_USERDEFINED VT = 0x1d + VT_LPSTR VT = 0x1e + VT_LPWSTR VT = 0x1f + VT_RECORD VT = 0x24 + VT_INT_PTR VT = 0x25 + VT_UINT_PTR VT = 0x26 + VT_FILETIME VT = 0x40 + VT_BLOB VT = 0x41 + VT_STREAM VT = 0x42 + VT_STORAGE VT = 0x43 + VT_STREAMED_OBJECT VT = 0x44 + VT_STORED_OBJECT VT = 0x45 + VT_BLOB_OBJECT VT = 0x46 + VT_CF VT = 0x47 + VT_CLSID VT = 0x48 + VT_BSTR_BLOB VT = 0xfff + VT_VECTOR VT = 0x1000 + VT_ARRAY VT = 0x2000 + VT_BYREF VT = 0x4000 + VT_RESERVED VT = 0x8000 + VT_ILLEGAL VT = 0xffff + VT_ILLEGALMASKED VT = 0xfff + VT_TYPEMASK VT = 0xfff +) + +const ( + DISPID_UNKNOWN = -1 + DISPID_VALUE = 0 + DISPID_PROPERTYPUT = -3 + DISPID_NEWENUM = -4 + DISPID_EVALUATE = -5 + DISPID_CONSTRUCTOR = -6 + DISPID_DESTRUCTOR = -7 + DISPID_COLLECT = -8 +) + +const ( + TKIND_ENUM = 1 + TKIND_RECORD = 2 + TKIND_MODULE = 3 + TKIND_INTERFACE = 4 + TKIND_DISPATCH = 5 + TKIND_COCLASS = 6 + TKIND_ALIAS = 7 + TKIND_UNION = 8 + TKIND_MAX = 9 +) + +// Safe Array Feature Flags + +const ( + FADF_AUTO = 0x0001 + FADF_STATIC = 0x0002 + FADF_EMBEDDED = 0x0004 + FADF_FIXEDSIZE = 0x0010 + FADF_RECORD = 0x0020 + FADF_HAVEIID = 0x0040 + FADF_HAVEVARTYPE = 0x0080 + FADF_BSTR = 0x0100 + FADF_UNKNOWN = 0x0200 + FADF_DISPATCH = 0x0400 + FADF_VARIANT = 0x0800 + FADF_RESERVED = 0xF008 +) diff --git a/vendor/github.com/go-ole/go-ole/error.go b/vendor/github.com/go-ole/go-ole/error.go new file mode 100644 index 00000000..096b456d --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/error.go @@ -0,0 +1,51 @@ +package ole + +// OleError stores COM errors. +type OleError struct { + hr uintptr + description string + subError error +} + +// NewError creates new error with HResult. +func NewError(hr uintptr) *OleError { + return &OleError{hr: hr} +} + +// NewErrorWithDescription creates new COM error with HResult and description. +func NewErrorWithDescription(hr uintptr, description string) *OleError { + return &OleError{hr: hr, description: description} +} + +// NewErrorWithSubError creates new COM error with parent error. +func NewErrorWithSubError(hr uintptr, description string, err error) *OleError { + return &OleError{hr: hr, description: description, subError: err} +} + +// Code is the HResult. +func (v *OleError) Code() uintptr { + return uintptr(v.hr) +} + +// String description, either manually set or format message with error code. +func (v *OleError) String() string { + if v.description != "" { + return errstr(int(v.hr)) + " (" + v.description + ")" + } + return errstr(int(v.hr)) +} + +// Error implements error interface. +func (v *OleError) Error() string { + return v.String() +} + +// Description retrieves error summary, if there is one. +func (v *OleError) Description() string { + return v.description +} + +// SubError returns parent error, if there is one. +func (v *OleError) SubError() error { + return v.subError +} diff --git a/vendor/github.com/go-ole/go-ole/error_func.go b/vendor/github.com/go-ole/go-ole/error_func.go new file mode 100644 index 00000000..8a2ffaa2 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/error_func.go @@ -0,0 +1,8 @@ +// +build !windows + +package ole + +// errstr converts error code to string. +func errstr(errno int) string { + return "" +} diff --git a/vendor/github.com/go-ole/go-ole/error_windows.go b/vendor/github.com/go-ole/go-ole/error_windows.go new file mode 100644 index 00000000..d0e8e685 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/error_windows.go @@ -0,0 +1,24 @@ +// +build windows + +package ole + +import ( + "fmt" + "syscall" + "unicode/utf16" +) + +// errstr converts error code to string. +func errstr(errno int) string { + // ask windows for the remaining errors + var flags uint32 = syscall.FORMAT_MESSAGE_FROM_SYSTEM | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS + b := make([]uint16, 300) + n, err := syscall.FormatMessage(flags, 0, uint32(errno), 0, b, nil) + if err != nil { + return fmt.Sprintf("error %d (FormatMessage failed with: %v)", errno, err) + } + // trim terminating \r and \n + for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- { + } + return string(utf16.Decode(b[:n])) +} diff --git a/vendor/github.com/go-ole/go-ole/guid.go b/vendor/github.com/go-ole/go-ole/guid.go new file mode 100644 index 00000000..8d20f68f --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/guid.go @@ -0,0 +1,284 @@ +package ole + +var ( + // IID_NULL is null Interface ID, used when no other Interface ID is known. + IID_NULL = NewGUID("{00000000-0000-0000-0000-000000000000}") + + // IID_IUnknown is for IUnknown interfaces. + IID_IUnknown = NewGUID("{00000000-0000-0000-C000-000000000046}") + + // IID_IDispatch is for IDispatch interfaces. + IID_IDispatch = NewGUID("{00020400-0000-0000-C000-000000000046}") + + // IID_IEnumVariant is for IEnumVariant interfaces + IID_IEnumVariant = NewGUID("{00020404-0000-0000-C000-000000000046}") + + // IID_IConnectionPointContainer is for IConnectionPointContainer interfaces. + IID_IConnectionPointContainer = NewGUID("{B196B284-BAB4-101A-B69C-00AA00341D07}") + + // IID_IConnectionPoint is for IConnectionPoint interfaces. + IID_IConnectionPoint = NewGUID("{B196B286-BAB4-101A-B69C-00AA00341D07}") + + // IID_IInspectable is for IInspectable interfaces. + IID_IInspectable = NewGUID("{AF86E2E0-B12D-4C6A-9C5A-D7AA65101E90}") + + // IID_IProvideClassInfo is for IProvideClassInfo interfaces. + IID_IProvideClassInfo = NewGUID("{B196B283-BAB4-101A-B69C-00AA00341D07}") +) + +// These are for testing and not part of any library. +var ( + // IID_ICOMTestString is for ICOMTestString interfaces. + // + // {E0133EB4-C36F-469A-9D3D-C66B84BE19ED} + IID_ICOMTestString = NewGUID("{E0133EB4-C36F-469A-9D3D-C66B84BE19ED}") + + // IID_ICOMTestInt8 is for ICOMTestInt8 interfaces. + // + // {BEB06610-EB84-4155-AF58-E2BFF53680B4} + IID_ICOMTestInt8 = NewGUID("{BEB06610-EB84-4155-AF58-E2BFF53680B4}") + + // IID_ICOMTestInt16 is for ICOMTestInt16 interfaces. + // + // {DAA3F9FA-761E-4976-A860-8364CE55F6FC} + IID_ICOMTestInt16 = NewGUID("{DAA3F9FA-761E-4976-A860-8364CE55F6FC}") + + // IID_ICOMTestInt32 is for ICOMTestInt32 interfaces. + // + // {E3DEDEE7-38A2-4540-91D1-2EEF1D8891B0} + IID_ICOMTestInt32 = NewGUID("{E3DEDEE7-38A2-4540-91D1-2EEF1D8891B0}") + + // IID_ICOMTestInt64 is for ICOMTestInt64 interfaces. + // + // {8D437CBC-B3ED-485C-BC32-C336432A1623} + IID_ICOMTestInt64 = NewGUID("{8D437CBC-B3ED-485C-BC32-C336432A1623}") + + // IID_ICOMTestFloat is for ICOMTestFloat interfaces. + // + // {BF1ED004-EA02-456A-AA55-2AC8AC6B054C} + IID_ICOMTestFloat = NewGUID("{BF1ED004-EA02-456A-AA55-2AC8AC6B054C}") + + // IID_ICOMTestDouble is for ICOMTestDouble interfaces. + // + // {BF908A81-8687-4E93-999F-D86FAB284BA0} + IID_ICOMTestDouble = NewGUID("{BF908A81-8687-4E93-999F-D86FAB284BA0}") + + // IID_ICOMTestBoolean is for ICOMTestBoolean interfaces. + // + // {D530E7A6-4EE8-40D1-8931-3D63B8605010} + IID_ICOMTestBoolean = NewGUID("{D530E7A6-4EE8-40D1-8931-3D63B8605010}") + + // IID_ICOMEchoTestObject is for ICOMEchoTestObject interfaces. + // + // {6485B1EF-D780-4834-A4FE-1EBB51746CA3} + IID_ICOMEchoTestObject = NewGUID("{6485B1EF-D780-4834-A4FE-1EBB51746CA3}") + + // IID_ICOMTestTypes is for ICOMTestTypes interfaces. + // + // {CCA8D7AE-91C0-4277-A8B3-FF4EDF28D3C0} + IID_ICOMTestTypes = NewGUID("{CCA8D7AE-91C0-4277-A8B3-FF4EDF28D3C0}") + + // CLSID_COMEchoTestObject is for COMEchoTestObject class. + // + // {3C24506A-AE9E-4D50-9157-EF317281F1B0} + CLSID_COMEchoTestObject = NewGUID("{3C24506A-AE9E-4D50-9157-EF317281F1B0}") + + // CLSID_COMTestScalarClass is for COMTestScalarClass class. + // + // {865B85C5-0334-4AC6-9EF6-AACEC8FC5E86} + CLSID_COMTestScalarClass = NewGUID("{865B85C5-0334-4AC6-9EF6-AACEC8FC5E86}") +) + +const hextable = "0123456789ABCDEF" +const emptyGUID = "{00000000-0000-0000-0000-000000000000}" + +// GUID is Windows API specific GUID type. +// +// This exists to match Windows GUID type for direct passing for COM. +// Format is in xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx. +type GUID struct { + Data1 uint32 + Data2 uint16 + Data3 uint16 + Data4 [8]byte +} + +// NewGUID converts the given string into a globally unique identifier that is +// compliant with the Windows API. +// +// The supplied string may be in any of these formats: +// +// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX +// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} +// +// The conversion of the supplied string is not case-sensitive. +func NewGUID(guid string) *GUID { + d := []byte(guid) + var d1, d2, d3, d4a, d4b []byte + + switch len(d) { + case 38: + if d[0] != '{' || d[37] != '}' { + return nil + } + d = d[1:37] + fallthrough + case 36: + if d[8] != '-' || d[13] != '-' || d[18] != '-' || d[23] != '-' { + return nil + } + d1 = d[0:8] + d2 = d[9:13] + d3 = d[14:18] + d4a = d[19:23] + d4b = d[24:36] + case 32: + d1 = d[0:8] + d2 = d[8:12] + d3 = d[12:16] + d4a = d[16:20] + d4b = d[20:32] + default: + return nil + } + + var g GUID + var ok1, ok2, ok3, ok4 bool + g.Data1, ok1 = decodeHexUint32(d1) + g.Data2, ok2 = decodeHexUint16(d2) + g.Data3, ok3 = decodeHexUint16(d3) + g.Data4, ok4 = decodeHexByte64(d4a, d4b) + if ok1 && ok2 && ok3 && ok4 { + return &g + } + return nil +} + +func decodeHexUint32(src []byte) (value uint32, ok bool) { + var b1, b2, b3, b4 byte + var ok1, ok2, ok3, ok4 bool + b1, ok1 = decodeHexByte(src[0], src[1]) + b2, ok2 = decodeHexByte(src[2], src[3]) + b3, ok3 = decodeHexByte(src[4], src[5]) + b4, ok4 = decodeHexByte(src[6], src[7]) + value = (uint32(b1) << 24) | (uint32(b2) << 16) | (uint32(b3) << 8) | uint32(b4) + ok = ok1 && ok2 && ok3 && ok4 + return +} + +func decodeHexUint16(src []byte) (value uint16, ok bool) { + var b1, b2 byte + var ok1, ok2 bool + b1, ok1 = decodeHexByte(src[0], src[1]) + b2, ok2 = decodeHexByte(src[2], src[3]) + value = (uint16(b1) << 8) | uint16(b2) + ok = ok1 && ok2 + return +} + +func decodeHexByte64(s1 []byte, s2 []byte) (value [8]byte, ok bool) { + var ok1, ok2, ok3, ok4, ok5, ok6, ok7, ok8 bool + value[0], ok1 = decodeHexByte(s1[0], s1[1]) + value[1], ok2 = decodeHexByte(s1[2], s1[3]) + value[2], ok3 = decodeHexByte(s2[0], s2[1]) + value[3], ok4 = decodeHexByte(s2[2], s2[3]) + value[4], ok5 = decodeHexByte(s2[4], s2[5]) + value[5], ok6 = decodeHexByte(s2[6], s2[7]) + value[6], ok7 = decodeHexByte(s2[8], s2[9]) + value[7], ok8 = decodeHexByte(s2[10], s2[11]) + ok = ok1 && ok2 && ok3 && ok4 && ok5 && ok6 && ok7 && ok8 + return +} + +func decodeHexByte(c1, c2 byte) (value byte, ok bool) { + var n1, n2 byte + var ok1, ok2 bool + n1, ok1 = decodeHexChar(c1) + n2, ok2 = decodeHexChar(c2) + value = (n1 << 4) | n2 + ok = ok1 && ok2 + return +} + +func decodeHexChar(c byte) (byte, bool) { + switch { + case '0' <= c && c <= '9': + return c - '0', true + case 'a' <= c && c <= 'f': + return c - 'a' + 10, true + case 'A' <= c && c <= 'F': + return c - 'A' + 10, true + } + + return 0, false +} + +// String converts the GUID to string form. It will adhere to this pattern: +// +// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} +// +// If the GUID is nil, the string representation of an empty GUID is returned: +// +// {00000000-0000-0000-0000-000000000000} +func (guid *GUID) String() string { + if guid == nil { + return emptyGUID + } + + var c [38]byte + c[0] = '{' + putUint32Hex(c[1:9], guid.Data1) + c[9] = '-' + putUint16Hex(c[10:14], guid.Data2) + c[14] = '-' + putUint16Hex(c[15:19], guid.Data3) + c[19] = '-' + putByteHex(c[20:24], guid.Data4[0:2]) + c[24] = '-' + putByteHex(c[25:37], guid.Data4[2:8]) + c[37] = '}' + return string(c[:]) +} + +func putUint32Hex(b []byte, v uint32) { + b[0] = hextable[byte(v>>24)>>4] + b[1] = hextable[byte(v>>24)&0x0f] + b[2] = hextable[byte(v>>16)>>4] + b[3] = hextable[byte(v>>16)&0x0f] + b[4] = hextable[byte(v>>8)>>4] + b[5] = hextable[byte(v>>8)&0x0f] + b[6] = hextable[byte(v)>>4] + b[7] = hextable[byte(v)&0x0f] +} + +func putUint16Hex(b []byte, v uint16) { + b[0] = hextable[byte(v>>8)>>4] + b[1] = hextable[byte(v>>8)&0x0f] + b[2] = hextable[byte(v)>>4] + b[3] = hextable[byte(v)&0x0f] +} + +func putByteHex(dst, src []byte) { + for i := 0; i < len(src); i++ { + dst[i*2] = hextable[src[i]>>4] + dst[i*2+1] = hextable[src[i]&0x0f] + } +} + +// IsEqualGUID compares two GUID. +// +// Not constant time comparison. +func IsEqualGUID(guid1 *GUID, guid2 *GUID) bool { + return guid1.Data1 == guid2.Data1 && + guid1.Data2 == guid2.Data2 && + guid1.Data3 == guid2.Data3 && + guid1.Data4[0] == guid2.Data4[0] && + guid1.Data4[1] == guid2.Data4[1] && + guid1.Data4[2] == guid2.Data4[2] && + guid1.Data4[3] == guid2.Data4[3] && + guid1.Data4[4] == guid2.Data4[4] && + guid1.Data4[5] == guid2.Data4[5] && + guid1.Data4[6] == guid2.Data4[6] && + guid1.Data4[7] == guid2.Data4[7] +} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpoint.go b/vendor/github.com/go-ole/go-ole/iconnectionpoint.go new file mode 100644 index 00000000..9e6c49f4 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iconnectionpoint.go @@ -0,0 +1,20 @@ +package ole + +import "unsafe" + +type IConnectionPoint struct { + IUnknown +} + +type IConnectionPointVtbl struct { + IUnknownVtbl + GetConnectionInterface uintptr + GetConnectionPointContainer uintptr + Advise uintptr + Unadvise uintptr + EnumConnections uintptr +} + +func (v *IConnectionPoint) VTable() *IConnectionPointVtbl { + return (*IConnectionPointVtbl)(unsafe.Pointer(v.RawVTable)) +} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go b/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go new file mode 100644 index 00000000..5414dc3c --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go @@ -0,0 +1,21 @@ +// +build !windows + +package ole + +import "unsafe" + +func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { + return int32(0) +} + +func (v *IConnectionPoint) Advise(unknown *IUnknown) (uint32, error) { + return uint32(0), NewError(E_NOTIMPL) +} + +func (v *IConnectionPoint) Unadvise(cookie uint32) error { + return NewError(E_NOTIMPL) +} + +func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) (err error) { + return NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go b/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go new file mode 100644 index 00000000..32bc1832 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go @@ -0,0 +1,43 @@ +// +build windows + +package ole + +import ( + "syscall" + "unsafe" +) + +func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { + // XXX: This doesn't look like it does what it's supposed to + return release((*IUnknown)(unsafe.Pointer(v))) +} + +func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err error) { + hr, _, _ := syscall.Syscall( + v.VTable().Advise, + 3, + uintptr(unsafe.Pointer(v)), + uintptr(unsafe.Pointer(unknown)), + uintptr(unsafe.Pointer(&cookie))) + if hr != 0 { + err = NewError(hr) + } + return +} + +func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) { + hr, _, _ := syscall.Syscall( + v.VTable().Unadvise, + 2, + uintptr(unsafe.Pointer(v)), + uintptr(cookie), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} + +func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error { + return NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go new file mode 100644 index 00000000..165860d1 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go @@ -0,0 +1,17 @@ +package ole + +import "unsafe" + +type IConnectionPointContainer struct { + IUnknown +} + +type IConnectionPointContainerVtbl struct { + IUnknownVtbl + EnumConnectionPoints uintptr + FindConnectionPoint uintptr +} + +func (v *IConnectionPointContainer) VTable() *IConnectionPointContainerVtbl { + return (*IConnectionPointContainerVtbl)(unsafe.Pointer(v.RawVTable)) +} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go new file mode 100644 index 00000000..5dfa42aa --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go @@ -0,0 +1,11 @@ +// +build !windows + +package ole + +func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { + return NewError(E_NOTIMPL) +} + +func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) error { + return NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go new file mode 100644 index 00000000..ad30d79e --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go @@ -0,0 +1,25 @@ +// +build windows + +package ole + +import ( + "syscall" + "unsafe" +) + +func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { + return NewError(E_NOTIMPL) +} + +func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) (err error) { + hr, _, _ := syscall.Syscall( + v.VTable().FindConnectionPoint, + 3, + uintptr(unsafe.Pointer(v)), + uintptr(unsafe.Pointer(iid)), + uintptr(unsafe.Pointer(point))) + if hr != 0 { + err = NewError(hr) + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/idispatch.go b/vendor/github.com/go-ole/go-ole/idispatch.go new file mode 100644 index 00000000..d4af1240 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/idispatch.go @@ -0,0 +1,94 @@ +package ole + +import "unsafe" + +type IDispatch struct { + IUnknown +} + +type IDispatchVtbl struct { + IUnknownVtbl + GetTypeInfoCount uintptr + GetTypeInfo uintptr + GetIDsOfNames uintptr + Invoke uintptr +} + +func (v *IDispatch) VTable() *IDispatchVtbl { + return (*IDispatchVtbl)(unsafe.Pointer(v.RawVTable)) +} + +func (v *IDispatch) GetIDsOfName(names []string) (dispid []int32, err error) { + dispid, err = getIDsOfName(v, names) + return +} + +func (v *IDispatch) Invoke(dispid int32, dispatch int16, params ...interface{}) (result *VARIANT, err error) { + result, err = invoke(v, dispid, dispatch, params...) + return +} + +func (v *IDispatch) GetTypeInfoCount() (c uint32, err error) { + c, err = getTypeInfoCount(v) + return +} + +func (v *IDispatch) GetTypeInfo() (tinfo *ITypeInfo, err error) { + tinfo, err = getTypeInfo(v) + return +} + +// GetSingleIDOfName is a helper that returns single display ID for IDispatch name. +// +// This replaces the common pattern of attempting to get a single name from the list of available +// IDs. It gives the first ID, if it is available. +func (v *IDispatch) GetSingleIDOfName(name string) (displayID int32, err error) { + var displayIDs []int32 + displayIDs, err = v.GetIDsOfName([]string{name}) + if err != nil { + return + } + displayID = displayIDs[0] + return +} + +// InvokeWithOptionalArgs accepts arguments as an array, works like Invoke. +// +// Accepts name and will attempt to retrieve Display ID to pass to Invoke. +// +// Passing params as an array is a workaround that could be fixed in later versions of Go that +// prevent passing empty params. During testing it was discovered that this is an acceptable way of +// getting around not being able to pass params normally. +func (v *IDispatch) InvokeWithOptionalArgs(name string, dispatch int16, params []interface{}) (result *VARIANT, err error) { + displayID, err := v.GetSingleIDOfName(name) + if err != nil { + return + } + + if len(params) < 1 { + result, err = v.Invoke(displayID, dispatch) + } else { + result, err = v.Invoke(displayID, dispatch, params...) + } + + return +} + +// CallMethod invokes named function with arguments on object. +func (v *IDispatch) CallMethod(name string, params ...interface{}) (*VARIANT, error) { + return v.InvokeWithOptionalArgs(name, DISPATCH_METHOD, params) +} + +// GetProperty retrieves the property with the name with the ability to pass arguments. +// +// Most of the time you will not need to pass arguments as most objects do not allow for this +// feature. Or at least, should not allow for this feature. Some servers don't follow best practices +// and this is provided for those edge cases. +func (v *IDispatch) GetProperty(name string, params ...interface{}) (*VARIANT, error) { + return v.InvokeWithOptionalArgs(name, DISPATCH_PROPERTYGET, params) +} + +// PutProperty attempts to mutate a property in the object. +func (v *IDispatch) PutProperty(name string, params ...interface{}) (*VARIANT, error) { + return v.InvokeWithOptionalArgs(name, DISPATCH_PROPERTYPUT, params) +} diff --git a/vendor/github.com/go-ole/go-ole/idispatch_func.go b/vendor/github.com/go-ole/go-ole/idispatch_func.go new file mode 100644 index 00000000..b8fbbe31 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/idispatch_func.go @@ -0,0 +1,19 @@ +// +build !windows + +package ole + +func getIDsOfName(disp *IDispatch, names []string) ([]int32, error) { + return []int32{}, NewError(E_NOTIMPL) +} + +func getTypeInfoCount(disp *IDispatch) (uint32, error) { + return uint32(0), NewError(E_NOTIMPL) +} + +func getTypeInfo(disp *IDispatch) (*ITypeInfo, error) { + return nil, NewError(E_NOTIMPL) +} + +func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (*VARIANT, error) { + return nil, NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/idispatch_windows.go b/vendor/github.com/go-ole/go-ole/idispatch_windows.go new file mode 100644 index 00000000..649c0734 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/idispatch_windows.go @@ -0,0 +1,203 @@ +//go:build windows +// +build windows + +package ole + +import ( + "math/big" + "syscall" + "time" + "unsafe" +) + +func getIDsOfName(disp *IDispatch, names []string) (dispid []int32, err error) { + wnames := make([]*uint16, len(names)) + for i := 0; i < len(names); i++ { + wnames[i] = syscall.StringToUTF16Ptr(names[i]) + } + dispid = make([]int32, len(names)) + namelen := uint32(len(names)) + hr, _, _ := syscall.Syscall6( + disp.VTable().GetIDsOfNames, + 6, + uintptr(unsafe.Pointer(disp)), + uintptr(unsafe.Pointer(IID_NULL)), + uintptr(unsafe.Pointer(&wnames[0])), + uintptr(namelen), + uintptr(GetUserDefaultLCID()), + uintptr(unsafe.Pointer(&dispid[0]))) + if hr != 0 { + err = NewError(hr) + } + return +} + +func getTypeInfoCount(disp *IDispatch) (c uint32, err error) { + hr, _, _ := syscall.Syscall( + disp.VTable().GetTypeInfoCount, + 2, + uintptr(unsafe.Pointer(disp)), + uintptr(unsafe.Pointer(&c)), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} + +func getTypeInfo(disp *IDispatch) (tinfo *ITypeInfo, err error) { + hr, _, _ := syscall.Syscall( + disp.VTable().GetTypeInfo, + 3, + uintptr(unsafe.Pointer(disp)), + uintptr(GetUserDefaultLCID()), + uintptr(unsafe.Pointer(&tinfo))) + if hr != 0 { + err = NewError(hr) + } + return +} + +func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (result *VARIANT, err error) { + var dispparams DISPPARAMS + + if dispatch&DISPATCH_PROPERTYPUT != 0 { + dispnames := [1]int32{DISPID_PROPERTYPUT} + dispparams.rgdispidNamedArgs = uintptr(unsafe.Pointer(&dispnames[0])) + dispparams.cNamedArgs = 1 + } else if dispatch&DISPATCH_PROPERTYPUTREF != 0 { + dispnames := [1]int32{DISPID_PROPERTYPUT} + dispparams.rgdispidNamedArgs = uintptr(unsafe.Pointer(&dispnames[0])) + dispparams.cNamedArgs = 1 + } + var vargs []VARIANT + if len(params) > 0 { + vargs = make([]VARIANT, len(params)) + for i, v := range params { + //n := len(params)-i-1 + n := len(params) - i - 1 + VariantInit(&vargs[n]) + switch vv := v.(type) { + case bool: + if vv { + vargs[n] = NewVariant(VT_BOOL, 0xffff) + } else { + vargs[n] = NewVariant(VT_BOOL, 0) + } + case *bool: + vargs[n] = NewVariant(VT_BOOL|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*bool))))) + case uint8: + vargs[n] = NewVariant(VT_I1, int64(v.(uint8))) + case *uint8: + vargs[n] = NewVariant(VT_I1|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint8))))) + case int8: + vargs[n] = NewVariant(VT_I1, int64(v.(int8))) + case *int8: + vargs[n] = NewVariant(VT_I1|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int8))))) + case int16: + vargs[n] = NewVariant(VT_I2, int64(v.(int16))) + case *int16: + vargs[n] = NewVariant(VT_I2|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int16))))) + case uint16: + vargs[n] = NewVariant(VT_UI2, int64(v.(uint16))) + case *uint16: + vargs[n] = NewVariant(VT_UI2|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint16))))) + case int32: + vargs[n] = NewVariant(VT_I4, int64(v.(int32))) + case *int32: + vargs[n] = NewVariant(VT_I4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int32))))) + case uint32: + vargs[n] = NewVariant(VT_UI4, int64(v.(uint32))) + case *uint32: + vargs[n] = NewVariant(VT_UI4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint32))))) + case int64: + vargs[n] = NewVariant(VT_I8, int64(v.(int64))) + case *int64: + vargs[n] = NewVariant(VT_I8|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int64))))) + case uint64: + vargs[n] = NewVariant(VT_UI8, int64(uintptr(v.(uint64)))) + case *uint64: + vargs[n] = NewVariant(VT_UI8|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint64))))) + case int: + vargs[n] = NewVariant(VT_I4, int64(v.(int))) + case *int: + vargs[n] = NewVariant(VT_I4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int))))) + case uint: + vargs[n] = NewVariant(VT_UI4, int64(v.(uint))) + case *uint: + vargs[n] = NewVariant(VT_UI4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint))))) + case float32: + vargs[n] = NewVariant(VT_R4, *(*int64)(unsafe.Pointer(&vv))) + case *float32: + vargs[n] = NewVariant(VT_R4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*float32))))) + case float64: + vargs[n] = NewVariant(VT_R8, *(*int64)(unsafe.Pointer(&vv))) + case *float64: + vargs[n] = NewVariant(VT_R8|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*float64))))) + case *big.Int: + vargs[n] = NewVariant(VT_DECIMAL, v.(*big.Int).Int64()) + case string: + vargs[n] = NewVariant(VT_BSTR, int64(uintptr(unsafe.Pointer(SysAllocStringLen(v.(string)))))) + case *string: + vargs[n] = NewVariant(VT_BSTR|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*string))))) + case time.Time: + s := vv.Format("2006-01-02 15:04:05") + vargs[n] = NewVariant(VT_BSTR, int64(uintptr(unsafe.Pointer(SysAllocStringLen(s))))) + case *time.Time: + s := vv.Format("2006-01-02 15:04:05") + vargs[n] = NewVariant(VT_BSTR|VT_BYREF, int64(uintptr(unsafe.Pointer(&s)))) + case *IDispatch: + vargs[n] = NewVariant(VT_DISPATCH, int64(uintptr(unsafe.Pointer(v.(*IDispatch))))) + case **IDispatch: + vargs[n] = NewVariant(VT_DISPATCH|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(**IDispatch))))) + case nil: + vargs[n] = NewVariant(VT_NULL, 0) + case *VARIANT: + vargs[n] = NewVariant(VT_VARIANT|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*VARIANT))))) + case []byte: + safeByteArray := safeArrayFromByteSlice(v.([]byte)) + vargs[n] = NewVariant(VT_ARRAY|VT_UI1, int64(uintptr(unsafe.Pointer(safeByteArray)))) + defer VariantClear(&vargs[n]) + case []string: + safeByteArray := safeArrayFromStringSlice(v.([]string)) + vargs[n] = NewVariant(VT_ARRAY|VT_BSTR, int64(uintptr(unsafe.Pointer(safeByteArray)))) + defer VariantClear(&vargs[n]) + default: + panic("unknown type") + } + } + dispparams.rgvarg = uintptr(unsafe.Pointer(&vargs[0])) + dispparams.cArgs = uint32(len(params)) + } + + result = new(VARIANT) + var excepInfo EXCEPINFO + VariantInit(result) + hr, _, _ := syscall.Syscall9( + disp.VTable().Invoke, + 9, + uintptr(unsafe.Pointer(disp)), + uintptr(dispid), + uintptr(unsafe.Pointer(IID_NULL)), + uintptr(GetUserDefaultLCID()), + uintptr(dispatch), + uintptr(unsafe.Pointer(&dispparams)), + uintptr(unsafe.Pointer(result)), + uintptr(unsafe.Pointer(&excepInfo)), + 0) + if hr != 0 { + excepInfo.renderStrings() + excepInfo.Clear() + err = NewErrorWithSubError(hr, excepInfo.description, excepInfo) + } + for i, varg := range vargs { + n := len(params) - i - 1 + if varg.VT == VT_BSTR && varg.Val != 0 { + SysFreeString(((*int16)(unsafe.Pointer(uintptr(varg.Val))))) + } + if varg.VT == (VT_BSTR|VT_BYREF) && varg.Val != 0 { + *(params[n].(*string)) = LpOleStrToString(*(**uint16)(unsafe.Pointer(uintptr(varg.Val)))) + } + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/ienumvariant.go b/vendor/github.com/go-ole/go-ole/ienumvariant.go new file mode 100644 index 00000000..24338975 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/ienumvariant.go @@ -0,0 +1,19 @@ +package ole + +import "unsafe" + +type IEnumVARIANT struct { + IUnknown +} + +type IEnumVARIANTVtbl struct { + IUnknownVtbl + Next uintptr + Skip uintptr + Reset uintptr + Clone uintptr +} + +func (v *IEnumVARIANT) VTable() *IEnumVARIANTVtbl { + return (*IEnumVARIANTVtbl)(unsafe.Pointer(v.RawVTable)) +} diff --git a/vendor/github.com/go-ole/go-ole/ienumvariant_func.go b/vendor/github.com/go-ole/go-ole/ienumvariant_func.go new file mode 100644 index 00000000..c1484819 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/ienumvariant_func.go @@ -0,0 +1,19 @@ +// +build !windows + +package ole + +func (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) { + return nil, NewError(E_NOTIMPL) +} + +func (enum *IEnumVARIANT) Reset() error { + return NewError(E_NOTIMPL) +} + +func (enum *IEnumVARIANT) Skip(celt uint) error { + return NewError(E_NOTIMPL) +} + +func (enum *IEnumVARIANT) Next(celt uint) (VARIANT, uint, error) { + return NewVariant(VT_NULL, int64(0)), 0, NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/ienumvariant_windows.go b/vendor/github.com/go-ole/go-ole/ienumvariant_windows.go new file mode 100644 index 00000000..4781f3b8 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/ienumvariant_windows.go @@ -0,0 +1,63 @@ +// +build windows + +package ole + +import ( + "syscall" + "unsafe" +) + +func (enum *IEnumVARIANT) Clone() (cloned *IEnumVARIANT, err error) { + hr, _, _ := syscall.Syscall( + enum.VTable().Clone, + 2, + uintptr(unsafe.Pointer(enum)), + uintptr(unsafe.Pointer(&cloned)), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} + +func (enum *IEnumVARIANT) Reset() (err error) { + hr, _, _ := syscall.Syscall( + enum.VTable().Reset, + 1, + uintptr(unsafe.Pointer(enum)), + 0, + 0) + if hr != 0 { + err = NewError(hr) + } + return +} + +func (enum *IEnumVARIANT) Skip(celt uint) (err error) { + hr, _, _ := syscall.Syscall( + enum.VTable().Skip, + 2, + uintptr(unsafe.Pointer(enum)), + uintptr(celt), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} + +func (enum *IEnumVARIANT) Next(celt uint) (array VARIANT, length uint, err error) { + hr, _, _ := syscall.Syscall6( + enum.VTable().Next, + 4, + uintptr(unsafe.Pointer(enum)), + uintptr(celt), + uintptr(unsafe.Pointer(&array)), + uintptr(unsafe.Pointer(&length)), + 0, + 0) + if hr != 0 { + err = NewError(hr) + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/iinspectable.go b/vendor/github.com/go-ole/go-ole/iinspectable.go new file mode 100644 index 00000000..f4a19e25 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iinspectable.go @@ -0,0 +1,18 @@ +package ole + +import "unsafe" + +type IInspectable struct { + IUnknown +} + +type IInspectableVtbl struct { + IUnknownVtbl + GetIIds uintptr + GetRuntimeClassName uintptr + GetTrustLevel uintptr +} + +func (v *IInspectable) VTable() *IInspectableVtbl { + return (*IInspectableVtbl)(unsafe.Pointer(v.RawVTable)) +} diff --git a/vendor/github.com/go-ole/go-ole/iinspectable_func.go b/vendor/github.com/go-ole/go-ole/iinspectable_func.go new file mode 100644 index 00000000..348829bf --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iinspectable_func.go @@ -0,0 +1,15 @@ +// +build !windows + +package ole + +func (v *IInspectable) GetIids() ([]*GUID, error) { + return []*GUID{}, NewError(E_NOTIMPL) +} + +func (v *IInspectable) GetRuntimeClassName() (string, error) { + return "", NewError(E_NOTIMPL) +} + +func (v *IInspectable) GetTrustLevel() (uint32, error) { + return uint32(0), NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/iinspectable_windows.go b/vendor/github.com/go-ole/go-ole/iinspectable_windows.go new file mode 100644 index 00000000..4519a4aa --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iinspectable_windows.go @@ -0,0 +1,72 @@ +// +build windows + +package ole + +import ( + "bytes" + "encoding/binary" + "reflect" + "syscall" + "unsafe" +) + +func (v *IInspectable) GetIids() (iids []*GUID, err error) { + var count uint32 + var array uintptr + hr, _, _ := syscall.Syscall( + v.VTable().GetIIds, + 3, + uintptr(unsafe.Pointer(v)), + uintptr(unsafe.Pointer(&count)), + uintptr(unsafe.Pointer(&array))) + if hr != 0 { + err = NewError(hr) + return + } + defer CoTaskMemFree(array) + + iids = make([]*GUID, count) + byteCount := count * uint32(unsafe.Sizeof(GUID{})) + slicehdr := reflect.SliceHeader{Data: array, Len: int(byteCount), Cap: int(byteCount)} + byteSlice := *(*[]byte)(unsafe.Pointer(&slicehdr)) + reader := bytes.NewReader(byteSlice) + for i := range iids { + guid := GUID{} + err = binary.Read(reader, binary.LittleEndian, &guid) + if err != nil { + return + } + iids[i] = &guid + } + return +} + +func (v *IInspectable) GetRuntimeClassName() (s string, err error) { + var hstring HString + hr, _, _ := syscall.Syscall( + v.VTable().GetRuntimeClassName, + 2, + uintptr(unsafe.Pointer(v)), + uintptr(unsafe.Pointer(&hstring)), + 0) + if hr != 0 { + err = NewError(hr) + return + } + s = hstring.String() + DeleteHString(hstring) + return +} + +func (v *IInspectable) GetTrustLevel() (level uint32, err error) { + hr, _, _ := syscall.Syscall( + v.VTable().GetTrustLevel, + 2, + uintptr(unsafe.Pointer(v)), + uintptr(unsafe.Pointer(&level)), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go b/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go new file mode 100644 index 00000000..25f3a6f2 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go @@ -0,0 +1,21 @@ +package ole + +import "unsafe" + +type IProvideClassInfo struct { + IUnknown +} + +type IProvideClassInfoVtbl struct { + IUnknownVtbl + GetClassInfo uintptr +} + +func (v *IProvideClassInfo) VTable() *IProvideClassInfoVtbl { + return (*IProvideClassInfoVtbl)(unsafe.Pointer(v.RawVTable)) +} + +func (v *IProvideClassInfo) GetClassInfo() (cinfo *ITypeInfo, err error) { + cinfo, err = getClassInfo(v) + return +} diff --git a/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go b/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go new file mode 100644 index 00000000..7e3cb63e --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go @@ -0,0 +1,7 @@ +// +build !windows + +package ole + +func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { + return nil, NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go b/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go new file mode 100644 index 00000000..2ad01639 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go @@ -0,0 +1,21 @@ +// +build windows + +package ole + +import ( + "syscall" + "unsafe" +) + +func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { + hr, _, _ := syscall.Syscall( + disp.VTable().GetClassInfo, + 2, + uintptr(unsafe.Pointer(disp)), + uintptr(unsafe.Pointer(&tinfo)), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/itypeinfo.go b/vendor/github.com/go-ole/go-ole/itypeinfo.go new file mode 100644 index 00000000..dd3c5e21 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/itypeinfo.go @@ -0,0 +1,34 @@ +package ole + +import "unsafe" + +type ITypeInfo struct { + IUnknown +} + +type ITypeInfoVtbl struct { + IUnknownVtbl + GetTypeAttr uintptr + GetTypeComp uintptr + GetFuncDesc uintptr + GetVarDesc uintptr + GetNames uintptr + GetRefTypeOfImplType uintptr + GetImplTypeFlags uintptr + GetIDsOfNames uintptr + Invoke uintptr + GetDocumentation uintptr + GetDllEntry uintptr + GetRefTypeInfo uintptr + AddressOfMember uintptr + CreateInstance uintptr + GetMops uintptr + GetContainingTypeLib uintptr + ReleaseTypeAttr uintptr + ReleaseFuncDesc uintptr + ReleaseVarDesc uintptr +} + +func (v *ITypeInfo) VTable() *ITypeInfoVtbl { + return (*ITypeInfoVtbl)(unsafe.Pointer(v.RawVTable)) +} diff --git a/vendor/github.com/go-ole/go-ole/itypeinfo_func.go b/vendor/github.com/go-ole/go-ole/itypeinfo_func.go new file mode 100644 index 00000000..8364a659 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/itypeinfo_func.go @@ -0,0 +1,7 @@ +// +build !windows + +package ole + +func (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) { + return nil, NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go b/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go new file mode 100644 index 00000000..54782b3d --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go @@ -0,0 +1,21 @@ +// +build windows + +package ole + +import ( + "syscall" + "unsafe" +) + +func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) { + hr, _, _ := syscall.Syscall( + uintptr(v.VTable().GetTypeAttr), + 2, + uintptr(unsafe.Pointer(v)), + uintptr(unsafe.Pointer(&tattr)), + 0) + if hr != 0 { + err = NewError(hr) + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/iunknown.go b/vendor/github.com/go-ole/go-ole/iunknown.go new file mode 100644 index 00000000..108f28ea --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iunknown.go @@ -0,0 +1,57 @@ +package ole + +import "unsafe" + +type IUnknown struct { + RawVTable *interface{} +} + +type IUnknownVtbl struct { + QueryInterface uintptr + AddRef uintptr + Release uintptr +} + +type UnknownLike interface { + QueryInterface(iid *GUID) (disp *IDispatch, err error) + AddRef() int32 + Release() int32 +} + +func (v *IUnknown) VTable() *IUnknownVtbl { + return (*IUnknownVtbl)(unsafe.Pointer(v.RawVTable)) +} + +func (v *IUnknown) PutQueryInterface(interfaceID *GUID, obj interface{}) error { + return reflectQueryInterface(v, v.VTable().QueryInterface, interfaceID, obj) +} + +func (v *IUnknown) IDispatch(interfaceID *GUID) (dispatch *IDispatch, err error) { + err = v.PutQueryInterface(interfaceID, &dispatch) + return +} + +func (v *IUnknown) IEnumVARIANT(interfaceID *GUID) (enum *IEnumVARIANT, err error) { + err = v.PutQueryInterface(interfaceID, &enum) + return +} + +func (v *IUnknown) QueryInterface(iid *GUID) (*IDispatch, error) { + return queryInterface(v, iid) +} + +func (v *IUnknown) MustQueryInterface(iid *GUID) (disp *IDispatch) { + unk, err := queryInterface(v, iid) + if err != nil { + panic(err) + } + return unk +} + +func (v *IUnknown) AddRef() int32 { + return addRef(v) +} + +func (v *IUnknown) Release() int32 { + return release(v) +} diff --git a/vendor/github.com/go-ole/go-ole/iunknown_func.go b/vendor/github.com/go-ole/go-ole/iunknown_func.go new file mode 100644 index 00000000..d0a62cfd --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iunknown_func.go @@ -0,0 +1,19 @@ +// +build !windows + +package ole + +func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { + return NewError(E_NOTIMPL) +} + +func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { + return nil, NewError(E_NOTIMPL) +} + +func addRef(unk *IUnknown) int32 { + return 0 +} + +func release(unk *IUnknown) int32 { + return 0 +} diff --git a/vendor/github.com/go-ole/go-ole/iunknown_windows.go b/vendor/github.com/go-ole/go-ole/iunknown_windows.go new file mode 100644 index 00000000..ede5bb8c --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/iunknown_windows.go @@ -0,0 +1,58 @@ +// +build windows + +package ole + +import ( + "reflect" + "syscall" + "unsafe" +) + +func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { + selfValue := reflect.ValueOf(self).Elem() + objValue := reflect.ValueOf(obj).Elem() + + hr, _, _ := syscall.Syscall( + method, + 3, + selfValue.UnsafeAddr(), + uintptr(unsafe.Pointer(interfaceID)), + objValue.Addr().Pointer()) + if hr != 0 { + err = NewError(hr) + } + return +} + +func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { + hr, _, _ := syscall.Syscall( + unk.VTable().QueryInterface, + 3, + uintptr(unsafe.Pointer(unk)), + uintptr(unsafe.Pointer(iid)), + uintptr(unsafe.Pointer(&disp))) + if hr != 0 { + err = NewError(hr) + } + return +} + +func addRef(unk *IUnknown) int32 { + ret, _, _ := syscall.Syscall( + unk.VTable().AddRef, + 1, + uintptr(unsafe.Pointer(unk)), + 0, + 0) + return int32(ret) +} + +func release(unk *IUnknown) int32 { + ret, _, _ := syscall.Syscall( + unk.VTable().Release, + 1, + uintptr(unsafe.Pointer(unk)), + 0, + 0) + return int32(ret) +} diff --git a/vendor/github.com/go-ole/go-ole/ole.go b/vendor/github.com/go-ole/go-ole/ole.go new file mode 100644 index 00000000..dbd132bb --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/ole.go @@ -0,0 +1,190 @@ +package ole + +import ( + "fmt" + "strings" + "unsafe" +) + +// DISPPARAMS are the arguments that passed to methods or property. +type DISPPARAMS struct { + rgvarg uintptr + rgdispidNamedArgs uintptr + cArgs uint32 + cNamedArgs uint32 +} + +// EXCEPINFO defines exception info. +type EXCEPINFO struct { + wCode uint16 + wReserved uint16 + bstrSource *uint16 + bstrDescription *uint16 + bstrHelpFile *uint16 + dwHelpContext uint32 + pvReserved uintptr + pfnDeferredFillIn uintptr + scode uint32 + + // Go-specific part. Don't move upper cos it'll break structure layout for native code. + rendered bool + source string + description string + helpFile string +} + +// renderStrings translates BSTR strings to Go ones so `.Error` and `.String` +// could be safely called after `.Clear`. We need this when we can't rely on +// a caller to call `.Clear`. +func (e *EXCEPINFO) renderStrings() { + e.rendered = true + if e.bstrSource == nil { + e.source = "" + } else { + e.source = BstrToString(e.bstrSource) + } + if e.bstrDescription == nil { + e.description = "" + } else { + e.description = BstrToString(e.bstrDescription) + } + if e.bstrHelpFile == nil { + e.helpFile = "" + } else { + e.helpFile = BstrToString(e.bstrHelpFile) + } +} + +// Clear frees BSTR strings inside an EXCEPINFO and set it to NULL. +func (e *EXCEPINFO) Clear() { + freeBSTR := func(s *uint16) { + // SysFreeString don't return errors and is safe for call's on NULL. + // https://docs.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-sysfreestring + _ = SysFreeString((*int16)(unsafe.Pointer(s))) + } + + if e.bstrSource != nil { + freeBSTR(e.bstrSource) + e.bstrSource = nil + } + if e.bstrDescription != nil { + freeBSTR(e.bstrDescription) + e.bstrDescription = nil + } + if e.bstrHelpFile != nil { + freeBSTR(e.bstrHelpFile) + e.bstrHelpFile = nil + } +} + +// WCode return wCode in EXCEPINFO. +func (e EXCEPINFO) WCode() uint16 { + return e.wCode +} + +// SCODE return scode in EXCEPINFO. +func (e EXCEPINFO) SCODE() uint32 { + return e.scode +} + +// String convert EXCEPINFO to string. +func (e EXCEPINFO) String() string { + if !e.rendered { + e.renderStrings() + } + return fmt.Sprintf( + "wCode: %#x, bstrSource: %v, bstrDescription: %v, bstrHelpFile: %v, dwHelpContext: %#x, scode: %#x", + e.wCode, e.source, e.description, e.helpFile, e.dwHelpContext, e.scode, + ) +} + +// Error implements error interface and returns error string. +func (e EXCEPINFO) Error() string { + if !e.rendered { + e.renderStrings() + } + + if e.description != "" { + return strings.TrimSpace(e.description) + } + + code := e.scode + if e.wCode != 0 { + code = uint32(e.wCode) + } + return fmt.Sprintf("%v: %#x", e.source, code) +} + +// PARAMDATA defines parameter data type. +type PARAMDATA struct { + Name *int16 + Vt uint16 +} + +// METHODDATA defines method info. +type METHODDATA struct { + Name *uint16 + Data *PARAMDATA + Dispid int32 + Meth uint32 + CC int32 + CArgs uint32 + Flags uint16 + VtReturn uint32 +} + +// INTERFACEDATA defines interface info. +type INTERFACEDATA struct { + MethodData *METHODDATA + CMembers uint32 +} + +// Point is 2D vector type. +type Point struct { + X int32 + Y int32 +} + +// Msg is message between processes. +type Msg struct { + Hwnd uint32 + Message uint32 + Wparam int32 + Lparam int32 + Time uint32 + Pt Point +} + +// TYPEDESC defines data type. +type TYPEDESC struct { + Hreftype uint32 + VT uint16 +} + +// IDLDESC defines IDL info. +type IDLDESC struct { + DwReserved uint32 + WIDLFlags uint16 +} + +// TYPEATTR defines type info. +type TYPEATTR struct { + Guid GUID + Lcid uint32 + dwReserved uint32 + MemidConstructor int32 + MemidDestructor int32 + LpstrSchema *uint16 + CbSizeInstance uint32 + Typekind int32 + CFuncs uint16 + CVars uint16 + CImplTypes uint16 + CbSizeVft uint16 + CbAlignment uint16 + WTypeFlags uint16 + WMajorVerNum uint16 + WMinorVerNum uint16 + TdescAlias TYPEDESC + IdldescType IDLDESC +} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/connection.go b/vendor/github.com/go-ole/go-ole/oleutil/connection.go new file mode 100644 index 00000000..60df73cd --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/oleutil/connection.go @@ -0,0 +1,100 @@ +// +build windows + +package oleutil + +import ( + "reflect" + "unsafe" + + ole "github.com/go-ole/go-ole" +) + +type stdDispatch struct { + lpVtbl *stdDispatchVtbl + ref int32 + iid *ole.GUID + iface interface{} + funcMap map[string]int32 +} + +type stdDispatchVtbl struct { + pQueryInterface uintptr + pAddRef uintptr + pRelease uintptr + pGetTypeInfoCount uintptr + pGetTypeInfo uintptr + pGetIDsOfNames uintptr + pInvoke uintptr +} + +func dispQueryInterface(this *ole.IUnknown, iid *ole.GUID, punk **ole.IUnknown) uint32 { + pthis := (*stdDispatch)(unsafe.Pointer(this)) + *punk = nil + if ole.IsEqualGUID(iid, ole.IID_IUnknown) || + ole.IsEqualGUID(iid, ole.IID_IDispatch) { + dispAddRef(this) + *punk = this + return ole.S_OK + } + if ole.IsEqualGUID(iid, pthis.iid) { + dispAddRef(this) + *punk = this + return ole.S_OK + } + return ole.E_NOINTERFACE +} + +func dispAddRef(this *ole.IUnknown) int32 { + pthis := (*stdDispatch)(unsafe.Pointer(this)) + pthis.ref++ + return pthis.ref +} + +func dispRelease(this *ole.IUnknown) int32 { + pthis := (*stdDispatch)(unsafe.Pointer(this)) + pthis.ref-- + return pthis.ref +} + +func dispGetIDsOfNames(this *ole.IUnknown, iid *ole.GUID, wnames []*uint16, namelen int, lcid int, pdisp []int32) uintptr { + pthis := (*stdDispatch)(unsafe.Pointer(this)) + names := make([]string, len(wnames)) + for i := 0; i < len(names); i++ { + names[i] = ole.LpOleStrToString(wnames[i]) + } + for n := 0; n < namelen; n++ { + if id, ok := pthis.funcMap[names[n]]; ok { + pdisp[n] = id + } + } + return ole.S_OK +} + +func dispGetTypeInfoCount(pcount *int) uintptr { + if pcount != nil { + *pcount = 0 + } + return ole.S_OK +} + +func dispGetTypeInfo(ptypeif *uintptr) uintptr { + return ole.E_NOTIMPL +} + +func dispInvoke(this *ole.IDispatch, dispid int32, riid *ole.GUID, lcid int, flags int16, dispparams *ole.DISPPARAMS, result *ole.VARIANT, pexcepinfo *ole.EXCEPINFO, nerr *uint) uintptr { + pthis := (*stdDispatch)(unsafe.Pointer(this)) + found := "" + for name, id := range pthis.funcMap { + if id == dispid { + found = name + } + } + if found != "" { + rv := reflect.ValueOf(pthis.iface).Elem() + rm := rv.MethodByName(found) + rr := rm.Call([]reflect.Value{}) + println(len(rr)) + return ole.S_OK + } + return ole.E_NOTIMPL +} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go b/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go new file mode 100644 index 00000000..8818fb82 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go @@ -0,0 +1,10 @@ +// +build !windows + +package oleutil + +import ole "github.com/go-ole/go-ole" + +// ConnectObject creates a connection point between two services for communication. +func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (uint32, error) { + return 0, ole.NewError(ole.E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go b/vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go new file mode 100644 index 00000000..ab9c0d8d --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go @@ -0,0 +1,58 @@ +// +build windows + +package oleutil + +import ( + "reflect" + "syscall" + "unsafe" + + ole "github.com/go-ole/go-ole" +) + +// ConnectObject creates a connection point between two services for communication. +func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (cookie uint32, err error) { + unknown, err := disp.QueryInterface(ole.IID_IConnectionPointContainer) + if err != nil { + return + } + + container := (*ole.IConnectionPointContainer)(unsafe.Pointer(unknown)) + var point *ole.IConnectionPoint + err = container.FindConnectionPoint(iid, &point) + if err != nil { + return + } + if edisp, ok := idisp.(*ole.IUnknown); ok { + cookie, err = point.Advise(edisp) + container.Release() + if err != nil { + return + } + } + rv := reflect.ValueOf(disp).Elem() + if rv.Type().Kind() == reflect.Struct { + dest := &stdDispatch{} + dest.lpVtbl = &stdDispatchVtbl{} + dest.lpVtbl.pQueryInterface = syscall.NewCallback(dispQueryInterface) + dest.lpVtbl.pAddRef = syscall.NewCallback(dispAddRef) + dest.lpVtbl.pRelease = syscall.NewCallback(dispRelease) + dest.lpVtbl.pGetTypeInfoCount = syscall.NewCallback(dispGetTypeInfoCount) + dest.lpVtbl.pGetTypeInfo = syscall.NewCallback(dispGetTypeInfo) + dest.lpVtbl.pGetIDsOfNames = syscall.NewCallback(dispGetIDsOfNames) + dest.lpVtbl.pInvoke = syscall.NewCallback(dispInvoke) + dest.iface = disp + dest.iid = iid + cookie, err = point.Advise((*ole.IUnknown)(unsafe.Pointer(dest))) + container.Release() + if err != nil { + point.Release() + return + } + return + } + + container.Release() + + return 0, ole.NewError(ole.E_INVALIDARG) +} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/go-get.go b/vendor/github.com/go-ole/go-ole/oleutil/go-get.go new file mode 100644 index 00000000..58347628 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/oleutil/go-get.go @@ -0,0 +1,6 @@ +// This file is here so go get succeeds as without it errors with: +// no buildable Go source files in ... +// +// +build !windows + +package oleutil diff --git a/vendor/github.com/go-ole/go-ole/oleutil/oleutil.go b/vendor/github.com/go-ole/go-ole/oleutil/oleutil.go new file mode 100644 index 00000000..f7803c1e --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/oleutil/oleutil.go @@ -0,0 +1,127 @@ +package oleutil + +import ole "github.com/go-ole/go-ole" + +// ClassIDFrom retrieves class ID whether given is program ID or application string. +func ClassIDFrom(programID string) (classID *ole.GUID, err error) { + return ole.ClassIDFrom(programID) +} + +// CreateObject creates object from programID based on interface type. +// +// Only supports IUnknown. +// +// Program ID can be either program ID or application string. +func CreateObject(programID string) (unknown *ole.IUnknown, err error) { + classID, err := ole.ClassIDFrom(programID) + if err != nil { + return + } + + unknown, err = ole.CreateInstance(classID, ole.IID_IUnknown) + if err != nil { + return + } + + return +} + +// GetActiveObject retrieves active object for program ID and interface ID based +// on interface type. +// +// Only supports IUnknown. +// +// Program ID can be either program ID or application string. +func GetActiveObject(programID string) (unknown *ole.IUnknown, err error) { + classID, err := ole.ClassIDFrom(programID) + if err != nil { + return + } + + unknown, err = ole.GetActiveObject(classID, ole.IID_IUnknown) + if err != nil { + return + } + + return +} + +// CallMethod calls method on IDispatch with parameters. +func CallMethod(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { + return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_METHOD, params) +} + +// MustCallMethod calls method on IDispatch with parameters or panics. +func MustCallMethod(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { + r, err := CallMethod(disp, name, params...) + if err != nil { + panic(err.Error()) + } + return r +} + +// GetProperty retrieves property from IDispatch. +func GetProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { + return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_PROPERTYGET, params) +} + +// MustGetProperty retrieves property from IDispatch or panics. +func MustGetProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { + r, err := GetProperty(disp, name, params...) + if err != nil { + panic(err.Error()) + } + return r +} + +// PutProperty mutates property. +func PutProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { + return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_PROPERTYPUT, params) +} + +// MustPutProperty mutates property or panics. +func MustPutProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { + r, err := PutProperty(disp, name, params...) + if err != nil { + panic(err.Error()) + } + return r +} + +// PutPropertyRef mutates property reference. +func PutPropertyRef(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { + return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_PROPERTYPUTREF, params) +} + +// MustPutPropertyRef mutates property reference or panics. +func MustPutPropertyRef(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { + r, err := PutPropertyRef(disp, name, params...) + if err != nil { + panic(err.Error()) + } + return r +} + +func ForEach(disp *ole.IDispatch, f func(v *ole.VARIANT) error) error { + newEnum, err := disp.GetProperty("_NewEnum") + if err != nil { + return err + } + defer newEnum.Clear() + + enum, err := newEnum.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) + if err != nil { + return err + } + defer enum.Release() + + for item, length, err := enum.Next(1); length > 0; item, length, err = enum.Next(1) { + if err != nil { + return err + } + if ferr := f(&item); ferr != nil { + return ferr + } + } + return nil +} diff --git a/vendor/github.com/go-ole/go-ole/safearray.go b/vendor/github.com/go-ole/go-ole/safearray.go new file mode 100644 index 00000000..a5201b56 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/safearray.go @@ -0,0 +1,27 @@ +// Package is meant to retrieve and process safe array data returned from COM. + +package ole + +// SafeArrayBound defines the SafeArray boundaries. +type SafeArrayBound struct { + Elements uint32 + LowerBound int32 +} + +// SafeArray is how COM handles arrays. +type SafeArray struct { + Dimensions uint16 + FeaturesFlag uint16 + ElementsSize uint32 + LocksAmount uint32 + Data uint32 + Bounds [16]byte +} + +// SAFEARRAY is obsolete, exists for backwards compatibility. +// Use SafeArray +type SAFEARRAY SafeArray + +// SAFEARRAYBOUND is obsolete, exists for backwards compatibility. +// Use SafeArrayBound +type SAFEARRAYBOUND SafeArrayBound diff --git a/vendor/github.com/go-ole/go-ole/safearray_func.go b/vendor/github.com/go-ole/go-ole/safearray_func.go new file mode 100644 index 00000000..0dee670c --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/safearray_func.go @@ -0,0 +1,211 @@ +// +build !windows + +package ole + +import ( + "unsafe" +) + +// safeArrayAccessData returns raw array pointer. +// +// AKA: SafeArrayAccessData in Windows API. +func safeArrayAccessData(safearray *SafeArray) (uintptr, error) { + return uintptr(0), NewError(E_NOTIMPL) +} + +// safeArrayUnaccessData releases raw array. +// +// AKA: SafeArrayUnaccessData in Windows API. +func safeArrayUnaccessData(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayAllocData allocates SafeArray. +// +// AKA: SafeArrayAllocData in Windows API. +func safeArrayAllocData(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayAllocDescriptor allocates SafeArray. +// +// AKA: SafeArrayAllocDescriptor in Windows API. +func safeArrayAllocDescriptor(dimensions uint32) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayAllocDescriptorEx allocates SafeArray. +// +// AKA: SafeArrayAllocDescriptorEx in Windows API. +func safeArrayAllocDescriptorEx(variantType VT, dimensions uint32) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayCopy returns copy of SafeArray. +// +// AKA: SafeArrayCopy in Windows API. +func safeArrayCopy(original *SafeArray) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayCopyData duplicates SafeArray into another SafeArray object. +// +// AKA: SafeArrayCopyData in Windows API. +func safeArrayCopyData(original *SafeArray, duplicate *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayCreate creates SafeArray. +// +// AKA: SafeArrayCreate in Windows API. +func safeArrayCreate(variantType VT, dimensions uint32, bounds *SafeArrayBound) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayCreateEx creates SafeArray. +// +// AKA: SafeArrayCreateEx in Windows API. +func safeArrayCreateEx(variantType VT, dimensions uint32, bounds *SafeArrayBound, extra uintptr) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayCreateVector creates SafeArray. +// +// AKA: SafeArrayCreateVector in Windows API. +func safeArrayCreateVector(variantType VT, lowerBound int32, length uint32) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayCreateVectorEx creates SafeArray. +// +// AKA: SafeArrayCreateVectorEx in Windows API. +func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length uint32, extra uintptr) (*SafeArray, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayDestroy destroys SafeArray object. +// +// AKA: SafeArrayDestroy in Windows API. +func safeArrayDestroy(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayDestroyData destroys SafeArray object. +// +// AKA: SafeArrayDestroyData in Windows API. +func safeArrayDestroyData(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayDestroyDescriptor destroys SafeArray object. +// +// AKA: SafeArrayDestroyDescriptor in Windows API. +func safeArrayDestroyDescriptor(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayGetDim is the amount of dimensions in the SafeArray. +// +// SafeArrays may have multiple dimensions. Meaning, it could be +// multidimensional array. +// +// AKA: SafeArrayGetDim in Windows API. +func safeArrayGetDim(safearray *SafeArray) (*uint32, error) { + u := uint32(0) + return &u, NewError(E_NOTIMPL) +} + +// safeArrayGetElementSize is the element size in bytes. +// +// AKA: SafeArrayGetElemsize in Windows API. +func safeArrayGetElementSize(safearray *SafeArray) (*uint32, error) { + u := uint32(0) + return &u, NewError(E_NOTIMPL) +} + +// safeArrayGetElement retrieves element at given index. +func safeArrayGetElement(safearray *SafeArray, index int32, pv unsafe.Pointer) error { + return NewError(E_NOTIMPL) +} + +// safeArrayGetElement retrieves element at given index and converts to string. +func safeArrayGetElementString(safearray *SafeArray, index int32) (string, error) { + return "", NewError(E_NOTIMPL) +} + +// safeArrayGetIID is the InterfaceID of the elements in the SafeArray. +// +// AKA: SafeArrayGetIID in Windows API. +func safeArrayGetIID(safearray *SafeArray) (*GUID, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArrayGetLBound returns lower bounds of SafeArray. +// +// SafeArrays may have multiple dimensions. Meaning, it could be +// multidimensional array. +// +// AKA: SafeArrayGetLBound in Windows API. +func safeArrayGetLBound(safearray *SafeArray, dimension uint32) (int32, error) { + return int32(0), NewError(E_NOTIMPL) +} + +// safeArrayGetUBound returns upper bounds of SafeArray. +// +// SafeArrays may have multiple dimensions. Meaning, it could be +// multidimensional array. +// +// AKA: SafeArrayGetUBound in Windows API. +func safeArrayGetUBound(safearray *SafeArray, dimension uint32) (int32, error) { + return int32(0), NewError(E_NOTIMPL) +} + +// safeArrayGetVartype returns data type of SafeArray. +// +// AKA: SafeArrayGetVartype in Windows API. +func safeArrayGetVartype(safearray *SafeArray) (uint16, error) { + return uint16(0), NewError(E_NOTIMPL) +} + +// safeArrayLock locks SafeArray for reading to modify SafeArray. +// +// This must be called during some calls to ensure that another process does not +// read or write to the SafeArray during editing. +// +// AKA: SafeArrayLock in Windows API. +func safeArrayLock(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayUnlock unlocks SafeArray for reading. +// +// AKA: SafeArrayUnlock in Windows API. +func safeArrayUnlock(safearray *SafeArray) error { + return NewError(E_NOTIMPL) +} + +// safeArrayPutElement stores the data element at the specified location in the +// array. +// +// AKA: SafeArrayPutElement in Windows API. +func safeArrayPutElement(safearray *SafeArray, index int64, element uintptr) error { + return NewError(E_NOTIMPL) +} + +// safeArrayGetRecordInfo accesses IRecordInfo info for custom types. +// +// AKA: SafeArrayGetRecordInfo in Windows API. +// +// XXX: Must implement IRecordInfo interface for this to return. +func safeArrayGetRecordInfo(safearray *SafeArray) (interface{}, error) { + return nil, NewError(E_NOTIMPL) +} + +// safeArraySetRecordInfo mutates IRecordInfo info for custom types. +// +// AKA: SafeArraySetRecordInfo in Windows API. +// +// XXX: Must implement IRecordInfo interface for this to return. +func safeArraySetRecordInfo(safearray *SafeArray, recordInfo interface{}) error { + return NewError(E_NOTIMPL) +} diff --git a/vendor/github.com/go-ole/go-ole/safearray_windows.go b/vendor/github.com/go-ole/go-ole/safearray_windows.go new file mode 100644 index 00000000..0c1b3a10 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/safearray_windows.go @@ -0,0 +1,337 @@ +// +build windows + +package ole + +import ( + "unsafe" +) + +var ( + procSafeArrayAccessData = modoleaut32.NewProc("SafeArrayAccessData") + procSafeArrayAllocData = modoleaut32.NewProc("SafeArrayAllocData") + procSafeArrayAllocDescriptor = modoleaut32.NewProc("SafeArrayAllocDescriptor") + procSafeArrayAllocDescriptorEx = modoleaut32.NewProc("SafeArrayAllocDescriptorEx") + procSafeArrayCopy = modoleaut32.NewProc("SafeArrayCopy") + procSafeArrayCopyData = modoleaut32.NewProc("SafeArrayCopyData") + procSafeArrayCreate = modoleaut32.NewProc("SafeArrayCreate") + procSafeArrayCreateEx = modoleaut32.NewProc("SafeArrayCreateEx") + procSafeArrayCreateVector = modoleaut32.NewProc("SafeArrayCreateVector") + procSafeArrayCreateVectorEx = modoleaut32.NewProc("SafeArrayCreateVectorEx") + procSafeArrayDestroy = modoleaut32.NewProc("SafeArrayDestroy") + procSafeArrayDestroyData = modoleaut32.NewProc("SafeArrayDestroyData") + procSafeArrayDestroyDescriptor = modoleaut32.NewProc("SafeArrayDestroyDescriptor") + procSafeArrayGetDim = modoleaut32.NewProc("SafeArrayGetDim") + procSafeArrayGetElement = modoleaut32.NewProc("SafeArrayGetElement") + procSafeArrayGetElemsize = modoleaut32.NewProc("SafeArrayGetElemsize") + procSafeArrayGetIID = modoleaut32.NewProc("SafeArrayGetIID") + procSafeArrayGetLBound = modoleaut32.NewProc("SafeArrayGetLBound") + procSafeArrayGetUBound = modoleaut32.NewProc("SafeArrayGetUBound") + procSafeArrayGetVartype = modoleaut32.NewProc("SafeArrayGetVartype") + procSafeArrayLock = modoleaut32.NewProc("SafeArrayLock") + procSafeArrayPtrOfIndex = modoleaut32.NewProc("SafeArrayPtrOfIndex") + procSafeArrayUnaccessData = modoleaut32.NewProc("SafeArrayUnaccessData") + procSafeArrayUnlock = modoleaut32.NewProc("SafeArrayUnlock") + procSafeArrayPutElement = modoleaut32.NewProc("SafeArrayPutElement") + //procSafeArrayRedim = modoleaut32.NewProc("SafeArrayRedim") // TODO + //procSafeArraySetIID = modoleaut32.NewProc("SafeArraySetIID") // TODO + procSafeArrayGetRecordInfo = modoleaut32.NewProc("SafeArrayGetRecordInfo") + procSafeArraySetRecordInfo = modoleaut32.NewProc("SafeArraySetRecordInfo") +) + +// safeArrayAccessData returns raw array pointer. +// +// AKA: SafeArrayAccessData in Windows API. +// Todo: Test +func safeArrayAccessData(safearray *SafeArray) (element uintptr, err error) { + err = convertHresultToError( + procSafeArrayAccessData.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&element)))) + return +} + +// safeArrayUnaccessData releases raw array. +// +// AKA: SafeArrayUnaccessData in Windows API. +func safeArrayUnaccessData(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayUnaccessData.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayAllocData allocates SafeArray. +// +// AKA: SafeArrayAllocData in Windows API. +func safeArrayAllocData(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayAllocData.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayAllocDescriptor allocates SafeArray. +// +// AKA: SafeArrayAllocDescriptor in Windows API. +func safeArrayAllocDescriptor(dimensions uint32) (safearray *SafeArray, err error) { + err = convertHresultToError( + procSafeArrayAllocDescriptor.Call(uintptr(dimensions), uintptr(unsafe.Pointer(&safearray)))) + return +} + +// safeArrayAllocDescriptorEx allocates SafeArray. +// +// AKA: SafeArrayAllocDescriptorEx in Windows API. +func safeArrayAllocDescriptorEx(variantType VT, dimensions uint32) (safearray *SafeArray, err error) { + err = convertHresultToError( + procSafeArrayAllocDescriptorEx.Call( + uintptr(variantType), + uintptr(dimensions), + uintptr(unsafe.Pointer(&safearray)))) + return +} + +// safeArrayCopy returns copy of SafeArray. +// +// AKA: SafeArrayCopy in Windows API. +func safeArrayCopy(original *SafeArray) (safearray *SafeArray, err error) { + err = convertHresultToError( + procSafeArrayCopy.Call( + uintptr(unsafe.Pointer(original)), + uintptr(unsafe.Pointer(&safearray)))) + return +} + +// safeArrayCopyData duplicates SafeArray into another SafeArray object. +// +// AKA: SafeArrayCopyData in Windows API. +func safeArrayCopyData(original *SafeArray, duplicate *SafeArray) (err error) { + err = convertHresultToError( + procSafeArrayCopyData.Call( + uintptr(unsafe.Pointer(original)), + uintptr(unsafe.Pointer(duplicate)))) + return +} + +// safeArrayCreate creates SafeArray. +// +// AKA: SafeArrayCreate in Windows API. +func safeArrayCreate(variantType VT, dimensions uint32, bounds *SafeArrayBound) (safearray *SafeArray, err error) { + sa, _, err := procSafeArrayCreate.Call( + uintptr(variantType), + uintptr(dimensions), + uintptr(unsafe.Pointer(bounds))) + safearray = (*SafeArray)(unsafe.Pointer(&sa)) + return +} + +// safeArrayCreateEx creates SafeArray. +// +// AKA: SafeArrayCreateEx in Windows API. +func safeArrayCreateEx(variantType VT, dimensions uint32, bounds *SafeArrayBound, extra uintptr) (safearray *SafeArray, err error) { + sa, _, err := procSafeArrayCreateEx.Call( + uintptr(variantType), + uintptr(dimensions), + uintptr(unsafe.Pointer(bounds)), + extra) + safearray = (*SafeArray)(unsafe.Pointer(sa)) + return +} + +// safeArrayCreateVector creates SafeArray. +// +// AKA: SafeArrayCreateVector in Windows API. +func safeArrayCreateVector(variantType VT, lowerBound int32, length uint32) (safearray *SafeArray, err error) { + sa, _, err := procSafeArrayCreateVector.Call( + uintptr(variantType), + uintptr(lowerBound), + uintptr(length)) + safearray = (*SafeArray)(unsafe.Pointer(sa)) + return +} + +// safeArrayCreateVectorEx creates SafeArray. +// +// AKA: SafeArrayCreateVectorEx in Windows API. +func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length uint32, extra uintptr) (safearray *SafeArray, err error) { + sa, _, err := procSafeArrayCreateVectorEx.Call( + uintptr(variantType), + uintptr(lowerBound), + uintptr(length), + extra) + safearray = (*SafeArray)(unsafe.Pointer(sa)) + return +} + +// safeArrayDestroy destroys SafeArray object. +// +// AKA: SafeArrayDestroy in Windows API. +func safeArrayDestroy(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayDestroy.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayDestroyData destroys SafeArray object. +// +// AKA: SafeArrayDestroyData in Windows API. +func safeArrayDestroyData(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayDestroyData.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayDestroyDescriptor destroys SafeArray object. +// +// AKA: SafeArrayDestroyDescriptor in Windows API. +func safeArrayDestroyDescriptor(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayDestroyDescriptor.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayGetDim is the amount of dimensions in the SafeArray. +// +// SafeArrays may have multiple dimensions. Meaning, it could be +// multidimensional array. +// +// AKA: SafeArrayGetDim in Windows API. +func safeArrayGetDim(safearray *SafeArray) (dimensions *uint32, err error) { + l, _, err := procSafeArrayGetDim.Call(uintptr(unsafe.Pointer(safearray))) + dimensions = (*uint32)(unsafe.Pointer(l)) + return +} + +// safeArrayGetElementSize is the element size in bytes. +// +// AKA: SafeArrayGetElemsize in Windows API. +func safeArrayGetElementSize(safearray *SafeArray) (length *uint32, err error) { + l, _, err := procSafeArrayGetElemsize.Call(uintptr(unsafe.Pointer(safearray))) + length = (*uint32)(unsafe.Pointer(l)) + return +} + +// safeArrayGetElement retrieves element at given index. +func safeArrayGetElement(safearray *SafeArray, index int32, pv unsafe.Pointer) error { + return convertHresultToError( + procSafeArrayGetElement.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&index)), + uintptr(pv))) +} + +// safeArrayGetElementString retrieves element at given index and converts to string. +func safeArrayGetElementString(safearray *SafeArray, index int32) (str string, err error) { + var element *int16 + err = convertHresultToError( + procSafeArrayGetElement.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&index)), + uintptr(unsafe.Pointer(&element)))) + str = BstrToString(*(**uint16)(unsafe.Pointer(&element))) + SysFreeString(element) + return +} + +// safeArrayGetIID is the InterfaceID of the elements in the SafeArray. +// +// AKA: SafeArrayGetIID in Windows API. +func safeArrayGetIID(safearray *SafeArray) (guid *GUID, err error) { + err = convertHresultToError( + procSafeArrayGetIID.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&guid)))) + return +} + +// safeArrayGetLBound returns lower bounds of SafeArray. +// +// SafeArrays may have multiple dimensions. Meaning, it could be +// multidimensional array. +// +// AKA: SafeArrayGetLBound in Windows API. +func safeArrayGetLBound(safearray *SafeArray, dimension uint32) (lowerBound int32, err error) { + err = convertHresultToError( + procSafeArrayGetLBound.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(dimension), + uintptr(unsafe.Pointer(&lowerBound)))) + return +} + +// safeArrayGetUBound returns upper bounds of SafeArray. +// +// SafeArrays may have multiple dimensions. Meaning, it could be +// multidimensional array. +// +// AKA: SafeArrayGetUBound in Windows API. +func safeArrayGetUBound(safearray *SafeArray, dimension uint32) (upperBound int32, err error) { + err = convertHresultToError( + procSafeArrayGetUBound.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(dimension), + uintptr(unsafe.Pointer(&upperBound)))) + return +} + +// safeArrayGetVartype returns data type of SafeArray. +// +// AKA: SafeArrayGetVartype in Windows API. +func safeArrayGetVartype(safearray *SafeArray) (varType uint16, err error) { + err = convertHresultToError( + procSafeArrayGetVartype.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&varType)))) + return +} + +// safeArrayLock locks SafeArray for reading to modify SafeArray. +// +// This must be called during some calls to ensure that another process does not +// read or write to the SafeArray during editing. +// +// AKA: SafeArrayLock in Windows API. +func safeArrayLock(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayLock.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayUnlock unlocks SafeArray for reading. +// +// AKA: SafeArrayUnlock in Windows API. +func safeArrayUnlock(safearray *SafeArray) (err error) { + err = convertHresultToError(procSafeArrayUnlock.Call(uintptr(unsafe.Pointer(safearray)))) + return +} + +// safeArrayPutElement stores the data element at the specified location in the +// array. +// +// AKA: SafeArrayPutElement in Windows API. +func safeArrayPutElement(safearray *SafeArray, index int64, element uintptr) (err error) { + err = convertHresultToError( + procSafeArrayPutElement.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&index)), + uintptr(unsafe.Pointer(element)))) + return +} + +// safeArrayGetRecordInfo accesses IRecordInfo info for custom types. +// +// AKA: SafeArrayGetRecordInfo in Windows API. +// +// XXX: Must implement IRecordInfo interface for this to return. +func safeArrayGetRecordInfo(safearray *SafeArray) (recordInfo interface{}, err error) { + err = convertHresultToError( + procSafeArrayGetRecordInfo.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&recordInfo)))) + return +} + +// safeArraySetRecordInfo mutates IRecordInfo info for custom types. +// +// AKA: SafeArraySetRecordInfo in Windows API. +// +// XXX: Must implement IRecordInfo interface for this to return. +func safeArraySetRecordInfo(safearray *SafeArray, recordInfo interface{}) (err error) { + err = convertHresultToError( + procSafeArraySetRecordInfo.Call( + uintptr(unsafe.Pointer(safearray)), + uintptr(unsafe.Pointer(&recordInfo)))) + return +} diff --git a/vendor/github.com/go-ole/go-ole/safearrayconversion.go b/vendor/github.com/go-ole/go-ole/safearrayconversion.go new file mode 100644 index 00000000..da737293 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/safearrayconversion.go @@ -0,0 +1,140 @@ +// Helper for converting SafeArray to array of objects. + +package ole + +import ( + "unsafe" +) + +type SafeArrayConversion struct { + Array *SafeArray +} + +func (sac *SafeArrayConversion) ToStringArray() (strings []string) { + totalElements, _ := sac.TotalElements(0) + strings = make([]string, totalElements) + + for i := int32(0); i < totalElements; i++ { + strings[int32(i)], _ = safeArrayGetElementString(sac.Array, i) + } + + return +} + +func (sac *SafeArrayConversion) ToByteArray() (bytes []byte) { + totalElements, _ := sac.TotalElements(0) + bytes = make([]byte, totalElements) + + for i := int32(0); i < totalElements; i++ { + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&bytes[int32(i)])) + } + + return +} + +func (sac *SafeArrayConversion) ToValueArray() (values []interface{}) { + totalElements, _ := sac.TotalElements(0) + values = make([]interface{}, totalElements) + vt, _ := safeArrayGetVartype(sac.Array) + + for i := int32(0); i < totalElements; i++ { + switch VT(vt) { + case VT_BOOL: + var v bool + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_I1: + var v int8 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_I2: + var v int16 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_I4: + var v int32 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_I8: + var v int64 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_UI1: + var v uint8 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_UI2: + var v uint16 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_UI4: + var v uint32 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_UI8: + var v uint64 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_R4: + var v float32 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_R8: + var v float64 + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v + case VT_BSTR: + v , _ := safeArrayGetElementString(sac.Array, i) + values[i] = v + case VT_VARIANT: + var v VARIANT + safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) + values[i] = v.Value() + v.Clear() + default: + // TODO + } + } + + return +} + +func (sac *SafeArrayConversion) GetType() (varType uint16, err error) { + return safeArrayGetVartype(sac.Array) +} + +func (sac *SafeArrayConversion) GetDimensions() (dimensions *uint32, err error) { + return safeArrayGetDim(sac.Array) +} + +func (sac *SafeArrayConversion) GetSize() (length *uint32, err error) { + return safeArrayGetElementSize(sac.Array) +} + +func (sac *SafeArrayConversion) TotalElements(index uint32) (totalElements int32, err error) { + if index < 1 { + index = 1 + } + + // Get array bounds + var LowerBounds int32 + var UpperBounds int32 + + LowerBounds, err = safeArrayGetLBound(sac.Array, index) + if err != nil { + return + } + + UpperBounds, err = safeArrayGetUBound(sac.Array, index) + if err != nil { + return + } + + totalElements = UpperBounds - LowerBounds + 1 + return +} + +// Release Safe Array memory +func (sac *SafeArrayConversion) Release() { + safeArrayDestroy(sac.Array) +} diff --git a/vendor/github.com/go-ole/go-ole/safearrayslices.go b/vendor/github.com/go-ole/go-ole/safearrayslices.go new file mode 100644 index 00000000..a9fa885f --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/safearrayslices.go @@ -0,0 +1,33 @@ +// +build windows + +package ole + +import ( + "unsafe" +) + +func safeArrayFromByteSlice(slice []byte) *SafeArray { + array, _ := safeArrayCreateVector(VT_UI1, 0, uint32(len(slice))) + + if array == nil { + panic("Could not convert []byte to SAFEARRAY") + } + + for i, v := range slice { + safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(&v))) + } + return array +} + +func safeArrayFromStringSlice(slice []string) *SafeArray { + array, _ := safeArrayCreateVector(VT_BSTR, 0, uint32(len(slice))) + + if array == nil { + panic("Could not convert []string to SAFEARRAY") + } + // SysAllocStringLen(s) + for i, v := range slice { + safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(SysAllocStringLen(v)))) + } + return array +} diff --git a/vendor/github.com/go-ole/go-ole/utility.go b/vendor/github.com/go-ole/go-ole/utility.go new file mode 100644 index 00000000..99ee82dc --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/utility.go @@ -0,0 +1,101 @@ +package ole + +import ( + "unicode/utf16" + "unsafe" +) + +// ClassIDFrom retrieves class ID whether given is program ID or application string. +// +// Helper that provides check against both Class ID from Program ID and Class ID from string. It is +// faster, if you know which you are using, to use the individual functions, but this will check +// against available functions for you. +func ClassIDFrom(programID string) (classID *GUID, err error) { + classID, err = CLSIDFromProgID(programID) + if err != nil { + classID, err = CLSIDFromString(programID) + if err != nil { + return + } + } + return +} + +// BytePtrToString converts byte pointer to a Go string. +func BytePtrToString(p *byte) string { + a := (*[10000]uint8)(unsafe.Pointer(p)) + i := 0 + for a[i] != 0 { + i++ + } + return string(a[:i]) +} + +// UTF16PtrToString is alias for LpOleStrToString. +// +// Kept for compatibility reasons. +func UTF16PtrToString(p *uint16) string { + return LpOleStrToString(p) +} + +// LpOleStrToString converts COM Unicode to Go string. +func LpOleStrToString(p *uint16) string { + if p == nil { + return "" + } + + length := lpOleStrLen(p) + a := make([]uint16, length) + + ptr := unsafe.Pointer(p) + + for i := 0; i < int(length); i++ { + a[i] = *(*uint16)(ptr) + ptr = unsafe.Pointer(uintptr(ptr) + 2) + } + + return string(utf16.Decode(a)) +} + +// BstrToString converts COM binary string to Go string. +func BstrToString(p *uint16) string { + if p == nil { + return "" + } + length := SysStringLen((*int16)(unsafe.Pointer(p))) + a := make([]uint16, length) + + ptr := unsafe.Pointer(p) + + for i := 0; i < int(length); i++ { + a[i] = *(*uint16)(ptr) + ptr = unsafe.Pointer(uintptr(ptr) + 2) + } + return string(utf16.Decode(a)) +} + +// lpOleStrLen returns the length of Unicode string. +func lpOleStrLen(p *uint16) (length int64) { + if p == nil { + return 0 + } + + ptr := unsafe.Pointer(p) + + for i := 0; ; i++ { + if 0 == *(*uint16)(ptr) { + length = int64(i) + break + } + ptr = unsafe.Pointer(uintptr(ptr) + 2) + } + return +} + +// convertHresultToError converts syscall to error, if call is unsuccessful. +func convertHresultToError(hr uintptr, r2 uintptr, ignore error) (err error) { + if hr != 0 { + err = NewError(hr) + } + return +} diff --git a/vendor/github.com/go-ole/go-ole/variables.go b/vendor/github.com/go-ole/go-ole/variables.go new file mode 100644 index 00000000..a6add1b0 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variables.go @@ -0,0 +1,15 @@ +// +build windows + +package ole + +import ( + "golang.org/x/sys/windows" +) + +var ( + modcombase = windows.NewLazySystemDLL("combase.dll") + modkernel32 = windows.NewLazySystemDLL("kernel32.dll") + modole32 = windows.NewLazySystemDLL("ole32.dll") + modoleaut32 = windows.NewLazySystemDLL("oleaut32.dll") + moduser32 = windows.NewLazySystemDLL("user32.dll") +) diff --git a/vendor/github.com/go-ole/go-ole/variant.go b/vendor/github.com/go-ole/go-ole/variant.go new file mode 100644 index 00000000..a2c8402f --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant.go @@ -0,0 +1,105 @@ +package ole + +import "unsafe" + +// NewVariant returns new variant based on type and value. +func NewVariant(vt VT, val int64) VARIANT { + return VARIANT{VT: vt, Val: val} +} + +// ToIUnknown converts Variant to Unknown object. +func (v *VARIANT) ToIUnknown() *IUnknown { + if v.VT != VT_UNKNOWN { + return nil + } + return (*IUnknown)(unsafe.Pointer(uintptr(v.Val))) +} + +// ToIDispatch converts variant to dispatch object. +func (v *VARIANT) ToIDispatch() *IDispatch { + if v.VT != VT_DISPATCH { + return nil + } + return (*IDispatch)(unsafe.Pointer(uintptr(v.Val))) +} + +// ToArray converts variant to SafeArray helper. +func (v *VARIANT) ToArray() *SafeArrayConversion { + if v.VT != VT_SAFEARRAY { + if v.VT&VT_ARRAY == 0 { + return nil + } + } + var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val))) + return &SafeArrayConversion{safeArray} +} + +// ToString converts variant to Go string. +func (v *VARIANT) ToString() string { + if v.VT != VT_BSTR { + return "" + } + return BstrToString(*(**uint16)(unsafe.Pointer(&v.Val))) +} + +// Clear the memory of variant object. +func (v *VARIANT) Clear() error { + return VariantClear(v) +} + +// Value returns variant value based on its type. +// +// Currently supported types: 2- and 4-byte integers, strings, bools. +// Note that 64-bit integers, datetimes, and other types are stored as strings +// and will be returned as strings. +// +// Needs to be further converted, because this returns an interface{}. +func (v *VARIANT) Value() interface{} { + switch v.VT { + case VT_I1: + return int8(v.Val) + case VT_UI1: + return uint8(v.Val) + case VT_I2: + return int16(v.Val) + case VT_UI2: + return uint16(v.Val) + case VT_I4: + return int32(v.Val) + case VT_UI4: + return uint32(v.Val) + case VT_I8: + return int64(v.Val) + case VT_UI8: + return uint64(v.Val) + case VT_INT: + return int(v.Val) + case VT_UINT: + return uint(v.Val) + case VT_INT_PTR: + return uintptr(v.Val) // TODO + case VT_UINT_PTR: + return uintptr(v.Val) + case VT_R4: + return *(*float32)(unsafe.Pointer(&v.Val)) + case VT_R8: + return *(*float64)(unsafe.Pointer(&v.Val)) + case VT_BSTR: + return v.ToString() + case VT_DATE: + // VT_DATE type will either return float64 or time.Time. + d := uint64(v.Val) + date, err := GetVariantDate(d) + if err != nil { + return float64(v.Val) + } + return date + case VT_UNKNOWN: + return v.ToIUnknown() + case VT_DISPATCH: + return v.ToIDispatch() + case VT_BOOL: + return (v.Val & 0xffff) != 0 + } + return nil +} diff --git a/vendor/github.com/go-ole/go-ole/variant_386.go b/vendor/github.com/go-ole/go-ole/variant_386.go new file mode 100644 index 00000000..e73736bf --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_386.go @@ -0,0 +1,11 @@ +// +build 386 + +package ole + +type VARIANT struct { + VT VT // 2 + wReserved1 uint16 // 4 + wReserved2 uint16 // 6 + wReserved3 uint16 // 8 + Val int64 // 16 +} diff --git a/vendor/github.com/go-ole/go-ole/variant_amd64.go b/vendor/github.com/go-ole/go-ole/variant_amd64.go new file mode 100644 index 00000000..dccdde13 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_amd64.go @@ -0,0 +1,12 @@ +// +build amd64 + +package ole + +type VARIANT struct { + VT VT // 2 + wReserved1 uint16 // 4 + wReserved2 uint16 // 6 + wReserved3 uint16 // 8 + Val int64 // 16 + _ [8]byte // 24 +} diff --git a/vendor/github.com/go-ole/go-ole/variant_arm.go b/vendor/github.com/go-ole/go-ole/variant_arm.go new file mode 100644 index 00000000..d4724544 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_arm.go @@ -0,0 +1,11 @@ +// +build arm + +package ole + +type VARIANT struct { + VT VT // 2 + wReserved1 uint16 // 4 + wReserved2 uint16 // 6 + wReserved3 uint16 // 8 + Val int64 // 16 +} diff --git a/vendor/github.com/go-ole/go-ole/variant_arm64.go b/vendor/github.com/go-ole/go-ole/variant_arm64.go new file mode 100644 index 00000000..78473cec --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_arm64.go @@ -0,0 +1,13 @@ +//go:build arm64 +// +build arm64 + +package ole + +type VARIANT struct { + VT VT // 2 + wReserved1 uint16 // 4 + wReserved2 uint16 // 6 + wReserved3 uint16 // 8 + Val int64 // 16 + _ [8]byte // 24 +} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_386.go b/vendor/github.com/go-ole/go-ole/variant_date_386.go new file mode 100644 index 00000000..1b970f63 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_date_386.go @@ -0,0 +1,22 @@ +// +build windows,386 + +package ole + +import ( + "errors" + "syscall" + "time" + "unsafe" +) + +// GetVariantDate converts COM Variant Time value to Go time.Time. +func GetVariantDate(value uint64) (time.Time, error) { + var st syscall.Systemtime + v1 := uint32(value) + v2 := uint32(value >> 32) + r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) + if r != 0 { + return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil + } + return time.Now(), errors.New("Could not convert to time, passing current time.") +} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_amd64.go b/vendor/github.com/go-ole/go-ole/variant_date_amd64.go new file mode 100644 index 00000000..6952f1f0 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_date_amd64.go @@ -0,0 +1,20 @@ +// +build windows,amd64 + +package ole + +import ( + "errors" + "syscall" + "time" + "unsafe" +) + +// GetVariantDate converts COM Variant Time value to Go time.Time. +func GetVariantDate(value uint64) (time.Time, error) { + var st syscall.Systemtime + r, _, _ := procVariantTimeToSystemTime.Call(uintptr(value), uintptr(unsafe.Pointer(&st))) + if r != 0 { + return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil + } + return time.Now(), errors.New("Could not convert to time, passing current time.") +} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_arm.go b/vendor/github.com/go-ole/go-ole/variant_date_arm.go new file mode 100644 index 00000000..09ec7b5c --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_date_arm.go @@ -0,0 +1,22 @@ +// +build windows,arm + +package ole + +import ( + "errors" + "syscall" + "time" + "unsafe" +) + +// GetVariantDate converts COM Variant Time value to Go time.Time. +func GetVariantDate(value uint64) (time.Time, error) { + var st syscall.Systemtime + v1 := uint32(value) + v2 := uint32(value >> 32) + r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) + if r != 0 { + return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil + } + return time.Now(), errors.New("Could not convert to time, passing current time.") +} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_arm64.go b/vendor/github.com/go-ole/go-ole/variant_date_arm64.go new file mode 100644 index 00000000..02b04a0d --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_date_arm64.go @@ -0,0 +1,23 @@ +//go:build windows && arm64 +// +build windows,arm64 + +package ole + +import ( + "errors" + "syscall" + "time" + "unsafe" +) + +// GetVariantDate converts COM Variant Time value to Go time.Time. +func GetVariantDate(value uint64) (time.Time, error) { + var st syscall.Systemtime + v1 := uint32(value) + v2 := uint32(value >> 32) + r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) + if r != 0 { + return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil + } + return time.Now(), errors.New("Could not convert to time, passing current time.") +} diff --git a/vendor/github.com/go-ole/go-ole/variant_ppc64le.go b/vendor/github.com/go-ole/go-ole/variant_ppc64le.go new file mode 100644 index 00000000..326427a7 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_ppc64le.go @@ -0,0 +1,12 @@ +// +build ppc64le + +package ole + +type VARIANT struct { + VT VT // 2 + wReserved1 uint16 // 4 + wReserved2 uint16 // 6 + wReserved3 uint16 // 8 + Val int64 // 16 + _ [8]byte // 24 +} diff --git a/vendor/github.com/go-ole/go-ole/variant_s390x.go b/vendor/github.com/go-ole/go-ole/variant_s390x.go new file mode 100644 index 00000000..9874ca66 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/variant_s390x.go @@ -0,0 +1,12 @@ +// +build s390x + +package ole + +type VARIANT struct { + VT VT // 2 + wReserved1 uint16 // 4 + wReserved2 uint16 // 6 + wReserved3 uint16 // 8 + Val int64 // 16 + _ [8]byte // 24 +} diff --git a/vendor/github.com/go-ole/go-ole/vt_string.go b/vendor/github.com/go-ole/go-ole/vt_string.go new file mode 100644 index 00000000..729b4a04 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/vt_string.go @@ -0,0 +1,58 @@ +// generated by stringer -output vt_string.go -type VT; DO NOT EDIT + +package ole + +import "fmt" + +const ( + _VT_name_0 = "VT_EMPTYVT_NULLVT_I2VT_I4VT_R4VT_R8VT_CYVT_DATEVT_BSTRVT_DISPATCHVT_ERRORVT_BOOLVT_VARIANTVT_UNKNOWNVT_DECIMAL" + _VT_name_1 = "VT_I1VT_UI1VT_UI2VT_UI4VT_I8VT_UI8VT_INTVT_UINTVT_VOIDVT_HRESULTVT_PTRVT_SAFEARRAYVT_CARRAYVT_USERDEFINEDVT_LPSTRVT_LPWSTR" + _VT_name_2 = "VT_RECORDVT_INT_PTRVT_UINT_PTR" + _VT_name_3 = "VT_FILETIMEVT_BLOBVT_STREAMVT_STORAGEVT_STREAMED_OBJECTVT_STORED_OBJECTVT_BLOB_OBJECTVT_CFVT_CLSID" + _VT_name_4 = "VT_BSTR_BLOBVT_VECTOR" + _VT_name_5 = "VT_ARRAY" + _VT_name_6 = "VT_BYREF" + _VT_name_7 = "VT_RESERVED" + _VT_name_8 = "VT_ILLEGAL" +) + +var ( + _VT_index_0 = [...]uint8{0, 8, 15, 20, 25, 30, 35, 40, 47, 54, 65, 73, 80, 90, 100, 110} + _VT_index_1 = [...]uint8{0, 5, 11, 17, 23, 28, 34, 40, 47, 54, 64, 70, 82, 91, 105, 113, 122} + _VT_index_2 = [...]uint8{0, 9, 19, 30} + _VT_index_3 = [...]uint8{0, 11, 18, 27, 37, 55, 71, 85, 90, 98} + _VT_index_4 = [...]uint8{0, 12, 21} + _VT_index_5 = [...]uint8{0, 8} + _VT_index_6 = [...]uint8{0, 8} + _VT_index_7 = [...]uint8{0, 11} + _VT_index_8 = [...]uint8{0, 10} +) + +func (i VT) String() string { + switch { + case 0 <= i && i <= 14: + return _VT_name_0[_VT_index_0[i]:_VT_index_0[i+1]] + case 16 <= i && i <= 31: + i -= 16 + return _VT_name_1[_VT_index_1[i]:_VT_index_1[i+1]] + case 36 <= i && i <= 38: + i -= 36 + return _VT_name_2[_VT_index_2[i]:_VT_index_2[i+1]] + case 64 <= i && i <= 72: + i -= 64 + return _VT_name_3[_VT_index_3[i]:_VT_index_3[i+1]] + case 4095 <= i && i <= 4096: + i -= 4095 + return _VT_name_4[_VT_index_4[i]:_VT_index_4[i+1]] + case i == 8192: + return _VT_name_5 + case i == 16384: + return _VT_name_6 + case i == 32768: + return _VT_name_7 + case i == 65535: + return _VT_name_8 + default: + return fmt.Sprintf("VT(%d)", i) + } +} diff --git a/vendor/github.com/go-ole/go-ole/winrt.go b/vendor/github.com/go-ole/go-ole/winrt.go new file mode 100644 index 00000000..4e9eca73 --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/winrt.go @@ -0,0 +1,99 @@ +// +build windows + +package ole + +import ( + "reflect" + "syscall" + "unicode/utf8" + "unsafe" +) + +var ( + procRoInitialize = modcombase.NewProc("RoInitialize") + procRoActivateInstance = modcombase.NewProc("RoActivateInstance") + procRoGetActivationFactory = modcombase.NewProc("RoGetActivationFactory") + procWindowsCreateString = modcombase.NewProc("WindowsCreateString") + procWindowsDeleteString = modcombase.NewProc("WindowsDeleteString") + procWindowsGetStringRawBuffer = modcombase.NewProc("WindowsGetStringRawBuffer") +) + +func RoInitialize(thread_type uint32) (err error) { + hr, _, _ := procRoInitialize.Call(uintptr(thread_type)) + if hr != 0 { + err = NewError(hr) + } + return +} + +func RoActivateInstance(clsid string) (ins *IInspectable, err error) { + hClsid, err := NewHString(clsid) + if err != nil { + return nil, err + } + defer DeleteHString(hClsid) + + hr, _, _ := procRoActivateInstance.Call( + uintptr(unsafe.Pointer(hClsid)), + uintptr(unsafe.Pointer(&ins))) + if hr != 0 { + err = NewError(hr) + } + return +} + +func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) { + hClsid, err := NewHString(clsid) + if err != nil { + return nil, err + } + defer DeleteHString(hClsid) + + hr, _, _ := procRoGetActivationFactory.Call( + uintptr(unsafe.Pointer(hClsid)), + uintptr(unsafe.Pointer(iid)), + uintptr(unsafe.Pointer(&ins))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// HString is handle string for pointers. +type HString uintptr + +// NewHString returns a new HString for Go string. +func NewHString(s string) (hstring HString, err error) { + u16 := syscall.StringToUTF16Ptr(s) + len := uint32(utf8.RuneCountInString(s)) + hr, _, _ := procWindowsCreateString.Call( + uintptr(unsafe.Pointer(u16)), + uintptr(len), + uintptr(unsafe.Pointer(&hstring))) + if hr != 0 { + err = NewError(hr) + } + return +} + +// DeleteHString deletes HString. +func DeleteHString(hstring HString) (err error) { + hr, _, _ := procWindowsDeleteString.Call(uintptr(hstring)) + if hr != 0 { + err = NewError(hr) + } + return +} + +// String returns Go string value of HString. +func (h HString) String() string { + var u16buf uintptr + var u16len uint32 + u16buf, _, _ = procWindowsGetStringRawBuffer.Call( + uintptr(h), + uintptr(unsafe.Pointer(&u16len))) + + u16hdr := reflect.SliceHeader{Data: u16buf, Len: int(u16len), Cap: int(u16len)} + u16 := *(*[]uint16)(unsafe.Pointer(&u16hdr)) + return syscall.UTF16ToString(u16) +} diff --git a/vendor/github.com/go-ole/go-ole/winrt_doc.go b/vendor/github.com/go-ole/go-ole/winrt_doc.go new file mode 100644 index 00000000..52e6d74c --- /dev/null +++ b/vendor/github.com/go-ole/go-ole/winrt_doc.go @@ -0,0 +1,36 @@ +// +build !windows + +package ole + +// RoInitialize +func RoInitialize(thread_type uint32) (err error) { + return NewError(E_NOTIMPL) +} + +// RoActivateInstance +func RoActivateInstance(clsid string) (ins *IInspectable, err error) { + return nil, NewError(E_NOTIMPL) +} + +// RoGetActivationFactory +func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) { + return nil, NewError(E_NOTIMPL) +} + +// HString is handle string for pointers. +type HString uintptr + +// NewHString returns a new HString for Go string. +func NewHString(s string) (hstring HString, err error) { + return HString(uintptr(0)), NewError(E_NOTIMPL) +} + +// DeleteHString deletes HString. +func DeleteHString(hstring HString) (err error) { + return NewError(E_NOTIMPL) +} + +// String returns Go string value of HString. +func (h HString) String() string { + return "" +} diff --git a/vendor/modules.txt b/vendor/modules.txt index db2c27f7..3ab36036 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -11,6 +11,10 @@ github.com/davecgh/go-spew/spew # github.com/go-logr/logr v1.2.0 ## explicit; go 1.16 github.com/go-logr/logr +# github.com/go-ole/go-ole v1.3.0 +## explicit; go 1.12 +github.com/go-ole/go-ole +github.com/go-ole/go-ole/oleutil # github.com/golang/protobuf v1.5.3 ## explicit; go 1.9 github.com/golang/protobuf/jsonpb @@ -79,6 +83,18 @@ github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta1 github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2 github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta3 github.com/kubernetes-csi/csi-proxy/client/groups/volume/v2alpha1 +# github.com/microsoft/wmi v0.23.0 +## explicit; go 1.22 +github.com/microsoft/wmi/go/wmi +github.com/microsoft/wmi/pkg/base/credential +github.com/microsoft/wmi/pkg/base/host +github.com/microsoft/wmi/pkg/base/instance +github.com/microsoft/wmi/pkg/base/query +github.com/microsoft/wmi/pkg/base/session +github.com/microsoft/wmi/pkg/errors +github.com/microsoft/wmi/pkg/wmiinstance +github.com/microsoft/wmi/server2019/root/cimv2 +github.com/microsoft/wmi/server2019/root/microsoft/windows/storage # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors